/* Hallmark · shape: app screen · genre: playful · theme: user design system (by request: coral, sand, mint, marigold, teal, lilac, Lexend, pills, 24px cards)
 * nav: floating rounded sidebar from 60rem, top bar and bottom tab bar below · signature: the record mark, a slash, a lambda and a closed lilac triangle drawn one stroke per stage · states: loading, empty, error, full, demo, offline
 * axes: light/geometric-sans/warm · posture: friendly · contrast: pass with one brand exception (white on coral buttons, per the design system) · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · weakest: E, the glyph motion plays only on a status change or a hover, never on load */
/* answered 56: .mlist-group and the matrix head stick inside their own scroll containers, offset by --stick-top where they do not */
/* waive 12: the design system specifies --ease-bounce for toggles, checks, tooltips and card lift */
/* waive 7b: the design system specifies white cards on warm paper */
/* waive 40: white on coral at 3:1 is the design system's rule for buttons, badges and active nav; body text never sits on coral */
/* waive 10b: the user asked for material animations; each plays once on a real state change, transform, opacity and stroke-dashoffset only */
@import url("./tokens.css");
@import url("./base.css");

:root {
  --m-pink: oklch(82% 0.085 5); --m-red: oklch(56% 0.19 29); --m-blue: oklch(52% 0.14 255); --m-sky: oklch(80% 0.07 230);
  --m-navy: oklch(32% 0.09 260); --m-gold: oklch(79% 0.14 82); --m-yellow: oklch(89% 0.15 97); --m-wood: oklch(72% 0.08 65);
  --m-brown: oklch(46% 0.07 50); --m-water: oklch(76% 0.08 225); --m-green: oklch(62% 0.13 148); --m-purple: oklch(52% 0.14 310);
  --m-sand: oklch(84% 0.04 80); --m-bean: oklch(48% 0.09 40);
  --bar-h: 64px; --tab-h: 68px; --row-h: 64px; --side-w: 256px;
  --ctl-h: 48px; --ctl-h-sm: 40px;
}

body { min-height: 100dvh; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--sand-300); border: 3px solid var(--color-paper); border-radius: var(--radius-pill); }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: var(--marigold-100); color: var(--ink); }
.mono { font-variant-numeric: tabular-nums; font-weight: var(--fw-medium); }
.muted { color: var(--color-muted); }
h1, h2, h3 { color: var(--ink); }

/* tones: icon tiles, area chips */
.tone-mint { --tone-100: var(--mint-100); --tone-500: var(--mint-500); --tone-700: var(--mint-700); }
.tone-coral { --tone-100: var(--coral-100); --tone-500: var(--coral-500); --tone-700: var(--coral-700); }
.tone-sky { --tone-100: var(--sky-100); --tone-500: var(--sky-500); --tone-700: var(--sky-700); }
.tone-marigold { --tone-100: var(--marigold-100); --tone-500: var(--marigold-500); --tone-700: var(--marigold-700); }
.tone-teal { --tone-100: var(--teal-100); --tone-500: var(--teal-500); --tone-700: var(--teal-700); }
.tone-olive { --tone-100: var(--olive-100); --tone-500: var(--olive-500); --tone-700: var(--olive-700); }
.tone-sand { --tone-100: var(--sand-100); --tone-500: var(--khaki-500); --tone-700: var(--khaki-700); }
.tone-lilac { --tone-100: var(--lilac-100); --tone-500: var(--lilac-500); --tone-700: var(--lilac-700); }

/* ---------- Shell ---------- */
.bar { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: var(--color-plate); border-bottom: var(--rule-bar) solid var(--color-rule); }
.bar__in { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); height: var(--bar-h); display: flex; align-items: center; gap: var(--space-lg); }
.wordmark { font-weight: var(--fw-bold); font-size: var(--text-xl); line-height: 1.05; color: var(--coral-500); display: flex; align-items: center; gap: var(--space-xs); text-decoration: none; white-space: nowrap; }
.wordmark small { display: block; font-size: var(--text-sm); font-weight: var(--fw-light); color: var(--khaki-500); letter-spacing: 0; }
.wordmark svg { width: 30px; height: 30px; flex: none; }
.tabs { display: flex; gap: var(--space-2xs); }
.tab { appearance: none; border: 0; background: none; color: var(--color-ink-2); padding: 0 var(--space-md); font-weight: var(--fw-medium); font-size: var(--text-sm); cursor: pointer; display: flex; align-items: center; gap: var(--space-xs); min-height: 44px; border-radius: var(--radius-pill);
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.tab svg { width: 20px; height: 20px; flex: none; }
.tab:hover { background: var(--coral-100); color: var(--coral-700); }
.tab[aria-current="page"] { background: var(--coral-500); color: var(--white); }
.bar__end { margin-left: auto; display: flex; align-items: center; gap: var(--space-md); }
.sync { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); white-space: nowrap; }
.sync svg { width: 18px; height: 18px; flex: none; }
.sync[data-mode="ok"] svg { color: var(--mint-700); }
.sync[data-mode="error"] { color: var(--coral-700); }
.bottom-tabs { display: none; }

main { max-width: var(--container); margin-inline: auto; padding: var(--space-lg) var(--gutter) var(--space-2xl); min-width: 0; width: 100%; }

/* floating rounded sidebar */
@media (min-width: 60.0625rem) {
  :root { --bar-h: 0px; }
  body { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); align-items: start; }
  .bar { top: var(--space-md); margin: var(--space-md) 0 var(--space-md) var(--space-md); height: calc(100dvh - var(--space-xl)); border: var(--rule-bar) solid var(--color-rule); border-radius: var(--radius-card); box-shadow: var(--shadow-soft); overflow: hidden; }
  .bar__in { height: 100%; flex-direction: column; align-items: stretch; padding: var(--space-lg) var(--space-md); gap: var(--space-lg); }
  .wordmark { padding: 0 var(--space-xs); }
  .tabs { flex-direction: column; }
  .tab { min-height: var(--ctl-h); font-size: var(--text-md); padding: 0 var(--space-md); }
  .bar__end { margin: auto 0 0; flex-direction: column; align-items: stretch; gap: var(--space-sm); }
  .sync { padding: 0 var(--space-xs); white-space: normal; }
  .bar .side-art { display: block; }
  main { padding-top: var(--space-md); }
}
.side-art { height: auto; padding: var(--space-md); color: var(--ink); }
.legend { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); font-size: var(--text-sm); font-weight: var(--fw-medium); }
.legend li { display: flex; align-items: center; gap: var(--space-xs); }
.legend svg { width: 22px; height: 22px; padding: var(--space-2xs); background: var(--white); border-radius: var(--radius-pill); flex: none; overflow: visible; }
.legend path { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.legend li:nth-child(2) path { stroke: var(--teal-500); }
.legend .tri { stroke: var(--lilac-500); fill: var(--lilac-100); }

.side-art { display: none; position: relative; height: 112px; border-radius: var(--radius-tile); overflow: hidden; background: var(--mint-500); color: var(--white); }
/* brand motifs */
.shape-pattern { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--white); opacity: .5; pointer-events: none; }
.shape-pattern * { fill: none; stroke: currentColor; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.shape-pattern .dot { fill: currentColor; stroke: none; }
.edge-pill { display: inline-block; background: var(--coral-500); color: var(--white); font-weight: var(--fw-bold); line-height: 1.15; border-radius: 0 var(--radius-pill) var(--radius-pill) 0; padding: var(--space-sm) var(--space-xl) var(--space-sm) var(--space-xl); margin-left: calc(var(--space-xl) * -1); max-width: calc(100% + var(--space-xl)); position: relative; }
.sticker { position: relative; display: inline-grid; place-items: center; width: 84px; height: 84px; transform: rotate(-10deg); filter: drop-shadow(var(--shadow-sticker)); flex: none; }
.sticker svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sticker .peel { fill: var(--white); }
.sticker .face { fill: var(--marigold-500); }
.sticker span { position: relative; font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--ink); text-align: center; line-height: 1.1; padding: 0 var(--space-xs); display: grid; }
.sticker b { font-size: var(--text-xl); font-weight: var(--fw-bold); line-height: 1; }
.sticker--sm { width: 64px; height: 64px; }

.banner { position: relative; overflow: hidden; display: flex; gap: var(--space-md); align-items: center; flex-wrap: wrap; padding: var(--space-md) var(--space-lg); background: var(--sand-100); border: var(--rule-bar) solid var(--color-rule); border-radius: var(--radius-card); margin-bottom: var(--space-lg); font-size: var(--text-sm); }
.banner p { flex: 1 1 260px; position: relative; }
.banner .btn { position: relative; }
.banner--ink { background: var(--mint-500); border-color: var(--mint-500); color: var(--ink); }
.banner .shape-pattern { opacity: .3; }
.banner--ink p { font-weight: var(--fw-medium); }

/* ---------- Controls ---------- */
.btn { appearance: none; border: 0; border-radius: var(--radius-pill); background: none; color: inherit; font-weight: var(--fw-semibold); font-size: var(--text-sm); min-height: var(--ctl-h-sm); padding: 0 var(--space-md); display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out), transform var(--dur-short) var(--ease-bounce); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--coral-500); color: var(--white); min-height: var(--ctl-h); padding: 0 var(--space-lg); font-size: var(--text-md); }
.btn--primary:hover { background: var(--coral-400); }
.btn--primary:active { background: var(--coral-600); box-shadow: var(--deboss); }
.btn--secondary { box-shadow: inset 0 0 0 var(--rule-bar) var(--teal-500); color: var(--teal-700); }
.btn--secondary:hover { background: var(--teal-100); }
.btn--secondary:active { background: var(--teal-100); box-shadow: inset 0 0 0 var(--rule-bar) var(--teal-600), var(--deboss); }
.btn--ghost { color: var(--color-ink-2); padding: 0 var(--space-sm); }
.btn--ghost:hover { background: var(--sand-100); }
.btn--ghost:active { background: var(--sand-200); }
.btn--danger { color: var(--coral-700); box-shadow: inset 0 0 0 var(--rule-bar) var(--coral-500); }
.btn--danger:hover { background: var(--coral-100); }
.btn--invert { background: var(--white); color: var(--ink); }
.btn--invert:hover { background: var(--sand-100); }
.btn--invert:active { box-shadow: var(--deboss); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--sand-200); color: var(--sand-400); box-shadow: none; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; background: var(--coral-400); color: var(--white); }
.btn--icon { width: var(--ctl-h-sm); padding: 0; }

.field { display: grid; gap: var(--space-2xs); font-size: var(--text-sm); font-weight: var(--fw-medium); }
.input, .select, .textarea { width: 100%; min-height: var(--ctl-h); border: var(--rule-bar) solid var(--sand-300); border-radius: var(--radius-pill); background: var(--color-plate); color: var(--color-ink); padding: 0 var(--space-md); font-size: var(--text-md); transition: border-color var(--dur-micro) var(--ease-out); }
.textarea { border-radius: var(--radius-tile); padding: var(--space-sm) var(--space-md); min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; cursor: pointer; }
.input::placeholder, .textarea::placeholder { color: var(--color-muted); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--sand-400); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 0; border-color: var(--teal-500); box-shadow: 0 0 0 4px var(--color-focus); }
.input[aria-invalid="true"] { border-color: var(--coral-500); }
.input:disabled, .textarea:disabled { background: var(--sand-200); color: var(--sand-400); border-color: var(--sand-200); cursor: not-allowed; }
.search { position: relative; flex: 1 1 200px; min-width: 0; }
.search svg { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--color-muted); pointer-events: none; }
.search .input { padding-left: 44px; }

.cells { display: inline-flex; gap: var(--space-3xs); padding: var(--space-2xs); background: var(--sand-100); border-radius: var(--radius-pill); width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.cell { appearance: none; border: 0; background: none; color: var(--color-ink-2); min-height: 36px; padding: 0 var(--space-md); border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: var(--fw-medium); cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-2xs); white-space: nowrap;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out); }
.cell:hover { background: var(--sand-200); }
.cell[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: var(--shadow-soft); }

.check { appearance: none; width: 24px; height: 24px; border: var(--rule-bar) solid var(--sand-400); background: var(--white); border-radius: var(--radius-check); margin: 0; display: grid; place-content: center; cursor: pointer; flex: none; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.check::after { content: ""; width: 11px; height: 6px; border-left: 2.5px solid var(--white); border-bottom: 2.5px solid var(--white); transform: rotate(-45deg) scale(0); transition: transform var(--dur-short) var(--ease-bounce); translate: 0 -1px; }
.check:checked { background: var(--teal-500); border-color: var(--teal-500); }
.check:checked::after { transform: rotate(-45deg) scale(1); }
.check:hover { border-color: var(--teal-500); }
.check:disabled { background: var(--sand-200); border-color: var(--sand-200); cursor: not-allowed; }
.check-hit { width: 44px; height: 44px; display: grid; place-items: center; flex: none; cursor: pointer; }

/* ---------- Layout ---------- */
.split { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: var(--space-lg); align-items: start; }
.pane { min-width: 0; }
.pane--list { position: sticky; top: calc(var(--bar-h) + var(--space-md)); max-height: calc(100dvh - var(--bar-h) - var(--space-xl)); display: flex; flex-direction: column; border: var(--rule-bar) solid var(--color-rule); background: var(--color-plate); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-soft); }
.pane__head { padding: var(--space-lg) var(--space-lg) var(--space-md); border-bottom: var(--rule-bar) solid var(--sand-100); display: grid; gap: var(--space-sm); }
.pane__head h1 { font-size: var(--text-2xl); }
.pane__title { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.toolrow { display: flex; gap: var(--space-xs); align-items: center; flex-wrap: wrap; }
.toolrow .select { width: auto; flex: 1 1 140px; }
.pane__body { --stick-top: 0px; overflow-y: auto; overscroll-behavior: contain; flex: 1; padding: var(--space-2xs) var(--space-xs); }
.pane__foot { border-top: var(--rule-bar) solid var(--sand-100); padding: var(--space-sm) var(--space-lg); font-size: var(--text-sm); color: var(--color-muted); display: flex; justify-content: space-between; gap: var(--space-sm); flex-wrap: wrap; }

.card { background: var(--color-plate); border: var(--rule-bar) solid var(--color-rule); border-radius: var(--radius-card); box-shadow: var(--shadow-soft); min-width: 0; overflow: clip; }
.card__head { padding: var(--space-xl) var(--space-xl) var(--space-lg); border-bottom: var(--rule-bar) solid var(--sand-100); display: grid; gap: var(--space-lg); }
.card__body { padding: var(--space-md) var(--space-xl) var(--space-xl); }
.back { display: none; justify-self: start; }

/* ---------- Student list ---------- */
.srow { width: 100%; appearance: none; border: 0; background: none; color: inherit; text-align: left; padding: var(--space-xs) var(--space-sm); min-height: var(--row-h); border-radius: var(--radius-tile); display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.srow:hover { background: var(--sand-50); }
.srow[aria-current="true"] { background: var(--coral-100); }
.srow[aria-current="true"] .avatar { background: var(--coral-500); color: var(--white); }
.avatar { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius-pill); font-weight: var(--fw-semibold); font-size: var(--text-sm); background: var(--sand-100); color: var(--khaki-700); flex: none; transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.srow__name { display: block; font-weight: var(--fw-medium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.35; }
.srow__sub { display: block; font-size: var(--text-sm); font-weight: var(--fw-light); color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4; }
.tally { display: flex; gap: var(--space-sm); align-items: center; font-size: var(--text-sm); }
.tally span { display: inline-flex; align-items: center; gap: var(--space-2xs); }
.tally svg { width: 15px; height: 15px; }
.stale { color: var(--coral-700); font-weight: var(--fw-regular); }

/* ---------- Record mark: the signature ---------- */
.mark { appearance: none; border: 0; background: none; padding: 0; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; color: var(--color-ink); flex: none; position: relative; border-radius: var(--radius-pill); }
.mark::before { content: ""; position: absolute; inset: 2px; border-radius: var(--radius-pill); background: var(--sand-100); opacity: 0; transform: scale(.7); transition: opacity var(--dur-micro) var(--ease-out), transform var(--dur-short) var(--ease-bounce); }
.mark:hover::before { opacity: 1; transform: scale(1); }
.mark:active::before { background: var(--sand-200); box-shadow: var(--deboss); }
.mark svg { width: 26px; height: 26px; position: relative; transition: transform var(--dur-short) var(--ease-bounce); overflow: visible; }
.mark:active svg { transform: scale(.88); }
.rm path { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset var(--dur-long) var(--ease-out), stroke var(--dur-short) var(--ease-out); }
.rm .ghost { stroke: var(--sand-400); stroke-width: 1.6; stroke-dashoffset: 0; stroke-dasharray: 0.06 0.06; }
.rm .fill { fill: var(--lilac-100); stroke: none; transform-box: fill-box; transform-origin: 50% 70%; transition: fill var(--dur-long) var(--ease-out) .16s, transform var(--dur-long) var(--ease-bounce) .16s; }
.rm .s1, .rm .s2, .rm .s3 { stroke: var(--ink); }
.rm[data-stage="1"] .s1, .rm[data-stage="2"] .s1, .rm[data-stage="2"] .s2, .rm[data-stage="3"] path:not(.ghost) { stroke-dashoffset: 0; }
.rm[data-stage="2"] .s1, .rm[data-stage="2"] .s2 { stroke: var(--teal-500); }
.rm[data-stage="3"] .s1, .rm[data-stage="3"] .s2, .rm[data-stage="3"] .s3 { stroke: var(--lilac-500); }
.rm:not([data-stage="3"]) .fill { fill: transparent; transform: scale(.4); }
.rm[data-stage="1"] .ghost, .rm[data-stage="2"] .ghost, .rm[data-stage="3"] .ghost { opacity: 0; }
.rm.small path { stroke-width: 3; }

/* ---------- Detail (student) ---------- */
.who { display: flex; align-items: center; gap: var(--space-md); }
.who .avatar { width: 64px; height: 64px; font-size: var(--text-lg); background: var(--mint-500); color: var(--ink); }
.who h2 { font-size: var(--text-3xl); max-width: none; }
.who__meta { color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--fw-light); margin-top: var(--space-2xs); }
.who__actions { margin-left: auto; display: flex; gap: var(--space-2xs); flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-sm); }
.stat { padding: var(--space-md); display: grid; gap: var(--space-3xs); border-radius: var(--radius-tile); background: var(--tone-100); }
.stat__n { font-size: var(--text-2xl); font-weight: var(--fw-bold); line-height: 1.05; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: var(--space-xs); color: var(--ink); }
.stat__n svg { width: 20px; height: 20px; }
.stat__l { font-size: var(--text-sm); color: var(--tone-700); font-weight: var(--fw-medium); }

.areas { display: flex; gap: var(--space-xs); overflow-x: auto; padding: var(--space-2xs) var(--space-2xs) var(--space-xs); margin: 0 calc(var(--space-2xs) * -1); scrollbar-width: none; }
.areas::-webkit-scrollbar { display: none; }
.area-tab { appearance: none; border: var(--rule-bar) solid var(--sand-200); background: var(--white); color: var(--ink-2); font-weight: var(--fw-medium); font-size: var(--text-sm); padding: var(--space-xs) var(--space-md); min-height: 44px; cursor: pointer; white-space: nowrap; display: grid; gap: var(--space-3xs); text-align: left; border-radius: var(--radius-tile); flex: none; min-width: 128px;
  transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), transform var(--dur-short) var(--ease-bounce); }
