/* ---------------------------------------------------------------
   PrintHub — vzhled

   Hlavní roli hraje list papíru: každá fotka a stránka se ukazuje jako
   bílý list ve skutečném poměru, s ořezovými značkami v rozích a s tím,
   co se ořízne. Ovládání kolem je tiché, ať list vynikne.

   Mobile-first. Nejčastější scénář je „stojím u tiskárny s telefonem",
   takže velké dotykové cíle a čitelnost na malém displeji mají přednost.
   --------------------------------------------------------------- */

/* Schibsted Grotesk (SIL Open Font License) — grotesk navržený pro tiskoviny,
   s plnou češtinou. Uložený u nás, ať aplikace nečeká na cizí server. */
@font-face {
    font-family: "Schibsted Grotesk";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/schibsted-grotesk-latin-ext-bCMKxYZ.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Schibsted Grotesk";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/schibsted-grotesk-latin-2JMSASU.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* Stůl, na kterém listy leží. Papír zůstává bílý i v tmavém režimu —
       je to papír. */
    --desk: #e6e9ed;
    --panel: #f3f5f7;
    --raised: #ffffff;
    --paper: #ffffff;
    --ink: #16191d;
    --ink-2: #4d5562;
    --ink-3: #79818d;
    --line: #cfd5dc;
    --line-strong: #b4bcc6;

    /* Procesní azurová, ztmavená, aby měla kontrast na papíře. */
    --accent: #0b6e9e;
    --accent-soft: #d3e8f3;

    --ok: #1b7a4b;
    --ok-soft: #d6eee0;
    --warn: #8a5300;
    --warn-soft: #f7e6c6;
    --danger: #b42318;
    --danger-soft: #f8dcd7;
    --sim: #5b3fb3;
    --sim-soft: #e5defa;

    --btn-bg: var(--ink);
    --btn-fg: #ffffff;

    --shadow-sheet: 0 1px 1px rgb(22 25 29 / .10), 0 6px 14px -6px rgb(22 25 29 / .30);
    --trim: #8b939e;

    --radius: 14px;
    --radius-sm: 9px;
    --tap: 44px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --desk: #111316;
        --panel: #1a1d22;
        --raised: #262a31;
        --ink: #eceef1;
        --ink-2: #a9b1bc;
        --ink-3: #7c8490;
        --line: #2c3138;
        --line-strong: #3d434c;

        --accent: #5cb8e6;
        --accent-soft: #14354a;

        --ok: #57c98b;
        --ok-soft: #12301f;
        --warn: #e9aa42;
        --warn-soft: #362810;
        --danger: #f87a6f;
        --danger-soft: #3a1714;
        --sim: #b4a2ff;
        --sim-soft: #251d45;

        --btn-bg: #eceef1;
        --btn-fg: #111316;

        --shadow-sheet: 0 1px 1px rgb(0 0 0 / .5), 0 10px 22px -8px rgb(0 0 0 / .85);
        --trim: #69717c;
    }
}

/* ---------- Základ ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--desk);
    color: var(--ink);
    font: 400 16px/1.5 var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.015em; }
h1 { font-size: clamp(1.625rem, 1.35rem + 1.2vw, 2.125rem); font-weight: 760; }
h2 { font-size: 1.0625rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: .18em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

[hidden] { display: none !important; }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.icon--flip { transform: scaleX(-1); }

.truncate { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Kostra ---------- */

.page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 16px 48px;
}
.page--home { max-width: 760px; }
.page--history { max-width: 900px; }
.page--editor { max-width: 860px; }
.page--workspace, .page--editor { padding-bottom: 0; }
.page--login {
    max-width: 420px;
    min-height: 100svh;
    display: grid;
    align-content: center;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px 8px 16px;
    padding-top: calc(8px + env(safe-area-inset-top));
    background: color-mix(in srgb, var(--desk) 84%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 780;
    font-size: 1.0625rem;
    letter-spacing: -.02em;
}
.brand-mark { width: 24px; height: 24px; }

.topnav { display: flex; align-items: center; gap: 2px; }

.navlink {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--ink-2);
    text-decoration: none;
    font-weight: 600;
    font-size: .9375rem;
}
.navlink:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.navlink.is-active { color: var(--ink); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }

/* Na úzkém displeji jen ikony — text zůstane pro čtečky obrazovky. */
@media (max-width: 479px) {
    .navlink { padding: 0 10px; }
    .navlink span {
        position: absolute; width: 1px; height: 1px; overflow: hidden;
        clip: rect(0 0 0 0); white-space: nowrap;
    }
}

/* ---------- Uživatelské menu ---------- */

.usermenu { position: relative; margin-left: 6px; }
.usermenu summary { list-style: none; cursor: pointer; }
.usermenu summary::-webkit-details-marker { display: none; }

.avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--desk);
    font-weight: 700;
    font-size: .875rem;
}

.usermenu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    padding: 6px;
    background: var(--raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px -12px rgb(0 0 0 / .35);
}
.usermenu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.usermenu-head small { display: block; color: var(--ink-2); font-size: .8125rem; }
.usermenu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    text-decoration: none;
    font-size: .9375rem;
}
.usermenu-item:hover { background: var(--panel); }

/* ---------- Tlačítka ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--tap);
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--panel);
    color: var(--ink);
    font: inherit;
    font-weight: 650;
    font-size: .9375rem;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn--primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn--primary:hover:not(:disabled) { background: color-mix(in srgb, var(--btn-bg) 84%, var(--accent)); }

.btn--secondary { background: var(--raised); border-color: var(--line); }
.btn--secondary:hover:not(:disabled) { border-color: var(--line-strong); }

.btn--quiet { background: transparent; color: var(--ink-2); }
.btn--quiet:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }

.btn--lg { min-height: 52px; padding: 0 26px; font-size: 1.0625rem; }
.btn--sm { min-height: 36px; padding: 0 13px; font-size: .875rem; }
.btn--sm .icon { width: 1.1em; height: 1.1em; }
.btn--block { width: 100%; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-2);
    cursor: pointer;
}
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.icon-btn--framed { background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }

.toggle[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--desk); }

/* ---------- Formulářové prvky ---------- */

.field {
    display: grid;
    gap: 6px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--ink-2);
}

.input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--raised);
    color: var(--ink);
    font: inherit;
    font-size: 16px; /* pod 16px iOS při fokusu zoomuje */
    font-weight: 450;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }

/* Přepínač z radio skupiny — na telefonu jedno klepnutí místo seznamu. */
.seg {
    display: flex;
    gap: 2px;
    width: 100%;
    padding: 3px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ink) 7%, transparent);
}
.seg label { position: relative; flex: 1 1 0; min-width: 0; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span {
    display: block;
    min-height: 32px;
    padding: 0 6px;
    line-height: 32px;
    text-align: center;
    border-radius: 999px;
    color: var(--ink-2);
    font-size: .8125rem;
    font-weight: 620;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.seg label:hover span { color: var(--ink); }
.seg input:checked + span {
    background: var(--raised);
    color: var(--ink);
    box-shadow: 0 1px 2px rgb(0 0 0 / .12), 0 0 0 1px var(--line);
}
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg input:disabled { cursor: default; }
.seg input:checked:disabled + span { background: var(--accent-soft); color: var(--accent); box-shadow: none; }

.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    color: var(--ink);
    font-size: .875rem;
    font-weight: 620;
    cursor: pointer;
}
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track {
    position: relative;
    flex: none;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: var(--line-strong);
    transition: background-color .15s ease;
}
.switch-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgb(0 0 0 / .3);
    transition: transform .15s ease;
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch:has(input:disabled) { opacity: .45; cursor: not-allowed; }

.stepper {
    display: inline-flex;
    align-items: center;
    height: 38px;
    border-radius: 999px;
    background: var(--raised);
    box-shadow: inset 0 0 0 1px var(--line);
}
.stepper-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-2);
    cursor: pointer;
}
.stepper-btn:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.stepper-btn .icon { width: 16px; height: 16px; }
.stepper input {
    width: 2.6ch;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    text-align: center;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
    appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }
.stepper:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------- Hlášky ---------- */

