:root {
  --bg: #0d0b08;
  --bg2: #17130d;
  --card: #1c170f;
  --line: #3a2f1c;
  --gold: #e8c66a;
  --gold2: #b8902f;
  --gold-hi: #fff1c2;
  --red: #c8302c;
  --text: #f3ead6;
  --muted: #a8997a;
  --mincho: "Shippori Mincho B1", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --sans: "Noto Sans JP", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.6;
  background-image: radial-gradient(ellipse 120% 60% at 50% -10%, #3b2a0c 0%, transparent 60%);
  background-repeat: no-repeat; min-height: 100vh;
}
a { color: var(--gold); }
button { font: inherit; cursor: pointer; }

.top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; max-width: 880px; margin: 0 auto; gap: 12px; }
.back { color: var(--muted); text-decoration: none; font-size: 14px; }
.me { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-height: 32px; }
.me img { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--gold2); }
.login {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; text-decoration: none;
  background: var(--text); color: #111; font-weight: 700; font-size: 13px;
}

.hero { position: relative; text-align: center; padding: 28px 16px 40px; max-width: 880px; margin: 0 auto; overflow: hidden; }
.glow { position: absolute; inset: -40% 10% auto; height: 120%; background: radial-gradient(closest-side, rgba(232,198,106,.18), transparent); pointer-events: none; }
.kicker { position: relative; margin: 0 0 10px; letter-spacing: .32em; font-size: 11px; color: var(--gold2); font-weight: 700; }
h1 { position: relative; margin: 0; font-family: var(--mincho); font-weight: 800; line-height: 1.05; display: flex; flex-direction: column; align-items: center; }
.gold-text, h1 .t2, h1 .year, .mine-word, .nominee .word, .rank-1 .r-word {
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 45%, var(--gold2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
h1 .t1 { font-size: clamp(22px, 6vw, 34px); color: var(--text); letter-spacing: .3em; margin-left: .3em; }
h1 .t2 { font-size: clamp(48px, 15vw, 96px); letter-spacing: .04em; filter: drop-shadow(0 2px 12px rgba(232,198,106,.25)); }
h1 .year { font-size: clamp(22px, 6vw, 32px); letter-spacing: .4em; margin: 6px 0 0 .4em; }
.lead { position: relative; margin: 22px 0 10px; font-size: 15px; color: var(--text); }
.lead b { color: var(--gold); font-size: 18px; }
.stats { position: relative; color: var(--muted); font-size: 13px; }
.stats .dot { margin: 0 4px; }
#total { color: var(--gold); font-weight: 700; }

.share, .share-top {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px;
  background: #000; color: #fff; font-weight: 700; padding: 12px 22px; font-size: 15px;
  box-shadow: 0 0 0 1px #444 inset;
}
.share-top { position: relative; margin-top: 20px; background: transparent; box-shadow: 0 0 0 1px var(--gold2) inset; color: var(--gold); font-size: 14px; padding: 9px 18px; }
.share { width: 100%; max-width: 420px; background: #000; box-shadow: 0 0 0 1px #555 inset, 0 6px 20px rgba(0,0,0,.4); }
.share .x, .share-top .x, .fab .x { font-size: 18px; }

.mine {
  max-width: 560px; margin: 0 auto 28px; padding: 22px 16px 20px; text-align: center;
  border: 1px solid var(--gold2); border-radius: 16px; background: linear-gradient(180deg, #241b0c, var(--bg2));
  margin-left: 16px; margin-right: 16px;
}
@media (min-width: 600px) { .mine { margin-left: auto; margin-right: auto; } }
.mine-label { margin: 0; font-size: 12px; letter-spacing: .3em; color: var(--gold2); font-weight: 700; }
.mine-word { margin: 4px 0 14px; font-family: var(--mincho); font-weight: 800; font-size: clamp(30px, 9vw, 46px); line-height: 1.2; }
.mine-card { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: 10px; border: 1px solid var(--line); margin: 0 0 16px; background: #000; }
.mine-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

.block { max-width: 880px; margin: 0 auto; padding: 8px 16px 32px; }
h2 { text-align: center; font-family: var(--mincho); font-weight: 800; font-size: 22px; letter-spacing: .3em; color: var(--gold); margin: 12px 0 6px; }
h2 span { display: inline-flex; align-items: center; gap: 14px; }
h2 span::before, h2 span::after { content: ""; width: 36px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold2)); }
h2 span::after { transform: scaleX(-1); }
.hint { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 18px; }

.nominees { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.nominee {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); text-align: left; width: 100%; color: inherit;
  transition: border-color .15s, transform .15s, background .15s;
}
.nominee:hover { border-color: var(--gold2); }
.nominee:active { transform: scale(.98); }
.nominee .no { font-size: 11px; color: var(--gold2); letter-spacing: .15em; font-weight: 700; }
.nominee .word { font-family: var(--mincho); font-weight: 800; font-size: 24px; line-height: 1.25; }
.nominee .note { font-size: 12px; color: var(--muted); line-height: 1.5; }
.nominee .foot-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 12px; }
.nominee .count { color: var(--muted); }
.nominee .pick { color: var(--gold); font-weight: 700; }
.nominee.voted { border-color: var(--gold); background: linear-gradient(180deg, #2c210d, var(--card)); box-shadow: 0 0 0 1px var(--gold) inset, 0 0 24px rgba(232,198,106,.15); }
.nominee.voted .pick::before { content: "✓ "; }
.nominee.flash { animation: flash 1.6s ease-out 2; }
@keyframes flash { 0% { box-shadow: 0 0 0 2px var(--gold), 0 0 30px rgba(232,198,106,.5); } 100% { box-shadow: none; } }
.nominee[disabled] { cursor: default; }
@media (max-width: 559px) {
  .nominees { grid-template-columns: 1fr 1fr; gap: 8px; }
  .nominee { padding: 11px 10px 9px; }
  .nominee .word { font-size: 18px; }
  .nominee .note { font-size: 11px; }
  .nominee .foot-row { flex-direction: column; align-items: flex-start; gap: 0; margin-top: auto; padding-top: 4px; }
}

.ranking { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ranking li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); position: relative; overflow: hidden; }
.ranking .bar { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(232,198,106,.16), rgba(232,198,106,.04)); z-index: 0; }
.ranking li > * { position: relative; z-index: 1; }
.r-no { font-family: var(--mincho); font-weight: 800; font-size: 18px; color: var(--muted); text-align: center; }
.r-word { font-family: var(--mincho); font-weight: 800; font-size: 18px; }
.r-n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank-1 { border-color: var(--gold) !important; padding: 16px 12px !important; }
.rank-1 .r-no { color: var(--gold); font-size: 13px; line-height: 1.2; }
.rank-1 .r-word { font-size: 26px; }
.rank-2 .r-no, .rank-3 .r-no { color: var(--gold2); }
.ranking .empty { display: block; text-align: center; color: var(--muted); font-size: 13px; }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px 48px; border-top: 1px solid var(--line); max-width: 880px; margin: 0 auto; }
.foot a { color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--gold); color: #1a1408; font-weight: 700; padding: 10px 18px; border-radius: 999px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.5); max-width: calc(100% - 32px); text-align: center; z-index: 10; }

/* v2: 何票でも・みんなの投稿 */
.hero-actions { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.hero-actions .share-top { margin-top: 0; }
.suggest-btn {
  border: 0; border-radius: 999px; padding: 10px 20px; font-weight: 700; font-size: 14px;
  background: linear-gradient(180deg, #f6dc8e, #c99a35); color: #1a1408; box-shadow: 0 4px 16px rgba(232,198,106,.25);
}
.suggest-btn[hidden], .fab[hidden] { display: none; }
.center { text-align: center; margin: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0 4px; }
.chip { border: 1px solid var(--gold2); background: transparent; color: var(--gold); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; }
.chip.on { background: var(--gold); color: #1a1408; }
.nominee .no.by { color: var(--muted); letter-spacing: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 22px; }
.nominee .del { position: absolute; top: 6px; right: 8px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); font-size: 16px; }
.nominee .del:hover { background: #2c2416; color: var(--text); }
.nominees .empty { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: 13px; padding: 12px; }
.fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 5; border: 0; border-radius: 999px;
  padding: 12px 18px; font-weight: 700; font-size: 14px; background: linear-gradient(180deg, #f6dc8e, #c99a35); color: #1a1408;
  box-shadow: 0 8px 24px rgba(0,0,0,.5), 0 0 0 1px rgba(255,241,194,.4) inset;
}
.foot { padding-bottom: 96px; }
.modal { border: 1px solid var(--gold2); border-radius: 16px; background: var(--bg2); color: var(--text); padding: 0; width: min(440px, calc(100% - 32px)); }
.modal::backdrop { background: rgba(0,0,0,.7); }
.modal form { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal h3 { margin: 0; font-family: var(--mincho); font-weight: 800; color: var(--gold); font-size: 20px; }
.modal label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.modal label small { float: right; }
.modal input { font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.modal input:focus { outline: 2px solid var(--gold2); border-color: transparent; }
.modal-note { margin: 0; font-size: 12px; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.modal .ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 9px 16px; }
.modal .primary { border: 0; border-radius: 999px; padding: 9px 18px; font-weight: 700; background: linear-gradient(180deg, #f6dc8e, #c99a35); color: #1a1408; }
.modal .primary:disabled { opacity: .5; }

/* v3: 解析ランキング（並び順＝順位）。1〜3位を大きく */
.method { text-align: center; color: var(--text); font-size: 13px; margin: 0 auto 6px; max-width: 560px; opacity: .85; }
.nominee.podium { border-color: var(--gold2); }
.nominee.podium1 { grid-column: 1 / -1; text-align: center; align-items: center; padding: 22px 16px 16px; background: linear-gradient(180deg, #34270e, var(--card)); border-color: var(--gold); }
.nominee.podium1 .no { font-size: 13px; color: #fff; background: var(--red); padding: 2px 12px; border-radius: 4px; letter-spacing: .2em; }
.nominee.podium1 .word { font-size: clamp(34px, 10vw, 56px); margin: 6px 0 2px; }
.nominee.podium1 .foot-row { width: 100%; max-width: 360px; }
.nominee.podium2 .word, .nominee.podium3 .word { font-size: 28px; }
.nominee.podium2 .no { color: #cfd3d8; }
.nominee.podium3 .no { color: #d08a52; }
@media (max-width: 559px) { .nominee.podium2 .word, .nominee.podium3 .word { font-size: 22px; } }
.nominees li:has(> .podium1) { grid-column: 1 / -1; }
.nominee.podium1 { grid-column: auto; }
.nominee.podium1 .foot-row { align-items: center; text-align: center; }

/* 株クラ実況LIVE へのリンク（さりげなく: 上のナビと、フッターの上のカード） */
.nav { display: flex; align-items: center; gap: 14px; min-width: 0; }
.live-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.live-link:hover { color: var(--text); }
.live-link .dot, .live-go::before { width: 7px; height: 7px; border-radius: 50%; background: #f23f43; box-shadow: 0 0 0 3px rgba(242,63,67,.2); }
.live-link .dot { display: inline-block; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.live-card { display: flex; align-items: center; gap: 12px; max-width: 560px; margin: 0 auto 28px; padding: 12px 14px; border-radius: 14px; text-decoration: none; color: var(--text); background: #1e1f22; border: 1px solid #3f4147; margin-left: 16px; margin-right: 16px; }
@media (min-width: 592px) { .live-card { margin-left: auto; margin-right: auto; } }
.live-card:hover { border-color: #5865f2; }
.live-icon img { display: block; width: 40px; height: 40px; border-radius: 12px; }
.live-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.live-text b { font-size: 14px; }
.live-text small { font-size: 12px; color: var(--muted); line-height: 1.5; }
.live-go { font-size: 13px; font-weight: 700; color: #949cf7; white-space: nowrap; }

/* 同じ段のカードは高さをそろえる（長い言葉で折り返したカードに合わせる）。票数の行は下にそろえる */
.nominees li { display: flex; }
.nominees li > .nominee { height: 100%; }
.nominee .foot-row { margin-top: auto; padding-top: 6px; }