.area-tab .mono { font-size: var(--text-xs); color: var(--color-muted); font-weight: var(--fw-regular); }
.area-tab:hover { border-color: var(--tone-500); transform: translateY(-2px); }
.area-tab[aria-selected="true"] { background: var(--tone-100); border-color: var(--tone-500); color: var(--tone-700); }
.area-tab[aria-selected="true"] .mono { color: var(--tone-700); }
.areabar { display: block; height: 6px; border-radius: var(--radius-pill); background: var(--sand-100); margin-top: var(--space-2xs); position: relative; overflow: hidden; }
.areabar i { position: absolute; inset: 0; background: var(--tone-500); border-radius: var(--radius-pill); transform-origin: left; transition: transform var(--dur-long) var(--ease-out); opacity: .55; }
.areabar i + i { background: var(--lilac-500); opacity: 1; }

.filters { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); flex-wrap: wrap; margin: var(--space-md) 0 var(--space-xs); }

.group { margin-top: var(--space-lg); }
.group__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); padding: 0 var(--space-2xs) var(--space-xs); }
.group__head h3 { font-size: var(--text-lg); }
.group__note { font-size: var(--text-sm); font-weight: var(--fw-light); color: var(--color-muted); text-align: right; }

.mrow { display: grid; grid-template-columns: 52px minmax(0, 1fr) 44px; gap: var(--space-sm); align-items: center; padding: var(--space-xs); border-radius: var(--radius-tile); min-height: var(--row-h); transition: background-color var(--dur-micro) var(--ease-out); }
.mrow + .mrow { margin-top: var(--space-3xs); }
.mrow:hover { background: var(--sand-50); }
.mrow__main { appearance: none; border: 0; background: none; color: inherit; text-align: left; padding: 0; cursor: pointer; min-width: 0; display: grid; gap: var(--space-3xs); min-height: 44px; align-content: center; border-radius: var(--radius-check); }
.mrow__name { font-weight: var(--fw-medium); line-height: 1.35; }
.mrow__main:hover .mrow__name { color: var(--teal-700); }
.mrow__state { font-size: var(--text-sm); font-weight: var(--fw-light); color: var(--color-muted); }
.mrow__state b { font-weight: var(--fw-medium); color: var(--ink-2); }
.mrow[data-stage="2"] .mrow__state b { color: var(--teal-700); }
.mrow[data-stage="3"] .mrow__state b { color: var(--lilac-700); }
.tag { font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--khaki-700); background: var(--sand-100); padding: var(--space-3xs) var(--space-xs); border-radius: var(--radius-pill); margin-left: var(--space-xs); white-space: nowrap; vertical-align: 2px; }
.tag--opt { background: var(--marigold-100); color: var(--marigold-700); }

/* glyph tile: soft rounded icon tile in the area tone */
.gl { width: 52px; height: 52px; background: var(--tone-100, var(--sand-100)); border-radius: var(--radius-tile); display: grid; place-items: center; flex: none; overflow: hidden; transition: transform var(--dur-short) var(--ease-bounce), box-shadow var(--dur-short) var(--ease-out); }
.gl svg { width: 42px; height: 42px; overflow: visible; }
.mrow:hover .gl, .mlist-row:hover .gl { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.gl--lg { width: 120px; height: 120px; border-radius: var(--radius-card); }
.gl--lg svg { width: 96px; height: 96px; }

/* expand panel */
.more { grid-column: 1 / -1; min-width: 0; grid-template-columns: minmax(0, 1fr); display: grid; gap: var(--space-md); padding: var(--space-lg); margin: var(--space-2xs) 0 var(--space-xs); background: var(--sand-50); border: var(--rule-bar) solid var(--sand-200); border-radius: var(--radius-card); animation: open var(--dur-long) var(--ease-bounce); }
@keyframes open { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.more__dates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); }
.more__foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); flex-wrap: wrap; font-size: var(--text-sm); color: var(--color-muted); }
.more__foot a { color: var(--teal-700); font-weight: var(--fw-medium); text-decoration-color: var(--teal-400); }
.more .cells { background: var(--white); border: var(--rule-bar) solid var(--sand-200); }
.more .cell[aria-pressed="true"] { background: var(--teal-600); color: var(--white); box-shadow: none; }
.more .cell[aria-pressed="true"] .rm path:not(.ghost) { stroke: var(--white); }
.more .cell[aria-pressed="true"] .rm .fill { fill: transparent; }

/* ---------- Material list ---------- */
.mlist-row { width: 100%; appearance: none; border: 0; background: none; color: inherit; text-align: left; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-tile); display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; cursor: pointer; min-height: var(--row-h); transition: background-color var(--dur-micro) var(--ease-out); }
.mlist-row:hover { background: var(--sand-50); }
.mlist-row[aria-current="true"] { background: var(--coral-100); }
.mlist-row__n { font-size: var(--text-sm); text-align: right; line-height: 1.3; font-weight: var(--fw-semibold); }
.mlist-row__n small { display: block; color: var(--lilac-700); font-size: var(--text-xs); font-weight: var(--fw-regular); }
.mlist-group { padding: var(--space-md) var(--space-sm) var(--space-2xs); font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--khaki-700); background: var(--white); position: sticky; top: var(--stick-top); z-index: 1; }

.mhead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-lg); align-items: center; }
.mhead h2 { font-size: var(--text-3xl); max-width: 22ch; }
.mhead__meta { color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--fw-light); margin-top: var(--space-xs); }
.stagefilter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-sm); }
.sf { appearance: none; border: var(--rule-bar) solid transparent; background: var(--tone-100); color: var(--ink); text-align: left; padding: var(--space-md); border-radius: var(--radius-tile); cursor: pointer; display: grid; gap: var(--space-3xs); min-height: 76px;
  transition: border-color var(--dur-micro) var(--ease-out), transform var(--dur-short) var(--ease-bounce), box-shadow var(--dur-short) var(--ease-out); }
.sf:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.sf:active { transform: none; box-shadow: var(--deboss); }
.sf[aria-pressed="true"] { border-color: var(--tone-500); box-shadow: 0 0 0 2px var(--tone-500); }
.sf__n { font-size: var(--text-2xl); font-weight: var(--fw-bold); line-height: 1; display: flex; align-items: center; gap: var(--space-xs); font-variant-numeric: tabular-nums; }
.sf__n svg { width: 20px; height: 20px; }
.sf__l { font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--tone-700); }

.rrow { display: grid; grid-template-columns: 44px 44px minmax(0, 1fr) 44px; gap: var(--space-xs); align-items: center; border-radius: var(--radius-tile); padding: var(--space-2xs) var(--space-xs); min-height: var(--row-h); transition: background-color var(--dur-micro) var(--ease-out); }
.rrow:hover { background: var(--sand-50); }
.rrow.is-sel { background: var(--teal-100); }
.rrow__who { appearance: none; border: 0; background: none; padding: 0; color: inherit; text-align: left; cursor: pointer; min-width: 0; min-height: 44px; display: grid; align-content: center; border-radius: var(--radius-check); }
.rrow__who:hover .srow__name { color: var(--teal-700); }

.bulk { position: sticky; bottom: var(--space-md); z-index: var(--z-raised); margin-top: var(--space-md); background: var(--ink); color: var(--white); display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-lg); flex-wrap: wrap; border-radius: var(--radius-card); box-shadow: var(--shadow-lift); animation: rise var(--dur-long) var(--ease-bounce); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.bulk__n { font-weight: var(--fw-semibold); margin-right: auto; }
.bulk .input, .bulk .select { width: auto; min-height: var(--ctl-h-sm); border-color: var(--ink-2); }
.bulk .btn--ghost { color: var(--white); }
.bulk .btn--ghost:hover { background: var(--ink-2); }
.bulk .btn--invert { background: var(--coral-500); color: var(--white); }
.bulk .btn--invert:hover { background: var(--coral-400); }

/* ---------- Rekap matrix ---------- */
.rekap-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-lg); }
.rekap-head h1 { font-size: var(--text-3xl); }
.rekap-tools { display: flex; gap: var(--space-xs); flex-wrap: wrap; align-items: center; }
.rekap-tools .select { width: auto; min-width: 200px; }
.matrix-wrap { --stick-top: 0px; overflow: auto; max-height: calc(100dvh - var(--bar-h) - 200px); min-height: 320px; border: var(--rule-bar) solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-plate); overscroll-behavior: contain; box-shadow: var(--shadow-soft); }
.matrix { border-collapse: separate; border-spacing: 0; font-size: var(--text-sm); }
.matrix th, .matrix td { border-right: var(--rule-hair) solid var(--sand-100); border-bottom: var(--rule-hair) solid var(--sand-100); padding: 0; }
.matrix thead th { position: sticky; top: var(--stick-top); z-index: 2; background: var(--white); vertical-align: bottom; font-weight: var(--fw-medium); }
.matrix thead tr.g th { top: var(--stick-top); height: 36px; text-align: left; padding: 0 var(--space-xs); white-space: nowrap; font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--khaki-700); background: var(--sand-50); border-bottom: var(--rule-bar) solid var(--sand-200); }
.matrix thead tr.m th { top: 36px; border-bottom: var(--rule-bar) solid var(--sand-300); }
.matrix .mh { text-decoration: none; color: var(--ink-2); writing-mode: vertical-rl; transform: rotate(180deg); height: 168px; width: 36px; padding: var(--space-xs) 0; text-align: left; line-height: 1.15; font-size: var(--text-xs); white-space: normal; overflow: hidden; display: block; margin-inline: auto; cursor: pointer; }
.matrix .mh:hover { color: var(--coral-700); }
.matrix th.corner { position: sticky; left: 0; z-index: 3; background: var(--sand-50); min-width: 200px; text-align: left; padding: var(--space-sm); vertical-align: bottom; border-right: var(--rule-bar) solid var(--sand-200); }
.matrix tbody th { position: sticky; left: 0; z-index: 1; background: var(--white); text-align: left; font-weight: var(--fw-medium); padding: 0 var(--space-sm); min-width: 200px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 44px; border-right: var(--rule-bar) solid var(--sand-200); }
.matrix tbody th button { appearance: none; border: 0; background: none; color: inherit; padding: 0; font: inherit; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 44px; }
.matrix tbody th button:hover { color: var(--teal-700); }
.matrix tbody tr:hover th, .matrix tbody tr:hover td { background: var(--sand-50); }
.matrix td { width: 38px; height: 44px; text-align: center; }
.matrix td .mark { width: 38px; height: 44px; border-radius: var(--radius-check); }
.matrix td .mark svg { width: 20px; height: 20px; }
.matrix td .mark.cellmark::after { content: ""; width: 5px; height: 5px; border-radius: var(--radius-pill); background: var(--sand-300); position: absolute; left: 50%; top: 50%; translate: -50% -50%; }
.matrix td .mark.cellmark:has(svg)::after { display: none; }
.matrix tfoot td, .matrix tfoot th { position: sticky; bottom: 0; background: var(--sand-100); font-size: var(--text-xs); font-weight: var(--fw-semibold); height: 36px; border-top: var(--rule-bar) solid var(--sand-300); }
.matrix tfoot th { left: 0; z-index: 3; text-align: left; padding: 0 var(--space-sm); }
.mark[aria-disabled="true"] { cursor: not-allowed; }
.mark[aria-disabled="true"]:hover::before { opacity: 0; }

.attn { margin-top: var(--space-xl); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-lg); }
.attn > section { background: var(--white); border: var(--rule-bar) solid var(--color-rule); border-radius: var(--radius-card); padding: var(--space-lg); box-shadow: var(--shadow-soft); }
.attn > section:first-child { border: var(--rule-emph) solid var(--coral-500); }
.attn h2 { font-size: var(--text-lg); margin-bottom: var(--space-2xs); }
.attn p { font-size: var(--text-sm); font-weight: var(--fw-light); color: var(--color-muted); margin-bottom: var(--space-sm); }
.rule-list { list-style: none; margin: 0; padding: 0; }
.rule-list li + li { border-top: var(--rule-hair) solid var(--sand-100); }
.rule-list button { appearance: none; border: 0; background: none; color: inherit; width: 100%; text-align: left; display: flex; justify-content: space-between; gap: var(--space-sm); padding: var(--space-xs) var(--space-xs); min-height: 44px; align-items: center; cursor: pointer; border-radius: var(--radius-check); font-weight: var(--fw-medium); }
.rule-list button:hover { background: var(--sand-50); color: var(--teal-700); }
.rule-list .mono { font-size: var(--text-sm); color: var(--color-muted); font-weight: var(--fw-regular); }

.backup { margin-top: var(--space-lg); display: flex; gap: var(--space-xs); flex-wrap: wrap; align-items: center; padding: var(--space-md) var(--space-lg); background: var(--sand-100); border-radius: var(--radius-card); }
.backup p { flex: 1 1 300px; font-size: var(--text-sm); color: var(--ink-2); }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--space-md); }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.form__actions { display: flex; gap: var(--space-xs); flex-wrap: wrap; }
.hint { font-size: var(--text-sm); font-weight: var(--fw-light); color: var(--color-muted); }
.err { font-size: var(--text-sm); color: var(--coral-700); font-weight: var(--fw-medium); }
pre.sample { margin: 0; padding: var(--space-md); background: var(--sand-50); border: var(--rule-bar) solid var(--sand-200); border-radius: var(--radius-tile); font-family: var(--font-body); font-size: var(--text-xs); overflow-x: auto; line-height: 1.7; }
.file-input { padding-top: var(--space-xs); }

/* ---------- States ---------- */
.empty { padding: var(--space-xl) var(--space-lg); display: grid; gap: var(--space-md); justify-items: start; position: relative; }
.empty h2 { font-size: var(--text-xl); }
.empty p { color: var(--ink-2); max-width: 46ch; position: relative; }
.empty__actions { display: flex; gap: var(--space-xs); flex-wrap: wrap; position: relative; }
.hero-empty { position: relative; overflow: hidden; background: var(--mint-500); min-height: 440px; display: grid; align-content: center; gap: var(--space-lg); padding: var(--space-2xl) var(--space-xl); }
.hero-empty .edge-pill { font-size: var(--text-2xl); justify-self: start; }
.hero-empty p { position: relative; max-width: 44ch; color: var(--ink); font-weight: var(--fw-medium); }
.hero-empty .gl--lg { position: relative; background: var(--white); box-shadow: var(--shadow-soft); }
.hero-empty .sticker { position: absolute; right: var(--space-xl); top: var(--space-xl); }
.skel { display: grid; grid-template-columns: 44px 1fr; gap: var(--space-xs) var(--space-sm); padding: var(--space-sm); }
.skel i { display: block; background: var(--sand-100); height: 12px; border-radius: var(--radius-pill); animation: shimmer 1.2s var(--ease-in-out) infinite alternate; }
.skel i:first-child { height: 44px; grid-row: span 2; }
.skel i:last-child { width: 60%; }
@keyframes shimmer { to { opacity: .45; } }
.none { padding: var(--space-lg) var(--space-md); color: var(--color-muted); font-size: var(--text-sm); }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 0; right: 0; bottom: var(--space-lg); margin-inline: auto; z-index: var(--z-toast); display: grid; gap: var(--space-xs); width: 100%; max-width: 592px; padding-inline: var(--space-md); pointer-events: none; }
body:has(.bulk) .toasts { bottom: calc(var(--space-lg) + 96px); }
.toast { pointer-events: auto; background: var(--ink); color: var(--white); display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-lg); border-radius: var(--radius-pill); box-shadow: var(--shadow-lift); animation: rise var(--dur-long) var(--ease-bounce); min-height: 56px; }
.toast p { flex: 1; font-size: var(--text-sm); }
.toast .btn { color: var(--white); }
.toast .btn:hover { background: var(--ink-2); }
.toast .btn:first-of-type:not(.btn--icon) { color: var(--marigold-500); }
.toast.is-out { opacity: 0; transform: translateY(8px); transition: opacity var(--dur-short) var(--ease-in), transform var(--dur-short) var(--ease-in); }
.toast--err { background: var(--coral-700); }