.alert {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    font-size: .9375rem;
}
.alert--success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.alert--error   { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.alert--warning { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.alert--info    { background: var(--sim-soft); color: var(--sim); border-color: color-mix(in srgb, var(--sim) 30%, transparent); }

.note {
    margin: 0 0 20px;
    padding: 2px 0 2px 12px;
    border-left: 3px solid var(--sim);
    color: var(--ink-2);
    font-size: .9375rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 680;
    white-space: nowrap;
}
.badge--green  { background: var(--ok-soft); color: var(--ok); }
.badge--blue   { background: var(--accent-soft); color: var(--accent); }
.badge--purple { background: var(--sim-soft); color: var(--sim); }
.badge--red    { background: var(--danger-soft); color: var(--danger); }
.badge--gray   { background: var(--panel); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Tiskárna ---------- */

.printer {
    margin-bottom: 28px;
    padding: 14px 16px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}
.printer--compact { margin-bottom: 20px; }

.printer-head { display: flex; align-items: center; gap: 11px; }
.printer-dot {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent);
}
.printer--sim .printer-dot { background: var(--sim); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sim) 22%, transparent); }
.printer--attention .printer-dot { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 28%, transparent); }
.printer--off .printer-dot { background: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 22%, transparent); }

.printer-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.printer-title strong { font-size: 1rem; font-weight: 700; }
.printer-sub { color: var(--ink-2); font-size: .875rem; }
.printer > .printer-sub { margin-top: 8px; }
.printer-help { margin-top: 10px; font-size: .9375rem; max-width: 62ch; }

.printer--attention { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.printer--off { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }

/* ---------- Papír v tiskárně ----------
   Na úvodu řádek v kartě tiskárny, na ploše samostatný panel, který
   navíc říká, jestli papír sedí s tím, co se tiskne. */

.paper { display: grid; gap: 10px; }
.printer .paper { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.workspace > .paper {
    margin: -4px 0 22px;
    padding: 10px 10px 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}
.workspace > .paper:has(.paper-check--bad) {
    background: var(--warn-soft);
    border-color: color-mix(in srgb, var(--warn) 40%, transparent);
}

.paper-row { display: flex; align-items: center; gap: 12px; }

/* Malý list papíru — stejný motiv jako náhledy výtisku. */
.paper-glyph {
    flex: none;
    width: 15px;
    height: 21px;
    border-radius: 1px;
    background: #fff;
    box-shadow: var(--shadow-sheet);
}

.paper-text { display: grid; flex: 1; min-width: 0; margin: 0; line-height: 1.35; }
.paper-label { color: var(--ink-2); font-size: .9375rem; }
.paper-label strong { display: inline-block; color: var(--ink); font-weight: 700; } /* zalomí se celý, ne „Plus / Glossy II" */
.paper-status { color: var(--ink-3); font-size: .8125rem; }
.paper--offline .paper-status { color: var(--warn); }

.paper.is-loading .paper-refresh .icon { animation: paper-spin .9s linear infinite; }
@keyframes paper-spin { to { transform: rotate(360deg); } }

.paper-check { display: grid; justify-items: start; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.paper-check-msg { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--ok); font-size: .9375rem; font-weight: 620; line-height: 1.4; }
.paper-check-msg .icon { margin-top: 1px; }
.paper-check--bad { border-top-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.paper-check--bad .paper-check-msg { color: var(--warn); }
.paper-check-hint { margin: 0; color: var(--ink-2); font-size: .875rem; }

/* Typ papíru u položky — select, protože typů je víc, než se vejde vedle sebe. */
.type-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink-2); font-size: .8125rem; font-weight: 620; }
.type-field select {
    flex: 1;
    min-width: 0;
    max-width: 210px;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--raised);
    color: var(--ink);
    font: inherit;
    font-size: 16px; /* menší písmo by na iOS přiblížilo stránku */
    font-weight: 560;
}

/* Na telefonu je položka úzká — popisek zůstane jen pro čtečky, select
   dostane celou šířku. Hned nad ním je volba formátu, takže je jasné, co
   „Plus Glossy II" znamená. */
@media (max-width: 559px) {
    .type-field span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .type-field select { max-width: none; }
}

.printbar-note { display: inline-flex; align-items: center; gap: 4px; color: var(--warn); font-size: .8125rem; font-weight: 620; }

