/* fractalyze/ui primitives.css, v0.1.2: the controls both products draw alike, each a `ui-` class read from tokens.css.
   Its rules are fractalyze/alba's src/design/primitives.css at commit 97edfebdad2579e57d69dca97ee32a04ac0aef89,
   unchanged, as alba landed them with its design system (fractalyze/alba#5290); the last block is what
   fractalyze/studio added, proposed for the shared kit (fractalyze/studio#746). A bare #n and an ADR number
   below are fractalyze/alba's, as the file was alba's own. Do not edit a repo's copy of this file: change it
   here, tag a version, and pull it there (README.md). */
/* alba's primitives (ADR 0586 point 3, #3096): the controls every surface draws alike, each a `ui-` class read from
   the names src/design/tokens.css sets, and from nothing else. A page's own CSS may place a primitive (grid, gap,
   width, margin) but never restyles it: no colour, border, corner, height or type on a `ui-*` class outside this file.
   The approved sheet is docs/mockups/3103-primitives.html (#3103), its fields docs/mockups/3104-fields.html (#3104),
   its dialog and toast docs/mockups/3105-dialog-toast.html (#3105), its badge and card docs/mockups/3106-badge-card.html
   (#3106), and its tabs, switches, chips, titles, empty lists, hints and menus docs/mockups/4008-controls.html (#4008,
   docs/controls.md says which page still draws its own). The desk app imports it (src/deskApp/main.tsx); alba's small pages inline it
   (src/server/smallPage.ts, through src/design/tokenText.ts). */

/* A button, or a link that acts as one. Plain by default: words on the surface, a line around it. `ui-main` is the one
   filled action, `ui-soft` a step lighter for the first of the choices a list's every row carries (#5097), `ui-quiet` has no line until hovered, `ui-danger` says the action removes or ends something, and
   `ui-danger-fill`, filled red, is a delete that cannot be undone, alone: 고객 정보 삭제, 휴지통으로 옮기기 and a
   confirmation's final delete, such as 연락처 지우기's (#4008, the owner's word of 2026-11-25); every other removal stays `ui-danger`. A
   default button is 40px, a `ui-small` one 32px, and both are a phone's touch height, 44px, at a phone's width.
   The base rule names the class twice, so it outranks a page's rule on its elements, such as the old console's
   `.desk button` (src/staff/console.css), as the desk's `.desk .btn` did; a modifier of the same rank wins by coming
   after it. */
.ui-button.ui-button {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-1);
  min-height: var(--h-2); margin: 0; padding: 0 var(--s-4);
  border: 1px solid var(--line); border-radius: var(--r-1); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: var(--t-body); font-weight: var(--w-2); line-height: 1.25;
  white-space: nowrap; text-align: center; text-decoration: none; cursor: pointer;
  transition: background var(--d-1) var(--ease), border-color var(--d-1) var(--ease);
}
.ui-button.ui-small { min-height: var(--h-1); padding: 0 var(--s-3); font-size: var(--t-sub); }
.ui-button:hover:not(:disabled) { border-color: var(--input-line); background: var(--soft); }
.ui-button.ui-main { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
/* A filled button's hover, its words at 4.5:1 on it in light and dark (#2838, src/staff/consoleTokens.test.ts). */
.ui-button.ui-main:hover:not(:disabled) { border-color: var(--accent-hover); background: var(--accent-hover); color: var(--on-accent); }
/* A step lighter than ui-main (#5097, the owner's word of 2026-12-01): the first of several choices that sit side by side
   on many rows, as 할 일's do, where a filled blue on every row is heavy. The accent badge's ground and words. */
.ui-button.ui-soft { border-color: var(--accent-soft); background: var(--accent-soft); color: var(--accent-ink); }
.ui-button.ui-soft:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.ui-button.ui-quiet { border-color: transparent; background: transparent; color: var(--accent-ink); padding: 0 var(--s-2); }
.ui-button.ui-quiet:hover:not(:disabled) { border-color: transparent; background: var(--accent-faint); }
.ui-button.ui-danger { color: var(--bad); }
.ui-button.ui-danger:hover:not(:disabled) { border-color: var(--bad); background: var(--bad-bg); }
.ui-button.ui-danger-fill { border-color: var(--bad-fill); background: var(--bad-fill); color: var(--on-bad-fill); font-weight: var(--w-3); }
.ui-button.ui-danger-fill:hover:not(:disabled) { border-color: var(--bad-fill); background: var(--bad-fill); color: var(--on-bad-fill); }
/* An icon alone (#3110): square at its size's height, no line, in the muted words until hovered; tinted while what it
   opens is open or while it is pressed. Its name is its aria-label. */
.ui-button.ui-icon { width: var(--h-2); padding: 0; border-color: transparent; background: transparent; color: var(--muted); }
.ui-button.ui-icon.ui-small { width: var(--h-1); padding: 0; }
.ui-button.ui-icon:hover:not(:disabled) { border-color: transparent; background: var(--soft); color: var(--text); }
.ui-button.ui-icon:is([aria-expanded="true"], [aria-pressed="true"]) { background: var(--accent-soft); color: var(--accent-ink); }
.ui-button:disabled { opacity: .5; cursor: default; }
.ui-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 700px) { .ui-button.ui-button { min-height: var(--h-touch); } .ui-button.ui-icon.ui-icon { width: var(--h-touch); } }

/* A row of actions side by side (#3095): one height on one top edge, whether each is a button, a link or a form's
   button, wrapping when the width runs out. A row is a div: a p ends where a form starts. */
.ui-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--s-2); }
.ui-row > form { display: contents; }

/* A field: `ui-input`, `ui-select` or `ui-textarea`, the surface inside the input line, 40px like a default button; a
   `ui-small` one 32px, and both a phone's touch height, 44px, at a phone's width. A textarea is two and a half fields
   tall and grows by hand. Focus draws the accent ring on the field's edge; a field that refused what was typed draws
   its line in red. The base rule names the class twice, as `ui-button`'s does, to outrank a page's rule on its
   elements. A field's own width is the line it sits on: a page places a narrower one. */
.ui-input.ui-input, .ui-select.ui-select, .ui-textarea.ui-textarea {
  box-sizing: border-box; width: 100%; min-width: 0; min-height: var(--h-2); margin: 0; padding: 0 var(--s-3);
  border: 1px solid var(--input-line); border-radius: var(--r-1); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: var(--t-body); font-weight: var(--w-1); line-height: 1.5;
}
.ui-textarea.ui-textarea { min-height: calc(var(--h-2) * 2.5); padding: var(--s-2) var(--s-3); resize: vertical; }
.ui-input.ui-small, .ui-select.ui-small { min-height: var(--h-1); font-size: var(--t-sub); }
.ui-input::placeholder, .ui-textarea::placeholder { color: var(--muted); opacity: 1; }
.ui-input:focus, .ui-select:focus, .ui-textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.ui-input:disabled, .ui-select:disabled, .ui-textarea:disabled { background: var(--tint); color: var(--muted); cursor: default; }
.ui-input[aria-invalid="true"], .ui-select[aria-invalid="true"], .ui-textarea[aria-invalid="true"],
.ui-field.ui-bad .ui-input, .ui-field.ui-bad .ui-select, .ui-field.ui-bad .ui-textarea { border-color: var(--bad); }
@media (max-width: 700px) { .ui-input.ui-input, .ui-select.ui-select { min-height: var(--h-touch); } }
/* On a touch screen a field's words are --t-field, a small one's too: an iPhone zooms the page into a field set smaller
   as it takes focus, and a page's keyboard fit stands aside while it is zoomed (#3003). */
@media (pointer: coarse) { .ui-input.ui-input, .ui-select.ui-select, .ui-textarea.ui-textarea { font-size: var(--t-field); } }

/* A field with its words: its label over it, then a hint, or in the hint's place what to fix. The label names the
   field (`for`, or the label wrapping it) and the words under it describe it (`aria-describedby`). */
