/* The kiosk's styles, moved as-is out of index.html (tech-debt plan, step 3). */
    /* Brand palette (derived from Rebel Tails site screenshot) + YC-style neutrals */
    html{ scrollbar-gutter: stable both-edges; }

    :root {
      --bg:#071214;           /* deep teal-black */
      --card:#0d1c1f;         /* dark teal slate */
      --text:#eaf4f2;         /* near-white mint */
      --muted:#9cbeb8;        /* muted mint */
      --accent:#86b9ae;       /* soft teal */
      --primary:#a06a2e;      /* warm brown CTA */
      --danger:#ff6b7a;
      --ok:#4de3a1;
      --pink:#ff00b7;
      --stage-bath-fill:rgba(88,167,255,.18);
      --stage-bath-border:rgba(88,167,255,.55);
      --stage-bath-text:#e6f2ff;
      --stage-nails-fill:rgba(255,214,102,.18);
      --stage-nails-border:rgba(255,214,102,.55);
      --stage-nails-text:#fff5d1;
      --stage-grooming-fill:rgba(255,0,183,.18);
      --stage-grooming-border:rgba(255,0,183,.55);
      --stage-grooming-text:#ffe0f6;
      --stage-dry-fill:rgba(20,60,120,.34);
      --stage-dry-border:rgba(20,60,120,.50);
      --stage-dry-text:#d9e7ff;
      --stage-pickup-fill:rgba(109,231,163,.18);
      --stage-pickup-border:rgba(109,231,163,.55);
      --stage-pickup-text:#e5fff0;
    }
    :root{
      --radius:16px;
      --radius-sm:12px;
      --border: rgba(255,255,255,.08);
      --border-strong: rgba(255,255,255,.14);
      --shadow: 0 10px 30px rgba(0,0,0,.35);
      --shadow-soft: 0 6px 18px rgba(0,0,0,.22);
    }

        body {
      margin:0;
      font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
      background:
        radial-gradient(1200px 800px at 20% 10%, rgba(134,185,174,.12), transparent 55%),
        radial-gradient(900px 700px at 85% 30%, rgba(160,106,46,.10), transparent 60%),
        radial-gradient(900px 700px at 65% 95%, rgba(77,227,161,.06), transparent 60%),
        var(--bg);
      color:var(--text);
      letter-spacing: .1px;
    }

    .wrap { padding:18px 18px calc(var(--bottomNavH, 110px) + 36px); display:grid; grid-template-columns: minmax(0, 760px) minmax(0, 1fr); gap:18px; height:100vh; box-sizing:border-box; width:100%; }

    /* Full-screen "screens" (v1) */
    .fullScreen { grid-template-columns: 1fr !important; }
    /* On tablets we want full width (not centered "phone" width) */
    .fullScreen #leftCard, .fullScreen #rightCard { max-width: none; width: 100%; margin: 0; }
    .hide { display:none !important; }

    .card {
      background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
      border:1px solid var(--border);
      border-radius: var(--radius);
      padding:16px;
      box-shadow: var(--shadow-soft);
      backdrop-filter: blur(8px);
      min-width: 0; /* prevent grid overflow/horizontal scroll */
      box-sizing: border-box;
    }

    .sectionCard {
      background: rgba(255,255,255,.02);
      border:1px solid var(--border);
      border-radius:18px;
      padding:12px;
      box-shadow:none;
    }
    .summarySplit {
      display:grid;
      grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
      gap:12px;
    }
    .summaryHalfCard {
      min-height:112px;
      display:flex;
      flex-direction:column;
      justify-content:space-between;
      gap:12px;
    }
    .previousNotesPreviewList { display:grid; gap:8px; }
    .previousNotesPreviewItem {
      padding:10px 12px;
      border-radius:14px;
      border:1px solid rgba(255,255,255,.08);
      background:rgba(255,255,255,.03);
    }
    .previousNotesPreviewMeta {
      font-size:11px;
      text-transform:uppercase;
      letter-spacing:.08em;
      color:var(--muted);
      margin-bottom:4px;
    }
    .previousNotesPreviewText {
      font-size:13px;
      line-height:1.35;
      color:rgba(234,244,242,.94);
      display:-webkit-box;
      -webkit-line-clamp:2;
      -webkit-box-orient:vertical;
      overflow:hidden;
    }

    h2 { margin:0 0 10px 0; font-size:26px; font-weight:860; letter-spacing:-.2px; }
    h3 { margin:0 0 10px 0; font-size:16px; font-weight:800; color: rgba(234,244,242,.92); }
    .muted { color:rgba(156,190,184,.92); font-size:13px; }
    .grid { display:grid; grid-template-columns: repeat(2, 1fr); gap:10px; }
    button {
      border:1px solid var(--border);
      border-radius: var(--radius-sm);
      padding:14px 16px;
      font-size:16px;
      min-height:48px;
      background: rgba(255,255,255,.045);
      color: var(--text);
      cursor: pointer;
      transition: transform .06s ease, background .15s ease, border-color .15s ease, filter .15s ease;
      user-select:none;
      touch-action: manipulation;
    }
    button:hover { border-color: var(--border-strong); background: rgba(255,255,255,.07); }
    button:active { transform: translateY(1px); }
    button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
      outline: none;
      box-shadow: 0 0 0 3px rgba(134,185,174,.18);
      border-color: color-mix(in srgb, var(--accent) 65%, #fff 10%);
    }
    button.primary { background: var(--primary); border-color: rgba(255,255,255,.10); color:#fff; font-weight:850; }
    button.primary:hover { filter: brightness(1.06); }
    button.danger { background: var(--danger); border-color: rgba(255,255,255,.10); color:#25040a; font-weight:850; }
    button.ok { background: color-mix(in srgb, var(--ok) 86%, #fff 14%); border-color: rgba(255,255,255,.10); color:#062015; font-weight:850; }

    /* "small" should still be finger-friendly on iPad */
    button.small { padding:12px 14px; font-size:15px; border-radius: 14px; min-height:44px; }
    input.smallDate { padding:12px 12px; font-size:15px; border-radius:14px; height:44px; }

    button:disabled { opacity:.45; cursor:not-allowed; transform:none; }

    /* Tablet boost */
    @media (min-width: 900px){
      button { min-height:54px; font-size:17px; padding:16px 18px; }
      button.small { min-height:50px; font-size:16px; padding:14px 16px; }
      .timer { font-size:56px; }
    }

    /* Desktop/narrow windows: avoid two-column layout overflow */
    @media (max-width: 1100px){
      .wrap { grid-template-columns: 1fr; }
    }
    input, textarea { width:100%; padding:14px; border-radius:14px; border:1px solid var(--border); background: rgba(255,255,255,.04); color:var(--text); font-size:16px; box-sizing:border-box; outline:none; }
    input:focus, textarea:focus { border-color: color-mix(in srgb, var(--accent) 55%, #fff 10%); box-shadow: 0 0 0 3px rgba(134,185,174,.15); }
    textarea { min-height:90px; resize:vertical; }
    .row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
    body.compactDogPicker .wrap {
      padding-bottom:calc(var(--bottomNavH, 72px) + 8px);
    }
    body.compactDogPicker #leftCard {
      padding:4px 10px 10px;
      display:flex;
      flex-direction:column;
      min-height:0;
    }
    body.compactDogPicker #staffTopbar,
    body.compactDogPicker #staffCompactRow,
    body.compactDogPicker #staffToDogsGap,
    body.compactDogPicker #staffPillRow { display:none !important; }
    body.compactDogPicker #staffGrid {
      display:block;
      min-width:0;
    }
    body.compactDogPicker #staffGrid > button {
      width:100%;
      min-height:46px;
      padding:8px 12px;
      border-radius:14px;
      justify-content:flex-start !important;
    }
    body.compactDogPicker #staffGrid .staffAvatar {
      width:28px;
      height:28px;
    }
    body.compactDogPicker #staffCheckActions { display:none !important; }
    body.compactDogPicker #staffCheckActions .small {
      min-height:46px;
      height:46px;
      padding:8px 12px;
      font-size:12px;
      border-radius:14px;
      white-space:nowrap;
    }
    body.compactDogPicker #staffToDogsGap { height:6px !important; }
    body.compactDogPicker #dogsSectionTopGap { display:none !important; }
    body.compactDogPicker #dogsSection > .eyebrow { display:none; }
    body.compactDogPicker #dogsSection > h2 { font-size:22px; margin:0 0 4px 0; }
    body.compactDogPicker #dogsToolbar {
      display:flex;
      align-items:center;
      gap:6px;
      margin-bottom:6px !important;
      padding:0 0 2px;
      border-bottom:1px solid rgba(255,255,255,.06);
      flex-wrap:nowrap;
    }
    body.compactDogPicker #dogsTitleRow {
      gap:6px;
      flex-wrap:nowrap;
      flex:0 0 auto;
      min-width:0;
    }
    body.compactDogPicker #dogsTitleRow h2 {
      margin:0;
      font-size:28px;
      line-height:1;
      white-space:nowrap;
    }
    body.compactDogPicker #dogsToolbar .small,
    body.compactDogPicker #dogsToolbar .smallDate {
      min-height:36px;
      height:36px;
      padding:5px 12px;
      font-size:18px;
      line-height:1;
      border-radius:999px;
    }
    body.compactDogPicker #dogsToolbar .small {
      display:inline-flex;
      align-items:center;
      justify-content:center;
    }
    body.compactDogPicker #dogsToolbar .smallDate { width:140px !important; }
    body.compactDogPicker #dogsMeta { font-size:18px; line-height:1; white-space:nowrap; }
    body.compactDogPicker #dogFilterSeg {
      margin-left:0 !important;
      gap:6px !important;
      flex:0 0 auto;
      min-width:0;
      justify-content:flex-end;
      flex-wrap:nowrap;
      overflow:auto;
      padding-bottom:2px;
      scrollbar-width:none;
    }
    body.compactDogPicker #dogsToolbar {
      display:grid;
      grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
      align-items:center;
      gap:8px;
    }
    body.compactDogPicker #dogsTitleRow { justify-self:start; }
    body.compactDogPicker #dogsStaffSeg { justify-self:center; }
    body.compactDogPicker #dogFilterSeg { justify-self:end; }
    body.compactDogPicker #dogFilterSeg::-webkit-scrollbar { display:none; }
    body.compactDogPicker #dogsInlineStaff {
      display:none;
      align-items:center;
      justify-content:flex-start;
      flex:0 0 auto;
      gap:10px;
      padding:4px 14px 4px 10px;
      min-height:36px;
      min-width:0;
      max-width:196px;
      border-radius:999px;
      background:color-mix(in srgb, var(--primary) 92%, #ffc678 8%);
      border-color:rgba(255,214,158,.42);
      color:#fff7eb;
      font-weight:900;
      box-shadow:0 10px 18px rgba(188,129,59,.18), 0 0 0 1px rgba(255,255,255,.05) inset;
      white-space:nowrap;
      overflow:hidden;
      text-overflow:ellipsis;
      line-height:1;
    }
    body.compactDogPicker #dogsChangeStaff {
      display:none;
      flex:0 0 auto;
      min-height:36px;
    }
    body.compactDogPicker #dogsChangeStaff.show { display:inline-flex; }
    body.compactDogPicker #dogsInlineStaff.show { display:inline-flex; }
    body.compactDogPicker #dogsInlineStaff:hover {
      background:color-mix(in srgb, var(--primary) 88%, #ffd391 12%);
      border-color:rgba(255,224,178,.54);
      filter:brightness(1.04);
    }
    body.compactDogPicker .dogsInlineStaffAvatar {
      width:24px;
      height:24px;
      border-radius:999px;
      overflow:hidden;
      flex:0 0 auto;
      display:grid;
      place-items:center;
      background:rgba(255,255,255,.18);
      border:1px solid rgba(255,255,255,.18);
      font-size:11px;
      font-weight:900;
      color:rgba(234,244,242,.96);
    }
    body.compactDogPicker .dogsInlineStaffAvatar img {
      width:100%;
      height:100%;
      object-fit:cover;
      display:block;
    }
    body.compactDogPicker .dogsInlineStaffLabel {
      min-width:0;
      flex:1 1 auto;
      overflow:hidden;
      text-overflow:ellipsis;
      font-size:18px;
      line-height:1;
      font-weight:900;
    }
    #workAddNote { display:none !important; }
    body.compactDogPicker #dogsSection {
      display:flex;
      flex-direction:column;
      flex:1 1 auto;
      min-height:0;
    }
    body.compactDogPicker #dogsSection .dogs {
      flex:1 1 auto;
      min-height:0;
      height:100%;
      max-height:none !important;
      padding-bottom:8px !important;
      scroll-padding-bottom:8px !important;
    }
    body.compactDogPicker #bottomNav {
      padding:8px 10px !important;
      background: rgba(10,16,18,.92) !important;
    }
    body.compactDogPicker #bottomNavInner { gap:6px !important; }
    body.compactDogPicker .bottomNavBtn {
      min-height:36px !important;
      padding:8px 10px !important;
      font-size:13px !important;
      border-radius:12px !important;
    }
    .dogs {
      /* leave room for the fixed bottom nav so the last card remains reachable */
      max-height: calc(100vh - 240px - var(--bottomNavH, 110px) - 36px);
      overflow:auto;
      padding-right:4px;
      padding-bottom: calc(var(--bottomNavH, 110px) + 18px);
      scroll-padding-bottom: calc(var(--bottomNavH, 110px) + 18px);
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
    }

    /* Dog cards (Linear-like list, kiosk-friendly) */
    .dog { display:grid; grid-template-columns: 132px 2.05fr 2.25fr 250px 150px; gap:14px; align-items:stretch; justify-content:space-between; padding:0; overflow:hidden; border-radius:18px; border:1px solid var(--border); margin-bottom:12px; cursor:pointer; background: rgba(255,255,255,.028); box-shadow: 0 10px 24px rgba(0,0,0,.16); transition: transform .08s ease, border-color .15s ease, background .15s ease; }
    .dog:hover { transform: translateY(-1px); border-color: var(--border-strong); background: rgba(255,255,255,.035); }
    .dog.active { border-color: var(--border); box-shadow: 0 10px 24px rgba(0,0,0,.16); background: rgba(255,255,255,.028); }

    .dog:focus, .dog:active { outline:none; }
    .dogLeft { display:contents; }
    .dogPhotoSm { grid-column:1; width:100%; height:100%; border-radius:0; background: rgba(255,255,255,.04); border:0; overflow:hidden; position:relative; display:flex; align-items:center; justify-content:center; }
    .dogPhotoSm img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center; display:block; }
    .membershipCrown { position:absolute;top:5px;right:5px;width:42px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:rgba(8,12,14,.78);border:1px solid rgba(255,255,255,.35);box-shadow:0 2px 8px rgba(0,0,0,.4);pointer-events:none;color:#e2e8f0;z-index:1; }
    .membershipCrown.isComplete { color:#ffcf4a;border-color:rgba(255,207,74,.65); }
    .membershipCrown svg { width:34px;height:27px;display:block;filter:drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
    .selectedDogPhoto { position:relative; }
    .selectedDogPhoto .membershipCrown { top:3px;right:3px;width:30px;height:26px;border-radius:8px; }
    .selectedDogPhoto .membershipCrown svg { width:25px;height:21px; }
    .dogTagRow { margin-top:8px; display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
    .groomerPreference { display:inline-flex; flex:0 0 auto; align-items:center; padding:5px 9px; border-radius:10px; background:rgba(255,207,74,.12); border:1px solid rgba(255,207,74,.35); color:#ffe5a0; font-size:16px; font-weight:800; white-space:nowrap; }
    .rtTestUi .rtCodesUnderName { flex-wrap:wrap; }

    .dogInfo { grid-column:2; padding:14px 0 14px 14px; min-width:0; }
    .dogServicesCol { grid-column:3; padding:14px 0 14px 0; min-width:0; display:flex; align-items:center; }
    /* Shift Plan/Left a bit left so long status pills don't overlap */
    .dogMetricsCol { grid-column:4; padding:14px 0 14px 0; display:flex; flex-direction:column; align-items:flex-end; justify-content:flex-start; gap:10px; }
    .dogStageStaffCol { grid-column:5; padding:14px 14px 14px 0; display:flex; flex-direction:column; align-items:flex-end; justify-content:flex-start; gap:10px; }
    .dogStageBadgeRow { display:flex; align-items:center; justify-content:flex-end; gap:8px; width:100%; }
    .dogStageStaffDot {
      width:84px;
      height:84px;
      border-radius:999px;
      overflow:hidden;
      border:1px solid rgba(255,255,255,.12);
      background:rgba(255,255,255,.06);
      display:flex;
      align-items:center;
      justify-content:center;
      color:#fff;
      font-size:13px;
      font-weight:950;
      flex:0 0 auto;
    }
    .dogStageStaffDot img { width:100%; height:100%; object-fit:cover; display:block; }
    .selectedDogHeader { display:flex; gap:14px; align-items:center; min-width:0; }
    .selectedDogPhoto { width:72px; height:72px; border-radius:18px; background: rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.10); overflow:hidden; flex:0 0 auto; display:flex; align-items:center; justify-content:center; font-weight:900; color:var(--text); }
    .selectedDogPhoto img { width:100%; height:100%; object-fit:cover; display:block; }
    .selectedDogMeta { min-width:0; }
    .selectedDogTopbarMain { min-width:0; flex:1 1 auto; }
    .selectedDogStaffSlot { flex:1 1 420px; min-width:320px; display:flex; justify-content:flex-start; align-items:center; gap:12px; padding:0 18px 0 6px; }
    .selectedDogStaffSlot:empty { display:none; }
    .selectedDogStaffWrap { display:flex; align-items:center; gap:12px; min-width:0; flex-wrap:wrap; }
    .selectedDogHeaderStaff { display:inline-flex; align-items:center; gap:12px; min-width:0; flex:0 1 280px; max-width:100%; padding:14px 18px; border-radius:22px; border:1px solid rgba(255,255,255,.12); background:rgba(255,255,255,.04); box-shadow:0 12px 28px rgba(0,0,0,.18); }
    .selectedDogHeaderStaff.clickable { cursor:pointer; }
    .selectedDogHeaderStaff .nowAv { width:42px; height:42px; }
    .selectedDogHeaderStaffMeta { display:grid; gap:3px; min-width:0; }
    .selectedDogHeaderStaffLabel { font-size:12px; color:rgba(156,190,184,.92); font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
    .selectedDogHeaderStaffName { font-size:19px; font-weight:900; color:var(--text); white-space:nowrap; }

    /* Test-domain stage-picker header (Dan design) */
    .rtTestUi #timerSub{ display:none; }
    .rtTestUi #refreshDogApptBtn{ display:none !important; }
    .rtTestUi #dogSub{ display:none !important; }
    .rtTestUi #dogCodesLine{ display:none !important; }

    .rtTestUi .selectedDogTopbarMain .eyebrow{ display:none !important; }
    .rtTestUi .selectedDogHeader{ align-items:flex-start; margin-top:0 !important; }

    /* pull the topbar to the card edges so the photo can sit in the top-left corner */
    .rtTestUi #rightCard{ padding:0 !important; }
    .rtTestUi #rightCard > .topbar{ padding:0 !important; margin-bottom:10px; align-items:flex-start; display:grid; grid-template-columns: 1fr auto 1fr; gap:14px; }
    .rtTestUi #rightCard > .topbar > .selectedDogTopbarMain{ grid-column:1; }
    .rtTestUi #rightCard > .topbar > #selectedDogStaffSlot{ grid-column:2; justify-self:center; }
    .rtTestUi #rightCard > .topbar > div[style*="text-align:right"]{ grid-column:3; justify-self:end; }
    .rtTestUi #rightWork{ padding:0 16px 16px 16px; }
    .rtTestUi #rightEmpty{ padding:0 16px 16px 16px; }

    .rtTestUi #showWorkBtn{ display:none !important; }

    .rtCenterStack{ display:flex; flex-direction:column; gap:10px; align-items:center; }
    .rtTestUi .selectedDogHeaderStaff{ flex:0 0 auto; width:fit-content; padding:12px 16px; }
    .rtTestUi .selectedDogStaffChangeBtn{ min-height:38px; padding:8px 14px; border-radius:14px; }

    /* 3x bigger photo on test UI */
    /* then reduce by ~30% per feedback */
    .rtTestUi #selectedDogPhoto{ width:194px; height:194px; border-radius:24px; }
    @media (max-width: 1100px){
      .rtTestUi #selectedDogPhoto{ width:148px; height:148px; }
    }
    .rtCodesUnderName{ display:none; }
    .rtTestUi .rtCodesUnderName{ display:flex; gap:10px; align-items:center; margin-top:10px; }
    .rtTestUi .rtCodesUnderName .codeBadge{ width:34px; height:34px; font-size:18px; border-radius:14px; }
    .rtBreedWeight{ display:none; }
    .rtTestUi .rtBreedWeight{ display:block; margin-top:8px; font-size:12px; color:rgba(156,190,184,.92); font-weight:800; }
    .rtHeaderPickup{ display:none; }
    .rtTestUi #rtHeaderPickupNotice{ display:none !important; }

    .rtServicesCard{ display:none; }
    .rtTestUi .rtServicesCard{ display:flex; flex-direction:column; gap:10px; justify-content:center; text-align:center; padding:14px 16px; border-radius:20px; border:1px solid rgba(255,255,255,.10); background:linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02)); box-shadow:0 18px 38px rgba(0,0,0,.18); }
    .rtServicesTitle{ font-size:18px; font-weight:950; letter-spacing:-.02em; line-height:1.1; text-wrap:balance; }
    .rtServicesTags{ display:flex; flex-wrap:wrap; gap:10px; justify-content:center; align-items:center; }
    .rtServicesTag{ display:inline-flex; align-items:center; justify-content:center; min-height:34px; padding:7px 12px; border-radius:999px; background:rgba(203,141,62,.16); border:1px solid rgba(203,141,62,.28); font-size:14px; font-weight:850; color:rgba(255,235,212,.96); }

    /* Test UI: stage picker should be compact (no DONE/pickup/picked-up row) */
    .rtTestUi #finishBtn,
    .rtTestUi #pickupNoticeBtn,
    .rtTestUi #pickedUpBtn,
    .rtTestUi #pickupMeta{ display:none !important; }

    #pickupNoticeBtn { display:none !important; }
    #pickupNoticeBtn.pickupAvailable { display:inline-flex !important; }
    .rtTestUi #stageTopActionsRow.pickupAvailable { display:flex !important; }
    .rtTestUi #rightWork .sectionCard{ padding:10px 12px; }
    .rtTestUi #rightWork .sectionCard .eyebrow{ display:none; }
    .rtTestUi #rightWork .sectionCard h3{ display:none; }
    .rtTestUi #rightWork .stageGrid{ margin-top:0 !important; gap:8px; }
    .rtTestUi .stageBtn{ min-height:58px; gap:4px; }
    .rtTestUi .stageBtn > div:first-child{ font-size:26px !important; }

    /* tighten stage grid to match bottom spacing */
    .rtTestUi #stageTopActionsRow,
    .rtTestUi #stageGridSpacerTop,
    .rtTestUi #stageGridSpacerBottom{ display:none !important; }

    /* service title disc animation */
    .rtSpinDisc{ display:inline-flex; width:34px; height:34px; margin-right:12px; transform-origin:50% 50%; background-size:contain; background-repeat:no-repeat; background-position:center; border-radius:999px; box-shadow: 0 10px 20px rgba(0,0,0,.28), 0 0 0 2px rgba(255,255,255,.10) inset; }
    /* green record icon (inline svg). */
    .rtSpinDisc{ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cdefs%3E%3CradialGradient id='g' cx='30%25' cy='30%25' r='70%25'%3E%3Cstop offset='0' stop-color='%2388f2b5'/%3E%3Cstop offset='1' stop-color='%231fd46b'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='32' cy='32' r='28' fill='url(%23g)'/%3E%3Ccircle cx='32' cy='32' r='20' fill='none' stroke='%23000000' stroke-opacity='.18' stroke-width='2'/%3E%3Ccircle cx='32' cy='32' r='12' fill='none' stroke='%23000000' stroke-opacity='.14' stroke-width='2'/%3E%3Ccircle cx='32' cy='32' r='4' fill='%230a1012' fill-opacity='.35'/%3E%3Cpath d='M40 28c6 6 6 16 0 22' fill='none' stroke='%230a1012' stroke-opacity='.28' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E"); }
    .rtSpinDisc.spinning{ animation: rtDiscFlip 2s steps(1, end) infinite; }
    @keyframes rtDiscFlip{ 0%,49%{ transform: scaleX(1); } 50%,100%{ transform: scaleX(-1); } }

    /* done prefix */
    .rtDonePrefix{ display:inline-block; margin-right:10px; font-size:12px; font-weight:950; letter-spacing:.12em; text-transform:uppercase; color:rgba(222,255,235,.96); background:rgba(77,227,161,.18); border:1px solid rgba(77,227,161,.28); padding:6px 10px; border-radius:999px; }

    /* Active stage indicator should be impossible to miss */
    @keyframes rtActiveStageBeacon {
      0%, 49.999% {
        background:
          radial-gradient(circle at 30% 28%, rgba(255,255,255,.98) 0 14%, rgba(255,255,255,.28) 15%, transparent 16%),
          radial-gradient(circle at 35% 35%, #9cffc7 0 30%, #23d76b 58%, #0f6b35 100%);
        box-shadow:
          0 0 0 4px rgba(255,255,255,.18) inset,
          0 0 0 8px rgba(77,227,161,.18),
          0 0 38px rgba(77,227,161,.95),
          0 18px 34px rgba(0,0,0,.34);
      }
      50%, 100% {
        background:
          radial-gradient(circle at 30% 28%, rgba(255,255,255,.98) 0 14%, rgba(255,255,255,.28) 15%, transparent 16%),
          radial-gradient(circle at 35% 35%, #ffb3ba 0 30%, #ff3b4d 58%, #8a101f 100%);
        box-shadow:
          0 0 0 4px rgba(255,255,255,.18) inset,
          0 0 0 8px rgba(255,92,112,.22),
          0 0 38px rgba(255,92,112,.95),
          0 18px 34px rgba(0,0,0,.34);
      }
    }
    .stageBtn.current{ position:relative; overflow:visible; }
    .stageBtn.current::after{
      content:'';
      position:absolute;
      right:-18px;
      top:-18px;
      width:78px;
      height:78px;
      border-radius:999px;
      border:3px solid rgba(255,255,255,.18);
      transform-origin:50% 50%;
      animation: rtActiveStageBeacon 2s steps(1, end) infinite;
      pointer-events:none;
      z-index:3;
    }

    /* Color the now-running stage pill like the stage tiles */
    .rtStagePill.color_bath { background: rgba(88,167,255,.22); border-color: rgba(88,167,255,.44); color: #e6f2ff; }
    .rtStagePill.color_nails { background: rgba(255,214,102,.20); border-color: rgba(255,214,102,.42); color: #fff6de; }
    .rtStagePill.color_grooming { background: rgba(255,0,183,.20); border-color: rgba(255,0,183,.42); color: #ffe0f6; }
    .rtStagePill.color_dry { background: rgba(20,60,120,.34); border-color: rgba(173,206,244,.26); color: rgba(234,244,242,.96); }
    .rtStagePill.color_dematting { background: rgba(120,22,32,.34); border-color: rgba(120,22,32,.52); color: rgba(234,244,242,.96); }
    .rtStagePill.color_preshave { background: rgba(120,22,32,.34); border-color: rgba(120,22,32,.52); color: rgba(234,244,242,.96); }

    .rtDogTitleRow{ display:flex; align-items:center; gap:10px; }
    .rtIconBtn{ width:34px; height:34px; border-radius:12px; padding:0; display:inline-flex; align-items:center; justify-content:center; font-weight:950; font-size:18px; line-height:1; }

    .rtTopPillsWrap{ display:none; }
    .rtTestUi .rtTopPillsWrap{ display:flex; gap:14px; align-items:flex-start; justify-content:flex-end; }
    .rtNowRunningWrap{ display:none; }
    .rtTestUi .rtNowRunningWrap{ display:block; text-align:right; }
    .rtNowRunningMain{ text-align:right; }
    .rtNowRunningLabel{ text-transform:uppercase; letter-spacing:.12em; font-size:12px; font-weight:850; color:rgba(156,190,184,.92); }
    .rtStagePill{ padding:7px 12px; border-radius:14px; font-weight:950; letter-spacing:.08em; text-transform:uppercase; border:1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); }
    .rtNowRunningTopRow{ display:flex; justify-content:flex-end; gap:10px; align-items:center; }
    .rtNowRunningStaffRow{ display:flex; justify-content:flex-end; gap:10px; align-items:center; margin-top:8px; }
    .rtNowRunningStaffChip{ display:flex; gap:8px; align-items:center; }
    .rtNowAv{ width:34px; height:34px; border-radius:50%; overflow:hidden; background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); display:flex; align-items:center; justify-content:center; }
    .rtNowAv img{ width:100%; height:100%; object-fit:cover; display:block; }
    .rtNowInitial{ font-weight:950; letter-spacing:.04em; }
    .rtNowRunningExtrasRow{ display:none; }

    .rtPlanLeftCol{ display:flex; flex-direction:column; gap:10px; align-items:flex-end; }
    .rtPlanLeftCol .pill{ padding:12px 16px; border-radius:18px; font-weight:950; font-size:16px; }
    .rtLeftPill.over{ border-color: rgba(255,92,92,.55); box-shadow: 0 0 0 2px rgba(255,92,92,.08) inset; }

    .rtNotesBtn{ display:none; width:100%; justify-content:center; }
    .rtTestUi .rtNotesBtn{ display:inline-flex; }
    #dogTitle { margin:0; font-size:36px; line-height:.98; letter-spacing:-.03em; }
    #dogSub { margin-top:8px; font-size:15px; line-height:1.25; }

    /* Admin staff avatars */
    .avatarCircle { width:64px; height:64px; border-radius:999px; background: rgba(255,255,255,.04); border:1px solid var(--border); overflow:hidden; flex:0 0 auto; display:flex; align-items:center; justify-content:center; }
    .feedbackRing { border-width:3px; border-style:solid; background: rgba(255,255,255,.02); font-weight:900; font-size:18px; line-height:1; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding:0 6px; }
    .avatarCircle img { width:100%; height:100%; object-fit:cover; display:block; }
    .staffAvatar { width:34px; height:34px; border-radius:999px; }
    .adminStaffCard { display:flex; gap:12px; align-items:center; }
    .adminStaffName { font-weight:900; }

    /* "Now working" (stage owner + extra hands) */
    .nowTag { display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.03); }
    .nowLabel { font-size:12px; color: rgba(156,190,184,.92); font-weight:800; }
    .nowName { font-size:13px; font-weight:900; }
    .nowAv { width:28px; height:28px; border-radius:999px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04); overflow:hidden; display:flex; align-items:center; justify-content:center; position:relative; }
    .nowAv img { width:100%; height:100%; object-fit:cover; display:block; }
    .nowStack { display:inline-flex; gap:6px; align-items:center; flex-wrap:wrap; }

    /* Bottom nav: allow buttons to shrink on narrow screens (avoid horizontal scrolling) */
    #bottomNavInner { width: 100%; max-width: 100% !important; box-sizing: border-box; }
    #bottomNavInner, #bottomNavInner * { box-sizing: border-box; }
    .bottomNavBtn { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* Extra hands active color */
    button.warn { background: rgba(255,166,69,.22); border-color: rgba(255,166,69,.35); color: rgba(255,226,198,.98); }

    /* Checklist tiles (kiosk-friendly) */
    .checklistCard h3 { font-size:20px; }
    .tileGrid { display:grid; gap:12px; }
    .tileBtn, .choiceBtn {
      display:flex;
      align-items:center;
      justify-content:center;
      text-align:center;
      font-weight:900;
      font-size:36px;
      line-height:1.05;
      padding:16px 14px;
      min-height:64px;
      border-radius:18px;
      background: rgba(255,255,255,.04);
      border:1px solid var(--border);
    }
    .tileBtn.selected, .choiceBtn.selected {
      background: rgba(77,227,161,.16);
      border-color: rgba(77,227,161,.40);
      box-shadow: 0 0 0 2px rgba(77,227,161,.14);
    }
    .choiceWrap { padding:12px; border-radius:18px; border:1px solid var(--border); background: rgba(255,255,255,.02); }
    .checklistSchemaGroup {
      display:grid;
      gap:8px;
      padding:0;
      background:transparent;
      border:none;
      box-shadow:none;
      margin:0;
    }
    .checklistSchemaHead {
      font-size:13px;
      font-weight:900;
      letter-spacing:-.01em;
      color:rgba(242,247,246,.96);
    }
    .checklistSchemaSections {
      display:grid;
      grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
      gap:10px;
    }
    .checklistSchemaLabel {
      font-size:11px;
      text-transform:uppercase;
      letter-spacing:.08em;
      color:var(--muted);
    }
    .adminPanel { background: rgba(255,255,255,.02); border-color: var(--border); box-shadow:none; }
    .adminPanelTitle { font-size:14px; font-weight:900; letter-spacing:-.01em; }
    .adminLinksGrid { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap:10px; }
    .adminLinkCard { display:flex; flex-direction:column; gap:6px; text-decoration:none; color:inherit; padding:12px 14px; border-radius:16px; border:1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); }
    .adminLinkCard:hover { border-color: rgba(77,227,161,.34); background: rgba(77,227,161,.08); }
    .adminLinkTitle { font-size:14px; font-weight:900; }
    .adminLinkUrl { font-size:12px; color: var(--muted); word-break: break-word; }
    .stageBtn.done { border-color: rgba(134,185,174,.28); background: rgba(255,255,255,.055); }
    .stageBtn.current { border-color: rgba(77,227,161,.35); box-shadow: 0 0 0 2px rgba(77,227,161,.10); background: rgba(77,227,161,.08); }
    .stageBtn.color_bath { background: rgba(88,167,255,.28); border-color: rgba(88,167,255,.44); }
    .stageBtn.color_nails { background: rgba(255,214,102,.24); border-color: rgba(255,214,102,.42); }
    .stageBtn.color_grooming { background: rgba(255,0,183,.24); border-color: rgba(255,0,183,.42); }
    .stageBtn.color_dry { background: rgba(20,60,120,.34); border-color: rgba(20,60,120,.50); }
    .stageBtn.color_dematting { background: rgba(120,22,32,.34); border-color: rgba(120,22,32,.52); }
    .stageBtn.color_preshave { background: rgba(120,22,32,.34); border-color: rgba(120,22,32,.52); }
    .choiceWrap.error { border-color: rgba(255,107,122,.65); box-shadow: 0 0 0 2px rgba(255,107,122,.12); }
    .choiceTitle { font-weight:950; font-size:16px; }

    /* Log coloring */
    .logItem { padding:10px 10px; border-radius:14px; border:1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.02); margin:8px 0; }
    .logAvatar { width:28px; height:28px; border-radius:999px; background: rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.10); overflow:hidden; flex:0 0 auto; display:flex; align-items:center; justify-content:center; }
    .logAvatar img{ width:100%; height:100%; object-fit:cover; display:block; }
    .logItem.stage_started { background: rgba(77,227,161,.14); border-color: rgba(77,227,161,.28); }
    .logItem.stage_finished { background: rgba(255,107,122,.14); border-color: rgba(255,107,122,.28); }
    .logItem.stage_autoclosed { background: rgba(134,185,174,.16); border-color: rgba(134,185,174,.32); }
    .logItem.note { background: rgba(160,106,46,.16); border-color: rgba(160,106,46,.32); }
    .logItem.status { background: rgba(156,190,184,.12); border-color: rgba(156,190,184,.26); }
    .logItem.bath_feedback { background: rgba(134,185,174,.12); border-color: rgba(134,185,174,.26); }
    .logItem.visit_closed { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.20); }
    .dogMain { min-width:0; width:100%; }
    .dogNameRow { display:flex; align-items:center; gap:8px; min-width:0; }
    .dogName { font-weight:900; font-size:32px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:520px; letter-spacing:.1px; }
    .dogMeta { color:rgba(156,190,184,.92); font-size:24px; margin-top:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .dogSvc { display:flex; flex-direction:column; gap:10px; width:100%; --svc-scale:1; }
    .dogSvcPill {
      display:flex;
      align-items:center;
      justify-content:center;
      width:min(1078px, 100%);
      margin:0 auto;
      min-height:46px;
      padding:10px 18px;
      border-radius:999px;
      border:1px solid rgba(255,255,255,.14);
      background: rgba(255,255,255,.06);
      color: rgba(242,247,246,.96);
      font-weight:950;
      font-size: clamp(19px, calc(1.46vw * var(--svc-scale)), 30px);
      line-height:1.12;
      text-align:center;
      text-wrap:balance;
      white-space:normal;
    }
    .dogSvcPill.addon { background:rgba(255,214,102,.18); border-color:rgba(255,214,102,.40); color:#fff6de; }
    /* Stage pill colors (match stage buttons / overlay transparency) */
    /* Use higher specificity so it overrides generic .pill.status */
    .pill.dogStagePill.color_bath { background: rgba(88,167,255,.22) !important; border-color: rgba(88,167,255,.44) !important; color: #e6f2ff !important; }
    .pill.dogStagePill.color_nails { background: rgba(255,214,102,.20) !important; border-color: rgba(255,214,102,.42) !important; color: #fff6de !important; }
    .pill.dogStagePill.color_grooming { background: rgba(255,0,183,.20) !important; border-color: rgba(255,0,183,.42) !important; color: #ffe0f6 !important; }
    .pill.dogStagePill.color_dry { background: rgba(20,60,120,.34) !important; border-color: rgba(173,206,244,.26) !important; color: rgba(234,244,242,.96) !important; }

    /* Waiting sub-status pill (Waiting for bath/nails/grooming/pickup) */
    .pill.waitSubPill { font-size:16px; padding:6px 12px; }
    .pill.waitSubPill.waitSubPill--bath { background:rgba(88,167,255,.22) !important; border-color:rgba(88,167,255,.60) !important; color:#e6f2ff !important; }
    .pill.waitSubPill.waitSubPill--nails { background:rgba(255,214,102,.20) !important; border-color:rgba(255,214,102,.60) !important; color:#fff6de !important; }
    .pill.waitSubPill.waitSubPill--grooming { background:rgba(255,0,183,.22) !important; border-color:rgba(255,0,183,.60) !important; color:#ffe0f6 !important; }
    .pill.waitSubPill.waitSubPill--pickup { background:rgba(109,231,163,.18) !important; border-color:rgba(109,231,163,.55) !important; color:rgba(222,255,235,.98) !important; }
    .pill.waitTimePill { font-size:16px; padding:6px 12px; background:rgba(255,255,255,.04); }

    .dogStaffChip { display:flex; align-items:center; gap:12px; color:rgba(234,244,242,.92); font-weight:900; font-size:22px; }
    .dogStaffChip .staffAv { width:64px; height:64px; border-radius:999px; overflow:hidden; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04); display:flex; align-items:center; justify-content:center; flex:0 0 auto; position:relative; }
    .dogStaffChip .staffAv img { width:100%; height:100%; object-fit:cover; display:block; }
    .dogStaffChip .staffPauseOverlay, .pauseAvatarOverlay { position:absolute; inset:0; background:#ff1f1f; display:flex; align-items:center; justify-content:center; z-index:2; pointer-events:none; }
    .dogStaffChip .staffPauseGlyph, .pauseAvatarGlyph { width:56%; height:56%; display:flex; align-items:center; justify-content:center; gap:16%; }
    .dogStaffChip .staffPauseGlyph span, .pauseAvatarGlyph span { display:block; width:22%; height:78%; background:#111; border-radius:999px; box-shadow:0 0 0 1px rgba(0,0,0,.08); }
    .dogStaffChip .staffName { max-width:70px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:34px; }

    .dogStagePill { font-size:22px; font-weight:950; }

    /* Dog list: bigger pills (except service pills) */
    .dog .pill { font-size:22px; padding:10px 16px; border-radius:999px; }

    /* Bigger code badges in dog list */
    .dog .codeBadge { width:40px; height:40px; border-radius:12px; font-size:24px; }

    .dogRight { display:none; }
    .metricRow { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
    .dogPlanPill, .dogLeftPill { background: rgba(255,255,255,.03); border-color: var(--border); }
    .dogLeftPill.warn, #workLeftPill.warn, #rtLeftPill.warn { background:rgba(255,214,102,.16); border-color:rgba(255,214,102,.38); color:#fff0b8; }
    .dogLeftPill.over, #workLeftPill.over, #rtLeftPill.over { background:rgba(255,107,122,.14); border-color:rgba(255,107,122,.35); color:#ffd6de; }
    .dogRunPill { 
      --fill: 0;
      --fillColor: rgba(77,227,161,.22);
      background: linear-gradient(90deg, var(--fillColor) calc(var(--fill) * 100%), rgba(255,255,255,.03) 0);
      border-color: var(--border);
      color: rgba(234,244,242,.90);
    }
    .dogRunPill.running { --fillColor: rgba(77,227,161,.22); }
    .dogRunPill.idle { --fillColor: rgba(255,255,255,.08); }

    .pill { font-size:11px; padding:6px 10px; border-radius:999px; background: rgba(255,255,255,.03); color: rgba(234,244,242,.82); border:1px solid var(--border); white-space:nowrap; }
    .softDivider { height:1px; background:linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.12), rgba(255,255,255,.05)); border:0; margin:12px 0; }

    .codeBadge { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:8px; background: rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.10); margin-right:6px; font-size:14px; line-height:1; cursor:pointer; user-select:none; }
    .codeBadge:active { transform: translateY(1px); }
    .codeBadge[data-code="Bit"] {
      width:auto;
      min-width:30px;
      padding:0 6px;
      border-radius:7px;
      background:linear-gradient(180deg, #ff5b5b 0%, #c81f1f 100%);
      border-color:rgba(255, 214, 214, .75);
      color:#fff;
      font-size:10px;
      font-weight:900;
      letter-spacing:.7px;
      text-transform:uppercase;
      box-shadow:0 0 0 1px rgba(255,60,60,.18) inset, 0 6px 14px rgba(120,0,0,.18);
    }
    #workCodesLine, #skinCodesLine, #bathCodesLine, #dogCodesLine, .waitingAppCodes {
      display:flex;
      flex-wrap:wrap;
      align-items:center;
      gap:10px;
      row-gap:8px;
      line-height:1.4;
    }
    #workCodesLine .codeBadge,
    #skinCodesLine .codeBadge,
    #bathCodesLine .codeBadge,
    #dogCodesLine .codeBadge,
    .waitingAppCodes .codeBadge {
      width:26px;
      height:26px;
      margin-right:0;
      border-radius:9px;
      font-size:15px;
    }
    #workCodesLine .codeBadge[data-code="Bit"],
    #skinCodesLine .codeBadge[data-code="Bit"],
    #bathCodesLine .codeBadge[data-code="Bit"],
    #dogCodesLine .codeBadge[data-code="Bit"],
    .waitingAppCodes .codeBadge[data-code="Bit"],
    .waitingV2Codes .codeBadge[data-code="Bit"] {
      width:auto;
      min-width:36px;
      padding:0 7px;
      font-size:11px;
    }
    .pill.status { background: rgba(134,185,174,.10); border-color: rgba(134,185,174,.28); color: rgba(234,244,242,.92); }
    .pill.wait { background: rgba(156,190,184,.08); border-color: rgba(156,190,184,.22); }
    .pill.danger { background: rgba(255,107,122,.16); border-color: rgba(255,107,122,.35); color:#ffd6de; }

    .timer { font-size:44px; font-weight:900; letter-spacing:.7px; font-variant-numeric: tabular-nums; }
    .stageGrid { display:grid; grid-template-columns: repeat(4, 1fr); gap:10px; }
    .stageBtn { display:flex; flex-direction:column; gap:6px; align-items:center; justify-content:center; min-height: 74px; text-align:center; }
    .stageSub { display:flex; gap:8px; align-items:center; justify-content:center; flex-wrap:wrap; min-height: 26px; }
    .miniMin { font-size:11px; font-weight:800; color: rgba(156,190,184,.92); }
    .pickupPill { display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; border:1px solid rgba(255,166,69,.35); background: rgba(255,166,69,.16); color: rgba(255,226,198,.98); font-weight:900; }
    .pickupPill .muted { color: rgba(255,226,198,.78); }
    .pickupPill.ready { border-color: rgba(109,231,163,.38); background: rgba(109,231,163,.16); color: rgba(222,255,235,.98); }
    .pickupPill.ready .muted { color: rgba(222,255,235,.82); }

    /* Details popup */
    .detailsGrid { display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
    .detailsCard { background: rgba(255,255,255,.02); border:1px solid rgba(255,255,255,.08); border-radius:16px; padding:14px; box-shadow:none; }
    .detailsKpi { font-size:28px; font-weight:950; letter-spacing:.4px; font-variant-numeric: tabular-nums; }
    .detailsKpiSub { font-size:12px; color: rgba(156,190,184,.92); font-weight:800; }
    .detailsRow { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; padding:10px 0; border-top:1px solid rgba(255,255,255,.06); }
    .detailsRow:first-child { border-top:none; padding-top:0; }
    .detailsRow b { font-weight:950; }
    .whoChips { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
    .whoChip { display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.03); }
    .whoMin { font-size:12px; font-weight:950; color: rgba(156,190,184,.95); }
    .whoName { font-size:13px; font-weight:900; }
    .whoAv { width:24px; height:24px; border-radius:999px; overflow:hidden; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04); display:flex; align-items:center; justify-content:center; }
    .whoAv img { width:100%; height:100%; object-fit:cover; display:block; }

    @media (max-width: 980px){
      .detailsGrid { grid-template-columns: 1fr; }
    }
    .miniAv { width:22px; height:22px; border-radius:999px; overflow:hidden; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04); display:flex; align-items:center; justify-content:center; }
    .miniAv img { width:100%; height:100%; object-fit:cover; display:block; }
    .topbar { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; }
    .eyebrow { font-size:11px; text-transform:uppercase; letter-spacing:.12em; color:rgba(156,190,184,.78); font-weight:900; }
    .overlay { position:fixed; inset:0; background:rgba(4,10,12,.64); backdrop-filter: blur(14px); display:flex; align-items:center; justify-content:center; padding:16px; z-index:9999; overflow:auto; }
    #fbOrderOverlay { align-items:flex-start; justify-content:center; }
    #fbOrderOverlay .modal { position:relative; z-index:1; margin:auto; }
    /* PIN gate enabled */

    /* Full-screen Work overlay (no "window"), per customer request */
    #workOverlay.overlay { align-items:stretch; justify-content:stretch; padding:0; overflow:hidden; z-index:20000; }
    /* Overlay stacking order: work < pickup notice < staff picker < confirm < toast */
    #pickupOverlay.overlay { z-index: 25000; }
    #staffPickOverlay.overlay { z-index: 30000; }
    #waitingStatusOverlay.overlay { z-index: 30500; }
    #confirmOverlay.overlay { z-index: 31000; }
    #toast { z-index: 32000; }

    /* Confirm overlay: match checklist-scale typography for readability */
    #confirmOverlay .modal {
      width: min(760px, calc(100vw - 32px));
      border-radius: 22px;
      padding: 18px;
    }
    #confirmOverlay #confirmTitle { font-size:28px; font-weight:950; letter-spacing:-.2px; }
    #confirmOverlay #confirmMsg { font-size:18px; line-height:1.25; white-space:pre-line; }
    #confirmOverlay #confirmRich { display:none; }
    #confirmOverlay button { min-height:64px; font-size:20px; padding:14px 18px; border-radius:16px; }
    #confirmOverlay button.small { min-height:64px; font-size:20px; padding:14px 18px; border-radius:16px; }
    #confirmOverlay.confirmOverlay--pickupGroup { padding-bottom:64px; }
    #confirmOverlay.confirmOverlay--pickupGroup .modal { width:min(900px, 96vw); max-width:900px; max-height:calc(100dvh - 88px); overflow:auto; }
    #confirmOverlay.confirmOverlay--pickupGroup #confirmFooter { position:sticky; bottom:0; padding-top:16px; background:var(--panel, #14282c); display:flex; flex-wrap:wrap; }
    #confirmOverlay.confirmOverlay--pickupGroup #confirmOk { flex:1 1 260px; white-space:normal; }
    .pickupGroupIntro { margin:0 0 18px; font-size:18px; line-height:1.45; }
    .pickupGroupCard { display:grid; grid-template-columns:88px minmax(0,1fr); gap:16px; padding:16px; margin:12px 0; border:1px solid #bb8b38; border-radius:16px; background:rgba(245,181,66,.08); }
    .pickupGroupPhoto { width:88px; height:88px; object-fit:cover; border-radius:16px; background:#294247; display:flex; align-items:center; justify-content:center; font-size:28px; }
    .pickupGroupName { margin:0; font-size:26px; overflow-wrap:anywhere; }
    .pickupGroupStage { margin:10px 0; font-size:20px; font-weight:800; color:#ffdb8a; overflow-wrap:anywhere; }
    .pickupGroupStaff { display:flex; align-items:center; gap:12px; font-size:18px; overflow-wrap:anywhere; }
    .pickupGroupStaff .pickupGroupPhoto { width:48px; height:48px; border-radius:50%; font-size:20px; flex:none; }
    @media (max-width:480px) { #confirmOverlay.confirmOverlay--pickupGroup #confirmTitle { font-size:24px; } .pickupGroupIntro { font-size:16px; } .pickupGroupCard { grid-template-columns:64px minmax(0,1fr); gap:12px; padding:12px; } .pickupGroupPhoto { width:64px; height:64px; } .pickupGroupName { font-size:22px; } }

    #confirmOverlay.confirmOverlay--stageConflict,
    #confirmOverlay.confirmOverlay--staffStageConflict,
    #confirmOverlay.confirmOverlay--staffAssistConflict {
      align-items:stretch;
      justify-content:stretch;
      padding:0;
      background:#000;
      backdrop-filter:none;
    }
    #confirmOverlay.confirmOverlay--stageConflict .modal,
    #confirmOverlay.confirmOverlay--staffStageConflict .modal,
    #confirmOverlay.confirmOverlay--staffAssistConflict .modal {
      width:100%;
      max-width:none;
      min-height:100dvh;
      border-radius:0;
      padding:34px 34px 0;
      background:#000;
      border:none;
      box-shadow:none;
      display:flex;
      flex-direction:column;
      gap:20px;
    }
    #confirmOverlay.confirmOverlay--stageConflict #confirmTitle {
      margin:0;
      font-size:clamp(30px, 3.8vw, 54px);
      font-weight:950;
      letter-spacing:.02em;
      text-transform:uppercase;
      color:#fff7ef;
    }
    #confirmOverlay.confirmOverlay--staffStageConflict #confirmTitle,
    #confirmOverlay.confirmOverlay--staffAssistConflict #confirmTitle { display:none !important; }
    #confirmOverlay.confirmOverlay--stageConflict #confirmMsg,
    #confirmOverlay.confirmOverlay--stageConflict #confirmSpacer,
    #confirmOverlay.confirmOverlay--staffStageConflict #confirmMsg,
    #confirmOverlay.confirmOverlay--staffStageConflict #confirmSpacer,
    #confirmOverlay.confirmOverlay--staffAssistConflict #confirmMsg,
    #confirmOverlay.confirmOverlay--staffAssistConflict #confirmSpacer { display:none !important; }
    #confirmOverlay.confirmOverlay--stageConflict #confirmRich,
    #confirmOverlay.confirmOverlay--staffStageConflict #confirmRich,
    #confirmOverlay.confirmOverlay--staffAssistConflict #confirmRich {
      display:block;
      flex:1 1 auto;
      min-height:0;
    }
    #confirmOverlay.confirmOverlay--stageConflict #confirmFooter,
    #confirmOverlay.confirmOverlay--staffStageConflict #confirmFooter,
    #confirmOverlay.confirmOverlay--staffAssistConflict #confirmFooter {
      display:grid;
      grid-template-columns:1fr 1fr;
      gap:0;
      margin:0 -34px;
      flex:0 0 auto;
    }
    #confirmOverlay.confirmOverlay--staffAssistConflict #confirmFooter {
      grid-template-columns:1fr 1fr 1fr;
    }
    #confirmOverlay.confirmOverlay--stageConflict #confirmCancel,
    #confirmOverlay.confirmOverlay--stageConflict #confirmOk,
    #confirmOverlay.confirmOverlay--staffStageConflict #confirmCancel,
    #confirmOverlay.confirmOverlay--staffStageConflict #confirmOk,
    #confirmOverlay.confirmOverlay--staffAssistConflict #confirmCancel,
    #confirmOverlay.confirmOverlay--staffAssistConflict #confirmOk,
    #confirmOverlay.confirmOverlay--staffAssistConflict #confirmAlt {
      min-height:118px;
      border-radius:0;
      border-left:0;
      border-right:0;
      border-bottom:0;
      font-size:clamp(26px, 3vw, 42px);
      font-weight:950;
      letter-spacing:-.02em;
    }
    #confirmOverlay.confirmOverlay--stageConflict #confirmCancel,
    #confirmOverlay.confirmOverlay--staffStageConflict #confirmCancel,
    #confirmOverlay.confirmOverlay--staffAssistConflict #confirmCancel {
      background:#ff647d;
      border-color:rgba(255,255,255,.08);
      color:#25040a;
    }
    #confirmOverlay.confirmOverlay--stageConflict #confirmOk,
    #confirmOverlay.confirmOverlay--staffStageConflict #confirmOk {
      background:#67ddb1;
      border-color:rgba(255,255,255,.08);
      color:#041b12;
    }
    #confirmOverlay.confirmOverlay--staffAssistConflict #confirmAlt {
      background:#67ddb1;
      border-color:rgba(255,255,255,.08);
      color:#041b12;
    }
    #confirmOverlay.confirmOverlay--staffAssistConflict #confirmOk {
      background:#ffb13a;
      border-color:rgba(255,255,255,.08);
      color:#221202;
    }
    .confirmConflictLayout {
      display:grid;
      grid-template-columns:minmax(0, 1.15fr) minmax(260px, .85fr);
      gap:28px;
      align-items:start;
    }
    .confirmConflictMain { display:grid; gap:20px; align-content:start; }
    .confirmConflictRow {
      display:flex;
      align-items:center;
      gap:16px;
      flex-wrap:wrap;
      font-size:clamp(22px, 2.2vw, 38px);
      font-weight:850;
      color:#fff7ef;
    }
    .confirmConflictLabel { color:#fff7ef; }
    .confirmConflictInlinePerson,
    .confirmConflictRequester {
      display:inline-flex;
      align-items:center;
      gap:14px;
    }
    .confirmConflictRequesterMeta {
      display:grid;
      gap:2px;
      line-height:1;
    }
    .confirmConflictYou {
      font-size:14px;
      font-weight:950;
      letter-spacing:.18em;
      text-transform:uppercase;
      color:rgba(255,255,255,.82);
    }
    .confirmConflictName {
      font-size:clamp(24px, 2.5vw, 40px);
      font-weight:950;
      color:#fff7ef;
    }
    .confirmConflictAvatar {
      width:74px;
      height:74px;
      border-radius:18px;
      overflow:hidden;
      border:1px solid rgba(255,255,255,.14);
      background:rgba(255,255,255,.06);
      display:flex;
      align-items:center;
      justify-content:center;
      flex:0 0 auto;
      color:#fff7ef;
      font-size:24px;
      font-weight:950;
    }
    .confirmConflictAvatar img {
      width:100%;
      height:100%;
      object-fit:cover;
      display:block;
    }
    .confirmStagePill {
      display:inline-flex;
      align-items:center;
      justify-content:center;
      min-height:62px;
      padding:10px 20px;
      border-radius:18px;
      border:1px solid rgba(255,255,255,.14);
      background:rgba(255,255,255,.06);
      color:#fff7ef;
      font-size:clamp(24px, 2.4vw, 38px);
      font-weight:950;
      letter-spacing:.04em;
      text-transform:uppercase;
      white-space:nowrap;
    }
    .confirmStagePill.color_bath { background: rgba(88,167,255,.28); border-color: rgba(88,167,255,.44); color: #e6f2ff; }
    .confirmStagePill.color_nails { background: rgba(255,214,102,.24); border-color: rgba(255,214,102,.42); color: #fff6de; }
    .confirmStagePill.color_grooming { background: rgba(255,0,183,.24); border-color: rgba(255,0,183,.42); color: #ffe0f6; }
    .confirmStagePill.color_dry { background: rgba(20,60,120,.34); border-color: rgba(173,206,244,.26); color: rgba(234,244,242,.96); }
    .confirmStagePill.color_dematting,
    .confirmStagePill.color_preshave { background: rgba(120,22,32,.34); border-color: rgba(120,22,32,.52); color: rgba(234,244,242,.96); }
    .confirmStagePill.color_pickup { background: rgba(109,231,163,.18); border-color: rgba(109,231,163,.55); color: rgba(222,255,235,.98); }
    .confirmConflictDogCard {
      display:grid;
      gap:16px;
      padding:18px;
      border-radius:26px;
      border:1px solid rgba(255,255,255,.10);
      background:rgba(255,255,255,.04);
      box-shadow:0 18px 38px rgba(0,0,0,.26);
    }
    .confirmConflictDogTop {
      display:grid;
      grid-template-columns:120px minmax(0, 1fr);
      gap:16px;
      align-items:center;
    }
    .confirmConflictDogPhoto {
      width:120px;
      height:120px;
      border-radius:24px;
      overflow:hidden;
      border:1px solid rgba(255,255,255,.12);
      background:rgba(255,255,255,.06);
      display:flex;
      align-items:center;
      justify-content:center;
      font-size:40px;
      font-weight:950;
      color:#fff7ef;
    }
    .confirmConflictDogPhoto img {
      width:100%;
      height:100%;
      object-fit:cover;
      display:block;
    }
    .confirmConflictDogName {
      font-size:clamp(24px, 2.4vw, 38px);
      font-weight:950;
      color:#fff7ef;
      line-height:1.02;
    }
    .confirmConflictDogService {
      margin-top:8px;
      font-size:clamp(18px, 1.6vw, 28px);
      font-weight:850;
      color:rgba(255,235,212,.96);
      line-height:1.15;
    }
    .confirmConflictDogMeta {
      font-size:clamp(18px, 1.45vw, 24px);
      font-weight:800;
      color:rgba(255,255,255,.74);
      line-height:1.2;
    }
    .confirmStaffStageLayout {
      display:grid;
      gap:22px;
      align-content:start;
      max-width:980px;
    }
    .confirmStaffStageLayout--assist {
      max-width:none;
      grid-template-columns:minmax(0, 1.18fr) minmax(300px, 520px);
      grid-template-areas:
        'hero hero'
        'current dog'
        'help dog'
        'prompt dog';
      column-gap:28px;
      row-gap:18px;
      align-items:start;
    }
    .confirmStaffStageLayout--assist .confirmStaffStageHero { grid-area:hero; }
    .confirmStaffStageRow--current { grid-area:current; }
    .confirmStaffStageRow--assist { grid-area:help; align-self:start; }
    .confirmStaffStageDogWrap--assist {
      grid-area:dog;
      justify-self:end;
      align-self:start;
      width:min(100%, 520px);
      margin-top:4px;
    }
    .confirmStaffStageDogWrap--assist .confirmStaffStageFor {
      margin-bottom:-2px;
      justify-self:start;
    }
    .confirmStaffStageDogWrap--assist .confirmConflictDogCard {
      padding-top:14px;
    }
    .confirmStaffStageDogWrap--assist .confirmConflictDogTop {
      align-items:start;
    }
    .confirmStaffStageDogWrap--assist .confirmConflictDogService {
      margin-top:4px;
    }
    .confirmStaffStageDogWrap--assist .confirmConflictDogMeta {
      margin-top:2px;
    }
    .confirmStaffStagePrompt--assist {
      grid-area:prompt;
      max-width:760px;
      margin-top:-4px;
      align-self:start;
    }
    .confirmStaffStageHero {
      display:flex;
      align-items:center;
      gap:16px;
      flex-wrap:wrap;
      color:#fff7ef;
      font-weight:950;
      line-height:1;
    }
    .confirmStaffStageHero .confirmConflictAvatar {
      width:86px;
      height:86px;
      border-radius:22px;
      font-size:28px;
    }
    .confirmStaffStageHeroText {
      font-size:clamp(30px, 4vw, 58px);
      letter-spacing:-.03em;
    }
    .confirmStaffStageRow {
      display:flex;
      align-items:center;
      gap:16px;
      flex-wrap:wrap;
      color:#fff7ef;
      font-size:clamp(22px, 2.3vw, 36px);
      font-weight:850;
      line-height:1.12;
    }
    .confirmStaffStageDogWrap {
      display:grid;
      gap:10px;
      max-width:520px;
    }
    .confirmStaffStageFor {
      color:#fff7ef;
      font-size:clamp(20px, 1.9vw, 30px);
      font-weight:900;
      letter-spacing:-.02em;
    }
    .confirmStaffStageDogCard { max-width:520px; }
    .confirmStaffStagePrompt {
      color:#fff7ef;
      font-size:clamp(24px, 2.4vw, 38px);
      font-weight:900;
      line-height:1.15;
      max-width:900px;
    }
    .confirmAssistRoleLayout {
      display:grid;
      gap:22px;
      align-content:start;
      max-width:none;
      grid-template-columns:minmax(0, 1.15fr) minmax(300px, 520px);
      grid-template-areas:
        'hero hero'
        'summary dog'
        'prompt prompt';
      column-gap:28px;
      row-gap:18px;
      align-items:start;
    }
    .confirmAssistRoleHero { grid-area:hero; }
    .confirmAssistRoleSummary {
      grid-area:summary;
      display:flex;
      align-items:center;
      gap:16px;
      flex-wrap:wrap;
      color:#fff7ef;
      font-size:clamp(22px, 2.25vw, 36px);
      font-weight:850;
      line-height:1.12;
      align-self:start;
    }
    .confirmAssistRoleSummary .confirmConflictInlinePerson { gap:12px; }
    .confirmAssistRoleWord { color:rgba(255,247,239,.92); }
    .confirmAssistRoleDogWrap {
      grid-area:dog;
      justify-self:end;
      align-self:start;
      width:min(100%, 520px);
      display:grid;
      gap:10px;
    }
    .confirmAssistRolePrompt {
      grid-area:prompt;
      color:#fff7ef;
      font-size:clamp(24px, 2.35vw, 38px);
      font-weight:900;
      line-height:1.15;
      max-width:1040px;
      margin-top:8px;
    }
    .confirmAssistRoleDogWrap .confirmConflictDogCard {
      padding-top:14px;
    }
    @media (max-width: 980px){
      .confirmConflictLayout { grid-template-columns:1fr; }
      .confirmConflictDogTop { grid-template-columns:92px minmax(0, 1fr); }
      .confirmConflictDogPhoto { width:92px; height:92px; border-radius:20px; font-size:30px; }
      #confirmOverlay.confirmOverlay--stageConflict .modal,
      #confirmOverlay.confirmOverlay--staffStageConflict .modal,
      #confirmOverlay.confirmOverlay--staffAssistConflict .modal { padding:24px 20px 0; }
      #confirmOverlay.confirmOverlay--stageConflict #confirmFooter,
      #confirmOverlay.confirmOverlay--staffStageConflict #confirmFooter,
      #confirmOverlay.confirmOverlay--staffAssistConflict #confirmFooter { margin:0 -20px; }
      #confirmOverlay.confirmOverlay--stageConflict #confirmCancel,
      #confirmOverlay.confirmOverlay--stageConflict #confirmOk,
      #confirmOverlay.confirmOverlay--staffStageConflict #confirmCancel,
      #confirmOverlay.confirmOverlay--staffStageConflict #confirmOk,
      #confirmOverlay.confirmOverlay--staffAssistConflict #confirmCancel,
      #confirmOverlay.confirmOverlay--staffAssistConflict #confirmAlt,
      #confirmOverlay.confirmOverlay--staffAssistConflict #confirmOk { min-height:92px; }
      .confirmConflictAvatar { width:60px; height:60px; border-radius:16px; }
      .confirmStagePill { min-height:54px; padding:8px 16px; }
      .confirmStaffStageHero { gap:12px; }
      .confirmStaffStageHero .confirmConflictAvatar { width:72px; height:72px; border-radius:18px; }
      .confirmStaffStageLayout--assist {
        grid-template-columns:minmax(0, 1fr) minmax(240px, 360px);
        column-gap:20px;
        row-gap:14px;
      }
      .confirmAssistRoleLayout {
        grid-template-columns:minmax(0, 1fr) minmax(240px, 360px);
        column-gap:20px;
        row-gap:14px;
      }
      .confirmStaffStagePrompt--assist { margin-top:-8px; }
    }
    @media (max-width: 720px){
      .confirmStaffStageLayout--assist {
        grid-template-columns:1fr;
        grid-template-areas:
          'hero'
          'current'
          'dog'
          'help'
          'prompt';
      }
      .confirmAssistRoleLayout {
        grid-template-columns:1fr;
        grid-template-areas:
          'hero'
          'summary'
          'dog'
          'prompt';
      }
      .confirmStaffStageDogWrap--assist,
      .confirmAssistRoleDogWrap {
        justify-self:start;
        width:100%;
        margin-top:0;
      }
      .confirmStaffStagePrompt--assist { margin-top:0; }
    }
    #workModal {
      width: 100% !important;
      max-width: none !important;
      height: 100dvh;
      min-height: 100vh;
      max-height: none;
      margin: 0;
      border-radius: 0;
      overflow: hidden;
      padding: 18px;
      box-sizing: border-box;
      display:flex;
      flex-direction:column;
      background:
        radial-gradient(900px 500px at 12% 12%, rgba(134,185,174,.10), transparent 60%),
        radial-gradient(700px 480px at 92% 16%, rgba(160,106,46,.09), transparent 58%),
        linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
    }
    #workModal .row{ gap:8px; }

    /* Full-screen Details overlay */
    #detailsOverlay.overlay { align-items:stretch; justify-content:stretch; padding:0; overflow:hidden; z-index:20000; }
    #detailsOverlay .card { width:100% !important; max-width:none !important; height:100vh; max-height:none !important; margin:0; border-radius:0; overflow:auto; padding:18px; box-sizing:border-box; }

    /* Comments overlay must appear above the full-screen Work overlay */
    #previousNotesOverlay.overlay { z-index:21000; }
    #stageReviewOverlay.overlay { align-items:stretch; justify-content:stretch; padding:0; overflow:hidden; z-index:30020; }
    #stageReviewOverlay .card { width:100% !important; max-width:none !important; height:100vh; max-height:none !important; margin:0; border-radius:0; overflow:hidden; padding:18px; box-sizing:border-box; display:flex; flex-direction:column; }
    #stageReviewOverlay .topbar {
      margin-bottom:12px;
      padding-right:6px;
      flex:0 0 auto;
      display:grid;
      grid-template-columns:minmax(0, 1fr) auto auto;
      align-items:center;
      gap:10px;
    }
    #stageReviewHeaderMain { min-width:0; }
    #stageReviewEyebrow:empty,
    #stageReviewSub:empty,
    #stageReviewSummary:empty { display:none; }
    #stageReviewLayout { flex:1 1 auto; min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr); gap:12px; }
    #stageReviewSummary { font-size:14px; line-height:1.25; }
    .stageReviewSummaryCard { display:flex; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--border); border-radius:18px; background:rgba(255,255,255,.03); }
    .stageReviewSummaryPhoto { width:52px; height:52px; border-radius:14px; overflow:hidden; flex:0 0 auto; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.10); font-weight:900; color:var(--text); }
    .stageReviewSummaryPhoto img { width:100%; height:100%; object-fit:cover; display:block; }
    .stageReviewSummaryMain { min-width:0; flex:1 1 auto; }
    .stageReviewSummaryTitle { font-size:15px; font-weight:900; color:var(--text); }
    .stageReviewSummaryMeta { margin-top:4px; }
    .stageReviewSummaryNote { margin-top:6px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
    #stageReviewContent { min-height:0; display:grid; grid-template-columns:minmax(0, 1fr); gap:16px; align-items:start; overflow:hidden; }
    #stageReviewChecklistHost { min-height:0; overflow:visible; align-self:start; }
    #stageReviewChecklistHost #skinBox, #stageReviewChecklistHost #bathBox { margin-top:0 !important; display:block !important; }
    #stageReviewChecklistHost .checklistCard { min-height:auto !important; padding:16px !important; height:auto !important; }
    #stageReviewChecklistHost #bathBox, #stageReviewChecklistHost #skinBox { overflow:visible !important; }
    #stageReviewChecklistHost .checklistCard > .row:first-child { margin-bottom:8px; }
    #stageReviewChecklistHost #skinBox .checklistCard > .row:first-child,
    #stageReviewChecklistHost #bathBox .checklistCard > .row:first-child { display:none !important; }
    #stageReviewChecklistHost #skinBox .checklistCard,
    #stageReviewChecklistHost #bathBox .checklistCard {
      background:transparent !important;
      border:none !important;
      box-shadow:none !important;
      padding:0 !important;
    }
    #stageReviewChecklistHost .choiceWrap {
      background:rgba(255,255,255,.03);
      border-radius:16px;
    }
    #stageReviewChecklistHost #skinSchemaPrimary,
    #stageReviewChecklistHost #bathSchemaPrimary,
    #stageReviewChecklistHost #bathLegacyWrap,
    #stageReviewChecklistHost #skinWrap { margin-top:0 !important; }
    #stageReviewChecklistHost .checklistCard h3 { font-size:20px; }
    #stageReviewChecklistHost .choiceWrap { padding:14px; border-radius:20px; }
    #stageReviewChecklistHost .choiceTitle { font-size:20px; line-height:1.08; }
    #stageReviewChecklistHost .tileGrid { gap:14px; }
    #stageReviewChecklistHost .tileBtn, #stageReviewChecklistHost .choiceBtn {
      min-height:66px;
      font-size:20px;
      padding:12px 10px;
      border-radius:18px;
      line-height:1.08;
      white-space:normal;
      text-wrap:balance;
    }
    #stageReviewChecklistHost #skinBox .row[style*="position:sticky"], #stageReviewChecklistHost #bathBox .row[style*="position:sticky"] { display:none !important; }
    #stageReviewOverlay[data-mode="active"] #stageReviewContent { grid-template-columns:1fr; }
    #stageReviewOverlay[data-mode="active"] #stageReviewSidebar { display:none; }
    #stageReviewOverlay[data-mode="active"] #stageReviewSummary { max-width:860px; }
    #stageReviewOverlay[data-mode="active"] #stageReviewConfirm { min-width:240px; width:auto; }
    #stageReviewSidebar { min-height:0; display:block; overflow:visible; }
    #stageReviewBehaviorCard { padding:16px !important; overflow:visible; display:flex; flex-direction:column; gap:12px; }
    #stageReviewBehaviorCard h3, #stageReviewNoteCard h3 { font-size:20px; }
    #stageReviewBehaviorSelect, #stageReviewNoteSelect { width:100%; min-height:66px; padding:14px 16px; font-size:18px; display:block; position:static; border-radius:16px; }
    #stageReviewBehaviorChosen, #stageReviewNoteChosen { display:flex; flex-wrap:wrap; gap:8px; }
    .stageReviewBehaviorChip {
      display:inline-flex;
      align-items:center;
      gap:6px;
      padding:8px 8px;
      border-radius:16px;
      border:1px solid rgba(255,255,255,.12);
      background:rgba(255,255,255,.06);
      font-weight:800;
      line-height:1.15;
      min-height:46px;
    }
    .stageReviewBehaviorChipEmoji {
      display:inline-flex;
      align-items:center;
      justify-content:center;
      min-width:22px;
      font-size:22px;
      line-height:1;
    }
    .stageReviewBehaviorChip button {
      min-height:auto;
      height:28px;
      min-width:28px;
      padding:0;
      border-radius:999px;
      border:1px solid rgba(255,255,255,.14);
      background:rgba(255,255,255,.08);
      color:var(--text);
      font-size:14px;
      font-weight:900;
    }
    #stageReviewBehaviorPreview, #stageReviewNotePreview { margin-top:6px; font-size:14px; line-height:1.3; }
    #stageReviewNoteWrap { margin-top:8px; display:flex; flex-direction:column; gap:12px; min-height:180px; }
    #stageReviewNoteErr { flex:0 0 auto; }
    #stageReviewCustomNoteOverlay.overlay { z-index:30040; padding:18px; }
    #stageReviewCustomNoteCard { width:min(100%, 720px); max-width:720px; display:flex; flex-direction:column; gap:14px; }
    #stageReviewCustomNoteText { width:100%; min-height:220px; resize:vertical; border-radius:16px; padding:14px 16px; background:rgba(255,255,255,.04); color:var(--text); border:1px solid var(--border); font:inherit; }
    #stageReviewCustomNoteActions { display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
    #stageReviewBehaviorNotesOverlay.overlay { z-index:30035; padding:18px; }
    #stageReviewBehaviorNotesCard { width:min(100%, 1120px); max-width:1120px; display:flex; flex-direction:column; gap:14px; }
    #stageReviewBehaviorNotesHost { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; align-items:start; }
    #stageReviewBehaviorNotesHost #stageReviewSidebar { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; }
    #stageReviewBehaviorNotesHost #stageReviewBehaviorCard,
    #stageReviewBehaviorNotesHost #stageReviewNoteCard {
      min-height:0;
      margin:0;
    }
    #stageReviewActions {
      display:flex;
      justify-content:flex-end;
      align-items:center;
      gap:10px;
      padding:0;
      background:transparent;
      border:none;
      flex:0 0 auto;
      flex-wrap:wrap;
    }
    #stageReviewBehaviorNotesBtn { display:none !important; }
    #stageReviewClose { min-height:58px; padding:15px 20px; border-radius:18px; font-size:17px; }
    #stageReviewConfirm {
      min-width:304px;
      min-height:80px;
      padding:18px 22px;
      font-size:21px;
      border-radius:19px;
      box-shadow:none;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      flex:0 0 auto;
      align-self:auto;
    }
    @media (max-height: 820px){
      #stageReviewContent { grid-template-columns:1fr; gap:14px; }
      #stageReviewChecklistHost .tileBtn, #stageReviewChecklistHost .choiceBtn {
        min-height:62px;
        font-size:18px;
        padding:10px 10px;
      }
      #stageReviewBehaviorSelect, #stageReviewNoteSelect { min-height:60px; font-size:17px; }
      #stageReviewConfirm { min-height:74px; font-size:19px; }
      #stageReviewBehaviorNotesBtn { min-height:52px; font-size:16px; }
      #stageReviewClose { min-height:52px; font-size:16px; }
    }
    @media (max-width: 1400px){
      #stageReviewOverlay .card { position:relative; }
      #stageReviewLayout { height:auto; min-height:calc(100vh - 94px); }
      #stageReviewContent { grid-template-columns:1fr; overflow:visible; }
      #stageReviewNoteWrap { min-height:150px; }
      #stageReviewOverlay .card { overflow:auto; }
      #stageReviewConfirm {
        width:auto;
        min-width:170px;
        min-height:48px;
        padding:10px 16px;
        margin-left:auto;
      }
      #stageReviewBehaviorNotesBtn { display:none !important; }
      #stageReviewBehaviorSelect, #stageReviewNoteSelect {
        min-height:72px;
        font-size:19px;
      }
      #stageReviewBehaviorChosen, #stageReviewNoteChosen {
        gap:10px;
      }
      .stageReviewBehaviorChip {
        min-height:54px;
        padding:12px 14px;
        font-size:16px;
      }
      #stageReviewChecklistHost #bathSchemaPrimary,
      #stageReviewChecklistHost #skinSchemaPrimary {
        grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
        gap:10px !important;
      }
      #stageReviewChecklistHost #bathLegacyWrap {
        display:grid;
        grid-template-columns:repeat(4, minmax(0, 1fr));
        gap:10px;
        align-items:start;
      }
      #stageReviewChecklistHost #bathLegacyWrap > .grid {
        display:contents;
      }
      #stageReviewChecklistHost #bathLegacyWrap > div[style*="height:12px"] {
        display:none !important;
      }
      #stageReviewOverlay[data-stage-code="bath"] #stageReviewContent {
        grid-template-columns:1fr;
        gap:12px;
        align-items:start;
        overflow:auto;
      }
      #stageReviewOverlay[data-stage-code="bath"] #stageReviewChecklistHost {
        display:block;
        overflow:visible;
      }
      #stageReviewOverlay[data-stage-code="bath"] #bathBox,
      #stageReviewOverlay[data-stage-code="bath"] #bathBox > .checklistCard {
        display:block !important;
      }
      #stageReviewOverlay[data-stage-code="bath"] #bathSchemaPrimary,
      #stageReviewOverlay[data-stage-code="bath"] #bathSchemaExtra {
        display:grid !important;
        grid-template-columns:repeat(4, minmax(0, 1fr));
        gap:8px !important;
      }
      #stageReviewOverlay[data-stage-code="bath"] #bathLegacyWrap {
        display:grid !important;
        grid-template-columns:repeat(4, minmax(0, 1fr));
        gap:8px;
        align-items:start;
      }
      #stageReviewOverlay[data-stage-code="bath"] #bathLegacyWrap > .grid {
        display:grid !important;
        grid-template-columns:repeat(4, minmax(0, 1fr));
        gap:8px;
      }
      #stageReviewOverlay[data-stage-code="bath"] #stageReviewBehaviorCard,
      #stageReviewOverlay[data-stage-code="bath"] #stageReviewNoteCard,
      #stageReviewOverlay[data-stage-code="bath"] .checklistSchemaGroup,
      #stageReviewOverlay[data-stage-code="bath"] #bathChecklistWrap,
      #stageReviewOverlay[data-stage-code="bath"] #bathGlandsWrap,
      #stageReviewOverlay[data-stage-code="bath"] #bathEarsWrap {
        min-height:0;
        margin:0;
        align-self:start;
      }
    }
    @media (orientation: landscape) and (max-height: 900px){
      #stageReviewOverlay .card {
        padding:10px;
        overflow:hidden;
      }
      #stageReviewOverlay .topbar {
        margin-bottom:8px;
        padding-right:0;
        grid-template-columns:minmax(0, 1fr) auto auto;
      }
      #stageReviewTitle {
        margin-top:4px !important;
        font-size:28px;
        line-height:1;
      }
      #stageReviewSub {
        font-size:12px;
        line-height:1.15;
      }
      #stageReviewLayout {
        min-height:calc(100dvh - 20px);
        gap:8px;
      }
      #stageReviewContent {
        display:flex;
        flex-direction:column;
        gap:8px;
        overflow:hidden;
      }
      #stageReviewChecklistHost {
        flex:1 1 auto;
        min-height:280px;
        overflow:auto;
        padding-right:4px;
        align-self:stretch;
      }
      #finishReviewSub {
        font-size:12px;
      }
      #stageReviewBehaviorSelect, #stageReviewNoteSelect {
        min-height:52px;
        padding:10px 12px;
        font-size:15px;
        border-radius:14px;
      }
      #stageReviewBehaviorPreview, #stageReviewNotePreview {
        display:none;
      }
      #stageReviewNoteWrap {
        grid-column:2;
        grid-row:1 / span 4;
        min-height:0;
        margin-top:0;
        gap:8px;
      }
      #stageReviewNoteWrap h3 {
        font-size:17px;
      }
      #stageReviewActions {
        position:static;
        justify-content:flex-end;
        align-items:center;
        padding:0;
      }
      #stageReviewClose {
        min-height:44px;
        padding:10px 14px;
        font-size:15px;
      }
      #stageReviewBehaviorNotesBtn { display:none !important; }
      #stageReviewConfirm {
        width:min(320px, 100%);
        min-width:220px;
        min-height:50px;
        padding:12px 16px;
        font-size:16px;
      }
      #stageReviewBehaviorNotesHost,
      #stageReviewBehaviorNotesHost #stageReviewSidebar {
        grid-template-columns:1fr;
      }
    }
    .modal { width:min(720px,100%); }
    .modal h2 { letter-spacing:-.02em; }
    .workModal { width:min(1280px, calc(100vw - 32px)); position:relative; }
    .workModal.waitingMode { width:min(1280px, calc(100vw - 32px)); }
    .workModal .topbar h2 { font-size:30px; }
    .photo { width:100%; aspect-ratio: 1 / 1; min-height:220px; border-radius:26px; background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border:1px solid rgba(255,255,255,.10); overflow:hidden; display:flex; align-items:center; justify-content:center; box-shadow: 0 22px 46px rgba(0,0,0,.36); }
    .photo img { width:100%; height:100%; object-fit:cover; object-position:center 24%; }
    .bigTimer { font-size:64px; font-weight:950; letter-spacing:.4px; font-variant-numeric: tabular-nums; line-height:.92; }

    #workModal .topbar {
      display:grid;
      grid-template-columns:minmax(280px, 1fr) minmax(320px, 1.2fr) minmax(220px, .82fr);
      gap:14px;
      align-items:stretch;
      margin-bottom:18px;
      flex:0 0 auto;
    }
    #workModal #workInfoBlock,
    #workModal #workServiceBlock,
    #workModal #workHeaderActions {
      min-height:164px;
      border-radius:24px;
      border:1px solid rgba(255,255,255,.10);
      background:linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
      box-shadow:0 18px 38px rgba(0,0,0,.24);
    }
    #workModal #workInfoBlock {
      display:grid;
      grid-template-columns:154px minmax(0, 1fr);
      gap:14px;
      align-items:stretch;
      padding:14px;
    }
    #workModal #workPhotoCard {
      position:relative;
      min-height:154px;
      height:100%;
      padding:0;
      overflow:hidden;
      border-radius:22px;
      border:1px solid rgba(255,255,255,.10);
      box-shadow:none;
      background:rgba(255,255,255,.04);
    }
    #workModal #workPhotoCard img {
      width:100%;
      height:100%;
      object-fit:cover;
      object-position:center 30%;
      image-orientation:from-image;
      display:block;
    }
    #workModal #workNoPhoto {
      width:100%;
      height:100%;
      display:grid;
      place-items:center;
      font-weight:800;
      letter-spacing:.08em;
      text-transform:uppercase;
    }
    #workModal #workInfoMeta {
      min-width:0;
      display:flex;
      flex-direction:column;
      justify-content:flex-start;
      align-items:flex-start;
    }
    #workModal #workDogTitle {
      font-size:44px;
      line-height:.98;
      letter-spacing:-.03em;
    }
    #workModal #workCodesLine {
      display:flex;
      gap:10px;
      align-items:center;
      margin-top:10px;
    }
    #workModal #workCodesLine .codeBadge {
      width:34px;
      height:34px;
      font-size:18px;
      border-radius:14px;
    }
    #workModal #workBreedWeight {
      margin-top:8px;
      font-size:12px;
      color:rgba(156,190,184,.92);
      font-weight:800;
    }
    #workModal #workHeaderPickupNotice {
      display:inline-flex;
      margin-top:10px;
    }
    #workModal #workDogSub {
      margin-top:8px;
    }
    #workModal #workServiceBlock {
      display:flex;
      flex-direction:column;
      justify-content:flex-start;
      text-align:center;
      padding:18px 20px 16px;
      --work-service-scale: 1;
    }
    #workModal #workServiceTitle {
      font-size:clamp(28px, calc(3.1vw * var(--work-service-scale)), 42px);
      font-weight:950;
      line-height:1.02;
      letter-spacing:-.03em;
      margin-top:6px;
      text-wrap:balance;
    }
    #workModal #workServiceList {
      margin-top:14px;
      padding:14px 14px 12px;
      border-radius:20px;
      min-height:78px;
      background:rgba(173, 206, 244, .08);
      border:1px solid rgba(173,206,244,.20);
      font-size:clamp(15px, calc(1.06vw * var(--work-service-scale)), 19px);
      line-height:1.24;
      font-weight:700;
      color:rgba(234,244,242,.94);
      white-space:normal;
      text-wrap:balance;
    }
    #workModal .workServicePills {
      display:flex;
      flex-wrap:wrap;
      gap:10px;
      justify-content:center;
      align-items:center;
    }
    #workModal .workServiceTag {
      display:inline-flex;
      align-items:center;
      justify-content:center;
      min-height:38px;
      padding:8px 14px;
      border-radius:999px;
      background:rgba(255,255,255,.08);
      border:1px solid rgba(255,255,255,.12);
      font-size:clamp(14px, calc(0.98vw * var(--work-service-scale)), 18px);
      font-weight:850;
      color:rgba(242,247,246,.96);
    }
    #workModal .workServiceTag.addon {
      background:rgba(203,141,62,.16);
      border-color:rgba(203,141,62,.28);
      color:rgba(255,235,212,.96);
    }
    #workModal #workServiceMeta {
      margin-top:10px;
      font-size:13px;
      text-transform:uppercase;
      letter-spacing:.08em;
    }
    #workModal #workCornerClose {
      position:absolute;
      top:12px;
      right:12px;
      width:52px;
      height:52px;
      min-height:52px;
      border-radius:16px;
      font-size:30px;
      line-height:1;
      font-weight:900;
      padding:0;
      z-index:5;
    }
    #workModal #workHeaderActions {
      display:grid;
      grid-template-columns:1fr;
      grid-auto-rows:minmax(0, 1fr);
      gap:10px;
      padding:14px;
      align-content:stretch;
    }
    #workModal #workHeaderActions button,
    #workModal #workHeaderActions .pill {
      width:81%;
      min-height:51px;
      padding:15px 18px;
      border-radius:18px;
      font-size:19px;
      font-weight:900;
      box-sizing:border-box;
      display:flex;
      align-items:center;
      justify-content:flex-start;
      justify-self:center;
    }
    #workModal #workPickupNotice {
      display:none !important;
    }
    #workModal #workPauseBtn,
    #workModal #workChangeStaffBtn,
    #workModal #workStageChecklistAddBtn {
      min-height:51px;
      padding:15px 18px;
      border-radius:18px;
      font-size:19px;
      font-weight:900;
    }
    #workModal #workStageChecklistAddBtn,
    #workModal #workChangeStaffBtn {
      font-weight:950;
    }
    #workModal .work {
      flex:1 1 auto;
      min-height:0;
      display:grid;
      grid-template-columns:minmax(0, 620px) minmax(0, 1fr);
      grid-template-areas:
        'check timer'
        'meta meta'
        'actions actions';
      grid-template-rows:minmax(470px, 1fr) auto auto;
      gap:14px;
      align-items:stretch;
      overflow:auto;
      padding-right:4px;
      padding-bottom:0;
    }
    #workModal #workTimerStack,
    #workModal #workStageChecklistPanel,
    #workModal #workAuxMeta,
    #workModal #workBottomActions {
      width:100%;
      box-sizing:border-box;
      border-radius:24px;
      border:1px solid rgba(255,255,255,.10);
      background:linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
      box-shadow:0 18px 38px rgba(0,0,0,.24);
    }
    #workModal #workTimerStack {
      padding:22px 28px 20px;
      text-align:center;
      display:flex;
      flex-direction:column;
      justify-content:center;
      min-height:470px;
      height:100%;
    }

    #workModal #workTopGrid{
      min-height:0;
      display:contents;
    }
    #workModal #workTopGrid.noChecklist #workTimerStack{
      grid-column:1 / -1;
      grid-area:timer;
    }
    #workModal #workTopGrid.noChecklist ~ #workHistoryBtn,
    #workModal #workTopGrid.noChecklist ~ #workAuxMeta {
      grid-column:1 / -1;
    }
    #workModal #workStageChecklistPanel{
      grid-area:check;
      padding:20px 20px 20px;
      text-align:left;
      min-height:470px;
      display:flex;
      flex-direction:column;
      align-self:stretch;
      overflow:hidden;
      height:100%;
    }
    #workModal .stageChecklistGrid{
      flex:1 1 auto;
      display:grid;
      grid-template-columns:repeat(3, minmax(0, 1fr));
      grid-auto-rows:51px;
      align-content:start;
      gap:10px;
      min-height:0;
      overflow:auto;
      padding-right:2px;
    }
    #workModal .stageChecklistItem,
    #workStageChecklistAddOverlay .workStageChecklistAddOption{
      min-height:51px;
      height:51px;
      width:100%;
      justify-self:stretch;
      padding:6px 8px;
      border-radius:16px;
      border:1px solid var(--check-bg-border, rgba(255,255,255,.12));
      background:var(--check-bg-fill, rgba(255,255,255,.06));
      color:var(--check-bg-text, rgba(234,244,242,.96));
      font-weight:950;
      font-size:20px;
      letter-spacing:-.02em;
      line-height:1.05;
      display:-webkit-box;
      -webkit-line-clamp:2;
      -webkit-box-orient:vertical;
      overflow:hidden;
    }
    #workStageChecklistAddOverlay .workStageChecklistAddOption{
      min-height:64px;
      height:auto;
      padding:10px 12px;
      white-space:normal;
    }
    #workModal .stageChecklistItem.checked{
      background:rgba(77,227,161,.18);
      border-color:rgba(77,227,161,.36);
      box-shadow:0 0 0 2px rgba(77,227,161,.10) inset;
      filter:brightness(1.04);
    }
    .stageChecklistTone--bath{
      --check-bg-fill:var(--stage-bath-fill);
      --check-bg-border:var(--stage-bath-border);
      --check-bg-text:var(--stage-bath-text);
    }
    .stageChecklistTone--nails{
      --check-bg-fill:var(--stage-nails-fill);
      --check-bg-border:var(--stage-nails-border);
      --check-bg-text:var(--stage-nails-text);
    }
    .stageChecklistTone--grooming{
      --check-bg-fill:var(--stage-grooming-fill);
      --check-bg-border:var(--stage-grooming-border);
      --check-bg-text:var(--stage-grooming-text);
    }
    .stageChecklistTone--dry{
      --check-bg-fill:var(--stage-dry-fill);
      --check-bg-border:var(--stage-dry-border);
      --check-bg-text:var(--stage-dry-text);
    }
    .stageChecklistTone--pickup{
      --check-bg-fill:var(--stage-pickup-fill);
      --check-bg-border:var(--stage-pickup-border);
      --check-bg-text:var(--stage-pickup-text);
    }
    .stageChecklistTone--split-body{
      --check-bg-border:rgba(255,255,255,.18);
      --check-bg-text:#fff4f7;
      background:linear-gradient(90deg, var(--stage-nails-fill) 0 50%, var(--stage-grooming-fill) 50% 100%) !important;
    }
    .stageChecklistTone--alert-red{
      --check-bg-fill:rgba(215,38,61,.92);
      --check-bg-border:rgba(255,120,132,.98);
      --check-bg-text:#fff7f8;
      box-shadow:0 0 0 1px rgba(120,0,10,.22) inset;
    }

    @media (max-width: 980px){
      #workModal .topbar { grid-template-columns:minmax(0, 1fr); }
      #workModal #workInfoBlock { grid-template-columns:120px minmax(0, 1fr); }
      #workModal .work {
        grid-template-columns:minmax(0, 1fr);
        grid-template-areas:
          'check'
          'timer'
          'meta'
          'actions';
      }
      #workModal .work { grid-template-rows:minmax(420px, 1fr) auto auto; }
      #workModal #workTimerStack,
      #workModal #workStageChecklistPanel { min-height:420px; }
      #workModal #workBottomActions { grid-template-columns:repeat(2, minmax(0, 1fr)); }
    }
    #workModal .workTimersRow {
      margin:0 auto;
      display:grid;
      grid-template-columns:repeat(2, minmax(0, 1fr));
      gap:22px;
      width:min(1080px, 100%);
      align-items:start;
    }
    #workModal .workTimerCard {
      min-width:0;
      padding:6px 8px;
      display:flex;
      flex-direction:column;
      align-items:center;
      justify-content:flex-start;
      text-align:center;
    }
    #workModal #workTimerStack:not(.hasExtraTimer) .workTimerCardMain {
      grid-column:1 / -1;
      max-width:540px;
      justify-self:center;
    }
    #workModal .bigTimer {
      margin-top:0;
      font-size:clamp(120px, 12vw, 196px);
      font-weight:760;
      letter-spacing:-.06em;
      font-family:'Aptos', 'Segoe UI Variable', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    }
    #workModal #workActiveStageLine {
      margin-top:8px;
      font-size:clamp(28px, 3vw, 40px);
      font-weight:900;
      letter-spacing:-.02em;
      line-height:1.02;
      color:rgba(234,244,242,.96);
    }
    #workModal .workTimerRole {
      margin-top:4px;
      font-weight:850;
      font-size:16px;
      text-transform:uppercase;
      letter-spacing:.06em;
    }
    #workPauseTimerBox { margin:10px 0 4px; padding:8px 18px; border:1px solid #e7ac57; border-radius:14px; color:#ffd694; background:rgba(209,137,36,.12); }
    #workPauseTimer { font-size:32px; font-weight:850; font-variant-numeric:tabular-nums; }
    #workPauseTimerLabel { font-weight:800; }
    #workPauseTotal { margin-top:2px; font-size:14px; }
    #workModal #workTimerStack {
      grid-area:timer;
      height:100%;
    }
    #workModal #workCommentsRow { display:none; }
    #workModal #workHistoryBtn,
    #workModal #workPlanPill,
    #workModal #workLeftPill {
      min-height:66px;
      display:flex;
      align-items:center;
      justify-content:flex-start;
      padding:14px 18px;
      border-radius:18px;
      font-size:18px;
      font-weight:900;
      border:1px solid rgba(255,255,255,.10);
      background:linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
      box-shadow:0 18px 38px rgba(0,0,0,.24);
      white-space:nowrap;
      width:100%;
      box-sizing:border-box;
    }
    #workModal #workMetricsRow { display:contents; }
    #workModal #workLeftPill.over {
      border-color: rgba(255,92,92,.55);
      box-shadow: 0 0 0 2px rgba(255,92,92,.08) inset;
    }
    #workModal #workAuxMeta {
      grid-area:meta;
      padding:12px 18px;
      display:grid;
      gap:8px;
    }
    #workModal #workAuxMeta:empty {
      display:none;
    }
    #workModal #workPickupMeta,
    #workModal #workOtherDescBox,
    #workModal #workMeta { margin-top:0 !important; }
    #workModal #workBottomActions {
      grid-area:actions;
      display:grid;
      grid-template-columns:repeat(2, minmax(0, 1fr));
      justify-content:stretch;
      gap:12px;
      padding:12px 0 calc(env(safe-area-inset-bottom, 0px) + 6px);
      background:linear-gradient(180deg, rgba(16,22,22,.12), rgba(16,22,22,.28));
      border:none;
      box-shadow:none;
      position:sticky;
      bottom:0;
      z-index:4;
    }
    #workModal #workCancel,
    #workModal #workChecklist,
    #workModal #workFinish {
      width:100%;
      min-height:64px;
      padding:14px 16px;
      border-radius:20px;
      font-size:19px;
      font-weight:900;
    }
    #workModal #workChecklist:disabled {
      opacity:.45;
      cursor:not-allowed;
    }
    #workModal #serviceStageSchemaBox,
    #workModal #noteBox { grid-column:1 / -1; }
    #workModal .muted { line-height:1.25; font-size:14px; }

    #detailsBody .visitHistoryGrid { display:grid; gap:14px; margin-top:12px; }
    #detailsBody .visitHistoryCard {
      border:1px solid rgba(255,255,255,.10);
      border-radius:22px;
      padding:16px 18px;
      background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
      box-shadow:0 18px 34px rgba(0,0,0,.18);
    }
    #detailsBody .visitHistoryTop {
      display:flex;
      justify-content:space-between;
      gap:14px;
      align-items:flex-start;
      flex-wrap:wrap;
      margin-bottom:12px;
    }
    #detailsBody .visitSummaryGrid {
      display:grid;
      grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
      gap:10px;
      margin-bottom:12px;
    }
    #detailsBody .visitSummaryItem,
    #detailsBody .visitTimeline,
    #detailsBody .visitEvents {
      border-radius:18px;
      border:1px solid rgba(255,255,255,.08);
      background:rgba(255,255,255,.03);
      padding:12px 14px;
    }
    #detailsBody .visitSummaryItem .label,
    #detailsBody .visitTimeline .label,
    #detailsBody .visitEvents .label {
      font-size:12px;
      text-transform:uppercase;
      letter-spacing:.08em;
      color:var(--muted);
      margin-bottom:8px;
    }
    #detailsBody .visitSummaryValue { font-size:22px; font-weight:950; }
    #detailsBody .visitTimelineRows,
    #detailsBody .visitEventRows { display:grid; gap:8px; }
    #detailsBody .visitLine {
      display:flex;
      justify-content:space-between;
      gap:12px;
      align-items:flex-start;
      padding:8px 0;
      border-top:1px solid rgba(255,255,255,.06);
    }
    #detailsBody .visitLine:first-child { border-top:none; padding-top:0; }
    #statsBox .visitSummaryTotals {
      display:grid;
      grid-template-columns:repeat(2, minmax(0, 1fr));
      gap:10px;
      margin-top:8px;
    }
    #statsBox .visitSummaryTotalCard,
    #statsBox .visitSummaryRow {
      border-radius:18px;
      border:1px solid rgba(255,255,255,.08);
      background:rgba(255,255,255,.03);
    }
    #statsBox .visitSummaryTotalCard {
      padding:12px 14px;
    }
    #statsBox .visitSummaryTotalLabel {
      font-size:11px;
      text-transform:uppercase;
      letter-spacing:.08em;
      color:var(--muted);
    }
    #statsBox .visitSummaryTotalValue {
      font-size:22px;
      font-weight:950;
      line-height:1.05;
      margin-top:6px;
    }
    #statsBox .visitSummaryList {
      display:grid;
      gap:8px;
      margin-top:10px;
    }
    #statsBox .visitSummaryRow {
      display:grid;
      grid-template-columns:72px minmax(0, 1fr) auto;
      gap:12px;
      align-items:center;
      padding:10px 12px;
    }
    #statsBox .visitSummaryTime {
      font-size:14px;
      font-weight:900;
      color:#fff;
      font-variant-numeric:tabular-nums;
    }
    #statsBox .visitSummaryStage {
      min-width:0;
      font-weight:850;
      color:#eef6f4;
    }
    #statsBox .visitSummaryPeople,
    #statsBox .visitSummaryMainItem,
    #statsBox .visitSummaryAssistList,
    #statsBox .visitSummaryAssistItem {
      display:flex;
      align-items:center;
      gap:6px;
      flex-wrap:wrap;
    }
    #statsBox .visitSummaryPeople {
      justify-content:flex-end;
    }
    #statsBox .visitSummaryAvatar {
      width:22px;
      height:22px;
      border-radius:999px;
      overflow:hidden;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      background:rgba(255,255,255,.10);
      border:1px solid rgba(255,255,255,.12);
      color:#eef6f4;
      font-size:10px;
      font-weight:950;
      flex:0 0 auto;
    }
    #statsBox .visitSummaryAvatar.isSmall {
      width:18px;
      height:18px;
      font-size:9px;
    }
    #statsBox .visitSummaryAvatar img {
      width:100%;
      height:100%;
      object-fit:cover;
      display:block;
    }
    #statsBox .visitSummaryAssistItem,
    #statsBox .visitSummaryMainItem {
      color:#eef6f4;
      font-weight:800;
    }
    @media (max-width: 900px){
      #statsBox .visitSummaryTotals { grid-template-columns:1fr; }
      #statsBox .visitSummaryRow {
        grid-template-columns:1fr;
        justify-items:start;
      }
      #statsBox .visitSummaryPeople { justify-content:flex-start; }
    }
    #detailsBody .visitEventTitle { font-weight:850; }
    #previousNotesBody { display:grid; gap:12px; }
    #previousNotesStageBar { display:grid; gap:12px; margin-bottom:12px; }
    .previousNotesStageSummary {
      display:flex;
      align-items:center;
      gap:12px;
      flex-wrap:wrap;
      padding:12px 14px;
      border:1px solid rgba(255,255,255,.10);
      border-radius:18px;
      background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
    }
    .previousNotesStageLabel {
      font-size:12px;
      text-transform:uppercase;
      letter-spacing:.12em;
      color:rgba(234,244,242,.88);
      font-weight:900;
    }
    .previousNotesStageStaff {
      display:flex;
      align-items:center;
      gap:10px;
      min-width:0;
    }
    .previousNotesStageAvatar {
      width:54px;
      height:54px;
      border-radius:999px;
      overflow:hidden;
      background:rgba(255,255,255,.06);
      border:1px solid rgba(255,255,255,.12);
      display:flex;
      align-items:center;
      justify-content:center;
      flex:0 0 auto;
      font-weight:950;
      font-size:18px;
      color:#fff;
    }
    .previousNotesStageAvatar img {
      width:100%;
      height:100%;
      object-fit:cover;
      display:block;
    }
    .previousNotesStageStaffName {
      font-size:26px;
      font-weight:900;
      color:#fff;
      white-space:nowrap;
      overflow:hidden;
      text-overflow:ellipsis;
      max-width:180px;
    }
    .previousNotesStageMetric {
      padding:10px 14px;
      border-radius:16px;
      border:1px solid rgba(255,255,255,.10);
      background:rgba(255,255,255,.04);
      font-size:24px;
      font-weight:950;
      color:#fff7ef;
      white-space:nowrap;
    }
    .previousNotesStageMetric.over {
      background:rgba(255,107,107,.13);
      border-color:rgba(255,107,107,.30);
      color:#ffd6d6;
    }
    .previousNotesDematBtn {
      min-height:50px;
      padding:10px 16px;
      border-radius:16px;
      border-color:rgba(77,227,161,.72);
      background:linear-gradient(180deg, rgba(77,227,161,.94), rgba(36,172,101,.94));
      color:#062914;
      font-size:18px;
      font-weight:950;
      letter-spacing:.06em;
      text-transform:uppercase;
      box-shadow:0 8px 20px rgba(36,172,101,.20);
    }
    .previousNotesDematBtn:disabled { opacity:.55; cursor:wait; }
    .previousNotesNoActive {
      padding:16px 18px;
      border-radius:18px;
      border:1px solid rgba(255,107,107,.24);
      background:rgba(255,107,107,.09);
      color:#fff0f0;
      font-size:30px;
      font-weight:950;
      letter-spacing:.03em;
    }
    .previousNoteModalCard {
      border:1px solid rgba(255,255,255,.10);
      border-radius:18px;
      padding:14px 16px;
      background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    }
    .previousNoteModalMeta {
      font-size:12px;
      text-transform:uppercase;
      letter-spacing:.08em;
      color:var(--muted);
      margin-bottom:8px;
    }
    .previousNoteModalText {
      white-space:pre-wrap;
      line-height:1.45;
      font-size:15px;
    }
    .previousNoteModalHeader {
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      margin-bottom:8px;
    }
    .previousNoteModalHeaderLeft {
      display:flex;
      align-items:center;
      gap:8px;
      flex-wrap:wrap;
      min-width:0;
    }
    .previousNoteModeBadge {
      display:inline-flex;
      align-items:center;
      justify-content:center;
      min-height:24px;
      padding:4px 10px;
      border-radius:999px;
      border:1px solid rgba(255,255,255,.12);
      background:rgba(255,255,255,.05);
      color:var(--muted);
      font-size:11px;
      text-transform:uppercase;
      letter-spacing:.08em;
      font-weight:900;
    }
    .previousNoteModeBadge.editing {
      color:#fff2c3;
      border-color:rgba(255,215,107,.30);
      background:rgba(255,215,107,.14);
    }
    .previousNoteModalEditor {
      width:100%;
      min-height:120px;
      margin-top:8px;
    }
    .previousNoteModalTools {
      display:flex;
      gap:8px;
      flex-wrap:wrap;
      margin-top:10px;
    }
    .previousNoteModalTools .small {
      min-height:42px;
      border-radius:999px;
    }
    .previousNoteModalEmpty {
      color:var(--muted);
      font-style:italic;
    }
    .previousNotesTitleRow {
      display:flex;
      align-items:center;
      gap:12px;
      flex-wrap:wrap;
    }
    .previousNotesGalleryBtn {
      min-height:68px;
      padding:8px 18px;
      border-radius:999px;
      display:inline-flex;
      align-items:center;
      gap:8px;
      font-weight:900;
    }
    .previousNotesGalleryBtn .icon {
      width:54px;
      height:54px;
      display:inline-block;
      flex:0 0 auto;
    }
    .previousNotesGalleryBtn .count {
      display:inline-block;
      min-width:1ch;
      font-size:20px;
    }
    .previousNotesGalleryBtn[disabled] {
      opacity:.55;
      cursor:default;
    }
    .previousNotesGalleryCard {
      margin:12px 0 16px;
      padding:14px;
      border:1px solid rgba(255,255,255,.10);
      border-radius:20px;
      background:rgba(255,255,255,.035);
      box-shadow:0 10px 24px rgba(0,0,0,.16);
    }
    .previousNotesGalleryTop {
      display:flex;
      justify-content:space-between;
      gap:12px;
      align-items:center;
      margin-bottom:12px;
      flex-wrap:wrap;
    }
    .previousNotesGalleryMeta {
      color:var(--muted);
      font-size:13px;
      font-weight:700;
    }
    .previousNotesGalleryActions {
      display:flex;
      gap:10px;
      flex-wrap:wrap;
      align-items:center;
    }
    .previousNotesGalleryStage {
      display:grid;
      grid-template-columns:auto minmax(0,1fr) auto;
      gap:12px;
      align-items:center;
    }
    .previousNotesGalleryNav {
      min-width:52px;
      min-height:52px;
      border-radius:16px;
      font-size:28px;
      line-height:1;
      padding:0;
    }
    .previousNotesGalleryNav[disabled] {
      opacity:.35;
      cursor:default;
    }
    .previousNotesGalleryFrame {
      min-width:0;
      border-radius:20px;
      overflow:hidden;
      background:rgba(255,255,255,.05);
      border:1px solid rgba(255,255,255,.08);
      min-height:280px;
      display:flex;
      align-items:center;
      justify-content:center;
      position:relative;
    }
    .previousNotesGalleryFrame img {
      display:block;
      width:100%;
      max-height:min(60svh, 520px);
      object-fit:contain;
      background:#0b1012;
    }
    .previousNotesGalleryDeleteBtn {
      position:absolute;
      top:12px;
      right:12px;
      z-index:2;
      min-width:44px;
      min-height:44px;
      padding:0 12px;
      border-radius:14px;
      background:rgba(9,12,14,.78);
      border:1px solid rgba(255,255,255,.12);
      display:inline-flex;
      align-items:center;
      justify-content:center;
      font-size:22px;
      line-height:1;
    }
    .previousNotesGalleryCaption {
      margin-top:10px;
      display:flex;
      justify-content:space-between;
      gap:12px;
      flex-wrap:wrap;
      color:var(--muted);
      font-size:13px;
    }
    .previousNotesGalleryQrCard {
      margin:0 0 14px;
      padding:14px;
      border-radius:18px;
      border:1px solid rgba(255,255,255,.10);
      background:rgba(255,255,255,.03);
      display:flex;
      gap:16px;
      align-items:flex-start;
      flex-wrap:wrap;
    }
    .previousNotesGalleryQrBox {
      width:220px;
      height:220px;
      border-radius:18px;
      overflow:hidden;
      background:#fff;
      border:1px solid rgba(255,255,255,.12);
      display:flex;
      align-items:center;
      justify-content:center;
      flex:0 0 auto;
    }
    .previousNotesGalleryQrBox img {
      width:100%;
      height:100%;
      object-fit:contain;
      display:block;
      background:#fff;
    }
    .previousNotesGalleryQrMeta {
      flex:1 1 260px;
      min-width:220px;
      display:grid;
      gap:10px;
    }
    .previousNotesGalleryQrUrl {
      font-size:12px;
      line-height:1.35;
      color:var(--muted);
      word-break:break-all;
    }

    @media (max-height: 820px){
      #workModal .bigTimer { font-size:clamp(106px, 10.4vw, 160px); }
      #workModal #workActiveStageLine { font-size:clamp(24px, 2.6vw, 34px); }
      #workModal #workCancel,
      #workModal #workChecklist,
      #workModal #workFinish,
      #workModal #workHeaderActions button,
      #workModal #workPauseBtn,
      #workModal #workChangeStaffBtn,
      #workModal #workStageChecklistAddBtn { min-height:62px; font-size:18px; }
      #workModal .stageChecklistGrid { grid-auto-rows:62px; }
      #workModal .stageChecklistItem { min-height:62px; height:62px; }
      #workModal #workHistoryBtn,
      #workModal #workPlanPill,
      #workModal #workLeftPill { min-height:54px; font-size:16px; }
    }

    @media (min-width: 881px) and (max-height: 820px){
      #workModal { padding:10px; }
      #workModal .topbar { gap:8px; margin-bottom:10px; }
      #workModal #workInfoBlock,
      #workModal #workServiceBlock,
      #workModal #workHeaderActions {
        min-height:122px;
      }
      #workModal #workInfoBlock { padding:12px; grid-template-columns:122px minmax(0, 1fr); }
      #workModal #workPhotoCard { min-height:122px; }
      #workModal #workServiceBlock { padding:12px 14px 10px; }
      #workModal #workDogTitle { font-size:34px; }
      #workModal #workServiceTitle { font-size:24px; }
      #workModal #workServiceList {
        min-height:52px;
        margin-top:8px;
        padding:8px 10px;
        font-size:14px;
      }
      #workModal #workHeaderActions { gap:6px; padding:8px; }
      #workModal #workHeaderActions button,
      #workModal #workPauseBtn,
      #workModal #workChangeStaffBtn,
      #workModal #workStageChecklistAddBtn {
        min-height:48px;
        padding:10px 12px;
        font-size:16px;
      }
      #workModal .work { gap:8px; padding-bottom:8px; grid-template-rows:minmax(380px, 1fr) auto auto; }
      #workModal #workTimerStack { padding:12px 14px 10px; }
      #workModal .bigTimer { font-size:74px; }
      #workModal #workActiveStageLine { font-size:21px; }
      #workModal .workTimerRole { font-size:13px; }
      #workModal #workHistoryBtn,
      #workModal #workPlanPill,
      #workModal #workLeftPill {
        min-height:50px;
        padding:10px 14px;
        font-size:16px;
      }
      #workModal .stageChecklistGrid { grid-auto-rows:48px; }
      #workModal .stageChecklistItem { min-height:48px; height:48px; }
      #workModal #workAuxMeta { padding:8px 12px; gap:5px; }
      #workModal .work { grid-template-rows:minmax(380px, 1fr) auto auto; }
      #workModal #workTimerStack,
      #workModal #workStageChecklistPanel { min-height:380px; }
      #workModal #workBottomActions { gap:6px; grid-template-columns:repeat(2, minmax(0, 1fr)); }
      #workModal #workCancel,
      #workModal #workChecklist,
      #workModal #workFinish {
        min-height:58px;
        padding:12px 14px;
        font-size:17px;
      }
    }

    @media (max-width: 1180px){
      #workModal .topbar { grid-template-columns:1fr 1fr; }
      #workModal #workServiceBlock { grid-column:1 / -1; }
      #workModal #workHeaderActions { grid-column:1 / -1; grid-template-columns:repeat(2, minmax(0, 1fr)); }
      #workModal #workHeaderActions button,
      #workModal #workHeaderActions .pill { min-height:54px; }
    }

    @media (max-width: 880px){
      #workModal { padding:10px; }
      #workModal .topbar {
        grid-template-columns:minmax(0, 1fr);
        gap:8px;
        margin-bottom:8px;
      }
      #workModal #workInfoBlock {
        min-height:108px;
        grid-template-columns:108px minmax(0, 1fr);
      }
      #workModal #workPhotoCard {
        min-height:108px;
        max-height:138px;
      }
      #workModal #workServiceBlock {
        grid-column:1 / -1;
        min-height:auto;
        padding:10px 12px;
      }
      #workModal #workDogTitle { font-size:28px; }
      #workModal #workServiceTitle { font-size:22px; }
      #workModal #workServiceList {
        min-height:0;
        margin-top:8px;
        padding:8px 10px;
        font-size:13px;
      }
      #workModal #workServiceMeta { margin-top:6px; font-size:11px; }
      #workModal #workHeaderActions {
        grid-column:1 / -1;
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap:6px;
        padding:8px;
      }
      #workModal #workHeaderActions button,
      #workModal #workPauseBtn,
      #workModal #workChangeStaffBtn,
      #workModal #workStageChecklistAddBtn {
        min-height:42px;
        padding:8px 10px;
        font-size:13px;
      }
      #workModal .stageChecklistGrid { grid-template-columns:repeat(3, minmax(0, 1fr)); grid-auto-rows:42px; }
      #workModal .stageChecklistItem { min-height:42px; height:42px; width:100%; }
      #workModal .work { gap:10px; padding-right:0; padding-bottom:10px; }
      #workModal .workTimersRow { grid-template-columns:1fr; gap:10px; }
      #workModal .workTimerCardMain,
      #workModal #workExtraTimerBox { grid-column:auto !important; max-width:none !important; }
      #workModal #workTimerStack { padding:14px 12px; }
      #workModal .bigTimer { font-size:64px; }
      #workModal #workActiveStageLine { font-size:21px; }
      #workModal .workTimerRole { font-size:13px; }
      #workModal #workHistoryBtn,
      #workModal #workPlanPill,
      #workModal #workLeftPill {
        min-height:44px;
        padding:10px 12px;
        font-size:14px;
      }
      #workModal #workAuxMeta { padding:10px 12px; gap:6px; }
      #workModal #workBottomActions {
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap:6px;
        padding:8px 0 calc(env(safe-area-inset-bottom, 0px) + 4px);
      }
      #workModal #workCancel,
      #workModal #workChecklist,
      #workModal #workFinish {
        min-height:52px;
        padding:10px 8px;
        font-size:14px;
      }
    }

    @media (max-width: 620px){
      #workModal .topbar { grid-template-columns:1fr; }
      #workModal #workHeaderActions { grid-template-columns:1fr; }
      #workModal #workCommentsRow { grid-template-columns:1fr; }
      #workModal #workMetricsRow { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); }
      #workModal #workBottomActions { grid-template-columns:1fr; }
      #workModal .bigTimer { font-size:78px; }
      .summarySplit { grid-template-columns:1fr; }
    }

    @media (orientation: landscape) and (max-height: 620px){
      #workModal { padding:8px; }
      #workModal .topbar {
        grid-template-columns:minmax(240px, 1fr) minmax(180px, 1fr) minmax(220px, 1.18fr);
        gap:8px;
        margin-bottom:8px;
      }
      #workModal #workInfoBlock,
      #workModal #workServiceBlock {
        min-height:104px;
      }
      #workModal .work { grid-template-rows:minmax(340px, 1fr) auto auto; }
      #workModal #workTimerStack,
      #workModal #workStageChecklistPanel { min-height:340px; }
      #workModal .stageChecklistGrid { grid-template-columns:repeat(3, minmax(0, 1fr)); grid-auto-rows:42px; }
      #workModal .stageChecklistItem { min-height:42px; height:42px; width:100%; }
      #workModal #workInfoBlock { padding:10px 12px; grid-template-columns:104px minmax(0, 1fr); }
      #workModal #workPhotoCard {
        min-height:104px;
        max-height:122px;
      }
      #workModal #workDogTitle { font-size:24px; }
      #workModal #workServiceBlock {
        grid-column:auto;
        padding:10px 12px;
      }
      #workModal #workServiceTitle { font-size:20px; }
      #workModal #workServiceList {
        min-height:42px;
        margin-top:6px;
        padding:8px 10px;
        font-size:13px;
      }
      #workModal #workServiceMeta { margin-top:6px; font-size:11px; }
      #workModal #workHeaderActions {
        grid-column:1 / -1;
        grid-template-columns:repeat(3, minmax(0, 1fr));
        gap:6px;
        padding:0;
        min-height:auto;
        border:none;
        background:transparent;
        box-shadow:none;
      }
      #workModal #workHeaderActions button,
      #workModal #workPauseBtn,
      #workModal #workChangeStaffBtn,
      #workModal #workStageChecklistAddBtn {
        min-height:40px;
        padding:8px 10px;
        font-size:12px;
        border-radius:14px;
      }
      #workModal .stageChecklistGrid { grid-template-columns:repeat(3, minmax(0, 1fr)); grid-auto-rows:40px; }
      #workModal .stageChecklistItem { min-height:40px; height:40px; width:100%; }
      #workModal .work { gap:6px; padding-bottom:6px; grid-template-rows:minmax(320px, 1fr) auto auto; }
      #workModal #workTimerStack { padding:10px 12px 8px; }
      #workModal .workTimersRow { gap:8px; }
      #workModal .bigTimer { font-size:60px; }
      #workModal #workActiveStageLine { font-size:18px; }
      #workModal .workTimerRole { font-size:12px; }
      #workModal #workHistoryBtn,
      #workModal #workPlanPill,
      #workModal #workLeftPill {
        min-height:46px;
        padding:10px 12px;
        font-size:13px;
      }
      #workModal #workAuxMeta { padding:8px 10px; gap:4px; }
      #workModal #workTimerStack,
      #workModal #workStageChecklistPanel { min-height:320px; }
      #workModal #workBottomActions {
        gap:6px;
        padding:0;
        grid-template-columns:repeat(2, minmax(0, 1fr));
      }
      #workModal #workCancel,
      #workModal #workChecklist,
      #workModal #workFinish {
        min-height:46px;
        padding:8px 6px;
        font-size:13px;
      }

      #stageReviewOverlay .card {
        padding:8px;
        overflow:hidden;
      }
      #stageReviewOverlay .topbar {
        margin-bottom:6px;
        padding-right:0;
        grid-template-columns:minmax(0, 1fr) auto auto;
      }
      #stageReviewTitle {
        margin-top:2px !important;
        font-size:24px;
        line-height:1;
      }
      #stageReviewSub {
        font-size:11px;
        line-height:1.15;
      }
      #stageReviewLayout {
        min-height:calc(100dvh - 16px);
        gap:6px;
      }
      #stageReviewSummary {
        font-size:12px;
        line-height:1.2;
      }
      #stageReviewContent {
        grid-template-columns:1fr;
        gap:8px;
        overflow:hidden;
      }
      #stageReviewSidebar { overflow:visible; }
      #stageReviewChecklistHost {
        overflow:auto;
        padding-right:4px;
        padding-bottom:4px;
      }
      #stageReviewChecklistHost .checklistCard {
        padding:10px !important;
      }
      #stageReviewChecklistHost .checklistCard h3 {
        font-size:16px;
      }
      #stageReviewChecklistHost .choiceWrap {
        padding:8px;
        border-radius:14px;
      }
      #stageReviewChecklistHost .choiceTitle {
        font-size:12px;
      }
      #stageReviewChecklistHost .tileGrid {
        gap:6px;
      }
      #stageReviewChecklistHost .checklistSchemaHead {
        font-size:12px;
      }
      #stageReviewChecklistHost .checklistSchemaSections {
        gap:8px;
      }
      #stageReviewChecklistHost .checklistSchemaLabel {
        font-size:10px;
      }
      #stageReviewChecklistHost .tileBtn,
      #stageReviewChecklistHost .choiceBtn {
        min-height:40px;
        padding:8px 6px;
        font-size:26px;
        line-height:1.05;
        border-radius:12px;
      }
      #stageReviewBehaviorCard {
        padding:10px !important;
        gap:8px;
      }
      #stageReviewBehaviorCard h3,
      #stageReviewNoteCard h3 {
        font-size:18px;
      }
      #stageReviewBehaviorSelect {
        min-height:52px;
        padding:10px 12px;
        font-size:15px;
        border-radius:14px;
      }
      #stageReviewBehaviorPreview {
        font-size:12px;
      }
      #stageReviewNoteWrap {
        min-height:96px;
        gap:8px;
      }
      #stageReviewNote {
        min-height:72px;
      }
      #stageReviewActions {
        position:static;
        padding:0;
        justify-content:flex-end;
        align-items:center;
      }
      #stageReviewClose {
        min-height:40px;
        padding:8px 12px;
        font-size:14px;
      }
      #stageReviewConfirm {
        width:auto;
        max-width:100%;
        min-width:220px;
        min-height:46px;
        padding:10px 14px;
        font-size:15px;
        flex:0 0 auto;
      }
    }

    .stageReviewBathBlock {
      display:flex;
      flex-direction:column;
      justify-content:flex-start;
      gap:10px;
      min-height:0;
      overflow:hidden;
    }
    .stageReviewBathBlockTitle {
      font-size:12px;
      text-transform:uppercase;
      letter-spacing:.08em;
      color:var(--muted);
    }
    .stageReviewBathOptionGrid {
      flex:1 1 auto;
      align-content:start;
      margin-top:2px;
    }
    .stageReviewBathOptionGrid.oneCol { grid-template-columns:1fr; }
    .stageReviewBathOptionGrid.twoCols { grid-template-columns:repeat(2, minmax(0, 1fr)); }

    @media (orientation: landscape) and (min-width: 1000px){
      #stageReviewOverlay[data-stage-code="bath"] .card {
        padding:12px;
      }
      #stageReviewOverlay[data-stage-code="bath"] .topbar {
        margin-bottom:8px;
        min-height:60px;
        align-items:center;
      }
      #stageReviewOverlay[data-stage-code="bath"] #stageReviewLayout {
        min-height:calc(100dvh - 24px);
        gap:8px;
      }
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewContent {
        display:grid;
        grid-template-columns:repeat(4, minmax(0, 1fr));
        gap:8px;
        min-height:0;
        overflow:auto;
        align-items:start;
      }
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewSummary {
        display:none;
      }
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewChecklistHost,
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewSidebar {
        display:contents;
      }
      #stageReviewOverlay[data-stage-layout="grid"][data-mode="active"] #stageReviewSidebar {
        display:none;
      }
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewBehaviorCard,
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewNoteCard {
        align-self:start;
        min-height:0;
        height:auto !important;
        padding:10px !important;
        gap:8px;
      }
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewBehaviorCard { order:1; }
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewNoteCard { order:2; }
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewBehaviorCard h3,
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewNoteCard h3 {
        font-size:16px;
        line-height:1.05;
      }
      #stageReviewOverlay[data-stage-layout="grid"] #finishReviewSub {
        display:none;
      }
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewBehaviorSelect,
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewNoteSelect {
        min-height:42px;
        padding:8px 10px;
        font-size:14px;
        border-radius:12px;
      }
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewBehaviorChosen,
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewNoteChosen {
        gap:6px;
      }
      #stageReviewOverlay[data-stage-layout="grid"] .stageReviewBehaviorChip {
        min-height:32px;
        padding:6px 8px;
        border-radius:12px;
        font-size:12px;
        gap:6px;
      }
      #stageReviewOverlay[data-stage-layout="grid"] .stageReviewBehaviorChipEmoji {
        min-width:18px;
        font-size:18px;
      }
      #stageReviewOverlay[data-stage-layout="grid"] .stageReviewBehaviorChip button {
        height:22px;
        min-width:22px;
        font-size:12px;
      }
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewBehaviorPreview,
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewNotePreview,
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewNoteErr {
        display:none;
      }
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewCustomNoteBtn {
        min-height:34px;
        padding:6px 10px;
        font-size:13px;
      }
      #stageReviewOverlay[data-stage-layout="grid"] .stageReviewBathBlock {
        height:auto;
        min-height:0;
        margin:0;
      }
      #stageReviewOverlay[data-stage-layout="grid"] .stageReviewBathBlock { order:3; }
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewActions {
        position:static;
        top:auto;
        left:auto;
        right:auto;
        transform:none;
        z-index:auto;
        padding:0;
        background:transparent;
        border:none;
        justify-content:flex-end;
        flex-wrap:wrap;
      }
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewConfirm {
        min-width:320px;
        min-height:52px;
        padding:10px 20px;
        font-size:18px;
        border-radius:18px;
      }
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewBehaviorNotesBtn {
        min-height:44px;
        padding:8px 14px;
        font-size:15px;
        border-radius:18px;
      }
      #stageReviewOverlay[data-stage-layout="grid"] #stageReviewClose {
        min-height:50px;
        padding:10px 18px;
        font-size:17px;
      }
      #stageReviewOverlay[data-stage-layout="grid"] .stageReviewBathBlock {
        padding:8px;
        border-radius:18px;
        border:1px solid var(--border);
        background:rgba(255,255,255,.03);
      }
      #stageReviewOverlay[data-stage-layout="grid"] .stageReviewBathBlockTitle {
        font-size:15px;
        line-height:1.05;
        margin-bottom:6px;
      }
      #stageReviewOverlay[data-stage-layout="grid"] .stageReviewBathBlock .tileBtn,
      #stageReviewOverlay[data-stage-layout="grid"] .stageReviewBathBlock .choiceBtn {
        min-height:42px;
        padding:8px 8px;
        font-size:14px;
        border-radius:13px;
        line-height:1.06;
      }
      #stageReviewOverlay[data-stage-layout="grid"] .stageReviewBathBlock.doubleWide {
        grid-column:span 2;
      }
      #stageReviewOverlay[data-stage-layout="grid"] .stageReviewBathOptionGrid.stageChecklistExpanded {
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap:8px;
      }
    }

    #waitingStatusOptions { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; margin-top:14px; }
    #waitingStatusOptions button { min-height:72px; font-size:18px; border-radius:18px; }
    .waitingAppShell { display:grid; gap:16px; }
    .waitingAppHeader {
      display:grid;
      grid-template-columns:minmax(0, 1fr) auto;
      gap:14px;
      align-items:center;
    }
    .waitingAppStats { display:flex; flex-wrap:wrap; gap:10px; margin-top:10px; }
    .waitingAppStat {
      padding:10px 14px;
      border-radius:999px;
      border:1px solid rgba(255,255,255,.10);
      background:rgba(255,255,255,.04);
      font-weight:850;
    }
    .waitingAppActions { display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-end; }
    .waitingBoard { display:grid; grid-template-columns:1.15fr .85fr; gap:16px; }
    .waitingPanel { display:flex; flex-direction:column; gap:12px; }
    .waitingPanelList { display:grid; gap:12px; }
    .waitingAppCard {
      display:grid;
      grid-template-columns:88px minmax(0, 1fr);
      gap:14px;
      align-items:start;
      padding:14px;
      border-radius:22px;
      border:1px solid rgba(255,255,255,.09);
      background:rgba(255,255,255,.03);
    }
    .waitingAppCard.active { border-color: rgba(77,227,161,.24); background: rgba(77,227,161,.07); }
    .waitingAppPhoto {
      width:88px;
      height:88px;
      border-radius:18px;
      overflow:hidden;
      background:rgba(255,255,255,.06);
      display:flex;
      align-items:center;
      justify-content:center;
      font-weight:950;
      color:rgba(234,244,242,.88);
    }
    .waitingAppPhoto img { width:100%; height:100%; object-fit:cover; display:block; }
    .waitingAppTop { display:flex; gap:10px; justify-content:space-between; align-items:flex-start; }
    .waitingAppName { font-size:22px; font-weight:950; line-height:1.05; }
    .waitingAppStatus {
      display:inline-flex;
      align-items:center;
      gap:6px;
      padding:7px 10px;
      border-radius:999px;
      background:rgba(255,255,255,.06);
      border:1px solid rgba(255,255,255,.09);
      font-size:13px;
      font-weight:850;
      text-transform:none;
      white-space:nowrap;
    }
    .waitingAppTimer {
      display:inline-flex;
      align-items:center;
      justify-content:center;
      min-width:84px;
      padding:10px 12px;
      border-radius:16px;
      background:rgba(8,20,24,.55);
      border:1px solid rgba(77,227,161,.22);
      font-size:24px;
      font-weight:950;
    }
    .waitingAppMeta { margin-top:8px; }
    .waitingAppCodes { margin-top:10px; }
    .waitingAppButtons { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
    .waitingAppButtons button { min-height:48px; }
    .waitingAppButtons.waitingModes { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); }
    .waitingFamilyList { display:grid; gap:10px; margin-top:14px; }
    .waitingFamilyDog {
      display:flex;
      flex-wrap:wrap;
      gap:10px;
      align-items:center;
      justify-content:space-between;
      padding:10px 12px;
      border-radius:16px;
      background:rgba(8,20,24,.35);
      border:1px solid rgba(255,255,255,.06);
    }
    .waitingFamilyDogMain { min-width:0; }
    .waitingFamilyDogName { font-weight:900; }
    .waitingFamilyDogActions { display:flex; flex-wrap:wrap; gap:8px; }
    .waitingAppEmpty {
      padding:20px;
      border-radius:20px;
      border:1px dashed rgba(255,255,255,.10);
      background:rgba(255,255,255,.02);
    }

    /* Waiting v2 — pixel-tuned portrait layout for Fire tablets */
    #waitingAppPage.wrap{
      padding:0;
      height:100svh;
      overflow:hidden;
      grid-template-columns: 1fr;
      gap:12px;
    }
    .waitingV2Shell{
      height:100%;
      display:flex;
      flex-direction:column;
      gap:0;
      min-height:0;
    }
    .waitingV2Header{
      display:flex;
      justify-content:space-between;
      align-items:flex-start;
      gap:12px;
    }
    .waitingV2Actions{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }

    .waitingV2Tabs{
      display:grid;
      grid-template-columns:repeat(4, minmax(0, 1fr));
      gap:8px;
    }
    .waitingV2Tabs button{
      min-height:52px;
      padding:10px 10px;
      font-size:16px;
      border-radius:14px;
      font-weight:900;
      text-transform:none;
      line-height:1.05;
    }
    .waitingV2TabsCompact button{ min-height:56px; font-size:16px; }
    .waitingV2Tabs button.active{
      border-color: rgba(160,106,46,.42);
      background: rgba(160,106,46,.20);
    }

    .waitingV2List{
      flex:1 1 auto;
      min-height:0;
      overflow:auto;
      display:grid;
      grid-template-columns: 1fr;
      grid-auto-rows: max-content;
      align-content:start; /* prevent rows stretching to fill height (big gaps when few dogs) */
      gap:2px;
      padding:6px;
      padding-bottom:120px; /* leave space for fixed Add Dog */
      justify-items:start; /* keep cards compact (not full width) */
    }

    .waitingV2Card{
      --waitPhoto:120px;
      --waitSide:176px;
      display:grid;
      grid-template-columns:var(--waitPhoto) minmax(0, 1fr);
      gap:12px;
      align-items:stretch;
      padding:5px;
      width:100%;
      height:130px;
      overflow:hidden;
      border-radius:22px;
      border:1px solid rgba(255,255,255,.09);
      background:rgba(255,255,255,.03);
      box-shadow: none;
    }
    .waitingV2Body{ height:100%; display:flex; flex-direction:column; justify-content:center; }
    .waitingV2Photo{
      width:var(--waitPhoto);
      height:var(--waitPhoto);
      border-radius:18px;
      overflow:hidden;
      background:rgba(255,255,255,.06);
      display:flex;
      align-items:center;
      justify-content:center;
      font-weight:950;
      color:rgba(234,244,242,.88);
    }
    .waitingV2Photo img{ width:100%; height:100%; object-fit:cover; display:block; }
    .waitingV2Top{ display:flex; gap:10px; justify-content:space-between; align-items:flex-start; }
    .waitingV2TopGrid{ height:100%; display:grid; grid-template-columns:minmax(0, 1fr) var(--waitSide); gap:10px; align-items:center; }
    .waitingV2Side{ width:var(--waitSide); display:flex; flex-direction:column; justify-content:center; align-items:center; gap:4px; }
    .waitingV2Side .waitingV2Timer,
    .waitingV2Side .waitingV2Badge{ width:100%; justify-content:center; }
    .waitingV2BadgeRow{ width:100%; display:flex; align-items:center; justify-content:center; gap:8px; }
    .waitingV2BadgeRow .waitingV2Badge{ width:auto; flex:1 1 auto; }
    .waitingV2StaffDot{
      width:96px;
      height:96px;
      border-radius:999px;
      overflow:hidden;
      border:1px solid rgba(255,255,255,.12);
      background:rgba(255,255,255,.06);
      display:flex;
      align-items:center;
      justify-content:center;
      color:#fff;
      font-size:13px;
      font-weight:950;
      flex:0 0 auto;
    }
    .waitingV2StaffDot img{ width:100%; height:100%; object-fit:cover; display:block; }
    /* Codes: make a fixed 4-col grid so the block is perfectly centered under status */
    .waitingV2Side .waitingV2Codes{
      width:100%;
      margin-top:0;
      display:grid;
      grid-template-columns:repeat(4, 30px);
      justify-content:center;
      gap:6px;
    }
    .waitingV2Name{ font-size:32px; font-weight:950; line-height:1.02; letter-spacing:-.2px; }
    .waitingV2Service{ margin-top:6px; font-size:18px; color:rgba(156,190,184,.92); line-height:1.2; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
    .waitingV2Timer{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      width:100%;
      height:36px;
      padding:0 12px;
      border-radius:12px;
      background:rgba(8,20,24,.55);
      border:1px solid rgba(77,227,161,.22);
      font-size:28px;
      font-weight:950;
      white-space:nowrap;
    }
    .waitingV2Status{ margin-top:8px; display:inline-flex; gap:8px; flex-wrap:wrap; }
    .waitingV2Badge{
      display:inline-flex;
      align-items:center;
      gap:6px;
      min-height:36px;
      padding:8px 12px;
      border-radius:999px;
      border:1px solid rgba(255,255,255,.10);
      background:rgba(255,255,255,.04);
      font-size:20px;
      font-weight:900;
      color:rgba(242,247,246,.96);
      text-transform:none;
      white-space:nowrap;
    }
    .waitingV2Badge.status{ background: rgba(134,185,174,.10); border-color: rgba(134,185,174,.28); color: rgba(234,244,242,.92); }
    .waitingV2Badge.color_bath { background: rgba(88,167,255,.22); border-color: rgba(88,167,255,.44); color: #e6f2ff; }
    .waitingV2Badge.color_nails { background: rgba(255,214,102,.20); border-color: rgba(255,214,102,.42); color: #fff6de; }
    .waitingV2Badge.color_grooming { background: rgba(255,0,183,.20); border-color: rgba(255,0,183,.42); color: #ffe0f6; }
    .waitingV2Badge.color_dry { background: rgba(20,60,120,.34); border-color: rgba(173,206,244,.26); color: rgba(234,244,242,.96); }
    .waitingV2Badge.color_pickup { background: rgba(109,231,163,.18); border-color: rgba(109,231,163,.55); color: rgba(222,255,235,.98); }

    .waitingV2Codes{ margin-top:10px; }
    .waitingV2Codes{ display:flex; flex-wrap:wrap; gap:6px; }
    .waitingV2Codes .codeBadge{ transform: scale(1.06); transform-origin: left center; flex:0 0 auto; }
    .waitingV2Codes.oneLine{
      flex-wrap:nowrap;
      overflow-x:auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width:none;
      padding-bottom:2px;
    }
    .waitingV2Codes.oneLine::-webkit-scrollbar{ display:none; }
    #waitingAppPage .waitingDogNameRow{
      display:grid;
      grid-template-columns:minmax(0, 1fr) auto;
      align-items:center;
      gap:10px;
      margin-top:6px;
    }
    #waitingAppPage .waitingDogNameRow .waitingV2Codes{
      max-width:240px;
    }
    #waitingAppPage .waitingV2Codes .codeBadge{
      width:30px;
      height:30px;
      border-radius:10px;
      font-size:18px;
      margin-right:0;
    }

    /* Bigger icons inside the waiting dog pick popup */
    #waitingDogPickOverlay .codeBadge{
      width:54px;
      height:54px;
      border-radius:16px;
      font-size:34px;
      margin-right:0;
    }

    /* Waiting colors (shared with TV) */
    :root{
      --wait-bath:#58a7ff;
      --wait-nails:#ffd666;
      --wait-grooming: var(--pink);
      --wait-pickup:#6de7a3;
    }
    .waitBtn{
      border-width:2px !important;
      font-weight:950;
      letter-spacing:.2px;
    }
    .waitBtn--bath{ background:rgba(88,167,255,.18) !important; border-color:rgba(88,167,255,.55) !important; color:#e6f2ff !important; }
    .waitBtn--nails{ background:rgba(255,214,102,.18) !important; border-color:rgba(255,214,102,.55) !important; color:#fff5d1 !important; }
    .waitBtn--grooming{ background:rgba(255,0,183,.18) !important; border-color:rgba(255,0,183,.55) !important; color:#ffe0f6 !important; }
    .waitBtn--pickup{ background:rgba(109,231,163,.18) !important; border-color:rgba(109,231,163,.55) !important; color:#e5fff0 !important; }

    .waitingStatusBar{
      width:100%;
      display:flex;
      align-items:center;
      justify-content:center;
      border-radius:28px;
      padding:18px 18px;
      border:3px solid rgba(255,255,255,.14);
      background:rgba(255,255,255,.06);
      text-transform:uppercase;
      letter-spacing:.04em;
    }
    .waitingStatusBar--bath{ background:rgba(88,167,255,.22); border-color:rgba(88,167,255,.60); color:#e6f2ff; }
    .waitingStatusBar--nails{ background:rgba(255,214,102,.22); border-color:rgba(255,214,102,.60); color:#fff5d1; }
    .waitingStatusBar--grooming{ background:rgba(255,0,183,.22); border-color:rgba(255,0,183,.60); color:#ffe0f6; }
    .waitingStatusBar--pickup{ background:rgba(109,231,163,.22); border-color:rgba(109,231,163,.60); color:#e5fff0; }

    .waitingV2AddDog{
      position:fixed;
      left:16px;
      right:16px;
      bottom:16px;
      height:88px;
      border-radius:16px;
      font-size:28px;
      font-weight:950;
      z-index: 25000;
      box-shadow: var(--shadow);
    }

    .waitingAddList{ display:grid; gap:10px; }
    .waitingAddRow{
      display:flex;
      gap:12px;
      align-items:center;
      justify-content:space-between;
      padding:10px 12px;
      border-radius:16px;
      border:1px solid rgba(255,255,255,.08);
      background:rgba(255,255,255,.02);
      cursor:pointer;
      user-select:none;
    }
    .waitingAddRow:active{ transform: scale(.99); }
    .waitingAddRowMain{ min-width:0; }
    .waitingAddRowName{ font-weight:950; }
    .waitingAddRowMeta{ margin-top:4px; }
    .waitingAddRowRight{ display:flex; align-items:center; gap:8px; }
    .waitingAddRowWaiting{ border-color: rgba(77,227,161,.22); background: rgba(77,227,161,.06); }
    .waitingAddRowWaiting .waitingV2Badge{ border-color: rgba(77,227,161,.22); }

    @media (max-width: 1100px){
      .waitingBoard { grid-template-columns:1fr; }
    }
    @media (max-width: 700px){
      #waitingStatusOptions { grid-template-columns:1fr; }
      .waitingAppHeader { grid-template-columns:1fr; }
      .waitingAppActions { justify-content:flex-start; }
      .waitingAppCard { grid-template-columns:1fr; }
      .waitingAppPhoto { width:100%; max-width:160px; height:160px; }
      .waitingAppButtons.waitingModes { grid-template-columns:1fr; }
    }
