:root {
  color-scheme: dark;
  --bg: #0f1014;
  --surface: #171820;
  --surface-2: #1f2029;
  --panel: #15161d;
  --line: #303240;
  --line-soft: #252733;
  --text: #f4efe7;
  --muted: #b9b0a4;
  --faint: #837b72;
  --accent: #f0c86a;
  --accent-soft: #302719;
  --danger: #ff5571;
  --ok: #65e6ae;
  --warn: #ffc34d;
  --glow-ok: rgba(101, 230, 174, .24);
  --glow-danger: rgba(255, 85, 113, .26);
  --glow-warn: rgba(255, 195, 77, .22);
  font-family: Inter, "Noto Sans TC", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", "Noto Sans Thai", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.ai-review-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(216, 179, 106, 0.28);
  border-radius: 8px;
  background: rgba(17, 18, 24, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-align: center;
}

.ai-review-head h3 {
  display: inline-flex;
  margin: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  font-size: 20px;
  line-height: 1.25;
}

.ai-review-title-text {
  color: inherit;
  font-size: inherit;
  font-weight: 900;
}

.ai-review-pulse-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.54);
  animation: aiReviewPulse 1.18s ease-in-out infinite;
}

.ai-review-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.ai-review-features li {
  min-height: 28px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
}

.ai-review-preview {
  width: min(620px, 100%);
  min-height: 126px;
  margin: 18px auto 12px;
  padding: 16px 18px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  text-align: left;
}

.ai-review-preview p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.74);
  filter: blur(7.8px);
  font-size: 14px;
  line-height: 1.75;
  user-select: none;
}

.ai-review-preview p:last-child {
  margin-bottom: 0;
}

.ai-review-price {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  justify-content: center;
  margin: 14px 0;
  text-align: center;
}

.ai-review-price del {
  color: rgba(255, 255, 255, 0.45);
}

.ai-review-price strong {
  color: #ffd37a;
  font-size: 28px;
  line-height: 1;
}

.ai-review-actions {
  display: flex;
  justify-content: center;
}

.premium-primary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: #121318;
  background: #d8b36a;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}

.premium-login-modal[hidden] {
  display: none;
}

.premium-login-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
}

.premium-login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(4px);
}

.premium-login-dialog {
  position: relative;
  width: min(380px, 100%);
  padding: 22px;
  border: 1px solid rgba(216, 179, 106, 0.28);
  border-radius: 8px;
  background: #111218;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.48);
  color: #fff;
}

.premium-login-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.64);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.premium-login-dialog h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.premium-login-dialog p {
  margin: 8px 0 16px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.55;
}

.premium-login-options {
  display: grid;
  gap: 10px;
}

.premium-login-option {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #111218;
  cursor: pointer;
}

.premium-login-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
}

.premium-login-option strong {
  min-width: 0;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.premium-login-error {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 86, 86, 0.38);
  border-radius: 8px;
  background: rgba(255, 86, 86, 0.12);
  color: #ffb8b8;
  font-size: 13px;
  line-height: 1.5;
}

.premium-login-facebook {
  border-color: #1877f2;
  background: #1877f2;
  color: #fff;
}

.premium-login-kakao {
  border-color: #fee500;
  background: #fff;
  color: #111218;
}

.premium-login-line,
.premium-login-linetw {
  border-color: rgba(6, 199, 85, 0.34);
  background: #fff;
  color: #111218;
}

.premium-login-yandex {
  border-color: rgba(252, 63, 29, 0.34);
  background: #fff;
  color: #111218;
}

.premium-primary:disabled {
  cursor: wait;
  opacity: 0.7;
}

.premium-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: premiumSpin .72s linear infinite;
}

.ai-review-output {
  margin-top: 14px;
}

.ai-review-output:empty {
  display: none;
}

.ai-review-loading,
.ai-review-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.76);
}

.ai-review-error {
  color: #ffb4a8;
}

.ai-review-markdown {
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.86);
  text-align: left;
}

.ai-review-report {
  width: min(620px, 100%);
  margin: 18px auto 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .36s ease, transform .36s ease;
}

.ai-review-output .ai-review-report {
  margin-top: 0;
}

.ai-review-report.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ai-review-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}

.ai-review-secondary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.ai-review-secondary:hover {
  border-color: rgba(216, 179, 106, 0.38);
  background: rgba(216, 179, 106, 0.12);
}

.ai-review-secondary:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.ai-review-markdown h4 {
  margin: 16px 0 8px;
  color: #ffd37a;
  font-size: 18px;
}