.ui-field { display: grid; gap: var(--space-label); align-content: start; min-width: 0; }
.ui-field > .ui-label { font-size: var(--t-sub); font-weight: var(--w-2); color: var(--text); }
/* A group of choices under one name: a `fieldset` that is a `ui-field`, its `legend` the `ui-label`, with the
   browser's own box and inset taken off. Read at no weight, so a page's own placing of the group still holds. */
:where(fieldset.ui-field) { margin: 0; padding: 0; border: 0; }
:where(.ui-field > legend.ui-label) { padding: 0; margin-bottom: var(--space-label); }
/* A hint: a short line in the muted words that says how to fill or read what it sits under, a field or anything else
   (#4008). */
.ui-hint { margin: 0; font-size: var(--t-cap); font-weight: var(--w-1); color: var(--muted); }
.ui-field > .ui-error { font-size: var(--t-cap); font-weight: var(--w-1); color: var(--bad); }

/* A phone field (#3621, docs/mockups/3621-phone-input): the country it is read in, a button opening `ui-phone-list`,
   then the number, in one input line; the quiet `ui-phone-hint` under it in the error's colour. The widget draws the
   same field in its own shadow style (src/widget/widget.js's `.pf`). */
.ui-phone { position: relative; display: inline-flex; flex: 1 1 200px; flex-direction: column; gap: var(--s-1); min-width: 0; }
.ui-phone-box { position: relative; display: flex; min-height: var(--h-1); box-sizing: border-box; border: 1px solid var(--input-line); border-radius: var(--r-1); background: var(--surface); }
.ui-phone-box:focus-within { border-color: var(--accent); }
.ui-phone-box.ui-phone-bad { border-color: var(--bad); }
.ui-phone-box .ui-phone-country { flex: none; display: flex; align-items: center; gap: var(--s-1); min-height: 0; padding: 0 var(--s-1) 0 var(--s-2); border: 0; border-right: 1px solid var(--line-soft); border-radius: var(--r-1) 0 0 var(--r-1); background: none; color: var(--text); font: inherit; font-size: var(--t-sub); font-weight: var(--w-2); cursor: pointer; }
.ui-phone-country svg { width: var(--s-4); height: var(--s-4); fill: none; stroke: var(--muted); stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
.ui-phone-box .ui-phone-number { flex: 1; min-width: 0; min-height: 0; margin: 0; padding: var(--s-1) var(--s-2); border: 0; border-radius: 0 var(--r-1) var(--r-1) 0; box-shadow: none; outline: none; background: none; color: var(--text); font: inherit; font-variant-numeric: tabular-nums; }
.ui-phone-hint { color: var(--bad); font-size: var(--t-cap); }
.ui-phone-list { position: absolute; left: -1px; top: calc(100% + var(--s-1)); z-index: var(--layer-float); width: 260px; max-height: 264px; overflow: auto; margin: 0; padding: var(--s-1); list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow-menu); }
.ui-phone .ui-phone-list button { width: 100%; min-height: var(--h-2); display: flex; align-items: center; gap: var(--s-2); padding: 0 var(--s-2); border: 0; border-radius: var(--r-1); background: none; color: var(--text); font: inherit; font-size: var(--t-sub); font-weight: var(--w-1); text-align: left; cursor: pointer; }
.ui-phone .ui-phone-list button:hover, .ui-phone .ui-phone-list button:focus-visible { background: var(--soft); outline: none; }
.ui-phone .ui-phone-list button[aria-selected="true"] { background: var(--soft); font-weight: var(--w-2); }
.ui-phone-code { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

/* A dialog: the browser's modal `dialog`, opened with showModal(), on the surface with a line, the largest corner and
   the deeper shadow, over the page dimmed; `ui-wide` for one that holds a form of its own. Its title is a
   `ui-dialog-title`, a line of words under it a `ui-dialog-text` (`ui-bad` for what failed), and its actions a `ui-row` at its end. On a phone it
   is a sheet from the bottom: the whole width, its top corners round, its actions the touch height. A page's own
   rules lay out what the dialog holds. The base rule names the class twice, as `ui-button`'s does, to outrank a page's
   rule on its element, a `dialog.<name>` weighing as much as one class. */
.ui-dialog.ui-dialog {
  box-sizing: border-box; width: min(440px, calc(100vw - 2 * var(--s-4))); max-width: none;
  max-height: calc(100vh - 2 * var(--s-4)); overflow: auto; margin: auto; padding: var(--s-5);
  border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-2); font-family: inherit; font-size: var(--t-body); word-break: keep-all;
}
.ui-dialog.ui-wide { width: min(560px, calc(100vw - 2 * var(--s-4))); }
/* `ui-full` for one holding a whole editor beside its preview (#3656, a 문의 메뉴 item's form): nearly the whole window on
   a PC, at most --width-editor wide, and the whole screen on a phone. What it holds lays itself out to its height. */
.ui-dialog.ui-full { width: min(var(--width-editor), calc(100vw - 2 * var(--s-4))); height: calc(100vh - 2 * var(--s-4)); padding: 0; overflow: hidden; }
/* `ui-search` for a search box with its results under it (#4566, 팀 검색, as Slack's): near the window's top, so the box
   stays put while the results under it grow, and on a phone the whole screen. It keeps no padding of its own: what it
   holds, one block that fills its one cell, runs to its edges, and what is wider scrolls inside it. */