/* Nádržky jako okénka na přední straně Canonu. Ryska = hranice „dochází". */
.tanks {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}
.tank { display: grid; justify-items: center; gap: 2px; text-align: center; }
.tank-window {
    position: relative;
    width: 34px;
    height: 74px;
    margin-bottom: 6px;
    overflow: hidden;
    border-radius: 7px 7px 9px 9px;
    background: color-mix(in srgb, var(--ink) 5%, var(--raised));
    box-shadow: inset 0 0 0 1px var(--line-strong), inset 0 3px 8px rgb(0 0 0 / .07);
}
.tank-fill {
    position: absolute;
    inset: auto 0 0 0;
    height: calc(var(--level) * 1%);
    background:
        linear-gradient(to right, rgb(255 255 255 / .28), transparent 35%, transparent 70%, rgb(0 0 0 / .18)),
        var(--tank);
    box-shadow: inset 0 2px 0 rgb(255 255 255 / .35);
}
.tank-low {
    position: absolute;
    inset: auto 0 calc(var(--low) * 1%) 0;
    border-top: 1px dashed color-mix(in srgb, var(--ink) 55%, transparent);
}
.tank-name { font-size: .8125rem; font-weight: 640; }
.tank-level { color: var(--ink-2); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.tank--low .tank-level { color: var(--danger); font-weight: 700; }

/* Údržbová kazeta se plní. Ryska = kdy ji tiskárna bude chtít vyměnit. */
.mc {
    display: grid;
    grid-template-columns: auto minmax(60px, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: .8125rem;
}
.mc-name { font-weight: 640; }
.mc-level { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mc-gauge {
    position: relative;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ink) 9%, transparent);
}
.mc-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--level) * 1%); background: var(--ink-3); border-radius: 999px; }
.mc-high { position: absolute; top: 0; bottom: 0; left: calc(var(--high) * 1%); width: 2px; background: var(--warn); }
.mc--full .mc-fill { background: var(--danger); }
.mc--full .mc-level { color: var(--danger); font-weight: 700; }

/* ---------- Úvod ---------- */

.home-title { margin: 6px 0 16px; }

.modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 36px;
}

.mode {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 6px 16px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--ink);
    text-decoration: none;
    transition: border-color .15s ease;
}
.mode:hover { border-color: var(--line-strong); }
.mode:hover .mode-sheet span { transform: translateY(-3px) rotate(var(--tilt)); }