.selall { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--text-sm); font-weight: var(--fw-medium); cursor: pointer; padding-right: var(--space-sm); min-height: 44px; }
.roster-tools { display: flex; gap: var(--space-sm); align-items: center; flex-wrap: wrap; margin-bottom: var(--space-sm); }


/* ---------- Lesson plan ---------- */
.area-tab--plan { min-width: 168px; }
.tag--plan { background: var(--coral-100); color: var(--coral-700); }
.tag--next { background: var(--teal-100); color: var(--teal-700); }
.tag--tone { background: var(--white); color: var(--tone-700); margin-left: 0; }
.late { color: var(--coral-700); font-weight: var(--fw-semibold); }
.plan-txt { color: var(--coral-700); font-weight: var(--fw-regular); }
.more__plan { display: flex; align-items: flex-end; gap: var(--space-xs); flex-wrap: wrap; padding: var(--space-md); background: var(--white); border-radius: var(--radius-tile); border: var(--rule-bar) dashed var(--coral-400); }
.more__plan .field { flex: 0 1 200px; }
.btn--sm { min-height: var(--ctl-h-sm); font-size: var(--text-sm); padding: 0 var(--space-md); }
.btn--primary.btn--sm { padding: 0 var(--space-md); }
.btn svg.rm { width: 16px; height: 16px; }
.btn--primary svg.rm .s1 { stroke: var(--white); }
.field--inline { display: flex; align-items: center; gap: var(--space-xs); white-space: nowrap; }
.field--inline .input { width: auto; min-height: var(--ctl-h-sm); }

.plan { display: grid; gap: var(--space-xl); margin-top: var(--space-md); }
.plan-sec { display: grid; gap: var(--space-sm); }
.plan-sec__head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-sm); flex-wrap: wrap; }
.plan-sec__head h3 { font-size: var(--text-xl); }
.plan-sec__head .hint { max-width: 60ch; margin-top: var(--space-2xs); }
.plan-empty { padding: var(--space-lg); background: var(--sand-50); border: var(--rule-bar) dashed var(--sand-300); border-radius: var(--radius-card); color: var(--ink-2); font-size: var(--text-sm); }
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-xs); }
.prow { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-xs); border: var(--rule-bar) solid var(--sand-200); border-radius: var(--radius-card); background: var(--white); transition: border-color var(--dur-micro) var(--ease-out); }
.prow:hover { border-color: var(--sand-300); }
.prow.is-late { border-color: var(--coral-400); background: var(--coral-100); }
.prow__main { display: grid; gap: var(--space-3xs); min-width: 0; }
.prow__act { display: flex; gap: var(--space-2xs); align-items: center; padding-right: var(--space-2xs); }
.prow--sm { grid-template-columns: 44px minmax(0, 1fr) auto; border-radius: var(--radius-tile); }
.prow--sm .gl { width: 44px; height: 44px; } .prow--sm .gl svg { width: 34px; height: 34px; }

.sugg { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-sm); }
.sugg-card { display: grid; gap: var(--space-xs); align-content: start; padding: var(--space-md); border-radius: var(--radius-card); background: var(--tone-100); border: var(--rule-bar) solid transparent; transition: transform var(--dur-short) var(--ease-bounce), box-shadow var(--dur-short) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.sugg-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); border-color: var(--tone-500); }
.sugg-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-xs); }
.sugg-card .gl { background: var(--white); }
.sugg-card h4 { margin: 0; font-size: var(--text-md); font-weight: var(--fw-semibold); line-height: 1.3; }
.sugg-card__why { display: flex; gap: var(--space-2xs); align-items: flex-start; font-size: var(--text-sm); color: var(--ink-2); font-weight: var(--fw-light); line-height: 1.4; }
.sugg-card__why svg { width: 16px; height: 16px; flex: none; margin-top: var(--space-3xs); overflow: visible; }
.sugg-card .btn { justify-self: start; margin-top: var(--space-2xs); background: var(--white); }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: var(--space-2xs); }
.timeline::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: var(--sand-200); border-radius: var(--radius-pill); }
.tl { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: var(--space-sm); align-items: center; min-height: 56px; }
.tl__n { width: 44px; height: 44px; border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--white); border: var(--rule-bar) solid var(--sand-300); font-weight: var(--fw-semibold); font-size: var(--text-sm); font-variant-numeric: tabular-nums; position: relative; }
.tl[data-stage="2"] .tl__n { border-color: var(--teal-500); color: var(--teal-700); }
.tl[data-stage="3"] .tl__n { border-color: var(--lilac-500); background: var(--lilac-100); color: var(--lilac-700); }
.tl__main { display: grid; gap: var(--space-3xs); min-width: 0; }
.tl__mark { display: grid; place-items: center; }
.tl__mark svg { width: 22px; height: 22px; overflow: visible; }

.plan-sum { margin-bottom: var(--space-md); font-size: var(--text-md); color: var(--ink-2); }
.plist--groups { gap: var(--space-sm); }
.pgroup { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: var(--space-md); align-items: start; padding: var(--space-lg); background: var(--white); border: var(--rule-bar) solid var(--color-rule); border-radius: var(--radius-card); box-shadow: var(--shadow-soft); }
.pgroup__main { display: grid; gap: var(--space-xs); min-width: 0; }
.pgroup__main h3 { font-size: var(--text-lg); }
.chips { list-style: none; margin: var(--space-2xs) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.chip { display: inline-flex; align-items: center; background: var(--sand-100); border-radius: var(--radius-pill); padding-left: var(--space-2xs); }
.chip.is-late { background: var(--coral-100); }
.chip__name { appearance: none; border: 0; background: none; color: var(--ink); font-size: var(--text-sm); font-weight: var(--fw-medium); padding: 0 var(--space-xs) 0 var(--space-sm); min-height: 36px; cursor: pointer; border-radius: var(--radius-pill); }
.chip__name:hover { color: var(--teal-700); }
.chip__x { appearance: none; border: 0; background: none; width: 36px; height: 36px; border-radius: var(--radius-pill); display: grid; place-items: center; cursor: pointer; color: var(--ink-muted); transition: background-color var(--dur-micro) var(--ease-out); }
.chip__x:hover { background: var(--sand-200); color: var(--ink); }
.chip__x svg { width: 14px; height: 14px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-md); }
.pcard { background: var(--white); border: var(--rule-bar) solid var(--color-rule); border-radius: var(--radius-card); padding: var(--space-md); display: grid; gap: var(--space-sm); align-content: start; box-shadow: var(--shadow-soft); }
.pcard__head { display: flex; gap: var(--space-sm); align-items: center; }
.pcard__name { appearance: none; border: 0; background: none; padding: 0; font: inherit; font-weight: var(--fw-semibold); color: var(--ink); cursor: pointer; text-align: left; }
.pcard__name:hover { color: var(--teal-700); }
@media (max-width: 45rem) {
  .prow { grid-template-columns: 44px minmax(0, 1fr); }
  .prow .gl { width: 44px; height: 44px; } .prow .gl svg { width: 34px; height: 34px; }
  .prow__act { grid-column: 1 / -1; justify-content: flex-start; padding: 0 0 var(--space-2xs) 0; }
  .prow--sm { grid-template-columns: 44px minmax(0, 1fr) auto; } .prow--sm .prow__act { grid-column: auto; padding: 0; }
  .pgroup { grid-template-columns: 48px minmax(0, 1fr); padding: var(--space-md); }
  .pgroup > .btn { grid-column: 1 / -1; }
  .pgroup .chips { margin-left: calc(var(--space-3xl) * -1); }
  .field--inline { width: 100%; } .field--inline .input { flex: 1; }
  .sugg { grid-template-columns: minmax(0, 1fr); }
}


/* ---------- Plan board (one card per child) ---------- */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-sm); align-items: start; }
.bcard { position: relative; background: var(--white); border: var(--rule-bar) solid var(--sand-200); border-radius: var(--radius-tile); padding: var(--space-sm) var(--space-sm) var(--space-xs) var(--space-md); display: grid; gap: var(--space-2xs); align-content: start; min-height: 148px; transition: border-color var(--dur-micro) var(--ease-out), box-shadow var(--dur-short) var(--ease-out); }
.bcard:hover { border-color: var(--sand-300); }
.bcard:focus-within { border-color: var(--teal-400); box-shadow: var(--shadow-soft); z-index: var(--z-dropdown); }
.bcard__name { appearance: none; border: 0; background: none; padding: var(--space-2xs) 0; font: inherit; font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--ink); text-align: left; cursor: pointer; justify-self: start; text-decoration: underline; text-decoration-color: var(--sand-400); text-underline-offset: 3px; border-radius: var(--radius-check); }
.bcard__name:hover { color: var(--teal-700); text-decoration-color: var(--teal-500); }
.blist { list-style: none; margin: 0; padding: 0; display: grid; }
.bitem { display: grid; grid-template-columns: minmax(0, 1fr) 32px; align-items: center; border-radius: var(--radius-check); transition: background-color var(--dur-micro) var(--ease-out); }
.bitem:hover { background: var(--sand-50); }
.bitem label { display: flex; align-items: center; gap: var(--space-xs); min-height: 32px; cursor: pointer; font-size: var(--text-sm); line-height: 1.3; padding: var(--space-2xs) 0; }
.check--sm { width: 18px; height: 18px; border-radius: 6px; }
.check--sm::after { width: 8px; height: 4px; border-width: 2px; }
.bitem__name { text-decoration: line-through; text-decoration-color: transparent; text-decoration-thickness: 2px; transition: color var(--dur-short) var(--ease-out), text-decoration-color var(--dur-short) var(--ease-out); }
.bitem.is-done .bitem__name { color: var(--color-muted); text-decoration-color: var(--lilac-500); }
.bitem.is-done { animation: done-out var(--dur-long) var(--ease-in) .3s both; }
@keyframes done-out { to { opacity: .4; } }
.bitem.is-late .bitem__name { color: var(--coral-700); }
.bitem__x { appearance: none; border: 0; background: none; width: 32px; height: 32px; border-radius: var(--radius-pill); display: grid; place-items: center; cursor: pointer; color: var(--ink-muted); opacity: 0; transition: opacity var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.bitem__x svg { width: 14px; height: 14px; }
.bitem:hover .bitem__x, .bitem__x:focus-visible { opacity: 1; }
.bitem__x:hover { background: var(--sand-200); color: var(--ink); }
@media (hover: none) { .bitem__x { opacity: .6; } }
.bcard__add { position: relative; }
.badd { width: 100%; border: 0; background: none; color: var(--ink); font: inherit; font-size: var(--text-sm); min-height: 36px; padding: 0 var(--space-xs); margin-left: calc(var(--space-xs) * -1); border-radius: var(--radius-pill); transition: background-color var(--dur-micro) var(--ease-out); }
.badd::placeholder { color: var(--sand-400); }
.badd:hover { background: var(--sand-50); }
.badd:focus-visible { outline: 0; background: var(--sand-50); box-shadow: 0 0 0 4px var(--color-focus); }
.ac { position: absolute; left: calc(var(--space-sm) * -1); right: calc(var(--space-xs) * -1); top: calc(100% + var(--space-2xs)); z-index: var(--z-dropdown); list-style: none; margin: 0; padding: var(--space-2xs); background: var(--white); border: var(--rule-bar) solid var(--sand-200); border-radius: var(--radius-tile); box-shadow: var(--shadow-lift); max-height: 300px; overflow-y: auto; animation: open var(--dur-short) var(--ease-bounce); }
.ac li[role=option] { display: grid; gap: var(--space-3xs); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-check); cursor: pointer; }
.ac li[role=option]:hover { background: var(--sand-50); }
.ac li[aria-selected="true"] { background: var(--teal-100); }
.ac__name { font-size: var(--text-sm); font-weight: var(--fw-medium); line-height: 1.3; }
.ac__hint { font-size: var(--text-xs); font-weight: var(--fw-light); color: var(--color-muted); line-height: 1.35; }
.ac__none { padding: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
@media (max-width: 45rem) { .board { grid-template-columns: minmax(0, 1fr); } .bcard { min-height: 0; } body:has(.badd:focus) .bottom-tabs { display: none; } }
.badd { scroll-margin-top: calc(var(--bar-h) + var(--space-3xl)); }


/* ---------- Beranda ---------- */
.home { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 760px); gap: var(--space-lg); align-items: start; justify-content: center; }
.home__side { display: grid; gap: var(--space-md); position: sticky; top: calc(var(--bar-h) + var(--space-md)); }
.home__main { display: grid; gap: var(--space-md); min-width: 0; }
.hbox { background: var(--white); border: var(--rule-bar) solid var(--color-rule); border-radius: var(--radius-card); box-shadow: var(--shadow-soft); overflow: clip; }
.hbox__head { appearance: none; border: 0; background: none; width: 100%; display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-md) var(--space-lg); min-height: 56px; font: inherit; font-weight: var(--fw-semibold); color: var(--ink); cursor: pointer; text-align: left; }
.hbox__head:hover { background: var(--sand-50); }
.hbox__head > svg:first-child { width: 20px; height: 20px; color: var(--coral-500); flex: none; }
.hbox__head span { flex: 1; }
.hbox__head > svg:last-child { width: 18px; height: 18px; color: var(--ink-muted); transition: transform var(--dur-short) var(--ease-bounce); }
.hbox__head[aria-expanded="true"] > svg:last-child { transform: rotate(180deg); }
.hbox__body { padding: 0 var(--space-lg) var(--space-md); display: grid; gap: var(--space-sm); }
.hbox__empty { font-size: var(--text-sm); color: var(--color-muted); font-weight: var(--fw-light); }
.hbox__foot { display: flex; gap: var(--space-xs); flex-wrap: wrap; }
.btn--add { background: var(--teal-500); color: var(--white); }
.btn--add:hover { background: var(--teal-400); }
.btn--add:active { background: var(--teal-600); box-shadow: var(--deboss); }
.evlist, .infolist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-xs); }
.ev { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; }
.ev.is-past { opacity: .55; }
.ev__date { width: 48px; height: 52px; border-radius: var(--radius-tile); background: var(--tone-100); color: var(--tone-700); display: grid; place-content: center; text-align: center; font-size: var(--text-xs); font-weight: var(--fw-medium); line-height: 1.1; }
.ev__date b { font-size: var(--text-lg); font-weight: var(--fw-bold); }
.ev__main { display: grid; min-width: 0; }
.ev__title { font-size: var(--text-sm); font-weight: var(--fw-medium); line-height: 1.3; }
.ev__meta { font-size: var(--text-xs); color: var(--tone-700); font-weight: var(--fw-regular); }
.ev__x, .info__edit { appearance: none; border: 0; background: none; color: var(--ink-muted); cursor: pointer; border-radius: var(--radius-pill); }
.ev__x { width: 32px; height: 32px; display: grid; place-items: center; opacity: 0; transition: opacity var(--dur-micro) var(--ease-out); }
.ev__x svg { width: 14px; height: 14px; }
.ev:hover .ev__x, .ev__x:focus-visible { opacity: 1; }
@media (hover: none) { .ev__x { opacity: .6; } }
.ev__x:hover { background: var(--sand-100); color: var(--ink); }
.info__row { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-sm); }
.info__t { appearance: none; border: 0; background: none; padding: var(--space-2xs) 0; font: inherit; font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--teal-700); text-align: left; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: var(--space-2xs); line-height: 1.35; border-radius: var(--radius-check); }
.info__t svg { width: 14px; height: 14px; flex: none; }
.info__t:hover { text-decoration: underline; text-underline-offset: 3px; }
.info__edit { font-size: var(--text-xs); font-weight: var(--fw-medium); padding: var(--space-2xs) var(--space-xs); min-height: 32px; }
.info__edit:hover { background: var(--sand-100); color: var(--ink); }
.info__body { font-size: var(--text-sm); color: var(--ink-2); white-space: pre-wrap; padding: var(--space-xs) var(--space-sm); background: var(--sand-50); border-radius: var(--radius-tile); margin-top: var(--space-2xs); }
.info__body a { color: var(--teal-700); }
.hform { display: grid; gap: var(--space-sm); padding: var(--space-md); background: var(--sand-50); border-radius: var(--radius-tile); }
.hform .input, .hform .select { min-height: var(--ctl-h-sm); font-size: var(--text-sm); }
.hform .textarea { font-size: var(--text-sm); min-height: 88px; }
.hform__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); }
.quote { margin: var(--space-xs) var(--space-xs) 0; position: relative; padding: var(--space-lg); background: var(--marigold-100); border-radius: var(--radius-card); }
.quote blockquote { margin: 0; font-size: var(--text-lg); font-weight: var(--fw-semibold); line-height: 1.3; color: var(--ink); }
.quote figcaption { margin-top: var(--space-xs); font-size: var(--text-sm); font-weight: var(--fw-light); color: var(--marigold-700); }