.ai-review-markdown h4:first-child {
  margin-top: 0;
}

.ai-review-markdown p,
.ai-review-markdown li {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.72;
}

body.premium-utility-page {
  min-height: 100vh;
  margin: 0;
  background: #0f1014;
}

.premium-utility {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #0f1014;
  color: #fff;
}

.premium-utility-card {
  width: min(520px, 100%);
  display: grid;
  justify-items: center;
  padding: 28px;
  border: 1px solid rgba(216, 179, 106, 0.28);
  border-radius: 8px;
  background: rgba(17, 18, 24, 0.9);
  text-align: center;
}

.premium-utility-card h1 {
  margin: 0 0 18px;
  max-width: none;
  font-size: 24px;
  line-height: 1.35;
  text-align: center;
}

.premium-utility-card h1:only-child {
  margin-bottom: 0;
}

.utility-link {
  margin-top: 4px;
}

.review-report-page {
  min-height: 100vh;
  padding: 28px 16px 108px;
  background:
    radial-gradient(circle at 50% 0, rgba(216, 179, 106, .12), transparent 34%),
    #0f1014;
}

.review-report-shell {
  width: min(860px, 100%);
  margin: 0 auto;
}

.review-report-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.review-report-brand {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 9px;
  color: rgba(244, 239, 231, .72);
  font-weight: 850;
}

.review-report-brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.review-report-share {
  width: 42px;
  height: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.review-report-share:hover {
  border-color: rgba(216, 179, 106, .42);
  background: rgba(216, 179, 106, .12);
}

.review-report-share-icon {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.review-report-hero {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.review-report-hero h1 {
  max-width: none;
  font-size: clamp(30px, 6vw, 54px);
}

.review-report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-report-meta span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.review-report-reason {
  padding: 14px;
  border: 1px solid rgba(255, 85, 113, .28);
  border-radius: 8px;
  background: rgba(255, 85, 113, .08);
}

.review-report-reason strong {
  display: block;
  margin-bottom: 8px;
  color: var(--danger);
  font-size: 13px;
}

.review-report-reason p {
  color: var(--text);
  line-height: 1.7;
}

.review-report-content {
  padding: 18px;
}

.review-report-cta {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 60;
  width: min(360px, calc(100% - 32px));
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  border-radius: 8px;
  background: #d8b36a;
  color: #121318;
  font-weight: 950;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .42);
}

@keyframes premiumSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes aiReviewPulse {
  0%,
  100% {
    opacity: .72;
    transform: scale(.82);
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.34);
  }

  50% {
    opacity: 1;
    transform: scale(1.36);
    box-shadow: 0 0 0 8px rgba(255, 59, 48, 0);
  }
}

@media (max-width: 720px) {
  .ai-review-card {
    padding: 15px;
  }

  .ai-review-features {
    gap: 7px;
  }

  .ai-review-head h3 {
    font-size: 18px;
  }

  .ai-review-price strong {
    font-size: 26px;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body,
button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, white);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line-soft);
  background: #0f1014f2;
}

.nav-wrap {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: grid;
  gap: 2px;
  min-width: 150px;
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  padding: 0 10px;
  white-space: nowrap;
  font-size: 13px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface);
}

.page {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px 16px 44px;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.phone-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  min-height: 700px;
  overflow: hidden;
  box-shadow: 0 18px 52px rgba(0, 0, 0, .28);
}

.screen {
  min-height: 700px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
}

.is-hidden {
  display: none !important;
}

.chat-stack {
  display: grid;
  gap: 9px;
  margin-bottom: 4px;
}

.bubble {
  width: fit-content;
  max-width: 82%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px 12px;
  color: var(--text);
  line-height: 1.55;
}

.bubble.me {
  justify-self: end;
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}

.bubble small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
  font-weight: 700;
}

.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: 0;
  max-width: 9em;
}

.hero-copy p:not(.kicker) {
  color: var(--muted);
  line-height: 1.75;
  margin-top: 10px;
}

.world-card,
.scene-panel,
.result-panel,
.death-card,
.seo-panel,
.card,
.stat,
.choice,
.share-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.world-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.world-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.world-stats span {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 8px;
  font-size: 11px;
}

.world-stats strong {
  color: var(--text);
  font-size: 15px;
}

.primary,
.ghost,
.text-button,
.share-chip,
.share-action,
.share-copy {
  cursor: pointer;
  min-height: 46px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  transition: border-color .16s, background .16s, transform .16s;
}

