/*
 * CelebriCards: the tool's own components, styled in the site's design language (12 Nov 2026, on the UltraCompress Pro
 * template, after PixelForge, whose shared block the first part of this file follows). Base: /libs/site-pages.css (tokens,
 * Inter and Space Grotesk, theme toggle, focus rings) and /libs/shared-nav.css (the site's header and footer). The second
 * part is the original's components (the toolbar, the Details form, the card on its desk with the selection and handles,
 * the Design, Edit and Check panels, the menus and windows) on the site's tokens. The scripts build their parts with the
 * original's class names (btn primary, small-btn, seg, chip, sec, ev-card, tpl-card ...), so those names are styled here.
 * The fonts printed on the cards are in fonts.css (SIL Open Font License, fonts/LICENSES.txt). Light is the default; dark
 * applies when <html> has no data-theme. Written once from PixelForge's file and the original's style.css, then edited by
 * hand: this file is the source.
 */

/* ----- Tokens the tool adds ----- */
:root {
    --surface: #ffffff;
    --surface-2: #f3f4f8;
    --ring: rgba(139, 92, 246, 0.18);
    --app-max: 1600px;
    --radius-lg: 16px;
    --line: rgba(0, 0, 0, 0.1);
    --line-strong: rgba(0, 0, 0, 0.24);
    --ok: #166534;
    --ok-soft: rgba(22, 101, 52, 0.09);
    --bad: #b91c1c;
    --bad-soft: rgba(185, 28, 28, 0.08);
    --warn: #92400e;
    --warn-soft: rgba(217, 119, 6, 0.1);
    --info: #1d4ed8;
    --rose: #b0285e;           /* the selection on the card, the chosen occasion, design and size, the marks (the original's rose) */
    --rose-soft: #fbe8f0;
    --desk: #e9ebef;           /* behind the card */
    --paper-shadow: 0 1px 2px rgba(22, 25, 31, 0.12), 0 8px 28px rgba(22, 25, 31, 0.12);
    --head: 81px;              /* the site's header */
}
:root:not([data-theme="light"]) {
    --surface: #14141f;
    --surface-2: rgba(255, 255, 255, 0.05);
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.26);
    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, 0.1);
    --bad: #f87171;
    --bad-soft: rgba(248, 113, 113, 0.1);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.1);
    --info: #93c5fd;
    --rose: #ff8fbc;
    --rose-soft: #3a1b2a;
    --desk: #07080b;
    --paper-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 34px rgba(0, 0, 0, 0.55);
}
@media (max-width: 639.98px) { :root { --head: 65px; } }

/* ----- Page: full width, the page provides the side space ----- */
.container.app-container { max-width: calc(var(--app-max) + 2 * var(--content-gutter)); margin-top: 16px; }
@media (min-width: 640px) { .container.app-container { margin-top: 24px; } }

/* ----- The site header is the first thing on the page and stays at the top ----- */
body { padding-top: 0; }
body > header { position: sticky; top: 0; z-index: 50; }
header .site-nav { position: relative; top: auto; }
.theme-toggle { top: 90px; }
@media (max-width: 639.98px) { .theme-toggle { top: 75px; } } /* the header is 81 px tall from 640 px, 65 px below */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ----- Hero ----- */
.app-hero { margin: 0 0 2rem; text-align: center; }
.app-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 1.25rem; font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--text-strong); }
.app-brand img { width: 44px; height: 44px; border-radius: 12px; display: block; }
.app-hero h1 { margin-bottom: 0.75rem; }
.app-tagline { color: var(--text-2); font-size: 1.125rem; line-height: 1.6; max-width: 46rem; margin: 0 auto; }

