:root {
  color-scheme: dark;
  --bg: #090c0f;
  --surface: #11161b;
  --surface-raised: #171d23;
  --surface-soft: #1d252c;
  --line: rgba(235, 244, 250, 0.1);
  --line-strong: rgba(235, 244, 250, 0.18);
  --text: #f4f7f8;
  --muted: #919da7;
  --muted-strong: #bcc6cc;
  --accent: #cfff4f;
  --accent-strong: #bdf12f;
  --accent-soft: rgba(207, 255, 79, 0.1);
  --mode-active-bg: rgba(151, 174, 91, 0.18);
  --mode-active-border: rgba(194, 216, 133, 0.34);
  --mode-active-text: #e1ebc6;
  --mode-active-shadow: 0 3px 12px rgba(117, 143, 55, 0.12);
  --brand: rgba(226, 192, 122, 0.35);
  --brand-strong: #e2c07a;
  --brand-soft: rgba(226, 192, 122, 0.1);
  --brand-line: rgba(226, 192, 122, 0.35);
  --danger: #ff747f;
  --warning: #ffcc66;
  --info: #7ccfff;
  --semantic-very-soft: #d4ff63;
  --semantic-soft: #79d7ff;
  --semantic-baseline: #ffd166;
  --semantic-hard: #ff7c87;
  --semantic-bite: #ff5362;
  --number-highlight: #f0cc82;
  --header-bg: rgba(9, 12, 15, 0.86);
  --body-glow-primary: rgba(226, 192, 122, 0.055);
  --body-glow-secondary: rgba(78, 127, 255, 0.04);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font: "DM Sans", "Noto Sans TC", system-ui, -apple-system, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

html[data-theme="oled"] {
  --bg: #000;
  --surface: #07090b;
  --surface-raised: #0c0f12;
  --surface-soft: #11151a;
  --line: rgba(240, 246, 250, 0.12);
  --line-strong: rgba(240, 246, 250, 0.22);
  --text: #f7f9fa;
  --muted: #9aa5ad;
  --muted-strong: #c6cdd2;
  --header-bg: rgba(0, 0, 0, 0.9);
  --body-glow-primary: rgba(226, 192, 122, 0.045);
  --body-glow-secondary: rgba(121, 215, 255, 0.025);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #eeece7;
  --surface: #faf9f6;
  --surface-raised: #ffffff;
  --surface-soft: #f0ede7;
  --line: rgba(28, 34, 39, 0.11);
  --line-strong: rgba(28, 34, 39, 0.2);
  --text: #181c20;
  --muted: #68737c;
  --muted-strong: #404a52;
  --accent: #587500;
  --accent-strong: #425a00;
  --accent-soft: rgba(88, 117, 0, 0.1);
  --mode-active-bg: rgba(88, 117, 0, 0.11);
  --mode-active-border: rgba(75, 98, 0, 0.27);
  --mode-active-text: #3f5300;
  --mode-active-shadow: 0 3px 10px rgba(66, 90, 0, 0.08);
  --brand: rgba(145, 104, 31, 0.3);
  --brand-strong: #805b1c;
  --brand-soft: rgba(145, 104, 31, 0.1);
  --brand-line: rgba(145, 104, 31, 0.3);
  --danger: #bd2f43;
  --warning: #885700;
  --info: #006b91;
  --semantic-very-soft: #506f00;
  --semantic-soft: #006b91;
  --semantic-baseline: #885700;
  --semantic-hard: #bd2f43;
  --semantic-bite: #aa1730;
  --number-highlight: #805b1c;
  --header-bg: rgba(250, 249, 246, 0.9);
  --body-glow-primary: rgba(171, 126, 43, 0.08);
  --body-glow-secondary: rgba(45, 117, 145, 0.045);
  --shadow: 0 22px 56px rgba(35, 31, 24, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 7%, var(--body-glow-primary), transparent 28rem),
    radial-gradient(circle at 8% 36%, var(--body-glow-secondary), transparent 32rem),
    var(--bg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 100% 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 70%);
  content: "";
  pointer-events: none;
}

::selection {
  color: #0b0e08;
  background: var(--accent);
}

button,
input {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  width: 100%;
  height: 72px;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  display: flex;
  width: min(1180px, calc(100% - 48px));
  height: 100%;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand-icon {
  display: block;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(207, 255, 79, 0.2);
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.online-users {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  padding: 4px 11px 4px 6px;
  overflow: hidden;
  border: 1px solid rgba(226, 192, 122, 0.26);
  border-radius: 999px;
  color: var(--muted-strong);
  background:
    linear-gradient(135deg, rgba(226, 192, 122, 0.13), rgba(255, 255, 255, 0.025) 68%),
    rgba(12, 16, 20, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 10px 26px rgba(0, 0, 0, 0.2);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.online-users::after {
  position: absolute;
  top: 0;
  right: 10px;
  left: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  content: "";
}

.online-signal {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
}

.online-signal i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.online-users[data-state="ready"] .online-signal {
  border-color: rgba(207, 255, 79, 0.16);
  background: rgba(207, 255, 79, 0.075);
}

.online-users[data-state="ready"] .online-signal i {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(207, 255, 79, 0.72);
  animation: online-pulse 2.2s ease-in-out infinite;
}

.online-copy {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.online-users strong {
  min-width: 1.2ch;
  color: var(--text);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-align: center;
}

.online-unit {
  margin-left: -3px;
  color: var(--muted);
  font-size: 9px;
}

@keyframes online-pulse {
  0%,
  100% {
    opacity: 0.78;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

.header-ext-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(226, 192, 122, 0.4);
  border-radius: 999px;
  color: #f7e7c4;
  background: linear-gradient(135deg, rgba(226, 192, 122, 0.15), rgba(226, 192, 122, 0.05));
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.header-ext-btn:hover {
  color: #0b0e08;
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  box-shadow: 0 0 16px rgba(226, 192, 122, 0.4);
  transform: translateY(-1px);
}

.header-ext-btn .ext-arrow {
  flex-shrink: 0;
  stroke: currentColor;
  transition: transform 0.18s ease;
}

.header-ext-btn:hover .ext-arrow {
  transform: translate(2px, -2px);
}

.pwa-install-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid rgba(207, 255, 79, 0.35);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  transition: background 160ms ease, transform 160ms ease;
}

.pwa-install-button:hover {
  background: rgba(207, 255, 79, 0.16);
  transform: translateY(-1px);
}

.pwa-install-button .pwa-btn-icon {
  flex-shrink: 0;
  stroke: currentColor;
}

.query-form button[type="submit"] .btn-arrow {
  flex-shrink: 0;
  stroke: currentColor;
  transition: transform 0.18s ease;
}

.query-form button[type="submit"]:hover .btn-arrow {
  transform: translateX(3px);
}

.hero {
  padding: 48px 0 84px;
}

.hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 42px;
  overflow: hidden;
  padding: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 45%),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero-stage::after {
  position: absolute;
  top: -210px;
  right: -140px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(207, 255, 79, 0.08);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(207, 255, 79, 0.08), transparent 68%);
  content: "";
  pointer-events: none;
}

.hero-copy,
.spin-guide {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 19px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.eyebrow::before {
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  content: "";
}

h1 {
  margin: 0;
  font-size: clamp(48px, 5.4vw, 74px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

h1 em {
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}

.query-form > label {
  display: block;
  margin: 34px 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #0b0f12;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-row:focus-within {
  border-color: rgba(207, 255, 79, 0.62);
  box-shadow: 0 0 0 4px rgba(207, 255, 79, 0.06), 0 18px 40px rgba(0, 0, 0, 0.28);
}

.input-row input {
  min-width: 0;
  padding: 16px 17px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 15px;
  letter-spacing: 0.035em;
}

.input-row input::placeholder {
  color: #57636c;
}

.input-row > button[type="submit"] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-sm);
  color: #0b0f08;
  background: var(--accent);
  cursor: pointer;
  font-weight: 800;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14);
  transition: background 160ms ease, transform 160ms ease;
}

.input-row > button[type="submit"]:hover:not(:disabled) {
  background: #dcff7d;
  transform: translateY(-1px);
}

.input-row > button[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.68;
}

.form-footer {
  display: flex;
  min-height: 28px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 2px 0;
  color: #6f7b84;
  font-size: 11px;
}

.form-message {
  font-weight: 700;
  line-height: 1.5;
  text-align: right;
}

.form-message[data-type="error"] {
  color: var(--danger);
}

.form-message[data-type="success"] {
  color: var(--accent);
}

.form-message[data-type="loading"] {
  color: var(--warning);
}

.spin-guide {
  align-self: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #0b0f12;
}

.spin-guide figure {
  margin: 0;
  padding: 10px 10px 0;
}

.spin-guide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1100 / 564;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #0b0f12;
  object-fit: contain;
}

.spin-guide figcaption {
  margin: 8px 0 0;
  color: #65717a;
  font-size: 10px;
  text-align: center;
}

.guide-copy {
  padding: 20px 22px 23px;
}

.guide-copy > span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.guide-copy h2 {
  margin: 7px 0 8px;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.guide-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.help-zone {
  margin-top: 18px;
}

.daily-tag-guide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 26px;
  border: 1px solid rgba(207, 255, 79, 0.2);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background:
    linear-gradient(105deg, rgba(207, 255, 79, 0.065), transparent 55%),
    var(--surface);
}

.daily-tag-guide-heading {
  max-width: 920px;
}

.daily-tag-guide-heading > span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.daily-tag-guide h2 {
  margin: 8px 0;
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.daily-tag-guide p,
.tag-verdict p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.daily-tag-guide .tag-scope-note {
  margin-top: 0;
  padding-top: 13px;
  border-top: 1px solid rgba(207, 255, 79, 0.12);
  color: var(--muted-strong);
}

.tag-scope-note strong {
  color: var(--accent);
}

.daily-check-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.daily-check-flow article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.018);
}

.daily-check-flow article > b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(207, 255, 79, 0.22);
  border-radius: 9px;
  color: var(--accent);
  background: rgba(207, 255, 79, 0.06);
  font-size: 10px;
  font-weight: 850;
}

.daily-check-flow article > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.daily-check-flow strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.daily-check-flow span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

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

.tag-verdict {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.018);
}

.tag-verdict > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.tag-verdict strong {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  line-height: 1.5;
}

.tag-verdict.is-watch {
  border-color: rgba(207, 255, 79, 0.22);
  background: rgba(207, 255, 79, 0.035);
}

.tag-verdict.is-watch strong {
  color: var(--accent);
}

.tag-verdict.is-stop {
  border-color: rgba(255, 116, 127, 0.24);
  background: rgba(255, 116, 127, 0.035);
}

.tag-verdict.is-stop strong {
  color: var(--danger);
}

.tag-disclaimer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 15px 20px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: rgba(255, 255, 255, 0.016);
}