.primary {
  border: 1px solid color-mix(in srgb, var(--accent) 42%, white);
  background: var(--accent);
  color: #16101d;
  font-weight: 850;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset, 0 0 22px color-mix(in srgb, var(--accent) 28%, transparent);
}

.start-button-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: currentColor;
}

.primary:hover,
.ghost:hover,
.share-chip:hover,
.share-action:hover,
.share-copy:hover {
  transform: translateY(-1px);
}

.primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, white);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 0 30px color-mix(in srgb, var(--accent) 32%, transparent);
}

.ghost {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
}

.text-button {
  color: var(--muted);
  background: transparent;
}

.share-row,
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.share-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar div {
  display: grid;
  gap: 4px;
}

.topbar span,
.scene-label,
.death-card span {
  color: var(--muted);
  font-size: 12px;
}

.topbar strong {
  font-size: 22px;
}

.icon-button {
  width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 14%, transparent);
}

.reset-icon-button {
  width: 44px;
  height: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff8f0;
}

.reset-top-icon {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat {
  min-height: 60px;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 10px;
  overflow: hidden;
}

.stat-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.plain-stat {
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 44px;
}

.track {
  height: 8px;
  border-radius: 999px;
  background: rgba(245, 239, 229, .24);
  overflow: hidden;
}

.track i {
  display: block;
  height: 100%;
  width: 50%;
  border-radius: inherit;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 54%, #6d6472),
    color-mix(in srgb, var(--accent) 88%, #fff4ff));
  box-shadow: none;
  transition: width .2s;
}

.track i.danger {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--danger) 54%, #6d6472),
    color-mix(in srgb, var(--danger) 88%, #ffe4ea));
  box-shadow: none;
}

.track i.ok {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--ok) 54%, #6d6472),
    color-mix(in srgb, var(--ok) 88%, #e8fff5));
  box-shadow: none;
}

.track i.warn {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--warn) 54%, #6d6472),
    color-mix(in srgb, var(--warn) 88%, #fff6dc));
  box-shadow: none;
}

.stat-grid.npd-stat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: stretch;
  gap: 10px;
}

.npd-hp-stat {
  min-height: 138px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 54%, var(--line));
  border-radius: 8px;
  background: #21181c;
  color: var(--danger);
  font-weight: 900;
  box-shadow: 0 0 24px rgba(255, 85, 113, .12);
}

.npd-hp-head {
  display: grid;
  gap: 4px;
}

.npd-hp-head span {
  font-size: 14px;
  line-height: 1;
}

.npd-hp-head strong {
  color: #fff8f0;
  font-size: 22px;
  line-height: 1;
}

.npd-hp-track {
  width: 16px;
  height: 78px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(245, 239, 229, .24);
}

.npd-hp-track i {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 4px;
  min-height: 4px;
  border-radius: inherit;
  background: linear-gradient(0deg,
    color-mix(in srgb, var(--danger) 54%, #6d6472),
    color-mix(in srgb, var(--danger) 88%, #ffe4ea));
  box-shadow: none;
  transition: height .2s;
}

.npd-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.npd-mini-stat {
  min-height: 64px;
  padding: 12px;
  border-color: #403b42;
  background: #211f24;
}

.npd-mini-stat .track {
  background: rgba(245, 239, 229, .24);
}

.scene-panel {
  padding: 18px;
}

.scene-panel.plain-scene-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

.scene-panel h2 {
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.16;
}

.scene-panel p {
  color: var(--muted);
  line-height: 1.75;
  margin-top: 10px;
}

.plain-scene-panel p {
  margin-top: 0;
  font-size: clamp(18px, 4vw, 24px);
}

blockquote {
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 25px;
  line-height: 1.32;
}

.quote-prefix {
  color: var(--accent);
  font-size: .78em;
  font-weight: 850;
  margin-right: 4px;
  vertical-align: .08em;
}

.choice-section {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.choice-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 10px;
  padding: 0 3px;
}

.choice-heading span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
}

.choice-heading strong {
  color: var(--muted);
  font-size: 12px;
}

.choices {
  display: grid;
  gap: 10px;
}

.choice {
  min-height: 62px;
  width: 100%;
  text-align: left;
  color: var(--text);
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .choice:hover {
    border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
    box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 14%, transparent);
  }
}

.choice:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
}

.choice b {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--accent) 86%, white);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 14%, transparent);
}

.choice span {
  line-height: 1.45;
}

