/* The drawn app screens (the server's site/screens Kotlin) and their frames: a phone, the office's
   laptop, and the office's small cards. Loaded only by the pages that draw them, after common.css,
   whose tokens they use. A screen's text is sized from its frame's width (container units), so a
   page sizes only the frame. Everything inside a frame is scoped to it with :where(), so these
   names never reach a page's own markup and never outweigh a page's rule. */

/* ---------- frames ---------- */
.phone { position: relative; flex: none; width: 100%; max-width: 17.5rem; aspect-ratio: 9 / 19; overflow: hidden;
         container-type: inline-size; border: 7px solid var(--frame); border-radius: 2.375rem; background: var(--page);
         color: var(--ink); box-shadow: 0 34px 70px -34px rgba(4, 14, 34, .7); }
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; font-size: 3.72cqw; line-height: 1.4; text-align: start; }

.laptop { position: relative; width: 100%; padding-inline: 3.5%; }
.lid { position: relative; aspect-ratio: 16 / 10; overflow: hidden; container-type: inline-size; border: 8px solid var(--frame);
       border-radius: 18px 18px 6px 6px; background: var(--page); color: var(--ink); box-shadow: 0 34px 70px -38px rgba(4, 14, 34, .75); }
.base { height: 12px; margin-inline: -3.5%; border-radius: 0 0 16px 16px; background: var(--frame); }
.glimpses { display: grid; gap: .75rem; min-width: 0; }
.gl { display: grid; gap: .625rem; padding: 1rem 1.125rem; border-radius: 1.5rem; background: var(--card); color: var(--ink);
      font-size: .95rem; line-height: 1.4; text-align: start;
      box-shadow: 0 26px 50px -30px rgba(4, 14, 34, .7), inset 0 0 0 1px var(--edge); }

/* ---------- the app's pieces, inside any frame ---------- */
:where(.phone, .laptop, .glimpses) .sm { display: block; font-size: .86em; color: var(--ink-2); }
:where(.phone, .laptop, .glimpses) .num { font-variant-numeric: tabular-nums; }
:where(.phone, .laptop, .glimpses) .muted { display: grid; color: var(--ink-2); }
:where(.phone, .laptop, .glimpses) .label { font-size: .86em; font-weight: 600; color: var(--ink-2); }
:where(.phone, .laptop, .glimpses) .big-title { display: block; font-size: 1.9em; font-weight: 600; line-height: 1.15; }
:where(.phone, .laptop, .glimpses) .line { display: flex; align-items: center; gap: .6em; min-width: 0; }
:where(.phone, .laptop, .glimpses) .line.wraps { flex-wrap: wrap; gap: .4em; }
:where(.phone, .laptop, .glimpses) .grow { flex: 1; min-width: 0; }
:where(.phone, .laptop, .glimpses) .grow b { display: block; font-size: 1.08em; }
:where(.phone, .laptop, .glimpses) .name { display: block; font-size: 1.3em; font-weight: 600; }
:where(.phone, .laptop, .glimpses) .hb { width: 2.7em; height: 2.7em; border-radius: .85em; font-size: 1em; }
:where(.phone, .laptop, .glimpses) .hb .i { font-size: 1.15em; }
:where(.phone, .laptop, .glimpses) .hb.s { width: 2.2em; height: 2.2em; border-radius: .7em; }

/* Avatars: KidAvatar and PersonAvatar, drawn. */
:where(.phone, .laptop, .glimpses) .av { flex: none; width: 2.9em; height: 2.9em; border-radius: 50%; }
:where(.phone, .laptop, .glimpses) .av.s { width: 2em; height: 2em; }
:where(.phone, .laptop, .glimpses) .av.l { width: 3.8em; height: 3.8em; }

/* Grouped rows, the apps' GroupedRow: a hair apart, the group's ends rounded. */
:where(.phone, .laptop, .glimpses) .rows { display: grid; gap: .14em; }
:where(.phone, .laptop, .glimpses) .rows > * { display: flex; align-items: center; gap: .8em; padding: .8em 1em; border-radius: .55em; background: var(--card); }
:where(.phone, .laptop, .glimpses) .rows > :first-child { border-start-start-radius: 1.9em; border-start-end-radius: 1.9em; }
:where(.phone, .laptop, .glimpses) .rows > :last-child { border-end-start-radius: 1.9em; border-end-end-radius: 1.9em; }
:where(.phone, .laptop, .glimpses) .card { flex: none; display: grid; gap: .8em; padding: 1.1em; border-radius: 1.9em; background: var(--card); }

