:root {
  --bg: #fff8ef;
  --ink: #2b2240;
  --muted: #6e6680;
  --line: #eadfce;
  --brand: #ff6b4a;
  --brand-dark: #e2502f;
  --panel: #ffffff;
  --radius: 18px;
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", "Noto Sans JP", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.7; }
h1, h2, h3, p { margin: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Hero */
.hero {
  text-align: center;
  padding: 56px 20px 48px;
  background:
    radial-gradient(circle at 15% 30%, #ffd66b 0 60px, transparent 61px),
    radial-gradient(circle at 85% 20%, #8fd3ff 0 40px, transparent 41px),
    radial-gradient(circle at 75% 85%, #ffb3d1 0 50px, transparent 51px),
    linear-gradient(160deg, #fff1dc, #ffe3e3);
  border-bottom: 3px dashed var(--line);
}
.hero__badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  letter-spacing: .12em;
  font-weight: 700;
}
.hero__title {
  margin-top: 14px;
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 900;
  letter-spacing: .02em;
}
.hero__title span {
  color: var(--brand);
  background: linear-gradient(transparent 62%, #ffe066 62%);
}
.hero__lead { margin-top: 10px; color: var(--muted); }

.container { max-width: 880px; margin: 0 auto; padding: 32px 20px 56px; display: grid; gap: 40px; }
.section-title { font-size: 22px; font-weight: 900; margin-bottom: 16px; }
.section-title::before { content: "✦ "; color: var(--brand); }
.section-title small { font-size: 14px; color: var(--muted); font-weight: 500; }

/* Character cards */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.card {
  --accent: #888;
  position: relative;
  display: grid;
  grid-template-columns: 40px 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--line); }
.card__rank {
  font-size: 22px; font-weight: 900; color: var(--muted); text-align: center;
}
.rank-1 .card__rank { color: #d4a000; }
.rank-1 .card__rank::after { content: "👑"; display: block; font-size: 16px; }
.rank-2 .card__rank { color: #8e9aaf; }
.rank-3 .card__rank { color: #b87333; }
.card__avatar {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center; font-size: 36px;
  background: color-mix(in srgb, var(--accent) 18%, white);
  border: 3px solid var(--accent);
}
.card__title { font-size: 12px; color: var(--accent); font-weight: 700; }
.card__name { font-size: 20px; font-weight: 900; }
.card__desc { font-size: 13px; color: var(--muted); }
.meter { margin-top: 8px; height: 8px; border-radius: 999px; background: #f2ebe0; overflow: hidden; }
.meter__fill { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .4s ease; }

.like {
  display: grid; justify-items: center; gap: 2px;
  min-width: 72px; padding: 10px 12px;
  border: 2px solid var(--accent); border-radius: 14px;
  background: #fff; color: var(--accent);
  font: inherit; font-weight: 900; cursor: pointer;
  transition: transform .1s ease, background .15s ease;
}
.like:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 12%, white); }
.like:active:not(:disabled) { transform: scale(.94); }
.like.is-liked { background: var(--accent); color: #fff; cursor: default; }
.like__icon { font-size: 22px; line-height: 1; }
.like__count { font-size: 14px; }

/* Form */
.panel {
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.picker { border: 0; padding: 0; margin: 0 0 16px; }
.picker legend { font-weight: 700; margin-bottom: 8px; }
.picker__options { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { --accent: #888; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  border: 2px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 14px;
}
.chip input:checked + span { background: var(--accent); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; position: relative; }
.field > span:first-child { font-weight: 700; font-size: 14px; }
.field input, .field textarea {
  font: inherit; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fffdf9;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
.field textarea { resize: vertical; }
.field__counter { justify-self: end; font-size: 12px; color: var(--muted); }

.notice {
  font-size: 13px; padding: 10px 12px; border-radius: 10px;
  background: #fff4d6; border: 1px solid #f3d27a; margin-bottom: 16px;
}
.btn {
  width: 100%; padding: 14px; border: 0; border-radius: 14px;
  background: var(--brand); color: #fff; font: inherit; font-weight: 900; font-size: 16px;
  box-shadow: 0 4px 0 var(--brand-dark); cursor: pointer;
}
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 var(--brand-dark); }
.btn:disabled { opacity: .6; cursor: wait; }
.form-message { margin-top: 10px; font-weight: 700; min-height: 1.7em; }
.form-message.is-ok { color: #1f8a55; }
.form-message.is-error { color: #c62f2f; }

/* Board */
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.filter select {
  font: inherit; padding: 6px 10px; border: 2px solid var(--line); border-radius: 10px; background: #fff;
}
.comments { list-style: none; padding: 0; margin: 0; columns: 2 260px; column-gap: 14px; }
.comment {
  --accent: #888;
  break-inside: avoid;
  margin-bottom: 14px;
  padding: 14px 16px;
  background: #fff;
  border-radius: 4px 16px 16px 16px;
  border-left: 6px solid var(--accent);
  box-shadow: 0 2px 0 var(--line);
}
.comment__tag { font-size: 12px; font-weight: 700; color: var(--accent); }
.comment__body { margin: 4px 0 8px; word-break: break-word; }
.comment__meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.comments__empty { color: var(--muted); }

.footer { text-align: center; font-size: 12px; color: var(--muted); padding: 20px; border-top: 1px solid var(--line); }

@media (max-width: 560px) {
  .card { grid-template-columns: 56px 1fr auto; gap: 12px; }
  .card__rank { display: none; }
  .card__avatar { width: 56px; height: 56px; font-size: 28px; }
}