.mode-sheet { display: grid; place-items: center; height: 124px; }
.mode-sheet span {
    --tilt: 0deg;
    display: block;
    border-radius: 2px;
    box-shadow: var(--shadow-sheet);
    transform: rotate(var(--tilt));
    transition: transform .2s ease;
}
/* Fotka bez okrajů — barva jde až do kraje listu. */
.mode--photo .mode-sheet span {
    --tilt: -4deg;
    width: 62px;
    aspect-ratio: 2 / 3;
    background:
        radial-gradient(circle at 70% 30%, #ffe2a6 0 7%, transparent 8%),
        linear-gradient(to bottom, #7fb4de 0 40%, #f1b27d 40% 47%, #5d8b4f 47% 72%, #3e6a3a 72%);
}
/* Dokument — řádky textu uvnitř okrajů. */
.mode--document .mode-sheet span {
    --tilt: 3deg;
    width: 70px;
    aspect-ratio: 210 / 297;
    padding: 12px 10px;
    background:
        linear-gradient(#5b6370, #5b6370) 10px 12px / 34px 4px no-repeat,
        repeating-linear-gradient(to bottom, transparent 0 14px, #ccd2da 14px 16px) content-box,
        #fff;
}

.mode-text { display: grid; gap: 2px; }
.mode-draft {
    width: fit-content;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .75rem;
    font-weight: 680;
}
.mode-name { font-size: 1.125rem; font-weight: 740; }
.mode-desc { color: var(--ink-2); font-size: .875rem; line-height: 1.35; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.section-head a { font-size: .9375rem; font-weight: 600; text-decoration: none; }

.quota { display: grid; gap: 6px; margin-top: 28px; color: var(--ink-2); font-size: .8125rem; }
.quota-bar {
    position: relative;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ink) 10%, transparent);
}
.quota-bar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: calc(var(--used) * 1%); background: var(--ink-2); }

/* ---------- Náhled výtisku ---------- */

.proof {
    --pad: 16px;
    --trim-len: 7px;
    --trim-off: 13px; /* délka značky + mezera od hrany papíru */
    position: relative;
    padding: var(--pad);
}

.proof-sheet { position: relative; aspect-ratio: var(--ar, 2 / 3); }

/* Obrázek je o přesah větší než list (u tisku s okraji je přesah 0). */
.proof-ghost,
.proof-image {
    position: absolute;
    left: calc(var(--bleed, 0) * -1%);
    top: calc(var(--bleed, 0) * -1%);
    width: calc(100% + var(--bleed, 0) * 2%);
    height: calc(100% + var(--bleed, 0) * 2%);
    max-width: none;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

/* Co je za hranou papíru, jen naznačíme — ta část se nevytiskne. */
.proof-ghost { opacity: .32; filter: saturate(.5); }

.proof-paper {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 1px;
    background: var(--paper);
    box-shadow: var(--shadow-sheet);
    transition: opacity .2s ease;
}

/* Na půl listu: kde list přehnout. Jen v náhledu, do tisku se nedostane. */
.proof--fold .proof-paper::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    border-top: 1px dashed color-mix(in srgb, var(--accent) 70%, transparent);
    pointer-events: none;
}

/* Ořezové značky v rozích — kde přesně je hrana papíru. */
.proof-sheet::after {
    content: '';
    position: absolute;
    inset: calc(var(--trim-off) * -1);
    pointer-events: none;
    background:
        linear-gradient(var(--trim), var(--trim)) left 0 top var(--trim-off) / var(--trim-len) 1px no-repeat,
        linear-gradient(var(--trim), var(--trim)) left var(--trim-off) top 0 / 1px var(--trim-len) no-repeat,
        linear-gradient(var(--trim), var(--trim)) right 0 top var(--trim-off) / var(--trim-len) 1px no-repeat,
        linear-gradient(var(--trim), var(--trim)) right var(--trim-off) top 0 / 1px var(--trim-len) no-repeat,
        linear-gradient(var(--trim), var(--trim)) left 0 bottom var(--trim-off) / var(--trim-len) 1px no-repeat,
        linear-gradient(var(--trim), var(--trim)) left var(--trim-off) bottom 0 / 1px var(--trim-len) no-repeat,
        linear-gradient(var(--trim), var(--trim)) right 0 bottom var(--trim-off) / var(--trim-len) 1px no-repeat,
        linear-gradient(var(--trim), var(--trim)) right var(--trim-off) bottom 0 / 1px var(--trim-len) no-repeat;
}

.proof.is-loading .proof-paper { opacity: .55; }

/* Malý náhled v seznamu — značky a přesah by tu jen překážely. */
.proof--xs { --pad: 4px; }
.proof--xs .proof-sheet::after,
.proof--xs .proof-ghost { display: none; }

/* ---------- Pracovní plocha ---------- */

.ws-head { display: grid; gap: 6px; margin: 2px 0 20px; }

.back {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    width: fit-content;
    min-height: 36px;
    margin-left: -6px;
    color: var(--ink-2);
    font-weight: 620;
    font-size: .9375rem;
    text-decoration: none;
}
.back:hover { color: var(--ink); }

.paper-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 62ch;
    color: var(--ink-2);
    font-size: .9375rem;
    line-height: 1.4;
}
.paper-hint .icon { margin-top: 1px; }
.paper-hint strong { color: var(--ink); font-weight: 680; }

.drop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    margin-bottom: 26px;
    padding: 12px 18px;
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--ink);
    font-size: .9375rem;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.drop:hover, .drop.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.drop input[type=file] { display: none; }
.drop--empty {
    flex-direction: column;
    gap: 8px;
    min-height: 260px;
    background: var(--panel);
    text-align: center;
}
.drop--empty strong { font-size: 1.0625rem; }
.drop-hint { color: var(--ink-2); font-size: .875rem; }

