:root {
  --bg: #f7f5ef;
  --paper: #fbfbf9;
  --paper-strong: #f5f8f7;
  --ink: #342720;
  --muted: #76665b;
  --line: #d8e1df;
  --accent: #6a8a8e;
  --accent-deep: #2f5257;
  --accent-soft: #edf4f4;
  --shadow: 0 12px 30px rgba(25, 38, 40, 0.05);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --max-width: 980px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  letter-spacing: 0.01em;
}

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

button {
  font: inherit;
}

.page-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  transform: translateX(-18px);
}

.visitor-record {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 112px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fcfcfa 0%, #f1f5f4 100%);
  box-shadow: var(--shadow);
}

.visitor-label {
  color: #7a5d49;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.visitor-record strong {
  margin-top: 4px;
  color: var(--accent-deep);
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.brand {
  display: inline-flex;
  align-items: flex-start;
  gap: 16px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--accent-deep);
  background: linear-gradient(180deg, #f9fcfc 0%, #e8f0f0 100%);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-text strong {
  color: #4e392d;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.brand-text span {
  color: #8a7869;
  font-size: 0.7rem;
  text-transform: lowercase;
  letter-spacing: 0.22em;
}

.feedback-trigger,
.copy-button,
.game-link,
.mailto-link {
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.feedback-trigger {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px 9px;
  color: var(--accent-deep);
  background: linear-gradient(180deg, #fbfcfc 0%, #f1f6f5 100%);
  cursor: pointer;
  letter-spacing: 0.08em;
}

.feedback-trigger:hover,
.feedback-trigger:focus-visible,
.copy-button:hover,
.copy-button:focus-visible,
.game-link:hover,
.game-link:focus-visible,
.mailto-link:hover,
.mailto-link:focus-visible {
  transform: translateY(-1px);
}

.hero-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.hero-copy,
.feedback-panel {
  padding: 30px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(251, 251, 249, 0.98), rgba(246, 249, 248, 0.98));
  box-shadow: var(--shadow);
}

.eyebrow,
.panel-eyebrow,
.game-tag {
  margin: 0 0 14px;
  color: #7a5d49;
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: none;
}

.hero-copy h1,
.section-heading h2,
.feedback-panel h2 {
  margin: 0;
  line-height: 1.12;
}

.hero-copy h1 {
  max-width: none;
  font-size: clamp(2rem, 4.2vw, 3rem);
}

.hero-text,
.panel-text,
.game-desc,
.site-footer p,
.legal-page p,
.legal-page li {
  color: var(--muted);
  line-height: 1.9;
}

.hero-text {
  max-width: 40ch;
  margin: 0;
  color: #5b4940;
  font-size: 1.12rem;
  line-height: 2;
  text-wrap: pretty;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.game-meta span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: #6c5749;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.feedback-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.feedback-panel[hidden] {
  display: none;
}

.panel-text {
  margin: 10px 0 0;
  font-size: 0.97rem;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.support-card {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fcfcfa 0%, #f4f7f6 100%);
  box-shadow: var(--shadow);
}

.support-qr {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  background-color: #ffffff;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.support-card figcaption {
  margin-top: 12px;
  color: #5b4940;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.notice-item .panel-text {
  white-space: pre-line;
}

.notice-details {
  margin-top: 10px;
}

.notice-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

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

.notice-preview {
  display: -webkit-box;
  margin-top: 0;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.notice-full-text {
  margin-top: 0;
}

.notice-details:not([open]) .notice-full-text {
  display: none;
}

.notice-details[open] .notice-preview {
  display: none;
}

.notice-toggle-text {
  color: var(--accent-deep);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
}

.notice-toggle-text::before {
  content: "展开全文";
}

.notice-details[open] .notice-toggle-text::before {
  content: "收起";
}

.notice-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 248px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.notice-item {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.notice-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.notice-date {
  margin: 0 0 8px;
  color: #7a5d49;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
}

.email-card {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f7f9f8 0%, #f2f6f5 100%);
  margin-top: 16px;
}

.email-card code {
  font-size: 0.95rem;
  color: #4c3a31;
  word-break: break-all;
}

.account-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #eef4f3;
}

.account-mode-tab {
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  color: #6f5a4b;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.account-mode-tab.is-active {
  color: #ffffff;
  background: var(--accent-deep);
}

.account-form {
  display: grid;
  gap: 12px;
}

.account-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.account-form input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: #4c3a31;
  background: #ffffff;
  font: inherit;
}

.account-form .account-check {
  display: inline-flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  width: fit-content;
}

.account-form .account-check input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.account-hint {
  margin: -2px 0 0;
  color: #8a7665;
  font-size: 0.84rem;
  line-height: 1.65;
}

.account-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f7f9f8 0%, #f2f6f5 100%);
}

.account-card-label {
  margin: 0 0 6px;
  color: #7a5d49;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
}

.account-card strong {
  display: block;
  margin-bottom: 10px;
  color: #4c3a31;
  word-break: break-all;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  align-items: center;
}

.account-forgot-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0 4px;
}

.account-forgot-link:hover {
  color: var(--accent);
}

.copy-button,
.mailto-link,
.game-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 600;
}