/* A status pill: only for what is not usual. */
:where(.phone, .laptop, .glimpses) .pill { flex: none; display: inline-flex; align-items: center; gap: .35em; padding: .3em .85em;
                                          border-radius: 999px; font-size: .8em; font-weight: 600; white-space: nowrap; }
:where(.phone, .laptop, .glimpses) .pill.ok { background: var(--ok-soft); color: var(--ok); }
:where(.phone, .laptop, .glimpses) .pill.err { background: var(--error-soft); color: var(--error-soft-ink); }
:where(.phone, .laptop, .glimpses) .pill.amber { background: var(--amber-soft); color: var(--amber-ink); }
:where(.phone, .laptop, .glimpses) .pill.primary { background: var(--primary-soft); color: var(--primary-soft-ink); }
:where(.phone, .laptop, .glimpses) .pill.neutral { background: var(--tint); color: var(--ink-2); }
:where(.phone, .laptop, .glimpses) .pill.health { background: var(--health); color: var(--ok); }
/* A filter or detail chip, the chosen one in the primary fill (owner, 2026-10-31). */
:where(.phone, .laptop, .glimpses) .chip { flex: none; display: inline-flex; align-items: center; gap: .35em; padding: .3em .7em;
                                          border: 1px solid var(--line); border-radius: .55em; font-size: .8em; white-space: nowrap; }
:where(.phone, .laptop, .glimpses) .chip.chosen { background: var(--primary); border-color: transparent; color: var(--on-primary); }
/* Material's buttons, drawn: filled, tonal, outlined, and compact in a row. */
:where(.phone, .laptop, .glimpses) .press { flex: none; display: block; padding: .95em; border-radius: 999px; background: var(--primary);
                                           color: var(--on-primary); font-weight: 600; text-align: center; }
:where(.phone, .laptop, .glimpses) .press.tonal { background: var(--primary-soft); color: var(--primary-soft-ink); }
:where(.phone, .laptop, .glimpses) .press.outlined { background: none; color: var(--primary); box-shadow: inset 0 0 0 1px var(--ink-2); }
:where(.phone, .laptop, .glimpses) .press.compact { padding: .5em 1.1em; font-size: .86em; }
:where(.phone, .laptop, .glimpses) .text-action { color: var(--primary); font-weight: 600; }
:where(.phone, .laptop, .glimpses) .text-action.stop { margin-inline-start: auto; color: var(--error); }

/* ---------- the demos ---------- */
/* One slot in two states: the finished one shown, the one before it kept for the motion layer. */
.states { display: inline-grid; align-items: center; }
div.states { display: grid; }
.states > * { grid-area: 1 / 1; }
.states > .before { visibility: hidden; }
/* Made by the motion layer: a demo's tap, the dot that carries it to the next screen, and its button. */
.tap { position: absolute; top: 0; left: 0; z-index: 2; width: 3em; height: 3em; margin: -1.5em 0 0 -1.5em; border: .2em solid var(--sun); border-radius: 50%;
       background: rgba(var(--sun-glow), .35); opacity: 0; visibility: hidden; pointer-events: none; }
.fly { position: absolute; top: 0; left: 0; z-index: 6; width: 1.125rem; height: 1.125rem; margin: -.5625rem 0 0 -.5625rem; border-radius: 50%;
       background: var(--sun); box-shadow: 0 0 0 6px rgba(var(--sun-glow), .35), 0 0 26px 8px rgba(var(--sun-glow), .55); visibility: hidden;
       pointer-events: none; }
.replay { display: flex; align-items: center; gap: .5rem; min-height: 3rem; margin: 1rem auto 0; padding: 0 1.125rem; border: 1px solid var(--line);
          border-radius: 999px; background: none; color: inherit; font: inherit; font-size: .9rem; cursor: pointer; }

/* ---------- a phone screen's frame: the bars ---------- */
.scr .status { flex: none; height: 2.4em; }
.scr .appbar { flex: none; display: flex; align-items: center; gap: .7em; padding: .3em 1.3em .7em; }
.appbar .bar-title { flex: 1; min-width: 0; font-size: 1.6em; font-weight: 600; line-height: 1.15; }
.appbar .act { display: grid; font-size: 1.3em; color: var(--ink-2); }
.appbar .switcher { display: flex; align-items: center; gap: .5em; margin-inline-end: auto; padding: .35em .8em; padding-inline-start: .4em;
                    border-radius: 999px; background: var(--card); }
