:root {
  --bg: #f5f5f7;
  --ink: #1d1d1f;
  --ink-80: rgba(0, 0, 0, 0.8);
  --ink-48: rgba(0, 0, 0, 0.48);
  --blue: #0071e3;
  --link: #0066cc;
  --white: #ffffff;
  --card: #ffffff;
  --nav: rgba(255, 255, 255, 0.72);
  --hairline: rgba(0, 0, 0, 0.08);
  --danger: #ff3b30;
  --ok: #34c759;
  --radius: 12px;
  --shadow: rgba(0, 0, 0, 0.22) 3px 5px 30px 0;
  font: 100%/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: -0.022em;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { background: var(--bg); }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  height: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 22px;
  background: var(--nav);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.nav a {
  color: var(--ink-80);
  font-size: 16px;
  letter-spacing: -0.022em;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--ink); font-weight: 600; }
.nav .btn {
  font-size: 14px;
  padding: 5px 14px;
  min-height: 32px;
}
.account-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-80);
  background: #f2f2f7;
  border-radius: 980px;
  padding: 4px 10px;
  white-space: nowrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
}
.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.login-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  display: block;
  margin: 0 auto 16px;
}
.scrim.center {
  align-items: center;
}
.sheet.tall {
  max-height: min(80vh, 720px);
  overflow: auto;
  width: min(640px, calc(100vw - 32px));
  border-radius: 18px;
}
#master-sheet .sheet.tall {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: min(86vh, 800px);
  padding-bottom: 0;
}
#master-sheet .sheet-form {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
#master-sheet .sheet-form .sheet-row > label {
  flex: 0 0 auto;
  white-space: nowrap;
}
#master-sheet .sheet-form input,
#master-sheet .sheet-form select {
  text-align: right;
  text-align-last: right;
}
#master-sheet .sheet-form .svc-checks {
  justify-content: flex-end;
  text-align: right;
}
#master-sheet .sheet-foot {
  position: sticky;
  bottom: 0;
  z-index: 2;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}
#master-sheet .sheet-foot .btn,
#master-sheet .sheet-foot .btn-ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
#master-sheet .sheet-foot .btn:hover,
#master-sheet .sheet-foot .btn-ghost:hover {
  filter: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.18));
}
.gaps-body { font-size: 14px; line-height: 1.45; }
.gaps-h { font-size: 15px; margin: 16px 0 8px; }
.dg-block { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.dg-block.is-block {
  background: repeating-linear-gradient(
    -45deg,
    #ececef,
    #ececef 6px,
    #d8d8dc 6px,
    #d8d8dc 12px
  );
  color: #6e6e73;
  cursor: default;
}
.dg-block.is-block span { color: #6e6e73; font-size: 11px; }
.dg-block.is-duty {
  background: rgba(122, 61, 184, 0.28);
  cursor: default;
}
.dg-block.is-duty[data-duty="daily"] {
  background: #0071e3;
}
.nav-spacer { flex: 1; }
.nav form { margin: 0; }
.ticker {
  position: sticky;
  top: 64px;
  z-index: 19;
  width: 100%;
  height: 34px;
  overflow: hidden;
  background: #fff6e5;
  border-bottom: 1px solid var(--hairline);
  color: #8a5a00;
  font-size: 13px;
  line-height: 34px;
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 56px;
  white-space: nowrap;
  width: max-content;
  animation: ticker-x 36s linear infinite;
}
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track {
  animation-play-state: paused;
}
.ticker-item { flex: 0 0 auto; }
button.ticker-item {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}
button.ticker-item:hover,
button.ticker-item:focus {
  text-decoration: underline;
}
.ticker-item.is-birthday::before { content: "🎂 "; }
.ticker-item.is-expire::before { content: "⚠️ "; }
#ticker-wechat-text {
  min-height: 180px;
  resize: vertical;
  line-height: 1.55;
  white-space: pre-wrap;
}
#ticker-wechat-contact {
  margin: 8px 0 0;
}
@keyframes ticker-x {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}
.center-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-48);
}
.center-switch select {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 4px 8px;
  background: #fff;
}
.center-badge {
  font-size: 13px;
  color: var(--ink-48);
}

