:root { --ink:#3b2b20; --muted:#76685f; --line:#e9e1d8; --brand:#ffc629; --brand-dark:#805400; --coral:#ff5b5b; --beige:#f9eedd; --surface:#fff; --bg:#faf8f4; --ok:#087a4b; --danger:#b42318; }
.inline-confirmation { margin:12px 0; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--beige); color:var(--ink); font-size:14px; line-height:1.5; max-width:100%; grid-column:1/-1; }
.inline-confirmation p { margin:0 0 12px; }
.inline-confirmation-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.inline-confirmation-actions button:first-child { background:var(--brand); }
.inline-confirmation label { margin-bottom:12px; }
* { box-sizing:border-box; }
[hidden] { display:none!important; }
body { margin:0; min-height:100vh; color:var(--ink); background:radial-gradient(circle at 12% 0,#fff0c2 0,transparent 34%),var(--bg); background-repeat:no-repeat; font-family:"Segoe UI",Arial,sans-serif; }
.topbar { height:68px; padding:0 max(24px,calc((100vw - 1120px)/2)); display:flex; align-items:center; justify-content:space-between; background:rgba(255,255,255,.9); border-bottom:1px solid var(--line); backdrop-filter:blur(14px); position:sticky; top:0; z-index:20; }
.logo { color:var(--ink); font-size:22px; font-weight:800; text-decoration:none; }
.shell { max-width:1120px; margin:0 auto; padding:52px 24px; }
.auth-layout { display:grid; grid-template-columns:1.15fr .85fr; gap:72px; align-items:center; min-height:calc(100vh - 168px); }
.eyebrow { color:var(--brand-dark); text-transform:uppercase; font-weight:800; font-size:12px; letter-spacing:.08em; margin:0 0 10px; }
h1 { font-size:clamp(34px,5vw,58px); line-height:1.02; letter-spacing:-.04em; margin:0 0 20px; }
h2 { margin:0 0 8px; font-size:22px; }
.lead { color:var(--muted); font-size:19px; line-height:1.55; max-width:650px; }
.intro ul { padding-left:22px; line-height:2; }
.auth-card,.step,.operation-card { background:var(--surface); border:1px solid var(--line); border-radius:20px; box-shadow:0 18px 50px rgba(59,43,32,.07); }
.auth-card { padding:28px; }
.tabs { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; background:#f5eedf; border-radius:12px; margin-bottom:24px; }
button,.meta-button { border:0; border-radius:11px; padding:12px 17px; font:inherit; font-weight:700; color:var(--ink); background:var(--beige); cursor:pointer; text-decoration:none; display:inline-flex; justify-content:center; transition:transform .15s ease,background .15s ease,box-shadow .15s ease; }
button:not(:disabled):active { transform:translateY(1px); }
button:disabled { cursor:not-allowed; opacity:.55; }
.tab { background:transparent; color:var(--muted); }.tab.active { background:#fff; color:var(--ink); box-shadow:0 2px 8px rgba(59,43,32,.08); }
form { display:grid; gap:16px; } label { display:grid; gap:7px; color:#514033; font-size:14px; font-weight:650; }
input,select,textarea { width:100%; border:1px solid #d8cec2; border-radius:10px; padding:12px 13px; font:inherit; background:#fff; }
textarea { min-height:100px; resize:vertical; }
input:focus,select:focus,textarea:focus { outline:3px solid rgba(255,198,41,.28); border-color:var(--brand-dark); }
.primary,.meta-button { background:linear-gradient(135deg,var(--brand),#ffda66); color:var(--ink); box-shadow:0 8px 20px rgba(184,124,0,.14); }.primary:hover,.meta-button:hover { background:linear-gradient(135deg,#f4b716,#ffd34b); }
.secondary { background:#f5eedf; color:var(--brand-dark); margin-top:12px; }.link-button { color:var(--muted); background:transparent; }
.hint,.message { color:var(--muted); font-size:13px; margin:0; }.message { margin-top:14px; min-height:20px; }.message.error { color:var(--danger); }.message.warning { color:#9a5700; }.message.ok { color:var(--ok); }
.dashboard-heading { display:flex; justify-content:space-between; align-items:start; margin-bottom:28px; }.dashboard-heading h1 { font-size:38px; }
.badge { padding:8px 12px; background:#fff0c2; color:var(--brand-dark); border-radius:999px; font-size:13px; font-weight:750; }
.view-heading { display:flex; justify-content:space-between; gap:20px; align-items:center; margin-bottom:22px; }.view-heading h2 { font-size:28px; }
.steps { list-style:none; margin:0; padding:0; display:grid; gap:18px; }.step { display:grid; grid-template-columns:auto 1fr; gap:18px; padding:26px; box-shadow:none; }
.step.disabled { opacity:.55; }.number { width:34px; height:34px; border-radius:50%; display:grid; place-items:center; color:var(--ink); background:var(--brand); font-weight:800; }
.step-content>p { color:var(--muted); margin:0 0 18px; line-height:1.5; max-width:750px; }
.connected-card { display:flex; gap:12px; align-items:center; padding:14px; background:#ecfdf3; border-radius:12px; color:var(--ok); margin-bottom:14px; }.connected-card p { margin:3px 0 0; color:#49665a; }.check { font-size:24px; }
#accountPicker { max-width:520px; padding:16px; border:1px solid var(--line); border-radius:12px; margin:12px 0; }.loading { text-align:center; color:var(--muted); padding:80px 0; }
.campaign-form { max-width:820px; padding-top:8px; }.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }.checkbox { display:flex; grid-template-columns:auto 1fr; align-items:center; width:fit-content; }.checkbox input { width:18px; height:18px; }
.media-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px; margin-top:16px; }.media-card { border:1px solid var(--line); border-radius:12px; overflow:hidden; }.media-card img { width:100%; height:210px; object-fit:cover; display:block; }.media-card-body { padding:12px; display:grid; gap:8px; }.media-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }.media-actions button { min-width:0; padding:9px; white-space:normal; }.media-actions .wide-action { grid-column:1/-1; }.status-label { color:var(--muted); font-size:13px; }
.pairing-code { width:fit-content; margin-top:14px; padding:14px 20px; border:2px dashed var(--brand); border-radius:12px; font-size:28px; font-weight:800; letter-spacing:.12em; }
.optional-label { display:inline-block; margin-left:7px; padding:4px 8px; border-radius:999px; color:var(--brand-dark); background:#fff0c2; font-size:11px; font-weight:750; vertical-align:middle; }
.template-settings { display:grid; grid-template-columns:minmax(0,1fr) 220px; gap:28px; align-items:start; padding:20px; background:#fbf6ea; border:1px solid var(--line); border-radius:16px; }.template-fields { display:grid; gap:16px; }
.safety-setting { color:var(--ok); }.safety-setting input { accent-color:var(--ok); opacity:1; }
.template-preview { width:180px; aspect-ratio:2/3; padding:9px; display:flex; flex-direction:column; gap:8px; background:#fff; border:1px solid #e4d9ca; box-shadow:0 12px 28px rgba(59,43,32,.12); border-radius:4px; justify-self:center; }.template-photo { flex:1; display:grid; place-items:center; color:var(--ink); background:linear-gradient(145deg,#ffe394,#c79020); border-radius:2px; font-size:12px; }.template-caption { min-height:23px; display:grid; place-items:center; font-size:10px; font-weight:800; text-align:center; overflow:hidden; }.template-preview.full_portrait { padding:0; }.template-preview.full_portrait .template-caption { display:none; }.template-preview.classic_landscape { width:220px; aspect-ratio:3/2; }
.template-preview { position:relative; overflow:hidden; }.template-preview #templateOverlay { position:absolute; inset:0; width:100%; height:100%; object-fit:fill; pointer-events:none; }.template-upload-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }.template-upload-row button { margin:0; padding:7px 10px; }
.template-settings { grid-template-columns:1fr; max-width:100%; }.template-fields h3 { margin:0 0 6px; font-size:20px; }
.template-editor-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }.template-editor-toolbar .secondary { margin:0 0 0 auto; }
#templateFile { padding:6px; font-size:16px; font-weight:400; color:var(--muted); }
#templateFile::file-selector-button { margin:0 12px 0 0; border:0; border-radius:11px; padding:12px 17px; font:inherit; font-weight:700; color:var(--brand-dark); background:#f5eedf; cursor:pointer; }
#templateFile:not(:disabled)::file-selector-button:hover { background:#eee4ce; }
#templateFile:disabled { opacity:.55; cursor:not-allowed; }
#templateFile:disabled::file-selector-button { cursor:not-allowed; }
.template-editor { display:grid; grid-template-columns:minmax(280px,440px) minmax(240px,1fr); gap:22px; align-items:start; }
.template-editor .template-preview { width:100%; max-width:440px; aspect-ratio:2/3; padding:0; display:block; background:#eee9e1; touch-action:none; user-select:none; }
.template-editor .template-preview.editor-landscape { max-width:560px; aspect-ratio:3/2; }
.template-editor .template-preview #templateOverlay { z-index:1; }
.template-slots { position:absolute; inset:0; z-index:2; }
.template-slot { position:absolute; min-width:18px; min-height:18px; color:#fff; border:2px solid rgba(255,255,255,.95); box-shadow:0 0 0 1px rgba(59,43,32,.7); cursor:move; overflow:visible; font-size:13px; font-weight:800; }
.template-slot.selected { border-color:#fff; box-shadow:0 0 0 3px var(--brand); }
.slot-photo-frame { position:absolute; inset:0; display:block; overflow:hidden; background:repeating-conic-gradient(#eee9e1 0 25%,#fff 0 50%) 50%/16px 16px; pointer-events:none; }
.slot-demo-photo { display:block; width:100%; height:100%; pointer-events:none; }
.slot-number { position:absolute; left:7px; top:7px; z-index:1; min-width:24px; height:24px; padding:0 7px; display:grid; place-items:center; border-radius:999px; color:#fff; background:rgba(59,43,32,.88); box-shadow:0 1px 4px rgba(0,0,0,.25); pointer-events:none; }
.slot-resize { position:absolute; right:-7px; bottom:-7px; width:16px; height:16px; border:2px solid #fff; border-radius:3px; background:var(--brand-dark); cursor:nwse-resize; }
.template-inspector { display:grid; gap:15px; padding:18px; background:#fff; border:1px solid var(--line); border-radius:14px; }
.slot-inputs { display:grid; grid-template-columns:1fr 1fr; gap:12px; }.slot-inputs input { padding:9px 10px; }
.run-view { display:grid; gap:22px; }.run-header { display:flex; justify-content:space-between; align-items:center; gap:24px; padding:28px; color:var(--ink); border-radius:22px; background:linear-gradient(135deg,#ffe08a,#ffc629 70%,#ffd85b); box-shadow:0 22px 55px rgba(184,124,0,.14); }.run-header h2 { margin:4px 0 6px; font-size:34px; }.run-hashtag { margin:0; color:#684a24; font-size:18px; }.live-label { margin:0; text-transform:uppercase; letter-spacing:.08em; font-size:12px; font-weight:800; }.live-label span { display:inline-block; width:9px; height:9px; margin-right:6px; border-radius:50%; background:#5ef0a6; box-shadow:0 0 0 6px rgba(94,240,166,.16); }.run-actions { display:flex; gap:10px; }.run-actions .secondary { margin:0; background:rgba(255,255,255,.7); color:var(--ink); }.danger-button { background:#fff4f1; color:var(--danger); border:1px solid #edbcb2; }
.live-label.paused span { background:#ffd36b; box-shadow:0 0 0 6px rgba(255,211,107,.16); }.live-label.stopped { color:var(--danger); }.live-label.stopped span { background:var(--danger); box-shadow:0 0 0 6px rgba(180,35,24,.12); }.run-actions .resume-button { background:#fff; color:var(--brand-dark); }
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }.stats-grid article { padding:20px; background:#fff; border:1px solid var(--line); border-radius:16px; }.stats-grid span { display:block; font-size:30px; font-weight:850; }.stats-grid strong { display:block; min-height:36px; color:var(--brand-dark); font-size:17px; }.stats-grid p { margin:6px 0 0; color:var(--muted); font-size:13px; }.operation-card { padding:26px; }.section-heading { display:flex; justify-content:space-between; align-items:center; }.section-heading p { margin:4px 0 0; color:var(--muted); }
.media-card { background:#fff; transition:transform .16s ease,box-shadow .16s ease; }.media-card:hover { transform:translateY(-2px); box-shadow:0 12px 28px rgba(59,43,32,.1); }
.context-menu { position:fixed; z-index:100; min-width:220px; padding:6px; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 16px 40px rgba(59,43,32,.18); }.context-menu button { width:100%; background:#fff; color:var(--ink); text-align:left; justify-content:flex-start; }.context-menu button:hover { background:#f5eedf; color:var(--brand-dark); }
.context-status { max-width:300px; margin:0; padding:10px 12px; color:var(--muted); font-size:13px; line-height:1.35; }
.preview-modal { position:fixed; inset:0; z-index:110; padding:30px; background:rgba(59,43,32,.72); display:grid; place-items:center; }.preview-dialog { width:min(760px,100%); max-height:calc(100vh - 60px); overflow:auto; padding:22px; background:#fff; border-radius:18px; }.preview-dialog img { display:block; max-width:100%; max-height:70vh; margin:18px auto 0; box-shadow:0 12px 35px rgba(59,43,32,.18); }
.browser-baked-preview { container-type:inline-size; position:relative; width:min(100%,560px); margin:18px auto 0; overflow:hidden; background:#fff; box-shadow:0 12px 35px rgba(59,43,32,.18); }.browser-baked-preview .baked-template,.browser-baked-preview .baked-photo { position:absolute; display:block; margin:0; max-width:none; max-height:none; box-shadow:none; }.browser-baked-preview .baked-template { inset:0; z-index:0; width:100%; height:100%; object-fit:fill; }.browser-baked-preview .baked-photo { z-index:1; }.browser-baked-preview .demo-band { display:none !important; }.browser-baked-preview .demo-band img { width:13%; height:85%; object-fit:contain; margin:0; box-shadow:none; }
@media(max-width:760px){ .shell{padding:28px 16px}.auth-layout{grid-template-columns:1fr;gap:28px}.intro h1{font-size:38px}.dashboard-heading{display:grid;gap:12px}.step{padding:18px}.meta-button,.primary{width:100%} }
@media(max-width:760px){ .form-grid,.template-settings,.stats-grid,.template-editor{grid-template-columns:1fr}.template-preview{justify-self:start}.view-heading,.run-header{align-items:stretch;flex-direction:column}.run-actions{display:grid;grid-template-columns:1fr 1fr}.run-header h2{font-size:28px} }

button:focus-visible,a:focus-visible { outline:3px solid var(--ink); outline-offset:3px; }
input[type="checkbox"] { accent-color:var(--brand-dark); }
.primary:hover,.meta-button:hover { box-shadow:0 8px 22px rgba(184,124,0,.22); }
.primary:disabled,.meta-button:disabled { background:#eee7dc; color:#76685f; box-shadow:none; }
.link-button:hover { color:var(--ink); background:var(--beige); }
.logo { display:inline-flex; align-items:center; gap:10px; }
.logo-symbol { width:42px; height:44px; object-fit:contain; }
.logo-wordmark { width:174px; height:auto; max-height:36px; object-fit:contain; }
.danger-button { background:var(--coral); color:var(--ink); border-color:transparent; }
@media(max-width:420px) { .logo-symbol { width:34px; height:36px; } .logo-wordmark { width:140px; } .logo { gap:8px; } }
@media(max-width:760px) { .run-actions { grid-template-columns:repeat(2,minmax(0,1fr)); } .run-actions button { min-width:0; padding-inline:10px; overflow-wrap:anywhere; } }
@media(prefers-reduced-motion:reduce) { button,.meta-button,.media-card { transition:none; } }

/* Cabinet: preparation stays compact; editing and photo inspection have their own space. */
.sync-line { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.sync-line p { margin:8px 0; flex:1; min-width:200px; }
.station-list { display:grid; gap:8px; margin:12px 0; }
.station-row { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--line); font-size:13px; }
.station-row span { min-width:0; overflow-wrap:anywhere; }
.danger-text { color:var(--danger); }
.pending-sheet { background:var(--beige); border:1px solid var(--line); border-radius:14px; padding:16px; }
.pending-sheet h3 { margin:0 0 8px; font-size:16px; }
.pending-sheet ol { margin:0; padding-left:22px; }
.pending-sheet li { padding:6px 0; }
.pending-sheet li button { margin-left:12px; }
.topbar-actions { display:flex; align-items:center; gap:8px; }
.account-settings-dialog { width:min(480px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto; padding:24px; color:var(--ink); border:1px solid var(--line); border-radius:18px; }
.account-settings-dialog::backdrop { background:#3b2b2099; }
.account-settings-dialog .section-heading { align-items:start; gap:12px; }
.account-settings-dialog h2 { margin:0; font-size:22px; }
.account-settings-dialog h3 { margin:20px 0 16px; font-size:16px; }
.account-settings-dialog form { display:grid; gap:12px; }
.account-sections { display:flex; gap:4px; padding:4px; margin-top:18px; border-radius:12px; background:var(--beige); }
.account-sections button { flex:1; min-width:0; padding:9px; font-size:13px; background:transparent; }
.account-sections button[aria-current="page"] { background:#fff; box-shadow:0 2px 5px #3b2b2010; }
.account-settings-dialog details form { margin-top:16px; }
.event-folders-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:16px; margin-top:18px; }
.event-folder { display:grid; gap:10px; padding:20px; border:1px solid var(--line); border-radius:16px; background:#fff; color:var(--ink); text-align:left; justify-content:stretch; align-content:start; }
.event-folder:hover { background:#fffbf1; border-color:var(--brand-dark); }
.event-folder-groups { display:grid; gap:28px; margin-top:18px; }
.event-folder-group h3 { margin:0; font-size:17px; }
.event-folder-group > .hint { margin-top:6px; }
.event-folder-item { min-width:0; display:flex; flex-direction:column; align-items:stretch; border:1px solid var(--line); border-radius:16px; background:#fff; overflow:hidden; }
.event-folder-item .event-folder { flex:1; width:100%; border:0; border-radius:0; display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; }
.event-folder-item .event-folder:focus-visible { outline-offset:-4px; }
.event-folder-footer { display:flex; align-items:center; min-height:60px; padding:10px 16px; border-top:1px solid var(--line); }
.event-folder-footer .hint { line-height:1.5; }
.event-folder-item .delete-archive { margin:0; padding:9px 12px; font-size:13px; background:#fff4f1; color:var(--danger); border:1px solid #edbcb2; }
.folder-open-label { margin-top:auto; padding-top:8px; font-size:14px; color:var(--brand-dark); }
.event-folder strong { font-size:18px; overflow-wrap:anywhere; }
.event-folder .folder-symbol { width:48px; height:36px; border-radius:4px 8px 8px 8px; background:var(--brand); position:relative; margin-top:6px; }
.folder-symbol::before { content:""; position:absolute; width:22px; height:8px; top:-5px; left:0; background:var(--brand); border-radius:4px 4px 0 0; }
.event-folder .hint { margin:0; font-weight:400; }
.event-photos-view { display:grid; gap:18px; }
.folder-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.folder-actions button { margin:0; min-height:44px; width:auto; align-items:center; }
#eventFoldersView > .section-heading { gap:12px; flex-wrap:wrap; }
.folder-breadcrumb { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.folder-back { background:#fff; border:1px solid #d8cec2; gap:9px; align-items:center; min-height:44px; }
.folder-back:hover { background:var(--beige); }
#deleteArchiveButton { margin-left:auto; min-height:44px; align-items:center; background:#fff4f1; color:var(--danger); border:1px solid #edbcb2; }
.station-row-actions { display:flex; gap:4px; flex-wrap:wrap; justify-content:flex-end; }
@media(max-width:520px) { .event-folders-grid { grid-template-columns:1fr; } .station-row { flex-wrap:wrap; } .station-row-actions { width:100%; justify-content:flex-start; } }
.station-identity { display:grid; gap:4px; min-width:0; }
.station-identity small { color:var(--muted); font-size:11px; }
@media(max-width:520px) { body > .topbar { height:auto; min-height:60px; flex-wrap:wrap; padding-block:10px; gap:8px; } .topbar-actions { margin-left:auto; } .topbar-actions button { font-size:12px; padding:7px; } .account-settings-dialog { padding:18px; } }
.retry-image { width:100%; font-size:12px; }
.shell { max-width:1280px; padding:24px 28px; }
.topbar { height:60px; padding:0 max(28px,calc((100vw - 1224px)/2)); }
.dashboard-heading { align-items:center; margin-bottom:18px; gap:16px; }
.dashboard-heading h1 { font-size:26px; margin:0; overflow-wrap:anywhere; }
.dashboard-heading .eyebrow { margin-bottom:5px; font-size:10px; }
.cabinet-toolbar,.campaign-control,.cabinet-nav { display:flex; align-items:center; gap:14px; }
.cabinet-toolbar { justify-content:space-between; padding-bottom:16px; border-bottom:1px solid var(--line); }
.cabinet-nav { gap:4px; border-radius:12px; padding:4px; background:#eee8dc; }
.cabinet-nav button { background:transparent; padding:10px 18px; }
.cabinet-nav button[aria-current="page"] { background:#fff; box-shadow:0 2px 6px #3b2b2010; }
.campaign-control .live-label { font-size:11px; letter-spacing:0; white-space:nowrap; text-transform:none; }
.toolbar-message:empty,.message:empty { display:none; }
.toolbar-message { margin:10px 0; }
.settings-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-top:18px; align-items:start; }
.settings-card { min-width:0; background:white; padding:22px; border:1px solid var(--line); border-radius:16px; }
.settings-card h2 { font-size:19px; margin-bottom:18px; }
.settings-card h3 { font-size:15px; margin:0 0 8px; }
.settings-card .form-grid { gap:12px; }
.settings-card input,.settings-card select { padding:10px 11px; min-width:0; }
.settings-card label { min-width:0; font-size:13px; }
.settings-card .full-row { grid-column:1/-1; }
.settings-card fieldset { border:0; padding:0; margin:18px 0 0; min-width:0; }
.instagram-line { border-bottom:1px solid var(--line); padding-bottom:14px; }
#instagramConnected { display:flex; justify-content:space-between; align-items:center; gap:8px; }
#instagramConnected>div { min-width:0; overflow-wrap:anywhere; }
#metaName { display:block; margin-top:4px; }
#accountPicker { padding:10px; margin:10px 0 0; }
#accountPicker button { margin-top:8px; }
.settings-footer { display:flex; gap:18px; align-items:center; padding-top:18px; }
.settings-footer .message { margin:0; }
.template-summary { display:flex; gap:14px; justify-content:space-between; align-items:center; padding:14px; border-radius:12px; background:var(--beige); margin-bottom:20px; }
.template-summary .secondary { margin:0; background:white; }
.template-summary .hint { margin-top:5px; }
.settings-card .checkbox { align-items:start; line-height:1.4; margin-bottom:8px; }
.checkbox input { flex:0 0 18px; padding:0; }
.station-summary { margin-top:20px; padding-top:18px; border-top:1px solid var(--line); }
.station-summary .secondary { padding:10px 13px; }
.interval-hint { margin-top:12px; }
details { margin-top:14px; font-size:13px; color:var(--muted); line-height:1.5; }
summary { cursor:pointer; color:var(--brand-dark); font-weight:650; }
details p { margin:8px 0 0; }
.template-dialog { width:min(1050px,calc(100vw - 36px)); max-height:calc(100dvh - 36px); padding:24px; border:1px solid var(--line); border-radius:18px; color:var(--ink); overflow:auto; }
.template-dialog::backdrop { background:#3b2b2099; }
.template-dialog>.section-heading { gap:12px; align-items:start; margin-bottom:18px; }
.template-dialog .template-fields>div:has(>h3) { display:none; }
.template-editor { grid-template-columns:minmax(200px,1fr) minmax(210px,.65fr); align-items:start; }
.template-editor .template-preview { width:auto; height:min(52vh,530px); max-width:100%; justify-self:center; }
.template-editor .template-preview.editor-landscape { width:100%; height:auto; max-height:530px; }
.template-dialog .template-fields { gap:12px; }
.template-dialog .template-upload-row { flex-wrap:wrap; }
.template-dialog input[type="file"] { max-width:100%; }
.template-dialog .section-heading h2 { font-size:22px; }
.run-view { gap:12px; margin-top:18px; }
.photos-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.photos-heading h2 { font-size:20px; margin:0; }
.photos-heading>div { display:flex; align-items:baseline; gap:12px; min-width:0; flex-wrap:wrap; }
.photos-heading .run-hashtag { font-size:14px; overflow-wrap:anywhere; }
.stats-line { display:flex; gap:22px; flex-wrap:wrap; color:var(--muted); font-size:13px; }
.stats-line b { color:var(--ink); margin-left:5px; }
.photo-filters { display:flex; gap:6px; flex-wrap:wrap; }
.photo-filters button { padding:8px 13px; background:#eee8dc; font-size:13px; }
.photo-filters button[aria-pressed="true"] { background:var(--brand); }
.source-filters b { margin-left:6px; }
.photos-workspace { display:block; }
.media-grid { grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); margin:0; gap:12px; }
.media-card { min-width:0; border:2px solid transparent; background:white; }
.media-card.selected { border-color:var(--brand-dark); box-shadow:0 0 0 2px #ffc62955; }
.media-card:hover { transform:none; }
.select-photo { display:block; width:100%; padding:0; background:white; border-radius:9px; text-align:left; }
.media-card img { height:auto; aspect-ratio:1; }
.photo-thumbnail { position:relative; aspect-ratio:1; background:#f3efe7; display:grid; place-items:center; overflow:hidden; }
.photo-thumbnail img { width:100%; height:100%; object-fit:cover; }
.photo-thumbnail.print-thumbnail img { object-fit:contain; }
.photo-placeholder { color:var(--muted); font-size:12px; padding:20px; text-align:center; }
.photo-source { position:absolute; bottom:8px; right:8px; background:#fffdf5ec; color:var(--ink); border-radius:6px; padding:4px 7px; font-size:10px; }
.photo-thumbnail.unavailable { background:repeating-linear-gradient(135deg,#f6f3ed,#f6f3ed 12px,#eeebe4 12px,#eeebe4 24px); }
.media-card-body { padding:9px; }
.media-card .status-label { font-size:12px; font-weight:500; }
.empty-media { grid-column:1/-1; color:var(--muted); padding:25px 12px; line-height:1.6; border:1px dashed var(--line); border-radius:12px; }
.preview-modal { display:none; }
.preview-modal.is-open { display:grid; position:fixed; inset:0; z-index:110; padding:24px; place-items:center; background:#3b2b20bb; }
body.photo-preview-open { overflow:hidden; }
.preview-dialog { width:min(680px,100%); max-height:calc(100dvh - 48px); padding:22px; overflow:auto; border:1px solid var(--line); border-radius:16px; }
.preview-dialog h2 { font-size:18px; }
.preview-dialog .section-heading p { font-size:12px; line-height:1.45; }
.preview-dialog>img { max-height:48vh; object-fit:contain; }
.preview-dialog .browser-baked-preview { width:min(100%,320px); }
.preview-dialog .browser-baked-preview[style*="1800/1200"] { width:100%; }
.preview-dialog .media-actions { margin-top:16px; }
#selectedMediaActions { display:block; }
#closeBakedPreview { display:inline-flex; padding:8px; }
#previewActionMessage { display:block; }
.access-banner { margin-bottom:16px; padding:14px 18px; border:1px solid #edbcb2; background:#fff0e8; color:#8b281d; border-radius:12px; font-size:14px; line-height:1.5; }
.access-banner:focus { outline:3px solid var(--coral); outline-offset:3px; }
.badge.expired { background:#ffe0d7; color:#8b281d; }
#changeInstagram { color:var(--brand-dark); background:var(--beige); border:1px solid #e3d2ad; }
.account-picker-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.account-picker-actions .secondary { margin-top:8px; }
.template-summary-text { flex:1; min-width:0; }
.template-summary-preview { display:flex; align-items:center; justify-content:center; flex:0 0 140px; width:140px; height:150px; padding:5px; border-radius:6px; background:#fff; border:1px solid #ddceba; }
.template-summary-layers { position:relative; display:block; width:100%; max-height:100%; overflow:hidden; background:#eee9e1; color:var(--muted); font-size:11px; }
.template-summary-layers img { position:absolute; display:block; }
.template-summary-layers .summary-background { inset:0; width:100%; height:100%; object-fit:fill; }
.template-summary-layers .summary-photo { z-index:1; }
@media(max-width:1000px) and (min-width:761px) { .campaign-control { flex-direction:column; gap:6px; align-items:flex-end; } }
@media(max-width:760px) {
  body.photo-preview-open { overflow:hidden; } #previewActionMessage { display:block; }
  .template-summary { flex-wrap:wrap; }.template-summary-preview { flex-basis:100px; width:100px; height:120px; }.template-summary .secondary { margin-left:auto; }.account-picker-actions { display:grid; }.account-picker-actions .secondary { margin:0; }
  .shell { padding:18px 14px; }.topbar { padding:0 14px; }.dashboard-heading { display:flex; flex-wrap:wrap; margin-bottom:14px; gap:8px; }.dashboard-heading h1 { font-size:23px; }.badge { font-size:11px; padding:6px 9px; }
  .cabinet-toolbar { flex-direction:column; align-items:stretch; gap:12px; }.cabinet-nav { display:grid; grid-template-columns:1fr 1fr; }.cabinet-nav button { padding:10px; min-width:0; }.campaign-control { justify-content:space-between; gap:8px; }.campaign-control .primary { width:auto; padding:10px; font-size:12px; }.campaign-control .live-label { font-size:10px; white-space:normal; }
  .settings-grid { grid-template-columns:1fr; gap:14px; }.settings-card { padding:17px; }.settings-card .form-grid { grid-template-columns:1fr; }.settings-footer { flex-direction:column; align-items:stretch; gap:10px; }.template-summary { padding:11px; gap:8px; }.template-summary button { padding:10px; font-size:12px; }.template-summary strong { font-size:13px; }.instagram-line .link-button { padding:8px; }
  .template-dialog { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); padding:14px; }.template-editor { grid-template-columns:1fr; gap:14px; }.template-editor .template-preview { height:auto; width:min(100%,300px); }.template-editor .template-preview.editor-landscape { width:100%; }.template-dialog .section-heading h2 { font-size:18px; }.template-dialog .section-heading .link-button { padding:8px; }.template-editor-toolbar { gap:6px; }.template-editor-toolbar button { font-size:12px; padding:9px; }.template-editor-toolbar .secondary { margin-left:0; }.template-inspector { padding:12px; }.slot-inputs { gap:8px; }
  .photos-heading { align-items:start; }.photos-heading h2 { font-size:18px; overflow-wrap:anywhere; }.photos-heading .badge { max-width:110px; }.stats-line { gap:7px 14px; font-size:12px; }.photo-filters { gap:4px; }.photo-filters button { font-size:12px; padding:8px 10px; }.photos-workspace { display:block; }.media-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .preview-modal { display:none; }.preview-modal.is-open { display:grid; position:fixed; inset:0; z-index:110; padding:10px; place-items:center; background:#3b2b20bb; }.preview-dialog { max-height:calc(100dvh - 20px); overflow:auto; padding:14px; }.preview-dialog>.section-heading { align-items:start; gap:8px; }.preview-dialog>img { max-height:46dvh; }.preview-dialog .browser-baked-preview { max-width:250px; }#closeBakedPreview { display:inline-flex; padding:7px; }.preview-dialog .section-heading h2 { font-size:17px; }
}
.photo-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0; }
.source-fields { border:0; padding:0; margin:0 0 12px; display:flex; flex-wrap:wrap; gap:10px; }
.source-fields legend { font-weight:650; margin-bottom:10px; }
.source-choice { display:flex; align-items:center; gap:9px; padding:10px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface,#fff); cursor:pointer; }
.source-choice:has(input:checked) { border-color:var(--brand-dark); background:#fff4cc; }
.source-choice input { width:18px; height:18px; margin:0; accent-color:var(--brand-dark); }
.source-choice:has(input:disabled) { opacity:.65; cursor:default; }
#sourceFields { margin-top:6px; }
#sourceMessage { margin:0; line-height:1.4; }
#sourceMessage:empty { display:none; }
#campaignFields { margin-top:0; }
.provider-label { font-size:11px; color:var(--muted); font-weight:650; }

.ui-update-notice { position:fixed; z-index:10000; bottom:16px; left:16px; right:16px; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:12px; padding:16px; border:1px solid #ddcaa9; border-radius:14px; background:#fff8e8; color:#3b2b20; box-shadow:0 6px 24px #0002; }