.scr .body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: .8em; padding: 0 1.3em; }
.scr .body > * { flex: none; }
.scr .navbar { flex: none; display: flex; padding: .5em .6em 1em; background: var(--page); }
.navbar > div { flex: 1; display: grid; justify-items: center; gap: .25em; font-size: .82em; color: var(--ink-2); }
.navbar i { display: grid; place-items: center; width: 4.4em; height: 2.2em; border-radius: 999px; font-size: 1.2em; }
.navbar .on { color: var(--ink); font-weight: 600; }
.navbar .on i { background: var(--peach); color: var(--peach-ink); }
.scr .fab { position: absolute; bottom: 1.3em; inset-inline-end: 1.3em; display: flex; align-items: center; gap: .5em; padding: .9em 1.2em;
            border-radius: 1.2em; background: var(--primary); color: var(--on-primary); font-weight: 600;
            box-shadow: 0 .6em 1.4em -.6em rgba(0, 0, 0, .5); }

/* ---------- the family's day ---------- */
.scr .now { display: grid; gap: .8em; padding: 1.2em; border-radius: 1.9em; background: linear-gradient(var(--primary-soft), var(--tint));
            color: var(--primary-soft-ink); }
.now .sm { color: inherit; }
.now .where { display: block; font-size: 1.6em; font-weight: 600; line-height: 1.2; }
.now .chip-white { display: inline-flex; align-items: center; gap: .4em; padding: .25em .8em; border-radius: 999px; background: var(--card);
                   color: var(--ink); font-size: .82em; white-space: nowrap; }
.now .live { display: block; width: .6em; height: .6em; border-radius: 50%; background: var(--ok); }
.now .tile { flex: none; display: grid; place-items: center; width: 3.6em; height: 3.6em; border-radius: 1.1em; background: var(--card); color: var(--primary); }
.now .tile .i { font-size: 1.6em; }
.scr .quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; }
.quick > span { display: grid; justify-items: center; gap: .3em; padding: .7em .3em; border-radius: 1.3em; background: var(--card);
                font-size: .8em; line-height: 1.2; text-align: center; }
.quick .i { font-size: 1.3em; color: var(--primary); }

/* ---------- the family's other screens: pickup, photos, the conversation ---------- */
.scr .note { display: flex; gap: .5em; color: var(--ink-2); font-size: .9em; }
.scr .grow > .pill { margin-top: .35em; }
.people > * { padding-block: 1em; }
.scr .day { align-self: center; padding: .25em .9em; border-radius: 999px; background: var(--peach); color: var(--peach-ink);
            font-size: .8em; font-weight: 600; }
.scr .album { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25em; margin-inline: -.6em; }
.album img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: .3em; }
.scr .chat { justify-content: flex-end; padding-bottom: .8em; }
.chat .day-name { align-self: center; }
.bubble { max-width: 82%; padding: .7em 1em; border-radius: 1.3em; border-end-start-radius: .3em; background: var(--card); }
.bubble.mine { align-self: flex-end; border-radius: 1.3em; border-end-end-radius: .3em; background: var(--primary); color: var(--on-primary); }
.bubble small { display: block; margin-top: .3em; font-size: .78em; opacity: .8; }
.scr .composer { flex: none; display: flex; align-items: center; gap: .6em; padding: 0 1.3em 1.4em; }
.composer span { flex: 1; padding: .8em 1.1em; border-radius: 999px; background: var(--card); color: var(--ink-2); }
.composer i { display: grid; place-items: center; width: 2.9em; height: 2.9em; border-radius: 50%; background: var(--primary); color: var(--on-primary); }

/* ---------- the classroom's register ---------- */
.scr .filters { display: flex; gap: .4em; overflow: hidden; margin-inline-end: -1.3em;
                -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.6em), transparent); }
html[dir="rtl"] .scr .filters { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 2.6em), transparent); }
.register > * { padding-block: 1.15em; }
.register > * > .states { justify-items: end; }

/* ---------- the classroom's meals ---------- */
.scr .segmented { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ink-2); border-radius: 999px; overflow: hidden;
                  font-size: .86em; text-align: center; }