.copy-button {
  border: 0;
  padding: 10px 14px;
  color: #ffffff;
  background: var(--accent-deep);
  cursor: pointer;
  letter-spacing: 0.08em;
}

.copy-button.secondary {
  border: 1px solid var(--line);
  color: var(--accent-deep);
  background: #ffffff;
}

.copy-button:disabled,
.account-mode-tab:disabled,
.account-form input:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.mailto-link,
.game-link {
  width: fit-content;
  padding: 12px 18px;
}

.mailto-link {
  margin-top: 16px;
  border: 1px solid var(--line);
  color: var(--accent-deep);
  background: linear-gradient(180deg, #fbfcfc 0%, #f2f6f5 100%);
}

.copy-status {
  min-height: 1.5em;
  margin: 14px 0 0;
  color: var(--accent-deep);
}

.games-section {
  margin-top: 6px;
}

.section-heading {
  margin-bottom: 14px;
  padding-left: 2px;
}

.section-heading h2 {
  color: #523c30;
  font-size: 1.34rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.game-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fbfbf9 0%, #f5f8f7 100%);
  box-shadow: var(--shadow);
}

.game-main {
  min-width: 0;
}

.game-row h3 {
  margin: 0 0 10px;
  color: #4f392d;
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.18;
}

.game-desc {
  margin: 0 0 14px;
  max-width: 46ch;
  font-size: 0.96rem;
}

.game-link {
  flex: 0 0 auto;
  color: #ffffff;
  background: var(--accent-deep);
  min-width: 108px;
  letter-spacing: 0.12em;
}

.game-link.is-disabled {
  color: var(--muted);
  background: #e5ecec;
  cursor: not-allowed;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-top: 30px;
  padding: 0 4px;
}

.site-footer p,
.site-footer a,
.site-footer span {
  margin: 0;
  font-size: 0.87rem;
  color: #8a7665;
}

.footer-brand,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.footer-brand {
  flex-direction: column;
}

.footer-links {
  justify-content: flex-end;
}

.footer-links a,
.footer-brand a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.legal-page {
  padding: 30px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(251, 251, 249, 0.98), rgba(246, 249, 248, 0.98));
  box-shadow: var(--shadow);
}

.legal-page h1 {
  margin: 0 0 18px;
  color: #4f392d;
  font-size: 1.72rem;
  line-height: 1.24;
}

.legal-page h2 {
  margin: 26px 0 10px;
  color: #523c30;
  font-size: 1.08rem;
}

.legal-page p,
.legal-page ul {
  margin: 0 0 12px;
}

.legal-page ul {
  padding-left: 1.2em;
}

.legal-page .back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 900px) {
  .page-shell {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .site-header,
  .site-footer,
  .hero-section {
    grid-template-columns: 1fr;
    display: grid;
  }

  .site-header {
    align-items: start;
  }

  .header-actions {
    transform: none;
  }

  .site-footer {
    justify-content: start;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .game-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding-top: 18px;
  }

  .hero-copy,
  .feedback-panel,
  .game-row,
  .legal-page {
    padding: 22px;
  }

  .brand {
    align-items: flex-start;
  }

  .feedback-trigger,
  .copy-button,
  .mailto-link,
  .game-link {
    width: 100%;
  }

  .visitor-record {
    width: 100%;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
  }

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

  .site-footer {
    gap: 8px;
  }
}