.ui-dialog.ui-search { width: min(var(--width-search), calc(100vw - 2 * var(--s-4))); max-height: calc(100vh - 4 * var(--s-6)); margin: calc(2 * var(--s-6)) auto auto; padding: 0; overflow: hidden; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
/* Shown only while open: a closed dialog stays hidden. A form that fills it lays out the same way. */
.ui-dialog[open], .ui-dialog > form { display: grid; gap: var(--s-3); align-content: start; }
/* Named twice, so it outranks a page's `dialog.<name>::backdrop` as the box rule does. */
.ui-dialog.ui-dialog::backdrop { background: var(--scrim); }
/* What it holds is spaced by its gap alone, so a paragraph in it keeps no margin of its own. */
.ui-dialog :where(p) { margin: 0; }
:is(.ui-dialog, .ui-sheet) .ui-dialog-title { margin: 0; font-size: var(--t-title); font-weight: var(--w-3); color: var(--text); }
.ui-dialog .ui-dialog-text { margin: 0; font-size: var(--t-sub); font-weight: var(--w-1); color: var(--muted); }
.ui-dialog .ui-dialog-text.ui-bad { color: var(--bad); }
/* A dialog's head: its title, then its ×, `ui-dialog-close`, at the right edge (#3105); a `ui-sheet`, a page's own panel
   shown as a sheet from below (the desk's 확인 정보, #3003), takes the same head. */
:is(.ui-dialog, .ui-sheet) .ui-dialog-head { display: flex; align-items: center; gap: var(--s-2); }
:is(.ui-dialog, .ui-sheet) .ui-dialog-close {
  flex: none; display: inline-grid; place-items: center; width: var(--h-2); height: var(--h-2); margin: 0 0 0 auto; padding: 0;
  border: 0; border-radius: var(--r-1); background: transparent; color: var(--text);
  font-family: inherit; font-size: var(--t-head); font-weight: var(--w-1); line-height: 1; cursor: pointer;
}
:is(.ui-dialog, .ui-sheet) .ui-dialog-close:hover { background: var(--soft); }
:is(.ui-dialog, .ui-sheet) .ui-dialog-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ui-dialog .ui-row { justify-content: flex-end; margin-top: var(--s-2); }
@media (max-width: 700px) {
  .ui-dialog.ui-dialog, .ui-dialog.ui-wide {
    width: 100vw; max-height: calc(100vh - var(--h-touch)); margin: auto 0 0; padding: var(--s-4) var(--s-4) var(--s-5);
    border-width: 1px 0 0; border-radius: var(--r-3) var(--r-3) 0 0;
  }
  .ui-dialog.ui-full, .ui-dialog.ui-search { width: 100vw; height: 100vh; max-height: none; margin: 0; padding: 0; border-width: 0; border-radius: 0; }
  :is(.ui-dialog, .ui-sheet) .ui-dialog-close { width: var(--h-touch); height: var(--h-touch); }
}

/* A toast: a short line that says what just happened, the text colour as its ground so it stands out in either
   scheme; `ui-bad` says something failed, on the red fill. A `ui-button ui-small ui-quiet` in it is its one action. A
   page places it where it shows. */
.ui-toast.ui-toast {
  box-sizing: border-box; display: inline-flex; align-items: center; gap: var(--s-3); margin: 0; padding: var(--s-2) var(--s-4);
  border: 0; border-radius: var(--r-2); background: var(--text); color: var(--bg); box-shadow: var(--shadow-2);
  font-size: var(--t-sub); font-weight: var(--w-1); line-height: 1.5;
}
.ui-toast:has(> .ui-button) { padding-right: var(--s-2); }
.ui-toast > .ui-button.ui-quiet { color: inherit; }
.ui-toast.ui-bad { background: var(--bad-fill); color: var(--on-bad-fill); }

/* A badge: a short state, name or number in a pill, never pressed. Neutral by default, in the soft ground and muted
   words; `ui-accent`, `ui-ok`, `ui-warn`, `ui-bad` and `ui-op` (what only the mall's people see, such as an AI 초안)
   take a state's soft ground and ink. `ui-line` draws a line in the state's own line colour, `ui-dashed` a dashed one
   on no ground for what is not settled yet (alba's suggestion, what a Shopper typed), and `ui-plain` drops the ground
   and the sides, for a dot and its words. A `ui-dot` inside leads with a dot in the badge's colour. `ui-tag` with
   `ui-tag-<colour>` is a 상담 태그: its name on a soft ground of its colour, in a shade of it that reads at 4.5:1 in light
   and in dark (ADR 0622), and `ui-tag-own` one picked by hand, its pairs set inline (Badge.tsx's tagColorProps); grey
   and struck through with `ui-off`, and a `ui-badge-x` at its end takes it off. `ui-count` is a number, filled in the accent: one
   look for every count, on the menu, in a list or in a tab (#4563), and `ui-quiet` the grey one for a count that changes
   nothing to do next (#5264). A badge is 20px; `ui-small` 18px, on a
   row or pinned to a control's corner, and `ui-large` 28px, where it heads a list. A badge keeps its width in a row
   of others, and cuts its words with … only where a page caps its width. `ui-tag-<colour>` also names a page's own
   swatch or dot of a tag's colour (설정 › 상담 태그, the desk's tag tree), which reads that colour as `--ui-dot`. The
   base rule names the class twice, as `ui-button`'s does, to outrank a page's rule on its elements. */
.ui-badge.ui-badge {
  box-sizing: border-box; display: inline-flex; align-items: center; gap: var(--s-1); flex-shrink: 0; max-width: 100%; height: var(--h-badge);
  margin: 0; padding: 0 var(--s-2); border: 0; border-radius: var(--r-full); background: var(--soft); color: var(--muted);
  font-family: inherit; font-size: var(--t-cap); font-weight: var(--w-2); line-height: 1; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}
.ui-badge.ui-small { height: var(--h-badge-s); }
.ui-badge.ui-large { height: var(--h-badge-l); padding: 0 var(--s-3); font-size: var(--t-sub); }
.ui-badge.ui-accent { background: var(--accent-soft); color: var(--accent-ink); --ui-dot: var(--accent); }
.ui-badge.ui-ok { background: var(--ok-bg); color: var(--ok-ink); }
.ui-badge.ui-warn { background: var(--warn-bg); color: var(--warn-ink); --ui-line: var(--warn-line); }
.ui-badge.ui-bad { background: var(--bad-bg); color: var(--bad); }
.ui-badge.ui-op { background: var(--op-bg); color: var(--op); }
.ui-badge.ui-line { outline: 1px solid var(--ui-line, var(--line)); outline-offset: -1px; }
.ui-badge.ui-plain { padding: 0; background: none; }
.ui-badge > .ui-dot { flex: none; width: 8px; height: 8px; border-radius: var(--r-full); background: var(--ui-dot, currentColor); }
.ui-badge > svg { flex: none; width: 14px; height: 14px; }
/* A badge in a row of actions sits on the row's middle line, not stretched to the buttons' height. */
.ui-row > :is(.ui-badge, .ui-hint) { align-self: center; }
.ui-badge.ui-tag { background: var(--ui-tag-ground, var(--soft)); color: var(--ui-tag-name, var(--text)); }
.ui-badge.ui-tag > .ui-badge-x { color: inherit; opacity: .7; }
.ui-badge.ui-tag > .ui-badge-x:hover { color: var(--text); opacity: 1; }
.ui-tag-red { --ui-dot: var(--tag-red); --ui-tag-ground: var(--tag-red-ground); --ui-tag-name: var(--tag-red-name); }
.ui-tag-orange { --ui-dot: var(--tag-orange); --ui-tag-ground: var(--tag-orange-ground); --ui-tag-name: var(--tag-orange-name); }
.ui-tag-amber { --ui-dot: var(--tag-amber); --ui-tag-ground: var(--tag-amber-ground); --ui-tag-name: var(--tag-amber-name); }
.ui-tag-green { --ui-dot: var(--tag-green); --ui-tag-ground: var(--tag-green-ground); --ui-tag-name: var(--tag-green-name); }
.ui-tag-cyan { --ui-dot: var(--tag-cyan); --ui-tag-ground: var(--tag-cyan-ground); --ui-tag-name: var(--tag-cyan-name); }
.ui-tag-indigo { --ui-dot: var(--tag-indigo); --ui-tag-ground: var(--tag-indigo-ground); --ui-tag-name: var(--tag-indigo-name); }
.ui-tag-violet { --ui-dot: var(--tag-violet); --ui-tag-ground: var(--tag-violet-ground); --ui-tag-name: var(--tag-violet-name); }
.ui-tag-pink { --ui-dot: var(--tag-pink); --ui-tag-ground: var(--tag-pink-ground); --ui-tag-name: var(--tag-pink-name); }
/* A colour picked by hand: its dot is the name's shade, which reads on a view's grounds as the name does. */
.ui-tag-own { --ui-dot: var(--own-name-light); --ui-tag-ground: var(--own-ground-light); --ui-tag-name: var(--own-name-light); }
@media (prefers-color-scheme: dark) {
  .ui-tag-own { --ui-dot: var(--own-name-dark); --ui-tag-ground: var(--own-ground-dark); --ui-tag-name: var(--own-name-dark); }
}
.ui-tag.ui-off { --ui-tag-ground: var(--soft); --ui-tag-name: var(--muted); }
.ui-badge.ui-dashed { background: none; outline: 1px dashed var(--input-line); outline-offset: -1px; color: var(--muted); }
.ui-badge.ui-off { color: var(--muted); text-decoration: line-through; }
.ui-badge.ui-count {
  justify-content: center; min-width: var(--h-badge); padding: 0 calc(var(--s-1) * 1.5);
  background: var(--accent); color: var(--on-accent); font-weight: var(--w-3); font-variant-numeric: tabular-nums;
}
.ui-badge.ui-count.ui-small { min-width: var(--h-badge-s); }
/* A quiet count (#5264): a number that changes nothing to do next, grey on no ground, so the accent's one fill is the
   count that does (수신함's 답변 필요), on an icon's corner as on a row. */
.ui-badge.ui-count.ui-quiet { min-width: 0; padding: 0; background: none; color: var(--muted); font-weight: var(--w-2); }
/* `ui-quiet` on a container (an inbox row, #5290 folding in #5263) draws its badges as quiet words: no ground or frame,
   in the muted colour, so what is around them reads first. A count and a `ui-plain` badge, a dot and its words such as
   답변 필요, keep their look: they are what needs doing now. */
.ui-quiet .ui-badge.ui-badge:not(.ui-count, .ui-plain) { padding: 0; outline: 0; background: none; color: var(--muted); }
.ui-badge > .ui-badge-x {
  flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; min-height: 0; margin: 0 calc(-1 * var(--s-1)) 0 0; padding: 0;
  border: 0; border-radius: var(--r-full); background: none; color: var(--muted);
  font: inherit; font-weight: var(--w-1); line-height: 1; cursor: pointer;
}
.ui-badge > .ui-badge-x:hover { background: var(--line); color: var(--text); }
.ui-badge > .ui-badge-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* A badge that is a button opens what it counts (the desk head's 확인 필요 N on a phone): it takes the pointer and
   the focus ring a ui-button does, and draws its line (`ui-line`) while what it opened is open. */
button.ui-badge { cursor: pointer; }
button.ui-badge:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* A card: one thing on the surface, with a line, the middle corner and the light shadow; its title a `ui-card-title`,
   a line of words under it a `ui-card-text`. A page's own rules lay out what else it holds, and place it. */
.ui-card.ui-card {
  box-sizing: border-box; display: grid; gap: var(--s-2); align-content: start; min-width: 0; margin: 0; padding: var(--space-card);
  border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); color: var(--text); box-shadow: var(--shadow-1);
}
.ui-card :where(p) { margin: 0; }
/* A card that is a form spaces its fields by the one field gap (#4305). */
form.ui-card.ui-card { gap: var(--space-field); }
.ui-card .ui-card-title { margin: 0; font-size: var(--t-body); font-weight: var(--w-3); color: var(--text); }
/* `ui-bad` draws the card's line in the bad tone, for one that says something is broken and needs a person, such as
   운영 현황's ended 이지어드민 login (#4065). */
.ui-card.ui-bad { border-color: var(--bad); }
.ui-card .ui-card-text { margin: 0; font-size: var(--t-sub); font-weight: var(--w-1); color: var(--muted); }
/* A card that is a link, such as 운영 현황's 미배정 tile, opens what it shows: no underline, its line in the accent while hovered. */
a.ui-card { text-decoration: none; }
a.ui-card:hover { border-color: var(--accent); }

/* A right panel (#3213, ADR 0603): an item's detail beside its list, laid over the right edge of the window, where a
   list page's column ends, so the list keeps its place, width and columns while it is open and the panel stays put as
   the list scrolls; picking another item changes only what the panel holds. It is --width-panel wide on the surface
   with a line on its left and the deeper shadow. Its head is a `ui-panel-head`: a `ui-panel-back` (a link back to the
   list, shown on a phone alone), the item's words, then a `ui-panel-close` × (shown on a PC alone). What it holds is a
   `ui-panel-body`, which scrolls alone. On a phone it takes the whole screen.
   It slides in from the right as it opens and back out as it closes, as the phone menu's drawer does, at --d-slide:
   `SidePanel` (src/deskApp/ui/SidePanel.tsx) keeps it, `ui-closing`, until it is out. Picking another item slides
   nothing, for the panel stays. */
@keyframes ui-slide-in { from { transform: translateX(100%); } }
@keyframes ui-slide-out { to { transform: translateX(100%); } }
/* A spinner (#4428): a ring the size of the words beside it, its turning arc the accent, for a control saving a press. */
.ui-spin { box-sizing: border-box; display: inline-block; flex: none; width: 1em; height: 1em; border: 2px solid var(--input-line); border-top-color: var(--accent); border-radius: var(--r-full); animation: ui-spin var(--d-spin) linear infinite; }
@keyframes ui-spin { to { transform: rotate(360deg); } }
/* A button busy with its press (#5096, docs/mockups/5096-busy-button.html): its words keep their room, unseen
   (`ui-busy-words`), so it keeps its width, and a `ui-spinner` turns over them in the words' colour, so it reads on a
   filled button and a plain one alike. It is off but not dimmed: working, not unavailable. Under reduced motion the
   spinner does not turn; it fades slowly in and out. src/deskApp/ui/Button.tsx draws it. */
[aria-busy="true"]:has(> .ui-spinner) { position: relative; }
[aria-busy="true"]:has(> .ui-spinner):disabled { opacity: 1; cursor: progress; }
[aria-busy="true"] > .ui-busy-words { display: contents; visibility: hidden; }
.ui-spinner { box-sizing: border-box; position: absolute; inset: 0; width: 1em; height: 1em; margin: auto; border: 2px solid currentColor; border-right-color: transparent; border-radius: var(--r-full); animation: ui-spin var(--d-spin) linear infinite; }
@keyframes ui-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .ui-spinner { animation: ui-pulse var(--d-pulse) ease-in-out infinite; } }
.ui-panel.ui-panel {
  box-sizing: border-box; position: fixed; top: 0; right: 0; bottom: 0; z-index: 4; display: flex; flex-direction: column;
  width: var(--width-panel); max-width: 100vw; margin: 0; padding: 0;
  border: 0; border-left: 1px solid var(--line); border-radius: 0; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-2); font-family: inherit; font-size: var(--t-body); word-break: keep-all;
  animation: ui-slide-in var(--d-slide) var(--ease);
}
.ui-panel.ui-panel.ui-closing { animation: ui-slide-out var(--d-slide) var(--ease) forwards; }
.ui-panel :where(p) { margin: 0; }
.ui-panel .ui-panel-head { flex: none; display: flex; align-items: flex-start; gap: var(--s-2); padding: var(--space-panel); border-bottom: 1px solid var(--line); }
.ui-panel .ui-panel-title { margin: 0; font-size: var(--t-title); font-weight: var(--w-3); color: var(--text); }
.ui-panel .ui-panel-back {
  display: none; align-items: center; gap: var(--s-1); min-height: var(--h-touch); margin: 0; padding: 0 var(--s-2);
  border: 0; border-radius: var(--r-1); background: none; color: var(--text);
  font-family: inherit; font-size: var(--t-body); font-weight: var(--w-2); text-decoration: none; cursor: pointer;
}
.ui-panel .ui-panel-close {
  flex: none; display: inline-grid; place-items: center; width: var(--h-2); height: var(--h-2); margin: 0 0 0 auto; padding: 0;
  border: 0; border-radius: var(--r-1); background: transparent; color: var(--muted);
  font-family: inherit; font-size: var(--t-head); font-weight: var(--w-1); line-height: 1; cursor: pointer;
}
/* Escape's key beside the ×, on a PC alone as the × is (#4708). */
.ui-panel .ui-panel-key {
  flex: none; margin: 0 0 0 auto; padding: 0 var(--s-1); border: 1px solid var(--input-line); border-bottom-width: 2px;
  border-radius: var(--r-1); color: var(--muted); font-family: inherit; font-size: var(--t-cap); line-height: 1.4;
}
.ui-panel .ui-panel-key + .ui-panel-close { margin-left: 0; }
.ui-panel .ui-panel-close:hover { background: var(--soft); color: var(--text); }
.ui-panel :is(.ui-panel-close, .ui-panel-back):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ui-panel .ui-panel-body { flex: 1; min-height: 0; overflow: auto; display: grid; gap: var(--space-section); align-content: start; padding: var(--space-panel); }
@media (max-width: 700px) {
  .ui-panel.ui-panel { z-index: 20; width: auto; left: 0; border-left: 0; box-shadow: none; }
  .ui-panel .ui-panel-head { flex-direction: column; gap: var(--s-1); padding: var(--s-1) var(--s-2) var(--s-3); }
  .ui-panel .ui-panel-back { display: inline-flex; }
  .ui-panel :is(.ui-panel-close, .ui-panel-key) { display: none; }
}

