/* iPhone-style photo screen, on top of shared.css. The screen state explains itself, so text stays minimal. */
:root { --f-accent: #a85b06; --f-soft: #f1f2f4; --f-glass: rgba(255, 255, 255, .94); --f-font: -apple-system, BlinkMacSystemFont, "Open Sans", sans-serif; }
.f-page { position: relative; display: flex; flex-direction: column; min-height: calc(100vh - 130px); font-family: var(--f-font); color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
.f-page.over::after { content: ""; position: absolute; inset: 6px; z-index: 30; border: 3px dashed var(--f-accent); border-radius: 16px; background: rgba(251, 160, 50, .16); pointer-events: none; }
.f-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.f-page button { -webkit-tap-highlight-color: transparent; }

/* Product page */
.f-article-price { margin: 16px 0; color: var(--ink); font-size: 1.5rem; font-weight: 700; }
.f-article-price small { display: block; color: var(--muted); font-size: .8rem; font-weight: 400; }
.f-article-help { margin-top: 10px; color: var(--muted); font-size: .9rem; text-align: center; }

/* Top bar */
.f-top { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; align-items: center; min-height: 52px; padding: env(safe-area-inset-top) 8px 0; background: var(--f-glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.f-title { text-align: center; line-height: 1.15; min-width: 0; }
.f-title strong { display: block; font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; }
.f-title small { display: block; margin-top: 1px; font-size: .72rem; color: var(--muted); }
.f-text-btn { position: relative; isolation: isolate; border: 0; background: none; color: var(--ink); font-size: 1rem; font-weight: 500; min-height: 44px; min-width: 44px; padding: 0 14px; }
.f-top .f-text-btn::before { content: ""; position: absolute; inset: 6px 0; z-index: -1; border-radius: 16px; background: var(--f-soft); }
.f-top [data-all] { justify-self: start; }
.f-add { justify-self: end; width: 44px; padding: 0; font-size: 1.5rem; font-weight: 400; line-height: 1; }
.f-top .f-add::before { inset: 6px; border-radius: 50%; }
.f-load { height: 2px; margin-top: -2px; position: sticky; top: 50px; z-index: 11; }
.f-load i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }

/* Photos */
.f-body { flex: 1; display: flex; flex-direction: column; }
.f-photos { flex: 1; }
.f-msg { margin: 8px; padding: 10px 14px; border-radius: 12px; background: var(--err-soft); color: var(--err); font-size: .85rem; }
.f-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
.f-tile { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: #e9ebee; overflow: hidden; cursor: pointer; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.f-tile:focus-visible { outline-offset: -3px; }
.f-tile img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .6; pointer-events: none; transition: opacity .2s, transform .14s ease-out, border-radius .14s ease-out; }
.f-tile.done img { opacity: 1; }
.f-tile[aria-pressed="true"] { background: var(--brand-soft); }
.f-tile[aria-pressed="true"] img { transform: scale(.88); border-radius: 8px; }
.f-tile.f-lifted img { opacity: .28; }
.f-check { display: none; position: absolute; right: 4px; bottom: 4px; z-index: 1; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--ink); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); place-items: center; }
.f-check svg { width: 13px; height: 13px; }
.f-tile[aria-pressed="true"] .f-check { display: grid; animation: f-pop .18s ease-out; }
@keyframes f-pop { from { transform: scale(.4); } 70% { transform: scale(1.12); } }
.f-dots { position: absolute; left: 5px; bottom: 5px; display: flex; gap: 3px; }
.f-dot { display: block; flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 3px rgba(0, 0, 0, .45); }
.f-tile .tbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .6); }
.f-tile .tbar i { display: block; height: 100%; width: 0; background: var(--brand); }
.f-tile.done .tbar { display: none; }

