#red-writing-workspace .phone-navigation {display:none}
#red-writing-workspace.phone-workspace {--phone-nav-space:calc(68px + env(safe-area-inset-bottom));--phone-bottom-space:var(--phone-nav-space);}
#red-writing-workspace.phone-workspace #red-app {padding-bottom:var(--phone-nav-space)}
#red-writing-workspace.phone-workspace .phone-navigation {position:fixed;z-index:95;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:5px max(8px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));border-top:1px solid var(--red-line);background:var(--red-paper);box-shadow:0 -3px 18px var(--red-shadow)}
#red-writing-workspace .phone-navigation button {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:56px;padding:5px 2px;border:0;border-radius:14px;background:transparent;color:var(--red-muted);font:600 11px/1.2 RedDeskSans,system-ui,sans-serif;cursor:pointer}
#red-writing-workspace .phone-navigation button[aria-current=page],#red-writing-workspace .phone-navigation button[aria-expanded=true] {color:var(--red-accent);background:var(--red-accent-soft)}
#red-writing-workspace .phone-navigation svg {width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#red-writing-workspace .phone-navigation .red-navigation-icon {padding:0;color:inherit;display:flex}
#red-writing-workspace.phone-workspace .red-topbar {gap:7px;padding:6px max(12px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left));min-height:60px}
#red-writing-workspace.phone-workspace .red-brand-copy,#red-writing-workspace.phone-workspace .red-navigation-divider {display:none}
#red-writing-workspace.phone-workspace .red-navigation-trigger {max-width:45vw;white-space:normal;text-align:left;font-size:13px;gap:6px;padding:7px}
#red-writing-workspace.phone-workspace .red-top-actions {gap:2px}
#red-writing-workspace.phone-workspace .red-save-state {display:none}
#red-writing-workspace.phone-workspace .red-stepper {position:fixed;top:auto;bottom:calc(var(--phone-nav-space) + 8px);left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));width:auto;max-width:none;max-height:calc(var(--phone-viewport-height,100dvh) - var(--phone-nav-space) - 80px);grid-template-columns:repeat(2,minmax(0,1fr));padding:10px;border-radius:22px;overflow:auto}
#red-writing-workspace.phone-workspace .red-stepper .red-step {min-height:58px;padding:10px;align-items:center}
#red-writing-workspace.phone-workspace .red-navigation-copy small {display:none}
#red-writing-workspace.phone-workspace .red-navigation-copy strong {font-size:13px}
#red-writing-workspace.phone-workspace .red-toast,#red-writing-workspace.phone-workspace .desk-undo-notice {bottom:calc(var(--phone-nav-space) + 12px);max-width:calc(100vw - 24px)}
#red-writing-workspace.phone-workspace .red-toast{top:auto;height:fit-content;min-height:0;max-height:min(240px,35dvh)}
#red-writing-workspace.phone-workspace[data-phone-keyboard=open] {--phone-nav-space:0px}
#red-writing-workspace.phone-workspace[data-phone-keyboard=open] .phone-navigation {display:none}
#red-writing-workspace.phone-workspace.desk-focus .phone-navigation {display:none}
#red-writing-workspace.phone-workspace.desk-focus {--phone-nav-space:0px}
#red-writing-workspace.phone-workspace .red-capture-heading h1 {font-size:clamp(28px,8vw,36px);line-height:1.1}
#red-writing-workspace.phone-workspace .red-mobile-capture {padding:18px max(14px,env(safe-area-inset-right)) 24px max(14px,env(safe-area-inset-left));min-height:calc(100dvh - 60px - var(--phone-nav-space))}
#red-writing-workspace.phone-workspace .red-capture-shell {grid-template-columns:1fr}
#red-writing-workspace.phone-workspace .red-capture-heading p {font-size:14px}
#red-writing-workspace.phone-workspace .red-capture-card {padding:20px 16px}
#red-writing-workspace.phone-workspace .red-capture-heading {margin-bottom:16px}
#red-writing-workspace.phone-workspace .red-capture-text {min-height:130px;font-size:19px}
#red-writing-workspace.phone-workspace .red-capture-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#red-writing-workspace.phone-workspace .red-capture-save {grid-column:1/-1;width:100%;margin:0}
#red-writing-workspace .phone-capture-saved {margin-top:20px;padding:16px;border:1px solid var(--red-line);border-radius:16px;background:var(--red-panel);font:14px/1.5 RedDeskSans,system-ui,sans-serif}
#red-writing-workspace .phone-capture-saved[hidden] {display:none}
#red-writing-workspace .phone-capture-saved p {margin:6px 0 12px;color:var(--red-ink);overflow-wrap:anywhere}
#red-writing-workspace .phone-capture-saved > div {display:flex;gap:8px;flex-wrap:wrap}
#red-writing-workspace .phone-capture-saved button,#red-writing-workspace .phone-draft-picker button {min-height:44px;padding:10px 14px;border:1px solid var(--red-line);border-radius:12px;color:var(--red-ink);background:var(--red-paper);font:600 14px/1.3 RedDeskSans,system-ui,sans-serif;cursor:pointer}
#red-writing-workspace .phone-draft-picker {width:min(540px,calc(100vw - 24px));max-height:calc(var(--phone-viewport-height,100dvh) - 32px);overflow:auto;padding:22px;border:1px solid var(--red-line);border-radius:22px;background:var(--red-paper);color:var(--red-ink);font:15px/1.5 RedDeskSans,system-ui,sans-serif;box-shadow:0 20px 80px var(--red-shadow)}
#red-writing-workspace .phone-draft-picker::backdrop {background:rgb(20 18 15 / .35);backdrop-filter:blur(5px)}
#red-writing-workspace .phone-draft-picker header {display:flex;align-items:center;gap:12px;justify-content:space-between}
#red-writing-workspace .phone-draft-picker h2 {font:600 25px/1.2 RedDeskBook,Georgia,serif;margin:0}
#red-writing-workspace .phone-draft-picker header button {flex:none;min-width:44px}
#red-writing-workspace .phone-draft-picker p {color:var(--red-muted);margin:14px 0}
#red-writing-workspace .phone-draft-picker label {display:block;font-weight:600;margin-bottom:7px}
#red-writing-workspace .phone-draft-picker input {width:100%;font:16px/1.5 RedDeskSans,system-ui,sans-serif;padding:12px;border:1px solid var(--red-line);border-radius:12px;background:var(--red-panel);color:var(--red-ink)}
#red-writing-workspace .phone-draft-picker [data-results] {display:grid;gap:8px;margin:14px 0}
#red-writing-workspace .phone-draft-picker [data-results] button {text-align:left;overflow-wrap:anywhere;min-height:52px}
@media print {#red-writing-workspace .phone-navigation {display:none!important}}

/* Keep a brief phone notice clear of the lower-right history controls. */
#red-writing-workspace.phone-workspace[data-active-view=workspace] .red-toast{bottom:calc(var(--phone-nav-space) + 76px)}