.composer { padding: var(--space-lg) var(--space-xl) var(--space-md); }
.composer h1 { font-size: var(--text-2xl); margin-bottom: var(--space-md); }
.cform { display: grid; gap: var(--space-sm); }
.cform .select { justify-self: start; width: auto; min-width: 240px; }
.cform__check { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--text-sm); font-weight: var(--fw-medium); cursor: pointer; min-height: 32px; }
.input--box { border-radius: var(--radius-tile); }
.cform .textarea { min-height: 120px; }
.cform__bar { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
.cform__bar label.btn { cursor: pointer; }
.cform__sp { flex: 1; }
.cform__note { margin-top: calc(var(--space-2xs) * -1); }
.cimgs { display: flex; gap: var(--space-xs); flex-wrap: wrap; }
.cimg { position: relative; margin: 0; width: 120px; height: 90px; border-radius: var(--radius-tile); overflow: hidden; border: var(--rule-bar) solid var(--sand-200); }
.cimg img { width: 100%; height: 100%; object-fit: cover; }
.cimg button { position: absolute; top: var(--space-2xs); right: var(--space-2xs); width: 28px; height: 28px; border-radius: var(--radius-pill); border: 0; background: var(--color-overlay); color: var(--white); display: grid; place-items: center; cursor: pointer; }
.cimg button svg { width: 14px; height: 14px; }

.feed-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-top: var(--space-sm); flex-wrap: wrap; }
.feed-head h2 { font-size: var(--text-xl); }
.feed-head .select { width: auto; min-width: 200px; min-height: var(--ctl-h-sm); font-size: var(--text-sm); }
#feed { display: grid; gap: var(--space-md); }
.feed-empty { padding: var(--space-xl); background: var(--white); border: var(--rule-bar) dashed var(--sand-300); border-radius: var(--radius-card); color: var(--ink-2); text-align: center; }
.post { padding: var(--space-lg) var(--space-xl); display: grid; gap: var(--space-xs); overflow: visible; }
.post.is-pinned { border: var(--rule-emph) solid var(--marigold-500); }
.post__head { display: flex; align-items: center; gap: var(--space-sm); }
.post__head .avatar { background: var(--coral-100); color: var(--coral-700); }
.post__who { display: grid; min-width: 0; flex: 1; }
.post__name { font-weight: var(--fw-semibold); font-size: var(--text-sm); }
.post__time { font-size: var(--text-xs); color: var(--color-muted); font-weight: var(--fw-light); }
.post__pin { display: inline-flex; align-items: center; gap: var(--space-2xs); font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--marigold-700); background: var(--marigold-100); padding: var(--space-2xs) var(--space-sm); border-radius: var(--radius-pill); }
.post__pin svg { width: 14px; height: 14px; }
.post__menu { position: relative; }
.pmenu { position: absolute; right: 0; top: calc(100% + var(--space-2xs)); z-index: var(--z-dropdown); background: var(--white); border: var(--rule-bar) solid var(--sand-200); border-radius: var(--radius-tile); box-shadow: var(--shadow-lift); padding: var(--space-2xs); display: grid; min-width: 180px; animation: open var(--dur-short) var(--ease-bounce); }
.pmenu button { appearance: none; border: 0; background: none; text-align: left; font: inherit; font-size: var(--text-sm); padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-check); cursor: pointer; min-height: 40px; color: var(--ink); }
.pmenu button:hover { background: var(--sand-50); }
.pmenu .danger { color: var(--coral-700); }
.post__title { font-size: var(--text-xl); margin-top: var(--space-xs); max-width: none; }
.post__to { font-size: var(--text-xs); color: var(--color-muted); }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius-card) var(--radius-card) var(--radius-card) 72px; margin: var(--space-xs) 0; scrollbar-width: thin; }
.gallery.is-multi { grid-auto-columns: 88%; gap: var(--space-xs); }
.gallery img { width: 100%; height: auto; max-height: 520px; object-fit: cover; scroll-snap-align: start; border-radius: inherit; }
.post__body { white-space: pre-wrap; font-size: var(--text-md); color: var(--ink-2); line-height: 1.65; overflow-wrap: anywhere; }
.post__body a { color: var(--teal-700); }
.post__body.is-clamped { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.post__more { justify-self: start; color: var(--teal-700); padding: 0; }

@media (max-width: 80rem) { .home { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); } }
@media (max-width: 60rem) {
  .home { grid-template-columns: minmax(0, 1fr); }
  .home__side { position: static; order: 2; }
}
@media (max-width: 45rem) {
  .composer, .post { padding: var(--space-md); }
  .composer h1 { font-size: var(--text-xl); }
  .cform .select { min-width: 0; width: 100%; }
  .gallery { border-radius: var(--radius-tile) var(--radius-tile) var(--radius-tile) 40px; }
}


.langsw { align-self: flex-start; }
.langsw .cell { min-height: 32px; padding: 0 var(--space-sm); font-weight: var(--fw-semibold); font-size: var(--text-xs); }
@media (max-width: 45rem) { .langsw .cell { min-height: 32px; padding: 0 var(--space-xs); } .langsw { align-self: center; } }

/* ---------- Aktivitas (photos) ---------- */
.tshort { display: none; }
.bottom-tabs .tlong { display: none; } .bottom-tabs .tshort { display: inline; }
.act { display: grid; gap: var(--space-md); }
.act-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; }
.act-head h1 { font-size: var(--text-3xl); }
.act-tools { display: flex; gap: var(--space-xs); flex-wrap: wrap; align-items: center; }
.act-tools .select { width: auto; min-width: 200px; }
.act-tools .cell .mono { font-size: var(--text-xs); background: var(--sand-200); border-radius: var(--radius-pill); padding: 0 var(--space-xs); margin-left: var(--space-2xs); }
.act-tools .cell[aria-pressed="true"] .mono { background: var(--teal-100); color: var(--teal-700); }
.pcomp { padding: var(--space-xs); overflow: visible; }
.pcomp__open { appearance: none; border: 0; background: none; width: 100%; display: flex; align-items: center; gap: var(--space-sm); min-height: 52px; padding: 0 var(--space-md); font: inherit; color: var(--color-muted); cursor: pointer; border-radius: var(--radius-tile); text-align: left; }
.pcomp__open:hover { background: var(--sand-50); color: var(--ink); }
.pcomp__open svg { width: 22px; height: 22px; color: var(--coral-500); flex: none; }
.pform { display: grid; gap: var(--space-md); padding: var(--space-md); }
.pform__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.pform__head h2 { font-size: var(--text-xl); }
.pform__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.pform__bar { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; justify-content: flex-end; }
.pform__bar .hint { margin-right: auto; }
.drop { display: block; border: var(--rule-bar) dashed var(--sand-300); border-radius: var(--radius-card); background: var(--sand-50); cursor: pointer; transition: border-color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.drop:hover { border-color: var(--coral-400); background: var(--coral-100); }
.drop:focus-within { box-shadow: 0 0 0 4px var(--color-focus); }
.drop__empty { display: grid; justify-items: center; gap: var(--space-2xs); padding: var(--space-xl) var(--space-md); text-align: center; color: var(--ink-2); font-size: var(--text-sm); }
.drop__empty svg { width: 32px; height: 32px; color: var(--coral-500); }
.drop__empty b { font-size: var(--text-md); color: var(--ink); }
.drop__thumbs { display: flex; flex-wrap: wrap; gap: var(--space-xs); padding: var(--space-sm); }
.drop__t { position: relative; width: 96px; height: 96px; border-radius: var(--radius-tile); overflow: hidden; }
.drop__t img { width: 100%; height: 100%; object-fit: cover; }
.drop__t button { position: absolute; top: var(--space-2xs); right: var(--space-2xs); width: 28px; height: 28px; border: 0; border-radius: var(--radius-pill); background: var(--color-overlay); color: var(--white); display: grid; place-items: center; cursor: pointer; }
.drop__t button svg { width: 14px; height: 14px; }
.drop__add { width: 96px; height: 96px; border-radius: var(--radius-tile); border: var(--rule-bar) dashed var(--sand-300); display: grid; place-content: center; justify-items: center; gap: var(--space-2xs); font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--ink-2); }
.drop__add svg { width: 22px; height: 22px; color: var(--coral-500); }
.picker { display: flex; flex-wrap: wrap; gap: var(--space-2xs); align-items: center; min-height: var(--ctl-h); padding: var(--space-2xs) var(--space-xs); border: var(--rule-bar) solid var(--sand-300); border-radius: var(--radius-tile); background: var(--white); font-weight: var(--fw-regular); transition: border-color var(--dur-micro) var(--ease-out); }
.picker:focus-within { border-color: var(--teal-500); box-shadow: 0 0 0 4px var(--color-focus); }
.picker .chip { background: var(--teal-100); }
.picker [data-kind] { }
.picker[data-picker="mat"] .chip { background: var(--marigold-100); }
.picker__in { position: relative; flex: 1 1 140px; min-width: 120px; }
.picker__input { width: 100%; border: 0; background: none; font: inherit; font-size: var(--text-sm); min-height: 36px; padding: 0 var(--space-2xs); color: var(--ink); }
.picker__input:focus-visible { outline: 0; }
.picker .ac { left: calc(var(--space-xs) * -1); right: auto; min-width: 280px; }

.pgrid-in { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: var(--space-lg) var(--space-md); }
.pc { display: grid; gap: var(--space-2xs); align-content: start; min-width: 0; }
.pc__img { appearance: none; border: 0; padding: 0; background: var(--sand-100); aspect-ratio: 1; border-radius: var(--radius-tile); overflow: hidden; cursor: zoom-in; display: block; width: 100%; transition: transform var(--dur-short) var(--ease-bounce), box-shadow var(--dur-short) var(--ease-out); }
.pc__img:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.pc__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc__miss { display: grid; place-items: center; height: 100%; font-size: var(--text-xs); color: var(--color-muted); }
.pc__meta { display: flex; gap: var(--space-xs); align-items: baseline; font-size: var(--text-sm); margin-top: var(--space-2xs); }
.pc__meta b { font-weight: var(--fw-semibold); }
.pc__meta span { font-size: var(--text-xs); color: var(--color-muted); font-weight: var(--fw-light); }
.pc__cap { font-size: var(--text-sm); line-height: 1.45; color: var(--ink-2); overflow-wrap: anywhere; }
.pc__cap.is-clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cap__kid { color: var(--teal-700); font-weight: var(--fw-medium); text-decoration: none; }
.cap__mat { color: var(--coral-700); font-weight: var(--fw-medium); text-decoration: none; }
.cap__kid:hover, .cap__mat:hover { text-decoration: underline; text-underline-offset: 3px; }
.pc__more { appearance: none; border: 0; background: none; padding: 0; justify-self: start; font: inherit; font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--teal-700); cursor: pointer; min-height: 28px; }
.pc .btn--sm { justify-self: start; margin-top: var(--space-2xs); }
.kidstrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--space-xs); }
.kidstrip__p { appearance: none; border: 0; padding: 0; aspect-ratio: 1; border-radius: var(--radius-tile); overflow: hidden; background: var(--sand-100); cursor: zoom-in; }
.kidstrip__p img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lightbox { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--space-lg); }
.lightbox__scrim { position: absolute; inset: 0; background: var(--color-overlay); animation: fadein var(--dur-short) var(--ease-out); }
@keyframes fadein { from { opacity: 0; } }
.lightbox__panel { position: relative; background: var(--white); border-radius: var(--radius-dialog); overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) 360px; width: min(1180px, 100%); max-height: calc(100dvh - var(--space-2xl)); box-shadow: var(--shadow-lift); animation: open var(--dur-long) var(--ease-bounce); }
.lightbox__img { margin: 0; background: var(--ink); display: grid; place-items: center; min-height: 0; }
.lightbox__img img { max-width: 100%; max-height: calc(100dvh - var(--space-2xl)); object-fit: contain; display: block; }
.lightbox__side { padding: var(--space-lg); display: grid; gap: var(--space-md); align-content: start; overflow-y: auto; }
.lightbox__side .pform { padding: 0; }
.lightbox__cap { font-size: var(--text-md); }
.lightbox .pform__bar { justify-content: flex-start; }
@media (max-width: 60rem) {
  .lightbox { padding: 0; place-items: end stretch; }
  .lightbox__panel { grid-template-columns: minmax(0, 1fr); border-radius: var(--radius-dialog) var(--radius-dialog) 0 0; max-height: 94dvh; overflow-y: auto; }
  .lightbox__img img { max-height: 55dvh; }
}
@media (max-width: 45rem) {
  .pform__grid { grid-template-columns: minmax(0, 1fr); }
  .picker .ac { left: calc(var(--space-xs) * -1); right: calc(var(--space-xs) * -1); min-width: 0; }
  body:has(.picker__input:focus) .bottom-tabs { display: none; }
  .pgrid-in { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md) var(--space-sm); }
  .act-head h1 { font-size: var(--text-2xl); }
  .act-tools .select { flex: 1 1 100%; }
  .bottom-tabs .tab { font-size: var(--text-xs); }
  .bottom-tabs .tab svg { width: 20px; height: 20px; }
}


/* ---------- Report builder ---------- */
.report .card__head { gap: var(--space-md); }
.report h2 { font-size: var(--text-2xl); }
.rep-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 160px)) minmax(0, 1fr); gap: var(--space-sm); }
.rep-body { display: grid; gap: var(--space-xl); }
.rep-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-md); }
.rp { display: grid; gap: var(--space-xs); align-content: start; opacity: .55; transition: opacity var(--dur-short) var(--ease-out); }
.rp.is-on { opacity: 1; }
.rp__img { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-tile); overflow: hidden; background: var(--sand-100); }
.rp__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp__check { position: absolute; left: var(--space-2xs); top: var(--space-2xs); width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
.rp__check .check { box-shadow: var(--shadow-soft); }
.rp__cover { position: absolute; right: var(--space-2xs); top: var(--space-2xs); width: 36px; height: 36px; border: 0; border-radius: var(--radius-pill); background: var(--color-overlay); display: grid; place-items: center; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-short) var(--ease-bounce); }
.rp__cover svg { width: 18px; height: 18px; fill: none; stroke: var(--white); stroke-width: 2; stroke-linejoin: round; }
.rp__cover:hover { transform: scale(1.08); }
.rp__cover.is-on { background: var(--marigold-500); }
.rp__cover.is-on svg { fill: var(--white); }
.select--sm, .input--sm { min-height: var(--ctl-h-sm); font-size: var(--text-sm); }
.rep-aims { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); align-items: center; }
.rep-aims__add { display: inline-flex; gap: var(--space-2xs); align-items: center; }
.rep-aims__add .input { width: 200px; }
.rep-set { padding: var(--space-sm) var(--space-md); border: var(--rule-bar) solid var(--sand-200); border-radius: var(--radius-tile); }
.rep-set > svg { width: 18px; height: 18px; color: var(--ink-muted); transition: transform var(--dur-short) var(--ease-bounce); }
.rep-set[aria-expanded="true"] > svg { transform: rotate(180deg); }
.rep-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); padding: var(--space-md); background: var(--sand-50); border-radius: var(--radius-tile); }
.rep-actions { display: flex; gap: var(--space-xs); justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: var(--space-md); padding: var(--space-sm); background: var(--white); border: var(--rule-bar) solid var(--sand-200); border-radius: var(--radius-pill); box-shadow: var(--shadow-lift); justify-self: end; }
.rep-preview { display: grid; gap: var(--space-md); }
.rep-preview img { width: 100%; height: auto; border-radius: var(--radius-tile); box-shadow: var(--shadow-soft); border: var(--rule-bar) solid var(--sand-200); }
@media (max-width: 45rem) {
  .rep-dates, .rep-settings { grid-template-columns: minmax(0, 1fr); }
  .rep-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rep-actions { bottom: calc(var(--tab-h) + var(--space-md) + env(safe-area-inset-bottom)); }
}