/* A tab bar (#4008): a row of tabs over the one view they switch, each in the muted words, the picked one in the text
   colour on a 2px accent line as wide as the tab, its ends square. A tab keeps one weight picked or not, so picking moves
   nothing. A tab is a link (`aria-current="page"`) or a button (`aria-selected`, Choice.tsx's `Tabs`). The row is a
   phone's touch height at every width, with a line under it, and scrolls sideways when it runs out; `ui-fill` spreads
   two to four tabs evenly across it. The base rule names the class twice, as `ui-button`'s does, to outrank a page's
   rule on its elements, such as the desk's bare `button` (src/deskApp/desk.css), whose corner rounded a line's ends. */
.ui-tabs:not([hidden]) { display: flex; gap: var(--s-1); padding: 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ui-tab.ui-tab {
  flex: none; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-1);
  min-height: var(--h-touch); margin: 0; padding: 0 var(--s-3);
  border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--muted);
  font-family: inherit; font-size: var(--t-sub); font-weight: var(--w-2); line-height: 1.25;
  white-space: nowrap; text-decoration: none; cursor: pointer;
}
.ui-tab:hover { color: var(--text); }
.ui-tab:is([aria-selected="true"], [aria-current="page"]) { border-bottom-color: var(--accent); color: var(--text); }
.ui-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ui-tabs.ui-fill > .ui-tab { flex: 1 1 0; }

