:root {
  color-scheme: light;
  --bg: #f5f2eb; --surface: #fffefb; --surface-strong: #edf1fb;
  --text: #15263f; --muted: #627080; --line: #dfe3e8;
  --accent: #3155db; --accent-dark: #2446c0; --gold: #b99752;
  --green: #257350; --green-soft: #edf6f0;
  --amber: #986114; --amber-soft: #fff6e4;
  --red: #ad4249; --red-soft: #fcf0f0;
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--bg); line-height: 1.6; }
h1,h2,h3,p { margin: 0; }
button,input,select { font: inherit; }
a { color: inherit; }
button,a,input,select { -webkit-tap-highlight-color: transparent; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .4; }
.skip-link { position: fixed; top: -90px; left: 20px; padding: 12px 20px; background: var(--text); color: white; z-index: 60; }
.skip-link:focus { top: 12px; }
.topbar { display: flex; align-items: center; gap: 32px; min-height: 88px; padding: 16px max(28px,calc((100vw - 1264px)/2)); border-bottom: 1px solid #deded9; background: var(--surface); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 17px; letter-spacing: .03em; font-weight: 800; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 44px; background: var(--accent); color: white; border-radius: 8px; font-size: 27px; line-height: 1; }
.brand small { display: block; font-size: 10px; font-weight: 500; letter-spacing: .15em; color: var(--muted); margin-top: 1px; }
.portal-nav { display: flex; align-items: center; gap: 26px; margin-left: 32px; }
.portal-nav a { position: relative; padding: 12px 0; text-decoration: none; font-size: 14px; color: var(--muted); font-weight: 600; }
.portal-nav a[aria-current] { color: var(--text); }
.portal-nav a[aria-current]::after { content: ""; position: absolute; bottom: 2px; left: 0; width: 24px; height: 3px; background: var(--accent); }
.portal-nav a:hover { color: var(--accent); }
.top-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-left: auto; }
.mode-badge { color: var(--muted); font-size: 12px; white-space: nowrap; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 12px; min-height: 42px; padding: 8px 16px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 7px; font-weight: 600; font-size: 13px; cursor: pointer; transition: background-color .15s,border-color .15s; }
.button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.primary:hover:not(:disabled) { background: var(--accent-dark); color: white; }
.button.secondary { background: var(--surface-strong); border-color: transparent; }
.button.ghost { background: transparent; }
.button.danger { color: var(--red); border-color: #eccfd1; background: #fffafa; }
.button.wide { width: 100%; }
.shell { max-width: 1264px; width: calc(100% - 56px); margin: 0 auto 64px; }
.calendar-intro { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 48px 0 36px; }
.eyebrow { font-size: 10px; letter-spacing: .17em; font-weight: 750; line-height: 1.7; color: var(--muted); }
.section-index { color: #80642e; display: inline-block; margin-right: 12px; padding-right: 14px; border-right: 1px solid var(--gold); }
.calendar-intro h1 { margin-top: 15px; font-size: clamp(26px,3.2vw,40px); letter-spacing: -.045em; line-height: 1.3; font-weight: 700; }
.calendar-intro > div > p:last-child { color: var(--muted); font-size: 14px; margin-top: 14px; }
.location-note { display: flex; gap: 16px; padding-left: 30px; border-left: 1px solid #d7d5cc; }
.location-mark { font-size: 27px; font-weight: 400; color: var(--gold); line-height: 1.2; }
.location-note strong { font-size: 18px; font-weight: 600; display: block; }
.location-note span:not(.location-mark) { display: block; font-size: 12px; color: var(--muted); }
.location-note .timezone-badge { margin-top: 8px; font-size: 11px; }
.layout { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 28px; align-items: start; }
.calendar-area { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 25px #15263f04; overflow: hidden; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 28px 20px; }
.section-head h2 { font-size: 21px; letter-spacing: -.03em; line-height: 1.5; }
.section-head p:not(.eyebrow) { font-size: 13px; color: var(--muted); margin-top: 6px; }
.section-head .eyebrow { font-size: 9px; margin-bottom: 3px; color: #80642e; }
.section-head .button.ghost { border: 0; padding-right: 0; color: var(--accent); }
.calendar-toolbar { padding: 16px 28px; display: flex; gap: 20px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); background: #f7f8fb; }
.month-picker { display: flex; align-items: center; gap: 16px; min-width: 0; }
.month-picker > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.month-picker select { width: 190px; min-width: 0; font-size: 16px; font-weight: 650; border-color: #ccd4e1; }
.month-navigation { display: flex; gap: 8px; }
.icon-button { padding: 0; min-width: 40px; width: 40px; font-family: Arial,sans-serif; font-size: 24px; line-height: 1; }
.calendar-stack { padding: 0 28px; }
.month-card { min-width: 0; }
.month-title { padding: 18px 0 14px; color: var(--text); font-size: 16px; font-weight: 650; }
.weekday-row,.month-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.weekday-row { margin-bottom: 4px; }
.weekday-row span { padding: 8px 0 12px; font-size: 11px; color: var(--muted); text-align: center; }
.weekday-row span:first-child,.weekday-row span:last-child { color: #98968f; }
.month-grid { gap: 5px; }
.day-cell { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; min-height: 80px; padding: 10px 12px 9px; border: 1px solid transparent; background: #f7f8f9; color: #77828f; border-radius: 6px; text-align: left; line-height: 1.3; cursor: default; }
.day-cell.empty { background: transparent; }
.day-cell.has-slot { color: var(--text); }
.day-cell.can-select { cursor: pointer; }
.day-cell.can-select:hover { border-color: #9caad8; }
.day-cell.available { background: var(--green-soft); color: #236344; }
.day-cell.almost_full { background: var(--amber-soft); color: #87530c; }
.day-cell.full { background: var(--red-soft); color: #96353c; }
.day-cell.selected { box-shadow: inset 0 0 0 2px var(--accent); background: #edf1ff; color: var(--accent-dark); }
.day-cell.is-today .day-number { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.day-number { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.day-meta { font-size: 11px; font-weight: 500; white-space: nowrap; margin-top: 10px; }
.calendar-footer { padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 17px; font-size: 11px; color: var(--muted); }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin: 0 6px 1px 0; }
.dot.green { background: var(--green); }.dot.amber { background: var(--amber); }.dot.red { background: var(--red); }
.range-label { font-size: 11px; color: var(--muted); }
.sync-panel { padding: 12px 28px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); line-height: 1.8; }
.sync-panel .label { font-weight: 600; margin-right: 12px; }.sync-panel strong { font-weight: 400; }
.detail-panel { min-width: 0; }
.contact-panel { padding: 30px 26px 24px; background: var(--text); border-radius: 12px; color: white; }
.contact-panel .eyebrow { color: #d0b67f; font-size: 9px; }
.contact-panel h2 { font-size: 27px; font-weight: 600; line-height: 1.5; letter-spacing: -.02em; margin: 15px 0 12px; }
.contact-panel > p:not(.eyebrow) { color: #c2cad6; font-size: 12px; line-height: 1.8; }
.booking-steps { list-style: none; padding: 0; margin: 26px 0; }
.booking-steps li { display: flex; gap: 16px; margin-top: 22px; }
.booking-steps li > span { color: #d0b67f; font-size: 12px; padding-top: 3px; }
.booking-steps strong { font-size: 13px; font-weight: 600; }
.booking-steps p { margin-top: 4px; color: #aebace; font-size: 11px; line-height: 1.8; }
.contact-account { border-top: 1px solid #ffffff28; padding-top: 20px; }
.contact-account span { display: block; color: #bdc8d7; font-size: 10px; }
.contact-account strong { display: block; margin: 8px 0; color: white; font-size: 22px; letter-spacing: .05em; font-weight: 550; }
.contact-panel .contact-note { padding-top: 22px; margin-top: 22px; border-top: 1px solid #ffffff28; font-size: 10px !important; color: #aebace !important; }
#adminDetailContent { border: 1px solid var(--line); border-radius: 12px; padding: 24px; background: var(--surface); }
#adminDetailContent .section-head { padding: 0 0 18px; }
#adminDetailContent .section-head h2 { font-size: 18px; }
.slot-list,.student-fields,.booking-form { display: grid; gap: 14px; }
.slot-card { border-left: 3px solid var(--line); padding: 12px 14px; background: #f7f8fa; border-radius: 0 6px 6px 0; }
.slot-card.available { border-color: var(--green); }.slot-card.almost_full { border-color: var(--amber); }.slot-card.full { border-color: var(--red); }
.slot-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.slot-time { font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; }
.pill { border-radius: 4px; font-size: 10px; padding: 3px 7px; }
.pill.available { background: var(--green-soft); color: var(--green); }.pill.almost_full { background: var(--amber-soft); color: var(--amber); }.pill.full { background: var(--red-soft); color: var(--red); }
.slot-sub { font-size: 11px; color: var(--muted); margin-top: 8px; }
.booking-form { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 20px; }.booking-form h3 { font-size: 17px; }
label { display: grid; gap: 7px; font-weight: 550; color: var(--text); font-size: 12px; }
input,select { width: 100%; min-height: 42px; padding: 9px 11px; color: var(--text); border: 1px solid #d2d8e2; border-radius: 6px; background: #fff; font-size: 13px; }
input:focus,select:focus { border-color: var(--accent); }
.check-row { grid-template-columns: 18px minmax(0,1fr); align-items: center; font-size: 12px; }
.check-row input { min-height: 18px; width: 18px; margin: 0; accent-color: var(--accent); }
.login-panel { padding: 20px 24px; margin-bottom: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.login-form { display: grid; grid-template-columns: minmax(180px,340px) auto; justify-content: start; align-items: end; gap: 14px; }
.inline-message { font-size: 12px; color: var(--muted); }.inline-message:empty { display: none; }
.inline-message.error { color: var(--red); }.inline-message.success { color: var(--green); }
.page-notice { padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 20px; }
.admin-bookings { margin-top: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.booking-list { padding: 0 24px 24px; }
.booking-row { display: grid; grid-template-columns: minmax(120px,.9fr) minmax(120px,1fr) minmax(140px,1fr) minmax(270px,1.7fr); gap: 20px; border-top: 1px solid var(--line); padding: 20px 0; align-items: center; }
.booking-row > div { min-width: 0; }.booking-row strong { display: block; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }.booking-row span { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.secret-text { font-family: Consolas,monospace; overflow-wrap: anywhere; }
.booking-actions { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; align-items: end; }.booking-actions .button { padding: 8px 10px; font-size: 11px; }.move-field { min-width: 0; }.move-field select { min-width: 0; }
.empty-state,.month-empty-note { padding: 22px 0; color: var(--muted); font-size: 12px; }.empty-state { display: grid; gap: 7px; }.empty-state strong { color: var(--text); }
.site-footer { max-width: 1264px; width: calc(100% - 56px); margin: 0 auto; padding: 22px 0 32px; display: flex; align-items: center; gap: 24px; border-top: 1px solid #d7d5cc; font-size: 11px; color: var(--muted); }
.site-footer > span { font-size: 11px; letter-spacing: .06em; font-weight: 700; color: var(--text); }.site-footer a { text-decoration: none; margin-left: auto; }
@media (min-width:1500px) { .day-cell { min-height: 86px; } }
@media (max-width:1100px) { .portal-nav { margin-left: 0; gap: 18px; }.topbar { gap: 24px; }.mode-badge { display: none; }.layout { grid-template-columns: minmax(0,1fr) 285px; gap: 20px; }.section-head,.calendar-toolbar { padding-left: 20px; padding-right: 20px; }.calendar-stack { padding: 0 20px; }.calendar-footer { padding: 20px; }.day-cell { padding: 9px; min-height: 76px; }.booking-row { grid-template-columns: 1fr 1fr; } }
@media (max-width:840px) { .topbar { flex-wrap: wrap; padding: 16px 24px; gap: 14px; }.portal-nav { order: 3; width: 100%; gap: 26px; }.portal-nav a { padding: 5px 0 8px; }.calendar-intro { padding: 32px 0 28px; }.calendar-intro h1 { font-size: 29px; }.location-note { display: none; }.layout { grid-template-columns: 1fr; }.contact-panel { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }.contact-panel .eyebrow,.contact-panel h2,.contact-panel > p:first-of-type { grid-column: 1; }.booking-steps { grid-column: 2; grid-row: 1 / span 4; margin: 0; }.booking-steps li:first-child { margin-top: 0; }.contact-panel .contact-account,.contact-panel .contact-note { grid-column: 1 / -1; }.day-cell { min-height: 88px; }.site-footer { flex-wrap: wrap; } }
@media (max-width:520px) { .topbar { padding: 14px 18px; gap: 12px; }.brand { font-size: 14px; gap: 9px; }.brand-mark { width: 34px; height: 38px; font-size: 24px; }.brand small { font-size: 8px; }.top-actions { gap: 5px; }.top-actions .button { padding: 7px 10px; min-height: 36px; font-size: 11px; }.portal-nav a { font-size: 12px; }.shell { width: calc(100% - 32px); margin-bottom: 40px; }.calendar-intro h1 { font-size: 25px; }.calendar-intro > div > p:last-child { font-size: 12px; }.calendar-intro { padding-top: 27px; }.eyebrow { font-size: 9px; }.section-head { padding: 20px 16px 16px; gap: 10px; }.section-head h2 { font-size: 20px; }.section-head .button { font-size: 11px; }.calendar-toolbar { padding: 12px 14px; gap: 8px; }.month-picker { gap: 8px; }.month-picker > span { display: none; }.month-picker select { width: 160px; font-size: 15px; }.month-navigation { gap: 6px; }.icon-button { width: 34px; min-width: 34px; min-height: 40px; }.calendar-stack { padding: 0 12px; }.month-title { font-size: 14px; padding: 14px 2px 8px; }.weekday-row span { font-size: 10px; }.month-grid { gap: 3px; }.day-cell { padding: 7px 5px; min-height: 63px; border-radius: 4px; }.day-number { font-size: 14px; }.day-meta { font-size: 9px; margin-top: 8px; letter-spacing: -.025em; }.calendar-footer { padding: 18px 15px; gap: 10px; }.legend { gap: 12px; font-size: 10px; }.range-label { font-size: 10px; }.contact-panel { display: block; padding: 25px; }.booking-steps { margin: 24px 0; }.contact-panel h2 { font-size: 26px; }.contact-panel h2 br { display: none; }.booking-row { grid-template-columns: 1fr; gap: 13px; }.booking-actions { grid-template-columns: minmax(0,1fr) auto auto; }.booking-list { padding: 0 18px 18px; }.login-form { grid-template-columns: 1fr; }.site-footer { width: calc(100% - 32px); gap: 10px; font-size: 10px; }.site-footer p { display: none; }.page-notice { align-items: flex-start; flex-direction: column; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { transition: none !important; scroll-behavior: auto !important; } }