.wrap {
  margin: 0 auto;
  padding: 28px 20px 96px;
  width: 100%;
  max-width: min(980px, 100%);
  min-width: 0;
}
.wrap-wide { max-width: min(1180px, 100%); }
.wrap-sheet { max-width: none; padding-left: 16px; padding-right: 16px; }
.wrap-calendar { max-width: none; padding: 0; }
.page-cal { padding-top: 14px; padding-bottom: 10px; }
body:has(.page-cal) {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body:has(.page-cal) > .wrap.page-cal {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.display {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}
.sub {
  color: var(--ink-48);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
}
.page-back {
  display: inline-flex;
  align-items: center;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 400;
  color: var(--link);
  text-decoration: none;
}
.page-back:hover { text-decoration: underline; }
.page-head { margin: 0 0 24px; min-height: calc(2.5rem * 1.1 + 6px + 13px * 1.45); }
.page-head .display { margin: 0 0 6px; }
.page-head .sub { margin: 0; }
.att-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.att-head-copy { min-width: 0; }
.att-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.att-head-actions .btn {
  min-height: 32px;
  padding: 4px 12px;
  font-size: 13px;
}
#att-flash[hidden] { display: none; }
.section-label {
  margin: 28px 0 8px 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-48);
  letter-spacing: -0.01em;
}
a.row {
  text-decoration: none;
  color: inherit;
}
a.row:hover { background: #fafafa; }
label.row { cursor: pointer; }
.token-mono {
  margin: 8px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}
.ops-pulse {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 22px;
}
.ops-pulse-item {
  display: block;
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
}
.ops-pulse-item:hover { text-decoration: none; background: #fafafa; }
.ops-pulse-item span {
  display: block;
  font-size: 13px;
  color: var(--ink-48);
  margin-bottom: 4px;
}
.ops-pulse-item b {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.ops-pulse-item.is-danger b { color: var(--danger); }
.ops-pulse-item.is-medium b { color: #c98900; }
.ops-pulse-item.is-healthy b { color: var(--ok); }
.ops-alerts {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--ink-48);
}
.ops-weather {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}
.sheet-h { margin: 0 0 12px; font-size: 21px; }
.sheet-h.is-center { text-align: center; margin-bottom: 16px; }
.sheet-lead { margin: 0 0 12px; }
.login-kicker { margin: 0 0 8px; }
#pw-ok { margin-top: 16px; }
#pw-cancel { margin-top: 20px; }
.demo-taps { margin: 12px 0 28px; flex-wrap: wrap; }
.hero-tap .btn { margin-top: 10px; align-self: flex-start; }
@media (max-width: 720px) {
  .ops-pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 16px;
}
#dash-grid,
.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: none;
  container-type: inline-size;
  min-width: 0;
  overflow: hidden;
}
.card.is-hit {
  position: relative;
}
.card.is-hit:hover,
.card.is-hit:focus-within {
  background: #f5f5f7;
}
.card-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}
.card-hit:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.19;
}
.muted { color: var(--ink-48); font-size: 14px; letter-spacing: -0.016em; }
.num {
  font-size: clamp(1.15rem, 4.2vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 8px 0 0;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}
.card .num {
  font-size: clamp(1.15rem, 18cqi, 2.5rem);
}

/* 总览卡：数字用马里奥红 / 金币 / 天空蓝 / 水管绿 */
.dash-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 16px 18px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 0, 0, 0.07);
  container-type: inline-size;
  min-width: 0;
  overflow: hidden;
}
.dash-sort { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sort-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 980px;
  padding: 6px 14px;
  background: #f2f2f7;
  color: var(--ink-80);
  text-decoration: none;
  font-size: 14px;
}
.sort-chip.on { background: #e8eefc; color: var(--ink); font-weight: 600; }
.sort-chip .sort-arrow {
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
}
.dash-who { min-width: 0; flex: 1 1 auto; }
.dash-teacher {
  margin: 5px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1.35em 1.35em;
  gap: 1px 8px;
  min-height: calc(1.35em * 2 + 1px);
  font-size: 11px;
  line-height: 1.35;
  color: var(--ink-48);
  letter-spacing: -0.01em;
}
.dash-teacher span { min-width: 0; }
.dash-sort-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 18px;
}
.dash-sort-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  min-width: 0;
}
.dash-sort-label {
  font-size: 15px;
  color: var(--ink-48);
  letter-spacing: -0.016em;
}
.dash-meta {
  margin: 0 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-48);
  letter-spacing: -0.01em;
  line-height: 1.45;
  white-space: nowrap;
}
.dash-meta a {
  color: inherit;
  text-decoration: none;
}
.dash-meta a:hover { text-decoration: underline; }
.dash-meta-low { color: #e52521; }
.dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
  min-width: 0;
}
h3.dash-name {
  margin: 0;
  min-width: 0;
  font-size: clamp(1.15rem, 16cqi, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.dash-total {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  text-align: right;
}
.dash-total b {
  display: block;
  font-size: clamp(1.15rem, 16cqi, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #c98900;
  font-variant-numeric: tabular-nums;
}
.dash-total span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-48);
  font-weight: 400;
}
.dash-total.is-low b { color: #e52521; }
.dash-card.is-sup-only {
  box-shadow: 0 1px 2px rgba(122, 61, 184, 0.08), 0 6px 18px rgba(122, 61, 184, 0.12);
}
.dash-card.is-sup-only .dash-total b { color: #7a3db8; }
.dash-card.is-sup-only.is-low .dash-total b,
.dash-card.is-sup-only .dash-total.is-low b { color: #e52521; }
.dash-card.is-paused {
  background: #f3f5f8;
  box-shadow: none;
  filter: grayscale(1);
}
.dash-kinds {
  margin: 0;
}
.dash-kinds > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
}
.dash-kinds dt {
  margin: 0;
  font-size: 14px;
  color: var(--ink-48);
}
.dash-kinds dd {
  margin: 0;
  font-size: clamp(0.95rem, 10cqi, 1.375rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.dash-kinds .c-std { color: #e52521; }
.dash-kinds .c-sup { color: #049cd8; }
.dash-kinds .c-pt { color: #2d8a3e; }
.dash-kinds dd.is-zero { color: var(--ink-48); font-weight: 600; }

.consume-month-note { margin: 0 0 8px 4px; }
.consume-month {
  background: var(--card);
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 8px 0 28px;
}
.consume-month-head,
.consume-month-row {
  display: grid;
  grid-template-columns: minmax(72px, 1.15fr) repeat(7, minmax(64px, 1fr));
  gap: 8px 10px;
  align-items: center;
  padding: 10px 16px;
  min-width: 860px;
}
.consume-month-head {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-48);
  border-bottom: 1px solid var(--hairline);
}
.consume-month-head span { line-height: 1.25; }
.consume-month-row {
  font-size: 14px;
  border-bottom: 1px solid var(--hairline);
}
.consume-month-row:last-child { border-bottom: 0; }
.consume-month-row.is-total {
  font-weight: 600;
  background: #fafafa;
}
.consume-name { min-width: 0; }
.consume-name a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.consume-name a:hover { text-decoration: underline; }
.consume-n {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.consume-n.is-zero { color: var(--ink-48); }
.consume-month-head span:not(:first-child),
.consume-n { text-align: right; }

.group {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 18px 0 28px;
}
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hairline);
}
.row:last-child { border-bottom: none; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-size: 17px; font-weight: 400; }
.row .caption { font-size: 13px; color: var(--ink-48); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  background: var(--blue);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 980px;
  padding: 6px 16px;
  min-height: 32px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn:active { transform: scale(0.97); }
.btn-dark { background: #1d1d1f; }
.btn-ghost {
  background: transparent;
  color: var(--link);
  border: 1px solid var(--link);
}
.btn-danger { background: var(--danger); }
.btn[disabled] { opacity: 0.4; pointer-events: none; }
.btn[hidden] { display: none; }

input, select, textarea {
  font: inherit;
  letter-spacing: inherit;
  color: var(--ink);
  background: #fafafc;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  min-height: 38px;
  outline: none;
  box-sizing: border-box;
}
input.inq-dmy:invalid {
  border-color: var(--danger);
}
select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2386868b' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
input[type="text"],
input[type="password"],
input[type="time"],
textarea {
  -webkit-appearance: none;
  appearance: none;
}
input[type="time"] { min-height: 38px; }
.field input, .field select, .ops-form input, .ops-form select, .sheet input, .sheet select {
  min-height: 38px;
  font-size: 15px;
  box-sizing: border-box;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 24px;
  align-items: start;
}
.form-grid-1 {
  grid-template-columns: minmax(0, 1fr);
  max-width: 360px;
}
.form-grid .field { min-width: 0; }
.form-grid .field label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--ink-48);
}
.form-grid .field input,
.form-grid .field select {
  width: 100%;
  box-sizing: border-box;
  min-height: 38px;
}
.form-grid .field-span { grid-column: 1 / -1; }
.svc-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  min-height: 38px;
  align-items: center;
}
.svc-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.form-grid .svc-check {
  color: var(--ink);
}
.svc-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  flex: none;
}
.pct-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pct-wrap input {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.pct-wrap em {
  font-style: normal;
  color: var(--ink-48);
  font-size: 14px;
  flex: 0 0 auto;
}
.ops-form {
  padding: 4px 20px 18px;
}
.form-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.ops-form .form-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.ops-form.is-recharge .recharge-row {
  display: grid;
  gap: 16px 20px;
  margin-bottom: 16px;
}
.ops-form.is-recharge .recharge-row-1 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ops-form.is-recharge .recharge-row-2 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ops-form.is-recharge .recharge-row-2 .field-note {
  grid-column: span 2;
}
.ops-form.is-recharge .recharge-foot {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  margin-top: 8px;
}
.recharge-total {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}
.refund-quote {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-48);
  max-width: 36em;
}
.refund-quote p { margin: 0 0 6px; }
.refund-quote p:last-child { margin: 0; }
.refund-quote strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
.refund-amt {
  cursor: help;
  border-bottom: 1px dotted currentColor;
}
.recharge-lock {
  margin: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
}
@media (max-width: 900px) {
  .ops-form.is-recharge .recharge-row-1 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .ops-form.is-recharge .recharge-row-1,
  .ops-form.is-recharge .recharge-row-2 {
    grid-template-columns: 1fr;
  }
}
.stack-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-top: 16px;
}
.stack-form .form-actions .field { min-width: 200px; }
.teacher-row { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.teacher-row.is-off { opacity: 0.5; }
.row.teacher-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18.5rem 12rem 80px;
  align-items: start;
  column-gap: 28px;
  row-gap: 10px;
  width: 100%;
}
.teacher-who {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
  min-width: 0;
}
.teacher-card .teacher-id { min-width: 0; }
.teacher-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}
.teacher-lines .caption { line-height: 1.4; }
.teacher-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
  row-gap: 4px;
  align-items: baseline;
  align-self: center;
  width: 100%;
  min-width: 0;
  margin-left: -50px;
}
.teacher-card .teacher-metrics {
  column-gap: 22px;
}
.teacher-metrics .metric {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  align-items: baseline;
  min-width: 0;
}
.teacher-metrics .k {
  font-size: 13px;
  color: var(--ink-48);
  margin: 0;
  white-space: nowrap;
}
.teacher-metrics .v {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.03em;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.teacher-metrics .v.is-debt {
  color: var(--danger);
}
.month-sum {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 280px;
}
.month-sum-row {
  display: grid;
  grid-template-columns: 88px auto minmax(48px, 1fr) auto 96px;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
}
.month-sum-row span { color: var(--ink); }
.month-sum-row b { font-size: 16px; font-weight: 600; text-align: right; }
.month-sum-row b.num { text-align: center; }
.month-sum-row em {
  font-style: normal;
  font-size: 11px;
  color: var(--ink-48);
}
.month-sum-row.is-total {
  grid-template-columns: 88px 1fr;
  border-top: 1px solid var(--hairline);
  padding-top: 8px;
  margin-top: 2px;
}
.month-sum-row.is-total b {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.month-sum-row.is-hit { position: relative; cursor: pointer; }
.month-sum-row.is-hit:hover { background: #f5f5f7; border-radius: 8px; }
.kids-toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 0 18px;
  min-height: 32px;
}
.sub-with-help {
  display: flex;
  align-items: center;
  gap: 8px;
}
.help-q {
  display: inline-flex;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  background: #fff;
  color: var(--ink-80);
}
.help-q:hover { color: var(--ink); background: #f2f2f7; }
.nav-help {
  flex: 0 0 auto;
  margin-right: 4px;
}
#page-help-sheet .help-h {
  margin: 18px 0 8px;
  padding-bottom: 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}
#page-help-sheet .logic-copy .help-h:first-child { margin-top: 0; }
#page-help-sheet .sheet {
  max-height: min(86vh, 720px);
  overflow: auto;
}
.logic-copy p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}
.logic-copy p:last-child { margin-bottom: 0; }
.kids-table {
  background: #fff;
  border-radius: var(--radius);
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.kids-head,
.kids-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.15fr) repeat(10, minmax(72px, 0.55fr)) minmax(196px, 1.2fr);
  gap: 2px 8px;
  align-items: center;
  padding: 8px 10px;
  min-width: 1100px;
  width: 100%;
  box-sizing: border-box;
}
.kids-head {
  font-size: 11px;
  color: var(--ink-48);
  border-bottom: 1px solid var(--hairline);
}
.kids-head span {
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kids-row { border-bottom: 1px solid var(--hairline); }
.kids-row:last-child { border-bottom: 0; }
.kids-name,
.kids-num,
.kids-row .icon-actions {
  min-width: 0;
}
.kids-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.kids-name-line a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
.special-mark {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #c45c48;
  color: #fff8f4;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.kids-name a { color: inherit; text-decoration: none; }
.kids-name a:hover { text-decoration: underline; }
.kids-name small {
  display: block;
  margin-top: 2px;
  color: var(--ink-48);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kids-head span,
.kids-num {
  text-align: center;
}
.kids-head span:first-child,
.kids-name {
  text-align: left;
}
.kids-head span:last-child {
  text-align: right;
}
.kids-num {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.03em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.kids-row .icon-actions {
  display: grid;
  grid-template-columns: repeat(3, 36px);
  grid-template-rows: repeat(2, 36px);
  justify-content: end;
  align-content: center;
  gap: 0;
}
.kids-row .icon-actions form {
  display: contents;
}
.kids-row .icon-btn-svg {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.recharge-log {
  display: grid;
  gap: 8px;
  max-height: 56vh;
  overflow: auto;
}
.recharge-log-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}
.recharge-log-row:last-child { border-bottom: 0; }
.recharge-log-row b { display: block; font-size: 15px; }
.recharge-log-row span,
.recharge-log-row small {
  display: block;
  color: var(--ink-48);
  font-size: 12px;
}
.recharge-log-row small { grid-column: 1 / -1; }
.recharge-del { margin-top: 6px; font-size: 13px; padding: 4px 10px; }
.lunch-form {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.lunch-cell {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  min-height: 22px;
}
.lunch-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  flex: 0 0 12px;
}
.lunch-dot.is-on { background: #34c759; }
.lunch-dot.is-warn { background: #ff9f0a; }
.lunch-pick {
  width: 100%;
  max-width: 92px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 4px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #fff;
}
.lunch-hosts-btn {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 18px;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
  box-shadow: none;
  cursor: pointer;
}
.bill-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 4px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  background: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.bill-body.is-off { display: none; }
.bill-nested {
  margin: 4px 0 8px 0;
  padding-left: 10px;
  border-left: 2px solid var(--hairline);
  min-width: 0;
  grid-column: 1 / -1;
}
.bill-nested .recharge-log-row {
  grid-template-columns: minmax(0, 1fr) auto;
}
.bill-nested .recharge-log-row b,
.bill-nested .recharge-log-row span,
.bill-charge-row span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bill-charge-row { min-width: 0; }
.month-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font-size: 14px;
}
.month-nav b { font-weight: 600; }
.host-list { display: grid; gap: 8px; margin: 8px 0 16px; max-height: 50vh; overflow: auto; }
.host-list label { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.kids-row .icon-btn-svg svg {
  width: 20px;
  height: 20px;
}
.batch-dl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--ink-80);
  font-size: 13px;
  text-decoration: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.batch-dl:hover { color: var(--ink); text-decoration: none; }
.note-form { display: flex; gap: 6px; margin-top: 6px; align-items: center; }
.note-input { flex: 1; min-width: 160px; font-size: 13px; padding: 5px 8px; }
.add-panel {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 18px 0 28px;
}
.add-panel > h2 {
  margin: 0;
  padding: 16px 18px 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.add-panel .ops-form > .sub { margin: 0; }
.sheet-form.is-pairs {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.sheet-form.is-pairs .sheet-row:nth-child(odd) {
  border-right: 1px solid var(--hairline);
}
.sheet-form.is-pairs .sheet-foot {
  grid-column: 1 / -1;
}
@media (max-width: 720px) {
  .sheet-form.is-pairs,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .sheet-form.is-pairs .sheet-row:nth-child(odd) {
    border-right: 0;
  }
}
.sheet-form .sheet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-top: 1px solid var(--hairline);
  min-width: 0;
}
.sheet-form label {
  flex: 0 0 108px;
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}
.sheet-form .sheet-row.sheet-checks {
  align-items: flex-start;
}
.sheet-form .svc-checks {
  flex: 1;
  justify-content: flex-end;
}
.sheet-form .svc-check {
  flex: none;
}
.sheet-form .svc-check input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  appearance: auto;
  -webkit-appearance: checkbox;
  text-align: left;
}
.sheet-form input,
.sheet-form select {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  text-align: right;
  -webkit-appearance: none;
  appearance: none;
}
.sheet-form input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
}
.sheet-form input:focus,
.sheet-form select:focus {
  outline: none;
}
.sheet-form input::placeholder { color: var(--ink-48); text-align: right; }
.sheet-foot {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--hairline);
}
.sheet-foot .btn {
  flex: 0 0 auto;
}
.icon-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn-svg {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--ink-80);
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.icon-btn-svg:hover { background: #f2f2f7; color: var(--ink); }
.icon-btn-svg.is-text {
  width: auto;
  min-width: 44px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
}
.icon-btn-svg:disabled {
  opacity: 0.35;
  cursor: default;
}
.icon-btn-svg.icon-del { color: #ff3b30; }
.icon-btn-svg.icon-del:hover { background: #ffecec; }
.ui-tip {
  position: fixed;
  z-index: 90;
  max-width: min(280px, calc(100vw - 16px));
  padding: 6px 10px;
  border-radius: 8px;
  background: #1d1d1f;
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  pointer-events: none;
  white-space: normal;
}
.ui-tip.is-formula {
  max-width: min(420px, calc(100vw - 16px));
  text-align: left;
  white-space: pre-line;
  font-weight: 400;
  line-height: 1.45;
}
.ui-tip[hidden] { display: none !important; }
.avatar, .avatar-ph {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.avatar-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8e8ed;
  font-weight: 600;
}
.row-del {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.row-del input {
  width: 132px;
  padding: 6px 8px;
  font-size: 13px;
}
.field label {
  display: block;
  font-size: 14px;
  color: var(--ink-48);
  margin-bottom: 6px;
}

.pill {
  display: inline-block;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 980px;
  background: #f5f5f7;
  color: var(--ink-80);
}
.pill.done { background: #e8f8ee; color: #1d7a3a; }
.pill.leave { background: #fff4e5; color: #9a6700; }
.pill.warn { background: #ffecec; color: #c41e1e; }
.pill.hold { background: #e8eef6; color: #3d5a80; }
.add-panel > h2 .pill,
.section-label .pill,
.field label .pill,
.sheet-lead .pill,
.kids-toolbar .pill {
  vertical-align: 1px;
  font-weight: 600;
}
.add-panel .ops-form > .title,
#bill-new-wallets .title {
  margin: 14px 0 8px;
  font-size: 17px;
  font-weight: 400;
}
.add-panel .ops-form > .title:first-child { margin-top: 0; }
.kids-toolbar form { display: flex; align-items: center; }

.hero-tap {
  background: var(--card);
  color: var(--ink);
  border-radius: 20px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 26px;
  margin-bottom: 22px;
  border: 1px solid var(--hairline);
}
.hero-tap-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.hero-tap-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  flex: 0 0 auto;
  box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.4);
  animation: hero-tap-pulse 2.2s ease-out infinite;
}
@keyframes hero-tap-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(52, 199, 89, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-tap-dot { animation: none; }
}
.hero-tap .kicker {
  color: var(--ink-48);
  font-size: 13px;
  margin: 0;
  letter-spacing: -0.01em;
}
.hero-tap .msg {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.desk-body { background: var(--bg); }
.desk-bar {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: var(--nav);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.desk-bar-text { display: flex; flex-direction: column; line-height: 1.2; }
.desk-bar-text strong { font-size: 17px; }
.desk-bar-text span { font-size: 13px; color: var(--ink-48); }
.desk-wrap { max-width: 880px; }
.desk-hero { padding: 32px 28px; }
.desk-hero .msg { font-size: clamp(1.75rem, 4vw, 2.4rem); }
.desk-h { font-size: 21px; margin: 28px 0 10px; }
.desk-cards { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 40px; }

table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
}
table.data th, table.data td {
  text-align: left;
  padding: 12px 16px;
  font-size: 15px;
  border-bottom: 1px solid var(--hairline);
}
table.data th {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-48);
  letter-spacing: 0;
}

.flash {
  background: #fff4e5;
  color: #9a6700;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.flash.ok { background: #e8f8ee; color: #1d7a3a; }

.migrate-bar {
  background: #fff4e5;
  color: #9a6700;
  padding: 10px 20px;
  font-size: 14px;
  line-height: 1.4;
}
.wallet-cash { white-space: nowrap; }

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 40;
}
.scrim.open { display: flex; }
.sheet {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(28px);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  width: min(480px, 100%);
  border-radius: 18px 18px 0 0;
  padding: 8px 20px 28px;
  transform: translateY(12px);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.12);
}
.scrim.center .sheet {
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16);
  margin: 20px;
  max-height: min(86vh, 800px);
}
.sheet-handle {
  width: 36px;
  height: 5px;
  border-radius: 980px;
  background: rgba(0, 0, 0, 0.18);
  margin: 4px auto 14px;
}
.sheet-h {
  overflow-wrap: break-word;
  word-break: normal;
  line-break: strict;
  line-height: 1.25;
  letter-spacing: -0.022em;
}
.sheet-lead,
.sheet > .muted,
.sheet > .sub {
  margin: 0 0 16px;
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: normal;
  line-break: strict;
}
.sheet .stack {
  gap: 16px;
}
.sheet .stack .btn.full,
.sheet > .btn.full {
  min-height: 44px;
  padding: 12px 16px;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: break-word;
  word-break: normal;
  line-break: strict;
  text-wrap: pretty;
}
.sheet > .stack + .btn.full {
  margin-top: 20px;
}
.sheet > .btn.full + .btn.full {
  margin-top: 12px;
}
.sheet > .btn.btn-ghost.full {
  margin-top: 20px;
}
.sheet input.full,
.sheet textarea.full {
  margin: 0 0 4px;
}
.sheet-foot {
  gap: 12px;
}
.scrim.open .sheet { animation: sheet-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.scrim.center.open .sheet { animation: sheet-in-center 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes sheet-in {
  from { transform: translateY(40px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes sheet-in-center {
  from { transform: translateY(16px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .btn:active { transform: none; }
  .scrim.open .sheet,
  .scrim.center.open .sheet { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: #fff; backdrop-filter: none; }
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: min(380px, 100%);
  background: #fff;
  border-radius: 22px;
  padding: 36px 28px 28px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  text-align: center;
}
.login-card .field { text-align: left; }
.login-card h1 {
  font-size: 28px;
  line-height: 1.14;
  letter-spacing: -0.022em;
  margin: 0 0 6px;
}
.login-beian {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  margin: 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  color: #6e6e73;
  z-index: 2;
}
.login-beian a {
  color: #6e6e73;
  text-decoration: none;
}
.login-beian a:hover { text-decoration: underline; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.full { width: 100%; }

.cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}
.cal-pagehead,
.flash,
.inq-sched-bar {
  flex: 0 0 auto;
}
.cal-pagehead {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: space-between;
  align-items: flex-end;
  margin: 0 0 16px;
}
.cal-range {
  font-size: clamp(1.75rem, 3.4vw, 2.25rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
}
.cal-kicker {
  margin: 0;
  color: var(--ink-48);
  font-size: 14px;
  letter-spacing: -0.016em;
}
.seg {
  display: flex;
  align-items: center;
  gap: 0;
  background: #e8e8ed;
  border-radius: 10px;
  padding: 2px;
}
.seg a, .seg-select select, .seg button {
  font-size: 13px;
  font-family: inherit;
  letter-spacing: inherit;
  color: var(--ink-80);
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 6px 14px;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  margin: 0;
}
.seg a:hover { text-decoration: none; }
.seg a.on, .seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg a:active, .icon-btn:active, .today-btn:active { transform: scale(0.97); }
.seg-select select { background: transparent; min-width: 88px; }
.week-nav { display: flex; gap: 6px; align-items: center; }
.icon-btn, .today-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--hairline);
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  letter-spacing: inherit;
  margin: 0;
}
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
}
.today-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 980px;
  font-size: 13px;
  font-weight: 600;
}
.today-btn.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-select {
  height: 32px;
  min-width: 96px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 980px;
  padding: 0 10px;
}
.evt-edge {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 12px;
  cursor: ns-resize;
  z-index: 3;
  touch-action: none;
}
.evt-edge.top { top: 0; }
.evt-edge.bot { bottom: 0; }
.dg-block.is-block .evt-edge {
  background: transparent;
}
.evt.selected { outline: 2px solid #0071e3; }
.icon-btn:hover, .today-btn:hover { text-decoration: none; background: #f2f2f7; }
.related {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
}
.related-k { font-size: 13px; color: var(--ink-48); margin-right: 4px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--ink);
  border-radius: 980px;
  padding: 6px 12px;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
}
.chip:hover { text-decoration: none; background: #f2f2f7; }
.chip.on {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}
.chip i { font-style: normal; color: var(--ink-48); font-size: 12px; }

.cal {
  background: transparent;
  border-radius: 18px;
  overflow: visible;
  margin: 4px 0 8px;
}
.cal-head, .cal-body {
  display: grid;
  grid-template-columns: 52px repeat(7, 1fr);
}
.cal-head {
  position: sticky;
  top: 64px;
  z-index: 8;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 12px 16px -14px rgba(0, 0, 0, 0.18);
}
.cal-body {
  position: relative;
  background: #fff;
  border-radius: 0 0 18px 18px;
  overflow: hidden;
}
.cal-day-h {
  text-align: center;
  padding: 10px 0 8px;
}
.cal-day-h .dow {
  display: block;
  font-size: 11px;
  color: var(--ink-48);
  letter-spacing: 0.06em;
  font-weight: 500;
}
.cal-day-h .dom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: 3px;
}
.cal-day-h.is-today .dow { color: var(--blue); font-weight: 600; }
.cal-day-h.is-today .dom { background: var(--blue); color: #fff; }
.cal-day-h.is-weekend .dow,
.cal-day-h.is-weekend .dom { color: var(--ink-48); }
.cal-day-h.is-today.is-weekend .dom { color: #fff; }
.gutter.hours { position: relative; z-index: 0; }
.hour-label {
  font-size: 11px;
  color: var(--ink-48);
  transform: none;
  padding: 2px 8px 0 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.cal-col {
  position: relative;
  z-index: 1;
  border-left: 1px solid var(--hairline);
}
.cal-col.is-today { background: rgba(0, 113, 227, 0.045); }
.cal-col.is-weekend { background: rgba(0, 0, 0, 0.018); }
.cal-col.is-today.is-weekend { background: rgba(0, 113, 227, 0.045); }
.hour-line {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.07);
  pointer-events: none;
}
.hour-line.half {
  background: rgba(0, 0, 0, 0.035);
}
.now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--danger);
  z-index: 4;
  pointer-events: none;
}
.now-line i {
  position: absolute;
  left: -5px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
}
.evt {
  position: absolute;
  left: 4px; right: 4px;
  background: var(--evt);
  border: none;
  border-radius: 8px;
  padding: 5px 8px 6px;
  overflow: hidden;
  color: #1c1612;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.evt:hover {
  filter: brightness(1.04);
}
.evt:active, .evt.press { transform: scale(0.99); }
.evt.dragging { opacity: 0.35; }
.evt.done { cursor: default; opacity: 0.58; }
.evt { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.evt-time {
  font-size: 11px;
  color: rgba(28, 22, 18, 0.62);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ghost {
  box-shadow: var(--shadow);
  cursor: grabbing;
  opacity: 0.95;
}
.day-btn, .ampm-btn {
  font: inherit;
  cursor: pointer;
}
.day-btn.press, .ampm-btn:active { transform: scale(0.97); }
.composer { margin: 0 0 22px; }
.composer-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.022em;
  margin: 0 0 14px;
}
.seg.days { flex-wrap: wrap; }
.days .day-btn { min-width: 36px; text-align: center; }
.ampm-btn.on, .day-btn.on {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.evt-main { font-size: 13px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.evt-sub { font-size: 11px; color: var(--ink-48); margin-top: 1px; }

@media (prefers-reduced-transparency: reduce) {
  .cal-col.is-today { background: #eef6ff; }
  .cal-head { background: #fff; backdrop-filter: none; }
  .sheet { background: #fff; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .seg a:active, .icon-btn:active, .today-btn:active { transform: none; }
}
@media (max-width: 800px) {
  .cal { overflow-x: auto; }
  .cal-head, .cal-body { min-width: 720px; }
  .cal-head { position: static; }
}

.evt.selected {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  background: color-mix(in srgb, var(--evt) 32%, #fff);
}
.ctx {
  position: fixed;
  z-index: 60;
  min-width: 196px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
}
.ctx button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  font: inherit;
  font-size: 15px;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}
.ctx button[hidden] {
  display: none !important;
}
.ctx button:hover { background: #f2f2f7; }
.display-sm { font-size: 28px; margin-bottom: 4px; }
.sub-sm { font-size: 14px; margin-bottom: 16px; }
.view-switch, .pick-row, .day-pills, .slot-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pick-row { margin: 0 0 8px; }
.pick-btn, .day-btn, .slot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-80);
  font-size: 13px;
  font-family: inherit;
  letter-spacing: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.day-btn { width: 32px; padding: 0; border-radius: 50%; }
.pick-btn.on, .day-btn.on, .slot-btn.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  font-weight: 600;
}
.pick-btn:hover, .day-btn:hover, .slot-btn:hover { text-decoration: none; }
.composer.compact {
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px 10px;
  margin: 0 0 14px;
  flex: 0 0 auto;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 6px 18px rgba(0, 0, 0, 0.04);
}
.composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.composer-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.composer-toggle {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-48);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.composer-toggle:hover { background: #f2f2f7; color: var(--ink); }
.composer-toggle svg {
  width: 12px;
  height: 8px;
  display: block;
  transition: transform 0.28s ease;
}
.composer.is-collapsed .composer-toggle svg,
.add-panel.is-collapsed .composer-toggle svg,
.fold-block.is-collapsed .composer-toggle svg { transform: rotate(180deg); }
.composer-clip {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.28s ease, opacity 0.22s ease, margin 0.28s ease;
  margin-top: 10px;
  opacity: 1;
}
.composer.is-collapsed .composer-clip,
.add-panel.is-collapsed .composer-clip,
.fold-block.is-collapsed .composer-clip {
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
}
.composer-inner { overflow: hidden; min-height: 0; }
.composer.compact.is-collapsed { padding-bottom: 8px; }
html.pref-composer-collapsed .composer-clip {
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition: none;
}
html.pref-composer-collapsed .composer.compact { padding-bottom: 8px; }
html.pref-composer-collapsed .composer-toggle svg {
  transform: rotate(180deg);
  transition: none;
}
.add-panel .composer-head { padding: 16px 18px; }
.add-panel:not(.is-collapsed) .composer-head { padding-bottom: 10px; }
.add-panel .composer-title { font-size: 17px; }
.add-panel .composer-toggle { margin-right: -4px; }
@media (prefers-reduced-motion: reduce) {
  .composer-clip, .composer-toggle svg { transition: none; }
}
.view-jump {
  display: block;
  margin: 0 0 8px;
  min-width: 88px;
  font-size: 14px;
  font-weight: 600;
}
.time-fields {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.time-fields[hidden] { display: none; }
.ctx button.danger { color: #c41e1e; }
.slot-btn.danger { color: #c41e1e; }
.composer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.composer-row:last-child { margin-bottom: 0; }
.composer-row label {
  font-size: 14px;
  color: var(--ink-48);
  margin: 0;
}
.composer-row select:not(.time-compact) {
  min-width: 132px;
  padding: 6px 32px 6px 10px;
  font-size: 14px;
}
.time-compact {
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 8px;
  min-width: 52px;
}
.composer-row .act-cluster {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-left: auto;
}
.composer-row .btn { margin-left: auto; }
.hint { font-size: 12px; color: var(--ink-48); margin: 6px 0 12px; }
.cal-hint { margin-top: 10px; }
.week-nav .mini {
  font-size: 12px;
  color: var(--link);
  text-decoration: none;
  padding: 4px 6px;
}
.evt-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.18;
}
.evt-name.second { font-size: 13px; font-weight: 600; }

.board-wrap { margin: 0 0 28px; }
.board-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin: 0 0 10px;
}
.board-title span {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-48);
  margin-left: 6px;
}
.day-ticker {
  display: flex;
  gap: 4px;
  margin: 0 0 18px;
}
.day-ticker .tick {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  padding: 6px 0 8px;
  border-radius: 12px;
}
.day-ticker .tick:hover { text-decoration: none; background: #fff; }
.day-ticker .tick .dow {
  display: block;
  font-size: 11px;
  color: var(--ink-48);
  letter-spacing: 0.06em;
}
.day-ticker .tick .dom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-top: 2px;
}
.day-ticker .tick.is-today .dow { color: var(--blue); font-weight: 600; }
.day-ticker .tick.on .dom { background: var(--blue); color: #fff; }
.tl {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
}
.tl-head, .tl-row {
  display: grid;
  grid-template-columns: 96px 1fr;
}
.tl-head {
  position: sticky;
  top: 64px;
  z-index: 6;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.tl-corner { height: 28px; }
.tl-axis {
  position: relative;
  height: 28px;
}
.tl-h {
  position: absolute;
  top: 8px;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--ink-48);
  font-variant-numeric: tabular-nums;
}
.tl-h:first-child { transform: none; }
.tl-track {
  position: relative;
  height: 48px;
  border-bottom: 1px solid var(--hairline);
}
.tl-grid {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(0, 0, 0, 0.06);
  pointer-events: none;
}
.tl-now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--danger);
  z-index: 3;
  pointer-events: none;
}
.tl-now::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
}
.tl-block {
  position: absolute;
  top: 8px;
  bottom: 8px;
  background: color-mix(in srgb, var(--evt) 22%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--evt) 28%, transparent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  overflow: hidden;
  z-index: 2;
}
.tl-block span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--ink);
}
.tl-block.done { opacity: 0.5; }
.tl-row .board-who {
  border-bottom: 1px solid var(--hairline);
  min-height: 48px;
}
@media (prefers-reduced-transparency: reduce) {
  .tl-head { background: #fff; backdrop-filter: none; }
}
.board {
  background: #fff;
  border-radius: 18px;
  overflow: auto;
}
.board-head, .board-row {
  display: grid;
  grid-template-columns: 108px repeat(7, minmax(112px, 1fr));
  min-width: 900px;
}
.board-head {
  position: sticky;
  top: 64px;
  z-index: 6;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.board-corner { border-bottom: 1px solid var(--hairline); }
.board-dh {
  text-align: center;
  padding: 10px 0 8px;
  border-bottom: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline);
}
.board-dh .dow {
  display: block;
  font-size: 11px;
  color: var(--ink-48);
  letter-spacing: 0.06em;
}
.board-dh .dom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-top: 2px;
}
.board-dh.is-today .dow { color: var(--blue); font-weight: 600; }
.board-dh.is-today .dom { background: var(--blue); color: #fff; }
.board-who {
  position: sticky;
  left: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  color: var(--ink);
}
.board-who:hover { text-decoration: none; background: #f5f5f7; }
.board-who strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.board-who em {
  font-style: normal;
  font-size: 11px;
  color: var(--ink-48);
}
.board-cell {
  min-height: 68px;
  padding: 4px;
  border-left: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.board-cell.is-today, .board-dh.is-today { background: rgba(0, 113, 227, 0.04); }
.board-cell.is-weekend, .board-dh.is-weekend { background: rgba(0, 0, 0, 0.015); }
.board-cell.is-today.is-weekend { background: rgba(0, 113, 227, 0.04); }
.lane-card {
  background: color-mix(in srgb, var(--evt) 18%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--evt) 22%, transparent);
  border-radius: 8px;
  padding: 6px 7px 5px;
}
.lane-card.done { opacity: 0.55; }
.lane-who {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}
.lane-when {
  font-size: 11px;
  color: var(--ink-48);
  letter-spacing: -0.01em;
  margin-top: 1px;
}
@media (prefers-reduced-transparency: reduce) {
  .board-head { background: #fff; backdrop-filter: none; }
}

.week-board {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.week-carousel {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.week-track {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  width: 300%;
  height: 100%;
  transform: translateX(-33.333%);
  will-change: transform;
}
.week-track.is-animating {
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  .week-track.is-animating { transition: none; }
}
.week-slide {
  flex: 0 0 33.333%;
  width: 33.333%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.week-slide .week-board {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
}
html.sheet-animating .week-board { overflow: hidden; }
html.sheet-animating .week-cal {
  transition: grid-template-rows 0.28s ease;
}
html.sheet-animating .dg-times,
html.sheet-animating .dg-col,
html.sheet-animating .dg-t {
  transition: height 0.28s ease;
}
html.sheet-animating .dg-line {
  transition: top 0.28s ease;
}
html.sheet-animating .dg-block {
  transition: top 0.28s ease, height 0.28s ease;
}
@media (prefers-reduced-motion: reduce) {
  html.sheet-animating .week-cal,
  html.sheet-animating .dg-times,
  html.sheet-animating .dg-col,
  html.sheet-animating .dg-t,
  html.sheet-animating .dg-line,
  html.sheet-animating .dg-block {
    transition: none;
  }
}
.week-sheet {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: stretch;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 8px;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  height: 100%;
}
.week-sheet.is-cal {
  display: block;
  overflow: auto;
  padding: 0;
  gap: 0;
  flex: 1 1 auto;
}
.week-cal {
  display: grid;
  grid-template-columns: 52px repeat(var(--n), minmax(80px, 1fr));
  grid-template-rows: 52px minmax(0, 1fr);
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-width: calc(52px + (var(--n) * 80px));
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px rgba(0, 0, 0, 0.06);
}
.week-cal .dg-corner {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 11px;
  color: var(--ink-48);
}
.week-cal .dg-th {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: visible;
  background: #faf7f1;
  color: #2c2416;
  min-width: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  border-right: 1px solid rgba(0, 0, 0, 0.05);
}
.week-cal .dg-th .dow {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-48);
  line-height: 1;
}
.week-cal .dg-th .dom {
  position: relative;
  min-width: 26px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}
.week-cal .dg-th.is-today .dom {
  color: #fff;
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 980px;
  background: var(--danger);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.week-cal .dg-th.is-weekend { background: #f3f3f5; }
.week-cal .dg-times {
  border-right: 1px solid rgba(0, 0, 0, 0.06);
}
.week-cal .dg-col {
  position: relative;
  min-width: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
}
.week-cal .dg-col.is-today {
  background: rgba(0, 113, 227, 0.035);
}
.week-cal .dg-col.is-weekend {
  background: #fafafa;
}
.week-sheet.is-cal .dg-block span {
  white-space: nowrap;
}
.day-pane {
  --col-w: 60px;
  --gutter-w: 40px;
  flex: 0 0 auto;
  width: calc(var(--gutter-w) + (var(--n) * var(--col-w)) + 20px);
  min-width: calc(var(--gutter-w) + (var(--n) * var(--col-w)) + 20px);
  max-width: none;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  background: #fff;
  border-radius: 16px;
  padding: 12px 10px 14px;
  box-sizing: border-box;
  box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 10px 28px rgba(0,0,0,0.06);
}
.day-pane.is-weekend {
  background: #f8f8fa;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 1px 2px rgba(0, 0, 0, 0.03);
}
.day-pane-h {
  margin: 0 0 8px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  text-align: center;
  min-height: 26px;
}
.day-pane-h .dow {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-48);
  line-height: 1;
}
.day-pane-h .dom {
  position: relative;
  min-width: 26px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}
.day-pane.is-weekend .day-pane-h .dow { color: var(--ink-48); }
.day-pane.is-today .day-pane-h .dow { color: var(--ink-48); }
.day-pane.is-today .day-pane-h .dom {
  color: #fff;
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 980px;
  background: var(--danger);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.day-grid {
  display: grid;
  grid-template-columns: var(--gutter-w) repeat(var(--n), var(--col-w));
  grid-template-rows: 34px minmax(0, 1fr);
  width: calc(var(--gutter-w) + (var(--n) * var(--col-w)));
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}
.dg-corner {
  font-size: 9px;
  line-height: 1.2;
  color: var(--ink-48);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #f3f3f5;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 1;
}
.dg-th {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #2c2416;
  background: color-mix(in srgb, var(--evt) 42%, #faf6ee);
  border-bottom: none;
  text-decoration: none;
  padding: 0 1px;
  overflow: hidden;
  white-space: nowrap;
  z-index: 1;
}
.dg-th:hover { text-decoration: none; filter: brightness(0.98); }
.dg-th:active { transform: scale(0.98); }
.dg-times {
  position: relative;
  z-index: 0;
  overflow: visible;
  background: #f6f6f8;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
}
.dg-t {
  font-size: 10px;
  color: var(--ink-48);
  text-align: right;
  padding: 1px 4px 0 0;
  line-height: 1.15;
  transform: none;
  font-variant-numeric: tabular-nums;
}
.dg-col {
  position: relative;
  z-index: 1;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
}
.dg-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: transparent;
  pointer-events: none;
}
.dg-line.hour { background: rgba(0, 0, 0, 0.08); }
.dg-block {
  position: absolute;
  left: 2px;
  right: 2px;
  background: var(--evt);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
  padding: 3px 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.dg-block:hover {
  filter: brightness(1.04);
}
.dg-block:active { transform: scale(0.99); }
/* Chip tokens: all calendar views share these. Do not restyle one view only. */
.dg-block span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-align: center;
  white-space: nowrap;
}
.dg-block:not(.is-block) span,
.evt-name {
  color: #fff;
  font-weight: 700;
  -webkit-text-stroke: 0.7px rgba(36, 24, 14, 0.42);
  paint-order: stroke fill;
  text-shadow: 0 1px 0 rgba(36, 24, 14, 0.28);
}
.dg-block.is-block span {
  color: #5c5348;
  -webkit-text-stroke: 0;
  text-shadow: none;
}
.week-sheet.is-solo .dg-block span {
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  text-align: center;
  width: 100%;
}
.week-sheet.is-solo .dg-block small,
.week-sheet.is-cal .dg-block small {
  display: block;
}
.dg-block small {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 1px;
}
.dg-block small.is-select,
.dg-block small.sup-tag.is-select {
  font-weight: 700;
  text-decoration: underline;
}
.dg-block.label-up,
.week-sheet.is-solo .dg-block.label-up,
.week-sheet.is-cal .dg-block.label-up {
  justify-content: flex-start;
  padding-top: 6px;
}
.dg-block .chip-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  z-index: 3;
  pointer-events: none;
  line-height: 1.12;
}
.dg-block.has-overlays > .chip-meta {
  position: absolute;
  left: 2px;
  right: 2px;
}
.dg-block.has-overlays > span {
  position: absolute;
  left: 6px;
  right: 6px;
  z-index: 3;
}
.dg-block > small,
.dg-block .chip-meta small {
  position: relative;
  z-index: 3;
  white-space: nowrap;
}
.dg-block .chip-leave {
  color: #1c1612;
  background: #f4c430;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  -webkit-text-stroke: 0;
  text-shadow: none;
  text-decoration: none;
  border-radius: 2px;
  padding: 1px 4px;
  line-height: 1.2;
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px #1c1612;
}
.dg-block .sup-box.is-daily {
  background: #c5d9ec;
  color: #2d4d6e;
  box-shadow: inset 0 0 0 1px rgba(45, 77, 110, 0.32);
  pointer-events: auto;
  cursor: default;
}
.dg-block .sup-box.is-select {
  background: rgba(122, 61, 184, 0.28);
}
.dg-block .sup-box {
  position: absolute;
  left: 3px;
  right: 3px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: rgba(18, 12, 8, 0.32);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
  pointer-events: none;
  text-align: center;
  line-height: 1.15;
  padding: 0 2px;
  white-space: nowrap;
}
.dg-block.is-block small {
  color: rgba(0, 0, 0, 0.48);
}
.dg-block.done,
.dg-block.is-done { opacity: 0.42; filter: grayscale(0.2); }
.dg-block.sup {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 0 0 1px rgba(0, 0, 0, 0.16);
}
@media (prefers-reduced-motion: reduce) {
  .dg-th:active, .dg-block:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .day-pane, .dg-th, .dg-block { box-shadow: none; }
  .dg-th, .dg-block { background: var(--evt); }
}

html[data-theme="ink"],
html[data-theme="ink"] body,
body[data-theme="ink"] {
  --bg: #0c0c0d;
  --ink: #f5f5f7;
  --ink-80: rgba(255, 255, 255, 0.78);
  --ink-48: rgba(255, 255, 255, 0.42);
  --blue: #f5f5f7;
  --link: #d1d1d6;
  --white: #f5f5f7;
  --card: #161618;
  --nav: rgba(14, 14, 15, 0.82);
  --hairline: rgba(255, 255, 255, 0.1);
  --danger: #ff453a;
  --ok: #30d158;
  --shadow: none;
  background: #0c0c0d;
  color: #f5f5f7;
}
[data-theme="ink"] .nav {
  background: rgba(14, 14, 15, 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme="ink"] .account-badge {
  background: #2c2c2e;
  color: #f5f5f7;
}
[data-theme="ink"] .nav a.active { color: #fff; }
[data-theme="ink"] .dash-card {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 22px rgba(0, 0, 0, 0.4);
}
[data-theme="ink"] .btn {
  background: #f5f5f7;
  color: #111;
}
[data-theme="ink"] .btn-ghost {
  background: transparent;
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, 0.28);
}
[data-theme="ink"] .btn-dark { background: #2c2c2e; color: #f5f5f7; }
[data-theme="ink"] .seg { background: #2c2c2e; }
[data-theme="ink"] .seg a,
[data-theme="ink"] .seg button { color: rgba(255, 255, 255, 0.72); }
[data-theme="ink"] .seg a.on,
[data-theme="ink"] .seg button.on {
  background: #f5f5f7;
  color: #111;
  box-shadow: none;
}
[data-theme="ink"] .icon-btn,
[data-theme="ink"] .today-btn {
  background: #1c1c1e;
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, 0.12);
}
[data-theme="ink"] .icon-btn:hover,
[data-theme="ink"] .today-btn:hover { background: #2c2c2e; }
[data-theme="ink"] .chip {
  background: #1c1c1e;
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="ink"] .chip.on { background: #f5f5f7; color: #111; }
[data-theme="ink"] input,
[data-theme="ink"] select,
[data-theme="ink"] textarea {
  background: #1c1c1e;
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="ink"] .pick-btn,
[data-theme="ink"] .day-btn,
[data-theme="ink"] .slot-btn {
  background: #1c1c1e;
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.12);
}
[data-theme="ink"] .pick-btn.on,
[data-theme="ink"] .day-btn.on,
[data-theme="ink"] .slot-btn.on {
  background: #f5f5f7;
  color: #111;
  border-color: #f5f5f7;
}
[data-theme="ink"] .composer.compact,
[data-theme="ink"] .flash {
  background: #161618;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="ink"] .flash { color: #ffd60a; }
[data-theme="ink"] .flash.ok { color: #30d158; background: #13261a; }
[data-theme="ink"] .migrate-bar { background: #161618; color: #ffd60a; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
[data-theme="ink"] .ctx {
  background: rgba(28, 28, 30, 0.92);
  color: #f5f5f7;
}
[data-theme="ink"] .ctx button { color: #f5f5f7; }
[data-theme="ink"] .ctx button:hover { background: #2c2c2e; }
[data-theme="ink"] .sheet {
  background: #1c1c1e;
  color: #f5f5f7;
  box-shadow: none;
}
[data-theme="ink"] #master-sheet .sheet-foot {
  background: rgba(28, 28, 30, 0.96);
}
[data-theme="ink"] .week-sheet { padding-bottom: 20px; }
[data-theme="ink"] .day-pane {
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
  border-radius: 12px;
}
[data-theme="ink"] .day-pane.is-today {
  box-shadow: none;
}
[data-theme="ink"] .day-pane.is-weekend {
  background: #101012;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}
[data-theme="ink"] .day-pane-h .dow { color: rgba(255, 255, 255, 0.4); }
[data-theme="ink"] .day-pane-h .dom { color: #f5f5f7; }
[data-theme="ink"] .day-pane.is-today .day-pane-h .dom { color: #fff; }
[data-theme="ink"] .day-grid { background: #0e0e10; }
[data-theme="ink"] .dg-corner {
  background: #1c1c1e;
  color: rgba(255, 255, 255, 0.4);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
[data-theme="ink"] .dg-th {
  background: var(--evt);
  color: #1c1612;
  border-bottom: none;
  box-shadow: none;
}
[data-theme="ink"] .dg-times {
  background: #121214;
  border-right-color: rgba(255, 255, 255, 0.08);
  z-index: 0;
}
[data-theme="ink"] .dg-t { color: rgba(255, 255, 255, 0.38); }
[data-theme="ink"] .dg-col {
  border-left-color: rgba(255, 255, 255, 0.06);
  background: #0e0e10;
}
[data-theme="ink"] .dg-line.hour { background: rgba(255, 255, 255, 0.1); }
[data-theme="ink"] .dg-block {
  background: var(--evt);
  color: #1c1612;
  box-shadow: none;
  border-radius: 4px;
}
[data-theme="ink"] .dg-block:hover {
  filter: brightness(1.06);
  box-shadow: none;
}
[data-theme="ink"] .dg-block span { color: #1c1612; }
[data-theme="ink"] .dg-block small { color: rgba(28, 22, 18, 0.62); }
[data-theme="ink"] .dg-block .chip-leave { color: #1c1612; background: #f4c430; }
[data-theme="ink"] .dg-block.done { opacity: 0.38; filter: grayscale(0.35); }
[data-theme="ink"] .dg-block.sup {
  box-shadow: inset 0 0 0 1px #1c1612;
}
[data-theme="ink"] .cal {
  background: #141416;
  box-shadow: none;
}
[data-theme="ink"] .cal-head {
  background: rgba(20, 20, 22, 0.9);
}
[data-theme="ink"] .cal-body { background: #141416; }
[data-theme="ink"] .cal-col.is-today { background: rgba(255, 255, 255, 0.04); }
[data-theme="ink"] .evt {
  background: var(--evt);
  color: #1c1612;
  box-shadow: none;
}
@media (prefers-reduced-transparency: reduce) {
  [data-theme="ink"] .nav { background: #0c0c0d; backdrop-filter: none; }
  [data-theme="ink"] .day-pane, [data-theme="ink"] .dg-th, [data-theme="ink"] .dg-block { box-shadow: none; }
}

.bian-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(10px);
  background: #1d1d1f;
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.bian-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.risk-hero {
  margin: 0 0 22px;
  padding: 18px 20px;
  border-radius: 16px;
  background: #f2f2f7;
}
.risk-hero .risk-label {
  margin: 4px 0 8px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.risk-hero.is-healthy { background: #e8f8ee; }
.risk-hero.is-healthy .risk-label { color: #1f8a4c; }
.risk-hero.is-medium { background: #ece8fb; }
.risk-hero.is-medium .risk-label { color: #7a3db8; }
.risk-hero.is-danger { background: #fde8e8; }
.risk-hero.is-danger .risk-label { color: #e52521; }
.risk-tail {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.risk-tail-copy { flex: 1; min-width: 0; }
.risk-tail-copy p { margin: 0; }
.risk-tail-copy .overspent-note { margin-top: 8px; }
.risk-tail .btn { flex: 0 0 auto; white-space: nowrap; }
.risk-tail-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  flex: 0 0 auto;
}
.fin-sheet tfoot td {
  font-weight: 600;
  background: #fafafa;
}
.sheet.tall.prospect-sheet,
.sheet.tall.breakdown-sheet {
  width: min(1080px, calc(100vw - 32px));
  max-width: min(1080px, calc(100vw - 32px));
  overflow-x: hidden;
  overflow-y: auto;
}
#breakdown-scrim .fin-sheet-wrap {
  overflow-x: hidden;
}
#breakdown-scrim .fin-sheet {
  min-width: 0;
  width: 100%;
  table-layout: auto;
}
#breakdown-scrim .fin-sheet th,
#breakdown-scrim .fin-sheet td {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
#breakdown-scrim .fin-sheet tfoot td {
  font-weight: 600;
  background: #fafafa;
}
#breakdown-total {
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.prospect-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.prospect-head .sheet-h { flex: 1; margin: 0; }
.prospect-cfo {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.45;
}
.prospect-assump {
  margin: 0 0 12px;
  padding-left: 1.2em;
  font-size: 13px;
  color: var(--ink-48);
  line-height: 1.45;
}
.prospect-kpis {
  margin: 0 0 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.prospect-sheet .num,
.prospect-sheet .pchart-n,
.prospect-kid b,
.prospect-month-foot {
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}
.prospect-sheet .num { font-size: 22px; }
.pchart {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 6px;
}
.pchart-col { min-width: 0; }
.pchart-stack {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 132px;
}
.pchart-bar {
  width: 16px;
  border-radius: 6px 6px 2px 2px;
  background: #1f8a4c;
  min-height: 4px;
}
.pchart-bar.is-in { background: #1f8a4c; }
.pchart-bar.is-rec { background: #7a3db8; }
.pchart-bar.is-cost { background: #e52521; }
.pchart-bar.is-cash { background: #1c1c1e; }
.pchart-lab {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-48);
  text-align: center;
}
.pchart-n {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.pchart-legend {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--ink-48);
}
.pchart-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  margin: 0 4px 0 10px;
  vertical-align: middle;
}
.pchart-dot.is-in { background: #1f8a4c; margin-left: 0; }
.pchart-dot.is-rec { background: #7a3db8; }
.pchart-dot.is-cost { background: #e52521; }
.prospect-months {
  display: grid;
  gap: 12px;
  margin: 16px 0 8px;
}
.prospect-month {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 12px 14px 10px;
}
.prospect-month h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}
.prospect-kid {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  font-size: 14px;
}
.prospect-kid span { min-width: 0; overflow-wrap: anywhere; }
.prospect-kid b { font-variant-numeric: tabular-nums; }
.prospect-month-empty {
  margin: 0;
  font-size: 13px;
}
.prospect-month-foot {
  margin: 10px 0 0;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.prospect-gap {
  background: #f7f7f8;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.45;
}
.prospect-gap b { display: block; margin: 0 0 4px; }
.prospect-gap p { margin: 0; }
.prospect-assump-tag {
  margin-top: 6px !important;
  font-size: 13px;
  color: var(--ink-48);
}
.prospect-goals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 8px 10px;
  align-items: end;
  margin: 8px 0 16px;
}
.prospect-goals .field { margin: 0; }
.prospect-goals .btn { white-space: nowrap; }
@media (max-width: 720px) {
  .prospect-goals { grid-template-columns: 1fr; }
}
.fin-unlock {
  max-width: 420px;
}
.fin-kpi {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 8px;
}
.fin-kpi .card {
  min-width: 0;
  overflow: hidden;
}
.fin-kpi-h {
  margin: 0;
  font-size: clamp(13px, 6cqi, 17px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  word-break: break-word;
}
.fin-kpi-h .ghost-hit {
  font: inherit;
  font-weight: 700;
  color: inherit;
}
.fin-kpi .muted {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-48);
  overflow-wrap: break-word;
  word-break: break-word;
}
.fin-kpi .num {
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.emp-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .fin-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .emp-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.fin-amt {
  width: 100%;
  text-align: right;
}
.field input[type="password"],
.field input[type="number"] {
  width: 100%;
}
.fin-sheet-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin: 12px 0 8px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
}
.fin-sheet {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
}
.fin-sheet th,
.fin-sheet td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: middle;
}
.fin-sheet td.fin-cat-cell,
.fin-sheet td.fin-date-cell,
.fin-sheet td:first-child {
  overflow: visible;
}
.fin-sheet thead th {
  background: #f2f2f7;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-80);
}
.fin-sheet tfoot td {
  font-weight: 600;
  background: #fafafa;
  border-bottom: 0;
}
.fin-sheet .fin-side { width: 72px; }
.fin-sheet .fin-cat { width: 148px; }
.fin-sheet .fin-date { width: 132px; }
.fin-sheet .fin-note { width: 22%; }
.fin-sheet .fin-amt-h { width: 112px; }
.fin-sheet .fin-proof { width: 108px; }
.fin-sheet .fin-act { width: 124px; }
.fin-cat-h {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.fin-sheet thead .icon-btn-svg {
  width: 28px;
  height: 28px;
}
.fin-proof-cell {
  vertical-align: middle;
}
.fin-sheet input.fin-voucher {
  width: 100%;
  max-width: 100%;
  font-size: 12px;
}
.fin-sheet tr.is-locked input.fin-voucher { display: none; }
.fin-proof-view {
  font-size: 13px;
  color: var(--link);
  text-decoration: none;
}
.fin-proof-view:hover { text-decoration: underline; }
.fin-preset-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 12px;
}
.fin-preset-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fin-preset-row input {
  flex: 1;
  min-height: 32px;
  font: inherit;
  font-size: 14px;
}
.field-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-48);
}
.fin-sheet .fin-cat-cell {
  position: relative;
  min-width: 0;
}
.fin-sheet select.fin-side-in,
.fin-sheet select.fin-cat-sel {
  -webkit-appearance: menulist;
  appearance: auto;
  background-image: none;
  padding-right: 8px;
}
.fin-sheet select.fin-side-in,
.fin-sheet select.fin-cat-sel,
.fin-sheet input.fin-custom,
.fin-sheet input.fin-date-in,
.fin-sheet input.fin-note-in,
.fin-sheet input.fin-amt {
  width: 100%;
  max-width: 100%;
  min-height: 32px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  padding: 4px 6px;
  box-sizing: border-box;
}
.fin-sheet select.fin-side-in,
.fin-sheet select.fin-cat-sel {
  padding-right: 8px;
}
.fin-sheet .fin-cat-cell:not(.is-custom) .fin-custom,
.fin-sheet .fin-cat-cell:not(.is-custom) .fin-cat-back {
  display: none;
}
.fin-sheet .fin-cat-cell.is-custom .fin-cat-sel {
  display: none;
}
.fin-sheet .fin-cat-cell.is-custom .fin-custom {
  display: block;
  padding-right: 28px;
}
.fin-sheet .fin-cat-back {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  padding: 0;
  width: 18px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-48);
  cursor: pointer;
}
.fin-sheet .fin-cat-back svg { display: block; }
.fin-sheet .fin-amt-h,
.fin-sheet .fin-total,
.fin-sheet .fin-amt { text-align: left; }
.fin-sheet input.fin-amt { text-align: left; }
.fin-sheet tr.is-locked .fin-save { display: none; }
.fin-sheet tr:not(.is-locked) .fin-edit { display: none; }
.fin-sheet tr.is-locked .fin-cat-back { visibility: hidden; }
.fin-sheet .fin-act-cell .icon-actions { justify-content: flex-end; }
.fin-sheet .fin-total {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  line-height: 1.45;
  white-space: nowrap;
}
.fin-sheet tfoot td.fin-sum-lab {
  text-align: right;
  font-weight: 400;
  font-size: 13px;
  color: var(--ink-48);
  padding-right: 12px;
}
.fin-sheet tr:focus-within { background: #f5f8ff; }
.fin-sheet-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 8px 0 16px;
}
.fin-sheet-bar .muted { flex: 1; min-width: 12em; }
.fin-sheet-bar #fin-manual-pay-open { margin-left: auto; }
.case-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 12px;
  max-height: none;
  overflow: visible;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 8px 10px;
}
.case-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  font-size: 13px;
}
.case-row span { flex: 1; min-width: 0; }
.case-row .case-pct {
  width: 44px;
  text-align: right;
}
.case-row em { color: var(--ink-48); font-style: normal; font-size: 13px; }
#edit-teacher-scrim input[type="checkbox"] {
  -webkit-appearance: checkbox;
  appearance: auto;
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  padding: 0;
  margin: 0;
  flex: none;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
#edit-teacher-scrim .form-grid .case-row input.case-pct,
#edit-teacher-scrim .case-row input.case-pct {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  min-height: 28px;
  padding: 2px 6px;
  font-size: 13px;
  flex: none;
}
#edit-teacher-scrim .attend-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  max-width: 240px;
}
#edit-teacher-scrim .attend-cal label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  padding: 2px 0;
  min-height: 0;
  border: 1px solid var(--hairline);
  border-radius: 6px;
}
#edit-teacher-scrim .attend-cal .dow {
  font-size: 11px;
  color: var(--ink-48);
  text-align: center;
  padding: 0;
}
#edit-manual-pay {
  padding: 0 20px 8px;
}
#edit-manual-pay .ops-form { padding: 0; }
#edit-manual-pay .manual-pay-h {
  font-size: 15px;
  font-weight: 600;
  margin: 4px 0 6px;
}
#edit-manual-pay > .sub { margin: 0 0 10px; }
#edit-manual-pay .manual-pay-row {
  display: grid;
  grid-template-columns: 7.2rem 5.6rem minmax(0, 1fr) 36px;
  gap: 10px 12px;
  align-items: end;
}
#edit-manual-pay .manual-pay-row .field { min-width: 0; }
#edit-manual-pay .manual-pay-row .field label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--ink-48);
}
#edit-manual-pay .manual-pay-row input {
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
}
#edit-manual-pay .manual-pay-row .icon-btn-svg {
  margin-bottom: 1px;
}
#edit-teacher-scrim .edit-teacher-foot {
  margin: 8px 20px 4px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}
.overspent-note {
  margin: 10px 0 0;
  font-size: 14px;
}
.ghost-hit {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.ghost-hit:hover { text-decoration: underline; }

/* UI unify: overflow, sheet chrome, high-freq actions */
.row .title,
.row .caption,
.kids-name-line a,
.ops-alerts,
.flash,
.sub {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sheet.narrow { max-width: 400px; }
.sheet.mid { max-width: 420px; }
.sheet.wide { max-width: 640px; }
.sheet .sub {
  overflow-wrap: break-word;
  word-break: normal;
}
.note-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.note-row span { min-width: 5em; flex: 0 0 auto; }
.note-row input { flex: 1; min-width: 0; }
.form-actions {
  flex-wrap: wrap;
}
.row .form-actions {
  margin: 0;
}
.fin-sheet input[type="number"] {
  width: 6.5rem;
  min-height: 32px;
  padding: 4px 6px;
  font-size: 14px;
}
.ops-weather {
  flex-wrap: wrap;
}
.kids-name-line a {
  overflow: hidden;
  text-overflow: ellipsis;
}
.form-actions {
  justify-content: flex-start;
}
.btn.full { width: 100%; }
.group .title,
.group .caption {
  min-width: 0;
}
.kids-toolbar + .group {
  margin-top: 0;
}
.pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-head .sub { max-width: 42rem; }
.page-head .sub.pay-rule {
  max-width: none;
  white-space: nowrap;
}
.icon-actions { flex-shrink: 0; }
.is-hidden { display: none; }
.card.sheet { padding: 22px; }
.shoot-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  justify-self: stretch;
  align-self: center;
  align-items: stretch;
  gap: 8px;
  margin: 0;
  width: 100%;
  min-width: 0;
  font-size: 13px;
}
.shoot-form .shoot-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
  min-height: 32px;
}
.shoot-form .shoot-fee {
  gap: 12px;
}
.shoot-form .shoot-fee span {
  min-width: 4.75rem;
}
.shoot-form .shoot-line span {
  white-space: nowrap;
  color: var(--ink-48);
  line-height: 1;
}
.shoot-form input[type="number"] {
  width: 56px;
  height: 32px;
  padding: 0 6px;
  flex: 0 0 auto;
}
.shoot-form .chk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  line-height: 1;
}
.shoot-form .chk input {
  margin: 0;
  width: 14px;
  height: 14px;
}
.teacher-card .icon-actions {
  display: grid;
  grid-column: 4;
  grid-template-columns: 36px 36px;
  grid-template-rows: 36px 36px;
  gap: 4px;
  align-content: start;
  justify-content: end;
}
.teacher-card .icon-actions .icon-slot-empty { visibility: hidden; pointer-events: none; }
.teacher-card .icon-actions form { display: contents; }
.row.child-card {
  display: grid;
  grid-template-columns: minmax(11rem, 1fr) minmax(16rem, 1.15fr) 128px;
  align-items: center;
  column-gap: 24px;
  row-gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 14px 18px;
}
.child-card .teacher-who { align-items: center; }
.child-card .title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.child-card .title a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}
.child-card .title a:hover { text-decoration: underline; }
.child-card .teacher-metrics {
  margin-left: -100px;
  grid-template-columns: 11.5rem 42px 10rem 22px 8.5rem;
  justify-content: start;
  column-gap: 0;
  row-gap: 8px;
}
.child-card .teacher-metrics .metric:nth-child(3n+1) { grid-column: 1; }
.child-card .teacher-metrics .metric:nth-child(3n+2) { grid-column: 3; }
.child-card .teacher-metrics .metric:nth-child(3n) { grid-column: 5; }
.child-card .teacher-metrics .metric {
  display: flex;
  grid-template-columns: none;
  column-gap: 0;
  gap: 6px;
  width: auto;
}
.child-card .teacher-metrics .v { text-align: left; }
.child-card.is-paused { background: #f3f5f8; }
.child-card .metric-gift {
  margin-left: 6px;
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-48);
}
.child-card .v > .metric-gift:first-child {
  margin-left: 0;
  margin-right: 2px;
}
.child-card .lunch-form {
  display: inline-flex;
  margin: 0;
  flex: 0 0 auto;
}
.child-card .lunch-hosts-btn {
  position: static;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: var(--ink-48);
  background: transparent;
  font-size: inherit;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.child-card .lunch-hosts-btn:hover { color: var(--ink); background: #f2f2f7; }
.child-card .icon-actions {
  display: grid;
  grid-template-columns: repeat(3, 36px);
  grid-template-rows: repeat(2, 36px);
  gap: 4px;
  justify-content: end;
  align-content: center;
  min-width: 0;
}
.child-card .icon-actions form { display: contents; }
@media (max-width: 980px) {
  .row.teacher-card {
    grid-template-columns: minmax(0, 1fr) 80px;
  }
  .teacher-card .teacher-metrics,
  .teacher-card .shoot-form {
    grid-column: 1;
  }
  .teacher-card .teacher-metrics { margin-left: 0; }
  .teacher-card .icon-actions {
    grid-column: 2;
    grid-row: 1 / span 3;
  }
  .row.child-card {
    grid-template-columns: minmax(0, 1fr) 128px;
  }
  .child-card .teacher-metrics { grid-column: 1; margin-left: 0; }
  .child-card .icon-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}
.pub-body .login-logo { margin-top: 28px; }
.form-grid-full {
  margin-top: 16px;
  grid-template-columns: 1fr;
}
.ops-form textarea {
  width: 100%;
  min-height: 72px;
  padding: 8px 10px;
  font: inherit;
  resize: vertical;
}
.add-panel .form-actions form { display: inline; }
@media (max-width: 720px) {
  .pub-form .form-grid .field input,
  .pub-form .form-grid .field select,
  .pub-form textarea {
    min-height: 44px;
    font-size: 16px;
  }
  .pub-form .form-actions .btn { width: 100%; }
}
.month-nav a.is-on { font-weight: 600; }
.inq-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin: 0 0 10px;
}
.inq-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 18px;
}
.inq-filters a {
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.inq-filters a:hover { color: var(--ink); text-decoration: none; }
.inq-filters a.is-on {
  box-shadow: inset 0 -2px 0 var(--ink);
}
.inq-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 8px;
}
.inq-wait-head {
  margin-top: 10px;
}
@media (max-width: 900px) {
  .inq-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.inq-sched-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 14px;
  padding: 10px 14px;
  background: #fff;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.inq-sched-bar a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.inq-sched-bar a:hover { color: var(--ink); }
.dg-block .inq-open {
  position: absolute;
  right: 6px;
  bottom: 4px;
  z-index: 3;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.dg-block .inq-open:hover { color: #fff; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 8px;
}
.section-head .section-label { margin: 0; }
.section-head .btn {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 4px 12px;
  font-size: 13px;
}
#breakdown-note {
  margin: 0 0 12px;
}
.fold-block .composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 8px;
  padding: 0;
}
.fold-block .composer-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-48);
  letter-spacing: -0.01em;
}
.fold-block .composer-title .muted { font-weight: 400; }
.fold-block .composer-clip { margin-top: 0; }
.fold-block .consume-month { margin: 0 0 8px; }
.dash-kinds > div,
.dash-kinds dt { min-width: 0; }
.card .muted {
  overflow-wrap: break-word;
  word-break: break-word;
}
.att-day-pick {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}
.att-day-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-48);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.att-day-cal {
  position: relative;
  overflow: hidden;
}
.att-day-cal input[type="date"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
}
.att-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
  margin: 0 0 28px;
}
.att-col .group {
  margin: 8px 0 0;
}
.att-col-h {
  margin: 0 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-48);
  letter-spacing: -0.01em;
}
.att-row.att-kind-standard {
  background: #fff6f5;
  box-shadow: inset 4px 0 0 #e52521;
}
.att-row.att-kind-supervision {
  background: #f3faff;
  box-shadow: inset 4px 0 0 #049cd8;
}
.att-row.att-kind-parent_training {
  background: #f3faf4;
  box-shadow: inset 4px 0 0 #2d8a3e;
}
.att-kind {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  vertical-align: 1px;
}
.att-kind-standard .att-kind {
  color: #c41e1a;
  background: rgba(229, 37, 33, 0.12);
}
.att-kind-supervision .att-kind {
  color: #0277a8;
  background: rgba(4, 156, 216, 0.14);
}
.att-kind-parent_training .att-kind {
  color: #246f32;
  background: rgba(45, 138, 62, 0.14);
}
@media (max-width: 820px) {
  .att-cols { grid-template-columns: 1fr; }
}
.btn.btn-off,
.btn.btn-off[disabled] {
  background: var(--blue);
  color: #fff;
  opacity: 0.45;
  filter: grayscale(1);
  pointer-events: none;
  cursor: default;
}
#rooms-sheet .rooms-list {
  margin: 0 4px 4px;
  max-height: 40vh;
  overflow: auto;
}
#rooms-sheet .rooms-list .row {
  padding: 8px 14px;
  gap: 8px;
}
#rooms-sheet .rooms-list .title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
}
#rooms-sheet .rooms-list .muted {
  margin: 8px 14px;
}
.pw-gate-row {
  align-items: center;
}
.pw-gate-field {
  margin: 0;
  min-width: 160px;
}
.pw-gate-field select {
  margin: 0;
}
.wait-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.wait-scrim.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: opacity 0.2s ease, visibility 0s;
}
.wait-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: #fff;
}
.wait-spin {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  animation: wait-turn 0.8s linear infinite;
}
.wait-spin svg {
  width: 32px;
  height: 32px;
  display: block;
}
.wait-box p {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.016em;
}
@keyframes wait-turn {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .wait-spin { animation: none; }
  .wait-scrim { transition: none; }
}
.form-sec {
  margin: 22px 0 10px;
  font-size: 15px;
  font-weight: 700;
}
.inq-book > .sub {
  margin: 0;
  padding: 0 18px 12px;
}
.inq-book {
  overflow: auto;
}
.inq-book .ops-form {
  padding: 0 18px 18px;
}
.inq-after-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 4px 18px 18px;
}
.inq-after-stack > form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  width: 100%;
}
.inq-after-enroll {
  padding: 16px 0 4px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.inq-after-enroll .sub {
  margin: 6px 0 0;
  max-width: 36rem;
}
.gap-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  align-items: start;
}
.gap-day {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.gap-day-h,
.gap-day-sub {
  margin: 0;
  text-align: center;
  line-height: 1.3;
}
.gap-day-h {
  font-size: 13px;
  font-weight: 700;
}
.gap-day-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-48);
  margin-bottom: 2px;
}
.gap-day-none {
  margin: 0;
  text-align: center;
  font-size: 12px;
}
.gap-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  height: 36px;
  box-sizing: border-box;
  border: 1px solid var(--hairline);
  background: #fff;
  border-radius: 10px;
  padding: 0 4px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.gap-chip.is-on {
  border-color: var(--ink);
  background: #1d1d1f;
  color: #fff;
}
@media (max-width: 900px) {
  .gap-week {
    grid-template-columns: repeat(7, minmax(92px, 1fr));
    overflow-x: auto;
    padding-bottom: 6px;
  }
}
.bill-sec {
  margin: 0 0 16px;
  padding: 12px 14px 8px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: #fafafa;
}
.bill-sec h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
.recharge-row-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: flex-end;
}
.manual-pay-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.manual-pay-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-80);
}
.manual-pay-list li span { overflow-wrap: break-word; min-width: 0; }
.manual-pay-list li form { flex: 0 0 auto; }
#fin-manual-pay-scrim .manual-pay-list { margin: 16px 0 0; }


