/* Pomi polish: Toss-like clarity on top of Pomi's identity (indigo accent, glass avatar,
   rounded shapes). Loaded last; it only refines tokens and presentation. */
:root{
  /* Every custom property here is listed in design/tokens.json with its role and its light and dark value;
     keep the two the same (nothing checks it). Rules below use these names, never a raw colour. */
  --bg:#FFFFFF; --surface:#FFFFFF;
  --ink:#191F28; --g4:#4E5968; --g3:#646F7D; --g2:#E5E8EB; --g1:#F2F4F6; --line-strong:#D1D1D6; --outline:#DDE1E6;
  --a:#994DE5; --a-press:#8A3CD3; --a-off:#DCC8F6; --on-fill:#FFFFFF;
  --a-soft:#F5F0FC; --a-tint:#EFE6FB; --a-tint-press:#E5D6F8; --a-text:#833FBF; --a-link:#833FBF;
  --danger:#D92D4A; --danger-text:#B3261E; --danger-soft:#FFF0EF;
  --warn-bg:#FFF4D6; --warn-ink:#5E4300; --cream:#FDFBE4; --butter:#F0DF72; --butter-ink:#443C00; --ok:#1B9A45; --ok-soft:#E6F6EC; --ok-text:#146C34; --star:#E8A317; --line-green:#06C755; --apple-fill:#000000; --on-apple:#FFFFFF; --google-ink:#5E5E5E; --google-fill:#FFFFFF; --gsi-fill:#FFFFFF; --gsi-rim:#747775; --gsi-ink:#1F1F1F;
  --toast:rgba(25,31,40,.92); --scrim:rgba(0,0,0,.32); --overlay:rgb(255 255 255/.94);
  --r-xs:4px; --r-sm:10px; --r-md:16px; --r-lg:24px; --r-card:28px; --r-sheet:32px; --r-pill:999px; --r-bub:22px;
  --t-fast:125ms; --t-med:300ms; --ease:cubic-bezier(.2,0,0,1);
  /* The catalog's own scale (app/system.css): the leaf margin and the five text sizes. */
  --leaf:8px; --fs-title:20px; --fs-head:17px; --fs-body:16px; --fs-sub:14px; --fs-cap:13px;
}
body{color:var(--ink)}
/* The ring follows each control's own corner radius (a round send button stays round when focused). */
:focus-visible{outline:2px solid var(--a);outline-offset:2px}
/* ---- press feedback (no layout shift): one scale for every control ---- */
button,[role=button]{transition:transform var(--t-med) var(--ease-out),background-color var(--t-fast) var(--ease),opacity var(--t-fast) var(--ease)}
button:not(:disabled):active,[role=button]:active{transform:scale(.96)}
/* Taps answer like an app: no grey flash, no double-tap zoom wait, no text selection when a press lingers. */
html{-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%;text-size-adjust:100%}
button,a,[role=button],label{touch-action:manipulation}
button,[role=button]{-webkit-user-select:none;user-select:none}
/* ---- fill the screen: no phone mock-up frame, no fake status bar ---- */
:root{--tab-h:calc(80px + env(safe-area-inset-bottom,0px)); --bar-h:56px}
@media (min-width:481px){
  html,body{background:var(--g1)}
}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
  button:not(:disabled):active,[role=button]:active,a:active{transform:none}
}
/* ==== 11-05 details pass (make-interfaces-feel-better): same look, finer details. CSS only. ==== */
:root{
  /* a 1px ring + lift + ambient shadow stands in for a border where the border only faked depth */
  --shadow-border:0 0 0 1px oklch(0 0 0/.06),0 1px 2px 0 oklch(0 0 0/.04),0 4px 12px -4px oklch(0 0 0/.08);
  --shadow-border-hover:0 0 0 1px oklch(0 0 0/.1),0 1px 2px 0 oklch(0 0 0/.06),0 8px 16px -4px oklch(0 0 0/.1);
  /* elevation from Astryx Butter (design/theme): warm, soft */
  --shadow-low:0 2px 4px #1D1C110D,0 4px 8px #1D1C111A;
  --shadow-med:0 2px 4px #1D1C110D,0 8px 24px #1D1C111A;
  --img-outline:oklch(0 0 0/.1);
}
/* ---- motion (2026-11-09): only what is new moves; transform and opacity only; off with reduced motion (rule above) ----
   Opening a screen does not replay its history. A message, a live task card or Pomi's typing bubble that was not on screen
   before comes in once; a screen reached by a tab slides a little toward where its tab is. */