/* Empty start */
.f-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 20px calc(12px + env(safe-area-inset-bottom)); text-align: center; }
.f-logo { height: 40px; width: auto; }
.f-fan { position: relative; flex: none; width: 240px; height: 200px; }
.f-fan img { position: absolute; left: 30px; top: 30px; width: 180px; height: 135px; object-fit: cover; border: 6px solid #fff; border-radius: 4px; box-shadow: 0 8px 24px rgba(20, 24, 30, .22); }
.f-fan img:nth-child(1) { transform: rotate(-10deg) translate(-14px, 6px); }
.f-fan img:nth-child(2) { transform: rotate(8deg) translate(14px, 2px); }
.f-fan img:nth-child(3) { transform: rotate(-1deg); }
.f-empty-foot { width: 100%; max-width: 340px; }
.f-empty .f-msg { margin: 0 0 10px; }
.f-empty .btn { width: 100%; border-radius: 16px; font-weight: 600; box-shadow: 0 6px 18px rgba(240, 145, 30, .35); }
.f-tel { margin-top: 14px; font-size: .85rem; color: var(--muted); }
.f-tel a { color: var(--f-accent); font-weight: 600; text-decoration: none; }
.f-proto { border: 0; background: none; color: var(--muted); font-size: .78rem; text-decoration: underline; min-height: 44px; padding: 0 12px; }

/* Floating bar at the bottom */
.f-dock { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 10; margin: 8px 8px calc(8px + env(safe-area-inset-bottom)); padding: 8px 10px 10px; border-radius: 24px; background: rgba(255, 255, 255, .985); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); box-shadow: 0 8px 30px rgba(20, 24, 30, .18), 0 0 0 .5px rgba(0, 0, 0, .08); }
.f-tray { display: flex; }
.f-tray:empty { display: none; }
.f-scroll { display: flex; gap: 2px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 10px 0 0; -webkit-overflow-scrolling: touch; }
.f-scroll::-webkit-scrollbar { display: none; }
.f-cover, .f-more { flex: 0 0 76px; padding: 0; border: 0; background: none; color: var(--ink); text-align: center; line-height: 1.2; cursor: pointer; transition: transform .14s ease-out; }
.f-cover:active, .f-more:active { transform: scale(.95); }
.f-more { position: sticky; right: 0; z-index: 2; flex-basis: 104px; padding-left: 8px; color: var(--muted); background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 8px); }
.f-pile { position: relative; display: block; width: 56px; height: 56px; margin: 0 auto 5px; border-radius: 10px; background: var(--f-soft); transition: transform .14s ease-out; }
.f-cover.filled .f-pile { background: none; }
.f-print { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; border: 2px solid #fff; border-radius: 5px; box-shadow: 0 1px 5px rgba(20, 24, 30, .35); }
.f-print-1 { transform: rotate(-7deg) translate(-1px, 1px); }
.f-print-2 { transform: rotate(7deg) translate(1px, 1px); }
.f-count { position: absolute; top: -7px; right: -7px; z-index: 1; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--ink); color: #fff; border: 1.5px solid #fff; font-size: .7rem; font-weight: 700; line-height: 17px; text-align: center; }
.f-plus { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; }
.f-plus b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--ink); font-size: 1.25rem; font-weight: 500; line-height: 1; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.f-name { display: flex; justify-content: center; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600; letter-spacing: -.01em; }
.f-name .f-dot { width: 7px; height: 7px; border: 0; box-shadow: none; }
.f-cover small { display: block; font-size: .68rem; color: var(--muted); }
.f-more-box { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 5px; border: 1.5px dashed #a4a8ae; border-radius: 12px; color: var(--ink); background: rgba(255, 255, 255, .7); font-size: 1.6rem; font-weight: 300; line-height: 1; transition: background .14s, border-color .14s, transform .14s ease-out; }
.f-more.target .f-more-box { border-color: var(--f-accent); border-width: 2px; background: var(--brand-soft); color: var(--f-accent); animation: f-pop .18s ease-out; }
.f-more-name { display: block; font-size: .8rem; font-weight: 600; color: var(--f-accent); white-space: nowrap; }
.f-bump .f-pile { animation: f-bump .35s ease-out .3s; }
@keyframes f-bump { 40% { transform: scale(1.14); } }

/* The row keeps its height, so the photos never jump while selecting */
.f-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; margin-top: 2px; }
.f-row-hint { flex: 1; padding-left: 6px; color: var(--muted); font-size: .95rem; }
.f-all-bar { flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--brand-soft); color: var(--f-accent); font-size: .95rem; font-weight: 600; }
.f-row-count { flex: 1; text-align: center; font-size: 1rem; font-weight: 600; }
.f-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--f-soft); color: var(--ink); }
.f-icon svg { width: 20px; height: 20px; }
.f-cart { flex: 1; justify-content: space-between; gap: 10px; min-height: 52px; padding: 6px 16px; border-radius: 16px; line-height: 1.2; text-align: left; font-weight: 600; }
.f-cart-text { display: flex; flex-direction: column; min-width: 0; }
.f-cart-text small { font-size: .66rem; font-weight: 400; opacity: .85; }
.f-cart-sum { flex: none; font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; }