/* ---------- Glyph animation (plays on a status change, or on hover) ---------- */
.gl .a { transform-box: fill-box; transform-origin: var(--o, center); }
.gl .t { opacity: 0; }
.gl [class~="s"] { stroke: var(--color-ink); stroke-width: 1.5; stroke-linejoin: round; }
.gl .o, .gl [class^="o-"], .gl [class*=" o-"] { fill: none; stroke: var(--color-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gl .o-muted { stroke: var(--color-muted); stroke-width: 1.5; } .gl .o-red { stroke: var(--m-red); } .gl .o-blue { stroke: var(--m-blue); }
.gl .o-green { stroke: var(--m-green); } .gl .o-gold { stroke: var(--m-gold); } .gl .o-water { stroke: var(--m-water); stroke-width: 3; }
.gl .o-brown { stroke: var(--m-brown); stroke-width: 1.6; } .gl .o-sand { stroke: var(--m-sand); } .gl .o-plate { stroke: var(--color-plate); stroke-width: 2.5; }
.gl .k-draw, .gl .k-flow { stroke-dasharray: 1; }
.gl .k-flow { stroke-dasharray: 1; }
.f-pink { fill: var(--m-pink); } .f-red { fill: var(--m-red); } .f-blue { fill: var(--m-blue); } .f-sky { fill: var(--m-sky); } .f-navy { fill: var(--m-navy); }
.f-gold { fill: var(--m-gold); } .f-yellow { fill: var(--m-yellow); } .f-wood { fill: var(--m-wood); } .f-brown { fill: var(--m-brown); }
.f-water { fill: var(--m-water); } .f-green { fill: var(--m-green); } .f-purple { fill: var(--m-purple); } .f-sand { fill: var(--m-sand); } .f-bean { fill: var(--m-bean); }
.f-ink { fill: var(--color-ink); } .f-muted { fill: var(--color-muted); } .f-plate { fill: var(--color-plate); } .f-paper { fill: var(--color-paper); } .f-paper3 { fill: var(--color-paper-3); }

.gl.play .a { animation-duration: var(--t, .7s); animation-delay: var(--d, 0s); animation-timing-function: var(--ease-out); animation-fill-mode: both; animation-iteration-count: var(--n, 1); }
.gl.play .k-drop { animation-name: kDrop; } .gl.play .k-rise { animation-name: kRise; } .gl.play .k-gx { animation-name: kGx; }
.gl.play .k-gy { animation-name: kGy; } .gl.play .k-draw { animation-name: kDraw; } .gl.play .k-flow { animation-name: kFlow; }
.gl.play .k-tilt { animation-name: kTilt; animation-timing-function: var(--ease-in-out); } .gl.play .k-slide { animation-name: kSlide; }
.gl.play .k-move { animation-name: kMove; } .gl.play .k-spin { animation-name: kSpin; animation-timing-function: var(--ease-in-out); }
.gl.play .k-wig { animation-name: kWig; animation-timing-function: linear; } .gl.play .k-pop { animation-name: kPop; }
.gl.play .k-fade { animation-name: kFadeOut; } .gl.play .k-fall { animation-name: kFall; animation-timing-function: var(--ease-in); }
.gl.play .k-puff { animation-name: kPuff; } .gl.play .k-hop { animation-name: kHop; animation-timing-function: var(--ease-in-out); }
.gl.play .k-sq { animation-name: kSq; animation-timing-function: var(--ease-in-out); } .gl.play .k-sqx { animation-name: kSqx; animation-timing-function: var(--ease-in-out); }
.gl.play .k-shine { animation-name: kShine; } .gl.play .k-pulse { animation-name: kPulse; animation-timing-function: var(--ease-in-out); }
.gl.play .k-wave { animation-name: kWave; } .gl.play .k-bounce { animation-name: kBounce; }
.gl.play .k-tap { animation-name: kTap; animation-timing-function: var(--ease-in-out); } .gl.play .k-twist { animation-name: kTwist; animation-timing-function: var(--ease-in-out); }
.gl.play .k-bolt { animation-name: kBolt; animation-timing-function: var(--ease-in-out); } .gl.play .k-snip { animation-name: kSnip; animation-timing-function: var(--ease-in-out); }
.gl.play .k-orbit { animation-name: kOrbit; animation-timing-function: linear; } .gl.play .k-hush { animation-name: kHush; }
.gl.play .k-fold { animation-name: kFold; animation-timing-function: var(--ease-in-out); } .gl.play .k-away { animation-name: kAway; animation-timing-function: var(--ease-in); }
.gl.play .k-flag { animation-name: kFlag; animation-timing-function: var(--ease-in-out); }

@keyframes kDrop { from { transform: translateY(-16px); opacity: 0; } }
@keyframes kRise { from { transform: translateY(var(--y, 10px)); opacity: 0; } }
@keyframes kGx { from { transform: scaleX(0); } }
@keyframes kGy { from { transform: scaleY(0); } }
@keyframes kDraw { from { stroke-dashoffset: 1; } }
@keyframes kFlow { 0% { stroke-dashoffset: 1; opacity: 1; } 70% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: -1; opacity: 0; } }
@keyframes kTilt { 0%, 100% { transform: rotate(0); } 40%, 70% { transform: rotate(var(--r, -30deg)); } }
@keyframes kSlide { from { transform: translate(var(--x, -12px), var(--y, 0)); opacity: 0; } }
@keyframes kMove { from { transform: translate(var(--x, -12px), var(--y, 0)); } }
@keyframes kSpin { from { transform: rotate(0); } to { transform: rotate(var(--r, 360deg)); } }
@keyframes kWig { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-7deg); } 80% { transform: rotate(4deg); } }
@keyframes kPop { 0% { transform: scale(0); opacity: 0; } 65% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
@keyframes kFadeOut { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes kFall { 0% { transform: translateY(-6px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }
@keyframes kPuff { 0% { transform: translateY(4px) scale(.6); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(-12px) scale(1.2); opacity: 0; } }
@keyframes kHop { 0% { transform: translate(var(--x, -16px), 0); } 50% { transform: translate(calc(var(--x, -16px) / 2), -12px); } 100% { transform: translate(0, 0); } }
@keyframes kSq { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.55); } }
@keyframes kSqx { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.3); } }
@keyframes kShine { 0% { transform: translateX(-16px); opacity: 0; } 50% { opacity: .95; } 100% { transform: translateX(16px); opacity: 0; } }
@keyframes kPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
@keyframes kWave { 0% { transform: scale(.4); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }
@keyframes kBounce { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-7px); } 60% { transform: translateY(0); } 80% { transform: translateY(-2px); } }
@keyframes kTap { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(var(--y, 6px)); } }
@keyframes kTwist { 0%, 100% { transform: none; } 35% { transform: translateY(-7px) rotate(-25deg); } 65% { transform: translateY(-7px) rotate(25deg); } }
@keyframes kBolt { 0% { transform: translateY(-14px) rotate(0); } 100% { transform: translateY(0) rotate(360deg); } }
@keyframes kSnip { 0%, 50%, 100% { transform: rotate(0); } 25%, 75% { transform: rotate(-22deg); } }
@keyframes kOrbit { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes kHush { from { transform: scale(1.3); opacity: 1; } to { transform: scale(1); opacity: .25; } }
@keyframes kFold { 0% { transform: scaleY(1); opacity: 1; } 75% { transform: scaleY(0); opacity: 1; } 100% { transform: scaleY(0); opacity: 0; } }
@keyframes kAway { 0% { transform: none; opacity: 1; } 100% { transform: translate(14px, -10px); opacity: 0; } }
@keyframes kFlag { 0%, 100% { transform: skewY(0); } 25% { transform: skewY(-8deg); } 75% { transform: skewY(6deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 80rem) {
  .split { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
  .attn { grid-template-columns: minmax(0, 1fr); }
  .card__head { padding: var(--space-lg); }
  .card__body { padding: var(--space-md) var(--space-lg) var(--space-lg); }
  .stats, .stagefilter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 60rem) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .pane--list { position: static; max-height: none; }
  .pane__body { overflow: visible; --stick-top: var(--bar-h); }
  .split[data-focus="detail"] .pane--list, .split:not([data-focus="detail"]) .pane--detail { display: none; }
  .back { display: inline-flex; }
  .matrix-wrap { max-height: calc(100dvh - var(--bar-h) - 160px); }
  .bar .tab svg { display: none; }
}
@media (max-width: 45rem) {
  :root { --bar-h: 60px; --row-h: 60px; }
  .bar .tabs, .sync__label { display: none; }
  .bar__in { gap: var(--space-sm); }
  .bar .btn--primary .lbl { display: none; }
  .bar .btn--primary { width: var(--ctl-h); padding: 0; }
  .wordmark { font-size: var(--text-lg); }
  main { padding-top: var(--space-md); padding-bottom: calc(var(--tab-h) + var(--space-xl) + env(safe-area-inset-bottom)); }
  .bottom-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--space-2xs); position: fixed; left: var(--space-sm); right: var(--space-sm); bottom: calc(var(--space-sm) + env(safe-area-inset-bottom)); z-index: var(--z-sticky-nav); background: var(--white); border: var(--rule-bar) solid var(--color-rule); border-radius: var(--radius-pill); padding: var(--space-2xs); box-shadow: var(--shadow-lift); }
  .bottom-tabs .tab { flex-direction: column; justify-content: center; gap: var(--space-3xs); height: 56px; font-size: var(--text-xs); padding: 0; }
  .bottom-tabs .tab svg { display: block; }
  .pane--list, .card { border-radius: var(--radius-card); }
  .pane__head { padding: var(--space-md); }
  .card__head { padding: var(--space-md); gap: var(--space-md); }
  .card__body { padding: var(--space-xs) var(--space-md) var(--space-md); }
  .who { flex-wrap: wrap; }
  .who .avatar { width: 52px; height: 52px; }
  .who__actions { margin-left: 0; width: 100%; justify-content: flex-start; }
  .who h2, .mhead h2 { font-size: var(--text-2xl); }
  .stat { padding: var(--space-sm); }
  .stat__n, .sf__n { font-size: var(--text-xl); }
  .area-tab { min-width: 112px; }
  .mrow { grid-template-columns: 48px minmax(0, 1fr) 44px; padding: var(--space-2xs); }
  .mrow .gl { width: 48px; height: 48px; }
  .mrow .gl svg { width: 38px; height: 38px; }
  .more { padding: var(--space-md); }
  .more__dates { grid-template-columns: minmax(0, 1fr); }
  .mhead { grid-template-columns: auto minmax(0, 1fr); gap: var(--space-md); }
  .mhead .sticker { display: none; }
  .gl--lg { width: 84px; height: 84px; } .gl--lg svg { width: 68px; height: 68px; }
  .rrow { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .rrow .avatar { display: none; }
  .srow__sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .tally { gap: var(--space-xs); }
  .bulk { bottom: calc(var(--tab-h) + var(--space-md) + env(safe-area-inset-bottom)); padding: var(--space-sm); }
  .bulk .input, .bulk .select { flex: 1 1 130px; }
  .toasts { bottom: calc(var(--tab-h) + var(--space-md) + env(safe-area-inset-bottom)); }
  body:has(.bulk) .toasts { bottom: calc(var(--tab-h) + 236px + env(safe-area-inset-bottom)); }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .matrix tbody th, .matrix th.corner { min-width: 128px; max-width: 140px; }
  .rekap-tools { width: 100%; } .rekap-tools .select { flex: 1 1 140px; min-width: 0; }
  .banner { padding: var(--space-sm) var(--space-md); gap: var(--space-xs); }
  .hero-empty { padding: var(--space-xl) var(--space-lg); min-height: 380px; }
  .hero-empty .edge-pill { font-size: var(--text-xl); margin-left: calc(var(--space-lg) * -1); padding-left: var(--space-lg); }
  .hero-empty .sticker { right: var(--space-md); top: var(--space-md); width: 68px; height: 68px; }
}
@media (prefers-reduced-motion: reduce) {
  .gl.play .a { animation: none !important; }
  .rm path, .rm .fill { transition: none !important; }
}

/* ---------- Self-hosted: sign-in gate, account, users ---------- */
.gate { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--space-lg); background: var(--color-paper); }
.gate__card { width: min(440px, 100%); padding: var(--space-2xl) var(--space-xl); display: grid; gap: var(--space-md); justify-items: center; text-align: center; }
.gate__mark { width: 56px; height: 56px; }
.gate__card h1 { font-size: var(--text-2xl); color: var(--coral-500); }
.gate__msg { font-size: var(--text-sm); color: var(--coral-700); min-height: 1.5em; }
.gate__dev { display: flex; gap: var(--space-xs); width: 100%; }
.acct { display: grid; gap: var(--space-2xs); padding: var(--space-sm); border-radius: var(--radius-tile); background: var(--sand-50); }
.acct__who { display: grid; font-size: var(--text-sm); line-height: 1.3; min-width: 0; }
.acct__who span { font-size: var(--text-xs); color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; }
.acct .btn { justify-content: flex-start; }
.members { grid-template-columns: minmax(0, 1fr); width: min(640px, 100%); }
.members__add { display: flex; gap: var(--space-xs); flex-wrap: wrap; }
.members__add .input { flex: 1 1 220px; }
.members__add .select { width: auto; }
.members__list { list-style: none; margin: 0; padding: 0; display: grid; }
.members__list li { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; padding: var(--space-sm) 0; border-bottom: var(--rule-hair) solid var(--sand-100); }
.members__list li > span:first-child { display: grid; flex: 1 1 200px; min-width: 0; font-size: var(--text-sm); }
.members__list li > span:first-child span { font-size: var(--text-xs); color: var(--color-muted); }
.members__role { font-size: var(--text-xs); color: var(--khaki-700); }
@media (max-width: 45rem) { .acct { display: none; } }

/* ---------- Catatan Harian ---------- */
.daily { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); container: daily / inline-size; }
.daily-head .hint { margin-top: var(--space-2xs); }
.dnav { display: inline-flex; align-items: center; gap: var(--space-2xs); background: var(--white); border: var(--rule-bar) solid var(--sand-200); border-radius: var(--radius-pill); padding: var(--space-3xs); }
.dnav .input { border: 0; min-height: var(--ctl-h-sm); width: auto; padding: 0 var(--space-xs); background: transparent; }
.dtiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-xs); }
.dtile { appearance: none; font: inherit; color: var(--ink); cursor: pointer; display: grid; grid-template-rows: auto auto 1fr; justify-items: center; text-align: center; gap: var(--space-3xs); padding: var(--space-sm) var(--space-xs); background: var(--white); border: var(--rule-bar) solid var(--sand-200); border-radius: var(--radius-tile); transition: border-color var(--dur-micro) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.dtile .gl { transition: transform var(--dur-short) var(--ease-bounce); }
.dtile:hover { border-color: var(--tone-500); box-shadow: var(--shadow-soft); }
.dtile:hover .gl { transform: translateY(-3px) scale(1.04); }
.dtile:active { background: var(--sand-50); box-shadow: var(--deboss); }
.dtile:active .gl { transform: scale(.94); transition-duration: var(--dur-micro); }
.dtile[aria-disabled="true"] { cursor: not-allowed; }
.dtile__name { font-size: var(--text-sm); font-weight: var(--fw-semibold); line-height: 1.2; margin-top: var(--space-2xs); overflow-wrap: break-word; min-width: 0; }
.dtile__n { font-size: var(--text-xs); color: var(--color-muted); display: grid; align-content: start; min-height: calc(2lh); }
.dtile__al { color: var(--coral-700); font-weight: var(--fw-medium); }
.gl--tile { width: 52px; height: 52px; border-radius: var(--radius-tile); }
.gl--tile svg { width: 42px; height: 42px; }
@container daily (max-width: 30rem) {
  .dtile__al { display: none; }
  .dtile__n { min-height: 1lh; }
  .dtile.has-alert .dtile__n { color: var(--coral-700); }
  .dtile__name { font-size: var(--text-xs); }
}
@container daily (min-width: 52rem) {
  .dtiles { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-sm); }
  .dtile { justify-items: start; text-align: left; padding: var(--space-md); border-radius: var(--radius-card); gap: var(--space-2xs); }
  .dtile__name { font-size: var(--text-lg); margin-top: var(--space-xs); }
  .dtile__n { font-size: var(--text-sm); }
  .gl--tile { width: 64px; height: 64px; }
  .gl--tile svg { width: 52px; height: 52px; }
}
.gl--md { width: 56px; height: 56px; }
.gl--md svg { width: 46px; height: 46px; }
.gl--xs { width: 30px; height: 30px; border-radius: var(--radius-pill); background: var(--white); }
.gl--xs svg { width: 24px; height: 24px; }
.dlog { padding: var(--space-lg); display: grid; gap: var(--space-md); }
.dlog__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; }
.dlog__head h2 { font-size: var(--text-xl); }
.dkids-list { list-style: none; margin: 0; padding: 0; display: grid; }
.drow { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: var(--space-md); align-items: center; padding: var(--space-sm) 0; border-top: var(--rule-bar) solid var(--sand-100); }
.drow:first-child { border-top: 0; }
.drow__name { font-weight: var(--fw-semibold); color: var(--ink); text-decoration: none; overflow-wrap: break-word; min-width: 0; }
.drow__name:hover { color: var(--coral-700); text-decoration: underline; }
.drow.is-empty .drow__name { color: var(--color-ink-2); font-weight: var(--fw-medium); }
.drow__chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; font-size: var(--text-sm); }
.dchip { appearance: none; font: inherit; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 40px; padding: var(--space-3xs) var(--space-sm) var(--space-3xs) var(--space-3xs); background: var(--tone-100); border: var(--rule-bar) solid transparent; border-radius: var(--radius-pill); text-align: left; max-width: 100%; transition: border-color var(--dur-micro) var(--ease-out), transform var(--dur-short) var(--ease-bounce); }
.dchip:hover { border-color: var(--tone-500); }
.dchip:active { transform: translateY(1px); box-shadow: var(--deboss); }
.dchip--static { cursor: default; }
.dchip--static:hover { border-color: transparent; }
.dchip.is-alert { background: var(--coral-100); border-color: var(--coral-500); }
.dchip__t { display: grid; line-height: 1.2; min-width: 0; }
.dchip__t b { font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--color-ink-2); }