/* A segmented switch (#4008): two to four ways of one setting, one picked (Choice.tsx's `Pressed`), on a soft track,
   the picked way raised on the surface with the light shadow. As tall as a default button, a `ui-small` one as a small
   button, so it sits in a `ui-row`; a phone's touch height at a phone's width. `ui-fill` spreads it across its line. */
.ui-seg.ui-seg { box-sizing: border-box; display: inline-flex; max-width: 100%; min-height: var(--h-2); margin: 0; padding: var(--s-1); border-radius: var(--r-2); background: var(--soft); overflow-x: auto; scrollbar-width: none; }
.ui-seg.ui-small { min-height: var(--h-1); }
.ui-seg.ui-fill { display: flex; }
.ui-seg.ui-seg > :is(button, a) {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-1); min-height: 0; margin: 0;
  padding: 0 var(--s-3); border: 0; border-radius: var(--r-1); background: none; color: var(--muted);
  font-family: inherit; font-size: var(--t-sub); font-weight: var(--w-2); white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background var(--d-1) var(--ease);
}
.ui-seg > :is(button, a):hover:not(:disabled) { color: var(--text); }
/* The picked way: a pressed button, or a tab where a tab bar is drawn as a segmented row, as 자동 응답's tabs are on a
   phone (#4015), or the link to the page shown, as 할 일's 할 일 / 완료 on a phone (#3985). */
.ui-seg.ui-seg > :is(button, a):is([aria-pressed="true"], [aria-selected="true"], [aria-current="page"]) { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.ui-seg > button:disabled { opacity: .5; cursor: default; }
/* A row saving a press (#4428): the way pressed keeps its ink, a ui-spin turning before its words, while the row is off. */
.ui-seg[aria-busy="true"] > button[aria-pressed="true"]:disabled { opacity: 1; }
.ui-seg > :is(button, a):focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* On a phone the track is the touch height, and each way reaches across it for a finger (ADR 0729 point 3); a small one
   keeps a small button's height, its ways reaching the touch height past it, which its track then does not clip. */
@media (max-width: 700px) {
  .ui-seg.ui-seg:not(.ui-small) { min-height: var(--h-touch); }
  .ui-seg > :is(button, a) { position: relative; }
  .ui-seg > :is(button, a)::after { content: ""; position: absolute; inset: calc(-1 * var(--s-1)) 0; }
  .ui-seg.ui-small { overflow: visible; }
  .ui-seg.ui-small > :is(button, a)::after { inset: calc((var(--h-1) - var(--h-touch)) / 2 - var(--s-1)) 0; }
}

/* A filter chip (#4008): a pill pressed on or off (`aria-pressed`) to narrow a list, a link to a list so narrowed
   (`aria-current="page"`), or one that opens its values to pick, set (`ui-set`) once one is picked, as the desk's 검색
   draws them; its count after its words is a `ui-n`, and an icon before them is muted as the count is. Pressed or set:
   the accent's line, soft ground and ink, its count and icon too. A small control's height, a phone's touch height at a
   phone's width. */
.ui-chip.ui-chip {
  box-sizing: border-box; display: inline-flex; align-items: center; gap: var(--s-1); min-height: var(--h-1); margin: 0; padding: 0 var(--s-3);
  border: 1px solid var(--input-line); border-radius: var(--r-full); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: var(--t-sub); font-weight: var(--w-2); line-height: 1.25; white-space: nowrap; text-decoration: none; cursor: pointer;
}
.ui-chip:hover { background: var(--soft); }
.ui-chip:is([aria-pressed="true"], [aria-current="page"], .ui-set) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.ui-chip > :is(.ui-n, svg) { color: var(--muted); }
.ui-chip > .ui-n { font-variant-numeric: tabular-nums; }
.ui-chip:is([aria-pressed="true"], [aria-current="page"], .ui-set) > :is(.ui-n, svg) { color: inherit; }
.ui-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 700px) { .ui-chip.ui-chip { min-height: var(--h-touch); } }

/* A switch (#4008): parts.tsx's `Switch`, a `role="switch"` button. Off, a soft track with the input line; on, the
   accent. Its knob is white in both schemes. */
.ui-switch.ui-switch {
  position: relative; flex: none; box-sizing: border-box; width: var(--h-2); height: var(--h-switch); min-height: 0; margin: 0; padding: 0;
  border: 1px solid var(--input-line); border-radius: var(--r-full); background: var(--soft); cursor: pointer;
  transition: background var(--d-1) var(--ease), border-color var(--d-1) var(--ease);
}
.ui-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: calc(var(--h-switch) - 3 * 2px); height: calc(var(--h-switch) - 3 * 2px);
  border-radius: var(--r-full); background: var(--knob); box-shadow: var(--knob-ring); transition: transform var(--d-1) var(--ease);
}
.ui-switch[aria-checked="true"] { border-color: var(--accent); background: var(--accent); }
.ui-switch[aria-checked="true"]::after { transform: translateX(calc(var(--h-2) - var(--h-switch))); box-shadow: none; }
.ui-switch:disabled { opacity: .5; cursor: default; }
.ui-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* A checkbox or a radio (#4008): the browser's own, in the accent, its focus ring as a button's; `ui-bad` ticks one in
   --bad, where ticking it says something is wrong. An option card, `ui-option`: a label holding one choice
   of a few and its words, a `small` under them; the picked one in the accent's line, drawn inside so picking moves
   nothing, on its soft ground; one that can't be picked dimmed, unless it is the one picked. */
.ui-check { flex: none; width: var(--h-check); height: var(--h-check); margin: 0; accent-color: var(--accent); }
.ui-check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ui-check.ui-bad { accent-color: var(--bad); }
.ui-option { box-sizing: border-box; display: flex; align-items: center; gap: var(--s-3); min-height: var(--h-touch); padding: var(--s-2) var(--s-3); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); color: var(--text); cursor: pointer; }
.ui-option:has(:disabled) { cursor: default; }
.ui-option:has(:disabled:not(:checked)) { opacity: .55; }
.ui-option:has(:checked) { border-color: var(--accent); background: var(--accent-soft); outline: 1px solid var(--accent); outline-offset: -2px; }
.ui-option small { display: block; color: var(--muted); font-size: var(--t-cap); }

/* Titles (#4008): a page's, a section's, a group's label, and the line under any of them, `ui-lead`. */
.ui-page-title { margin: 0; font-size: var(--t-head); font-weight: var(--w-3); line-height: 1.3; text-wrap: balance; }
.ui-section-title { margin: 0; font-size: var(--t-title); font-weight: var(--w-3); line-height: 1.35; }
.ui-group-title { margin: 0; font-size: var(--t-cap); font-weight: var(--w-2); color: var(--muted); }
.ui-lead { margin: 0; font-size: var(--t-sub); font-weight: var(--w-1); color: var(--muted); }