.drop-sheets { position: relative; display: block; width: 92px; height: 96px; margin-bottom: 6px; }
.drop-sheets span {
    position: absolute;
    width: 54px;
    aspect-ratio: 2 / 3;
    border-radius: 2px;
    background: #fff;
    box-shadow: var(--shadow-sheet);
}
.drop-sheets span:first-child { left: 4px; top: 10px; transform: rotate(-9deg); }
.drop-sheets span:last-child {
    right: 4px;
    top: 2px;
    transform: rotate(6deg);
    background: linear-gradient(to bottom, #7fb4de 0 40%, #f1b27d 40% 47%, #5d8b4f 47% 72%, #3e6a3a 72%);
}
.drop-sheets--document span { width: 56px; aspect-ratio: 210 / 297; }
.drop-sheets--document span:last-child {
    padding: 9px 8px;
    background:
        linear-gradient(#5b6370, #5b6370) 8px 9px / 26px 3px no-repeat,
        repeating-linear-gradient(to bottom, transparent 0 9px, #ccd2da 9px 11px) content-box,
        #fff;
}

.section-title { margin-bottom: 10px; font-size: 1rem; font-weight: 720; }

.bulk { margin-bottom: 26px; }

.presets {
    display: flex;
    gap: 8px;
    margin: 0 -16px;
    padding: 2px 16px 6px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}
.presets::-webkit-scrollbar { display: none; }
.preset {
    flex: none;
    display: grid;
    gap: 1px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--raised);
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    scroll-snap-align: start;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.preset:hover { border-color: var(--line-strong); }
.preset.is-applied { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.preset-name { font-size: .875rem; font-weight: 680; }
.preset-sum { color: var(--ink-2); font-size: .75rem; }

.bulk-custom { margin-top: 8px; }
.bulk-custom summary {
    width: fit-content;
    padding: 6px 0;
    color: var(--accent);
    font-weight: 620;
    font-size: .9375rem;
    list-style: none;
    cursor: pointer;
}
.bulk-custom summary::-webkit-details-marker { display: none; }
.bulk-custom summary::after { content: ' +'; }
.bulk-custom[open] summary::after { content: ' −'; }

.bulk-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-top: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}
.select-field { display: grid; flex: 1 1 140px; gap: 4px; color: var(--ink-2); font-size: .8125rem; font-weight: 620; }
.select-field--narrow { flex: 0 0 84px; }
.select-field select,
.select-field input {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--raised);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    font-weight: 500;
}

.items-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; }
.items-head .section-title { margin: 0; }

.saved {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--ok-soft);
    color: var(--ok);
    font-size: .8125rem;
    font-weight: 660;
}

.item-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
    column-gap: 40px;
}

.item {
    display: grid;
    grid-template-columns: minmax(0, min(43%, 210px)) minmax(0, 1fr);
    gap: 0 14px;
    padding: 10px 0 18px;
    border-top: 1px solid var(--line);
    transition: opacity .15s ease;
}
.item.is-saving { opacity: .6; pointer-events: none; }

.item-proof { display: grid; justify-items: start; align-content: start; gap: 2px; }
.item-proof .proof { --pad: 14px; width: calc(100% + 14px); margin-left: -14px; }

.item-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr); /* jinak by ji přepínače roztáhly přes okraj */
    align-content: start;
    gap: 10px;
    min-width: 0;
    padding-top: 6px;
}

.item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
.item-name {
    min-width: 0;
    padding-top: 9px;
    overflow: hidden;
    font-size: .9375rem;
    font-weight: 680;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.item-head form { margin: 0 -8px 0 0; }

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
    margin-top: -10px;
    color: var(--ink-2);
    font-size: .8125rem;
}
.quality { font-variant-numeric: tabular-nums; }
.quality--low { color: var(--danger); font-weight: 700; }

.controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; max-width: 320px; }
.controls-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }

.item-warnings {
    grid-column: 1 / -1;
    display: grid;
    gap: 6px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}
.item-warnings li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: var(--warn-soft);
    color: var(--warn);
    font-size: .875rem;
    font-weight: 560;
    line-height: 1.4;
}
.item-warnings .icon { margin-top: 1px; }

/* Lišta s tiskovým tlačítkem — na telefonu pořád po ruce. */
.printbar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin: 24px -16px 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--desk) 86%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-top: 1px solid var(--line);
}
.printbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.printbar-sum { display: grid; min-width: 0; color: var(--ink-2); font-size: .8125rem; line-height: 1.3; }
.printbar-sum strong { color: var(--ink); font-size: 1.0625rem; font-weight: 740; }
.printbar .btn { flex: none; min-width: 152px; }

/* ---------- Pokračovat, nebo začít znovu ---------- */

.page--resume { max-width: 640px; }
.resume { display: grid; gap: 14px; }
.resume-title { font-size: 1.25rem; font-weight: 740; }
.resume-sub { color: var(--ink-2); font-size: .9375rem; }
.resume-sheets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 6px 0;
    padding: 0;
    list-style: none;
}
.resume-sheets li { width: 64px; }
.resume-more {
    display: grid;
    place-items: center;
    height: 64px;
    color: var(--ink-2);
    font-weight: 700;
}
.resume-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.resume-actions .btn { min-width: 160px; }
.resume-note { color: var(--ink-2); font-size: .875rem; }