/* ----- Small helpers ----- */
main [hidden], .dialog [hidden], body > [hidden] { display: none !important; } /* the scripts hide parts that carry their own display */
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--text-2); }
.small { font-size: 0.9rem; }
.hint { color: var(--text-3); font-size: 0.82rem; font-weight: 400; line-height: 1.45; }
.hint:empty { display: none; }
.hint.sub { display: block; margin-top: 2px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; gap: 8px 16px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions.center { justify-content: center; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link:hover { color: var(--link-hover); }
code { font-size: 0.85em; padding: 1px 6px; border-radius: 6px; background: var(--code-bg); color: var(--code-text); }
kbd { font-family: inherit; font-size: 0.72rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--chip-border); border-bottom-width: 2px; background: var(--chip); color: var(--text-strong); }

/* ----- Buttons (the scripts' class names: btn, primary, ghost, danger, on, big, small-btn) ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 1px solid var(--surface-border); border-radius: 9999px; background: var(--surface); color: var(--text-strong); font-family: inherit; font-weight: 600; font-size: 0.925rem; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.btn .ico { width: 17px; height: 17px; }
.btn:hover:not([disabled]) { border-color: var(--brand); color: var(--link); transform: translateY(-2px); }
.btn.primary, .btn.big { background: var(--gradient-brand); color: #fff; border-color: transparent; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
.btn.primary:hover:not([disabled]), .btn.big:hover:not([disabled]) { color: #fff; border-color: transparent; box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(185, 28, 28, 0.35); }
.btn.danger:hover:not([disabled]) { background: var(--danger-strong); color: #fff; border-color: transparent; }
.btn.on { border-color: var(--brand); color: var(--link); background: var(--tint-brand); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn.big { min-height: 52px; padding: 12px 28px; font-size: 1rem; }
.btn.small-btn, .small-btn { min-height: 38px; padding: 7px 15px; font-size: 0.85rem; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--surface-border); background: var(--surface); cursor: pointer; display: inline-grid; place-items: center; color: var(--text-strong); flex: none; padding: 0; font-family: inherit; transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.icon-btn:hover:not([disabled]) { border-color: var(--brand); color: var(--link); }
.icon-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.icon-btn[aria-pressed="true"] { border-color: var(--brand); color: var(--link); background: var(--tint-brand); }
.icon-btn:focus-visible, .link:focus-visible, .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ----- Toolbar ----- */
.app-shell { margin: 0 0 3rem; scroll-margin-top: 90px; }
.app-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 0 0 1.25rem; }
.toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.view-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 9999px; background: var(--surface-2); max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.view-tab { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 16px; border: 0; border-radius: 9999px; background: transparent; font-family: inherit; font-size: 0.85rem; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
.view-tab .ico { width: 16px; height: 16px; }
.view-tab:hover { color: var(--link); }
.view-tab[aria-current="page"] { background: var(--gradient-brand); color: #fff; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); }
.view-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.shell-hint { margin-top: 18px; color: var(--text-3); font-size: 0.85rem; }

/* ----- Fields ----- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field.end { justify-content: flex-end; }
.fields { display: flex; flex-direction: column; gap: 14px; }
.fields-row { gap: 10px 12px; align-items: flex-end; }
.fields-row .field { flex: 0 1 auto; }
.label { font-weight: 600; font-size: 0.85rem; color: var(--text-strong); }
.unit { color: var(--text-2); font-size: 0.85rem; }
.times { color: var(--text-2); padding-bottom: 12px; }
.input { width: 100%; min-width: 0; min-height: 44px; padding: 10px 14px; background: var(--field); border: 1px solid var(--field-border); border-radius: 12px; font-family: inherit; font-size: 0.95rem; color: var(--text); outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.input.num { max-width: 7.5rem; }
.input.tiny { max-width: 5.4rem; min-height: 34px; padding: 4px 8px; font-size: 0.875rem; text-align: right; font-variant-numeric: tabular-nums; }
textarea.input { min-height: 76px; resize: vertical; line-height: 1.45; }
.check-row { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 0.925rem; color: var(--text); padding: 4px 0; }
.check-row input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; align-self: flex-start; }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 13px; border-radius: 9999px; border: 1px solid var(--chip-border); background: var(--surface); font-family: inherit; font-size: 0.85rem; font-weight: 600; color: var(--text-2); cursor: pointer; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.seg button:hover:not([disabled]) { border-color: var(--brand); color: var(--link); transform: translateY(-1px); }
.seg button[aria-checked="true"] { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.seg button[disabled] { opacity: 0.4; cursor: not-allowed; }
.seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 12px; border-radius: 9999px; border: 1px solid var(--chip-border); background: var(--chip); font-family: inherit; font-size: 0.8rem; font-weight: 600; color: var(--text-2); cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.chip:hover { border-color: var(--brand); color: var(--link); transform: translateY(-1px); }
.chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.chip[aria-pressed="true"] { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.small-chip { min-height: 30px; padding: 2px 10px; font-size: 0.8rem; }

/* ----- Windows (the scripts put the heading inside the body) ----- */
.dialog { margin: auto; border: 1px solid var(--surface-border); border-radius: 20px; padding: 0; width: min(560px, calc(100vw - 16px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35); }
.dialog.wide { width: min(880px, calc(100vw - 16px)); }
.dialog::backdrop { background: rgba(10, 10, 20, 0.6); backdrop-filter: blur(6px); }
.dialog[open] { animation: pop 0.2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }
.dialog-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-head h2 { margin: 0; font-size: 1.2rem; color: var(--text-strong); }
.dialog-head .icon-btn { border-radius: 50%; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 4px; align-items: center; }
.help p { max-width: 75ch; color: var(--text-2); }
.help h3 { font-size: 1rem; margin-top: 6px; color: var(--text-strong); }
.keys { display: grid; gap: 6px; margin: 0; }
.keys div { display: flex; gap: 12px; }
.keys dt { min-width: 9rem; }
.keys dd { margin: 0; color: var(--text-2); }

/* ----- Toasts ----- */
.toasts { position: fixed; bottom: 24px; right: 24px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { pointer-events: auto; background: #0a0a14; color: #fff; border: 1px solid rgba(255, 255, 255, 0.12); border-left: 4px solid var(--brand); border-radius: 14px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); min-width: 260px; max-width: 420px; font-size: 0.875rem; font-weight: 500; overflow-wrap: anywhere; animation: slideIn 0.3s ease; transition: opacity 0.3s ease, transform 0.3s ease; }
.toast button { background: none; border: 0; padding: 0; color: #c4b5fd; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; white-space: nowrap; min-height: 32px; flex: none; }
.toast.bad { border-left-color: #f87171; }
.toast.leaving { opacity: 0; transform: translateX(40px); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ----- Information sections ----- */
.info-section { margin: 0 0 2.5rem; }
.info-section h2 { font-size: 1.75rem; margin: 0 0 1.25rem; }
.info-section .info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.info-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 1rem 0 1.5rem; }
.info-stack { display: grid; gap: 12px; }
.info-card { background: var(--surface); border: 1px solid var(--surface-border); border-radius: 16px; box-shadow: var(--surface-shadow); padding: 20px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.info-card:hover { transform: translateY(-4px); box-shadow: var(--surface-hover-shadow); }
.info-card--small { padding: 16px; box-shadow: none; }
.info-card h3 { margin: 0 0 0.75rem; font-size: 1.15rem; }
.info-card p { color: var(--text-2); margin-bottom: 0.75rem; }
.info-card p:last-child { margin-bottom: 0; }
.step-card { position: relative; padding-top: 24px; }
.step-num { position: absolute; top: -16px; left: 20px; width: 34px; height: 34px; border-radius: 50%; background: var(--gradient-brand); color: #fff; font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 0.75rem; }
.step-head h3 { margin: 0; }
.step-emoji { font-size: 1.6rem; line-height: 1; }
.info-section details.info-card { padding: 0; }
.info-section details.info-card summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--text-strong); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.info-section details.info-card summary::-webkit-details-marker { display: none; }
.info-section details.info-card summary::after { content: '+'; color: var(--link); font-weight: 700; font-size: 1.2rem; line-height: 1; flex-shrink: 0; }
.info-section details.info-card[open] summary::after { content: '\2212'; }
.info-section details.info-card p { padding: 0 20px 16px; margin: 0; color: var(--text-2); }

/* ===== CelebriCards components ===== */

/* ----- The site's text rules (p, ul, li, headings, tables, dl) must not reach the tool: same weight as the site's, loaded later ----- */
:where(.app-shell) p, :where(.app-shell) ul, :where(.app-shell) ol, :where(.app-shell) li, :where(.app-shell) dl, :where(.app-shell) dd,
:where(.dialog) p, :where(.dialog) dl, :where(.dialog) dd { margin: 0; line-height: 1.5; }
:where(.app-shell) ul, :where(.app-shell) ol { padding: 0; list-style: none; }
:where(.app-shell) h2, :where(.app-shell) h3, :where(.app-shell) h4, :where(.dialog) h2, :where(.dialog) h3 { margin: 0; line-height: 1.25; }
:where(.app-shell) img { max-width: none; }
.app-shell h2 { font-size: 1.05rem; color: var(--text-strong); }
.app-shell h3 { font-size: 0.95rem; color: var(--text-strong); }
.app-shell canvas { max-width: none; }

/* ----- Hindi, Marathi and Gujarati words in the panels: the tool's own fonts on devices without fonts for those scripts ----- */
.app-shell, .dialog { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif, "Noto Serif Devanagari", "Noto Serif Gujarati", "Noto Serif Gurmukhi"; }

/* ----- Long words (a name typed without spaces) break inside the tool instead of widening the page ----- */
.app-shell, .dialog { overflow-wrap: anywhere; }

/* ----- More of the scripts' class names ----- */
.select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; background: var(--field); border: 1px solid var(--field-border); border-radius: 12px; font-family: inherit; font-size: 0.95rem; color: var(--text); outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.input::placeholder { color: var(--text-3); }
.input.ph-sample::placeholder { color: color-mix(in srgb, var(--rose) 75%, var(--text-2)); }
.hint.bad { color: var(--bad); }
.btn.danger-fill { background: var(--danger-strong); color: #fff; border-color: transparent; }
.btn.danger-fill:hover:not([disabled]) { color: #fff; border-color: transparent; }
.plain-list { margin: 0; padding-left: 1.1em !important; list-style: disc !important; display: flex; flex-direction: column; gap: 6px; }
main input[type="range"], .dialog input[type="range"] { width: 100%; accent-color: var(--brand); min-height: 32px; margin: 0; }
.inline-check { display: flex; gap: 10px; align-items: center; font-size: 0.9rem; color: var(--text); cursor: pointer; }
.inline-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); flex: none; }
.mini-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; display: inline-grid; place-items: center; color: var(--text-2); padding: 0; flex: none; cursor: pointer; }
.mini-btn:hover:not([disabled]) { background: var(--surface-2); color: var(--link); }
.mini-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.mini-btn .ico { width: 17px; height: 17px; }
.mini-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.seg button[aria-pressed="true"] { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.seg button[aria-checked="true"]:hover:not([disabled]), .seg button[aria-pressed="true"]:hover:not([disabled]) { color: #fff; border-color: transparent; }
.desk-scroll:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 12px; }
.seg.full { display: flex; }
.seg.full button { flex: 1; }

/* ----- The toolbar: the tabs, the invitation's name and the file buttons (sticky under the site's header from 1024 px) ----- */
.app-toolbar { padding: 0 0 12px; }
.app-toolbar .btn, .app-toolbar .view-tab { white-space: nowrap; }
.app-toolbar .toolbar-right { flex-shrink: 0; }
.app-toolbar .doc-area { min-width: 0; }
.doc-area { display: flex; align-items: center; gap: 4px 12px; min-width: 0; flex: 1 1 220px; }
.doc-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%; min-width: 0; padding: 6px 10px 6px 4px; border: 0; background: transparent; font-family: inherit; font-weight: 700; font-size: 1rem; color: var(--text-strong); text-align: left; border-radius: 12px; cursor: pointer; }
.doc-btn .doc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.doc-btn .chev { width: 16px; height: 16px; color: var(--text-2); }
.doc-btn:hover .doc-name { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.doc-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.saved { color: var(--text-3); font-size: 0.82rem; white-space: nowrap; }
.tab-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 9999px; background: var(--rose); color: #fff; font-size: 0.72rem; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
:root:not([data-theme="light"]) .tab-badge { color: #1a0a12; }
.view-tab[aria-current="page"] .tab-badge { background: #fff; color: #b0285e; }
@media (min-width: 1024px) {
    .tab-preview { display: none !important; }
    .app-toolbar { position: sticky; top: var(--head); z-index: 30; background: var(--bg); padding: 10px 0; margin: 0 0 12px; flex-wrap: nowrap; }
    .app-toolbar .doc-area { flex: 1 1 auto; }
    .toolbar-right { flex-wrap: nowrap; margin-left: 0; }
}
@media (min-width: 1024px) and (max-width: 1439.98px) {
    .saved { display: none; }
    .toolbar-right #videoBtn span, .toolbar-right #shareBtn span { display: none; }
    .toolbar-right #videoBtn, .toolbar-right #shareBtn { width: 40px; min-height: 40px; padding: 0; }
}

/* ----- The form beside the card ----- */
.work { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@media (min-width: 1024px) { .work { grid-template-columns: minmax(380px, 0.9fr) minmax(0, 1fr); gap: 32px; } }
.panel { min-width: 0; outline: none; }
.view { display: none; }
body[data-view="details"] #viewDetails, body[data-view="design"] #viewDesign, body[data-view="edit"] #viewEdit, body[data-view="check"] #viewCheck { display: block; }

/* ----- The desk: the card on its own background ----- */
.desk { display: none; min-width: 0; background: var(--desk); border-radius: var(--radius-lg); border: 1px solid var(--line); }
body[data-view="preview"] .desk { display: block; }
body[data-view="preview"] .panel { display: none; }
@media (min-width: 1024px) {
    .desk { display: flex; flex-direction: column; position: sticky; top: calc(var(--head) + var(--dock, 0px) + 8px); height: calc(100vh - var(--head) - var(--dock, 0px) - 24px); min-height: 420px; }
    body[data-view="preview"] .panel { display: block; }
}
.desk-bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 0; flex-wrap: wrap; }
.desk-info { font-size: 0.85rem; color: var(--text-2); font-variant-numeric: tabular-nums; padding-left: 4px; }
.desk-bar #playBtn { margin-left: 4px; }
.desk-bar #playBtn.on { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.zoom { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.zoom .icon-btn { width: 36px; height: 36px; }
.zoom-val { min-width: 58px; height: 36px; border: 1px solid var(--surface-border); border-radius: 12px; background: var(--surface); color: var(--text-strong); font-family: inherit; font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.zoom-val:hover { border-color: var(--brand); color: var(--link); }
.desk-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 12px 0 24px; scrollbar-width: thin; }
.pages { display: flex; flex-direction: column; align-items: center; gap: 18px; width: max-content; min-width: 100%; padding: 0 12px; }
.pg { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.pg-label { align-self: stretch; display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-2); font-weight: 600; min-height: 28px; }
.pg-label .pg-n { font-variant-numeric: tabular-nums; }
.pg-card { position: relative; box-shadow: var(--paper-shadow); touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; line-height: 0; }
.pg-card canvas { display: block; }
.pg-card .sel-layer { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.selbox { position: absolute; border: 1.5px solid var(--rose); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7); pointer-events: none; transform-origin: center center; }
.selbox.hover { border-style: dashed; border-width: 1px; box-shadow: none; opacity: 0.8; }
.selbox.locked { border-color: var(--text-2); border-style: dotted; }
.handle { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 4px; background: #fff; border: 1.5px solid var(--rose); pointer-events: auto; touch-action: none; }
.handle.nw, .handle.se { cursor: nwse-resize; }
.handle.ne, .handle.sw { cursor: nesw-resize; }
.handle.e, .handle.w { cursor: ew-resize; width: 8px; height: 18px; margin: -9px 0 0 -4px; }
.handle.rot { border-radius: 50%; cursor: grab; width: 16px; height: 16px; margin: -8px 0 0 -8px; }
.handle.rot::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 14px; background: var(--rose); transform: translateX(-50%); }
@media (pointer: coarse) { .handle { width: 22px; height: 22px; margin: -11px 0 0 -11px; } .handle.e, .handle.w { width: 12px; height: 28px; margin: -14px 0 0 -6px; } .handle.rot { width: 24px; height: 24px; margin: -12px 0 0 -12px; } }
.guide { position: absolute; background: var(--rose); pointer-events: none; opacity: 0.85; }
.guide.v { width: 1px; top: 0; bottom: 0; }
.guide.h { height: 1px; left: 0; right: 0; }
.inline-edit { position: fixed; z-index: 40; margin: 0; padding: 0; border: 1.5px dashed var(--rose); border-radius: 2px; resize: none; overflow: hidden; background: rgba(255, 255, 255, 0.04); outline: none; white-space: pre-wrap; text-align: center; line-height: 1.2; caret-color: var(--rose); }
.elbar { position: fixed; z-index: 35; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18); max-width: calc(100vw - 16px); }
.elbar button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; min-width: 38px; padding: 6px 9px; border: 0; border-radius: 10px; background: transparent; color: var(--text-strong); font-family: inherit; font-size: 0.85rem; font-weight: 600; justify-content: center; cursor: pointer; }
.elbar button:hover { background: var(--surface-2); color: var(--link); }
.elbar button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.elbar button .ico { width: 17px; height: 17px; }
.elbar .sep { width: 1px; align-self: stretch; background: var(--line); margin: 4px 2px; }
.elbar .danger { color: var(--bad); }
@media (max-width: 559px) { .elbar .lbl { display: none; } }

/* ----- Details ----- */
.welcome { display: flex; flex-direction: column; gap: 14px; padding: 16px 0 18px; margin-bottom: 4px; }
.welcome h2 { font-size: 1.2rem; }
.occ-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.occ-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 88px; padding: 10px 6px; border-radius: 14px; text-align: center; border: 1px solid var(--surface-border); background: var(--surface); color: var(--text-strong); font-family: inherit; font-weight: 600; font-size: 0.85rem; line-height: 1.2; cursor: pointer; box-shadow: var(--surface-shadow); transition: border-color 0.2s ease, transform 0.2s ease; }
.occ-btn:hover { border-color: var(--brand); transform: translateY(-2px); }
.occ-btn[aria-pressed="true"] { border-color: var(--rose); box-shadow: 0 0 0 1px var(--rose); }
.occ-btn canvas { width: 32px; height: 32px; flex: none; }
.occ-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.occ-now { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.occ-now b { font-size: 1rem; color: var(--text-strong); }
.sample-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--rose-soft); color: var(--text); font-size: 0.875rem; margin: 6px 0 10px; }
.sample-note .ico { color: var(--rose); margin-top: 2px; }
.sec { border-bottom: 1px solid var(--line); }
.sec:first-of-type { border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: center; gap: 6px; min-height: 56px; }
.sec-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 0; border: 0; background: transparent; color: var(--text-strong); font-family: inherit; text-align: left; font-weight: 700; font-size: 1rem; cursor: pointer; }
.sec-toggle:hover .sec-title { color: var(--link); }
.sec-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.sec-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sec-count { color: var(--text-2); font-weight: 500; font-size: 0.85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sec-toggle .chev { margin-left: auto; color: var(--text-2); transition: transform 0.18s; }
.sec[data-open="true"] .sec-toggle .chev { transform: rotate(180deg); }
.sec-body { display: none; padding: 2px 0 20px; }
.sec[data-open="true"] .sec-body { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 480px) { .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.span2 { grid-column: 1 / -1; }
.f-head { display: flex; align-items: center; gap: 6px; min-height: 24px; }
.f-head .label { flex: 1; min-width: 0; }
.f-note { color: var(--text-2); font-size: 0.8rem; }
.f-note:empty { display: none; }
.f-note.bad { color: var(--bad); }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; }
.add-btn, .chip-add { border-style: dashed; }
.ev-card { border: 1px solid var(--surface-border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); box-shadow: var(--surface-shadow); }
.ev-head { display: flex; align-items: center; gap: 8px; }
.ev-head .select { flex: 1; }
.ev-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--rose-soft); color: var(--rose); display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; flex: none; }
.hint-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.time-sel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.time-sel .select { padding-left: 8px; padding-right: 4px; }
.photo-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.photo-thumb { width: 72px; aspect-ratio: 1; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-strong); display: grid; place-items: center; overflow: hidden; color: var(--text-2); flex: none; padding: 0; cursor: pointer; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb .ico { width: 28px; height: 28px; }
.photo-thumb:hover { border-color: var(--brand); }
textarea.input.short { min-height: 76px; }
.guest-list { min-height: 160px; }
.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.sym-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; padding: 6px 4px; border: 1px solid var(--surface-border); border-radius: 12px; background: var(--surface); font-family: inherit; font-size: 0.75rem; color: var(--text-2); text-align: center; cursor: pointer; }
.sym-btn:hover { border-color: var(--brand); color: var(--link); }
.sym-btn[aria-pressed="true"] { border-color: var(--rose); box-shadow: 0 0 0 1px var(--rose); color: var(--text-strong); }
.sym-btn .sym-pic { height: 32px; display: grid; place-items: center; color: var(--text-strong); }
.sym-btn canvas { width: 32px; height: 32px; }
.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px var(--rose); border-radius: 10px; } 100% { box-shadow: 0 0 0 3px transparent; } }

/* ----- Menus ----- */
.pop { position: fixed; z-index: 70; min-width: 220px; max-width: min(360px, calc(100vw - 24px)); max-height: min(70vh, 520px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18); padding: 6px; }
.pop.wide { max-width: min(440px, calc(100vw - 24px)); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 8px 10px; border: 0; background: transparent; color: var(--text-strong); border-radius: 10px; text-align: left; font-family: inherit; font-size: 0.925rem; cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); color: var(--link); outline: none; }
.menu-item .ico { color: var(--text-2); }
.menu-item .mi-sub { display: block; color: var(--text-2); font-size: 0.78rem; }
.menu-item.danger, .menu-item.danger .ico { color: var(--bad); }
.menu-item[disabled] { opacity: 0.45; cursor: not-allowed; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-label { font-size: 0.78rem; color: var(--text-2); font-weight: 600; padding: 6px 10px 2px; }

/* ----- Design ----- */
.dz { display: flex; flex-direction: column; gap: 24px; padding: 4px 0 8px; }
.dz-group { display: flex; flex-direction: column; gap: 10px; }
.dz-group > h2 { font-size: 1rem; }
.dz-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 480px) { .dz-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.size-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.size-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border: 1px solid var(--surface-border); border-radius: 14px; background: var(--surface); color: var(--text-2); font-family: inherit; font-size: 0.78rem; text-align: center; line-height: 1.25; cursor: pointer; }
.size-btn b { font-size: 0.82rem; color: var(--text-strong); }
.size-btn .shape { border: 1.5px solid var(--text-2); border-radius: 2px; background: var(--surface-2); }
.size-btn:hover { border-color: var(--brand); }
.size-btn[aria-pressed="true"] { border-color: var(--rose); box-shadow: 0 0 0 1px var(--rose); }
.size-btn[aria-pressed="true"] .shape { border-color: var(--rose); }
.size-btn .muted { color: var(--text-2); }
.tpl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
@media (min-width: 560px) and (max-width: 1023.98px), (min-width: 1280px) { .tpl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tpl-card { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: transparent; color: var(--text); font-family: inherit; text-align: left; min-width: 0; cursor: pointer; }
.tpl-thumb { position: relative; width: 100%; aspect-ratio: var(--ar, 0.714); border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }
.tpl-card:hover .tpl-thumb { border-color: var(--brand); transform: translateY(-2px); }
.tpl-card[aria-pressed="true"] .tpl-thumb { border-color: var(--rose); box-shadow: 0 0 0 2px var(--rose); }
.tpl-card canvas { width: 100%; height: 100%; display: block; }
.tpl-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
.tpl-name { font-weight: 700; font-size: 0.925rem; color: var(--text-strong); display: flex; align-items: center; gap: 6px; }
.tpl-name .ico { width: 16px; height: 16px; color: var(--rose); }
.tpl-desc { color: var(--text-2); font-size: 0.8rem; line-height: 1.35; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); padding: 0; background: conic-gradient(var(--a) 0 50%, var(--b) 0 100%); cursor: pointer; }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--text-strong); }
.swatch:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.color-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.color-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.75rem; color: var(--text-2); cursor: pointer; }
.color-pick input[type="color"], .role-swatches input[type="color"] { width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; padding: 0; background: none; cursor: pointer; overflow: hidden; }
.role-swatches input[type="color"] { width: 34px; height: 34px; }
.color-pick input[type="color"]::-webkit-color-swatch-wrapper, .role-swatches input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-pick input[type="color"]::-webkit-color-swatch, .role-swatches input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.font-sel { font-size: 1.05rem; }
.page-opts { display: flex; flex-direction: column; gap: 10px; }
.slider-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.slider-row output { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 0.875rem; }
.slider-row input { grid-column: 1 / -1; }