/* What a list holds when it holds nothing (#4008): one line in the muted words, and a small button after it where there
   is a first thing to add. A page places it, in the middle of a whole pane. */
.ui-empty { display: grid; gap: var(--s-2); justify-items: start; margin: 0; padding: var(--s-2) 0; font-size: var(--t-sub); font-weight: var(--w-1); color: var(--muted); }

/* A menu (#4008): a popover of actions on the surface, with a line, the middle corner and the menu's shadow, each action a
   row a small control tall; a `ui-danger` one in red, and one left off muted, with why under it. A page places it. On a phone it is a sheet from below, its rows the
   touch height. */
.ui-menu.ui-menu { box-sizing: border-box; display: grid; margin: 0; padding: var(--s-1); list-style: none; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); color: var(--text); box-shadow: var(--shadow-menu); }
.ui-menu.ui-menu > :is(button, a) {
  display: flex; align-items: center; gap: var(--s-2); min-height: var(--h-1); margin: 0; padding: 0 var(--s-2);
  border: 0; border-radius: var(--r-1); background: none; color: var(--text);
  font-family: inherit; font-size: var(--t-sub); font-weight: var(--w-1); text-align: left; text-decoration: none; cursor: pointer;
}
.ui-menu > :is(button, a):hover { background: var(--soft); }
.ui-menu > :is(button, a):focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ui-menu.ui-menu > .ui-danger { color: var(--bad); }
/* An action that can't be done now: left off in the muted words, `aria-disabled`, with why in a `ui-hint` under it. */
.ui-menu.ui-menu > [aria-disabled="true"] { color: var(--muted); cursor: not-allowed; }
.ui-menu > [aria-disabled="true"]:hover { background: none; }
.ui-menu > .ui-hint { padding: 0 var(--s-2) var(--s-2); }
/* A menu's heading, over its rows: what they act on (일괄 처리's N개 상담의 담당자), or over one group of a picker's rows
   (상담 태그's 묶음s). */
.ui-menu.ui-menu > .ui-group-title, .ui-menu.ui-menu > [role="group"] > .ui-group-title { padding: var(--s-2) var(--s-2) var(--s-1); }
/* A line between a menu's parts; the rows of a choice opened under the row that names it set in (`ui-in`), the picked one
   (`menuitemradio`) marked ✓ at its end, as is each picked of a choice of several (`menuitemcheckbox`). */
.ui-menu.ui-menu > hr { width: 100%; margin: var(--s-1) 0; border: 0; border-top: 1px solid var(--line); }
.ui-menu.ui-menu > .ui-in { padding-left: calc(var(--s-2) + var(--s-3)); }
.ui-menu > :is([role="menuitemradio"], [role="menuitemcheckbox"])[aria-checked="true"]::after { content: "✓" / ""; margin-left: auto; color: var(--accent-ink); }
/* A box's suggestions as it is typed in, such as 동료 부르기's names after an @: a listbox in a menu's box, its options the
   menu's rows, the one ↑ and ↓ have reached (`aria-selected`), which Enter takes, on the ground a pointed-at row has. It stays
   by the box it fills at every width: a sheet from below would sit under a phone's keyboard, away from the words. */
.ui-menu.ui-menu > [role="option"][aria-selected="true"] { background: var(--soft); }
@media (max-width: 700px) {
  .ui-menu.ui-menu:not([role="listbox"]) { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: var(--layer-float); width: 100%; padding-bottom: calc(var(--s-2) + env(safe-area-inset-bottom, 0px)); border-width: 1px 0 0; border-radius: var(--r-3) var(--r-3) 0 0; box-shadow: var(--shadow-2); }
  .ui-menu.ui-menu > :is(button, a) { min-height: var(--h-touch); }
}

/* A time of day (#4307): src/deskApp/ui/TimeField.tsx's `ui-input`, wide enough for "HH:MM" in even digits, with a
   clock button inside its end that opens the hours and the minutes to pick from under it, in a menu's box. The picked
   hour and minute are in the soft accent. On a phone the menu is a sheet from below, its rows the touch height, its
   head the field's name and the time, and 완료 at its foot; the head and 완료 show there alone. */
/* A choice of several (`MultiSelect`, #4297): a button drawn as a `ui-select`, naming those picked, its caret turned while
   open, and under it a `ui-menu` of `menuitemcheckbox` rows, each with a `ui-hint` line under its name where it has one. */
.ui-multi { position: relative; }
.ui-multi-button.ui-multi-button { display: flex; align-items: center; gap: var(--s-2); text-align: left; cursor: pointer; }
.ui-multi-button > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-multi-button > .ui-multi-none { color: var(--muted); }
.ui-multi-button > svg { width: var(--t-body); height: var(--t-body); flex: none; fill: none; stroke: var(--ink-2); stroke-width: calc(var(--icon-stroke) * 16 / 24); stroke-linecap: round; stroke-linejoin: round; transition: transform var(--d-1) var(--ease); }
.ui-multi-button[aria-expanded="true"] > svg { transform: rotate(180deg); }
.ui-multi-menu { position: absolute; top: calc(100% + var(--s-1)); left: 0; right: 0; z-index: var(--layer-float); }
.ui-multi-row { display: grid; }
/* A searchable check list (`PickList`, #4770): the picks as `ui-badge`s with their × where it shows them, a search field
   with what it found beside it, and a column of `ui-option` cards, the item's 없음 heading it dashed, and a pick gone
   from Cafe24 marked in --bad. */