/* Undo */
.f-undo { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 20px; background: rgba(31, 41, 51, .92); color: #fff; font-size: .9rem; font-weight: 600; white-space: nowrap; box-shadow: 0 4px 16px rgba(0, 0, 0, .3); animation: f-rise .2s ease-out; }
.f-undo svg { width: 15px; height: 15px; color: var(--brand); }
@keyframes f-rise { from { opacity: 0; transform: translate(-50%, 8px); } }

/* Dragging */
.f-dragging, .f-dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.f-ghost { position: fixed; left: 0; top: 0; z-index: 70; width: 88px; height: 88px; pointer-events: none; will-change: transform; }
.f-ghost-in { position: relative; width: 100%; height: 100%; animation: f-lift .16s ease-out; }
.f-ghost .f-print { border-width: 3px; box-shadow: 0 10px 26px rgba(20, 24, 30, .4); }
@keyframes f-lift { from { transform: scale(.75); opacity: .6; } }
.f-dragging .f-cover .f-pile { box-shadow: 0 0 0 2px var(--brand); }
.f-dragging .f-more-box { border-color: var(--f-accent); background: var(--brand-soft); }
.f-cover.f-hover .f-pile { transform: scale(1.1); box-shadow: 0 0 0 3px var(--f-accent); }
.f-more.f-hover .f-more-box { transform: scale(1.1); border-width: 2px; background: var(--brand); color: var(--ink); }

/* Sheets */
.f-backdrop { position: fixed; inset: 0; z-index: 40; padding: 0; border: 0; background: rgba(20, 24, 30, .4); cursor: default; touch-action: none; }
.f-open .f-backdrop { animation: f-fade .22s ease-out; }
@keyframes f-fade { from { opacity: 0; } }
.f-sheet { position: fixed; bottom: 0; z-index: 50; display: flex; flex-direction: column; max-height: 86dvh; overflow: hidden; padding-bottom: env(safe-area-inset-bottom); border-radius: 20px 20px 0 0; background: #fff; color: var(--ink); font-family: var(--f-font); -webkit-font-smoothing: antialiased; box-shadow: 0 -8px 30px rgba(20, 24, 30, .2); overscroll-behavior: contain; }
.f-sheet:focus { outline: 0; }
.f-sheet.wide { bottom: 24px; border-radius: 20px; }
.f-open .f-sheet { animation: f-slide .24s cubic-bezier(.2, .8, .3, 1); }
@keyframes f-slide { from { transform: translateY(60px); opacity: 0; } }
.f-grab { flex: none; width: 36px; height: 5px; margin: 6px auto 0; border-radius: 3px; background: #d7d9dd; }
.f-sheet-nav { flex: none; display: grid; grid-template-columns: 96px minmax(0, 1fr) 96px; align-items: center; min-height: 50px; padding: 0 4px; }
.f-sheet-nav h2 { font-family: inherit; font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; text-align: center; line-height: 1.2; }
.f-sheet-nav .f-icon { margin-left: 4px; background: none; color: var(--err); }
.f-sheet-nav .f-text-btn { padding: 0 10px; color: var(--f-accent); }
.f-sheet-nav [data-cancel] { justify-self: start; }
.f-sheet-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; padding: 4px 16px 12px; overscroll-behavior: contain; }
.f-seg { display: flex; gap: 2px; padding: 3px; margin-bottom: 12px; border-radius: 12px; background: var(--f-soft); }
.f-seg button { flex: 1 1 0; min-width: 0; min-height: 40px; padding: 0 4px; border: 0; border-radius: 9px; background: none; color: var(--ink); font-size: .9rem; font-weight: 500; transition: background .12s; }
.f-seg button[aria-pressed="true"] { background: #fff; font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .16); }
.f-sheet-body > * { flex: none; }
/* Spare room, as with posters, goes to the formats instead of leaving a gap */
.f-sheet-body > .f-papers { flex: 1 0 auto; }
.f-papers { display: flex; justify-content: space-between; align-items: flex-end; gap: 4px; min-height: 196px; padding: 14px 8px 10px; margin-bottom: 12px; overflow-x: auto; border-radius: 14px; background: var(--f-soft); }
.f-paper { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 44px; padding: 0; border: 0; background: none; color: var(--ink); line-height: 1.2; }
.f-print-size { display: block; border: 2px solid #fff; border-radius: 3px; overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgba(20, 24, 30, .2); transition: box-shadow .12s; }
.f-print-size img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .4; transition: opacity .12s; }
.f-paper[aria-pressed="true"] .f-print-size { box-shadow: 0 0 0 3px var(--brand), 0 4px 12px rgba(20, 24, 30, .25); }
.f-paper[aria-pressed="true"] .f-print-size img { opacity: 1; }
.f-paper-name { font-size: .8125rem; font-weight: 500; white-space: nowrap; }
.f-paper[aria-pressed="true"] .f-paper-name { font-weight: 700; }
.f-paper-name small { display: block; color: var(--muted); font-size: .75rem; font-weight: 400; }
.f-stepper { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; font-size: 1rem; }
.f-stepper > div { display: flex; align-items: center; gap: 4px; }
.f-stepper output { min-width: 32px; text-align: center; font-weight: 600; }
.f-stepper .f-icon { font-size: 1.3rem; line-height: 1; }
.f-stepper .f-icon[disabled] { color: #a9acb0; cursor: default; }
.f-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding-bottom: 12px; }
.f-thumb { position: relative; aspect-ratio: 1; border-radius: 8px; background: var(--f-soft); overflow: hidden; }
.f-thumb-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.f-thumb-open img { display: block; width: 100%; height: 100%; object-fit: cover; }
.f-thumb-out { position: absolute; top: 0; right: 0; display: flex; justify-content: flex-end; align-items: flex-start; width: 44px; height: 44px; padding: 5px; border: 0; background: none; }
.f-thumb-out span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: .9rem; line-height: 1; }
.f-sheet-foot { position: relative; flex: none; padding: 12px 16px 24px; border-top: 1px solid var(--line); }
.f-korb-head { flex: none; display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 12px; }
.f-korb-head .f-stepper { min-height: 44px; }
.f-korb-head + .f-sheet-body { padding: 0 16px 16px; }
.f-korb-head + .f-sheet-body .f-thumbs { padding-bottom: 0; }
.f-format-line { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px 14px 8px 12px; border: 0; border-radius: 14px; background: var(--f-soft); color: var(--ink); text-align: left; }
.f-mini { flex: none; display: grid; place-items: center; width: 40px; height: 48px; }
.f-mini .f-print-size img { opacity: 1; }
.f-format-text { flex: 1; min-width: 0; line-height: 1.25; }
.f-format-text b { display: block; font-weight: 600; }
.f-format-text small { display: block; color: var(--muted); font-size: .8125rem; }
.f-format-change { flex: none; color: var(--f-accent); font-weight: 600; }
.f-no-photos { padding: 24px 0; color: var(--muted); text-align: center; }
.f-new-ok { width: 100%; justify-content: space-between; gap: 12px; min-height: 60px; padding: 6px 18px; border-radius: 16px; font-weight: 600; text-align: left; }
.f-foot-sum { line-height: 1.2; text-align: right; }
.f-foot-sum b { display: block; font-size: 1.125rem; font-weight: 700; }
.f-foot-sum small { font-size: .75rem; font-weight: 400; }
.f-action { padding: 20px 16px calc(10px + env(safe-area-inset-bottom)); text-align: center; }
.f-action h2 { font-family: inherit; font-size: 1.0625rem; font-weight: 600; margin-bottom: 16px; }
.f-action .btn { width: 100%; margin-bottom: 8px; border-radius: 16px; font-weight: 600; }
.f-action .btn.ghost { border: 0; background: var(--f-soft); }
.f-action .btn.danger { border: 0; background: var(--f-soft); color: var(--err); }
.f-action .f-text-btn { width: 100%; color: var(--f-accent); }
.f-back { justify-self: start; display: inline-flex; align-items: center; gap: 2px; padding-left: 4px; }
.f-back svg { width: 20px; height: 20px; }
.f-page-in { animation: f-page-in .2s ease-out; }
@keyframes f-page-in { from { transform: translateX(28px); opacity: 0; } }

/* Full screen */
.f-viewer { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: #000; color: #fff; font-family: var(--f-font); touch-action: pinch-zoom; overscroll-behavior: contain; -webkit-user-select: none; user-select: none; animation: f-fade .18s ease-out; }
.f-viewer:focus { outline: 0; }
.f-viewer-bar { flex: none; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; min-height: 56px; padding: env(safe-area-inset-top) 8px 0; text-align: center; }
.f-viewer-bar b { font-weight: 600; }
.f-viewer-btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; }
.f-viewer-btn svg { width: 22px; height: 22px; }
.f-viewer-stage { position: relative; flex: 1; min-height: 0; }
.f-viewer-stage img { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% - 16px - env(safe-area-inset-bottom)); object-fit: contain; }
.f-viewer-prev, .f-viewer-next { position: absolute; top: 50%; translate: 0 -50%; }
.f-viewer-prev { left: 16px; }
.f-viewer-next { right: 16px; }
@media (hover: none) { .f-viewer-prev, .f-viewer-next { display: none; } }
.flyer { position: fixed; z-index: 60; border: 2px solid #fff; border-radius: 5px; object-fit: cover; pointer-events: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }

/* Everything below follows the available width only, so the device toolbar switches layouts live */
.stage, .note, .review-inner { max-width: 1280px; }
.f-desk { display: none; }
@container (min-width: 480px) { .f-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (min-width: 680px) { .f-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* Desktop: photos left, baskets right */
@container (min-width: 860px) {
  .f-phone { display: none; }
  .f-desk { display: inline; }

  .f-top { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; min-height: 64px; padding: 0 16px; border-bottom: 1px solid var(--line); }
  .f-title { grid-column: 1; grid-row: 1; text-align: left; }
  .f-title strong { font-size: 1.25rem; }
  .f-title small { font-size: .8rem; }
  .f-top [data-all] { grid-column: 2; grid-row: 1; }
  .f-add { grid-column: 3; grid-row: 1; width: auto; padding: 0 14px; font-size: 1rem; font-weight: 500; line-height: inherit; }
  .f-top .f-add::before { inset: 6px 0; border-radius: 16px; }
  .f-load { top: 62px; }

  .f-body { display: grid; grid-template-columns: minmax(0, 1fr) 372px; align-items: start; }
  .f-photos { padding: 16px 0 16px 16px; }
  .f-msg { margin: 0 0 12px; }
  .f-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
  .f-tile { border-radius: 6px; }

  .f-dock { top: 80px; bottom: auto; display: flex; flex-direction: column; max-height: calc(100vh - 96px); margin: 16px; padding: 8px; border-radius: 16px; box-shadow: 0 2px 12px rgba(20, 24, 30, .1), 0 0 0 1px var(--line); }
  .f-tray { flex: 0 1 auto; flex-direction: column; min-height: 0; }
  .f-scroll { flex: 0 1 auto; flex-direction: column; min-height: 0; padding: 0; overflow: hidden auto; }
  .f-cover, .f-more { flex: none; display: grid; align-items: center; column-gap: 12px; width: 100%; padding: 8px; border-radius: 10px; text-align: left; }
  .f-cover { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "pile name price" "pile sub price"; }
  .f-cover:active, .f-more:active { transform: none; }
  .f-pile { grid-area: pile; margin: 0; }
  .f-name { grid-area: name; align-self: end; justify-content: flex-start; font-size: .95rem; }
  .f-cover small { grid-area: sub; align-self: start; font-size: .8rem; }
  .f-cover-price { grid-area: price; display: block; font-size: .95rem; font-weight: 600; white-space: nowrap; }
  .f-cover-price small { display: none; }
  .f-more { position: static; grid-template-columns: 56px minmax(0, 1fr); background: none; }
  .f-more-box { margin: 0; }
  .f-more-name { font-size: .95rem; }
  .f-row { flex: none; padding: 8px 4px 0; margin: 8px 0 0; border-top: 1px solid var(--line); }
  .f-tray:empty + .f-row { min-height: 120px; padding: 0; margin: 0; border: 0; }
  .f-row-hint, .f-row-count { font-size: .95rem; }
  .f-row-hint { padding-left: 0; text-align: center; }
  /* The top bar already says "Alle auswählen" here */
  .f-all-bar { display: none; }
  .f-cart { min-height: 60px; }
  /* Below the button, so nothing moves under the mouse */
  #f-undo-slot { order: 1; }
  .f-undo { position: static; display: flex; justify-content: center; width: 100%; min-height: 36px; margin-top: 8px; background: var(--f-soft); color: var(--ink); box-shadow: none; transform: none; animation: none; }
  .f-undo svg { color: var(--f-accent); }

  .f-empty { justify-content: center; gap: 20px; margin: 16px; padding: 40px 20px; border: 2px dashed var(--line); border-radius: 16px; }
  .f-drop-hint { display: block; margin-top: 10px; color: var(--muted); font-size: .9rem; }
  .f-tel { margin-top: 18px; }
}

/* The dialog sits in the middle of the window instead of rising from the bottom */
/* A fixed height while choosing, so the sheet does not jump between products. With photos it grows with them. */
.f-sheet.f-new { height: 546px; }
.f-sheet.wide.f-new { height: 580px; }
.f-sheet.f-change { height: 416px; }
.f-sheet.wide.f-change { height: 472px; }
.f-sheet.f-change .f-sheet-body { padding-bottom: 24px; }
.f-sheet.wide .f-papers { min-height: 240px; gap: 6px; padding: 16px 12px 12px; }
.f-sheet.wide .f-thumbs { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.f-sheet.wide .f-korb-head { padding: 4px 20px 12px; }
.f-sheet.wide .f-korb-head + .f-sheet-body { padding: 0 20px 16px; }
.f-sheet.wide .f-sheet-body { padding: 4px 20px 12px; }
.f-sheet.wide .f-sheet-foot { padding: 12px 20px 24px; }
.f-sheet.wide { top: 50%; bottom: auto; translate: 0 -50%; max-height: min(86dvh, 760px); overflow: hidden; border-radius: 20px; box-shadow: 0 20px 60px rgba(20, 24, 30, .3); }
.f-sheet.wide .f-grab { display: none; }
.f-sheet.wide .f-sheet-nav { padding-top: 6px; }

/* Only with a real mouse: a touch screen would keep these states stuck after a tap */
@media (hover: hover) and (pointer: fine) {
  .f-tile:hover img { filter: brightness(.92); }
  .f-tile:not([aria-pressed="true"]):hover .f-check { display: grid; background: rgba(255, 255, 255, .7); color: transparent; }
  .f-top .f-text-btn:hover::before, .f-icon:hover { background: #e4e6e9; }
  .f-seg button:not([aria-pressed="true"]):hover { background: #e4e6e9; }
  .f-paper:not([aria-pressed="true"]):hover .f-print-size img { opacity: .75; }
  .f-format-line:hover { background: #e4e6e9; }
  .f-viewer-btn:hover { background: rgba(255, 255, 255, .28); }
  .f-sheet-nav .f-icon:hover { background: var(--err-soft); }
  @container (min-width: 860px) {
    .f-cover:hover, .f-more:hover { background: var(--f-soft); }
  }
}

/* A real phone shows only the customer screen, upright or sideways. Reloading the page starts over. */
@media (max-width: 600px), (max-height: 500px) {
  .proto-banner, .review, .note { display: none; }
  .stage-wrap { padding: 0; }
  .stage { border-radius: 0; box-shadow: none; }
  .f-page { min-height: 100dvh; }
}
@media (prefers-reduced-motion: reduce) { .f-bump .f-pile, .f-undo, .f-open .f-sheet, .f-open .f-backdrop, .f-ghost-in, .f-tile[aria-pressed="true"] .f-check, .f-more.target .f-more-box, .f-page-in, .f-viewer { animation: none; } }