/* ----- Edit ----- */
.add-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.add-btn2 { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; min-height: 72px; justify-content: center; border: 1px solid var(--surface-border); border-radius: 14px; background: var(--surface); color: var(--text-strong); font-family: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; box-shadow: var(--surface-shadow); transition: border-color 0.2s ease, transform 0.2s ease; }
.add-btn2:hover { border-color: var(--brand); color: var(--link); transform: translateY(-2px); }
.add-btn2:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.add-btn2 .ico { width: 22px; height: 22px; }
.add-btn2 .t-big { font-size: 1.2rem; line-height: 22px; font-weight: 700; }
.add-btn2 .t-script { font-family: "Great Vibes", cursive; font-size: 1.5rem; line-height: 22px; }
.prop-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.prop-grid .span2 { grid-column: 1 / -1; }
@media (max-width: 479px) { .prop-grid { grid-template-columns: minmax(0, 1fr); } }
.role-swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.role-swatches button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); padding: 0; cursor: pointer; }
.role-swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text-strong); }
.role-swatches button:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.layers { display: flex; flex-direction: column; gap: 2px; }
.layer { display: flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border-radius: 10px; min-height: 40px; }
.layer.current { background: var(--rose-soft); }
.layer.off .layer-name { color: var(--text-2); text-decoration: line-through; text-decoration-thickness: 1px; }
.layer-name { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); text-align: left; padding: 6px 0; font-family: inherit; font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.layer-name:hover { color: var(--link); }
.layer-name small { color: var(--text-2); margin-left: 6px; }
.layer .mini-btn { width: 32px; height: 32px; }
.edit-empty { padding: 14px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--text-2); font-size: 0.9rem; display: flex; gap: 10px; align-items: flex-start; }
.mini-desk { display: none; }
@media (max-width: 1023.98px) {
    body[data-view="edit"] .mini-desk { display: block; position: sticky; top: var(--head); z-index: 12; background: var(--bg); padding: 6px 0 10px; margin-bottom: 8px; }
    body.typing .mini-desk { position: static; }
    .mini-desk .pg { align-items: center; }
}
.sticker-sec { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.sticker-sec h3 { font-size: 0.9rem; color: var(--text-strong); }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.sticker-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--surface-border); border-radius: 12px; background: var(--surface); font-family: inherit; font-size: 0.75rem; color: var(--text-2); cursor: pointer; }
.sticker-btn:hover { border-color: var(--brand); color: var(--link); }
.sticker-btn canvas { width: 64px; height: 64px; }

