/* ==========================================================================
   SUPERGROOMERS — SHARED FOUNDATION  (v2)
   Bright, single-theme (light) by deliberate choice. Role accent is set by
   [data-role] on <body>: student | customer | admin.

   v2 changes:
   · Drag and drop removed entirely. Every action is a button.
   · Mobile-first: rail becomes a bottom tab bar under 768px.
   · Dog avatars, action rows, bottom sheets, compact calendar.
   ========================================================================== */

:root {
  color-scheme: light;

  --ground:   #F4F7F6;
  --ground-2: #EDF2F0;
  --card:     #FFFFFF;
  --card-2:   #FAFCFB;
  --ink:      #0E1B1D;
  --ink-2:    #2C4144;
  --muted:    #55696B;
  --faint:    #63797B;
  --line:     #E2EAE8;
  --line-2:   #EEF3F2;

  --ok:     #127A45;  --ok-bg:     #E4F4EA;  --ok-line:     #B9E2C9;
  --warn:   #96700A;  --warn-bg:   #FBF1D8;  --warn-line:   #EBD69B;
  --danger: #B33F35;  --danger-bg: #FBE7E5;  --danger-line: #F0C4C0;
  --closed: #5F7170;  --closed-bg: #EFF2F1;  --closed-line: #C9D3D1;

  --accent:    #0A7D74;
  --accent-2:  #10A093;
  --accent-bg: #E2F3F1;
  --accent-line:#B7E0DB;
  --accent-ink:#065E58;

  --r-xs: 6px; --r-sm: 9px; --r: 13px; --r-lg: 18px; --r-full: 999px;

  --sh-1: 0 1px 2px rgba(14,27,29,.05);
  --sh-2: 0 3px 10px rgba(14,27,29,.07);
  --sh-3: 0 10px 28px rgba(14,27,29,.11);

  --ease:  cubic-bezier(.2,.85,.25,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --spring: cubic-bezier(.34,1.56,.64,1);

  --rail: 62px;
  --tabbar: 58px;
  --f-ui: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  --f-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

body[data-role="student"]  { --accent:#0A7D74; --accent-2:#10A093; --accent-bg:#E2F3F1; --accent-line:#B7E0DB; --accent-ink:#065E58; }
body[data-role="customer"] { --accent:#A66607; --accent-2:#D8891A; --accent-bg:#FBF0DC; --accent-line:#EFD5A6; --accent-ink:#7E4C05; }
body[data-role="admin"]    { --accent:#79457A; --accent-2:#9A5E9B; --accent-bg:#F4E9F4; --accent-line:#E0C6E0; --accent-ink:#5E325F; }

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
}

/* ---------------- TEXT PEOPLE TYPED, NOT TEXT WE WROTE ----------------
   An assessor's remark, a dog's name, a decline reason, a student's own note:
   none of it is written to fit a phone. A single unbroken run of characters
   with no space in it has no place to wrap, so it pushed its card wider than
   the screen and put a sideways scrollbar under the whole page (client, 22 Sep
   2026: "Alignment issue again. I am not allow to write too long"). The answer
   is to let it wrap, not to stop them writing.

   break-word on the body is the net: it only ever acts on a word that genuinely
   cannot fit, so every line of copy we wrote ourselves is untouched. The
   containers that actually hold typed text get `anywhere` instead, which also
   lets a flex or grid child shrink below its own longest word — without that a
   `min-width: auto` child still measures the unbroken run and blows the row out
   however the text wraps inside it. */
body { overflow-wrap: break-word; }
.usertext, .fbbox, .kindw,
.tile .t, .tile .m, .lrow .t, .lrow .m, .attrow .d, .attrow .s,
.modal .m, .toast .tt, .toast .ts { overflow-wrap: anywhere; min-width: 0; }

h1,h2,h3,h4 { margin: 0; font-weight: 600; text-wrap: balance; letter-spacing: -.011em; }
h1 { font-size: 21px; } h2 { font-size: 17px; } h3 { font-size: 15px; } h4 { font-size: 13px; }
p { margin: 0 0 10px; }

button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.num  { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ============================ APP SHELL ============================ */

.app { display: grid; grid-template-columns: var(--rail) 1fr; height: 100dvh; }

.rail {
  background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 0 12px; gap: 6px;
}
.rail .brand {
  width: 34px; height: 34px; border-radius: 11px; margin-bottom: 12px;
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
  display: grid; place-items: center; color: #fff; box-shadow: var(--sh-2);
}
.rail-btn {
  width: 42px; height: 40px; border: 0; background: transparent; cursor: pointer;
  border-radius: 10px; display: grid; place-items: center; color: var(--faint);
  position: relative; transition: background .18s var(--ease), color .18s var(--ease);
}
.rail-btn svg { width: 19px; height: 19px; }
.rail-btn:hover { background: var(--ground-2); color: var(--ink-2); }
.rail-btn.is-on { background: var(--accent-bg); color: var(--accent); }
.rail-btn.is-on::before {
  content: ""; position: absolute; left: -6px; top: 50%; translate: 0 -50%;
  width: 3px; height: 22px; border-radius: 3px; background: var(--accent);
}
.rail-btn .tip {
  position: absolute; left: calc(100% + 10px); top: 50%; translate: 0 -50%;
  background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 500;
  padding: 4px 9px; border-radius: 7px; white-space: nowrap; pointer-events: none;
  opacity: 0; scale: .9; transform-origin: left center; z-index: 60;
  transition: opacity .16s var(--ease), scale .16s var(--ease);
}
.rail-btn:hover .tip { opacity: 1; scale: 1; }

.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

.topbar {
  min-height: 60px; flex: none; background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 10px 18px;
}
.topbar .who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.avatar {
  width: 36px; height: 36px; border-radius: var(--r-full); flex: none;
  background: var(--accent-bg); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  border: 1px solid var(--accent-line);
}
.topbar .titles { min-width: 0; }
.topbar .titles .n { font-weight: 650; font-size: 15px; line-height: 1.25; }
.topbar .titles .s { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.topbar .grow { flex: 1; }

.content { flex: 1; overflow: auto; padding: 18px; overscroll-behavior: contain; }
.content.split { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 16px; align-items: start; }
@media (max-width: 1080px) { .content.split { grid-template-columns: 1fr; } }

.view { animation: viewIn .3s var(--ease-out); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- bottom tab bar (mobile) ---- */
.tabbar { display: none; }

@media (max-width: 767px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .rail { display: none; }
  .content { padding: 14px 13px calc(14px + env(safe-area-inset-bottom)); }
  .content.split { grid-template-columns: 1fr; gap: 13px; }
  .topbar { padding: 9px 14px; gap: 10px; position: sticky; top: 0; z-index: 30; }
  .topbar .titles .n { font-size: 14.5px; }

  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    background: var(--card); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    position: sticky; bottom: 0; z-index: 40;
  }
  .tab {
    min-height: var(--tabbar); border: 0; background: transparent; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--faint); font-size: 10.5px; font-weight: 650; padding: 7px 2px;
    transition: color .16s var(--ease);
  }
  .tab svg { width: 21px; height: 21px; }
  .tab.is-on { color: var(--accent); }
  .tab.is-on svg { transform: translateY(-1px); }
  h1 { font-size: 19px; } h2 { font-size: 16px; }
}

/* ============================ SURFACES ============================ */

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); }
.panel + .panel { margin-top: 14px; }
.panel-hd { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-bottom: 1px solid var(--line-2); }
.panel-hd .grow { flex: 1; }
.panel-bd { padding: 15px; }
.panel-bd.tight { padding: 11px; }
@media (max-width: 767px) { .panel-bd { padding: 13px; } .panel-hd { padding: 12px 13px; } }

.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }

/* ============================ BUTTONS ============================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2); font-size: 14px; font-weight: 650;
  cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
  transition: transform .13s var(--ease), background .16s var(--ease),
              border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.btn:hover { background: var(--card-2); border-color: #D3DEDB; }
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); box-shadow: var(--sh-2); }
.btn.ok      { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ok:hover{ filter: brightness(1.08); }
.btn.ghost   { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--ground-2); color: var(--ink-2); }
.btn.danger  { color: var(--danger); border-color: var(--danger-line); background: var(--danger-bg); }
.btn.danger:hover { background: #F8DAD7; }
.btn.sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.lg { min-height: 46px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
@media (max-width: 767px) { .btn { min-height: 44px; } .btn.sm { min-height: 38px; } }

/* action row on a card — the replacement for every former drag gesture */
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 11px; }
.actions .btn { flex: 1 1 auto; }
@media (max-width: 767px) { .actions .btn { flex: 1 1 100%; } .actions .btn.sm { flex: 1 1 auto; } }

/* segmented control */
.seg { display: inline-flex; background: var(--ground-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; cursor: pointer; border-radius: 8px;
  min-height: 32px; padding: 0 13px; font-size: 13px; font-weight: 650; color: var(--muted);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.seg button.is-on { background: var(--card); color: var(--accent-ink); box-shadow: var(--sh-1); }
@media (max-width: 767px) { .seg { width: 100%; } .seg button { flex: 1; min-height: 40px; } }

/* ============================ CHIPS ============================ */

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 24px; padding: 0 9px; border-radius: var(--r-full);
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
  background: var(--ground-2); color: var(--muted); border: 1px solid transparent;
  /* a chip never grows past the thing it sits in; one carrying a name someone
     typed sets it over two lines rather than running off the card edge */
  max-width: 100%;
}
.chip.wrap { white-space: normal; text-align: center; overflow-wrap: anywhere; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chip.ok     { background: var(--ok-bg);     color: var(--ok);     border-color: var(--ok-line); }
.chip.warn   { background: var(--warn-bg);   color: var(--warn);   border-color: var(--warn-line); }
.chip.danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.chip.closed { background: var(--closed-bg); color: var(--closed); border-color: var(--closed-line); }
.chip.accent { background: var(--accent-bg); color: var(--accent-ink); border-color: var(--accent-line); }
.chip.solid  { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip.outline{ background: transparent; border-color: var(--line); color: var(--muted); }

/* ============================ DOG AVATAR ============================ */

.dogpic {
  width: 46px; height: 46px; border-radius: 14px; flex: none; overflow: hidden;
  background: var(--ground-2); border: 1px solid var(--line);
  display: grid; place-items: center;
}
.dogpic svg { width: 100%; height: 100%; display: block; }
.dogpic.lg { width: 64px; height: 64px; border-radius: 18px; }
.dogpic.sm { width: 34px; height: 34px; border-radius: 10px; }
.dogpic.xs { width: 26px; height: 26px; border-radius: 8px; }

/* ============================ CALENDAR ============================ */

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal .dow {
  text-align: center; font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--faint); padding-bottom: 3px;
}
.day {
  position: relative; min-height: 72px; border-radius: 11px; padding: 6px 7px;
  border: 1px solid var(--line); background: var(--card); text-align: left;
  display: flex; flex-direction: column; gap: 3px; width: 100%; font: inherit; color: inherit;
  transition: transform .16s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.day.blank { border: 0; background: transparent; min-height: 0; padding: 0; }
.day .dnum { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.day .cap  { font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.day .marks { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; }

.day.s-open    { border-color: var(--ok-line);     background: linear-gradient(180deg,#E9F7EF 0 38%,#fff 38%); }
.day.s-open .cap { color: var(--ok); }
.day.s-limited { border-color: var(--warn-line);   background: linear-gradient(180deg,#FDF6E4 0 38%,#fff 38%); }
.day.s-limited .cap { color: var(--warn); }
.day.s-full    { border-color: var(--danger-line); background: linear-gradient(180deg,#FBE9E7 0 38%,#fff 38%); }
.day.s-full .cap { color: var(--danger); }
.day.s-closed  { border-color: var(--line); background: repeating-linear-gradient(-45deg,#F7F9F8 0 6px,#F1F5F4 6px 12px); color: var(--closed); }
.day.is-today  { box-shadow: 0 0 0 2px var(--accent) inset; }
.day.is-past   { opacity: .42; }
.day.has-booking { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-bg) 0 38%, #fff 38%); }

/* exam day — must be unmistakable */
.day.is-exam {
  background: linear-gradient(160deg, #123C3A, #0B2422) !important;
  border-color: #0B2422 !important; color: #fff;
}
.day.is-exam .dnum, .day.is-exam .cap { color: #fff; }
.day.is-exam .exam-tag {
  font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: #8FE3D6;
}

/* selectable day (replaces drag target) */
.day.is-pick { cursor: pointer; }
.day.is-pick:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.day.is-sel { box-shadow: 0 0 0 2.5px var(--accent), var(--sh-2); }
.day:disabled { cursor: not-allowed; }

@media (max-width: 767px) {
  .cal { gap: 4px; }
  .day { min-height: 56px; padding: 5px 4px; border-radius: 9px; }
  .day .dnum { font-size: 12px; }
  .day .cap { font-size: 9.5px; }
  .cal .dow { font-size: 9px; }
}

/* ============================ CARDS ============================ */

.tile {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px 13px;
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.tile + .tile { margin-top: 9px; }
.tile .t { font-weight: 650; font-size: 14.5px; }
.tile .m { font-size: 13px; color: var(--muted); }
.tile.accent-edge { border-left: 3px solid var(--accent); }
.tile.pressable { cursor: pointer; width: 100%; text-align: left; font: inherit; color: inherit; }
.tile.pressable:hover { border-color: var(--accent-line); box-shadow: var(--sh-2); }

/* headline appointment / next-thing card */
.headline {
  background: linear-gradient(150deg, var(--accent-bg), var(--card) 72%);
  border: 1px solid var(--accent-line); border-radius: var(--r-lg); padding: 16px 17px;
}
.headline .when { font-size: 25px; font-weight: 700; letter-spacing: -.02em; line-height: 1.12; }
.headline .who  { font-size: 14px; color: var(--muted); }
@media (max-width: 767px) { .headline .when { font-size: 22px; } }

/* key/value pairs — the compact replacement for prose */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 650; }

/* ============================ PROGRESS ============================ */

.bar { height: 7px; border-radius: 4px; background: var(--ground-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .8s var(--ease-out); }
.bar.thin { height: 5px; }
.bar.warn > i { background: linear-gradient(90deg, var(--warn), #D9A526); }
.bar.danger > i { background: linear-gradient(90deg, var(--danger), #D9695E); }

.ring { width: 46px; height: 46px; position: relative; flex: none; }
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 5; }
.ring .trk { stroke: var(--ground-2); }
.ring .val { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease-out); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }

.stat-n { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-l { font-size: 12px; color: var(--muted); }
.roll.bump { animation: bump .4s var(--spring); }
@keyframes bump { 0% { transform: translateY(6px); opacity: .3; } 100% { transform: none; opacity: 1; } }

.meter { display: flex; gap: 2px; }
.meter i { height: 6px; flex: 1; border-radius: 2px; background: var(--ground-2); transition: background .3s var(--ease); }
.meter i.on { background: var(--accent); }
.meter i.warn-on { background: var(--warn); }
.meter i.full-on { background: var(--danger); }

/* ============================ FEEDBACK ============================ */

.pulse { position: relative; overflow: hidden; background: var(--ground-2); border-radius: var(--r-sm); }
.pulse::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent);
  animation: sweep 1.35s infinite; }
@keyframes sweep { 100% { transform: translateX(100%); } }

.settle { animation: settle .4s var(--spring); }
@keyframes settle { 0% { transform: scale(.94); } 55% { transform: scale(1.04); } 100% { transform: scale(1); } }

.ringfx::after { content: ""; position: absolute; inset: -2px; border-radius: inherit;
  border: 2px solid var(--accent); pointer-events: none; animation: ringOut .6s var(--ease-out) forwards; }
@keyframes ringOut { 0% { opacity: .95; scale: 1; } 100% { opacity: 0; scale: 1.16; } }

.shake { animation: shake .36s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake { 10%,90%{transform:translateX(-2px)} 20%,80%{transform:translateX(4px)}
  30%,50%,70%{transform:translateX(-6px)} 40%,60%{transform:translateX(6px)} }

/* ============================ TOAST ============================ */

#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 900;
  display: flex; flex-direction: column-reverse; gap: 9px; pointer-events: none; }
@media (max-width: 767px) {
  #toasts { right: 10px; left: 10px; bottom: calc(var(--tabbar) + 10px + env(safe-area-inset-bottom)); }
}
.toast {
  display: flex; align-items: flex-start; gap: 10px; min-width: 240px; max-width: 380px;
  background: var(--ink); color: #fff; padding: 11px 14px; border-radius: 11px;
  box-shadow: var(--sh-3); font-size: 13.5px; pointer-events: auto;
  animation: toastIn .3s var(--spring);
}
@media (max-width: 767px) { .toast { max-width: none; width: 100%; } }
.toast.out { animation: toastOut .24s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }
.toast .ic { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.toast .tt { font-weight: 700; }
.toast .ts { opacity: .8; font-size: 12.5px; }
.toast.good .ic { color: #6EE7A0; }
.toast.warn .ic { color: #FBD87A; }
.toast.bad  .ic { color: #FCA9A1; }
.toast .undo { margin-left: auto; background: rgba(255,255,255,.16); border: 0; color: #fff;
  font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 7px; cursor: pointer; }
.toast .undo:hover { background: rgba(255,255,255,.28); }

/* ============================ MODAL / SHEET ============================ */

.scrim { position: fixed; inset: 0; background: rgba(14,27,29,.42); backdrop-filter: blur(3px);
  z-index: 800; display: grid; place-items: center; padding: 20px; animation: fade .18s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-3);
  width: min(470px, 100%); max-height: 88dvh; overflow: auto; padding: 20px;
  animation: modalIn .28s var(--spring); }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 16.5px; margin-bottom: 6px; }
.modal .m { color: var(--muted); font-size: 14px; }
.modal .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 17px; flex-wrap: wrap; }

/* on mobile a modal becomes a bottom sheet */
@media (max-width: 767px) {
  .scrim { place-items: end center; padding: 0; }
  .modal {
    width: 100%; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    max-height: 90dvh; animation: sheetIn .3s var(--ease-out);
  }
  @keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
  .modal::before { content: ""; display: block; width: 38px; height: 4px; border-radius: 2px;
    background: var(--line); margin: -4px auto 13px; }
  .modal .acts { flex-direction: column-reverse; }
  .modal .acts .btn { width: 100%; }
}

/* ============================ FORM ============================ */

.field { display: block; margin-bottom: 13px; }
.field > .lb { display: block; font-size: 12.5px; font-weight: 650; color: var(--muted); margin-bottom: 5px; }
.input {
  width: 100%; min-height: 42px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); font-size: 15px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
textarea.input { padding: 10px 12px; min-height: 76px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.input.bad { border-color: var(--danger); background: var(--danger-bg); }
.err { font-size: 12.5px; color: var(--danger); margin-top: 5px; font-weight: 600; }

/* Every password box gets an eye (api.js wraps it); the text stops short of the eye */
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 44px; }
.pw-eye { position: absolute; top: 0; right: 0; width: 42px; height: 42px; display: grid; place-items: center;
  border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 10px; padding: 0; }
.pw-eye:hover { color: var(--ink); }
.pw-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.pw-eye svg { width: 20px; height: 20px; }
.pw-eye .off { display: none; }
.pw-eye[aria-pressed="true"] .on { display: none; }
.pw-eye[aria-pressed="true"] .off { display: block; }
.hint-txt { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

/* pick-cards (course choice, breed choice) — one tap to select */
.picks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pick {
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: var(--card);
  cursor: pointer; text-align: left; font: inherit; color: inherit;
  transition: border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}
.pick:hover { border-color: var(--accent-line); }
.pick.is-on { border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 0 0 1px var(--accent); }
.pick .pt { font-weight: 700; font-size: 14px; }
.pick .pm { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ============================ MISC ============================ */

.hint { display: flex; align-items: center; gap: 9px; padding: 9px 12px;
  background: var(--ground-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 13px; color: var(--ink-2); }

.empty { text-align: center; padding: 26px 14px; color: var(--muted); font-size: 13.5px; }
.empty .big { font-size: 26px; margin-bottom: 6px; opacity: .5; }

.wa {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 15px;
  border-radius: 10px; background: #25D366; color: #05331A; font-weight: 700; font-size: 14px;
  text-decoration: none; border: 1px solid #1DBA57;
  transition: transform .13s var(--ease), filter .16s var(--ease);
}
.wa:hover { filter: brightness(1.05); }
.wa:active { transform: scale(.97); }
.wa svg { width: 18px; height: 18px; }
@media (max-width: 767px) { .wa { min-height: 46px; width: 100%; justify-content: center; } }

.content::-webkit-scrollbar { width: 9px; height: 9px; }
.content::-webkit-scrollbar-thumb { background: #D6E0DD; border-radius: 5px; border: 2px solid var(--ground); }
.content::-webkit-scrollbar-track { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