.dchip__t > span { font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dchip__at { font-size: var(--text-xs); color: var(--color-ink-2); }
.dtime { list-style: none; margin: 0; padding: 0; display: grid; }
.dtime li { display: grid; grid-template-columns: 3.25rem auto minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; padding: var(--space-xs) 0; border-top: var(--rule-bar) solid var(--sand-100); }
.dtime li:first-child { border-top: 0; }
.dtime__at { font-size: var(--text-sm); color: var(--color-ink-2); }
.dtime__txt { appearance: none; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: var(--space-2xs) var(--space-xs); border-radius: var(--radius-tile); display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-xs); align-items: baseline; min-width: 0; }
.dtime__txt:hover { background: var(--sand-50); }
.dtime__txt > span:nth-of-type(1) { color: var(--color-ink-2); font-size: var(--text-sm); }
.dtime__txt .is-alert { color: var(--coral-700); font-weight: var(--fw-semibold); }
.dtime__note { flex-basis: 100%; font-size: var(--text-sm); color: var(--color-ink-2); }
.dtime__by { font-size: var(--text-xs); color: var(--color-muted); }

.ddlg__panel { container: ddlg / inline-size; position: relative; background: var(--white); border-radius: var(--radius-dialog); width: min(800px, 100%); max-height: calc(100dvh - var(--space-2xl)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; box-shadow: var(--shadow-lift); animation: open var(--dur-long) var(--ease-bounce); overflow: hidden; }
.ddlg__head { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-lg) var(--space-lg) var(--space-md); border-bottom: var(--rule-bar) solid var(--sand-100); }
.ddlg__head > div { flex: 1; min-width: 0; }
.ddlg__head h2 { font-size: var(--text-xl); }
.ddlg__body { overflow-y: auto; padding: var(--space-md) var(--space-lg) var(--space-lg); display: grid; gap: var(--space-lg); align-content: start; }
.ddlg__bar { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; padding: var(--space-md) var(--space-lg); border-top: var(--rule-bar) solid var(--sand-100); background: var(--sand-50); }
.ddlg__bar .cform__sp { flex: 1; }
.ddlg fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ddlg legend { padding: 0; margin-bottom: var(--space-xs); font-size: var(--text-sm); font-weight: var(--fw-medium); display: flex; gap: var(--space-xs); align-items: baseline; flex-wrap: wrap; }
.ddlg legend .hint { font-weight: var(--fw-regular, 400); }
.dlg__kid { font-size: var(--text-lg); font-weight: var(--fw-semibold); }
.dkids__tools { display: flex; gap: var(--space-xs); flex-wrap: wrap; align-items: center; margin-bottom: var(--space-xs); }
.dkids__tools .input { flex: 1 1 0; min-width: 0; width: auto; }
.dkids__tools .btn { flex: none; }
.dkids__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); gap: var(--space-xs); }
.dkid { appearance: none; font: inherit; color: var(--ink); cursor: pointer; display: flex; align-items: center; gap: var(--space-xs); min-height: 48px; padding: var(--space-2xs) var(--space-sm) var(--space-2xs) var(--space-xs); background: var(--white); border: var(--rule-bar) solid var(--sand-200); border-radius: var(--radius-tile); text-align: left; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.dkid:hover { border-color: var(--sand-400); }
.dkid:active { box-shadow: var(--deboss); transform: scale(.97); }
.dkid[aria-pressed="true"] { background: var(--teal-100); border-color: var(--teal-500); }
.dkid__ok { width: 24px; height: 24px; border-radius: var(--radius-check); border: var(--rule-bar) solid var(--sand-400); display: grid; place-items: center; flex: none; background: var(--white); color: var(--white); }
.dkid__ok svg { width: 16px; height: 16px; transform: scale(0); transition: transform var(--dur-short) var(--ease-bounce); }
.dkid[aria-pressed="true"] .dkid__ok { background: var(--teal-500); border-color: var(--teal-500); }
.dkid[aria-pressed="true"] .dkid__ok svg { transform: scale(1); }
.dkid__name { flex: 1; min-width: 0; font-size: var(--text-sm); font-weight: var(--fw-medium); overflow-wrap: break-word; }
.dkid__n { font-size: var(--text-xs); background: var(--sand-100); border-radius: var(--radius-pill); padding: 0 var(--space-xs); color: var(--color-ink-2); }
.dopts { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.dopt { position: relative; cursor: pointer; }
.dopt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dopt span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-md); border: var(--rule-bar) solid var(--sand-200); border-radius: var(--radius-pill); background: var(--white); font-size: var(--text-sm); font-weight: var(--fw-medium); transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.dopt:hover span { border-color: var(--sand-400); }
.dopt input:checked + span { background: var(--teal-100); border-color: var(--teal-500); color: var(--teal-700); }
.dopt input:focus-visible + span { box-shadow: 0 0 0 4px var(--color-focus); }
.dopt input:active + span { box-shadow: var(--deboss); transform: scale(.96); }
.ddlg .err { color: var(--coral-700); font-size: var(--text-sm); font-weight: var(--fw-medium); }
.dlg__temp { max-width: 12rem; }
.ddlg__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: var(--space-md); align-items: start; }
.ddlg__wide { grid-column: span 2; }
.ddlg__time { max-width: 14rem; }
.ddlg__row:has(> :only-child) { grid-template-columns: minmax(0, 14rem); }
.ddlg__row .dlg__temp { max-width: none; }
@container ddlg (max-width: 30rem) { .ddlg__wide { grid-column: 1 / -1; } .ddlg__time { max-width: none; } }

@media (max-width: 45rem) {
  .daily { gap: var(--space-md); }
  .daily-head .act-tools { flex-wrap: nowrap; width: 100%; }
  .daily-head .act-tools .select { flex: 1 1 0; min-width: 0; width: auto; }
  .dnav { flex: none; }
  .dnav .input { padding: 0 var(--space-2xs); font-size: var(--text-sm); }
  .dlog { padding: var(--space-md); }
  .drow { grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); }
  .dtime li { grid-template-columns: 3rem auto minmax(0, 1fr); }
  .dtime__by { display: none; }
  .ddlg { padding: 0; align-items: end; }
  .ddlg__panel { border-radius: var(--radius-dialog) var(--radius-dialog) 0 0; max-height: 94dvh; width: 100%; }
  .ddlg__head, .ddlg__body, .ddlg__bar { padding-left: var(--space-md); padding-right: var(--space-md); }
  .dkids__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ddlg__panel { animation-name: sheetIn; animation-duration: var(--dur-long); animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
  .ddlg.is-closing .ddlg__panel { animation: sheetOut 200ms var(--ease-in) forwards; }
  body:has(.ddlg) .bottom-tabs { display: none; }
}
/* Motion: what changed, where it went. Transform and opacity only; nothing loops. */
@keyframes dIn { from { opacity: 0; transform: scale(.8); } }
@keyframes dRowIn { from { opacity: 0; transform: translateY(-6px); background-color: var(--marigold-100); } 60% { opacity: 1; transform: none; } }
@keyframes dOut { to { opacity: 0; transform: scale(.85); } }
@keyframes dBump { 0% { opacity: 0; transform: translateY(6px); } }
@keyframes dFade { from { opacity: 0; } }
@keyframes dFromNext { from { opacity: 0; transform: translateX(20px); } }
@keyframes dFromPrev { from { opacity: 0; transform: translateX(-20px); } }
@keyframes dShake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes dlgOut { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes scrimOut { to { opacity: 0; } }
@keyframes sheetIn { from { transform: translateY(100%); } }
@keyframes sheetOut { to { transform: translateY(100%); } }
.dchip.is-new { animation: dIn 380ms var(--ease-bounce) both; animation-delay: calc(170ms + var(--i, 0) * 40ms); }
.dtime-li.is-new { animation: dRowIn 700ms var(--ease-out) both; animation-delay: calc(170ms + var(--i, 0) * 40ms); border-radius: var(--radius-tile); }
.dchip.is-out, .dtime-li.is-out { animation: dOut 160ms var(--ease-in) forwards; pointer-events: none; }
.dtile__n.is-bump { animation: dBump 360ms var(--ease-bounce); }
#dbody.is-swap { animation: dFade 180ms var(--ease-out); }
#dbody.is-from-next { animation: dFromNext 260ms cubic-bezier(.16, 1, .3, 1); }
#dbody.is-from-prev { animation: dFromPrev 260ms cubic-bezier(.16, 1, .3, 1); }
.is-shake { animation: dShake 340ms var(--ease-out); }
.ddlg.is-closing .ddlg__panel { animation: dlgOut 160ms var(--ease-in) forwards; }
.ddlg.is-closing .lightbox__scrim { animation: scrimOut 180ms var(--ease-in) forwards; }
.ddlg.is-static:not(.is-closing) .ddlg__panel, .ddlg.is-static:not(.is-closing) .lightbox__scrim { animation: none; }
.ddlg.is-static .gl .a { animation: none; }
.ddlg.is-closing { pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .dtile, .dtile .gl, .dchip, .dkid, .dopt span, .dkid__ok svg { transition: none; }
  .dtile:hover .gl, .dtile:active .gl, .dkid:active, .dopt input:active + span { transform: none; }
  /* Short fades keep the "this just changed" cue; base.css shortens everything else to 0.01ms, so these need !important. */
  .dchip.is-new, .dtime-li.is-new, .dtile__n.is-bump, #dbody.is-from-next, #dbody.is-from-prev { animation: dFade 200ms var(--ease-out) both !important; }
  .dchip.is-new, .dtime-li.is-new { animation-delay: 120ms !important; }
  .dchip.is-out, .dtime-li.is-out { animation: scrimOut 120ms linear forwards !important; }
  .is-shake { animation: none !important; }
  .ddlg .ddlg__panel { animation: dFade 160ms var(--ease-out) !important; }
  .ddlg.is-static:not(.is-closing) .ddlg__panel { animation: none !important; }
  .ddlg.is-closing .ddlg__panel, .ddlg.is-closing .lightbox__scrim { animation: scrimOut 120ms linear forwards !important; }
}
.dnav .btn:disabled { background: none; color: var(--sand-400); }
.ddlg__panel:focus { outline: none; }

/* ---------- Progres ---------- */
.prog-head { margin-bottom: var(--space-sm); }
.prog-area { background-color: var(--tone-100); border-color: var(--tone-500); font-weight: var(--fw-semibold); }
.prog-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm) var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-sm); }
.prog-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); font-size: var(--text-sm); color: var(--color-ink-2); }
.prog-legend li { display: inline-flex; align-items: center; gap: var(--space-xs); }
.prog-bar__acts { display: flex; gap: var(--space-2xs); }
.prog-wrap { --stick-top: 0px; width: fit-content; max-width: 100%; overflow: auto; max-height: calc(100dvh - var(--bar-h, 0px) - 15rem); min-height: 20rem; border: var(--rule-bar) solid var(--sand-200); border-radius: var(--radius-card); background: var(--white); overscroll-behavior: contain; box-shadow: var(--shadow-soft); }
.prog { border-collapse: separate; border-spacing: 0; font-size: var(--text-sm); }
.prog th, .prog td { padding: 0; border-right: var(--rule-hair) solid var(--sand-100); border-bottom: var(--rule-hair) solid var(--sand-100); }
.prog thead th { position: sticky; top: var(--stick-top); z-index: 2; background: var(--white); vertical-align: bottom; border-bottom: var(--rule-bar) solid var(--sand-200); }
.prog .pg-corner { left: 0; z-index: 4; text-align: left; padding: var(--space-xs) var(--space-sm); min-width: 15rem; border-right: var(--rule-bar) solid var(--sand-200); }
.pk { width: 30px; min-width: 30px; height: 8.5rem; transition: background-color var(--dur-micro) var(--ease-out); }
.pk a { display: flex; justify-content: center; height: 100%; padding: var(--space-xs) 0 var(--space-2xs); color: var(--ink); text-decoration: none; }
.pk__n { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: var(--text-xs); font-weight: var(--fw-medium); overflow: hidden; text-overflow: ellipsis; max-height: 7.5rem; }
.pk a:hover .pk__n { color: var(--coral-700); text-decoration: underline; }
.pk__m { display: block; height: 4px; margin: 0 5px 5px; border-radius: var(--radius-pill); background: linear-gradient(to right, var(--tone-500) var(--p), var(--sand-200) var(--p)); }
.pk.is-col { background: var(--tone-100); }
.prog .pm { position: sticky; left: 0; z-index: 1; background: var(--white); text-align: left; font-weight: var(--fw-regular, 400); width: 15rem; max-width: 15rem; border-right: var(--rule-bar) solid var(--sand-200); }
.pm a { display: block; padding: 0 var(--space-sm); line-height: 28px; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm a:hover { color: var(--coral-700); text-decoration: underline; }
.pi:hover .pm { background: var(--tone-100); }
.pi:hover td { background: var(--sand-50); }
.pg th { background: var(--sand-100); text-align: left; border-bottom: var(--rule-bar) solid var(--sand-200); }
.pg__btn { position: sticky; left: 0; appearance: none; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 34px; padding: 0 var(--space-sm); font-weight: var(--fw-semibold); }
.pg__btn:hover span:first-of-type { text-decoration: underline; }
.pg__chev { width: 18px; height: 18px; transition: transform var(--dur-short) var(--ease-bounce); }
.pgrp.is-folded .pg__chev { transform: rotate(-90deg); }
.pgrp.is-folded .pi { display: none; }
.pg__n { font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--color-ink-2); background: var(--white); border-radius: var(--radius-pill); padding: 0 var(--space-xs); }
.pc { appearance: none; border: 0; margin: 0; padding: 0; position: relative; display: grid; place-items: center; width: 30px; height: 28px; background: transparent; cursor: pointer; color: var(--ink); transition: background-color var(--dur-short) var(--ease-out); }
.pc .rm { width: 16px; height: 16px; overflow: visible; }
.pc .rm[data-stage="0"] .ghost { opacity: 0; transition: opacity var(--dur-micro) var(--ease-out); }
.pc:hover .rm[data-stage="0"] .ghost { opacity: 1; }
.pc:has(.rm[data-stage="1"]), .pc--key[data-s="1"] { background: var(--sand-200); }
.pc:has(.rm[data-stage="2"]), .pc--key[data-s="2"] { background: var(--teal-100); }
.pc:has(.rm[data-stage="3"]), .pc--key[data-s="3"] { background: var(--lilac-500); }
.pc:has(.rm[data-stage="3"]) .rm path:not(.ghost), .pc--key[data-s="3"] .rm path:not(.ghost) { stroke: var(--white); }
.pc:has(.rm[data-stage="3"]) .rm .fill, .pc--key[data-s="3"] .rm .fill { fill: var(--lilac-700); }
.pc.is-col::after { content: ""; position: absolute; inset: 0; background: var(--ink); opacity: .07; pointer-events: none; }
.pc:active { box-shadow: var(--deboss); }
.pc:focus-visible { outline: 3px solid var(--color-focus); outline-offset: -3px; z-index: 1; }
.pc[aria-disabled="true"] { cursor: default; }
.pc__flag { position: absolute; top: 3px; right: 3px; width: 8px; height: 10px; background: var(--marigold-500); clip-path: polygon(0 0, 100% 28%, 22% 56%, 22% 100%, 0 100%); pointer-events: none; }
.pc:has(.rm:not([data-stage="0"])) .pc__flag { display: none; }
.pc--key { width: 26px; height: 24px; border-radius: 6px; border: var(--rule-hair) solid var(--sand-200); cursor: default; }
.pc--key[data-s="0"] .rm .ghost { opacity: 1; }
@media (max-width: 45rem) {
  .prog-head .rekap-tools { width: 100%; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--space-xs); }
  .prog-head .rekap-tools .select { width: 100%; min-width: 0; }
  .prog-head .rekap-tools .cells { grid-column: 1 / -1; justify-self: start; }
  .prog-bar { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); }
  .prog-legend { gap: var(--space-2xs) var(--space-sm); font-size: var(--text-xs); }
  .prog-legend .pc--key { width: 22px; height: 20px; }
  .prog-legend .rm { width: 13px; height: 13px; }
  .prog-bar__acts { margin-left: calc(-1 * var(--space-sm)); }
  .prog .pg-corner { min-width: 9.5rem; }
  .prog .pm { width: 9.5rem; max-width: 9.5rem; }
  .pk { width: 34px; min-width: 34px; height: 7rem; }
  .pk__n { max-height: 6rem; }
  .pc { width: 34px; height: 34px; }
  .pm a { line-height: 34px; padding: 0 var(--space-xs); font-size: var(--text-xs); }
  .prog-wrap { max-height: calc(100dvh - 17rem); }
}
@media (prefers-reduced-motion: reduce) { .pg__chev, .pc, .pk { transition: none; } }