.tag-disclaimer strong {
  color: var(--warning);
  font-size: 11px;
}

.tag-disclaimer p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.72;
}

.help-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
  align-items: start;
}

.rtp-tutorial {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.tag-tutorial,
.ip-tutorial {
  grid-column: 1 / -1;
}

.rtp-tutorial summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 14px;
  min-height: 72px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  transition: background 160ms ease;
}

.rtp-tutorial summary:hover {
  background: rgba(255, 255, 255, 0.02);
}

.rtp-tutorial summary::-webkit-details-marker {
  display: none;
}

.rtp-tutorial summary span {
  grid-column: 1;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.rtp-tutorial summary strong {
  grid-column: 1;
  font-size: 14px;
}

.rtp-tutorial summary::after {
  display: grid;
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  content: "+";
  place-items: center;
  font-size: 18px;
}

.rtp-tutorial[open] summary::after {
  color: var(--accent);
  content: "−";
}

.rtp-tutorial-content {
  padding: 3px 20px 20px;
  border-top: 1px solid var(--line);
}

.tutorial-section {
  padding: 18px 0;
}

.tutorial-section + .tutorial-section {
  border-top: 1px solid var(--line);
}

.tutorial-section h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.rtp-tutorial-lead,
.rtp-tutorial-footnote,
.rtp-tutorial-points p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.tutorial-section .rtp-tutorial-lead {
  margin: 0 0 12px;
}

.mode-guide-grid,
.game-tag-grid,
.mixed-tag-values,
.rtp-tutorial-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mode-guide-grid article,
.game-tag-grid article,
.rtp-tutorial-points article,
.mixed-tag-values span {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.012);
}

.mode-guide-grid p,
.game-tag-grid p,
.rtp-tutorial-points p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.tag-example {
  margin: 0 0 10px;
  padding: 13px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #dce3e7;
  background: rgba(207, 255, 79, 0.04);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

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

.mixed-tag-values strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}

.rtp-scale {
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.rtp-scale > div {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 14px;
  font-size: 12px;
}

.rtp-scale > div + div {
  border-top: 1px solid var(--line);
}

.rtp-scale strong {
  color: var(--accent);
}

.rtp-scale span {
  color: var(--muted);
}

.rtp-tutorial-footnote {
  margin: 12px 0 0;
}

.tutorial-final-note {
  padding: 16px;
  border: 1px solid rgba(207, 255, 79, 0.22) !important;
  border-radius: var(--radius-sm);
  background: rgba(207, 255, 79, 0.04);
}

.tutorial-final-note p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.75;
}

.ip-tutorial {
  border-color: rgba(255, 204, 102, 0.18);
}

.ip-tutorial summary span {
  color: var(--warning);
}

.ip-notice-content p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.ip-notice-content ul {
  margin: 0;
  padding-left: 19px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.75;
}

/* Complete tutorial */
.tag-tutorial {
  background: #0d1216;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.tag-tutorial[open] {
  border-color: rgba(207, 255, 79, 0.24);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.tag-tutorial > summary {
  min-height: 88px;
  padding: 18px 22px;
  background:
    radial-gradient(circle at 88% 0%, rgba(207, 255, 79, 0.075), transparent 180px),
    var(--surface);
}

.tag-tutorial > summary strong {
  font-size: 17px;
  letter-spacing: -0.015em;
}

.tag-tutorial > summary small {
  grid-column: 1;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.tag-tutorial > summary::after {
  grid-row: 1 / span 3;
}

.tag-tutorial > .rtp-tutorial-content {
  padding: 18px;
  background: #0a0e11;
}

.tutorial-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.tutorial-overview article {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.tutorial-overview b {
  display: grid;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(207, 255, 79, 0.24);
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  place-items: center;
  font-size: 10px;
}

.tutorial-overview strong,
.tutorial-overview span {
  display: block;
}

.tutorial-overview strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.tutorial-overview span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.tag-tutorial .tutorial-section {
  margin-top: 10px;
  padding: 21px;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md);
  background: var(--surface);
}

.tutorial-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.tutorial-section-heading > span {
  flex: none;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.tutorial-section-heading h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.tag-tutorial .mode-guide-grid article,
.tag-tutorial .game-tag-grid article,
.tag-tutorial .rtp-tutorial-points article {
  position: relative;
  overflow: hidden;
  padding: 15px;
  background: #0d1216;
}

.tag-tutorial .mode-guide-grid article::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 72%);
  content: "";
}

.tag-tutorial .mode-guide-grid strong,
.tag-tutorial .game-tag-grid strong,
.tag-tutorial .rtp-tutorial-points strong {
  font-size: 13px;
}

.tag-tutorial .mode-guide-grid p {
  color: var(--accent);
  font-weight: 700;
}

.tag-tutorial .rtp-scale {
  border: 0;
  border-radius: var(--radius-sm);
  background: #0d1216;
}

.tag-tutorial .rtp-scale > div {
  position: relative;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 12px 13px 12px 18px;
  border: 1px solid var(--line);
}

.tag-tutorial .rtp-scale > div:first-child {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tag-tutorial .rtp-scale > div:last-child {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.tag-tutorial .rtp-scale > div + div {
  border-top: 0;
}

.tag-tutorial .rtp-scale > div::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  content: "";
}

.tag-tutorial .rtp-scale em {
  min-width: 68px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
}

.tag-tutorial .rtp-scale .is-hard::before {
  background: var(--danger);
}

.tag-tutorial .rtp-scale .is-hard strong,
.tag-tutorial .rtp-scale .is-hard em {
  color: var(--danger);
}

.tag-tutorial .rtp-scale .is-hard em {
  background: rgba(255, 116, 127, 0.11);
}

.tag-tutorial .rtp-scale .is-base::before {
  background: var(--warning);
}

.tag-tutorial .rtp-scale .is-base strong,
.tag-tutorial .rtp-scale .is-base em {
  color: var(--warning);
}

.tag-tutorial .rtp-scale .is-base em {
  background: rgba(255, 204, 102, 0.11);
}

.tag-tutorial .rtp-scale .is-soft::before {
  background: var(--info);
}

.tag-tutorial .rtp-scale .is-soft strong,
.tag-tutorial .rtp-scale .is-soft em {
  color: var(--info);
}

.tag-tutorial .rtp-scale .is-soft em {
  background: rgba(124, 207, 255, 0.11);
}

.tag-tutorial .rtp-scale .is-very-soft::before {
  background: var(--accent);
}

.tag-tutorial .rtp-scale .is-very-soft strong,
.tag-tutorial .rtp-scale .is-very-soft em {
  color: var(--accent);
}

.tag-tutorial .rtp-scale .is-very-soft em {
  background: var(--accent-soft);
}

.tag-tutorial .mixed-tag-guide {
  border-color: rgba(255, 204, 102, 0.2) !important;
  background:
    linear-gradient(120deg, rgba(255, 204, 102, 0.035), transparent 52%),
    var(--surface);
}

.mixed-tag-guide .tutorial-section-heading > span {
  color: var(--warning);
  background: rgba(255, 204, 102, 0.1);
}

.tag-tutorial .tag-example {
  border: 1px solid rgba(255, 204, 102, 0.16);
  border-left: 3px solid var(--warning);
  background: #0d1216;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.tag-tutorial .mixed-tag-values span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  background: #0d1216;
}

.tag-tutorial .mixed-tag-values span b {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--accent);
  font-size: 17px;
}

.tag-tutorial .mixed-tag-values span.is-hard {
  border-color: rgba(255, 116, 127, 0.22);
}

.tag-tutorial .mixed-tag-values span.is-hard b {
  color: var(--danger);
}

.tag-tutorial .game-tag-grid article {
  border-left: 2px solid rgba(124, 207, 255, 0.5);
}

.tag-tutorial .rtp-tutorial-points article:first-child {
  border-color: rgba(124, 207, 255, 0.2);
}

.tag-tutorial .rtp-tutorial-points article:last-child {
  border-color: rgba(226, 192, 122, 0.35);
}

.tag-tutorial .tutorial-final-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 17px;
  align-items: start;
  border-color: rgba(207, 255, 79, 0.3) !important;
  background:
    linear-gradient(125deg, rgba(207, 255, 79, 0.09), transparent 62%),
    var(--surface);
}