.result-panel {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.result-panel h2 {
  font-size: 30px;
  line-height: 1.18;
}

.title-badge {
  display: block;
  color: var(--accent);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.16;
}

.success-rank-tag {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--ok) 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--ok) 14%, var(--panel));
  color: color-mix(in srgb, var(--ok) 84%, white);
  padding: 0 12px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 20px var(--glow-ok);
}

.success-rank-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: currentColor;
}

.death-result-panel {
  text-align: center;
  gap: 10px;
}

.death-icon-wrap {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--danger) 16%, transparent);
  color: var(--danger);
}

.death-skull-icon {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.death-kicker {
  color: var(--danger);
  justify-self: center;
}

.death-card {
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 11px 12px;
  background: #272225;
  border-color: #51464b;
}

.death-card span {
  color: #968c90;
  font-size: 13px;
  font-weight: 750;
}

.death-card p {
  color: #f8f1ea;
  font-size: clamp(16px, 4vw, 20px);
  line-height: 1.45;
}

.death-data-card p {
  font-size: clamp(18px, 4.8vw, 24px);
}

.death-lessons {
  display: grid;
  gap: 6px;
  text-align: left;
  color: #a99fa2;
  font-size: clamp(13px, 3.4vw, 16px);
  line-height: 1.5;
}

.result-copy {
  color: var(--muted);
  line-height: 1.7;
}

.cards-grid,
.category-grid {
  display: grid;
  gap: 12px;
}

.category-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  min-height: 150px;
  padding: 14px;
  display: grid;
  gap: 8px;
  border-color: color-mix(in srgb, var(--card-accent, var(--accent)) 38%, var(--line));
}

.card:hover {
  border-color: var(--card-accent, var(--accent));
}

.card .tag {
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--card-accent, var(--accent));
  background: #111217;
  border: 1px solid color-mix(in srgb, var(--card-accent, var(--accent)) 30%, var(--line));
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
}

.card strong {
  font-size: 21px;
  line-height: 1.16;
}

.card p,
.card small {
  color: var(--muted);
  line-height: 1.55;
}

.card small {
  font-size: 12px;
}

.card-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.card-meta span {
  min-height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
}

.side-panel {
  display: grid;
  gap: 14px;
}

.side-panel .intro-card {
  border-left: 4px solid var(--accent);
}

.seo-content {
  width: min(940px, 100%);
  margin: 30px auto 0;
  display: grid;
  gap: 14px;
}

.seo-panel {
  padding: 22px;
}

.seo-panel h2,
.seo-panel h3 {
  line-height: 1.3;
  margin-bottom: 10px;
}

.seo-panel h2 {
  font-size: 25px;
}

.seo-panel h3 {
  font-size: 20px;
}

.seo-panel p,
.seo-panel li,
.faq p {
  color: #d1c8bd;
  line-height: 1.86;
}

.seo-panel p + p {
  margin-top: 12px;
}

.seo-list {
  margin: 0;
  padding-left: 1.2em;
}

.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 14px;
}

.faq summary {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  font-weight: 800;
}

.faq summary::-webkit-details-marker,
.faq summary::marker {
  display: none;
  content: "";
}

.faq summary::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='3'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m9%2018%206-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='3'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m9%2018%206-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(0deg);
  transition: transform .16s ease;
}

.faq details[open] summary::before {
  transform: rotate(90deg);
}

.faq p {
  margin-top: 9px;
}

.share-chip {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
}

.share-chip img,
.share-copy img {
  width: 18px;
  height: 18px;
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, .68);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.share-modal.show {
  display: flex;
}

.share-dialog {
  width: min(430px, 100%);
  padding: 18px;
  box-shadow: 0 18px 54px rgba(0, 0, 0, .36);
}

.share-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.share-head h2 {
  font-size: 18px;
}

.share-close {
  width: 38px;
  height: 38px;
  min-height: 38px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.share-action {
  min-height: 78px;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  padding: 8px;
}

.share-action img {
  width: 34px;
  height: 34px;
}

.share-copy {
  width: 100%;
  margin-top: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--accent) 84%, white);
  font-weight: 850;
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 16%, transparent);
}

.share-toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 100;
  display: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #15161d;
  color: var(--text);
  padding: 10px 14px;
  font-size: 13px;
}

.share-toast.show {
  display: block;
}

