:root { box-sizing: border-box; }
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #F4F4F2;
  color: #141414;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(92px + var(--sai-bottom, env(safe-area-inset-bottom, 0px)));
}
body.no-tabs { padding-bottom: var(--sai-bottom, env(safe-area-inset-bottom, 0px)); }
select, input, textarea { color-scheme: light; font-family: inherit; }
button { -webkit-tap-highlight-color: transparent; }
/* Plainer shapes than the original tool: headings use the body font, pills become small rounded tags. */
.disp { font-family: inherit !important; letter-spacing: 0 !important; }
.rounded-full { border-radius: 6px !important; }
.rounded-2xl { border-radius: 12px !important; }
.round { border-radius: 9999px !important; }
.tracking-widest { letter-spacing: .04em !important; }

/* Login cover: the picture fills the screen, the line and the code box sit on its paper part. */
body.cover-body { background: #EAE2D5; }
.cover { position: relative; max-width: 480px; height: 100vh; height: 100dvh; min-height: 560px; margin: 0 auto;
  background: url(/cover.jpg) 50% 100% / cover no-repeat #EAE2D5; font-family: "LXGW WenKai TC", "Noto Sans TC", sans-serif; color: #2B2A27; }
.cover-bottom { position: absolute; left: 28px; right: 28px; bottom: calc(28px + var(--sai-bottom, env(safe-area-inset-bottom, 0px))); }
/* The paper starts 60% down the picture; the line sits just under that edge, right of the ladder. */
.cover-line { position: absolute; top: 62%; left: 46%; margin: 0; font-size: 25px; font-weight: 400; line-height: 1.55; letter-spacing: 1px; white-space: nowrap; }
.cover-line .wei { font-family: "Klee One", "LXGW WenKai TC", serif; }
.cover-by { margin-top: 8px; text-align: right; font-size: 17px; color: #5F5A52; }
.cover-input { width: 100%; height: 48px; border: 1.5px solid #2B2A27; border-radius: 10px; background: rgba(250,246,238,.88);
  padding: 0 14px; font-size: 18px; color: #2B2A27; outline: none; letter-spacing: .2em; }
.cover-input::placeholder { letter-spacing: 0; color: #8A857C; font-size: 16px; }
.cover-btn { margin-top: 12px; border: 0; width: 100%; height: 48px; border-radius: 10px; background: #2B2A27; color: #F6F0E4; font-size: 18px; }
.cover-btn:disabled { opacity: .5; }
.cover-err { margin-top: 8px; font-size: 14px; color: #B4452F; font-weight: 600; }
@media (max-height: 720px) {
  .cover-line { top: 61%; font-size: 20px; line-height: 1.4; }
  .cover-bottom { bottom: calc(16px + var(--sai-bottom, env(safe-area-inset-bottom, 0px))); }
  .cover-by { margin-top: 2px; }
  .cover-by { font-size: 15px; }
}
.cover-signup { display: block; margin-top: 10px; text-align: center; font-size: 13px; color: #4A4740; text-decoration: underline; }

/* Page header: light, like a phone app. A small line on top, a big bold title under it. */
.hero { background: transparent; color: #141414; padding: calc(var(--sai-top, env(safe-area-inset-top, 0px)) + 18px) 0 10px; }
/* Phone 首頁: the whole header (greeting + week strip) sticks to the top while the page scrolls. */
.hero.hero-pin { position: sticky; top: 0; z-index: 30; background: var(--c-bg, #F4F4F2); padding-bottom: 4px; margin-bottom: -8px; }
/* (Shiang 2026-11-30) the grey handle sits at most ~0.3cm above the class card. */
html.month-open .hero.hero-pin { position: relative; z-index: auto; }
.hero-who { font-size: 13px; font-weight: 500; color: #737373; }
.hero-title { margin-top: 2px; font-size: 28px; font-weight: 900; letter-spacing: -.01em; color: #141414; }
/* 首頁's 「Hi，名字」 stays on one line next to the three round buttons: a long name gets smaller, then cut. */
.hero-greet { font-size: clamp(20px, 6.6vw, 28px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-greet-long { font-size: clamp(17px, 5.4vw, 28px); }
.hero-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px;
  background: #fff; border: 1px solid #E9E9E6; color: #141414; }
.hero-slogan { text-align: center; font-size: 14px; font-weight: 500; letter-spacing: .2em; color: #737373; }
.hero-rule { height: 1px; background: #E9E9E6; margin: 12px 0 10px; }
.hero-stats { display: flex; gap: 10px; margin-top: 12px; }
.hero-stats div { flex: 1; padding: 10px 12px; border-radius: 18px; background: #fff; font-size: 12px; color: #737373; }
.hero-stats b { display: block; font-size: 22px; line-height: 1.15; font-weight: 900; color: #141414; }
/* This week's days: white capsules, today in black with a lime dot. */
.week-strip { display: flex; gap: 6px; margin-top: 16px; }
.week-strip > div { flex: 1; text-align: center; padding: 7px 0 8px; border-radius: 999px; font-size: 11px; color: #737373;
  background: #fff; border: 1px solid #E9E9E6; }
.week-strip b { display: block; font-size: 17px; margin-top: 1px; color: #141414; }
.week-strip .off, .week-strip .off b { color: #C8442F; }
.week-strip .today { background: #141414; border-color: #141414; color: #BDBDBD; }
.week-strip .today b { color: #fff; }
.week-strip .today::after { content: ""; display: block; width: 5px; height: 5px; margin: 2px auto 0; border-radius: 50%; background: #D4F25A; }
.week-strip .today.off b { color: #fff; }
.week-strip i { display: block; font-style: normal; font-size: 9px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Strip days are buttons (tap = that day's classes); a dot under a day with classes. */
.week-strip > button { flex: 1; text-align: center; padding: 7px 0 8px; border-radius: 999px; font-size: 11px; color: #737373;
  background: #fff; border: 1px solid #E9E9E6; position: relative; }
.week-strip > button.has:not(.today)::after { content: ""; display: block; width: 5px; height: 5px; margin: 2px auto 0; border-radius: 50%; background: #141414; }
.week-strip > button:not(.has):not(.today)::after { content: ""; display: block; height: 5px; margin-top: 2px; }
/* Pull the week strip down for the whole month, push it up to fold it. The bar
   under it shows it can be pulled (and is a button for a mouse). */
.pull-zone { touch-action: pan-x; user-select: none; -webkit-user-select: none; }
.pull-slot { position: relative; }
.pull-zone.is-over { position: absolute; top: 0; left: 0; right: 0; z-index: 41; }
.pull-zone.is-over .pull-box { box-shadow: 0 12px 32px rgba(0,0,0,.18); }
@media (max-width: 899px) { .pull-zone.is-over { padding-bottom: 96px; } }
.month-side { margin: 4px 0 8px; }
.month-side-list.is-shut, .month-side-more.is-shut { display: none; }
/* Each class to book is one fixed-size row; four show, the rest scroll inside the box. */
.month-side-row { height: 52px; flex-shrink: 0; }
.month-side-list { max-height: 208px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.pull-dim { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.45); transition: opacity .3s; }
.pull-zone.is-over .pull-bar em { color: #fff; }
.pull-zone.is-over .pull-bar span { background: #fff; }
.pull-box { position: relative; overflow: hidden; margin-top: 16px; border-radius: 22px; }
.pull-month { position: absolute; top: 0; left: 0; right: 0; }
.pull-strip.week-strip { position: relative; margin-top: 0; background: #F4F4F2; }
.pull-zone.is-open { touch-action: auto; }
.pull-bar { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 8px 0 2px; touch-action: none; }
.pull-zone.is-open .pull-bar { padding: 12px 0 8px; }
.pull-bar em { font-style: normal; font-size: 11px; color: #737373; }
.pull-bar span { display: block; width: 40px; height: 5px; border-radius: 999px; background: #CFCFCB; }
.month-drop { box-shadow: 0 1px 2px rgba(0,0,0,.04); }
@keyframes drop-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.day-sheet { animation: fade-in .18s ease-out; }
.day-sheet > div { animation: sheet-up .22s ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-up { from { transform: translateY(24px); } to { transform: none; } }
.day-sheet.is-bottom > div { animation: sheet-rise .28s cubic-bezier(.2,.8,.2,1); }
.day-sheet.is-leaving { animation: fade-out .26s ease-in forwards; }
.day-sheet.is-bottom.is-leaving > div { animation: sheet-drop .26s ease-in forwards; }
@keyframes sheet-rise { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-drop { from { transform: none; } to { transform: translateY(100%); } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
/* Every card: white and round on the grey page, no outline, barely any shadow. */
.float-card, section.rounded-xl.border { border-radius: 22px !important; border-color: transparent !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.float-card { border: 0 !important; }
/* A tap shows at once: buttons dip slightly while pressed. */
button, .tab, a.rounded-lg, a.rounded-xl { transition: transform .12s ease, opacity .12s ease, background-color .2s ease; }
button:not(:disabled):active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
  *, ::view-transition-old(root), ::view-transition-new(root) { transition: none !important; animation: none !important; }
  button:not(:disabled):active { transform: none; opacity: .7; }
}
/* Email and password read normally, unlike the spaced-out code box. */
.cover-input.cover-field { letter-spacing: 0; font-size: 16px; text-align: left; padding: 0 14px; }
.cover-input.mt-2 { margin-top: 8px; }
.cover-links { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; }
.cover-links a { color: #2B2A27; text-decoration: underline; }
/* Email + password take more room: smaller line, tighter boxes. */
.cover-two .cover-line { top: 59.5%; font-size: 20px; line-height: 1.4; }
.cover-two .cover-by { margin-top: 2px; font-size: 14px; }
.cover-two .cover-input, .cover-two .cover-btn { height: 44px; }
.cover-two .cover-btn { margin-top: 10px; }
@media (max-height: 720px) {
  .cover-two .cover-line { top: 52%; font-size: 18px; }
}

/* Login: pick solo or team first. */
.cover-ask { margin-bottom: 8px; font-size: 15px; color: #4A4740; }
.cover-pick { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; width: 100%; min-height: 56px; margin-top: 8px;
  padding: 6px 16px; border: 1.5px solid #2B2A27; border-radius: 10px; background: #2B2A27; color: #F6F0E4; text-align: left; }
.cover-pick-alt { background: rgba(250,246,238,.88); color: #2B2A27; }
.cover-pick-title { font-size: 18px; font-weight: 700; }
.cover-pick-desc { font-size: 12.5px; opacity: .8; }

/* Page changes (Safari 18.2+, Chrome 126+): the old page stays on screen until the new one
   is drawn, then swaps at once — no fade, so nothing flashes (Shiang 2026-11-26). The tab bar stays put. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-group(tabbar) { animation-duration: 0s; }
html { background: #F4F4F2; }
/* Bottom bar: a white capsule floating above the page; the open tab is a lime capsule with its name. */
.tabbar { view-transition-name: tabbar; position: fixed; z-index: 20; left: 16px; right: 16px;
  /* Sits low like the iPhone's own tab bars: just above the home line, not a full safe-area gap. */
  bottom: max(10px, calc(var(--sai-bottom, env(safe-area-inset-bottom, 0px)) - 6px)); }
.tabbar-in { display: flex; align-items: center; justify-content: space-around; max-width: 480px; height: 68px; margin: 0 auto;
  padding: 0 8px; border-radius: 999px; background: #fff; box-shadow: 0 8px 28px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .06); }
.tab { display: flex; flex: 1; justify-content: center; -webkit-tap-highlight-color: transparent; transition: color .2s ease; }
.tab:active .tab-pill { transform: scale(.92); }
/* Every tab: icon with its small name underneath (Shiang, 2026-11-24, like LINE); the open one sits in a lime capsule. */
.tab-pill { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 66px; height: 56px; padding: 0 10px;
  border-radius: 999px; transition: background-color .25s ease, transform .15s ease; }
.tab-pill.on { background: #D4F25A; }
.tab-label { font-size: 11px; font-weight: 700; line-height: 1; white-space: nowrap; }
/* Press and slide along the bar (BottomNav in ui.js): the bar swells a little,
   names fold away, and a lime bubble follows the finger to the tab it lands on. */
.tabbar-in { position: relative; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: transform .25s cubic-bezier(.3,1.3,.5,1); }
.tab { position: relative; z-index: 1; -webkit-user-drag: none; }
.tab-bubble { position: absolute; z-index: 0; top: 6px; left: 0; width: 0; height: 56px; border-radius: 999px; background: #D4F25A;
  opacity: 0; pointer-events: none; will-change: transform; transition: opacity .15s ease; }
.tabbar-in.scrub { transform: scale(1.04); }
.tabbar-in.scrub .tab-bubble { opacity: 1; }
.tabbar-in.scrub .tab-pill.on { background: transparent; }
.tabbar-in.scrub .tab { color: #141414 !important; }

/* iPhone Safari gives date/time fields a fixed minimum width that ignores
   width:100%, so they stick out of narrow boxes. Let them shrink to fit. */
input[type="date"], input[type="time"], input[type="datetime-local"] {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; min-width: 0; max-width: 100%;
  min-height: 2.4em; background-clip: padding-box;
}
input::-webkit-date-and-time-value { text-align: left; margin: 0; }

/* Computer, or a tablet held sideways: the tabs move to a sidebar on the left and the
   schedule page spreads out. Phones and tablets held upright keep the app layout above. */
.sidenav { display: none; }
@media (min-width: 900px) and (orientation: landscape) {
  /* Computer: the month opens wider, with the classes still to book in a column on its right. */
  .desk-wide .pull-zone.is-over { right: auto; width: min(960px, calc(100vw - 300px)); }
  .month-drop { display: flex; flex-direction: row-reverse; gap: 16px; align-items: flex-start; }
  .month-cal { flex: 1; min-width: 0; }
  .month-side { width: 260px; flex-shrink: 0; margin: 8px 0 0; }
  .month-side-list.is-shut { display: block; }
  /* Computer keeps the whole list (four-at-a-time is for phones only). */
  .month-side-list { max-height: 680px; }
  .month-side-more, .month-side-more.is-shut { display: none; }
  .month-side-arrow { display: none; }
  .month-side > button { cursor: default; }
  body, body.no-tabs { padding-bottom: 0; }
  body:has(.sidenav) { padding-left: 232px; }
  .tabbar, .desk-hide { display: none !important; }
  .sidenav { display: flex; flex-direction: column; gap: 18px; position: fixed; z-index: 30; left: 0; top: 0; bottom: 0; width: 232px;
    padding: 22px 14px; background: #fff; box-shadow: 1px 0 0 #E9E9E6; overflow-y: auto; }
  .sidenav-who { display: flex; align-items: center; gap: 10px; padding: 0 8px 16px; border-bottom: 1px solid #EFEFEC; }
  .sidenav-avatar { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 38px; height: 38px;
    background: #141414; color: #fff; font-weight: 700; font-size: 16px; }
  .sidenav-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border-radius: 999px;
    font-size: 15px; font-weight: 600; text-align: left; transition: background-color .2s ease; }
  .sidenav-link:hover { background: #F4F4F2; }
  .hero { padding-top: 28px; }
  .desk-wide { max-width: 1120px !important; padding-left: 32px; padding-right: 32px; }
  /* This week's days and the class counts share one row. */
  .desk-wide .hero-week { display: flex; align-items: flex-end; gap: 40px; }
  .desk-wide .hero-week .pull-slot { flex: 0 1 620px; min-width: 0; }
  .desk-wide .hero-week { align-items: flex-start; }
  .desk-wide .hero-week .hero-stats { margin-top: 16px; }
  .desk-wide .hero-week .hero-stats { margin-left: auto; padding-bottom: 4px; }
  .desk-wide .hero-week .hero-stats div { white-space: nowrap; min-width: 92px; }
  .desk-seg { max-width: 560px; }
  /* 學員 and 團課: the list on the left, the chosen one on the right (students.js, admin-groups.js). */
  .desk-two { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: start; }
  .desk-two-left { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .stu-side { position: sticky; top: 16px; display: flex; flex-direction: column; height: calc(100vh - 150px); min-height: 520px; }
  .stu-pane { flex: 1; min-height: 0; }
  /* 團課: the chosen class keeps one height; only its tab's content scrolls, not the page. */
  .desk-pane { height: calc(100vh - 150px); min-height: 520px; }
  .desk-pane-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border-radius: 16px; }
  .coach-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
  .coach-main { grid-column: 1; grid-row: 1; }
  .coach-side { grid-column: 2; grid-row: 1; }
}

/* Sign-in pages: green brand panel and a white form card. Phone: panel on top, card over its edge. */
body.auth-body { background: #fff; }
.auth { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; color: #fff;
  background: #141414; border-radius: 0 0 28px 28px;
  padding: calc(var(--sai-top, env(safe-area-inset-top, 0px)) + 40px) 24px 64px; }
.auth-brand::after { content: ""; position: absolute; right: -90px; bottom: -110px; width: 260px; height: 260px; border-radius: 50%; background: #D4F25A; }
.auth-logo { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 700; }
.auth-logo img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.auth-hl { margin-top: 26px; font-size: 24px; font-weight: 700; line-height: 1.35; letter-spacing: .02em; }
.auth-sub { margin-top: 8px; font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.75); }
.auth-feat, .auth-foot { display: none; }
.auth-main { position: relative; z-index: 1; flex: 1; display: flex; justify-content: center; align-items: flex-start;
  margin-top: -34px; padding: 0 16px calc(var(--sai-bottom, env(safe-area-inset-bottom, 0px)) + 32px); }
.auth-box { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 24px 20px; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.auth-title { margin: 0; font-size: 22px; font-weight: 700; color: #141414; }
.auth-hint { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: #6B726E; }
.auth-seg { display: flex; margin-top: 20px; padding: 4px; border-radius: 12px; background: #F0F2EF; }
.auth-seg button { flex: 1; padding: 9px 0; border-radius: 9px; font-size: 14px; font-weight: 600; color: #6B726E; }
.auth-seg .on { background: #D4F25A; color: #141414; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.auth-label { display: block; margin: 16px 0 6px; font-size: 13px; font-weight: 600; color: #3A403C; }
.auth-input { width: 100%; height: 46px; padding: 0 14px; border: 1.5px solid #DDE1DC; border-radius: 11px; background: #fff;
  font-size: 16px; color: #141414; outline: none; transition: border-color .15s, box-shadow .15s; }
.auth-input:focus { border-color: #141414; box-shadow: 0 0 0 3px rgba(212,242,90,.6); }
.auth-input::placeholder { color: #6E7872; }
.auth-input + .auth-input { margin-top: 8px; }
.auth-note { margin-top: 6px; font-size: 12px; color: #6E7872; }
.auth-row { display: flex; justify-content: flex-end; margin-top: 12px; font-size: 13px; }
.auth-link { color: #141414; text-decoration: underline; font-weight: 600; text-decoration: none; }
.auth-btn { width: 100%; height: 50px; margin-top: 22px; border-radius: 999px; background: #D4F25A; color: #141414; font-size: 16px; font-weight: 700; }
.auth-btn:disabled { opacity: .55; }
.auth-err { margin-top: 10px; font-size: 13px; font-weight: 600; color: #B4452F; }
.auth-msg { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: #F1F9D2; font-size: 14px; line-height: 1.6; color: #141414; }
.auth-alt { margin-top: 22px; text-align: center; font-size: 14px; color: #6B726E; }
.auth-slogan { margin-top: 30px; text-align: center; font-size: 13px; color: #6E7872; }
.auth-slogan b { display: block; font-size: 15px; font-weight: 800; letter-spacing: .02em; color: #141414; }
.auth-slogan span { display: block; margin-top: 2px; letter-spacing: .12em; }
.auth-logo, .auth-hl, .auth-sub { position: relative; z-index: 1; }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 20px 0 4px; font-size: 12px; color: #6E7872; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: #E6E8E3; }
.auth-social { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 46px; margin-top: 10px;
  border: 1.5px solid #DDE1DC; border-radius: 12px; background: #fff; font-size: 15px; font-weight: 600; color: #141414; text-decoration: none; }
.auth-social:active { background: #F2F5F3; }
.auth-pick { display: block; width: 100%; margin-top: 8px; padding: 12px 14px; border: 1.5px solid #DDE1DC; border-radius: 12px; text-align: left; background: #fff; }
.auth-pick.on { border-color: #141414; background: #F1F9D2; }
.auth-pick b { display: block; font-size: 15px; color: #141414; }
.auth-pick.on b { color: #141414; }
.auth-pick span { display: block; margin-top: 2px; font-size: 12px; line-height: 1.5; color: #6B726E; }
@media (min-width: 900px) and (orientation: landscape) {
  .auth { flex-direction: row; }
  .auth-brand { flex: 1.1; border-radius: 0; padding: 48px 56px; }
  .auth-brand::before { content: ""; position: absolute; right: 80px; top: -160px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,.04); }
  .auth-brand::after { right: -120px; bottom: -120px; width: 420px; height: 420px; }
  .auth-hl { margin-top: auto; font-size: 34px; }
  .auth-sub { margin-top: 14px; font-size: 15px; }
  .auth-feat { display: grid; gap: 14px; margin: 30px 0 auto; padding: 0; list-style: none; }
  .auth-feat li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: rgba(255,255,255,.9); }
  .auth-feat i { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,.12); }
  .auth-foot { display: block; font-size: 12px; color: rgba(255,255,255,.5); }
  .auth-main { flex: 1; margin: 0; padding: 40px; overflow-y: auto; max-height: 100vh; }
  /* Centred, yet a long form (sign-up on a short screen) still scrolls from its top. */
  .auth-main > .auth-box { margin: auto 0; }
  .auth-box { box-shadow: none; padding: 0; max-width: 380px; }
  .auth-title { font-size: 26px; }
}
.wheel::-webkit-scrollbar{display:none}

/* Tiny labels are hard to read on a phone: nothing smaller than 11px, and 11px becomes 12px. */
.text-\[10px\] { font-size: 11px !important; }
.text-\[11px\] { font-size: 12px !important; }
/* Phone: keep the line under the headline clear of the lime circle. */
@media (max-width: 899px) { .auth-sub { max-width: 58%; } }

/* Rows of chips that scroll sideways without a bar. */
.no-scrollbar{scrollbar-width:none}
.no-scrollbar::-webkit-scrollbar{display:none}

/* 首頁 class card: the same height on every tab; longer lists scroll inside. */
.class-list{height:330px}
@media (min-width:1024px){.class-list{height:440px}}
/* On a computer the class card and 月概況 sit side by side at the same height;
   anything longer scrolls inside its own card. */
@media (min-width:1024px){
  .home-card{display:flex;flex-direction:column;height:560px}
  .home-card .class-list{height:auto;flex:1;min-height:0}
  .home-card .month-body{flex:1;min-height:0;display:flex;flex-direction:column}
  .home-card .month-scroll{flex:1;min-height:0;max-height:none}
}
/* 每位教練／要注意／怎麼算的: scrolls inside the 月概況 card instead of making it taller */
.month-scroll{max-height:240px;overflow-y:auto;overscroll-behavior:contain}
/* 約上課時間: the sheet keeps one size and does not scroll; only the week grid
   scrolls inside, and it gives up room when the time wheel opens. */
.book-sheet{display:flex;flex-direction:column;height:min(94vh,760px);height:min(94dvh,760px);overflow-y:auto;overscroll-behavior:contain}
.book-sheet>*{flex-shrink:0}
.book-sheet>.time-grid{flex:1 1 0;min-height:96px;display:flex;flex-direction:column}
.book-sheet .time-grid-body{flex:1;min-height:0;max-height:none!important}
/* The chosen day's classes, one per row: six show at once where the screen has room (a short phone shows fewer), more scroll inside. */
.book-sheet>.day-list{flex:0 1 auto;min-height:86px;max-height:182px}

/* 月概況 → 每位教練 dropdown: the list opens over what is below it, so 要注意 keeps its place. */
.coach-drop{position:relative;margin-top:10px}
.coach-drop-btn{display:flex;align-items:center;width:100%;padding:9px 12px;border-radius:12px;background:#F4F4F2;font-size:13px;text-align:left}
.coach-drop-list{position:absolute;z-index:20;left:0;right:0;top:calc(100% + 4px);max-height:236px;overflow-y:auto;overscroll-behavior:contain;padding:2px 12px;
  border-radius:14px;background:#fff;box-shadow:0 0 0 1px #E9E9E6,0 10px 30px rgba(20,20,20,.16)}
/* 通知 on a computer: a box under the bell, over the page; long lists scroll inside it,
   while the title and the 學生／修改紀錄 tab row stay put at the top. */
.bell-box{position:absolute;z-index:45;right:0;top:calc(100% + 10px);width:min(460px,calc(100vw - 280px));height:min(74vh,620px);display:flex;flex-direction:column;overflow:hidden;
  padding:12px 12px 0;border-radius:24px;background:#F4F4F2;box-shadow:0 0 0 1px #E9E9E6,0 16px 48px rgba(20,20,20,.2);text-align:left}
.bell-scroll{flex:1;min-height:0;overflow-y:auto;scrollbar-gutter:stable;overscroll-behavior:contain;padding-bottom:12px}
/* 學生／修改紀錄 tab row stays at the top while the list scrolls (phone page and computer box). */
.notice-tabs{position:sticky;top:0;z-index:30;background:#F4F4F2;padding-top:calc(var(--sai-top, env(safe-area-inset-top, 0px)) + 8px);margin-top:-8px}
.bell-box .notice-tabs{z-index:2;padding-top:0;margin-top:0}

/* 學員課表 shown inside the 學員 page on a computer: no menu, no back link. */
html.embed .embed-hide{display:none!important}
html.embed body{padding-bottom:0;background:transparent}
html.embed .mx-auto.max-w-xl{max-width:none;padding:12px}

/* A form inside a box: it cannot be wider than the box or slide sideways, and
   on a touch screen its fields are 16px so an iPhone does not zoom in on them. */
html.embed,html.embed body{overflow-x:clip;max-width:100%;overscroll-behavior:contain}
@media (pointer:coarse){html.embed input,html.embed select,html.embed textarea{font-size:16px!important}}
/* 用 Apple 登入: Apple asks for a black button with the white apple. */
.auth-social.apple { background: #000; border-color: #000; color: #fff; }
/* 登入 on a phone (and in the App): one screen that doesn't move. Everything is
   sized to fit; only on a very short screen does the form itself scroll, and
   never with the whole page bouncing. */
@media (max-width: 899px), (orientation: portrait) {
  html:has(body.auth-fixed), body.auth-fixed { height: 100%; overflow: hidden; overscroll-behavior: none; }
  body.auth-fixed .auth { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  body.auth-fixed .auth-brand { flex: none; padding: calc(var(--sai-top, env(safe-area-inset-top, 0px)) + clamp(14px, 3vh, 32px)) 24px clamp(40px, 6vh, 56px); }
  body.auth-fixed .auth-brand::after { width: 200px; height: 200px; right: -70px; bottom: -90px; }
  body.auth-fixed .auth-logo img { width: 34px; height: 34px; }
  body.auth-fixed .auth-hl { margin-top: clamp(10px, 2vh, 20px); font-size: clamp(19px, 2.9vh, 24px); }
  body.auth-fixed .auth-sub { margin-top: 4px; font-size: 12px; line-height: 1.55; }
  body.auth-fixed .auth-main { flex: 1; min-height: 0; margin-top: -30px; overflow-y: auto; overscroll-behavior: contain;
    padding-bottom: calc(var(--sai-bottom, env(safe-area-inset-bottom, 0px)) + 12px); }
  body.auth-fixed .auth-box { padding: clamp(16px, 2.4vh, 24px) 20px; }
  body.auth-fixed .auth-title { font-size: 20px; }
  body.auth-fixed .auth-hint { margin-top: 2px; font-size: 13px; }
  body.auth-fixed .auth-label { margin: clamp(8px, 1.4vh, 16px) 0 4px; }
  body.auth-fixed .auth-input { height: clamp(40px, 5.2vh, 46px); }
  body.auth-fixed .auth-row { margin-top: 6px; }
  body.auth-fixed .auth-btn { height: clamp(42px, 5.6vh, 50px); margin-top: clamp(10px, 1.6vh, 22px); }
  body.auth-fixed .auth-or { margin: clamp(10px, 1.6vh, 20px) 0 0; }
  body.auth-fixed .auth-social { height: clamp(40px, 5.2vh, 46px); margin-top: clamp(6px, 1vh, 10px); }
  body.auth-fixed .auth-alt { margin-top: clamp(10px, 1.6vh, 22px); }
  body.auth-fixed .auth-slogan { margin-top: clamp(10px, 1.8vh, 30px); }
}
@media (max-width: 899px) and (max-height: 960px), (orientation: portrait) and (max-height: 960px) {
  body.auth-fixed .auth-sub, body.auth-login .auth-hint, body.auth-fixed .auth-slogan span { display: none; }
  body.auth-fixed .auth-brand { padding-bottom: 44px; }
}
@media (max-height: 700px) {
  body.auth-fixed .auth-slogan { display: none; }
  body.auth-fixed .auth-hl { font-size: 18px; }
}
.auth-social.apple:active { background: #222; }

/* Like an app: words and buttons can't be selected, long-pressed into a link
   preview, or dragged around. Typing fields and links meant for copying
   (.can-select) still can. */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select, [contenteditable], .can-select, .can-select * { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
a, img, button { -webkit-user-drag: none; user-drag: none; }

/* Inside the phone shell (/app.html) the page scrolls in its body, not the window,
   so the bottom bar and other fixed parts stay put while scrolling on iPhone. */
html.in-shell { height: 100%; overflow: hidden; }
html.in-shell body { height: 100%; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: none; /* no rubber-band pull at the top: the fixed header must not move (Shiang 2026-11-30) */ }

/* Phone: the open month fills the screen on white, so its bar stays dark (Shiang 2026-11-30). */
.pull-zone.is-over.is-full .pull-bar em { color: #737373; }
.pull-zone.is-over.is-full .pull-bar span { background: #CFCFCB; }
.pull-zone.is-full .month-drop { box-shadow: none; }
/* ...and the bottom bar stays above it. */
html.month-open .tabbar { z-index: 45; }

/* Dark mode (設定 → 外觀). ui.js puts class "dark" on <html> on coach pages only,
   following the phone or the coach's own choice. Palette colours in ui.js read these
   variables, so most of the app changes here; the rest are the fixed colours below. */
html.dark {
  color-scheme: dark;
  --c-bg: #111210; --c-card: #1D1E1C; --c-border: #2D2F2B; --c-line: #4A4C46;
  --c-ink: #F1F1EC; --c-inkSoft: #C8C9C2; --c-inkFaint: #8E9089; --c-main: #F1F1EC;
  --c-fill: #000000;
  --c-dangerBg: #3A201B; --c-limeBg: #2A3112; --c-warnBg: #3A2C12;
  --c-secA: #E2A25A; --c-secABg: #3A2B19; --c-secB: #8DB4E2; --c-secBBg: #1C2A3A;
  --c-swap: #C3A1E2; --c-swapBg: #2D2238; --c-postpone: #A9B8D0; --c-postponeBg: #232A36;
  --c-danger: #F08A73; --c-group: #6CC5CE; --c-groupBg: #17302F;
  background: #111210;
}
html.dark body { background: #111210; color: #F1F1EC; }
html.dark select, html.dark input, html.dark textarea { color-scheme: dark; }
html.dark .hero, html.dark .hero-title, html.dark .week-strip b, html.dark .hero-stats b, html.dark .hero-icon { color: #F1F1EC; }
html.dark .hero-who, html.dark .hero-slogan, html.dark .pull-bar em { color: #8E9089; }
html.dark .hero-icon, html.dark .hero-stats div, html.dark .week-strip > div, html.dark .week-strip > button { background: #1D1E1C; border-color: #2D2F2B; }
html.dark .hero-rule { background: #2D2F2B; }
html.dark .week-strip .today, html.dark .week-strip > button.today { background: #000; border-color: #D4F25A; }
html.dark .week-strip > button.has:not(.today)::after { background: #F1F1EC; }
html.dark .week-strip .off, html.dark .week-strip .off b { color: #F08A73; }
html.dark .pull-strip.week-strip { background: #111210; }
html.dark .pull-bar span { background: #4A4C46; }
html.dark .float-card, html.dark section.rounded-xl.border { box-shadow: 0 0 0 1px #2D2F2B; }
html.dark .tabbar-in { background: #1D1E1C; box-shadow: 0 0 0 1px #2D2F2B, 0 8px 28px rgba(0,0,0,.5); }
html.dark .tab { color: #C8C9C2; }
html.dark .sidenav { background: #1D1E1C; box-shadow: 1px 0 0 #2D2F2B; }
html.dark .sidenav-who { border-color: #2D2F2B; }
html.dark .sidenav-link:hover { background: #2D2F2B; }
html.dark .coach-drop-btn, html.dark .notice-tabs { background: #111210; }
html.dark .coach-drop-list { background: #1D1E1C; box-shadow: 0 0 0 1px #2D2F2B, 0 10px 30px rgba(0,0,0,.5); }
/* Anything on lime keeps black text, whatever colour the page gave it for the light look. */
html.dark :is([style*="background: var(--c-mainBg"], [style*="background: var(--c-lime"], [style*="background-color: var(--c-mainBg"], [style*="background-color: var(--c-lime"]),
html.dark :is([style*="background: var(--c-mainBg"], [style*="background: var(--c-lime"], [style*="background-color: var(--c-mainBg"], [style*="background-color: var(--c-lime"]) :not([style*="background"]) { color: #141414 !important; }
/* Black blocks (本月實拿, black buttons) get a thin edge so they don't sink into the dark page. */
html.dark [style*="background: var(--c-fill"].rounded-2xl, html.dark [style*="background: var(--c-fill"].rounded-xl { box-shadow: inset 0 0 0 1px #34362F; }

/* Number boxes are typed, no up/down arrows (Shiang 2026-11-30). */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