.tag-tutorial .tutorial-final-note > span {
  padding: 6px 9px;
  border-radius: 999px;
  color: #0b0f08;
  background: var(--accent);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.tag-tutorial .tutorial-final-note h3 {
  margin: 1px 0 7px;
  color: var(--accent);
  font-size: 17px;
}

/* 骨架流光屏 (Skeleton Loading) 動畫與樣式 */
@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.sk-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.09) 50%,
    rgba(255, 255, 255, 0.03) 75%
  ) !important;
  background-size: 200% 100% !important;
  animation: skeleton-shimmer 1.4s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
}

.result-skeleton {
  padding: 72px 0 96px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 76px;
  animation: fadeIn 0.2s ease;
}

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

.sk-card {
  border-color: rgba(255, 255, 255, 0.06) !important;
  background: rgba(18, 23, 33, 0.7) !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2) !important;
  position: relative;
  overflow: hidden;
}

.sk-pill {
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.sk-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sk-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.sk-line-xs { width: 54px; height: 12px; }
.sk-line-sm { width: 100px; height: 14px; }
.sk-line-md { width: 160px; height: 22px; }
.sk-line-lg { width: 220px; height: 14px; }
.sk-line-full { width: 100%; }
.sk-btn { width: 110px; height: 38px; border-radius: var(--radius-sm, 8px); }

.sk-replay-block {
  margin-top: 24px;
  aspect-ratio: 16 / 9;
  max-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md, 14px);
}

.sk-replay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sk-replay-play-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sk-prob-card {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius-md, 14px);
}

.result-shell {
  padding: 72px 0 96px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 76px;
  animation: fadeIn 0.25s ease;
}

.section-heading,
.subheading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading p {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(27px, 3.2vw, 38px);
  letter-spacing: -0.04em;
}

.copy-button,
.share-button,
.subheading a {
  flex: none;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--muted-strong);
  background: var(--surface);
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.copy-button:hover,
.share-button:hover,
.subheading a:hover {
  border-color: rgba(207, 255, 79, 0.5);
  color: var(--accent);
  transform: translateY(-1px);
}

.result-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #e2c07a;
  border-color: rgba(226, 192, 122, 0.28);
  background: rgba(226, 192, 122, 0.07);
}

.share-button:hover {
  color: #f2d799;
  border-color: rgba(226, 192, 122, 0.52);
}

.share-button.is-loading {
  cursor: wait;
  opacity: 0.62;
}

.share-result-status {
  display: block;
  min-height: 18px;
  margin: -17px 0 15px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

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

.result-grid article {
  min-width: 0;
  min-height: 168px;
  overflow: hidden;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.13);
}

.player-card {
  display: flex;
  grid-column: span 2;
  align-items: center;
  gap: 19px;
}

.player-card > div {
  min-width: 0;
}

