/* Phone mode (data-phone="on"): today. Every rule here is prefixed :root[data-phone="on"] so nothing leaks to desktop. */

/* ── Page frame: the list first, "Not on the roster?" actions after it ─────── */
:root[data-phone="on"] .today-page {
    padding: 0.75rem;
}

:root[data-phone="on"] .today-container {
    display: flex;
    flex-direction: column;
}

/* The walk-in form is a <form> since 2026-10-04 (taps#17: Enter saves). It is named by element
   because the day-closed receipt, which stays at the top, is a .today-add too. */
:root[data-phone="on"] .today-container > .today-action-row,
:root[data-phone="on"] .today-container > form.today-add,
:root[data-phone="on"] .today-container > .today-import,
:root[data-phone="on"] .today-container > .today-import-receipt {
    order: 1;
}

/* The register, hazards and end-of-day panels. They live in .today-side since the
   desktop refresh (2026-09-24); that wrapper is display: contents, so they are still this
   flex column's items, reached through it rather than as the container's children. */
:root[data-phone="on"] .today-side > section.today-add,
:root[data-phone="on"] .today-side > .today-eod {
    order: 2;
}

/* The day-closed receipt stays at the top, where it is a status, not a tool. */
:root[data-phone="on"] .today-container > section.today-add[role="status"] {
    order: 0;
}

/* ── Header: the date is the heading, arrows beside it, counts in the eyebrow ─ */
:root[data-phone="on"] .today-header {
    position: relative;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.6rem;
    margin-bottom: 0;
}

:root[data-phone="on"] .today-header-left {
    gap: 0.2rem;
}

:root[data-phone="on"] .today-kicker {
    font-family: var(--ed-ui);
    letter-spacing: 0.14em;
}

:root[data-phone="on"] .today-title {
    font-style: normal;
    font-weight: 600;
    font-size: 1.6rem;
    letter-spacing: 0;
}

:root[data-phone="on"] .today-counter {
    display: none;
}

:root[data-phone="on"] .today-header-right {
    flex-direction: column;
    align-items: flex-end;
    flex-wrap: nowrap;
    gap: 0.1rem;
    flex: none;
}

:root[data-phone="on"] .today-date-nav {
    position: static;
    border: none;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    gap: 0.4rem;
}

/* The ISO field becomes a tap on the heading: the native input is stretched,
   invisible, over the heading side of the header. Still focusable and labelled. */
:root[data-phone="on"] .today-date-input {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 6.5rem;
    width: auto;
    height: 100%;
    min-height: 44px;
    opacity: 0;
    padding: 0;
    border: none;
}

:root[data-phone="on"] .today-date-arrow {
    width: 44px;
    height: 44px;
    border: 1px solid var(--ed-hairline-strong);
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    line-height: 1;
}

/* ── Swipe area ────────────────────────────────────────────────────────────── */
:root[data-phone="on"] .today-swipe {
    touch-action: pan-y;
    min-height: 8rem;
}

:root[data-phone="on"] .today-swipe-hint {
    display: block;
    margin: 0.6rem 0 0;
    text-align: center;
    font-family: var(--ed-ui);
    font-size: max(0.78rem, var(--ed-fs-floor, 0rem));
    color: var(--ed-ink-soft);
}

/* ── Rows: one line — time, who, Start — with the row tools beside it ──────── */
:root[data-phone="on"] .today-row {
    grid-template-columns: 2.9rem minmax(0, 1fr) auto;
    grid-template-areas: "time main actions";
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0.25rem;
}

:root[data-phone="on"] .today-row-time {
    grid-area: time;
}

:root[data-phone="on"] .today-row-dot {
    display: none;
}

:root[data-phone="on"] .today-row-time-text {
    font-size: max(0.82rem, var(--ed-fs-floor, 0rem));
}

:root[data-phone="on"] .today-row-main {
    grid-area: main;
    /* "Montgomery" in a 65px column spilled under the row's button (phone#3). */
    overflow-wrap: anywhere;
}

:root[data-phone="on"] .today-row-headline {
    font-size: 1.05rem;
}

:root[data-phone="on"] .today-row-signal,
:root[data-phone="on"] .today-row-sub {
    font-size: max(0.8rem, var(--ed-fs-floor, 0rem));
}

:root[data-phone="on"] .today-row-actions {
    grid-area: actions;
    gap: 0.25rem;
    justify-content: flex-end;
}

:root[data-phone="on"] .today-row-actions .ed-pill {
    min-height: 44px;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    white-space: nowrap;
}

:root[data-phone="on"] .today-row-delete,
:root[data-phone="on"] .today-row-menu summary {
    width: 40px;
    height: 44px;
    border-color: transparent;
}

/* The current consult: eucalypt stripe on a shaded row. */
:root[data-phone="on"] .today-row--in-progress {
    background: var(--ed-paper-deep);
    box-shadow: inset 3px 0 0 var(--ed-eucalypt);
    padding-left: 0.6rem;
}

/* Seen rows go quiet: their button stops competing with the unseen Starts. */
:root[data-phone="on"] .today-row--done .today-row-actions .ed-pill,
:root[data-phone="on"] .today-row--no-show .today-row-actions .ed-pill {
    background: transparent;
    border-color: var(--ed-hairline-strong);
    color: var(--ed-ink-soft);
}

/* ── "Not on the roster?" ──────────────────────────────────────────────────── */
:root[data-phone="on"] .today-action-row {
    margin: 1.25rem 0 0.75rem;
    gap: 0.5rem;
}

:root[data-phone="on"] .today-action-heading {
    display: block;
    flex: 0 0 100%;
    font-family: var(--ed-ui);
    font-size: max(0.72rem, var(--ed-fs-floor, 0rem));
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ed-ink-soft);
}

:root[data-phone="on"] .today-action-row .ed-pill {
    flex: 1 1 0;
    min-height: 44px;
    justify-content: center;
    text-align: center;
}

:root[data-phone="on"] .today-camera svg {
    vertical-align: -0.18em;
}

/* ── Browser pass, 2026-09-19 ────────────────────────────────────────────────
   The "Working on" card repeats the masthead chip, which in phone mode already
   carries the name AND the signalment; here it cost a fifth of the first screen
   above the roster. The chip's own menu still opens the case. */
:root[data-phone="on"] .today-active-case {
    display: none;
}

/* An upcoming row's status word says nothing its Start button does not; on a
   375px row it was a fourth line. Every other status keeps its word. */
:root[data-phone="on"] .today-row--upcoming .today-row-status-line {
    display: none;
}