.language-guide {
  position: fixed;
  left: 50%;
  bottom: max(16px, calc(env(safe-area-inset-bottom) + 14px));
  z-index: 70;
  width: min(640px, calc(100% - 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 8px;
  background: rgba(23, 24, 32, .96);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .38);
  padding: 12px 14px;
  color: var(--text);
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.language-guide[hidden] {
  display: none;
}

.language-guide.show {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.language-guide p {
  margin: 0;
  color: #e7ded5;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}

.language-guide-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
}

.language-guide button {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.language-guide-yes {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 82%, white), var(--accent));
  color: #17120b;
}

.language-guide-no {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
}

.footer {
  width: min(760px, 100%);
  margin: 0 auto;
  border-top: 1px solid #30272b;
  background: var(--bg);
  padding: 24px clamp(18px, 6vw, 64px) 42px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

.footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

.policy-page {
  width: min(820px, 100%);
  padding-top: 42px;
}

.policy-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.policy-home-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, #5b5358);
  border-radius: 8px;
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--accent) 86%, white);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.policy-home-link:hover {
  color: #fff8f0;
  border-color: color-mix(in srgb, var(--accent) 52%, #5b5358);
}

.policy-share-button {
  width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, #5b5358);
  border-radius: 8px;
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--accent) 86%, white);
  padding: 0;
  cursor: pointer;
}

.policy-share-button:hover {
  color: #fff8f0;
  border-color: color-mix(in srgb, var(--accent) 52%, #5b5358);
}

.policy-share-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.policy-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(14, 16, 20, .92);
  color: #fff8f0;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}

.policy-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.policy-page .seo-panel {
  display: grid;
  gap: 16px;
}

.policy-page h1 {
  max-width: none;
  font-size: clamp(32px, 5vw, 46px);
  text-align: center;
}

.policy-page h2 {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .phone-shell,
  .screen {
    min-height: 640px;
  }

  .side-panel {
    order: 2;
  }
}

@media (max-width: 620px) {
  .nav-wrap {
    align-items: start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    margin-left: 0;
  }

  .page {
    padding: 12px 10px 34px;
  }

  .screen {
    padding: 16px;
  }

  h1 {
    font-size: 34px;
  }

  blockquote,
  .scene-panel h2,
  .result-panel h2 {
    font-size: 24px;
  }

  .world-stats,
  .category-grid,
  .card-meta,
  .actions,
  .share-row {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .share-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Static index/category layout */
html,
body {
  background: #171114;
}

.site-home,
.site-inner {
  --bg: #171114;
}

.site-home .page,
.site-inner .page {
  width: min(760px, 100%);
  background: #171114;
  padding: 34px clamp(18px, 6vw, 64px) 54px;
}

.site-inner .page {
  padding-top: 24px;
}

.home-page,
.category-page {
  display: grid;
  gap: 34px;
}

.home-page {
  gap: 22px;
}

.category-page {
  gap: 28px;
}

.home-hero,
.category-hero {
  display: grid;
  gap: 14px;
}

.home-hero {
  position: relative;
  z-index: 20;
  justify-items: center;
  text-align: center;
  gap: 8px;
}

.home-title-row {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(8px, 2vw, 12px);
}

.home-title-row h1 {
  margin: 0;
}

.home-title-actions,
.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.home-title-actions {
  position: relative;
  z-index: 30;
}

.home-title-actions .language-switcher {
  position: relative;
  z-index: 31;
}

.home-title-actions .language-switcher.open {
  z-index: 3000;
}

.home-title-actions .language-menu {
  right: 50%;
  transform: translateX(50%);
  min-width: 168px;
  z-index: 3001;
}

.home-share-button {
  width: clamp(36px, 8vw, 42px);
  height: clamp(36px, 8vw, 42px);
  min-height: clamp(36px, 8vw, 42px);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, #5b5358);
  border-radius: 8px;
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--accent) 86%, white);
  padding: 0;
  cursor: pointer;
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 16%, transparent);
}

.home-share-icon {
  width: clamp(18px, 4.8vw, 22px);
  height: clamp(18px, 4.8vw, 22px);
  fill: currentColor;
}

.home-hero h1,
.category-hero h1 {
  max-width: 100%;
  font-size: clamp(48px, 10vw, 72px);
  line-height: 1.08;
  color: #fff8f0;
}

.home-hero h1 {
  font-size: clamp(32px, 8vw, 48px);
}

.category-hero h1 {
  font-size: clamp(34px, 7vw, 48px);
}

.home-hero p:not(.kicker),
.category-hero p:not(.kicker) {
  max-width: 620px;
  color: #c8bbb4;
  font-size: clamp(22px, 4.4vw, 30px);
  line-height: 1.7;
}