/* ---------- Kehadiran ---------- */
.subnav-m { display: none; }
.att { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); container: att / inline-size; }
.att-bar { display: flex; align-items: center; gap: var(--space-sm) var(--space-md); flex-wrap: wrap; }
.att-bar .btn--primary { margin-left: auto; }
.att-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); font-size: var(--text-sm); color: var(--color-ink-2); }
.att-legend li { display: inline-flex; align-items: center; gap: var(--space-xs); }
.att-key { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--tone-500); color: var(--white); font-size: var(--text-xs); font-weight: var(--fw-semibold); }
.tone-marigold .att-key, .att-key.tone-marigold, .att-key.tone-sky, .att-key.tone-mint { color: var(--ink); }
.att-month { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--text-sm); }
.att-month .input { width: auto; }
.att-sum { display: grid; grid-template-columns: 1.6fr repeat(5, minmax(0, 1fr)); gap: var(--space-xs); align-items: stretch; }
.att-stat { display: grid; gap: var(--space-3xs); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-tile); background: var(--white); border: var(--rule-bar) solid var(--sand-200); }
.att-stat b { font-size: var(--text-xl); font-weight: var(--fw-semibold); line-height: 1; }
.att-stat span { font-size: var(--text-xs); color: var(--color-ink-2); }
.att-stat[class*="tone-"] { border-color: var(--tone-100); background: color-mix(in srgb, var(--tone-100) 55%, var(--white)); }
.att-stat--here { background: var(--teal-500); border-color: var(--teal-500); color: var(--white); }
.att-stat--here span { color: var(--white); }
.att-stat.is-todo b { color: var(--coral-700); }
.att-sum__n { grid-column: 1 / -1; margin: 0; }
.att-list { padding: var(--space-2xs) var(--space-lg); }
.att-list ul { list-style: none; margin: 0; padding: 0; }
.arow { display: grid; grid-template-columns: minmax(0, 1fr) auto 4.5rem 13rem 7.5rem 44px; gap: var(--space-xs) var(--space-md); align-items: center; padding: var(--space-xs) 0; border-top: var(--rule-bar) solid var(--sand-100); }
.att-list li:first-child { border-top: 0; }
.arow--head { border-top: 0; font-size: var(--text-xs); color: var(--color-ink-2); padding-top: var(--space-sm); }
.arow__name { font-weight: var(--fw-medium); color: var(--ink); text-decoration: none; overflow-wrap: break-word; min-width: 0; }
.arow__name:hover { color: var(--coral-700); text-decoration: underline; }
.arow__st { display: flex; gap: var(--space-3xs); }
.att-pill { appearance: none; font: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2xs); min-width: 44px; height: 36px; padding: 0 var(--space-xs); border: var(--rule-bar) solid var(--sand-200); border-radius: var(--radius-pill); background: var(--white); color: var(--color-ink-2); font-size: var(--text-xs); font-weight: var(--fw-semibold); transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.att-pill__l { display: none; }
.att-pill:hover { border-color: var(--tone-500); color: var(--ink); }
.att-pill:active { transform: scale(.94); box-shadow: var(--deboss); }
.att-pill[aria-checked="true"] { background: var(--tone-500); border-color: var(--tone-500); color: var(--white); }
.att-pill.tone-marigold[aria-checked="true"], .att-pill.tone-sky[aria-checked="true"], .att-pill.tone-mint[aria-checked="true"] { color: var(--ink); }
.att-pill.is-pop { animation: aPop 320ms var(--ease-bounce); }
@keyframes aPop { 40% { transform: scale(1.14); } }
.arow.is-a .arow__name, .arow.is-s .arow__name, .arow.is-v .arow__name { color: var(--color-ink-2); }
.att-temp { font-size: var(--text-sm); font-variant-numeric: tabular-nums; padding: var(--space-3xs) var(--space-xs); border-radius: var(--radius-pill); background: var(--sand-100); }
.att-temp.is-hot { background: var(--coral-100); color: var(--coral-700); font-weight: var(--fw-semibold); }
.arow__time { display: flex; align-items: center; gap: var(--space-2xs); }
.att-t { font: inherit; font-size: var(--text-sm); font-variant-numeric: tabular-nums; border: var(--rule-bar) solid transparent; border-radius: var(--radius-tile); background: var(--sand-50); padding: var(--space-3xs) var(--space-2xs); width: 6rem; min-height: 36px; color: var(--ink); transition: border-color var(--dur-micro) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.att-t:hover { border-color: var(--sand-300); }
.att-t:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 1px; }
.att-t:not(:invalid)[value=""] { color: var(--color-muted); }
.att-t.is-new { animation: aFlash 900ms var(--ease-out); }
@keyframes aFlash { 0% { background-color: var(--marigold-100); transform: scale(1.06); } 30% { transform: none; } }
.att-t__sep { color: var(--color-muted); }
.att-go { width: 100%; justify-content: center; }
.att-done { font-size: var(--text-xs); color: var(--color-ink-2); text-align: center; }
.arow__note.has-note { color: var(--teal-700); }
.arow__notetxt { grid-column: 1 / -1; margin: calc(var(--space-xs) * -1) 0 0; font-size: var(--text-sm); color: var(--color-ink-2); }
.arow__form { grid-column: 1 / -1; display: flex; gap: var(--space-xs); animation: dFade 180ms var(--ease-out); }
.arow__form .input { flex: 1; min-width: 0; }
#abody.is-from-next { animation: dFromNext 260ms cubic-bezier(.16, 1, .3, 1); }
#abody.is-from-prev { animation: dFromPrev 260ms cubic-bezier(.16, 1, .3, 1); }
#abody.is-swap { animation: dFade 180ms var(--ease-out); }
@container att (min-width: 62rem) { .att-pill__l { display: inline; } .att-pill__i { display: none; } .att-pill { min-width: 0; padding: 0 var(--space-sm); } }
/* month report */
.att-month-wrap { width: 100%; }
.att-grid { border-collapse: separate; border-spacing: 0; font-size: var(--text-xs); }
.att-grid th, .att-grid td { border-right: var(--rule-hair) solid var(--sand-100); border-bottom: var(--rule-hair) solid var(--sand-100); padding: 0; text-align: center; min-width: 28px; height: 30px; }
.att-grid thead th { position: sticky; top: var(--stick-top); z-index: 2; background: var(--white); font-weight: var(--fw-medium); padding: var(--space-2xs) 0; }
.att-grid thead th small { display: block; color: var(--color-muted); font-size: 10px; }
.att-grid .is-wk { background: var(--sand-50); }
.att-grid thead th.is-today { background: var(--teal-100); }
.att-grid .ag-name { position: sticky; left: 0; z-index: 1; background: var(--white); text-align: left; padding: 0 var(--space-sm); min-width: 12rem; max-width: 14rem; border-right: var(--rule-bar) solid var(--sand-200); }
.att-grid thead .ag-name { z-index: 3; }
.ag-name a { color: var(--ink); text-decoration: none; font-size: var(--text-sm); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-name a:hover { color: var(--coral-700); text-decoration: underline; }
.ag-cell { appearance: none; border: 0; font: inherit; font-weight: var(--fw-semibold); width: 100%; height: 100%; min-height: 30px; cursor: pointer; background: var(--tone-500); color: var(--white); }
.ag-cell.tone-marigold, .ag-cell.tone-sky, .ag-cell.tone-mint { color: var(--ink); }
.ag-cell:hover { filter: brightness(1.06); }
.ag-cell:focus-visible { outline: 3px solid var(--color-focus); outline-offset: -3px; }
.att-grid .ag-tot { min-width: 32px; font-weight: var(--fw-semibold); background: var(--sand-50); }
.att-grid .ag-tot--end { border-right: var(--rule-bar) solid var(--sand-200); }
.att-grid th, .att-grid td { min-width: 26px; }
.att-grid thead .ag-tot { color: var(--tone-700); }
@media (max-width: 45rem) {
  .subnav-m { display: flex; gap: var(--space-3xs); background: var(--sand-100); border-radius: var(--radius-pill); padding: var(--space-3xs); justify-self: start; }
  .subnav-m a { padding: var(--space-2xs) var(--space-md); border-radius: var(--radius-pill); color: var(--color-ink-2); text-decoration: none; font-size: var(--text-sm); font-weight: var(--fw-medium); min-height: 36px; display: inline-flex; align-items: center; }
  .subnav-m a[aria-current="page"] { background: var(--white); color: var(--ink); box-shadow: var(--shadow-soft); }
  .att-head .act-tools { width: 100%; flex-wrap: nowrap; }
  .att-head .act-tools .select { flex: 1 1 0; min-width: 0; width: auto; }
  .att-bar { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); }
  .att-bar .dnav { justify-content: space-between; }
  .att-bar .att-legend { order: 3; font-size: var(--text-xs); gap: var(--space-2xs) var(--space-sm); }
  .att-bar .btn--primary { margin-left: 0; width: 100%; justify-content: center; }
  .att-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .att-stat--here { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; gap: var(--space-sm); }
  .att-stat { padding: var(--space-xs) var(--space-sm); }
  .att-list { padding: var(--space-2xs) var(--space-md); }
}
/* Card rows whenever the content area is too narrow for the six columns (tablet and phone). */
@container att (max-width: 54rem) {
  .arow--head { display: none; }
  .arow { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name temp note" "st st st" "time act act"; padding: var(--space-sm) 0; }
  .arow__name { grid-area: name; }
  .arow__note { grid-area: note; }
  .arow__st { grid-area: st; }
  .arow__st .att-pill { flex: 1; }
  .arow__temp { grid-area: temp; }
  .arow__temp .muted { display: none; }
  .arow__time { grid-area: time; }
  .arow__act { grid-area: act; justify-self: end; min-width: 7.5rem; }
  .att-t { width: 5.6rem; }
}
@container att (min-width: 34rem) and (max-width: 54rem) {
  .arow { grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "name st st note" "temp time act act"; }
  .arow__st .att-pill { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  .att-pill.is-pop, .att-t.is-new { animation: none; }
  #abody.is-from-next, #abody.is-from-prev { animation: dFade 200ms var(--ease-out) both !important; }
}

/* ---------- Keluarga ---------- */
.fam { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); container: fam / inline-size; }
.fam-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.fam-search { flex: 1 1 16rem; max-width: 26rem; }
.fam-search .input { width: 100%; }
.fam-bar__sp { flex: 1; }
.fam-bar > .select { width: auto; flex: none; min-width: 11rem; }
.toolrow .only-m { display: none; }
.fam-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-xs); padding: var(--space-xs) var(--space-sm) var(--space-xs) var(--space-md); border-radius: var(--radius-pill); background: var(--teal-100); border: var(--rule-bar) solid var(--teal-500); }
.fam-selbar[hidden] { display: none; }
.fam-selbar.is-on { animation: dFade 180ms var(--ease-out); }
.fam-selbar b { font-size: var(--text-sm); margin-right: var(--space-xs); color: var(--teal-700); }
.fam-list { padding: var(--space-2xs) var(--space-lg); }
.fam-list ul { list-style: none; margin: 0; padding: 0; }
.frow { display: grid; grid-template-columns: 28px 44px minmax(10rem, 1.1fr) minmax(10rem, 1fr) minmax(14rem, 1.3fr); gap: var(--space-sm) var(--space-md); align-items: start; padding: var(--space-sm) 0; border-top: var(--rule-bar) solid var(--sand-100); }
.fam-list li:first-child { border-top: 0; }
.frow--head { border-top: 0; align-items: center; font-size: var(--text-xs); color: var(--color-ink-2); padding-bottom: var(--space-2xs); }
.frow.is-off { opacity: .62; }
.frow.is-new, .fa.is-new { animation: dRowIn 700ms var(--ease-out) both; border-radius: var(--radius-tile); }
.fchk { display: grid; place-items: center; width: 28px; height: 44px; cursor: pointer; }
.fchk input { width: 18px; height: 18px; accent-color: var(--teal-500); cursor: pointer; }
.fav { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--tone-100); color: var(--tone-700); font-weight: var(--fw-semibold); font-size: var(--text-sm); flex: none; }
.fav--sm { width: 36px; height: 36px; border-radius: 12px; font-size: var(--text-xs); }
.fav--xs { width: 22px; height: 22px; border-radius: 7px; font-size: 10px; }
.frow__who { display: grid; gap: var(--space-3xs); min-width: 0; padding-top: var(--space-3xs); }
.frow__name { appearance: none; border: 0; background: none; padding: 0; font: inherit; font-weight: var(--fw-semibold); color: var(--ink); text-align: left; cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-2xs); overflow-wrap: break-word; min-width: 0; }
.frow__name svg { width: 15px; height: 15px; color: var(--color-muted); flex: none; transition: color var(--dur-micro) var(--ease-out), transform var(--dur-short) var(--ease-bounce); }
.frow__name:hover { color: var(--coral-700); }
.frow__name:hover svg { color: var(--coral-700); transform: rotate(-12deg); }
.frow__kids { display: flex; flex-wrap: wrap; gap: var(--space-2xs); padding-top: var(--space-3xs); }
.fkid { display: inline-flex; align-items: center; gap: var(--space-2xs); padding: 3px var(--space-xs) 3px 3px; border-radius: var(--radius-pill); background: var(--sand-50); border: var(--rule-hair) solid var(--sand-200); color: var(--ink); text-decoration: none; font-size: var(--text-sm); }
.fkid:hover { border-color: var(--coral-500); color: var(--coral-700); }
.fam-contact { display: grid; gap: 3px; font-size: var(--text-sm); min-width: 0; }
.fam-ph { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3xs) var(--space-xs); }
.fam-ph a:not(.fam-wa), .fam-mail { color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; }
.fam-ph a:not(.fam-wa):hover, .fam-mail:hover { color: var(--coral-700); text-decoration: underline; }
.fam-mail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fam-wa { display: inline-flex; align-items: center; gap: 3px; padding: var(--space-3xs) var(--space-xs) var(--space-3xs) var(--space-2xs); border-radius: var(--radius-pill); background: var(--mint-100); color: var(--mint-700); font-size: var(--text-xs); font-weight: var(--fw-semibold); text-decoration: none; transition: background-color var(--dur-micro) var(--ease-out); }
.fam-wa svg { width: 15px; height: 15px; }
.fam-wa:hover { background: var(--mint-500); color: var(--ink); }
.fam-addr { color: var(--color-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* forms */
.fsum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-xs); }
.ffrow { display: grid; grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr); gap: var(--space-md); align-items: start; padding: var(--space-sm) 0; border-top: var(--rule-bar) solid var(--sand-100); }
.ffrow--head { border-top: 0; font-size: var(--text-xs); color: var(--color-ink-2); padding-bottom: var(--space-2xs); }
.ffrow__kid { display: flex; align-items: center; gap: var(--space-sm); color: var(--ink); text-decoration: none; font-weight: var(--fw-medium); min-width: 0; }
.ffrow__kid:hover span { color: var(--coral-700); text-decoration: underline; }
.ffrow__forms { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); }
.fa { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2xs) var(--space-sm); padding: var(--space-2xs) var(--space-xs); border-radius: var(--radius-tile); }
.fa:hover { background: var(--sand-50); }
.fa--none { padding-top: var(--space-sm); }
.fa__st { display: inline-flex; border: var(--rule-bar) solid var(--sand-200); border-radius: var(--radius-pill); padding: var(--space-3xs); gap: var(--space-3xs); background: var(--white); }
.fa__pill { appearance: none; border: 0; font: inherit; font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--color-ink-2); background: transparent; border-radius: var(--radius-pill); min-height: 30px; padding: 0 var(--space-xs); cursor: pointer; display: inline-flex; align-items: center; gap: 3px; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.fa__pill svg { width: 13px; height: 13px; }
.fa__pill:hover { background: var(--sand-100); color: var(--ink); }
.fa__pill[aria-checked="true"] { background: var(--tone-500); color: var(--ink); }
.fa__pill.tone-sky[aria-checked="true"] { background: var(--sky-500, var(--tone-500)); }
.fa__pill.is-pop { animation: aPop 320ms var(--ease-bounce); }
.fa__name { font-size: var(--text-sm); font-weight: var(--fw-medium); flex: 1 1 12rem; min-width: 0; }
.fa__name a { color: var(--ink); }
.fa__name a:hover { color: var(--coral-700); }
.fdue { display: inline-flex; align-items: center; gap: 3px; font-size: var(--text-xs); padding: var(--space-3xs) var(--space-xs) var(--space-3xs) var(--space-2xs); border-radius: var(--radius-pill); background: var(--marigold-100); color: var(--marigold-700); font-weight: var(--fw-medium); }
.fdue svg { width: 13px; height: 13px; }
.fdue.is-late { background: var(--coral-100); color: var(--coral-700); }
.fa__ago { font-size: var(--text-xs); min-width: 6.5rem; text-align: right; }
.fbadge { display: inline-flex; align-items: center; padding: 1px var(--space-xs); border-radius: var(--radius-pill); background: var(--tone-100); color: var(--tone-700); font-size: var(--text-xs); font-weight: var(--fw-semibold); }
/* dialog parts */
.fphones { display: grid; gap: var(--space-xs); }
.fphone { display: grid; grid-template-columns: minmax(0, 1fr) 9rem; gap: var(--space-xs); }
.fchk-field { align-content: start; }
.fchk-inline { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: var(--ctl-h, 44px); font-weight: var(--fw-medium); }
.fchk-inline input { width: 20px; height: 20px; accent-color: var(--teal-500); }
.ftpls { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); }
.ftpls li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-sm); padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-sm); border-radius: var(--radius-tile); background: var(--sand-50); }
.ftpls li span:first-child { display: flex; gap: var(--space-xs); align-items: baseline; flex-wrap: wrap; min-width: 0; }
/* child page */
.fam-kid__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-sm); }
.fam-kid__list li { display: flex; gap: var(--space-sm); align-items: flex-start; }
.fam-kid__forms { list-style: none; margin: var(--space-sm) 0 0; padding: 0; display: grid; gap: var(--space-2xs); font-size: var(--text-sm); }
.fam-kid__forms li { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; }
#fbody.is-swap { animation: dFade 180ms var(--ease-out); }
@container fam (max-width: 52rem) {
  .frow--head, .ffrow--head { display: none; }
  .frow { grid-template-columns: 28px 44px minmax(0, 1fr); grid-template-areas: "chk av who" ". . kids" ". . contact"; gap: var(--space-2xs) var(--space-sm); }
  .frow > .fchk { grid-area: chk; } .frow > .fav { grid-area: av; } .frow__who { grid-area: who; } .frow__kids { grid-area: kids; } .frow__contact { grid-area: contact; }
  .ffrow { grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); }
  .fa { padding-left: 0; padding-right: 0; }
  .fa__ago { min-width: 0; text-align: left; }
  .fsum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 45rem) {
  .fam-head .act-tools { width: 100%; flex-wrap: nowrap; }
  .fam-head .act-tools .select { flex: 1 1 0; min-width: 0; width: auto; }
  .fam-list { padding: var(--space-2xs) var(--space-md); }
  .fam-search { max-width: none; flex-basis: 100%; }
  .fam-bar > .select { flex: 1 1 0; min-width: 0; }
  .fam-bar .fam-bar__tpl { flex: 1 1 100%; justify-content: center; }
  .toolrow .only-m { display: inline-flex; }
  .fam-bar__sp { display: none; }
  .fam-bar .btn--primary { flex: 1 1 100%; justify-content: center; }
  .fphone { grid-template-columns: minmax(0, 1fr) 7.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .frow.is-new, .fa.is-new { animation: dFade 200ms var(--ease-out) both !important; }
  .fa__pill.is-pop { animation: none !important; }
}

/* ---------- Form builder and form renderer ---------- */
.ffs { display: grid; gap: var(--space-lg); }
.ff { display: grid; gap: var(--space-xs); border: 0; margin: 0; padding: 0; min-width: 0; }
.ff legend, .ff > label { display: grid; gap: var(--space-3xs); padding: 0; }
.ff__label { font-weight: var(--fw-medium); }
.ff__req { color: var(--coral-700); }
.ff__desc { margin: 0; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-tile); background: var(--sand-50); color: var(--color-ink-2); font-size: var(--text-sm); }
.ff--ro { gap: var(--space-3xs); padding-bottom: var(--space-sm); border-bottom: var(--rule-hair) solid var(--sand-100); }
.ff--ro .ff__label { font-size: var(--text-sm); color: var(--color-ink-2); font-weight: var(--fw-regular, 400); }
.ff__ans { margin: 0; font-weight: var(--fw-medium); white-space: normal; overflow-wrap: anywhere; }
.ff__map { font-size: var(--text-xs); }
.ff--consent { padding: var(--space-md); border-radius: var(--radius-tile); background: var(--sand-50); border: var(--rule-bar) solid var(--sand-200); }
.ff__agree { display: inline-flex; align-items: center; gap: var(--space-xs); font-weight: var(--fw-medium); min-height: 44px; cursor: pointer; }
.ff__agree input { width: 22px; height: 22px; accent-color: var(--teal-500); }
.ff__sign { display: grid; gap: var(--space-3xs); font-size: var(--text-sm); }
.ff .err { color: var(--coral-700); font-size: var(--text-sm); font-weight: var(--fw-medium); }
.fdlg__for { margin: 0; color: var(--color-ink-2); }
.fq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-sm); counter-reset: q; }
.fq { display: grid; gap: var(--space-sm); padding: var(--space-md); border: var(--rule-bar) solid var(--sand-200); border-radius: var(--radius-card); background: var(--white); }
.fq.is-new { animation: dRowIn 700ms var(--ease-out) both; }
.fq__top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-xs); align-items: center; }
.fq__n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--sand-100); font-size: var(--text-sm); font-weight: var(--fw-semibold); }
.fq__label .input { font-weight: var(--fw-medium); }
.fq__move { display: inline-flex; }
.fq__opts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: var(--space-sm); align-items: end; }
.fq__req { min-height: var(--ctl-h, 44px); }
.fq__help { font-size: var(--text-sm); }
.fq-preview { border: var(--rule-bar) dashed var(--sand-300); border-radius: var(--radius-card); padding: var(--space-sm) var(--space-md); }
.fq-preview summary { cursor: pointer; font-weight: var(--fw-medium); min-height: 32px; display: flex; align-items: center; }
.fq-preview__body { padding-top: var(--space-md); }
.fpresets { display: grid; gap: var(--space-xs); padding: var(--space-md); border-radius: var(--radius-card); background: var(--marigold-100); }
.fpresets .hint { margin: 0; color: var(--ink); }
.fpresets__list { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.ftpls li { grid-template-columns: minmax(0, 1fr) auto auto; }
.ftpls__acts { display: inline-flex; gap: var(--space-3xs); }
.fa__go { margin-left: auto; }
.fam-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: var(--space-xs); margin: 0 0 var(--space-md); }
.fam-info > div { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-tile); background: var(--sand-50); }
.fam-info > div.is-warn { background: var(--coral-100); }
.fam-info dt { font-size: var(--text-xs); color: var(--color-ink-2); }
.fam-info > div.is-warn dt { color: var(--coral-700); font-weight: var(--fw-semibold); }
.fam-info dd { margin: var(--space-3xs) 0 0; font-weight: var(--fw-medium); font-size: var(--text-sm); }
@container ddlg (max-width: 34rem) { .fq__opts { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Portal orang tua (ortu.html) ---------- */
.portal-body { --stick-top: 0px; background: var(--color-bg, var(--sand-50)); min-height: 100dvh; }
.skip { position: absolute; left: var(--space-sm); top: -4rem; z-index: 50; background: var(--ink); color: var(--white); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-pill); }
.skip:focus { top: var(--space-sm); }
.ptop { position: sticky; top: var(--stick-top); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: var(--space-sm) max(var(--space-md), calc((100% - 52rem) / 2)); background: color-mix(in srgb, var(--white) 92%, transparent); backdrop-filter: blur(10px); border-bottom: var(--rule-bar) solid var(--sand-100); }
.ptop__brand { display: flex; align-items: center; gap: var(--space-xs); color: var(--coral-500); }
.ptop__brand svg { width: 26px; height: 26px; }
.ptop__brand div { display: grid; line-height: 1.15; }
.ptop__brand b { color: var(--ink); font-weight: var(--fw-semibold); }
.ptop__brand span { font-size: var(--text-xs); color: var(--color-ink-2); }
.ptop__tools { display: flex; align-items: center; gap: var(--space-xs); }
.pmain { width: 100%; max-width: 52rem; margin-inline: auto; padding: var(--space-lg) var(--space-md) calc(var(--space-4xl) + env(safe-area-inset-bottom)); display: grid; gap: var(--space-lg); outline: none; }
.pload { color: var(--color-ink-2); text-align: center; padding: var(--space-2xl) 0; }
.pgate { padding: var(--space-xl); display: grid; gap: var(--space-md); max-width: 34rem; margin: var(--space-xl) auto 0; }
.pgate h1 { font-size: var(--text-2xl, 1.75rem); }
.pgate__msg { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-tile); background: var(--coral-100); color: var(--coral-700); font-weight: var(--fw-medium); }
.pgate__google { min-height: 44px; }
.pgate__dev { display: flex; gap: var(--space-xs); align-items: end; flex-wrap: wrap; }
.pgate__dev .field { flex: 1 1 14rem; }
.phead { display: grid; gap: var(--space-sm); }
.phead h1 { font-size: var(--text-2xl, 1.75rem); line-height: 1.1; }
.phead .hint { margin: 0; }
.pkids { display: flex; gap: var(--space-xs); overflow-x: auto; padding-bottom: var(--space-3xs); }
.pkid { appearance: none; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-xs); padding: var(--space-3xs) var(--space-md) var(--space-3xs) var(--space-3xs); border-radius: var(--radius-pill); border: var(--rule-bar) solid var(--sand-200); background: var(--white); color: var(--ink); font-weight: var(--fw-medium); flex: none; min-height: 44px; transition: border-color var(--dur-micro) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.pkid.is-on { border-color: var(--coral-500); background: var(--coral-100); }
.pbody { display: grid; gap: var(--space-lg); animation: dFade 200ms var(--ease-out); }
.psec { display: grid; gap: var(--space-sm); }
.psec h2, .ptoday h2, .pfeed__day h2 { font-size: var(--text-lg); }
.psec__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); flex-wrap: wrap; }
.psec__head .hint { margin: 0; }
.ptoday, .pfeed__day { padding: var(--space-lg); display: grid; gap: var(--space-md); }
.card.psec { padding: var(--space-lg); }
.pnudge { display: grid; gap: var(--space-3xs); padding: var(--space-md) var(--space-lg); background: var(--marigold-100); border-color: var(--marigold-500); color: var(--ink); text-decoration: none; }
.pnudge span { font-size: var(--text-sm); color: var(--color-ink-2); }
.pnudge:hover b { text-decoration: underline; }
.patt { justify-self: start; display: inline-flex; padding: var(--space-3xs) var(--space-sm); border-radius: var(--radius-pill); background: var(--tone-100); color: var(--tone-700); font-size: var(--text-sm); font-weight: var(--fw-semibold); }
.pdays { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); }
.pday { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; padding: var(--space-2xs) 0; border-top: var(--rule-hair) solid var(--sand-100); }
.pday:first-child { border-top: 0; }
.pday__t { display: grid; font-size: var(--text-sm); }
.pday__t b { font-weight: var(--fw-semibold); }
.pday__note { color: var(--color-ink-2); }
.pday__at { font-size: var(--text-xs); color: var(--color-ink-2); }
.pphotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr)); gap: var(--space-xs); }
.pphoto { appearance: none; border: 0; padding: 0; cursor: zoom-in; border-radius: var(--radius-tile); overflow: hidden; background: var(--sand-100); aspect-ratio: 1; }
.pphoto img, .pphotos > img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: var(--radius-tile); transition: transform var(--dur-short) var(--ease-out); }
.pphotos > img { aspect-ratio: 4 / 3; }
.pphoto:hover img { transform: scale(1.03); }
.pcap { margin: 0; font-size: var(--text-sm); }
.pann, .pinfo, .pforms { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-sm); }
.pann li, .pinfo li { padding: var(--space-md) var(--space-lg); display: grid; gap: var(--space-2xs); }
.pann li.is-pin { border-color: var(--marigold-500); }
.pann__pin { justify-self: start; font-size: var(--text-xs); font-weight: var(--fw-semibold); color: var(--marigold-700); }
.pann h3 { font-size: var(--text-md); }
.pann__body, .pinfo p { font-size: var(--text-sm); color: var(--color-ink-2); margin: 0; }
.pev { list-style: none; margin: 0; padding: var(--space-xs) var(--space-lg); display: grid; }
.pev li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: var(--space-sm); padding: var(--space-xs) 0; border-top: var(--rule-hair) solid var(--sand-100); font-size: var(--text-sm); }
.pev li:first-child { border-top: 0; }
.pev__d { color: var(--color-ink-2); }
.pfeed { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-md); }
.plegend { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); margin: 0; font-size: var(--text-sm); color: var(--color-ink-2); }
.plegend span { display: inline-flex; align-items: center; gap: var(--space-2xs); }
.pmark { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pmark--2 { stroke: var(--teal-500); }
.pmark--3 { stroke: var(--lilac-500); fill: var(--lilac-100); }
.prec { list-style: none; margin: 0; padding: 0; display: grid; }
.prec li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; padding: var(--space-2xs) 0; border-top: var(--rule-hair) solid var(--sand-100); font-size: var(--text-sm); }
.prec li:first-child { border-top: 0; }
.pareas { display: grid; gap: var(--space-sm); }
.parea { padding: 0; overflow: hidden; }
.parea summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) minmax(4rem, 8rem) auto; gap: var(--space-md); align-items: center; padding: var(--space-md) var(--space-lg); min-height: 56px; }
.parea summary::-webkit-details-marker { display: none; }
.parea__name { font-weight: var(--fw-semibold); }
.parea__bar { height: 8px; border-radius: var(--radius-pill); background: linear-gradient(to right, var(--tone-500) var(--p), var(--sand-100) var(--p)); }
.parea__n { font-size: var(--text-sm); color: var(--color-ink-2); }
.parea[open] summary { border-bottom: var(--rule-hair) solid var(--sand-100); }
.parea > :not(summary) { margin-inline: var(--space-lg); }
.parea h3 { font-size: var(--text-sm); color: var(--color-ink-2); margin-top: var(--space-md); }
.parea > :last-child { margin-bottom: var(--space-md); }
.parea__c { margin-top: var(--space-sm); }
.pform { padding: var(--space-md) var(--space-lg); display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; }
.pform h3 { font-size: var(--text-md); margin-bottom: var(--space-2xs); }
.pform p { margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2xs); align-items: center; }
.pformview { padding: var(--space-lg); display: grid; gap: var(--space-lg); }
.pformview > .btn--ghost { justify-self: start; margin-left: calc(var(--space-sm) * -1); }
.pformview__bar { display: flex; justify-content: flex-end; position: sticky; bottom: calc(5rem + env(safe-area-inset-bottom)); }
.pformview__bar .btn { box-shadow: var(--shadow-lift); }
.ptabs { position: fixed; left: 50%; bottom: calc(var(--space-sm) + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(30rem, calc(100% - var(--space-lg))); padding: var(--space-2xs); border-radius: var(--radius-pill); background: var(--white); border: var(--rule-bar) solid var(--sand-200); box-shadow: var(--shadow-lift); }
.ptab { position: relative; display: grid; justify-items: center; gap: var(--space-3xs); padding: var(--space-2xs) 0; border-radius: var(--radius-pill); color: var(--color-ink-2); text-decoration: none; font-size: var(--text-xs); font-weight: var(--fw-medium); min-height: 48px; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.ptab svg { width: 22px; height: 22px; }
.ptab[aria-current="page"] { background: var(--coral-500); color: var(--white); }
.ptab__n { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--marigold-500); color: var(--ink); font-size: 11px; display: grid; place-items: center; }
.plb { z-index: 60; }
.plb__fig { position: relative; margin: 0; z-index: 1; max-width: min(56rem, 94vw); display: grid; gap: var(--space-xs); background: var(--white); padding: var(--space-xs); border-radius: var(--radius-card); animation: open var(--dur-long) var(--ease-bounce); }
.plb__fig img { max-height: 78dvh; width: auto; max-width: 100%; border-radius: var(--radius-tile); justify-self: center; }
.plb__fig figcaption { padding: 0 var(--space-xs) var(--space-xs); font-size: var(--text-sm); }
.plb__x { position: absolute; top: var(--space-sm); right: var(--space-sm); background: var(--white); }
@media (max-width: 45rem) {
  .ptop .langsw .cell { min-width: 40px; }
  .pev li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ptoday, .pfeed__day, .card.psec, .pformview { padding: var(--space-md); }
  .parea summary { padding: var(--space-sm) var(--space-md); grid-template-columns: minmax(0, 1fr) 4rem auto; }
  .parea > :not(summary) { margin-inline: var(--space-md); }
}
@media (prefers-reduced-motion: reduce) { .pbody, .plb__fig { animation: none; } .pphoto:hover img { transform: none; } }
.fportal { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; padding: var(--space-md); border-radius: var(--radius-tile); background: var(--teal-100); }
.fportal p { margin: var(--space-3xs) 0 0; }
.fportal__acts { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.fportal__opt { display: flex; gap: var(--space-sm); align-items: flex-start; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-tile); background: var(--sand-50); cursor: pointer; }
.fportal__opt input { width: 20px; height: 20px; margin-top: var(--space-3xs); accent-color: var(--teal-500); flex: none; }
.fportal__opt > span { display: grid; gap: var(--space-3xs); }
.fa__remind svg { width: 15px; height: 15px; }
#plink { font-size: var(--text-sm); }
.portal-body { display: block; padding: 0; }
.portal-body .ptop { width: 100%; }
@media (max-width: 45rem) {
  .prec li { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "m n" ". d"; row-gap: 0; }
  .prec li > .pmark { grid-area: m; }
  .prec li > span:not(.hint) { grid-area: n; }
  .prec li > .hint { grid-area: d; font-size: var(--text-xs); }
}