/* ---------- Editor výřezu ---------- */

/* Pevná výška — fotka na šířku i na výšku se po otočení vejde do stejného
   rámečku a editor neposkakuje. */
.editor-stage {
    height: min(60svh, 560px);
    overflow: hidden;
    border-radius: var(--radius);
    background: #1b1e23;
}
.editor-stage img { display: block; max-width: 100%; }
.editor.is-grayscale .cropper-container { filter: grayscale(1); }

.cropper-view-box { outline-color: var(--accent); }
.cropper-line, .cropper-point { background-color: var(--accent); }

/* Čárkovaná čára = hrana papíru u tisku bez okrajů. */
.editor-stage.is-borderless .cropper-crop-box::after {
    content: '';
    position: absolute;
    inset: var(--bleed-inset, 0);
    border: 1px dashed rgb(255 255 255 / .95);
    box-shadow: 0 0 0 1px rgb(0 0 0 / .3);
    pointer-events: none;
}

.editor-info { min-height: 1.5em; margin-top: 12px; color: var(--ink-2); font-size: .875rem; font-variant-numeric: tabular-nums; }
.editor-info.is-warning { color: var(--danger); font-weight: 650; }

.editor-legend { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--ink-2); font-size: .8125rem; }
.legend-dash { flex: none; width: 22px; border-top: 1.5px dashed currentColor; }

.editor-tools { display: grid; gap: 12px; margin-top: 16px; }
.editor-tools .seg { max-width: 340px; }
.tool-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- Historie ---------- */

.jobs { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.jobs li { border-bottom: 1px solid var(--line); }

.job {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 6px 2px;
    color: var(--ink);
    text-decoration: none;
}
.job:hover .job-title { text-decoration: underline; text-underline-offset: .18em; }

.job-thumb { position: relative; flex: none; width: 60px; }
.job-count {
    position: absolute;
    right: -4px;
    bottom: 0;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--desk);
    font-size: .6875rem;
    font-weight: 750;
}

.job-body { display: grid; flex: 1; min-width: 0; }
.job-title { overflow: hidden; font-weight: 660; text-overflow: ellipsis; white-space: nowrap; }
.job-sub { color: var(--ink-2); font-size: .8125rem; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.pager-info { color: var(--ink-2); font-size: .875rem; }

.empty { display: grid; justify-items: center; gap: 14px; padding: 48px 16px; color: var(--ink-2); text-align: center; }

.detail-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.detail-sub { color: var(--ink-2); font-size: .9375rem; }

.sheets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 4px 8px;
    margin: 4px -8px 24px;
    padding: 0;
    list-style: none;
}
.sheet-card .proof { --pad: 16px; }
.sheet-caption { display: grid; padding: 0 16px; color: var(--ink-2); font-size: .8125rem; line-height: 1.4; }
.sheet-caption .truncate { color: var(--ink); font-weight: 640; }

.detail-actions { margin-bottom: 28px; }

/* Výběr listů v historii — celý list je klikací, v rohu kolečko. */
.pick-hint { margin: -6px 0 6px; color: var(--ink-2); font-size: .875rem; }
.sheet-card { position: relative; }
.sheet-pick { position: absolute; inset: 0; z-index: 2; cursor: pointer; }
.sheet-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sheet-pick-mark {
    position: absolute;
    top: 8px;
    left: 8px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgb(0 0 0 / .32);
    box-shadow: 0 1px 4px rgb(0 0 0 / .35);
    color: transparent;
    transition: background-color .15s ease;
}
.sheet-pick-mark .icon { width: 16px; height: 16px; }
.sheet-pick input:checked + .sheet-pick-mark { background: var(--accent); color: #fff; }
.sheet-pick input:focus-visible + .sheet-pick-mark { outline: 2px solid var(--accent); outline-offset: 2px; }
.sheet-card.is-picked .proof-paper { outline: 3px solid var(--accent); outline-offset: 3px; }

.link-btn {
    width: fit-content;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    font-size: .8125rem;
    font-weight: 620;
    text-align: left;
    cursor: pointer;
}

.printbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

@media (max-width: 559px) {
    .printbar-inner:has(.printbar-actions) { flex-wrap: wrap; }
    .printbar-actions { width: 100%; }
    .printbar .printbar-actions .btn { flex: 1 1 0; min-width: 0; padding: 0 12px; font-size: .9375rem; }
}

.tech { color: var(--ink-2); font-size: .875rem; }
.tech summary { width: fit-content; font-weight: 620; cursor: pointer; }
.tech dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 10px 0 0; }
.tech dd { margin: 0; color: var(--ink); }