.home-hero p:not(.kicker) {
  max-width: 560px;
  font-size: clamp(15px, 3.6vw, 20px);
  line-height: 1.55;
}

.category-hero p:not(.kicker) {
  max-width: 520px;
  font-size: clamp(17px, 3.8vw, 22px);
  line-height: 1.55;
}

.home-section,
.category-faq {
  display: grid;
  gap: 20px;
}

.home-section {
  gap: 12px;
}

.section-title {
  color: var(--accent);
  font-size: 25px;
  line-height: 1.2;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.collection-card {
  min-height: 154px;
  align-content: start;
  padding: 16px;
}

.collection-card strong {
  margin-top: 6px;
  font-size: clamp(21px, 5vw, 32px);
  line-height: 1.12;
  white-space: pre-line;
}

.collection-card em {
  margin-top: auto;
  color: #9b9088;
  font-style: normal;
  font-weight: 800;
}

.collection-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.collection-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1px solid color-mix(in srgb, var(--card-accent, var(--accent)) 20%, transparent);
  background: color-mix(in srgb, var(--card-accent, var(--accent)) 10%, #1d1718);
  color: #e5d8cc;
  box-shadow: inset 0 1px rgba(255, 255, 255, .05);
}

.challenge-list {
  display: grid;
  gap: 20px;
}

.challenge-card {
  min-height: 270px;
  padding: 28px;
}

.challenge-card strong {
  font-size: clamp(32px, 7vw, 46px);
}

.challenge-card small {
  font-size: clamp(20px, 4vw, 28px);
}

.challenge-card p {
  font-size: clamp(16px, 3vw, 22px);
}

.challenge-card .tag,
.collection-card .tag {
  border: 0;
  background: color-mix(in srgb, var(--card-accent, var(--accent)) 20%, #21191a);
  font-size: 16px;
  color: color-mix(in srgb, var(--card-accent, var(--accent)) 82%, white);
}

.challenge-card .card-meta {
  margin-top: 4px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.challenge-card .card-meta span {
  min-height: 32px;
  border-radius: 8px;
  padding: 0 8px;
  font-size: clamp(12px, 2.3vw, 15px);
  white-space: nowrap;
}

html[lang="ja"] .collection-card strong {
  font-size: clamp(20px, 4.4vw, 28px);
  line-height: 1.16;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

html[lang="ja"] .category-page .challenge-card {
  min-height: 0;
}

html[lang="ja"] .category-page .challenge-card strong {
  font-size: clamp(26px, 5.2vw, 38px);
  line-height: 1.14;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

html[lang="ja"] .category-page .challenge-card small {
  font-size: clamp(17px, 3.2vw, 22px);
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

html[lang="ja"] .category-page .challenge-card p {
  font-size: clamp(14px, 2.6vw, 18px);
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

html[lang="ja"] .category-page .challenge-card .card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

html[lang="ja"] .category-page .challenge-card .card-meta span {
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  padding: 0 10px;
  font-size: clamp(12px, 2.1vw, 14px);
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

html[lang="ja"] .challenge-card {
  min-height: 0;
}

html[lang="ja"] .challenge-card strong {
  font-size: clamp(26px, 5.2vw, 38px);
  line-height: 1.14;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

html[lang="ja"] .challenge-card small {
  font-size: clamp(17px, 3.2vw, 22px);
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

html[lang="ja"] .challenge-card p {
  font-size: clamp(14px, 2.6vw, 18px);
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

html[lang="ja"] .challenge-card .card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

html[lang="ja"] .challenge-card .card-meta span {
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  padding: 0 10px;
  font-size: clamp(12px, 2.1vw, 14px);
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.category-page .chat-stack {
  gap: 14px;
}

.category-page .bubble {
  max-width: 80%;
  padding: 14px 18px;
  border-color: #655357;
  background: #3b3034;
  font-size: clamp(17px, 4vw, 22px);
}

.category-page .bubble.me {
  justify-self: end;
  background: #4a3429;
  border-color: #765949;
}

.category-page .bubble small {
  color: #9e928d;
  font-size: 13px;
}

.category-topbar {
  position: relative;
  z-index: 70;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
}

.category-topbar strong {
  color: #f4efe7;
  font-size: clamp(15px, 3.2vw, 18px);
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.mini-top-button {
  width: 40px;
  height: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, #5b5358);
  border-radius: 8px;
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--accent) 82%, white);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 12%, transparent);
}

.mini-top-button.icon-mini {
  height: 38px;
  padding: 0;
}

.home-title-actions .language-toggle {
  width: clamp(36px, 8vw, 42px);
  height: clamp(36px, 8vw, 42px);
  min-height: clamp(36px, 8vw, 42px);
  border-color: color-mix(in srgb, var(--accent) 34%, #5b5358);
  color: color-mix(in srgb, var(--accent) 86%, white);
  padding: 0;
}

.home-title-actions .mini-globe-icon {
  width: clamp(18px, 4.8vw, 22px);
  height: clamp(18px, 4.8vw, 22px);
}

.back-mini {
  justify-self: start;
  font-size: 22px;
  line-height: 1;
}

.topbar-title {
  min-width: 0;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.title-share-button {
  width: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #f4efe7;
  padding: 0;
  cursor: pointer;
}

.title-share-button:hover {
  background: rgba(244, 239, 231, .08);
}

.topbar-actions {
  justify-self: end;
  position: relative;
}

.mini-globe-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.title-share-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.language-switcher {
  position: relative;
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  min-width: 148px;
  max-height: min(68vh, 290px);
  overflow-y: auto;
  display: none;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, #5b5358);
  border-radius: 8px;
  background: #21191a;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .34);
  padding: 6px;
}

.language-switcher.open .language-menu {
  display: grid;
}

.language-menu a {
  min-height: 34px;
  display: flex;
  align-items: center;
  border-radius: 7px;
  color: #cfc2ba;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.language-menu a:hover,
.language-menu a.active {
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--accent) 86%, white);
}

.category-page .challenge-card {
  min-height: 230px;
}

.category-page .challenge-card .card-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.category-page .challenge-card .card-meta span {
  min-height: 30px;
  border-radius: 8px;
  padding: 0 6px;
  font-size: clamp(11px, 2.5vw, 13px);
  white-space: nowrap;
}

.challenge-page {
  display: grid;
  gap: 28px;
}

.challenge-detail-layout {
  display: grid;
}

.challenge-page .phone-shell {
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.challenge-page .screen {
  min-height: 0;
  padding: 0;
}

.challenge-home-screen {
  gap: 24px;
}

.challenge-page .chat-stack {
  gap: 14px;
}

.challenge-page .bubble {
  max-width: 80%;
  padding: 14px 18px;
  border-color: #655357;
  background: #3b3034;
  font-size: clamp(17px, 4vw, 22px);
}

.challenge-page .bubble.me {
  justify-self: end;
  background: #4a3429;
  border-color: #765949;
}

.challenge-page .bubble small {
  color: #9e928d;
  font-size: 13px;
}

.challenge-page .hero-copy {
  display: grid;
  gap: 8px;
}

.challenge-page .hero-copy h1 {
  max-width: 100%;
  font-size: clamp(30px, 6.2vw, 42px);
  line-height: 1.08;
  color: #fff8f0;
}

.challenge-page .hero-copy p:not(.kicker) {
  max-width: 520px;
  color: #c8bbb4;
  font-size: clamp(15px, 3.4vw, 19px);
  line-height: 1.55;
}

.challenge-page .start-card {
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.challenge-page .world-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.challenge-page .world-stats span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 8px;
  padding: 0 6px;
  color: #d7ccc4;
  font-size: clamp(11px, 2.5vw, 13px);
  line-height: 1;
  white-space: nowrap;
}

.challenge-page .world-stats strong {
  font-size: inherit;
  line-height: 1;
}

html[lang="ja"] .challenge-page .world-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

html[lang="ja"] .challenge-page .world-stats span {
  flex: 1 1 108px;
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.challenge-page .primary {
  width: 100%;
  min-height: 52px;
  border-radius: 8px;
}

.challenge-page [data-screen="playing"] > .stat-grid:not(.npd-stat-layout),
.challenge-page [data-role="ending-stats"]:not(.npd-stat-layout) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.challenge-page [data-screen="playing"] > .stat-grid:not(.npd-stat-layout) {
  border: 1px solid #332e3a;
  border-radius: 8px;
  background: rgba(20, 21, 28, .36);
  padding: 14px;
}

.challenge-page [data-screen="playing"] > .stat-grid:not(.npd-stat-layout) .plain-stat {
  min-height: 34px;
  gap: 4px;
}

.challenge-page .result-panel .actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.challenge-page .result-panel [data-role="ending-stats"] .track,
.challenge-page .result-panel [data-role="ending-stats"] .npd-hp-track {
  overflow: hidden;
  background: color-mix(in srgb, var(--accent) 12%, rgba(245, 239, 229, .2));
  box-shadow: none;
}

.challenge-page .result-panel [data-role="ending-stats"] .track i,
.challenge-page .result-panel [data-role="ending-stats"] .npd-hp-track i {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 64%, #6d6472),
    color-mix(in srgb, var(--accent) 88%, #fff4ff));
  box-shadow: none;
}

.challenge-page .result-panel [data-role="ending-stats"] .npd-hp-track i {
  background: linear-gradient(0deg,
    color-mix(in srgb, var(--accent) 64%, #6d6472),
    color-mix(in srgb, var(--accent) 88%, #fff4ff));
}

.challenge-page .death-result-panel {
  border: 0;
  background: transparent;
  padding: 0;
}

.challenge-page .death-result-panel h2 {
  color: #fff8f0;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.08;
}

.challenge-page .death-result-panel .actions {
  margin-top: 2px;
}

.challenge-related {
  margin-top: 18px;
}

.challenge-page .seo-content {
  display: grid;
  gap: 20px;
}

.home-page .seo-panel,
.category-page .seo-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

.home-page .faq details,
.category-page .faq details {
  background: #21191a;
}

.site-inner[data-page-type="challenge"] .page,
.site-inner[data-page-type="npd"] .page {
  display: grid;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp .5s ease forwards;
}

.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .45s; }
.delay-3 { animation-delay: .85s; }
.delay-4 { animation-delay: 1.22s; }
.delay-5 { animation-delay: 1.42s; }
.delay-6 { animation-delay: 1.62s; }
.delay-7 { animation-delay: 1.82s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOnly {
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transform: none;
    animation-name: fadeOnly;
    animation-duration: .35s;
    animation-timing-function: ease;
    animation-fill-mode: forwards;
  }
}

@media (max-width: 720px) {
  .site-home .page,
  .site-inner .page {
    padding-inline: 30px;
  }

  .site-home .page {
    padding-top: 20px;
  }

  .collection-grid {
    gap: 10px;
  }

  .collection-card {
    min-height: 142px;
    padding: 14px;
  }

  .collection-card .tag {
    font-size: 12px;
    padding: 4px 7px;
  }

  .collection-card strong {
    font-size: clamp(20px, 5.3vw, 26px);
  }

  .collection-meta span {
    font-size: 12px;
    min-height: 24px;
    padding: 0 7px;
    border-radius: 999px;
  }

  .collection-card em {
    font-size: 13px;
  }
}

@media (max-width: 520px) {
  .language-guide {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .language-guide-actions {
    justify-content: flex-end;
  }

  .language-guide button {
    flex: 1 1 0;
  }

  .site-home .page,
  .site-inner .page {
    padding-inline: 18px;
  }

  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .site-home .home-hero .kicker {
    margin-bottom: 2px;
  }

  .site-home .home-hero h1 {
    font-size: clamp(30px, 8.2vw, 36px);
  }

  .site-home .home-hero p:not(.kicker) {
    font-size: 15px;
    line-height: 1.48;
  }

  .site-home .collection-card {
    min-height: 132px;
    padding: 12px;
  }

  .site-home .collection-card strong {
    font-size: 21px;
  }

  .site-home .collection-card em {
    display: none;
  }

  .site-home .collection-meta {
    gap: 6px;
  }

  .site-home .collection-meta span {
    width: fit-content;
    min-height: 23px;
    font-size: 11px;
    padding: 0 7px;
  }

  .site-home .challenge-card .card-meta span,
  .category-page .challenge-card .card-meta span {
    min-height: 30px;
    font-size: 12px;
    padding: 0 6px;
  }

  .challenge-card {
    min-height: 230px;
    padding: 22px;
  }

  .category-page .bubble {
    max-width: 92%;
    padding: 16px 18px;
  }

  .category-page .bubble {
    padding: 13px 15px;
    font-size: 17px;
  }

  .category-page .bubble small {
    font-size: 12px;
  }

  .category-hero {
    gap: 8px;
  }

  .category-hero h1 {
    font-size: 33px;
  }

  .category-hero p:not(.kicker) {
    font-size: 16px;
  }

  .category-topbar {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .mini-top-button {
    width: 38px;
    height: 36px;
    min-height: 36px;
    font-size: 12px;
  }

  .mini-top-button.icon-mini {
    height: 36px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .language-menu {
    right: -2px;
  }

  .back-mini {
    font-size: 22px;
  }
}