.ui-picklist { display: grid; gap: var(--s-2); }
.ui-picklist-tags { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.ui-picklist-search { display: flex; align-items: center; gap: var(--s-2); }
.ui-picklist-search > .ui-input { flex: 1; min-width: 0; }
.ui-picklist-search > .ui-hint { flex: none; }
.ui-picklist-opts { display: grid; gap: var(--s-1); }
.ui-picklist-opts > .ui-option { align-items: flex-start; }
.ui-picklist-none.ui-picklist-none { border-style: dashed; }
.ui-picklist-gone { font-size: var(--t-cap); font-weight: var(--w-2); color: var(--bad); }
/* A choice of one drawn as a badge (`BadgeMenu`, #4447): a `ui-badge` that is a button, its caret after its words,
   turning a `ui-spin` while a pick saves, across its cell with `ui-fill`, and under it a `ui-menu` of `menuitemradio` rows; one left off leads with a
   lock and says why in a `ui-hint` under its name, and a `ui-hint` under the rows says what the choice costs. On a phone
   the badge is the touch height and the menu the sheet from below, its head what is being set and 닫기 at its foot,
   which show there alone. */
.ui-badge-pick { position: relative; display: inline-flex; max-width: 100%; }
.ui-badge-pick.ui-fill, .ui-badge-pick.ui-fill > .ui-badge-menu { width: 100%; justify-content: center; }
.ui-badge.ui-badge-menu { border: 0; font-family: inherit; cursor: pointer; }
.ui-badge.ui-badge-menu:hover { filter: brightness(.96); }
.ui-badge.ui-badge-menu:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ui-badge.ui-badge-menu:disabled { cursor: default; }
.ui-badge.ui-badge-menu > .ui-badge-menu-caret { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; transition: transform var(--d-1) var(--ease); }
.ui-badge-menu[aria-expanded="true"] > .ui-badge-menu-caret { transform: rotate(180deg); }
.ui-badge.ui-badge-menu > .ui-spin { width: 10px; height: 10px; }
.ui-badge-menu-list { position: absolute; top: calc(100% + var(--s-1)); left: 0; z-index: var(--layer-float); min-width: 11rem; }
.ui-badge-menu-row { display: grid; padding: var(--s-1) 0; }
.ui-badge-menu-lock { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
.ui-badge-menu-head, .ui-menu.ui-menu > .ui-badge-menu-close { display: none; }
.ui-badge-menu-title { margin: 0; font-size: var(--t-title); font-weight: var(--w-3); color: var(--text); }
.ui-badge-menu-head .ui-hint { margin: 0; }
@media (max-width: 700px) {
  .ui-badge.ui-badge-menu { height: auto; min-height: var(--h-touch); }
  .ui-badge-menu-head { display: grid; gap: var(--s-1); padding: var(--s-2) var(--s-2) var(--s-3); }
  .ui-menu.ui-menu > .ui-badge-menu-close { display: flex; justify-content: center; color: var(--muted); }
}
.ui-time { position: relative; display: inline-flex; flex: none; width: calc(var(--h-2) * 2.4); vertical-align: middle; }
.ui-time > .ui-input.ui-input { padding-right: var(--h-1); font-variant-numeric: tabular-nums; }
.ui-time-pick, .ui-date-pick {
  position: absolute; top: 50%; right: var(--s-1); transform: translateY(-50%); display: grid; place-items: center;
  width: calc(var(--h-1) - var(--s-1)); height: calc(var(--h-1) - var(--s-1)); padding: 0; border: 0; border-radius: var(--r-1);
  background: none; color: var(--muted); cursor: pointer;
}
:is(.ui-time-pick, .ui-date-pick) > svg { width: var(--t-body); height: var(--t-body); fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; }
:is(.ui-time-pick, .ui-date-pick):is(:hover, [aria-expanded="true"]) { background: var(--soft); color: var(--text); }
:is(.ui-time-pick, .ui-date-pick):focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
:is(.ui-time-pick, .ui-date-pick):disabled { cursor: default; background: none; color: var(--muted); }
.ui-time-menu {
  position: absolute; top: calc(100% + var(--s-1)); left: 0; z-index: var(--layer-float); box-sizing: border-box; display: grid; gap: var(--s-2);
  width: max-content; padding: var(--s-1); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); color: var(--text); box-shadow: var(--shadow-menu);
}
.ui-time-head, .ui-time-done.ui-time-done { display: none; }
.ui-time-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-1); }
.ui-time-cols > [role="listbox"] { display: grid; align-content: start; max-height: calc(var(--h-1) * 7); overflow-y: auto; }
.ui-time-cols > [role="listbox"] + [role="listbox"] { padding-left: var(--s-1); border-left: 1px solid var(--line); }
.ui-time-cols [role="option"] {
  min-width: var(--h-2); min-height: var(--h-1); margin: 0; padding: 0 var(--s-2); border: 0; border-radius: var(--r-1); background: none; color: var(--text);
  font-family: inherit; font-size: var(--t-sub); font-weight: var(--w-1); font-variant-numeric: tabular-nums; text-align: left; cursor: pointer;
}
.ui-time-cols [role="option"]:hover { background: var(--soft); }
.ui-time-cols [role="option"]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ui-time-cols [role="option"][aria-selected="true"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: var(--w-2); }
@media (max-width: 700px) {
  .ui-time-menu { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: 100%; padding: var(--s-3) var(--s-4) calc(var(--s-4) + env(safe-area-inset-bottom, 0px)); border-width: 1px 0 0; border-radius: var(--r-3) var(--r-3) 0 0; box-shadow: var(--shadow-2); }
  .ui-time-head { display: flex; align-items: center; justify-content: space-between; font-size: var(--t-body); }
  .ui-time-head > span { font-size: var(--t-head); font-weight: var(--w-2); font-variant-numeric: tabular-nums; }
  .ui-time-done.ui-time-done { display: inline-flex; }
  .ui-time-cols > [role="listbox"] { max-height: calc(var(--h-touch) * 5); }
  .ui-time-cols [role="option"] { min-height: var(--h-touch); font-size: var(--t-body); }
}

/* A month's days (`MonthDays`, #4008): src/deskApp/ui/Calendar.tsx's weekdays from Sunday and a button for each day,
   the period picker's and the date field's alike. A picked day in --accent, a day between two picked in the soft
   accent, today ringed in --accent where the calendar marks it, and a day that may not be picked faded. On a phone a
   day is the touch height, the desk search's and 운영현황's periods' as the date field's. */
.ui-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-half); text-align: center; font-variant-numeric: tabular-nums; }
.ui-days small { padding: var(--s-1) 0; color: var(--muted); font-size: var(--t-cap); }
.ui-days button { min-height: var(--h-1); padding: 0; border: 0; border-radius: var(--r-1); background: none; color: var(--text); font: inherit; font-size: var(--t-sub); cursor: pointer; }
.ui-days button:hover:not(:disabled) { background: var(--soft); }
.ui-days button.mid { border-radius: 0; background: var(--accent-soft); color: var(--accent-ink); }
.ui-days button.today:not(.edge) { border: 1px solid var(--accent); }
.ui-days button.edge { background: var(--accent); color: var(--on-accent); font-weight: var(--w-3); }
.ui-days button:disabled { color: var(--muted); opacity: 0.45; cursor: default; }
.ui-days button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 700px) { .ui-days button { min-height: var(--h-touch); } }

/* A date (#4008, docs/mockups/4008-datefield): src/deskApp/ui/DateField.tsx's `ui-input`, wide enough for "YYYY-MM-DD"
   in even digits at its size, with a calendar button inside its end, drawn as the time's clock button, that opens a
   month under it in a menu's box, placed on the window by the field (--ui-date-top, --ui-date-left) so no box it is in
   clips it: ‹ the month's name ›, its days, and at the foot what may be picked and 오늘. On a phone the month is a sheet
   from below, its days the touch height, its head the field's name and the day, and 오늘 and 완료 at its foot; the head
   and 완료 show there alone, and what may be picked is said by the faded days. */
.ui-date { position: relative; display: inline-flex; flex: none; width: calc(var(--h-2) * 4); vertical-align: middle; }
.ui-date.ui-small { width: calc(var(--h-2) * 3.4); }
.ui-date > .ui-input.ui-input { padding-right: var(--h-1); font-variant-numeric: tabular-nums; }
.ui-date-menu {
  position: fixed; top: var(--ui-date-top, auto); left: var(--ui-date-left, auto); z-index: var(--layer-float); box-sizing: border-box; display: grid; gap: var(--s-1);
  width: calc(var(--h-1) * 8 + var(--s-5)); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); color: var(--text); box-shadow: var(--shadow-menu);
}
.ui-date-month { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.ui-date-month > strong { font-size: var(--t-sub); }
.ui-date-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-top: var(--s-1); padding-top: var(--s-2); border-top: 1px solid var(--line); }
.ui-date-head, .ui-date-done.ui-date-done { display: none; }
@media (max-width: 700px) {
  .ui-date-menu { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: 100%; padding: var(--s-3) var(--s-4) calc(var(--s-4) + env(safe-area-inset-bottom, 0px)); border-width: 1px 0 0; border-radius: var(--r-3) var(--r-3) 0 0; box-shadow: var(--shadow-2); }
  .ui-date-menu::before { content: ""; justify-self: center; width: var(--h-2); height: var(--s-1); border-radius: var(--r-full); background: var(--input-line); }
  .ui-date-head { display: flex; align-items: baseline; justify-content: space-between; font-size: var(--t-title); }
  .ui-date-head > span { color: var(--accent-ink); font-size: var(--t-body); font-weight: var(--w-2); font-variant-numeric: tabular-nums; }
  .ui-date-menu .ui-days button { font-size: var(--t-body); }
  .ui-date-foot { border-top: 0; }
  .ui-date-foot > .ui-hint { display: none; }
  .ui-date-foot > .ui-button { flex: 1; }
  .ui-date-foot > .ui-date-done.ui-date-done { display: inline-flex; flex: 2; justify-content: center; }
}
/* A loading skeleton (#5179, docs/mockups/5179-console-skeleton/): grey blocks in the shape of what is on its way, so a
   page does not jump when its read lands. `ui-sk` is one block, a line of words by default; a `ui-sk-w1`…`ui-sk-w6`
   width, from a fifth to the whole; a kind for its height and corner. The shapes lay the blocks out as their page does:
   cards, a table's rows, labels over fields. The blocks shimmer at --d-pulse, and stand still where the device asks for
   less motion. A reader hears `ui-sk-said` alone. src/deskApp/ui/Skeleton.tsx draws it. */