:root{ --t-slow:700ms; --ease-out:cubic-bezier(.16,1,.3,1); --ease-pop:cubic-bezier(.34,1.4,.64,1); }
/* The spring where the browser draws linear() (Safari 17.2, Chrome 113, Firefox 112); the cubic-bezier above otherwise. */
@supports (transition-timing-function:linear(0,1)){
  :root{--ease-out:linear(0,.069,.216,.385,.544,.678,.783,.862,.918,.955,.979,.993,1.001,1.005,1.006,1.006,1.005,1.004,1.003,1.002,1.002,1.001,1.001,1,1)}
}
/* ---- dark (2026-11-09): when the phone is in dark mode ----
   Values are chosen for dark, not inverted: a near-black page, slightly raised surfaces for cards and fields, text at
   comfortable contrast (ink on page 15:1, secondary 7:1), and an accent lifted so it reads on dark. Photos, maps and the
   Google attribution keep their own colors. Each control keeps its role: a main action stays filled, a link stays a link. */
@media (prefers-color-scheme: dark){
  :root{color-scheme:dark;
    --bg:#0F1012; --surface:#18191C; --apple-fill:#FFFFFF; --on-apple:#000000; --gsi-fill:#131314; --gsi-rim:#8E918F; --gsi-ink:#E3E3E3;
    --ink:#ECEEF1; --g4:#C2C7CE; --g3:#959BA5; --g2:#2B2E34; --g1:#1F2125; --line-strong:#3A3D44; --outline:#34373E;
    --a:#994DE5; --a-press:#8A3CD3; --a-off:#543A6F;
    --a-soft:#2F1F3F; --a-tint:#2F1F3F; --a-tint-press:#3D2952; --a-text:#CFB2F3; --a-link:#AE73EA;
    --danger-text:#FFB4AB; --danger-soft:#3A1E1C;
    --warn-bg:#3A3016; --warn-ink:#F3DFA5; --cream:#261A13; --butter:#EEDF75; --butter-ink:#443C00; --ok:#34C759; --ok-soft:#16301F; --ok-text:#7FDCA0;
    --toast:rgba(43,46,52,.96); --scrim:rgba(0,0,0,.55); --overlay:oklch(.26 0 0/.94);
    --shadow-border:0 0 0 1px oklch(1 0 0/.07),0 1px 2px -1px oklch(0 0 0/.5),0 2px 6px 0 oklch(0 0 0/.35);
    --shadow-border-hover:0 0 0 1px oklch(1 0 0/.12),0 1px 2px -1px oklch(0 0 0/.55),0 2px 8px 0 oklch(0 0 0/.4);
    --img-outline:oklch(1 0 0/.1);
    --shadow-low:0 2px 4px oklch(0 0 0/.3),0 4px 8px oklch(0 0 0/.35); --shadow-med:0 2px 4px oklch(0 0 0/.35),0 8px 24px oklch(0 0 0/.5)}
  /* A rule that takes its colours from the tokens above needs no line here: --bg, --surface and the rest already
     change. The lists below are for older rules whose light value sits on another role than their dark one. */
  html,body{background:var(--bg)}
  /* Fields on the page; fields inside a pill (the composer) stay see-through. */
  input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select{background:var(--surface);color:var(--ink)}
}
:where(button,a,summary,[role=button]):focus-visible{animation:pomi-ring-in var(--t-med) var(--ease-out)}
::selection{background:var(--a-tint)}
input[type=checkbox],input[type=radio]{accent-color:var(--a)}
/* Continuous corners where the browser draws them. A squircle of the same radius looks tighter than a round corner, so
   the scale is 1.5 times larger here (tokens.json radius "squircle"); the inset rule still holds on the larger values.
   Shadows and overflow clipping follow the shape. Circles, pills and bubbles stay round. */
@supports (corner-shape:squircle){
  :root{--r-xs:6px; --r-sm:15px; --r-md:22px; --r-lg:32px; --r-card:36px; --r-sheet:42px}
  :where(*){corner-shape:squircle}
}
