/* ネット流行語年齢：夜のタイムトンネルと液晶の光 */
:root {
  --accent: #6741d9; --accent-ink: #ffffff; --accent-soft: #ece5ff;
  --nn-night: #13152a; --nn-night-2: #2b1d5c; --nn-gold: #f2b705; --nn-led: #2f9e44; --nn-pink: #e64980;
  --nn-cell-g: #2f9e44; --nn-cell-y: #f2b705; --nn-cell-x: #adb5bd;
  --nn-card-fg: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #b197fc; --accent-ink: #120e24; --accent-soft: #2a2350;
    --nn-cell-x: #495057;
  }
}
:root[data-theme="dark"] { --accent: #b197fc; --accent-ink: #120e24; --accent-soft: #2a2350; --nn-cell-x: #495057; }

.mn-title { letter-spacing: .02em; }
.nn-hero { border-radius: var(--radius); overflow: hidden; background: var(--nn-night); box-shadow: var(--shadow); }
.nn-hero-svg { display: block; width: 100%; height: auto; }
.nn-hero-photo img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.nn-dev { animation: nn-bob 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.nn-dev1 { animation-delay: -.8s; } .nn-dev2 { animation-delay: -1.6s; } .nn-dev3 { animation-delay: -2.4s; }
@keyframes nn-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.nn-twinkle { animation: nn-tw 2.4s ease-in-out infinite; }
@keyframes nn-tw { 50% { opacity: .2; } }

.nn-daily .mn-daily-num { color: var(--accent); }
.nn-cd { font-variant-numeric: tabular-nums; }
.nn-done { margin: 8px 0 0; font-weight: 700; font-size: 14px; }

/* 出題カード：古い液晶ふうの枠 */
.nn-word-card { position: relative; border-radius: 20px; padding: 18px 16px 22px; text-align: center; color: var(--nn-card-fg);
  background: radial-gradient(120% 90% at 50% 0%, var(--nn-night-2), var(--nn-night)); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .08), var(--shadow); overflow: hidden; }
.nn-word-card::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 4px); pointer-events: none; }
.nn-word-top { display: flex; align-items: center; gap: 6px; justify-content: center; flex-wrap: wrap; }
.nn-led { width: 8px; height: 8px; border-radius: 50%; background: var(--nn-pink); box-shadow: 0 0 8px var(--nn-pink); }
.nn-led + .nn-led { background: var(--nn-gold); box-shadow: 0 0 8px var(--nn-gold); }
.nn-led + .nn-led + .nn-led { background: #51cf66; box-shadow: 0 0 8px #51cf66; }
.nn-word-q { font-size: 13px; opacity: .85; margin-left: 4px; }
.nn-word { font-size: clamp(26px, 8.5vw, 44px); font-weight: 900; line-height: 1.3; margin: 16px 0 4px; text-shadow: 0 0 18px rgba(177, 151, 252, .7); overflow-wrap: anywhere; }
.nn-yomi { font-size: 13px; opacity: .75; }

.nn-years { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nn-year { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 72px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; touch-action: manipulation; transition: transform .08s; }
.nn-year:active { transform: scale(.97); }
.nn-year:hover:not(:disabled) { border-color: var(--accent); }
.nn-year-num { font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: .04em; line-height: 1.1; }
.nn-year-era { font-size: 12px; color: var(--text-sub); }
.nn-year.is-good { border-color: var(--good); background: var(--good-soft); }
.nn-year.is-bad { border-color: var(--bad); background: var(--bad-soft); }
.nn-year:disabled { cursor: default; }
.nn-year:disabled:not(.is-good):not(.is-bad) { opacity: .5; }
.nn-reveal { border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); }
.nn-reveal > b { font-size: 20px; }
.nn-reveal p { margin: 4px 0 0; }
.nn-reveal.is-good > b { color: var(--good); }
.nn-reveal.is-near > b { color: var(--warn); }
.nn-reveal.is-bad > b { color: var(--bad); }

/* 結果 */
.nn-res-card { display: grid; grid-template-columns: 1fr; border-radius: 20px; overflow: hidden; color: var(--nn-card-fg); background: linear-gradient(160deg, var(--nn-night), var(--nn-night-2)); box-shadow: var(--shadow); }
.nn-res-card.is-rare { box-shadow: 0 0 0 3px var(--nn-gold), var(--shadow); }
.nn-type-img, .nn-type-art svg { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.nn-type-art { overflow: hidden; }
.nn-type-art svg { width: 100%; height: auto; }
.nn-res-body { padding: 14px 18px 18px; }
.nn-res-kicker { color: var(--nn-gold); font-weight: 700; font-size: 13px; letter-spacing: .1em; margin: 0; }
.nn-age { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.nn-age b { font-size: clamp(64px, 20vw, 96px); font-weight: 900; color: var(--nn-gold); line-height: 1; }
.nn-age small { font-size: 18px; font-weight: 700; }
.nn-type { font-size: 24px; margin: 6px 0; }
.nn-rare { display: inline-block; font-size: 12px; background: var(--nn-pink); color: #fff; border-radius: 6px; padding: 1px 8px; margin-right: 6px; vertical-align: middle; }
.nn-praise { margin: 0; opacity: .9; }
.nn-oneline { font-weight: 700; text-align: center; }
@media (min-width: 640px) {
  .nn-res-card { grid-template-columns: 220px 1fr; align-items: center; }
  .nn-age b { font-size: 84px; }
}

.nn-eras { display: grid; gap: 8px; }
.nn-era-row { display: grid; grid-template-columns: 7.5em 1fr auto; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 10px; }
.nn-era-row.is-best { background: var(--accent-soft); }
.nn-era-name { font-weight: 700; line-height: 1.2; }
.nn-era-name small { display: block; font-size: 11px; color: var(--text-sub); font-weight: 500; }
.nn-era-cells { display: flex; gap: 5px; }
.nn-cell { width: 24px; height: 24px; border-radius: 6px; display: inline-block; }
.nn-cell.c-g { background: var(--nn-cell-g); } .nn-cell.c-y { background: var(--nn-cell-y); } .nn-cell.c-x { background: var(--nn-cell-x); }
.nn-zukan { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.nn-review ul { padding-left: 1.2em; margin: 8px 0 0; }
.nn-review li { margin-bottom: 6px; }
.nn-review summary { cursor: pointer; font-weight: 700; }
.nn-z-era { margin: 14px 0 4px; font-size: 15px; }
.nn-z-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; font-size: 14px; }
.nn-z-list b { color: var(--accent); font-variant-numeric: tabular-nums; }
.nn-z-list .is-locked { color: var(--text-sub); }
.nn-age b.nn-age-na { font-size: 48px; }
.ai-note { margin: 4px 0 8px; text-align: right; }