.ui-skeleton { margin: 0; }
.ui-sk-said { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ui-sk-shape { display: flex; flex-direction: column; gap: var(--s-3); }
.ui-sk {
  display: block; flex: none; height: 12px; border-radius: var(--r-1);
  background: linear-gradient(90deg, var(--soft), var(--line), var(--soft)); background-size: 200% 100%;
  animation: ui-shimmer var(--d-pulse) linear infinite;
}
@keyframes ui-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ui-sk { animation: none; } }
.ui-sk-w1 { width: 18%; } .ui-sk-w2 { width: 32%; } .ui-sk-w3 { width: 48%; }
.ui-sk-w4 { width: 62%; } .ui-sk-w5 { width: 78%; } .ui-sk-w6 { width: 100%; }
.ui-sk-sub { height: 10px; }
.ui-sk-num { height: 22px; }
.ui-sk-pill { min-width: var(--h-2); height: var(--h-1); border-radius: var(--r-full); }
.ui-sk-field { height: var(--h-2); }
.ui-sk-area { height: calc(var(--h-2) * 2); }
.ui-sk-button { min-width: calc(var(--h-2) * 2); height: var(--h-2); }
.ui-sk-chart { height: calc(var(--h-2) * 4); border-radius: var(--r-2); }
.ui-sk-face { width: var(--h-1); height: var(--h-1); border-radius: var(--r-full); }
.ui-sk-row { display: flex; gap: var(--s-2); }
.ui-sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--h-2) * 4), 1fr)); gap: var(--s-3); }
.ui-sk-card { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); }
.ui-sk-table { gap: 0; padding: 0; }
.ui-sk-fold { flex-direction: row; align-items: center; gap: var(--s-4); min-height: var(--h-2); padding-block: 0; }
.ui-sk-tr { display: flex; align-items: center; gap: var(--s-4); min-height: var(--h-2); padding: 0 var(--s-4); border-top: 1px solid var(--line); }
.ui-sk-tr > .ui-sk { width: auto; flex: 1 1 0; }
.ui-sk-tr > .ui-sk:nth-child(2) { flex-grow: 3; }
.ui-sk-th { border-top: 0; }
.ui-sk-lines { display: flex; flex: 1; flex-direction: column; gap: var(--s-2); min-width: 0; }
.ui-sk-face-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2); }
.ui-sk-field-set { display: flex; flex-direction: column; gap: var(--s-2); }
.ui-sk-beside { display: flex; flex-wrap: wrap; gap: var(--s-5); align-items: flex-start; }
.ui-sk-beside > .ui-sk-stack { display: flex; flex: 1 1 calc(var(--h-2) * 8); flex-direction: column; gap: var(--s-3); max-width: var(--width-read); }
.ui-sk-beside > .ui-sk-chart { flex: 1 1 calc(var(--h-2) * 6); width: auto; }
.ui-sk-rows > .ui-sk-shape { gap: var(--s-1); }

/* Added by fractalyze/studio, proposed for the kit (fractalyze/studio#695 and #746): what Studio's forms and lists need
   past alba's rules above, read from the same tokens. Studio's pages post plain forms, so a chip, a way of a segmented
   switch, a switch and an option card may each wrap the form's own radio or checkbox, laid invisibly over it, and draw
   from it; a menu's row may sit deeper than the menu's own child, as a button in a form; and a state names its class
   twice, so it outranks a page's older rule on the same element, as ui-button's base rule does. */
.ui-n { color: var(--muted); font-weight: var(--w-1); font-variant-numeric: tabular-nums; }
.ui-tab.ui-tab:hover { color: var(--text); }
.ui-tab.ui-tab:is([aria-selected="true"], [aria-current="page"], [aria-current="true"]) { border-bottom-color: var(--accent); color: var(--text); }

.ui-seg.ui-seg > label {
  position: relative; flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-1);
  min-height: 0; margin: 0; padding: 0 var(--s-3); border: 0; border-radius: var(--r-1); background: none; color: var(--muted);
  font-family: inherit; font-size: var(--t-sub); font-weight: var(--w-2); white-space: nowrap; cursor: pointer;
  transition: background var(--d-1) var(--ease);
}
.ui-seg.ui-seg > :is(button, label):hover { color: var(--text); }
.ui-seg.ui-seg > :is([aria-pressed="true"], [aria-checked="true"], label:has(> input:checked)) { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.ui-seg > label:has(> input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.ui-seg > label > input { position: absolute; opacity: 0; pointer-events: none; }

.ui-chip.ui-chip:hover { background: var(--soft); }
.ui-chip.ui-chip:is([aria-pressed="true"], [aria-checked="true"], [aria-current="page"], .ui-set, :has(> input:checked)) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.ui-chip:is([aria-checked="true"], :has(> input:checked)) > :is(.ui-n, svg) { color: inherit; }
.ui-chip.ui-chip:disabled { opacity: .45; cursor: default; }
.ui-chip:has(> input) { position: relative; }
.ui-chip > input { position: absolute; opacity: 0; pointer-events: none; }
.ui-chip:has(> input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.ui-switch > input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.ui-switch:has(> input)::after { pointer-events: none; }
.ui-switch.ui-switch:has(> input:checked) { border-color: var(--accent); background: var(--accent); }
.ui-switch:has(> input:checked)::after { transform: translateX(calc(var(--h-2) - var(--h-switch))); box-shadow: none; }
.ui-switch:has(> input:disabled) { opacity: .5; }
.ui-switch:has(> input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* An option card that is a button, pressed (aria-pressed) or a radio (aria-checked), as a part to move a photo onto. */
button.ui-option { margin: 0; color: var(--text); font-family: inherit; font-size: var(--t-sub); font-weight: var(--w-2); line-height: 1.3; }
.ui-option:is([aria-pressed="true"], [aria-checked="true"]) { border-color: var(--accent); background: var(--accent-soft); outline: 1px solid var(--accent); outline-offset: -2px; }
.ui-option:is(:focus-visible, :has(:focus-visible)) { outline: 2px solid var(--accent); outline-offset: 2px; }
.ui-option:disabled { cursor: default; }

.ui-empty > p { margin: 0; }
.ui-empty[hidden], .ui-menu[hidden] { display: none; }
.ui-menu.ui-menu .ui-item {
  box-sizing: border-box; display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: var(--h-1);
  margin: 0; padding: 0 var(--s-2); border: 0; border-radius: var(--r-1); background: none; color: var(--text);
  font: inherit; font-size: var(--t-sub); font-weight: var(--w-1); text-align: left; text-decoration: none;
  white-space: nowrap; cursor: pointer;
}
.ui-menu.ui-menu .ui-item:is(:hover, :focus-visible) { background: var(--soft); outline: none; }
.ui-menu.ui-menu > :is(button, a):not(.ui-button):disabled, .ui-menu.ui-menu .ui-item:disabled { background: none; color: var(--faint); cursor: default; }
.ui-menu.ui-menu .ui-item.ui-danger { color: var(--bad); }
/* A count filled in the accent's soft ground rather than the accent: one beside the picked one's words. */
.ui-badge.ui-count.ui-accent { background: var(--accent-soft); color: var(--accent-ink); }
@media (max-width: 700px) {
  .ui-menu.ui-menu .ui-item { min-height: var(--h-touch); }
}