/* ---------- Průběh tisku ---------- */

.progress {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
    padding: 14px 16px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}
.progress-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.progress-head strong { font-size: 1.0625rem; font-weight: 720; }
.progress-count { color: var(--ink-2); font-size: .875rem; font-variant-numeric: tabular-nums; }
.progress-bar {
    position: relative;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ink) 9%, transparent);
}
.progress-bar span {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 999px;
    background: var(--accent);
    transition: width .4s ease;
}
.progress--completed .progress-bar span { background: var(--ok); }
.progress--simulated .progress-bar span { background: var(--sim); }
.progress--failed .progress-bar span,
.progress--cancelled .progress-bar span { background: var(--ink-3); }
.progress-note { color: var(--warn); font-size: .875rem; }
.progress-printer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--warn-soft);
    color: var(--warn);
    font-size: .875rem;
    font-weight: 560;
}
.progress-printer .icon { margin-top: 1px; }
.progress-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.progress-hint { color: var(--ink-2); font-size: .8125rem; }

.sheet-status { margin-top: 4px; }
.sheet-error { color: var(--danger); font-size: .8125rem; }

.item-print { margin-left: -6px; }

/* ---------- Přihlášení ---------- */

.login { display: grid; gap: 22px; }
.login-brand { display: grid; justify-items: center; gap: 4px; text-align: center; }
.login-mark { width: 44px; height: 44px; margin-bottom: 8px; color: var(--ink); }
.login-brand h1 { font-size: 1.875rem; }
.login-brand p { color: var(--ink-2); }
.login-form {
    display: grid;
    gap: 14px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

/* ---------------------------------------------------------------
   Čekání
   Nahrání fotky z telefonu i převod dokumentu trvají několik sekund.
   Bez zpětné vazby to vypadá, že se klepnutí neprojevilo, a uživatel
   klepne znovu.
   --------------------------------------------------------------- */
.busy {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: color-mix(in srgb, var(--desk) 55%, transparent);
    backdrop-filter: blur(3px);
}

/* Musí přebít `display: flex` výše, jinak by atribut hidden neúčinkoval. */
.busy[hidden] { display: none; }

.busy-box {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 100%;
    padding: 16px 22px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--raised);
    box-shadow: 0 16px 40px -16px rgb(0 0 0 / .45);
    color: var(--ink);
    font-weight: 650;
}

.busy-spinner {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border: 2.5px solid color-mix(in srgb, var(--ink) 15%, transparent);
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: busy-spin .7s linear infinite;
}

@keyframes busy-spin { to { transform: rotate(360deg); } }

.busy-body { display: grid; gap: 8px; min-width: 0; }
.busy-progress {
    display: block;
    width: 200px;
    max-width: 100%;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.busy-progress span { display: block; width: 0; height: 100%; background: var(--ink); transition: width .2s ease; }
.busy:has(.busy-progress:not([hidden])) .busy-box { border-radius: var(--radius); }

/* ---------------------------------------------------------------
   Průběžné ukládání
   Změna nastavení nepřenačítá stránku, takže celoobrazovkový překryv by
   tu byl přehnaný — stačí naznačit, že se řádek ukládá.
   --------------------------------------------------------------- */
.items.is-saving { opacity: .6; pointer-events: none; transition: opacity .15s ease; }

/* ---------- Širší obrazovky ---------- */

@media (min-width: 720px) {
    .page { padding: 28px 24px 56px; }
    .page--workspace, .page--editor { padding-bottom: 0; }
    .printbar { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
    .presets { margin: 0; padding: 2px 0 6px; flex-wrap: wrap; overflow: visible; }
    .modes { gap: 16px; }
    .mode { padding: 10px 20px 20px; }
    .mode-sheet { height: 150px; }
    .mode--photo .mode-sheet span { width: 76px; }
    .mode--document .mode-sheet span { width: 86px; }
    .tank-window { width: 40px; height: 88px; }
}
