:root {
  color-scheme: dark;
  --bg: #101722;
  --surface: #161f2a;
  --ink: #f2f1ee;
  --muted: #b3beca;
  --line: #394654;
  --accent: #ffcb5b;
  --accent-ink: #25190a;
  --radius: 10px;
  --display: "Arial Black", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --body: Inter, "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 15px/1.65 var(--body); }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-underline-offset: .28em; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { width: min(1200px, calc(100% - 72px)); margin-inline: auto; }
.top, .footer, .contract { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.top { min-height: 78px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: .13em; }
.brand img { object-fit: cover; border-radius: var(--radius); }
.notice { margin: 0; color: var(--accent); font-weight: 750; }
.top nav, .footer div, .contract > div:last-child { display: flex; flex-wrap: wrap; gap: 16px; }
.top a, .footer a, .contract a { text-decoration: none; color: var(--muted); white-space: nowrap; }
.top a:hover, .footer a:hover, .contract a:hover { color: var(--ink); text-decoration: underline; }
.mast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr);
  grid-template-areas: "intro art" "work art";
  gap: 22px 46px;
  margin: 38px 0 0;
  align-items: stretch;
}
.intro { grid-area: intro; }
.chain { margin: 0 0 9px; color: var(--muted); font-size: 12px; letter-spacing: .1em; }
h1, h2, p, dl, dd { margin: 0; }
h1 { font: 900 clamp(40px, 6.7vw, 94px)/1.1 var(--display); letter-spacing: -.075em; }
.offer { margin-top: 14px; font-size: clamp(16px, 1.6vw, 22px); }
.opening { margin-top: 13px; color: var(--muted); }
.opening time { color: var(--ink); font-weight: 750; }
.art { position: relative; min-width: 0; grid-area: art; overflow: hidden; background: var(--surface); border-radius: var(--radius); }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.workspace {
  grid-area: work;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.workspace-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px; }
.workspace-head h2 { font-size: 20px; line-height: 1.25; }
#status { color: var(--muted); font-size: 13px; margin: 9px 0; min-height: 22px; }
.stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 13px 0; border-block: 1px solid var(--line); }
.stats dt { color: var(--muted); font-size: 12px; }
.stats dd { font-size: clamp(14px, 1.45vw, 19px); font-weight: 800; line-height: 1.45; overflow-wrap: anywhere; }
.actions, .ref-row { display: flex; gap: 9px; margin-top: 10px; }
.quantity { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.quantity label, #referral label { font-size: 13px; color: var(--muted); }
button, input { min-height: 42px; border: 1px solid var(--line); border-radius: calc(var(--radius) / 2); }
button { padding: 6px 13px; background: transparent; color: var(--ink); font-weight: 750; cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .68; cursor: default; }
#claim { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); flex: 1; }
input { background: var(--bg); color: var(--ink); padding: 5px 10px; }
#qty { width: 88px; }
#referrer { flex: 1; min-width: 0; }
#referral { margin-top: 13px; }
.detail { color: var(--accent); margin-top: 8px; font-size: 13px; }
.security { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 12px; margin-top: 14px; }
.security span::before { content: "✓"; color: var(--accent); margin-right: .36em; font-weight: bold; }
.rules { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 24px; margin-top: 32px; border-top: 1px solid var(--line); }
.rules article { padding-block: 19px; }
.rules h2 { font-size: 18px; line-height: 1.3; margin-bottom: 7px; }
.rules p { color: var(--muted); font-size: 14px; }
.contract { margin-top: 10px; border-top: 1px solid var(--line); padding: 16px 0; font-size: 13px; }
.contract code { display: block; color: var(--muted); overflow-wrap: anywhere; }
.footer { min-height: 62px; border-top: 1px solid var(--line); font-size: 13px; }

.shift h1 { color: var(--accent); }
.shift .art { border: 1px solid var(--line); }
.shift .mast { grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); }
.calendar {
  color-scheme: light;
  --bg: #eef4ff;
  --surface: #fff;
  --ink: #172756;
  --muted: #415781;
  --line: #b5c3df;
  --accent: #174bd8;
  --accent-ink: #fff;
  --radius: 26px;
}
.calendar .mast { grid-template-areas: "art intro" "art work"; gap: 20px 38px; }
.calendar .art { border: 6px solid #d5e3ff; }
.calendar .workspace { box-shadow: 0 4px 0 #d5e3ff; }
.calendar h1 { letter-spacing: -.035em; color: #174bd8; }
.ration {
  color-scheme: light;
  --bg: #f3ecde;
  --surface: #f9f3e9;
  --ink: #213529;
  --muted: #4c5a4c;
  --line: #a5a88d;
  --accent: #a64318;
  --accent-ink: #fff;
  --radius: 2px;
}
.ration .mast {
  grid-template-columns: minmax(0,1fr) minmax(300px,.76fr);
  grid-template-areas: "intro intro" "art work";
  margin-top: 23px;
  gap: 17px 30px;
}
.ration .intro { border-bottom: 4px solid var(--ink); padding-bottom: 10px; }
.ration .intro h1 { font-size: clamp(46px, 7.2vw, 105px); }
.ration .art img { object-position: 50% 50%; }
.ration .workspace { border: 2px solid var(--ink); }
.ration .chain { float: right; }
.canteen {
  --bg: #210e15;
  --surface: #321820;
  --ink: #fff2da;
  --muted: #e0bbaa;
  --line: #6f4246;
  --accent: #ff9c83;
  --accent-ink: #370d14;
  --radius: 14px;
}
.canteen .mast { gap: 22px 34px; grid-template-areas: "intro art" "work art"; }
.canteen h1 { font-family: "Noto Serif CJK SC", "SimSun", Georgia, serif; letter-spacing: .01em; }
.canteen .art { border-radius: 120px 120px 15px 15px; }
.canteen .workspace { border-top: 3px solid #c8695d; }

@media (max-width: 850px) {
  .shell { width: calc(100% - 36px); }
  .mast, .shift .mast, .calendar .mast, .ration .mast, .canteen .mast { gap: 16px; grid-template-columns: 1fr 1fr; }
  .rules { gap: 16px; }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 32px); }
  .top { padding: 12px 0; gap: 5px 12px; flex-wrap: wrap; min-height: 0; }
  .top nav { margin-left: auto; font-size: 13px; gap: 11px; }
  .notice { order: -1; flex: 0 0 100%; font-size: 13px; line-height: 1.45; padding-bottom: 5px; }
  .mast, .shift .mast, .calendar .mast, .ration .mast, .canteen .mast {
    margin-top: 22px; grid-template-columns: minmax(0,1fr); grid-template-areas: "intro" "art" "work";
  }
  .art { height: 224px; }
  .canteen .art { border-radius: 90px 90px 10px 10px; }
  .ration .art img { object-position: center; }
  .workspace { padding: 15px; }
  .rules { grid-template-columns: 1fr; gap: 0; margin-top: 21px; }
  .rules article + article { border-top: 1px solid var(--line); }
  .contract { align-items: flex-start; flex-direction: column; gap: 9px; }
  .contract > div { max-width: 100%; }
}
