@font-face {
  font-family: "Zen Maru Gothic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/zen-maru-gothic-jp-700.woff2") format("woff2");
  unicode-range: U+3000-30FF, U+4E00-9FFF, U+FF00-FFEF, U+2000-206F;
}
@font-face {
  font-family: "Zen Maru Gothic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/zen-maru-gothic-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC;
}

.coord-app {
  --coord-ink: #6b123f;
  --coord-mute: #a15a7a;
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  color: var(--coord-ink);
}

.coord-hero {
  position: relative;
  margin: 0.4rem 0 1rem;
  padding: 1.15rem 1rem 1.2rem;
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 12% 20%, #fff 0 14px, transparent 15px),
    radial-gradient(circle at 88% 18%, #ffe08a 0 7px, transparent 8px),
    linear-gradient(165deg, #fff 0%, #ffe6f3 48%, #f3e8ff 100%);
  border: 3px solid #ff9ac8;
  box-shadow: 0 6px 0 #ffd0e6, 0 12px 24px rgba(157, 20, 84, 0.12);
  overflow: hidden;
}
.coord-hero h1 {
  margin: 0 0 0.35rem;
  font-size: 1.7rem;
  line-height: 1.25;
  letter-spacing: 0.02em;
}
.coord-hero-lead {
  margin: 0;
  font-weight: 700;
  color: var(--coord-mute);
  line-height: 1.6;
}
.coord-deco {
  position: absolute;
  pointer-events: none;
  color: #ff7eb6;
}
.coord-deco-a { top: 0.4rem; right: 0.8rem; font-size: 1.1rem; }
.coord-deco-b { bottom: 0.35rem; left: 0.7rem; font-size: 0.9rem; color: #c45cff; }

.coord-note {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--coord-mute);
}

.coord-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.9rem;
}
.coord-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  border: 2px solid #ffc2da;
  background: #fff;
  color: #9d1454;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(255, 138, 184, 0.25);
}
.coord-chip[aria-pressed="true"],
.coord-chip:focus-visible {
  background: linear-gradient(135deg, #c21a6b, #7a2a8f);
  border-color: #9d1454;
  color: #fff;
}
.coord-new {
  margin-left: auto;
  background: linear-gradient(135deg, #ff4f9a, #c21a6b);
  border-color: #9d1454;
  color: #fff;
  box-shadow: 0 3px 0 #7c0f43;
}
.coord-new:hover,
.coord-new:focus-visible {
  color: #fff;
}

.coord-empty {
  text-align: center;
  padding: 1.6rem 1rem;
  border-radius: 1.4rem;
  background: #fff;
  border: 2px dashed #ffb7d5;
}
.coord-empty p { margin: 0.35rem 0; }
.coord-empty-art {
  font-size: 2.2rem;
  letter-spacing: 0.15em;
}

.coord-list {
  display: grid;
  gap: 0.8rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.coord-item {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem 0.95rem 0.8rem;
  border-radius: 1.25rem;
  background: linear-gradient(180deg, #fff, #fff7fb);
  border: 2px solid #ffc2da;
  box-shadow: 0 4px 0 #ffe0ee;
  text-align: left;
  color: inherit;
  cursor: pointer;
  width: 100%;
  font: inherit;
  -webkit-tap-highlight-color: rgba(255, 138, 184, 0.25);
}
.coord-item:hover,
.coord-item:focus-visible {
  transform: translateY(-1px);
}
.coord-item-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
}
.coord-item-title {
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
}
.coord-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  background: #ffe3ef;
  color: #9d1454;
  white-space: nowrap;
}
.coord-item[data-type="キュート"] .coord-pill-type { background: #ffe3ef; color: #9d1454; }
.coord-item[data-type="クール"] .coord-pill-type { background: #dceaFF; color: #1e5ad6; }
.coord-item[data-type="セクシー"] .coord-pill-type { background: #efe3ff; color: #7a2ad6; }
.coord-item[data-type="ポップ"] .coord-pill-type { background: #fff3c2; color: #a15c00; }
.coord-item-meta {
  margin: 0;
  color: var(--coord-mute);
  font-size: 0.88rem;
  font-weight: 700;
}
.coord-names {
  margin: 0;
  font-weight: 700;
  line-height: 1.5;
  line-break: strict;
}
.coord-fav-mark { color: #e21888; }

.coord-panel {
  display: grid;
  gap: 0.85rem;
}
.coord-field {
  display: grid;
  gap: 0.3rem;
  margin: 0;
}
.coord-field span,
.coord-label {
  font-weight: 800;
  font-size: 0.92rem;
}
.coord-field input,
.coord-field textarea,
.coord-search {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border-radius: 0.95rem;
  border: 2px solid #ffc2da;
  background: #fff;
  font: inherit;
  font-weight: 700;
  color: var(--coord-ink);
}
.coord-field textarea { min-height: 5.5rem; resize: vertical; }
.coord-help { margin: 0; font-size: 0.82rem; color: var(--coord-mute); }

.coord-types,
.coord-cats,
.coord-score {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.coord-score button[aria-pressed="true"] { filter: none; }
.coord-heart-btn {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0.35;
  padding: 0;
}
.coord-heart-btn[aria-pressed="true"],
.coord-heart-btn.is-on { opacity: 1; }

.coord-picker {
  padding: 0.75rem;
  border-radius: 1.15rem;
  background: #fff;
  border: 2px solid #ffc2da;
}
.coord-picked {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.6rem;
  padding: 0;
  list-style: none;
}
.coord-picked li {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.25rem 0.35rem 0.25rem 0.65rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffe3ef, #f1e4ff);
  font-weight: 800;
  font-size: 0.85rem;
  line-break: strict;
}
.coord-picked button {
  min-width: 32px;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: #9d1454;
  font-weight: 900;
  cursor: pointer;
}
.coord-results {
  display: grid;
  gap: 0.35rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  max-height: 16rem;
  overflow: auto;
}
.coord-results button,
.coord-result {
  display: grid;
  width: 100%;
  text-align: left;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  min-height: 44px;
  border-radius: 0.9rem;
  border: 2px solid #ffe0ee;
  background: #fffafc;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.coord-result[aria-pressed="true"] {
  border-color: #ff8ab8;
  background: #ffe9f3;
}
.coord-result-name {
  font-weight: 800;
  line-break: strict;
}
.coord-result-meta {
  font-size: 0.78rem;
  color: var(--coord-mute);
  font-weight: 700;
}
.coord-ext {
  font-size: 0.78rem;
}

.coord-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.coord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 2px solid #9d1454;
  background: linear-gradient(135deg, #ff4f9a, #c21a6b);
  color: #fff;
  font-weight: 800;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 3px 0 #7c0f43;
}
.coord-btn:hover,
.coord-btn:focus-visible { color: #fff; }
.coord-btn-sub {
  background: #fff;
  color: #9d1454;
  border-color: #ffc2da;
  box-shadow: 0 3px 0 #ffd6e8;
}
.coord-btn-sub:hover,
.coord-btn-sub:focus-visible { color: #7c0f43; }
.coord-btn-danger {
  background: #fff;
  color: #9d1454;
  border-color: #e8a0b8;
  box-shadow: none;
}

.coord-errors {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 0.9rem;
  background: #fff1f4;
  border: 2px solid #e889ab;
  color: #6b123f;
  font-weight: 700;
}

.coord-share-preview {
  display: grid;
  gap: 0.7rem;
  justify-items: center;
}
.coord-share-preview canvas {
  width: min(100%, 390px);
  height: auto;
  border-radius: 1.1rem;
  box-shadow: 0 10px 28px rgba(157, 20, 84, 0.18);
  background: #fff;
}
.coord-caption {
  width: 100%;
  white-space: pre-wrap;
  line-break: strict;
  background: #fff;
  border: 2px dashed #ffc2da;
  border-radius: 1rem;
  padding: 0.7rem 0.8rem;
  font-weight: 700;
}

@media (min-width: 640px) {
  .coord-list { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .coord-item,
  .coord-chip,
  .coord-btn {
    transition: none;
  }
  .coord-item:hover,
  .coord-item:focus-visible,
  .coord-item:active {
    transform: none;
  }
}

.coord-app p, .coord-names, .coord-hero-lead, .coord-note, .coord-caption, .coord-result-name, .coord-item-title, .coord-help {
  line-break: strict;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.coord-field {
  border: 0;
  padding: 0;
  min-width: 0;
  margin: 0;
}
.coord-field legend.coord-label,
.coord-label {
  padding: 0;
  float: none;
  width: auto;
}
.coord-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.coord-new {
  margin-left: 0;
  grid-column: 1 / -1;
}
.coord-names {
  display: grid;
  gap: 0.15rem;
}
.coord-name-line { margin: 0; }
.coord-heart-btn { color: #ffd0e0; opacity: 1; }
.coord-heart-btn.is-on { color: #e21888; text-shadow: 0 1px 0 #ffb7d5; }

.coord-chip-lg {
  min-height: 52px;
  padding: 0.45rem 1.05rem;
  font-size: 1rem;
  border-width: 3px;
  border-radius: 999px;
}
.coord-chip-theme {
  flex-direction: column;
  gap: 0.12rem;
  min-width: 5.6rem;
  min-height: 4.4rem;
  padding: 0.4rem 0.7rem 0.45rem;
  border-width: 3px;
  border-color: var(--chip-accent, #ff7eb6);
  border-radius: 1.2rem;
  background: linear-gradient(180deg, #fff, var(--chip-soft, #ffe3ef));
  font-size: 1rem;
}
.coord-chip-swatch {
  display: block;
  width: 2.4rem;
  height: 0.7rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #fff, var(--chip-accent, #ff7eb6));
}
.coord-chip-en {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  opacity: 0.8;
}
.coord-chip-theme[aria-pressed="true"],
.coord-chip-theme:focus-visible {
  background: linear-gradient(160deg, var(--chip-accent, #ff4f9a), #7a2a8f);
  border-color: var(--chip-accent, #9d1454);
  color: #fff;
}
.coord-chip-theme[aria-pressed="true"] .coord-chip-swatch,
.coord-chip-theme:focus-visible .coord-chip-swatch {
  background: linear-gradient(90deg, #fff, #ffe08a);
}
.coord-types,
.coord-cats {
  gap: 0.55rem;
}
.coord-date-ja {
  margin: 0;
  font-weight: 800;
  color: #c21a6b;
  font-size: 0.98rem;
}
.coord-live-preview {
  margin-top: 0.75rem;
  padding: 0.85rem 0.8rem 1rem;
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 12% 20%, #fff 0 8px, transparent 9px),
    linear-gradient(180deg, #fff, #fff3f9);
  border: 3px solid #ffb7d5;
  display: grid;
  gap: 0.55rem;
  justify-items: center;
}
.coord-live-preview canvas {
  width: min(100%, 280px);
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(157, 20, 84, 0.16);
  background: #fff;
}
.coord-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
}
@media (prefers-reduced-motion: reduce) {
  .coord-chip-theme,
  .coord-live-preview canvas {
    transition: none;
  }
}