.segmented > span { padding: .45em .3em; }
.segmented > span + span { border-inline-start: 1px solid var(--ink-2); }
.segmented .on { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.amounts { flex: none; display: flex; border: 1px solid var(--line); border-radius: .6em; overflow: hidden; }
.amounts i { display: grid; place-items: center; width: 2.1em; height: 2.1em; color: var(--ink-2); }
.amounts i .i { font-size: 1.1em; }
.amounts .on { background: var(--primary); color: var(--on-primary); }

/* ---------- Discover and a nursery's page ---------- */
.scr .views { flex: none; display: grid; grid-template-columns: 1fr 1fr; margin: 0 1.3em .8em; border-bottom: 1px solid var(--line);
              font-size: .86em; text-align: center; }
.views > span { padding: .5em; color: var(--ink-2); }
.views .on { box-shadow: inset 0 -2px 0 var(--primary); color: var(--primary); font-weight: 600; }
.listing { position: relative; overflow: hidden; flex: none; border-radius: 1.4em; background: var(--card); }
.listing .place img, .listing .place svg, .scr .cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.listing .fav { position: absolute; top: .6em; inset-inline-end: .6em; display: grid; place-items: center; width: 2em; height: 2em;
                border-radius: 50%; background: var(--card); color: var(--ink); }
.listing .about { display: grid; gap: .35em; padding: .8em 1em 1em; }
.listing-name { display: flex; align-items: flex-start; gap: .35em; font-size: 1.05em; }
.listing-name .i { color: var(--primary); }
.scr .further { display: flex; align-items: center; gap: .6em; color: var(--ink-2); font-size: .78em; }
.further::before, .further::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.scr .cover { flex: none; margin-bottom: 1em; }
.scr .page-title { font-size: 1.45em; font-weight: 600; line-height: 1.2; }
.scr .body > .pill { align-self: flex-start; }
.scr .map { position: relative; overflow: hidden; border-radius: 1.2em; background: var(--card); }
.map > svg { width: 100%; height: auto; aspect-ratio: 8 / 5; }
.map .land { fill: var(--health); fill-opacity: .55; }
.map .water { fill: var(--messages); }
.map .park { fill: var(--health-accent); fill-opacity: .3; }
.map .road { stroke: var(--card); stroke-width: 6; fill: none; }
.map .lane { stroke: var(--card); stroke-width: 3.5; fill: none; }
.map .route { stroke: var(--sun); stroke-width: 2; stroke-dasharray: 5 6; fill: none; }
.map-pin { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -85%); color: var(--error); font-size: 1.6em; }
.map-pin .i { fill: var(--card); }
.scr .action { flex: none; padding: .8em 1.3em 1.3em; }

/* ---------- the office's dashboard ---------- */
.adm { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr; font-size: 1.32cqw; line-height: 1.35; text-align: start; }
.adm-bar { display: flex; align-items: center; gap: .9em; padding: .9em 1.4em; }
.adm-bar .mark { width: 2.2em; height: 2.2em; }
.adm-bar b { font-size: 1.2em; color: var(--primary); }
.adm-bar .av { margin-inline-start: auto; }
.adm-main { display: grid; gap: .9em; align-content: start; min-width: 0; overflow: hidden; padding: .2em 1.6em 1em; }
.adm .big-title { font-size: 1.7em; }
.adm .present { display: grid; gap: .5em; padding: 1.2em 1.4em; border-radius: 1.9em; background: linear-gradient(var(--primary-soft), var(--tint));
                color: var(--primary-soft-ink); }
.present .line { align-items: baseline; gap: .8em; }
.present .figure { font-size: 2.6em; font-weight: 600; line-height: 1; }
/* A share of a whole: an SVG whose filled length is the data. */
.meter { display: block; width: 100%; height: .5em; border-radius: 999px; overflow: hidden; }
.meter .track { fill: currentColor; fill-opacity: .18; }
.meter .fill { fill: var(--primary); }
html[dir="rtl"] .meter { transform: scaleX(-1); }
.adm .cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: .9em; align-items: start; }
.cols .label { display: block; margin-bottom: .5em; color: var(--ink); }
.adm .rows > * { padding: .7em 1em; }
.adm .count { font-size: 1.7em; font-weight: 600; }
.adm .count.urgent { color: var(--error); }
.adm .kpi { display: grid; gap: .3em; padding: 1em 1.2em; border-radius: 1.9em; background: var(--card); }

/* Narrower than a laptop, the dashboard is a plain window as tall as its content. */
@media (max-width: 56.1875em) {
  .laptop { padding-inline: 0; }
  .base { display: none; }
  .lid { aspect-ratio: auto; border-width: 5px; border-radius: 20px; }
  .lid .adm { position: relative; font-size: 2.9cqw; }
  .adm .cols { grid-template-columns: 1fr; }
}

/* ---------- the office's small cards ---------- */
.gl .label { font-size: .82rem; }
.gl .press { padding: .75em 1em; }
.gl .av { width: 2.6em; height: 2.6em; }
.gl-name { padding: 0 .375rem; font-size: .875rem; font-weight: 600; color: var(--ink-2); }
.gl.ghost { place-items: center; min-height: 4.75rem; background: none; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-2); }
.present-card .figure { font-size: 3rem; font-weight: 600; line-height: 1; }
.present-card .line { align-items: baseline; }
.present-card .meter ~ .line { align-items: center; padding-top: .625rem; border-top: 1px solid var(--line); }
.present-card .urgent { color: var(--error); }
.gl .meter { height: .5rem; }