/* ----- Check ----- */
.ck { display: flex; flex-direction: column; gap: 16px; padding: 4px 0 8px; }
.ck-summary { display: flex; flex-direction: column; gap: 6px; }
.ck-summary h2 { font-size: 1.15rem; }
.notes { display: flex; flex-direction: column; gap: 8px; }
.ck-note { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--surface-border); background: var(--surface); }
.ck-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--rose-soft); color: var(--rose); }
.ck-ic .ico { width: 15px; height: 15px; stroke-width: 2.4; }
.ck-note.tip .ck-ic { background: var(--warn-soft); color: var(--warn); }
.ck-title { font-weight: 700; font-size: 0.925rem; color: var(--text-strong); }
.ck-text { grid-column: 2; color: var(--text-2); font-size: 0.85rem; }
.ck-actions { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.ck-actions .btn { min-height: 36px; padding: 6px 14px; font-size: 0.82rem; }

/* ----- Windows ----- */
.doc-list { display: flex; flex-direction: column; gap: 6px; list-style: none; margin: 0; padding: 0; }
.doc-row { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--surface-border); border-radius: 14px; }
.doc-row.current { border-color: var(--rose); }
.doc-open { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font-family: inherit; text-align: left; padding: 2px 0; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.doc-open .doc-ph { width: 36px; height: 48px; border-radius: 6px; flex: none; background: var(--surface-2); }
.doc-open b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-strong); }
.doc-open span span { color: var(--text-2); font-size: 0.8rem; display: block; }
.doc-open:hover b { color: var(--link); }
.crop { width: 100%; max-width: 300px; aspect-ratio: var(--ar, 1); margin: 0 auto; border-radius: 12px; overflow: hidden; background: var(--surface-2); touch-action: none; cursor: grab; }
.crop:active { cursor: grabbing; }
.crop canvas { width: 100%; height: 100%; display: block; }
.share-pre { white-space: pre-wrap; font-size: 0.85rem; max-height: 40vh; overflow: auto; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin: 0; font-family: inherit; color: var(--text); }
.busy { position: fixed; inset: 0; z-index: 2500; display: grid; place-items: center; background: rgba(10, 10, 20, 0.35); }
.busy > div { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; background: var(--surface); color: var(--text-strong); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); font-weight: 600; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--line-strong); border-top-color: var(--rose); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.video-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 680px) { .video-wrap { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.video-stage { background: var(--desk); border-radius: 14px; display: grid; place-items: center; padding: 10px; min-height: 240px; }
.video-stage canvas, .video-stage video { max-width: 100%; max-height: 62vh; display: block; box-shadow: var(--paper-shadow); }
.video-side { display: flex; flex-direction: column; gap: 14px; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.progress > div { height: 100%; width: 0; background: var(--rose); transition: width 0.15s; }
.guest-preview { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.guest-preview canvas { width: 150px; box-shadow: var(--paper-shadow); }
.guest-rows { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow: auto; list-style: none; margin: 0; padding: 0; }
.guest-rows li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 12px; }
.guest-rows li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guest-rows li.done span { color: var(--text-2); }
.help .plain-list li { color: var(--text-2); }
.help .plain-list b { color: var(--text-strong); }

/* ----- Phones and tablets ----- */
@media (max-width: 1023.98px) {
    .app-toolbar { flex-wrap: wrap; }
    .app-toolbar .view-tabs { order: 0; }
    .app-toolbar .doc-area { order: 1; flex: 1 1 100%; }
    .app-toolbar .toolbar-right { order: 2; }
}
@media (max-width: 639px) {
    .app-hero { margin-bottom: 1.5rem; }
    .app-tagline { font-size: 1rem; }
    .app-toolbar { gap: 10px; }
    /* five tabs at 16 px do not fit one row on a phone: three, then two, each row full */
    .app-toolbar .view-tabs { width: 100%; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; border-radius: 24px; }
    .app-toolbar .view-tab { grid-column: span 2; padding: 8px 4px; gap: 5px; min-width: 0; }
    .app-toolbar .view-tab:nth-child(n + 4) { grid-column: span 3; }
    .toolbar-right { width: 100%; margin-left: 0; flex-wrap: nowrap; gap: 6px; }
    .toolbar-right #downloadBtn { flex: 1 1 auto; padding: 8px 12px; gap: 6px; white-space: nowrap; min-width: 0; }
    .toolbar-right #videoBtn span, .toolbar-right #shareBtn span { display: none; }
    .toolbar-right #videoBtn, .toolbar-right #shareBtn { width: 44px; padding: 0; flex: none; }
    .saved { display: none; }
    .occ-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .size-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .add-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .toasts { bottom: 16px; right: 16px; left: 16px; align-items: stretch; }
    .toast { min-width: 0; max-width: none; }
    .dialog-body { padding: 16px; }
    .info-section h2 { font-size: 1.4rem; }
    .info-section .info-grid, .info-three { grid-template-columns: 1fr; }
    .info-card { padding: 16px; }
    .step-num { left: 16px; }
}
@media (max-width: 459px) {
    .view-tab .ico { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .btn, .info-card, .dialog, .dialog[open], .toast, .seg button, .chip, .view-tab, .occ-btn, .add-btn2, .tpl-thumb, .spinner, .flash, .progress > div, .sec-toggle .chev { transition: none; animation: none; }
}
@media (forced-colors: active) {
    .selbox, .handle, .guide { forced-color-adjust: none; }
}
/* The browser's own print shows only the pages of the card */
@media print {
    html, body { background: #fff !important; }
    body > *:not(main) { display: none !important; }
    main > *:not(.app-shell), .app-shell > *:not(.work), .work > *:not(.desk), .desk > *:not(.desk-scroll), .pg-label, .sel-layer { display: none !important; }
    main, .app-shell, .work, .desk, .desk-scroll { display: block !important; position: static !important; height: auto !important; overflow: visible !important; padding: 0 !important; margin: 0 !important; background: none !important; border: 0 !important; }
    .pg { break-after: page; }
    .pg-card { box-shadow: none !important; }
}
/* Phones: 16 px text, 44 px tap targets (AdSense audit H-04, 8 Oct 2026). The card, the design pictures and the occasion
   pictures are drawings. */
@media (max-width: 639.98px) {
    main button, main select, main summary, main [role="button"],
    main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="range"]):not([type="color"]) { min-height: 44px; }
    main .seg button, main .view-tab, main .chip, main .btn.small-btn, main .menu-item, main .ck-actions .btn { min-height: 44px; }
    main .icon-btn, main .mini-btn, main .zoom .icon-btn, main .layer .mini-btn { width: 44px; height: 44px; min-width: 44px; }
    main .zoom-val { height: 44px; }
    main input[type="range"] { min-height: 44px; }
    main .role-swatches button, main .role-swatches input[type="color"], main .swatch, main .color-pick input[type="color"] { width: 44px; height: 44px; }
    main .inline-check { min-height: 44px; }
    main .inline-check input { width: 22px; height: 22px; }
    main .seg button, .dialog .seg button { min-width: 44px; }
    main .tpl-card { min-height: 44px; }
    main .elbar button { min-width: 44px; min-height: 44px; }
    main :is(p, li, dt, dd, .hint, .label, .input, .select, kbd, .seg button, .chip, .btn, .view-tab, .sec-count, .saved, .desk-info,
        .occ-btn, .size-btn, .size-btn b, .tpl-name, .tpl-desc, .sym-btn, .add-btn2, .layer-name, .layer-name small, .ck-title, .ck-text,
        .f-note, .inline-check, .menu-item, .menu-item .mi-sub, .menu-label, .slider-row output, .edit-empty, .sample-note, .pg-label,
        .shell-hint, .doc-btn, .zoom-val, .elbar button) { font-size: 1rem; }
    .dialog button, .dialog .btn, .dialog select, .dialog summary,
    .dialog input:not([type="checkbox"]):not([type="range"]):not([type="color"]):not([type="file"]) { min-height: 44px; }
    .dialog input[type="range"] { min-height: 44px; }
    .dialog .icon-btn, .dialog .mini-btn { width: 44px; height: 44px; }
    .dialog .inline-check { min-height: 44px; }
    .dialog :is(p, li, .hint, .label, .input, .select, kbd, dt, dd, .seg button, .chip, .btn, .sticker-btn, .doc-open span span, .menu-item, .share-pre) { font-size: 1rem; }
    .pop .menu-item, .pop .menu-item .mi-sub, .pop .menu-label { font-size: 1rem; }
}
