:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --gold: #f3d29a;
  --text: #f5f5f5;
  --muted: #8d9fb8;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #f7d798; outline-offset: 5px; }

.poster-document { height: auto; min-height: 100%; overflow-x: clip; overflow-y: auto; }
.poster-page {
  height: auto;
  min-height: 100vh;
  min-height: 100svh;
  touch-action: pan-y pinch-zoom;
  background: #032750;
  background: radial-gradient(ellipse at 50% 30%, #06386c 0, #031d3d 80%);
}
.poster {
  --poster-gutter: clamp(18px, 4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3svh, 30px);
  width: 100%;
  max-width: 680px;
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(18px, 3svh, 30px) var(--poster-gutter) max(18px, env(safe-area-inset-bottom));
  color: #f6f3e9;
  font-family: "Songti SC", "STSong", "SimSun", serif;
}
.poster-brand { display: flex; flex-shrink: 0; align-items: center; }
.poster-brand .wordmark { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.poster-brand .wordmark svg { width: 27px; height: 28px; }
.poster-brand .wordmark span { font-size: 21px; }
.poster-layout { display: flex; flex: 1; flex-direction: column; justify-content: space-between; gap: clamp(24px, 3.5svh, 38px); }
.poster-hero { display: flex; flex-direction: column; align-items: stretch; text-align: center; }
.poster-title { margin: 0; font-size: clamp(36px, 10.4vw, 63px); font-weight: 800; line-height: 1.3; letter-spacing: 0.035em; white-space: nowrap; }
.poster-kicker { margin: 7px 0 0; font-size: clamp(12px, 3.35vw, 19px); line-height: 1.6; letter-spacing: 0.035em; }
.commission { display: flex; justify-content: center; align-items: baseline; gap: 0.16em; margin: 11px 0 0; font-size: clamp(16px, 4.3vw, 26px); line-height: 1.2; white-space: nowrap; }
.commission strong, .commission b, .poster-benefits strong, .rule-number {
  background: linear-gradient(180deg, #fff9e3 10%, #ffe5a0 40%, #f7c25a 65%, #e7a32d 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 2px 18px #df9c3033;
}
.commission strong { font-family: Georgia, "Times New Roman", serif; font-size: clamp(35px, 9.6vw, 62px); font-style: italic; font-weight: 700; }
.commission small { font-size: 0.64em; }
.commission b { font-size: 1.08em; font-weight: 800; }
.poster-benefits { display: flex; justify-content: center; align-items: center; gap: 0.7em; margin: 3px 0 0; font-size: clamp(18px, 4.7vw, 29px); line-height: 1.4; white-space: nowrap; }
.poster-benefits > span { display: inline-flex; align-items: baseline; gap: 0.12em; }
.poster-benefits strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.72em; font-style: italic; line-height: 1; }
.poster-benefits i { height: 1.05em; width: 1px; background: #b5cae291; }
.poster-tagline { margin: 10px 0 0; color: #d8e1ed; font-size: clamp(12px, 3.1vw, 17px); letter-spacing: 0.08em; line-height: 1.7; }
.market-art {
  pointer-events: none;
  user-select: none;
  width: calc(100% + 2 * var(--poster-gutter));
  margin: 4px calc(-1 * var(--poster-gutter)) 0;
  aspect-ratio: 607 / 208;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 86%, transparent);
}
.market-art img { display: block; width: 100%; height: auto; transform: translateY(-34.259259%); -webkit-user-drag: none; }
.join-button {
  align-self: center;
  flex-shrink: 0;
  width: min(100%, 370px);
  min-height: 46px;
  padding: 6px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.32em;
  border: 1px solid #ffe4a9;
  border-radius: 9px;
  background: linear-gradient(180deg, #ffdf9b 0%, #f9c269 50%, #f5b849 79%, #ffe0a0 100%);
  box-shadow: inset 0 0 9px #fff4cd99, 0 3px 20px #e5a74938;
  text-decoration: none;
  color: #052954;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(24px, 6vw, 31px);
  font-weight: 800;
  letter-spacing: 0.035em;
  text-shadow: 0 1px 0 #fff1b8;
  transition: filter 160ms, box-shadow 160ms;
}
.join-button svg { width: 0.45em; height: 0.68em; stroke: currentColor; stroke-width: 2.4; fill: none; }
.join-button:hover { filter: brightness(1.08); box-shadow: inset 0 0 9px #fff4cd99, 0 3px 25px #e5a74965; }
.join-button:active { filter: brightness(0.95); }
.poster-details { display: grid; gap: clamp(22px, 3svh, 32px); }
.poster-section-title { display: flex; align-items: center; gap: 16px; margin: 0; font-size: clamp(24px, 5.8vw, 31px); line-height: 1.3; font-weight: 700; }
.poster-section-title::after { content: ""; flex: 1; height: 1px; background: #a8c6e044; }
.rules-list { list-style: none; padding: 0; margin: 5px 0 0; }
.rule { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px 0; border-bottom: 1px solid #a8c6e02c; }
.rule:last-child { padding-bottom: 0; border-bottom: 0; }
.rule-number { font-family: Georgia, "Times New Roman", serif; font-size: 31px; font-style: italic; font-weight: 700; line-height: 1.1; }
.rule-copy h3 { margin: 0 0 2px; color: #f4d793; font-size: 14px; line-height: 1.5; }
.rule-copy p { margin: 0; color: #d9e2ee; font-size: 13px; line-height: 1.8; }
.rule-copy mark { padding: 0; background: none; color: #f5d58b; font-weight: 600; }
.about p { margin: 10px 0 0; color: #d9e2ee; font-size: 13px; line-height: 1.85; text-align: justify; }
@media (max-width: 859px) {
  .poster { padding-top: 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); gap: 14px; }
  .poster-layout { gap: 18px; }
  .poster-details { gap: 18px; }
  .poster-kicker { margin-top: 4px; }
  .commission { margin-top: 7px; }
  .poster-tagline { margin-top: 6px; }
  .rule { padding-top: 8px; padding-bottom: 8px; }
  .about p { margin-top: 8px; }
}
@media (min-width: 860px) {
  .poster { max-width: 1200px; padding: clamp(24px, 4svh, 44px) clamp(32px, 4vw, 56px); gap: clamp(24px, 4svh, 44px); }
  .poster-brand .wordmark svg { width: 31px; height: 32px; }
  .poster-brand .wordmark span { font-size: 24px; }
  .poster-layout { display: grid; grid-template-columns: 1.15fr 1fr; align-items: stretch; gap: clamp(42px, 5vw, 72px); }
  .poster-hero { justify-content: space-between; gap: 8px; }
  .poster-title { font-size: clamp(43px, 5.2vw, 65px); }
  .poster-kicker { font-size: clamp(14px, 1.55vw, 19px); }
  .commission { margin-top: 5px; font-size: clamp(18px, 2.1vw, 26px); }
  .commission strong { font-size: clamp(43px, 5vw, 62px); }
  .poster-benefits { font-size: clamp(21px, 2.4vw, 29px); }
  .poster-tagline { font-size: clamp(13px, 1.45vw, 17px); margin-top: 2px; }
  .market-art { width: 100%; margin: 0; }
  .join-button { min-height: 50px; font-size: 30px; }
  .poster-details { align-content: space-between; gap: 32px; }
  .poster-section-title { font-size: clamp(26px, 2.6vw, 31px); }
  .rule { grid-template-columns: 43px minmax(0, 1fr); gap: 12px; padding: 14px 0; }
  .rule-number { font-size: 34px; }
  .rule-copy h3, .rule-copy p, .about p { font-size: clamp(13px, 1.25vw, 15px); }
  .about p { line-height: 1.95; }
}
.notice-dialog {
  width: min(380px, calc(100% - 40px));
  padding: 32px;
  border: 1px solid #d3b27850;
  border-radius: 18px;
  background: #0a2445;
  color: var(--text);
  text-align: center;
  box-shadow: 0 20px 90px #0008;
}
.notice-dialog::backdrop { background: #001225a8; backdrop-filter: blur(5px); }
.notice-icon { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 18px; border: 1px solid #f3d29a55; border-radius: 50%; color: var(--gold); font-family: Georgia, serif; font-size: 25px; }
.notice-dialog h1 { font-size: 20px; font-weight: 600; }
.notice-dialog p { color: #b7c4d7; font-size: 14px; margin-bottom: 26px; }
.notice-dialog .gold-button { width: 100%; }

.config-page { min-height: 100vh; background: radial-gradient(ellipse at 76% -10%, #0b325a 0, transparent 55%), #06182e; color: var(--text); }
.config-shell { max-width: 1040px; min-height: 100vh; padding: 0 48px; margin: 0 auto; display: flex; flex-direction: column; }
.config-header { min-height: 104px; border-bottom: 1px solid #f4dfb415; display: flex; align-items: center; justify-content: space-between; }
.wordmark { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.wordmark span { font-size: 24px; font-weight: 500; letter-spacing: 2px; }
.header-label { color: #8d9fb8; font-size: 12px; letter-spacing: 2px; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.logout-button { border: 0; padding: 6px 0; background: transparent; color: #adbed4; font-size: 12px; cursor: pointer; }
.logout-button:hover { color: var(--gold); }
.logout-button:disabled { opacity: 0.5; cursor: wait; }
.config-main { width: 100%; max-width: 600px; padding: 68px 0 72px; margin: 0 auto; flex: 1; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--gold); font-size: 10px; font-weight: 500; letter-spacing: 2.2px; }
.eyebrow span { width: 18px; height: 1px; background: #e4be7d; }
.config-main > h1 { font-family: "Songti SC", "STSong", "SimSun", serif; font-weight: 600; font-size: 34px; letter-spacing: 1px; line-height: 1.5; margin: 15px 0 7px; }
.config-intro { margin: 0 0 34px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.settings-card { padding: 30px; border: 1px solid #afc2df22; border-radius: 16px; background: linear-gradient(145deg, #ffffff07, #ffffff02); box-shadow: 0 18px 60px #00000010; }
.card-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 29px; }
.link-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #f3d29a22; border-radius: 12px; background: #e8c89309; color: var(--gold); flex-shrink: 0; }
.card-heading h2 { font-size: 16px; font-weight: 600; margin: 0 0 5px; }
.card-heading p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.7; }
#config-form label { display: block; margin-bottom: 10px; font-size: 13px; color: #d5ddeb; }
#config-form label span { color: var(--gold); margin-left: 3px; }
#join-url { display: block; width: 100%; height: 50px; padding: 0 15px; border: 1px solid #a8bfdf32; border-radius: 8px; background: #04152bc4; color: #edf1f7; font-size: 14px; transition: border-color 150ms; }
#join-url::placeholder { color: #5e7594; }
#join-url:focus { outline: none; border-color: #e6bd7c; box-shadow: 0 0 0 3px #e6bd7c10; }
.field-help { font-size: 11px; color: #8094b0; line-height: 1.8; margin: 10px 0 25px; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.gold-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 23px; min-height: 44px; border: 1px solid #ffe5ad; border-radius: 7px; background: linear-gradient(110deg, #f6dca6, #e4b56d); color: #102644; font-size: 13px; font-weight: 600; cursor: pointer; transition: filter 150ms; }
.gold-button:hover { filter: brightness(1.08); }
.gold-button:disabled { opacity: 0.55; cursor: wait; }
.preview-link { display: inline-flex; align-items: center; gap: 7px; color: #b8c8dc; font-size: 12px; text-decoration: none; white-space: nowrap; }
.preview-link:hover { color: var(--gold); }
.form-message { margin: 15px 0 0; font-size: 12px; line-height: 1.8; min-height: 22px; color: #99afc9; overflow-wrap: anywhere; }
.form-message:empty { display: none; }
.form-message[data-kind="success"] { color: #9dd7ba; }
.form-message[data-kind="error"] { color: #ffb2a6; }
.current-setting { margin-top: 22px; padding: 21px 24px; border: 1px solid #9fb5d21a; border-radius: 12px; background: #02112533; }
.current-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.current-heading h2 { margin: 0; font-size: 12px; font-weight: 500; color: #96a9c2; }
.status-badge { font-size: 10px; color: #a0aec0; background: #acbdd510; border-radius: 4px; padding: 4px 7px; white-space: nowrap; }
.status-badge[data-ready="true"] { color: #9dd7ba; background: #83cda012; }
#current-url { margin: 12px 0 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; color: #bdcce0; overflow-wrap: anywhere; line-height: 1.8; }
#current-url a { text-decoration: none; }
#current-url a:hover { text-decoration: underline; color: var(--gold); }
.config-footnote { margin: 18px 0 0; font-size: 11px; color: #687f9d; text-align: center; line-height: 1.8; }
.config-footer { min-height: 70px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #f4dfb411; color: #617893; font-size: 10px; letter-spacing: 0.5px; gap: 20px; }
@media (max-width: 600px) {
  .config-shell { padding: 0 24px; }
  .config-header { min-height: 82px; }
  .config-main { padding: 46px 0 50px; }
  .config-main > h1 { font-size: clamp(25px, 6.3vw, 32px); letter-spacing: 0; }
  .config-intro { margin-bottom: 28px; font-size: 13px; }
  .settings-card { padding: 23px 20px; border-radius: 13px; }
  .current-setting { padding: 18px 20px; }
  .card-heading { gap: 11px; }
  .field-help { font-size: 10px; }
  .gold-button { padding-inline: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.unlock-main { max-width: 480px; }
#unlock-form label { display: block; margin-bottom: 10px; color: #d5ddeb; font-size: 13px; }
#admin-key { display: block; width: 100%; height: 50px; padding: 0 15px; border: 1px solid #a8bfdf32; border-radius: 8px; background: #04152bc4; color: #edf1f7; font-size: 16px; }
#admin-key::placeholder { color: #5e7594; font-size: 14px; }
#admin-key:focus { outline: none; border-color: #e6bd7c; box-shadow: 0 0 0 3px #e6bd7c10; }
.unlock-button { width: 100%; }
.unlock-back { display: flex; justify-content: center; margin-top: 24px; }