.player-card img {
  width: 76px;
  height: 76px;
  border: 2px solid rgba(207, 255, 79, 0.24);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.player-card span,
.tag-card > span,
.metric-card > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.player-card h3 {
  margin: 8px 0 6px;
  overflow: hidden;
  font-size: 27px;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-card p {
  margin: 0;
  overflow: hidden;
  color: #69757e;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-balance-badge {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  margin-top: 9px;
  padding: 6px 12px;
  border: 1px solid rgba(207, 255, 79, 0.2);
  border-radius: 999px;
  color: var(--accent) !important;
  background: var(--accent-soft);
  font-size: 11px !important;
  font-weight: 750;
  letter-spacing: 0 !important;
}

.player-balance-badge strong {
  margin-left: 3px;
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.tag-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-color: rgba(207, 255, 79, 0.24) !important;
  background:
    linear-gradient(145deg, rgba(207, 255, 79, 0.13), rgba(207, 255, 79, 0.025) 64%),
    var(--surface) !important;
}

.tag-content {
  min-width: 0;
}

.tag-card strong {
  display: -webkit-box;
  max-height: 2.56em;
  overflow: hidden;
  color: #f3f6fa;
  font-size: clamp(19px, 2.1vw, 29px);
  line-height: 1.28;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.tag-card.is-expanded {
  height: auto !important;
  min-height: auto !important;
}

.tag-card.is-expanded strong {
  display: block !important;
  max-height: none !important;
  overflow: visible !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
}

/* 標籤字串智慧色彩高亮：純色無霓光（低於紅色、高於綠色、基準藍色） */
.tag-tok {
  display: inline;
}

/* 低於基準（偏硬 / 咬分）-> 純紅色 */
.tag-tok.is-hard,
.tag-tok.is-bite {
  color: #ff747f !important;
}

/* 高於基準（偏軟 / 大放軟）-> 純綠色 */
.tag-tok.is-soft,
.tag-tok.is-very-soft {
  color: #cfff4f !important;
}

/* 免遊中獎率為固定機率欄位，不參與軟硬判讀 */
.tag-tok.is-prob {
  color: inherit !important;
}

/* 官方基準 -> 純藍色 */
.tag-tok.is-baseline {
  color: #7ccfff !important;
}

/* 一般關鍵字 -> 中性白 */
.tag-tok.is-keyword {
  color: #f3f6fa !important;
}

/* 內部流水號 -> 淡灰 */
.tag-tok.is-meta {
  color: #7e8b9b !important;
  opacity: 0.6;
  font-size: 0.88em;
}

.tag-toggle {
  margin-top: 11px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: #defe8a;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.metric-card {
  display: flex;
  flex-direction: column;
}

.metric-card strong {
  margin: auto 0 4px;
  font-size: clamp(28px, 3vw, 39px);
  font-weight: 650;
  letter-spacing: -0.055em;
}

.metric-card small {
  color: #66727b;
  font-size: 9px;
  letter-spacing: 0.07em;
  line-height: 1.55;
}

.win-card strong,
.free-game-card strong {
  color: var(--accent);
}

/* 免遊累積觸發機率精算卡片（極光冰藍色系，無綠色） */
.fg-prob-card {
  margin-top: 24px;
  padding: 20px 22px;
  background:
    radial-gradient(ellipse at top left, rgba(124, 207, 255, 0.05), transparent 50%),
    rgba(17, 22, 27, 0.85);
  border: 1px solid rgba(124, 207, 255, 0.22);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  display: grid;
  gap: 16px;
}

.fg-prob-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.fg-prob-header h4 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.fg-prob-header span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.fg-prob-rate-badge {
  flex-shrink: 0;
  padding: 5px 12px;
  background: rgba(124, 207, 255, 0.12);
  border: 1px solid rgba(124, 207, 255, 0.35);
  border-radius: 999px;
  color: #7ccfff;
  font-size: 11px;
  font-weight: 800;
}

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

.fg-prob-item {
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 8px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.fg-prob-item:hover {
  border-color: rgba(124, 207, 255, 0.35);
  transform: translateY(-2px);
}

.fg-prob-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.fg-prob-spins {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-strong);
}

.fg-prob-percent {
  font-size: 16px;
  font-weight: 800;
  color: #7ccfff;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.fg-prob-bar-wrap {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.fg-prob-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #0284c7, #7ccfff);
  box-shadow: none;
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fg-prob-custom-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: var(--muted-strong);
}

.fg-custom-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
}

.fg-custom-input-wrap input {
  width: 65px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  outline: none;
}

.fg-custom-input-wrap span {
  color: var(--muted);
  font-size: 12px;
}

.fg-custom-arrow {
  color: var(--muted);
  font-weight: 700;
}

.fg-custom-result {
  color: var(--muted-strong);
}

.fg-custom-result strong {
  color: #7ccfff;
  font-size: 15px;
  font-weight: 800;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  margin-left: 2px;
}

@media (max-width: 720px) {
  .fg-prob-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tag-guide-block {
  margin-top: 50px;
}

.subheading {
  margin-bottom: 17px;
}

.subheading h3 {
  margin: 0 0 4px;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.subheading span {
  color: var(--muted);
  font-size: 11px;
}

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

.tag-guide-card,
.tag-guide-empty {
  min-width: 0;
  padding: 18px 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.tag-guide-card > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.tag-guide-card-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.tag-guide-card strong {
  font-size: 14px;
}

.tag-guide-card-title small {
  flex: none;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 9px;
  font-weight: 800;
}

.tag-guide-card > div > span {
  flex: none;
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
}

.tag-guide-card p,
.tag-guide-empty {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.tag-guide-card.is-watch,
.tag-guide-card.is-soft,
.tag-guide-card.is-very-soft {
  border-color: rgba(207, 255, 79, 0.3);
}

.tag-guide-card.is-stop,
.tag-guide-card.is-hard {
  border-color: rgba(255, 116, 127, 0.36);
  background: rgba(255, 116, 127, 0.035);
}

.tag-guide-card.is-hard .tag-guide-card-title small {
  color: var(--danger);
  background: rgba(255, 116, 127, 0.12);
}

.tag-guide-card.is-hard span {
  color: #ff747f;
}

.tag-guide-card.is-stop > div > span {
  color: var(--danger);
}

.tag-guide-empty {
  grid-column: 1 / -1;
}

.tag-summary {
  margin-top: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.tag-summary > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.tag-summary h4 {
  margin: 7px 0 12px;
  font-size: 19px;
}

.tag-summary ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-summary li {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: var(--surface-soft);
  font-size: 10px;
}

.tag-summary p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.tag-summary.is-mixed {
  border-color: rgba(255, 204, 102, 0.34);
}

.tag-summary.is-mixed h4 {
  color: var(--warning);
}

.tag-summary.is-hard {
  border-color: rgba(255, 116, 127, 0.36);
}

.tag-summary.is-hard h4 {
  color: var(--danger);
}

.tag-summary.is-soft {
  border-color: rgba(207, 255, 79, 0.3);
}

.tag-summary.is-soft h4 {
  color: var(--accent);
}

.rounds-block {
  margin-top: 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  transition: all 0.2s ease;
}

.rounds-block[open] {
  padding-bottom: 24px;
  background: var(--surface-soft);
  border-color: rgba(255, 255, 255, 0.12);
}

.rounds-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  user-select: none;
  margin: 0;
  padding: 4px 0;
}

.rounds-heading::-webkit-details-marker {
  display: none;
}

.rounds-toggle-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.rounds-heading:hover .rounds-toggle-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.rounds-block[open] .rounds-list {
  margin-top: 20px;
}

.replay-block {
  margin-top: 48px;
}

.rounds-list {
  display: grid;
  gap: 8px;
}

.round-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  padding: 11px 20px 11px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color 160ms ease, background 160ms ease;
}

.round-card:hover {
  border-color: rgba(207, 255, 79, 0.25);
  background: var(--surface-raised);
}

.round-number {
  display: grid;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(207, 255, 79, 0.2);
  border-radius: var(--radius-sm);
  color: var(--accent);
  background: var(--accent-soft);
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.round-main span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.11em;
}

.round-main strong {
  font-size: 23px;
  letter-spacing: -0.03em;
}

.round-meta {
  display: grid;
  gap: 5px;
  color: #76818a;
  font-size: 11px;
  text-align: right;
}

.replay-game-picker {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(17, 22, 27, 0.72);
}

.replay-game-picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.replay-game-picker-heading strong {
  font-size: 13px;
}

.replay-game-picker-heading span {
  color: var(--brand-strong);
  font-size: 11px;
}

.replay-game-options {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.replay-game-options button {
  min-width: 0;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--muted-strong);
  background: var(--surface-raised);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease,
    transform 140ms ease;
}

.replay-game-options button:hover {
  border-color: var(--brand-line);
  color: var(--text);
}

.replay-game-options button:active {
  transform: scale(0.97);
}

.replay-game-options button[aria-pressed="true"] {
  border-color: var(--brand-line);
  color: #f5ead5;
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(226, 192, 122, 0.12);
}

.replay-game-options button:focus-visible {
  outline: 2px solid var(--brand-strong);
  outline-offset: 2px;
}

.replay-game-options button.is-coming-soon {
  display: grid;
  align-content: center;
  gap: 2px;
  border-style: dashed;
  color: #78828b;
  background: rgba(255, 255, 255, 0.018);
  cursor: not-allowed;
}

.replay-game-options button.is-coming-soon small {
  color: var(--brand-strong);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.replay-game-picker > p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: #030506;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  transition: aspect-ratio 0.25s ease, max-width 0.25s ease;
}

.player-frame.is-portrait {
  aspect-ratio: 9 / 16;
  max-width: 440px;
  margin-inline: auto;
}

.player-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.player-placeholder {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 15px;
  color: var(--muted);
  background: #070a0c;
  font-size: 12px;
}

.loader-ring {
  width: 34px;
  height: 34px;
  border: 2px solid #242d33;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

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

.empty-state {
  display: grid;
  min-height: 240px;
  align-content: center;
  justify-items: center;
  border-top: 1px solid var(--line);
  color: #58636c;
}

.empty-state span {
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.empty-state p {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 15px;
}

.empty-line {
  width: 64px;
  height: 1px;
  background: var(--line-strong);
}

.tag-history-section {
  padding: 62px 0 72px;
  border-top: 1px solid var(--line);
}

.tag-history-count {
  flex: none;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: var(--surface);
  font-size: 11px;
  font-weight: 700;
}

.tag-history-note {
  display: block;
  max-width: 760px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.tag-history-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag-history-filters button {
  min-width: 72px;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: var(--surface);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  transition:
    transform 140ms cubic-bezier(0.23, 1, 0.32, 1),
    border-color 160ms ease,
    color 160ms ease,
    background-color 160ms ease;
}

.tag-history-filters button.is-active {
  border-color: var(--brand-line);
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.tag-history-filters button:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .tag-history-filters button:hover:not(.is-active) {
    border-color: var(--line-strong);
    color: var(--text);
  }
}

.tag-history-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  margin-top: 14px;
}

.tag-history-list.is-single {
  grid-template-columns: 1fr;
}

.tag-history-column {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 12px;
}

.tag-history-group {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(17, 22, 27, 0.72);
}

.tag-history-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.tag-history-group[open] .tag-history-group-heading {
  margin-bottom: 14px;
}

.tag-history-group-heading::-webkit-details-marker {
  display: none;
}

.tag-history-group-heading h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.tag-history-group-heading span {
  color: var(--muted);
  font-size: 10px;
}

.tag-history-group-controls {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.tag-history-summary {
  flex: none;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--surface-soft);
  font-size: 10px;
}

.tag-history-toggle-hint {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted-strong) !important;
  background: rgba(255, 255, 255, 0.025);
  font-size: 10px !important;
  font-weight: 750;
}

.tag-history-toggle-label::before {
  content: "展開";
}

.tag-history-group[open] .tag-history-toggle-label::before {
  content: "收合";
}

.tag-history-toggle-hint i {
  display: block;
  width: 7px;
  height: 7px;
  transform: translateY(-2px) rotate(45deg);
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.tag-history-group[open] .tag-history-toggle-hint i {
  transform: translateY(2px) rotate(225deg);
}

.tag-history-group-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.tag-history-item {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.tag-history-item:hover {
  border-color: rgba(207, 255, 79, 0.32);
  transform: translateY(-1px);
}

.tag-history-name {
  min-width: 0;
  flex: 1;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: normal;
}

.tag-history-item-meta {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
}

.tag-history-new {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid rgba(226, 192, 122, 0.38);
  border-radius: 999px;
  color: #f2d28e;
  background: rgba(226, 192, 122, 0.12);
  box-shadow: 0 0 14px rgba(226, 192, 122, 0.08);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.tag-history-badge {
  flex: none;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 800;
}

.tag-history-empty {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 13px;
}

.tag-history-group.is-very-soft,
.tag-history-group.is-soft {
  border-color: rgba(207, 255, 79, 0.24);
}

.tag-history-group.is-hard {
  border-color: rgba(255, 116, 127, 0.28);
}

.tag-history-group.is-bite {
  border-color: rgba(255, 82, 96, 0.42);
  background: rgba(255, 82, 96, 0.035);
}

.tag-history-group.is-bite .tag-history-group-heading h3,
.tag-history-group.is-bite .tag-history-summary,
.tag-history-group.is-bite .tag-history-badge,
.tag-history-group.is-hard .tag-history-summary {
  color: var(--danger);
}

.tag-history-group.is-test {
  border-color: rgba(124, 207, 255, 0.25);
}

footer {
  display: flex;
  min-height: 112px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: #68737c;
  font-size: 10px;
}

footer > span {
  color: var(--muted-strong);
  font-weight: 800;
  letter-spacing: 0.08em;
}

footer p {
  margin: 0;
  text-align: right;
}

.pwa-install-dialog {
  width: min(450px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid rgba(207, 255, 79, 0.22);
  border-radius: var(--radius-lg);
  color: var(--text);
  background:
    radial-gradient(circle at 90% 0%, rgba(207, 255, 79, 0.1), transparent 38%),
    #11161b;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.62);
}

.pwa-install-dialog::backdrop {
  background: rgba(3, 5, 7, 0.78);
  backdrop-filter: blur(6px);
}

.pwa-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pwa-dialog-heading span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.pwa-dialog-heading button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  place-items: center;
  font-size: 20px;
}

.pwa-dialog-app {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.pwa-dialog-app img {
  display: block;
  width: 70px;
  height: 70px;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}

.pwa-dialog-app span {
  display: inline-block;
  margin-bottom: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 9px;
  font-weight: 800;
}

.pwa-install-dialog h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.pwa-dialog-app p,
.pwa-dialog-intro {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.pwa-dialog-app p {
  margin: 5px 0 0;
}

.pwa-dialog-intro {
  margin: 22px 0 10px;
}

.pwa-install-dialog ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  counter-reset: install-step;
  color: var(--muted-strong);
  font-size: 13px;
  list-style: none;
}

.pwa-install-dialog li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.018);
  counter-increment: install-step;
}

.pwa-install-dialog li::before {
  display: grid;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #0b0f08;
  background: var(--accent);
  content: counter(install-step);
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}

.pwa-dialog-confirm {
  width: 100%;
  margin-top: 20px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius-sm);
  color: #0b0f08;
  background: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

/* Privacy share image preview */
.share-preview-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: min(92dvh, 860px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 192, 122, 0.3);
  border-radius: 24px;
  color: var(--text);
  background: rgba(13, 16, 21, 0.97);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.72);
}

.share-preview-dialog::backdrop {
  background: rgba(2, 4, 7, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.share-preview-sheet {
  display: grid;
  gap: 15px;
  padding: 20px;
}

.share-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.share-preview-heading span {
  display: block;
  margin-bottom: 4px;
  color: var(--brand-strong);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.share-preview-heading h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.share-preview-heading > button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  place-items: center;
  font-size: 21px;
}

.share-preview-frame {
  display: grid;
  min-height: 220px;
  max-height: min(62dvh, 650px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 17px;
  background: #080a0e;
  place-items: center;
}

.share-preview-frame img {
  display: block;
  width: 100%;
  max-height: min(62dvh, 650px);
  object-fit: contain;
}

.share-preview-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.share-preview-mobile-tip {
  display: none;
  margin: 10px 2px 0;
  color: #a8b0ba;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.share-preview-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
}

.share-preview-actions button {
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: transform 100ms ease-out, opacity 140ms ease, border-color 140ms ease;
}

.share-preview-actions button:active,
.share-preview-heading > button:active {
  transform: scale(0.97);
}

.share-preview-actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.share-preview-download {
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.035);
}

.share-preview-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #17130c;
  border-color: var(--brand-strong) !important;
  background: var(--brand-strong);
}

.share-preview-share svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 620px) {
  .share-preview-mobile-tip {
    display: block;
  }

  .share-preview-dialog {
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: 94dvh;
    margin: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 26px 26px 0 0;
    background: rgba(13, 16, 21, 0.985);
  }

  .share-preview-sheet {
    gap: 12px;
    padding: 13px 14px max(16px, env(safe-area-inset-bottom));
  }

  .share-preview-sheet::before {
    width: 38px;
    height: 5px;
    margin: 0 auto 1px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    content: "";
  }

  .share-preview-frame,
  .share-preview-frame img {
    max-height: 61dvh;
  }

  .share-preview-frame {
    min-height: 190px;
    border-radius: 15px;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .share-preview-dialog {
    background: #0d1015;
  }

  .share-preview-dialog::backdrop {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Brand color: interface chrome only; data colors remain semantic. */
body {
  background:
    radial-gradient(circle at 88% 7%, rgba(226, 192, 122, 0.07), transparent 28rem),
    radial-gradient(circle at 8% 36%, rgba(226, 192, 122, 0.035), transparent 32rem),
    var(--bg);
}

::selection {
  color: #081018;
  background: var(--brand-strong);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline-color: var(--brand-strong);
}

.brand-icon {
  border-color: var(--brand-line);
}

.pwa-install-button {
  border-color: var(--brand-line);
  color: #e2c07a;
  background: var(--brand-soft);
}

.pwa-install-button:hover {
  background: rgba(226, 192, 122, 0.2);
}

.hero-stage::after {
  border-color: rgba(226, 192, 122, 0.1);
  background: radial-gradient(circle, rgba(226, 192, 122, 0.09), transparent 68%);
}

.eyebrow,
h1 em,
.guide-copy > span,
.daily-tag-guide-heading > span,
.tag-scope-note strong,
.tag-tutorial > summary span,
.tag-tutorial .mode-guide-grid p,
.section-heading p,
.empty-state span {
  color: var(--brand-strong);
}

.eyebrow::before {
  background: var(--brand-strong);
}

@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-6px); }
  30%, 60%, 90% { transform: translateX(6px); }
}

.input-row.is-shaking,
.input-text.is-shaking {
  animation: inputShake 0.45s ease-in-out;
  border-color: rgba(255, 116, 127, 0.8) !important;
  box-shadow: 0 0 16px rgba(255, 116, 127, 0.4) !important;
}

.input-row:focus-within {
  border-color: var(--brand-line);
  box-shadow: 0 0 0 4px rgba(226, 192, 122, 0.08), 0 18px 40px rgba(0, 0, 0, 0.28);
}

.input-row button,
.input-row > button[type="submit"],
.pwa-dialog-confirm,
.pwa-install-dialog li::before {
  color: #081018;
  background: var(--brand-strong);
}

.input-row > button[type="submit"]:hover:not(:disabled) {
  background: #edcf92;
}

.daily-tag-guide {
  border-color: rgba(226, 192, 122, 0.22);
  background:
    linear-gradient(105deg, rgba(226, 192, 122, 0.065), transparent 55%),
    var(--surface);
}

.daily-tag-guide .tag-scope-note {
  border-top-color: rgba(226, 192, 122, 0.14);
}

.tag-tutorial[open] {
  border-color: rgba(226, 192, 122, 0.28);
}

.tag-tutorial > summary {
  background:
    radial-gradient(circle at 88% 0%, rgba(226, 192, 122, 0.09), transparent 180px),
    var(--surface);
}

.tutorial-overview b {
  border-color: var(--brand-line);
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.tutorial-section-heading > span {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.tag-tutorial .mode-guide-grid article::before {
  background: linear-gradient(90deg, var(--brand-strong), transparent 72%);
}

.copy-button:hover,
.subheading a:hover,
.tag-toggle:hover,
.tag-toggle:focus-visible {
  border-color: var(--brand-strong);
  color: var(--brand-strong);
}

.tag-toggle {
  color: #dbc18c;
}

.player-card img {
  border-color: var(--brand-line);
}

.round-card:hover,
.tag-history-item:hover {
  border-color: var(--brand-line);
}

.loader-ring {
  border-top-color: var(--brand-strong);
}

.pwa-install-dialog {
  border-color: rgba(226, 192, 122, 0.26);
  background:
    radial-gradient(circle at 90% 0%, rgba(226, 192, 122, 0.12), transparent 38%),
    #11161b;
}

.pwa-dialog-heading span,
.pwa-dialog-app span {
  color: var(--brand-strong);
}

.pwa-dialog-app span {
  background: var(--brand-soft);
}

@media (max-width: 980px) {
  .hero-stage {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding: 40px;
  }

}

@media (max-width: 820px) {
  .hero-stage {
    grid-template-columns: 1fr;
  }

  .spin-guide {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
    align-items: center;
  }

  .daily-tag-guide {
    grid-template-columns: 1fr;
  }

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

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

  .player-card,
  .tag-card {
    grid-column: span 2;
  }
}

@media (max-width: 700px) {
  .spin-guide {
    display: block;
  }

  .tag-verdicts,
  .help-details-grid,
  .tutorial-overview,
  .mode-guide-grid,
  .game-tag-grid,
  .mixed-tag-values,
  .rtp-tutorial-points,
  .tag-guide-list {
    grid-template-columns: 1fr;
  }

  .tag-disclaimer {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .rtp-scale > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .tag-tutorial .rtp-scale > div {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
  }

  .tag-tutorial .rtp-scale > div strong,
  .tag-tutorial .rtp-scale > div span {
    grid-column: 1;
  }

  .tag-tutorial .rtp-scale > div em {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

@media (max-width: 620px) {
  .site-header-inner,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    height: 64px;
  }

  .brand {
    gap: 8px;
    font-size: 12px;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .header-actions {
    gap: 7px;
    margin-left: auto;
  }

  .online-users {
    min-height: 34px;
    gap: 5px;
    padding: 3px 9px 3px 4px;
  }

  .online-signal {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  .online-copy {
    display: none;
  }

  .online-users strong {
    font-size: 13px;
  }

  .header-ext-btn {
    padding: 7px 11px;
    font-size: 11px;
  }

  .pwa-install-button {
    padding: 8px 10px;
    font-size: 10px;
  }

  .hero {
    padding: 20px 0 58px;
  }

  .hero-stage {
    gap: 28px;
    padding: 27px 20px 20px;
    border-radius: 20px;
  }

  .hero-stage::after {
    top: -250px;
    right: -220px;
  }

  .eyebrow {
    margin-bottom: 15px;
    font-size: 9px;
  }

  h1 {
    font-size: clamp(39px, 12vw, 54px);
  }

  .input-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 6px;
  }

  .input-row input {
    padding: 15px 13px;
    font-size: 14px;
  }

  .input-row > button[type="submit"] {
    min-height: 50px;
  }

  .form-footer {
    display: grid;
    gap: 5px;
  }

  .form-message {
    text-align: left;
  }

  .spin-guide {
    border-radius: 14px;
  }

  .spin-guide figure {
    padding: 7px 7px 0;
  }

  .guide-copy {
    padding: 17px;
  }

  .guide-copy h2 {
    font-size: 18px;
  }

  .help-zone {
    margin-top: 12px;
  }

  .daily-tag-guide {
    gap: 18px;
    padding: 19px;
    border-radius: 15px 15px 0 0;
  }

  .daily-tag-guide h2 {
    font-size: 17px;
  }

  .daily-check-flow {
    gap: 7px;
  }

  .daily-check-flow article {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }

  .tag-verdicts {
    grid-template-columns: 1fr;
  }

  .tag-disclaimer {
    padding: 14px 17px;
    border-radius: 0 0 15px 15px;
  }

  .rtp-tutorial summary {
    min-height: 68px;
    padding: 14px 16px;
  }

  .rtp-tutorial-content {
    padding: 2px 16px 17px;
  }

  .tag-tutorial > summary {
    min-height: 84px;
    padding: 15px 16px;
  }

  .tag-tutorial > summary strong {
    font-size: 15px;
  }

  .tag-tutorial > summary small {
    max-width: 240px;
    font-size: 10px;
  }

  .tag-tutorial > .rtp-tutorial-content {
    padding: 10px;
  }

  .tag-tutorial .tutorial-section {
    margin-top: 8px;
    padding: 16px;
  }

  .tutorial-overview article {
    padding: 12px;
  }

  .tutorial-section-heading {
    align-items: flex-start;
  }

  .tag-tutorial .tutorial-final-note {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tag-tutorial .tutorial-final-note > span {
    justify-self: start;
  }

  .result-shell {
    padding: 52px 0 72px;
  }

  .section-heading {
    align-items: flex-start;
    margin-bottom: 21px;
  }

  .section-heading h2 {
    font-size: 27px;
  }

  .copy-button,
  .share-button {
    padding: 8px 10px;
    font-size: 10px;
  }

  .result-heading-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .share-result-status {
    margin-top: -14px;
  }

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

  .player-card,
  .tag-card {
    grid-column: span 2;
  }

  .result-grid article {
    min-height: 130px;
    padding: 17px;
    border-radius: 12px;
  }

  .player-card {
    min-height: 140px !important;
    gap: 14px;
  }

  .player-card img {
    width: 62px;
    height: 62px;
  }

  .player-card h3 {
    font-size: 23px;
  }

  .tag-card {
    min-height: 142px !important;
  }

  .tag-card strong {
    font-size: 22px;
  }

  .metric-card strong {
    font-size: clamp(26px, 9vw, 34px);
  }

  .tag-guide-block {
    margin-top: 42px;
  }

  .tag-guide-card > div {
    align-items: flex-start;
  }

  .tag-guide-card > div > span {
    font-size: 16px;
  }

  .rounds-block,
  .replay-block {
    margin-top: 48px;
  }

  .round-card {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 9px;
  }

  .round-number {
    width: 48px;
    height: 48px;
  }

  .round-main strong {
    font-size: 20px;
  }

  .round-meta {
    display: flex;
    grid-column: 2;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 10px;
    text-align: left;
  }

  .replay-game-picker {
    gap: 10px;
    padding: 12px;
  }

  .replay-game-picker-heading {
    align-items: flex-start;
  }

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

  .replay-game-options button {
    min-height: 44px;
  }

  .player-frame {
    width: 100%;
    min-height: 0;
    margin-inline: 0;
    border-radius: 16px;
    aspect-ratio: 16 / 9;
  }

  .player-frame.is-portrait {
    aspect-ratio: 9 / 16;
    width: 100%;
    max-width: 390px;
    margin-inline: auto;
    min-height: 520px;
  }

  .tag-history-section {
    padding: 50px 0 58px;
  }

  .tag-history-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(max-content, 1fr));
    gap: 6px;
    margin-top: 16px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .tag-history-filters::-webkit-scrollbar {
    display: none;
  }

  .tag-history-filters button {
    min-width: 64px;
    min-height: 34px;
    padding: 6px 11px;
  }

  .tag-history-list,
  .tag-history-list.is-single {
    grid-template-columns: 1fr;
  }

  .tag-history-group {
    padding: 14px;
  }

  .tag-history-group-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: flex-start;
    gap: 12px;
    min-height: 0;
    padding: 0;
  }

  .tag-history-group-controls {
    display: grid;
    justify-items: end;
    gap: 7px;
  }

  .tag-history-toggle-hint {
    min-height: 28px;
    padding: 4px 9px;
  }

  .tag-history-group-items {
    grid-template-columns: 1fr;
  }

  .tag-history-item {
    width: 100%;
    min-width: 0;
    padding: 11px;
  }

  .tag-history-name {
    font-size: 11px;
  }

  .tag-history-item-meta {
    align-items: flex-end;
    flex-direction: column;
    gap: 5px;
  }

  footer {
    display: grid;
    gap: 10px;
    min-height: 120px;
    align-content: center;
    line-height: 1.6;
  }

  footer p {
    text-align: left;
  }

  .pwa-install-dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 16px);
    margin: auto 0 0;
    padding: 20px 18px max(22px, env(safe-area-inset-bottom));
    overflow-y: auto;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
  }

  .pwa-dialog-app {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .pwa-dialog-app img {
    width: 60px;
    height: 60px;
    border-radius: 15px;
  }

  .pwa-install-dialog h2 {
    font-size: 20px;
  }
}

@media (max-width: 380px) {
  .player-card img {
    width: 54px;
    height: 54px;
  }

  .player-card h3 {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   全新功能升級樣式：全網水溫、模式 Tabs、輸入框快捷按鈕、每日健檢、個人歷史
   ========================================================================== */

/* 1. 今日全網水溫指數小工具 */
.water-temp-widget {
  margin: 20px 0 24px;
  padding: 14px 18px;
  background: rgba(17, 22, 27, 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  display: grid;
  gap: 10px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.water-temp-widget.is-soft {
  border-color: rgba(207, 255, 79, 0.35);
  box-shadow: 0 0 24px rgba(207, 255, 79, 0.08);
}

.water-temp-widget.is-bite {
  border-color: rgba(255, 116, 127, 0.35);
  box-shadow: 0 0 24px rgba(255, 116, 127, 0.08);
}

.water-temp-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.water-temp-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-strong);
}

.global-tag-total-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-strong);
  margin-left: 2px;
  letter-spacing: 0.2px;
}

.temp-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse-ring 2s infinite;
}

.water-temp-widget.is-bite .temp-pulse {
  background: var(--danger);
  box-shadow: 0 0 10px var(--danger);
}

.water-temp-label {
  font-size: 14px;
  color: var(--text);
  letter-spacing: 0.2px;
}

.water-temp-widget.is-soft .water-temp-label {
  color: var(--accent);
}

.water-temp-widget.is-bite .water-temp-label {
  color: var(--danger);
}

.water-temp-gauge-multi {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
  display: flex;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.water-gauge-seg {
  height: 100%;
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}

.water-gauge-seg.is-soft {
  background: linear-gradient(90deg, #9ae600, #cfff4f);
  box-shadow: 0 0 12px rgba(207, 255, 79, 0.45);
}

.water-gauge-seg.is-baseline {
  background: linear-gradient(90deg, #f59e0b, #ffcc66);
  box-shadow: 0 0 12px rgba(255, 204, 102, 0.4);
}

.water-gauge-seg.is-bite {
  background: linear-gradient(90deg, #f43f5e, #ff747f);
  box-shadow: 0 0 12px rgba(255, 116, 127, 0.45);
}

.water-temp-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.stat-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stat-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.stat-count-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-strong);
  margin-left: 2px;
  letter-spacing: 0.1px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.water-temp-stats .stat-item b {
  font-weight: 700;
  margin-left: 2px;
}

.water-temp-stats .stat-item.is-soft b {
  color: var(--accent);
}

.water-temp-stats .stat-item.is-soft .stat-dot {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.water-temp-stats .stat-item.is-soft .stat-count-tag {
  background: rgba(207, 255, 79, 0.12);
  color: #defe8a;
  border-color: rgba(207, 255, 79, 0.25);
}

.water-temp-stats .stat-item.is-baseline b {
  color: var(--warning);
}

.water-temp-stats .stat-item.is-baseline .stat-dot {
  background: #ffcc66;
  box-shadow: 0 0 6px #ffcc66;
}

.water-temp-stats .stat-item.is-baseline .stat-count-tag {
  background: rgba(255, 204, 102, 0.12);
  color: #ffe099;
  border-color: rgba(255, 204, 102, 0.25);
}

.water-temp-stats .stat-item.is-bite b {
  color: var(--danger);
}

.water-temp-stats .stat-item.is-bite .stat-dot {
  background: #ff747f;
  box-shadow: 0 0 6px #ff747f;
}

.water-temp-stats .stat-item.is-bite .stat-count-tag {
  background: rgba(255, 116, 127, 0.12);
  color: #ff9da6;
  border-color: rgba(255, 116, 127, 0.25);
}

/* 2. 模式切換 Tabs */
.mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  background: rgba(15, 20, 25, 0.85);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-x: auto;
}

.mode-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.mode-tab:active {
  transform: scale(0.97);
}

.mode-tab-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mode-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.mode-tab.is-active {
  color: var(--mode-active-text);
  background: var(--mode-active-bg);
  box-shadow:
    inset 0 0 0 1px var(--mode-active-border),
    var(--mode-active-shadow);
}

.mode-tab-pill {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
}

.mode-tab.is-active .mode-tab-pill {
  background: rgba(0, 0, 0, 0.18);
}

.history-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--text);
}

.mode-tab.is-active .history-badge {
  color: var(--mode-active-text);
  background: rgba(225, 235, 198, 0.13);
}

/* 3. 輸入框輔助工具（貼上、清除） */
.input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.input-wrap input {
  width: 100%;
  padding-right: 76px;
}

.input-tool-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  min-width: auto !important;
  height: 30px !important;
  align-items: center;
  gap: 4px;
  padding: 0 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--muted-strong) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 7px !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: all 0.15s ease !important;
  z-index: 3;
}

.input-tool-btn[hidden] {
  display: none !important;
}

.input-tool-btn:hover {
  color: var(--accent) !important;
  background: rgba(207, 255, 79, 0.15) !important;
  border-color: rgba(207, 255, 79, 0.4) !important;
  transform: translateY(-50%) !important;
}

.input-tool-btn.is-clear {
  right: 8px;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  padding: 0 !important;
  justify-content: center;
  font-size: 13px !important;
  color: var(--muted) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 50% !important;
}

.input-tool-btn.is-clear:hover {
  color: #fff !important;
  background: rgba(255, 116, 127, 0.5) !important;
  border-color: rgba(255, 116, 127, 0.6) !important;
  transform: translateY(-50%) !important;
}

/* 4. 每日 9 款遊戲健檢面板 */
.health-check-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.health-check-info h3 {
  margin: 4px 0 2px;
  font-size: 18px;
  color: var(--text);
}

.health-check-info p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.health-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.reset-countdown-wrap {
  text-align: right;
  display: grid;
  gap: 2px;
}

.reset-countdown-wrap span {
  font-size: 11px;
  color: var(--muted);
}

.reset-countdown-wrap strong {
  font-size: 16px;
  font-family: monospace;
  color: var(--warning);
  letter-spacing: 1px;
}

.health-check-tools {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.health-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.health-tool-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.batch-paste-box {
  padding: 14px;
  margin-bottom: 16px;
  background: rgba(17, 22, 27, 0.95);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-md);
  display: grid;
  gap: 10px;
}

.batch-paste-box label {
  font-size: 12px;
  color: var(--muted-strong);
}

.batch-paste-box textarea {
  width: 100%;
  padding: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: monospace;
  font-size: 13px;
  resize: vertical;
}

.batch-paste-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-sub-action {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: #0b0e08;
}

.btn-sub-action.is-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted-strong);
}

/* 模式全寬適配 */
.hero-stage.is-health-mode,
.hero-stage.is-history-mode {
  grid-template-columns: 1fr;
}

.hero-stage.is-health-mode .spin-guide,
.hero-stage.is-history-mode .spin-guide {
  display: none;
}

.health-inputs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 960px) {
  .health-inputs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 620px) {
  .health-inputs-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 16px;
  }
}

.health-input-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: linear-gradient(150deg, rgba(20, 26, 33, 0.9), rgba(12, 16, 21, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  min-width: 0;
}

.health-input-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.health-input-item:focus-within {
  border-color: var(--accent);
  background: linear-gradient(150deg, rgba(24, 32, 40, 0.95), rgba(14, 19, 25, 0.98));
  box-shadow: 0 0 20px rgba(207, 255, 79, 0.14);
}

.health-input-header {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.health-coming-soon {
  margin-left: auto;
  padding: 3px 7px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.health-input-item.is-coming-soon {
  border-style: dashed;
  opacity: 0.72;
}

.health-input-item.is-coming-soon:hover {
  transform: none;
}

.health-input-item.is-coming-soon .health-spin-input {
  cursor: not-allowed;
}

.health-input-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
  flex-shrink: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.health-input-item:focus-within .health-input-dot {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(207, 255, 79, 0.9);
}

.game-tag-name {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.2px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.health-spin-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.3px;
  color: #f1f5f9;
  background: rgba(6, 9, 12, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  min-width: 0;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.health-spin-input::placeholder {
  color: #4a5568;
  font-family: inherit;
  font-size: 12px;
}

.health-spin-input:focus {
  border-color: var(--accent);
  background: rgba(4, 7, 10, 0.9);
  outline: none;
  box-shadow: 0 0 12px rgba(207, 255, 79, 0.2);
}

.health-form-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.health-submit-btn {
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 700;
  color: #0b0e08;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.health-submit-btn:hover {
  background: var(--accent-strong);
  box-shadow: 0 4px 20px rgba(207, 255, 79, 0.35);
  transform: translateY(-1px);
}

.health-submit-btn.is-loading {
  opacity: 0.6;
  cursor: wait;
}

.health-form-status {
  font-size: 13px;
  color: var(--muted-strong);
}

.health-form-status[data-type="error"] {
  color: var(--danger);
}

.health-form-status[data-type="success"] {
  color: var(--accent);
}

/* 健檢橫向對比總覽卡片 */
.health-results-container {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
  width: 100%;
  min-width: 0;
}

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

.health-save-pill {
  display: inline-block;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
}

.health-save-pill.is-expired {
  color: var(--warning);
  background: rgba(255, 204, 102, 0.1);
}

.health-results-header h4 {
  margin: 6px 0 0;
  font-size: 18px;
  color: var(--text);
}

.health-history-privacy {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.btn-text-action {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-strong);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.btn-text-action:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-strong);
}

.btn-text-action.is-danger {
  color: var(--danger);
  border-color: rgba(255, 116, 127, 0.2);
}

.btn-text-action.is-danger:hover {
  background: rgba(255, 116, 127, 0.12);
}

.health-comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  min-width: 0;
}

@media (max-width: 1024px) {
  .health-comparison-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 620px) {
  .health-comparison-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.health-comparison-card {
  padding: 16px 18px;
  background: linear-gradient(150deg, rgba(22, 28, 36, 0.95), rgba(12, 16, 21, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease,
              box-shadow 0.22s ease;
  min-width: 0;
  box-sizing: border-box;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.health-comparison-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.2s ease;
}

.health-comparison-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.health-comparison-card.is-very-soft {
  border-color: rgba(207, 255, 79, 0.35);
  background: linear-gradient(150deg, rgba(207, 255, 79, 0.06), rgba(12, 16, 21, 0.98));
  box-shadow: 0 4px 24px rgba(207, 255, 79, 0.06);
}
.health-comparison-card.is-very-soft::before {
  background: linear-gradient(90deg, #cfff4f, transparent);
}

.health-comparison-card.is-soft {
  border-color: rgba(124, 207, 255, 0.35);
  background: linear-gradient(150deg, rgba(124, 207, 255, 0.05), rgba(12, 16, 21, 0.98));
}
.health-comparison-card.is-soft::before {
  background: linear-gradient(90deg, #7ccfff, transparent);
}

.health-comparison-card.is-baseline {
  border-color: rgba(255, 204, 102, 0.25);
}
.health-comparison-card.is-baseline::before {
  background: linear-gradient(90deg, #ffcc66, transparent);
}

.health-comparison-card.is-hard {
  border-color: rgba(255, 116, 127, 0.3);
  background: linear-gradient(150deg, rgba(255, 116, 127, 0.04), rgba(12, 16, 21, 0.98));
}
.health-comparison-card.is-hard::before {
  background: linear-gradient(90deg, #ff747f, transparent);
}

.health-comparison-card.is-bite {
  border-color: rgba(255, 75, 75, 0.45);
  background: linear-gradient(150deg, rgba(255, 75, 75, 0.07), rgba(12, 16, 21, 0.98));
  box-shadow: 0 4px 24px rgba(255, 75, 75, 0.08);
}
.health-comparison-card.is-bite::before {
  background: linear-gradient(90deg, #ef4444, transparent);
}

.health-comparison-card.is-empty {
  background: linear-gradient(150deg, rgba(16, 20, 26, 0.8), rgba(11, 14, 18, 0.9));
  border-color: rgba(255, 255, 255, 0.05);
}

.health-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.health-game-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.health-game-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #52606d;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(82, 96, 109, 0.4);
}

.health-game-dot.is-very-soft {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(207, 255, 79, 0.85);
}

.health-game-dot.is-soft {
  background: #7ccfff;
  box-shadow: 0 0 8px rgba(124, 207, 255, 0.85);
}

.health-game-dot.is-baseline {
  background: var(--warning);
  box-shadow: 0 0 8px rgba(255, 204, 102, 0.75);
}

.health-game-dot.is-hard {
  background: var(--danger);
  box-shadow: 0 0 8px rgba(255, 116, 127, 0.8);
}

.health-game-dot.is-bite {
  background: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.9);
}

.health-game-title {
  font-size: 15px;
  font-weight: 800;
  color: #f3f6fa;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.health-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.health-status-badge.is-very-soft {
  color: #081018;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(207, 255, 79, 0.35);
}

.health-status-badge.is-soft {
  color: #081018;
  background: #7ccfff;
  box-shadow: 0 0 10px rgba(124, 207, 255, 0.3);
}

.health-status-badge.is-baseline {
  color: #081018;
  background: var(--warning);
}

.health-status-badge.is-hard {
  color: #fff;
  background: rgba(255, 116, 127, 0.25);
  border: 1px solid rgba(255, 116, 127, 0.5);
}

.health-status-badge.is-bite {
  color: #fff;
  background: #e74c3c;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.4);
}

.health-status-badge.is-special {
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.health-status-badge.is-neutral {
  color: #83919e;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.health-tag-console {
  background: rgba(7, 10, 13, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 11px 13px;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.health-tag-console.is-empty {
  background: rgba(6, 8, 11, 0.55);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.06);
}

.health-tag-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #e2e8f0;
  word-break: break-word;
  letter-spacing: 0.2px;
}

.health-tag-code.is-empty {
  color: #64748b;
  font-size: 12px;
}

.health-trend {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.health-trend span {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.health-trend small {
  flex: 0 0 auto;
  font-size: 10px;
  color: var(--muted);
}

.health-trend b {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-trend > strong {
  grid-column: 1 / -1;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  letter-spacing: 0.2px;
}

.health-trend.is-softer > strong {
  color: var(--accent);
}

.health-trend.is-harder > strong {
  color: var(--danger);
}

.health-trend.is-same > strong {
  color: var(--warning);
}

.health-trend.is-neutral > strong {
  color: var(--muted-strong);
}

.health-card-footer {
  margin-top: 2px;
}

.health-card-footer.is-empty {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.health-card-empty-hint {
  font-size: 11px;
  color: #556575;
  letter-spacing: 0.2px;
}

.health-card-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.health-card-view-btn .btn-arrow {
  font-size: 14px;
  transition: transform 0.18s ease;
}

.health-card-view-btn:hover {
  color: #081018;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(207, 255, 79, 0.3);
}

.health-card-view-btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* 5. 個人歷史紀錄面板 */
.user-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.user-history-heading h3 {
  margin: 0 0 2px;
  font-size: 18px;
  color: var(--text);
}

.user-history-heading p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.user-history-list {
  display: grid;
  gap: 10px;
}

.user-history-empty {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}

.user-history-card {
  padding: 12px 16px;
  background: rgba(17, 22, 27, 0.85);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 8px;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.user-history-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.user-history-card.is-very-soft {
  border-left: 3px solid var(--accent);
}

.user-history-card.is-soft {
  border-left: 3px solid #7ccfff;
}

.user-history-card.is-bite {
  border-left: 3px solid var(--danger);
}

.user-history-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-history-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-history-avatar,
.user-history-avatar-ph {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.user-history-user strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.user-history-time {
  font-size: 11px;
  color: var(--muted);
}

.user-history-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-history-load-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #0b0e08;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.user-history-load-btn:hover {
  background: var(--accent-strong);
}

.user-history-del-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-history-del-btn:hover {
  color: var(--danger);
  background: rgba(255, 116, 127, 0.15);
}

.user-history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.user-history-spin-code {
  font-family: monospace;
  color: var(--muted-strong);
}

.user-history-win.has-win {
  color: var(--brand-strong);
  font-weight: 700;
}

.user-history-tag-box {
  font-size: 11px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(207, 255, 79, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(207, 255, 79, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(207, 255, 79, 0); }
}

@media (max-width: 720px) {
  .mode-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 14px;
  }

  .mode-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 9px 4px;
    font-size: 12px;
    gap: 4px;
    justify-content: center;
  }

  .mode-tab span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mode-tab-icon {
    width: 15px;
    height: 15px;
  }

  .mode-tab .history-badge {
    flex: 0 0 auto;
    overflow: visible;
  }

  .mode-tab-pill {
    display: none;
  }

  .water-temp-widget {
    padding: 12px 14px;
    margin-bottom: 14px;
  }

  .water-temp-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .water-temp-stats {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    gap: 6px;
  }

  .health-check-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
  }

  .reset-countdown-wrap {
    align-self: flex-start;
  }

  .health-inputs-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 14px;
  }

  .health-input-item {
    gap: 6px;
    padding: 10px 12px;
  }

  .health-spin-input {
    height: 40px;
    font-size: 13px;
  }

  .health-comparison-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-stage {
    padding-bottom: 85px;
  }
}
