/* המצגת של סיוון - app styles (mobile first, RTL) */
:root {
  --bg: #F5F3EE; --surface: #FFFFFF; --surface-2: #F0EDE6; --surface-3: #E7E3D9;
  --text: #1D1B2C; --muted: #6E6A7C; --line: #E3DFD4;
  --primary: #3A3DD6; --primary-ink: #FFFFFF; --primary-soft: #E7E8FD; --primary-2: #2C2FB0;
  --gold: #DFA63A; --gold-soft: #FBF0D9; --danger: #D64545; --danger-soft: #FCE8E8; --ok: #17945F; --ok-soft: #E2F5EC;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 20, 40, .05), 0 8px 24px rgba(20, 20, 40, .07);
  --shadow-lg: 0 10px 40px rgba(20, 20, 40, .18);
  --font: 'Rubik', 'Heebo', 'Segoe UI', system-ui, sans-serif;
  --nav-h: 64px; --head-h: 58px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12121A; --surface: #1C1C27; --surface-2: #242431; --surface-3: #2E2E3D;
    --text: #F1F0F6; --muted: #A3A1B3; --line: #33334A;
    --primary: #7C80FF; --primary-ink: #0E0E1A; --primary-soft: #262A5C; --primary-2: #9EA1FF;
    --gold-soft: #3A3020; --danger-soft: #3B1F24; --ok-soft: #173327;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; }
body { min-height: 100vh; min-height: 100dvh; overscroll-behavior-y: contain; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); }
img { max-width: 100%; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); font-size: 18px; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px); }
.topbar {
  position: sticky; top: 0; z-index: 30; height: calc(var(--head-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0;
  display: flex; align-items: center; gap: 12px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; white-space: nowrap; text-decoration: none; color: var(--text); }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.topbar .grow { flex: 1; min-width: 0; }
.savechip { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.savechip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.savechip.pending .dot, .savechip.saving .dot { background: var(--gold); animation: pulse 1s infinite; }
.savechip.error .dot { background: var(--danger); }
@keyframes pulse { 50% { opacity: .35; } }
.topnav { display: none; gap: 4px; }
.navbtn {
  display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-size: 12px; padding: 6px 4px; flex: 1; border-radius: 12px; text-decoration: none;
}
.navbtn svg { width: 24px; height: 24px; }
.navbtn.on { color: var(--primary); }
.bottomnav {
  position: fixed; inset: auto 0 0 0; z-index: 30; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 6px 8px env(safe-area-inset-bottom); display: flex; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
@media (min-width: 900px) {
  .bottomnav { display: none; }
  .shell { padding-bottom: 40px; }
  .topnav { display: flex; }
  .topnav .navbtn { flex-direction: row; font-size: 15px; padding: 8px 14px; gap: 8px; }
  .topnav .navbtn.on { background: var(--primary-soft); }
  .topnav .navbtn svg { width: 20px; height: 20px; }
}
.page { max-width: 1120px; margin: 0 auto; padding: 18px 16px 24px; }
.page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.page-head h1 { font-size: 24px; margin: 0; flex: 1; min-width: 160px; }
.page-head .sub { color: var(--muted); font-size: 14px; width: 100%; margin-top: -6px; }
h2 { font-size: 19px; margin: 22px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }
.hide-mobile { display: none; }
@media (min-width: 700px) { .hide-mobile { display: initial; } .hide-desktop { display: none !important; } }

/* ---------- cards & buttons ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 500;
  text-decoration: none; color: var(--text); white-space: nowrap; transition: transform .08s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-2); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1D1B2C; }
.btn.soft { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.big { min-height: 56px; font-size: 18px; padding: 0 26px; border-radius: 16px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.iconbtn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; border: 0; background: transparent; cursor: pointer; color: var(--text); flex: none; }
.iconbtn:active { background: var(--surface-2); }
.iconbtn svg { width: 24px; height: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-size: 14px; cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .count { opacity: .6; font-size: 12px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--primary); color: var(--primary-ink); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; background: var(--surface-2); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--gold-soft); color: #8A5A00; }
.pill.bad { background: var(--danger-soft); color: var(--danger); }

/* ---------- forms ---------- */
label.field { display: block; }
label.field > span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  outline: none; font-size: 16px;
}
textarea.input { min-height: 70px; resize: vertical; line-height: 1.4; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 6px 0; }
.switch input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; }
.range { width: 100%; accent-color: var(--primary); }
.seg { display: inline-flex; background: var(--surface-2); padding: 3px; border-radius: 12px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 8px 14px; border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-weight: 500; }

/* ---------- home ---------- */
.hero-card { position: relative; overflow: hidden; border-radius: 22px; color: #fff; background: linear-gradient(160deg, #0A1330, #1C2D61); box-shadow: var(--shadow-lg); }
.hero-card .slide { border-radius: 0; box-shadow: none; }
.hero-card .hero-text { padding: 18px 20px 20px; background: linear-gradient(180deg, rgba(10, 19, 48, 0), rgba(10, 19, 48, .2)); }
.hero-card h1 { margin: 0 0 4px; font-size: 24px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 24px; }
.stat span { color: var(--muted); font-size: 13px; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.meter > i { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .3s; }
.meter.over > i { background: var(--gold); }
.steps { display: grid; gap: 10px; }
.step { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); cursor: pointer; text-decoration: none; color: inherit; }
.step .num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; flex: none; }
.step.done .num { background: var(--ok-soft); color: var(--ok); }
.step b { display: block; }
.step span { color: var(--muted); font-size: 14px; }
.step .go { margin-inline-start: auto; color: var(--muted); }

/* ---------- photo grid ---------- */
.grid-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
@media (min-width: 600px) { .grid-photos { grid-template-columns: repeat(5, 1fr); gap: 6px; } }
@media (min-width: 1000px) { .grid-photos { grid-template-columns: repeat(7, 1fr); } }
.ph { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--surface-3); cursor: pointer; border: 0; padding: 0; }
.ph .im { position: absolute; inset: 0; background-size: cover; background-position: center; transition: opacity .25s; }
.ph .tag { position: absolute; bottom: 4px; inset-inline-start: 4px; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 99px; background: rgba(0, 0, 0, .62); color: #fff; }
.ph .fav { position: absolute; top: 4px; inset-inline-end: 4px; font-size: 15px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.ph .wait { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: var(--muted); text-align: center; padding: 6px; }
.ph.sel::after { content: ''; position: absolute; inset: 0; border: 4px solid var(--primary); border-radius: 6px; background: rgba(58, 61, 214, .18); }
.ph .check { position: absolute; top: 5px; inset-inline-start: 5px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .25); display: grid; place-items: center; color: #fff; font-size: 14px; z-index: 2; }
.ph.sel .check { background: var(--primary); border-color: var(--primary); }
.shimmer { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

.chapter-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .chapter-cards { grid-template-columns: repeat(4, 1fr); } }
.chapter-card { background: var(--surface); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; border: 0; padding: 0; text-align: start; }
.chapter-card .cv { aspect-ratio: 4/3; background: var(--surface-3); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; }
.chapter-card .cv > div { background-size: cover; background-position: center; background-color: var(--surface-2); }
.chapter-card .cv.one { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.chapter-card .meta { padding: 10px 12px; }
.chapter-card .meta b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chapter-card .meta span { font-size: 13px; color: var(--muted); }
.chapter-card.new { display: grid; place-items: center; min-height: 140px; border: 2px dashed var(--line); background: transparent; box-shadow: none; color: var(--muted); font-weight: 500; }

/* ---------- bottom sheet / modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(14, 14, 28, .45); display: flex; align-items: flex-end; justify-content: center; animation: fadein .15s; }
@media (min-width: 700px) { .overlay { align-items: center; padding: 24px; } }
@keyframes fadein { from { opacity: 0; } }
.sheet {
  background: var(--bg); width: 100%; max-width: 680px; max-height: 92vh; max-height: 92dvh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: slideup .22s cubic-bezier(.2, .9, .3, 1); padding-bottom: env(safe-area-inset-bottom);
}
.sheet.wide { max-width: 980px; }
.sheet.full { height: 92vh; height: 92dvh; }
@media (min-width: 700px) { .sheet { border-radius: 22px; max-height: 88vh; } .sheet.full { height: 88vh; } }
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px 16px; border-bottom: 1px solid var(--line); }
.sheet-head h3 { margin: 0; font-size: 18px; flex: 1; }
.sheet-body { padding: 16px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; }
.sheet-foot .btn { flex: 1; }

.toast {
  position: fixed; z-index: 90; inset-inline: 16px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px); margin: 0 auto; max-width: 520px;
  background: #1D1B2C; color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center;
  animation: slideup .2s;
}
.toast.bad { background: var(--danger); }
.toast.ok { background: #145C3F; }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* ---------- uploads ---------- */
.upload-panel { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); z-index: 20; margin-top: 14px; }
@media (min-width: 900px) { .upload-panel { bottom: 16px; } }
.upload-panel .card { padding: 12px 14px; }
.upload-list { max-height: 160px; overflow-y: auto; margin-top: 8px; font-size: 13px; }
.upload-list div { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.notice { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--gold-soft); margin-bottom: 14px; font-size: 14px; }
.notice.info { background: var(--primary-soft); }
.notice.bad { background: var(--danger-soft); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-inline-end-color: transparent; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- slide view (shared renderer) ---------- */
.slide { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #111; box-shadow: var(--shadow); }
.slide .stage { position: absolute; top: 0; left: 0; width: 1920px; height: 1080px; transform-origin: 0 0; direction: ltr; overflow: hidden; }
.slide .it { position: absolute; }
.slide .im { background-size: cover; background-repeat: no-repeat; background-color: rgba(127, 127, 127, .25); }
.slide .tx { display: flex; flex-direction: column; text-align: center; direction: rtl; line-height: 1.2; white-space: pre-wrap; overflow-wrap: anywhere; }
.slide .slot { display: grid; place-items: center; border: 6px dashed rgba(255, 255, 255, .55); border-radius: 14px; color: rgba(255, 255, 255, .85); font-size: 54px; font-family: var(--font); background: rgba(255, 255, 255, .08); }
.slide.light-bg .slot { border-color: rgba(0, 0, 0, .3); color: rgba(0, 0, 0, .55); background: rgba(0, 0, 0, .04); }
.slide .slot b { font-size: 120px; line-height: 1; font-weight: 400; display: block; text-align: center; }
.slide .missing { display: grid; place-items: center; background: #6B1D1D; color: #fff; font-size: 48px; font-family: var(--font); text-align: center; }
.slide.interactive .hit { cursor: pointer; }
.slide .selring { position: absolute; border: 10px solid #FFD84D; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 6px rgba(0, 0, 0, .35); }
.slide.mini { border-radius: 6px; box-shadow: none; }

/* ---------- slides list ---------- */
.slides-list { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .slides-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .slides-list { grid-template-columns: repeat(3, 1fr); } }
.slide-card { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; position: relative; }
.slide-card .slide { box-shadow: none; border-radius: 8px; cursor: pointer; }
.slide-card .meta { display: flex; align-items: center; gap: 8px; padding: 8px 4px 2px; font-size: 14px; }
.slide-card .meta .no { font-weight: 700; min-width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); font-size: 13px; }
.slide-card .meta .ttl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slide-card .handle { cursor: grab; touch-action: none; color: var(--muted); }
.slide-card.sortable-ghost { opacity: .35; }
.slide-card.sortable-chosen { box-shadow: var(--shadow-lg); }
.slide-card .warn { position: absolute; top: 14px; inset-inline-start: 14px; }
.add-between { display: grid; place-items: center; min-height: 120px; border: 2px dashed var(--line); border-radius: 14px; color: var(--muted); cursor: pointer; background: transparent; font-size: 15px; }

/* ---------- editor ---------- */
.editor { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
/* grid items default to min-width:auto, so a long horizontal scroller would stretch the page; keep them shrinkable */
.editor > *, .slides-list > *, .chapter-cards > *, .theme-grid > *, .layout-grid > *, .stats > *, .grid-photos > * { min-width: 0; }
@media (min-width: 980px) { .editor { grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); align-items: start; } .editor .side { position: sticky; top: calc(var(--head-h) + 16px); } }
.slot-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 12px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); }
.focus-pad { display: grid; grid-template-columns: repeat(3, 34px); gap: 4px; }
.focus-pad button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; padding: 0; }
.focus-pad button.on { background: var(--primary); border-color: var(--primary); }
.layouts { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.layout-opt { flex: none; width: 118px; border: 2px solid transparent; border-radius: 12px; padding: 6px; background: var(--surface); cursor: pointer; text-align: center; font-size: 12px; color: var(--muted); }
.layout-opt.on { border-color: var(--primary); color: var(--text); }
.layout-opt .slide { margin-bottom: 4px; }
.layout-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 600px) { .layout-grid { grid-template-columns: repeat(3, 1fr); } }
.layout-grid .layout-opt { width: auto; }
.navarrows { display: flex; gap: 6px; }

/* ---------- player ---------- */
.player { position: fixed; inset: 0; z-index: 80; background: #000; display: grid; place-items: center; }
.player .frame { position: relative; width: min(100vw, calc(100vh * 16 / 9)); width: min(100vw, calc(100dvh * 16 / 9)); aspect-ratio: 16 / 9; }
.player .layer { position: absolute; inset: 0; }
.player .layer .slide { border-radius: 0; box-shadow: none; height: 100%; }
.player .controls {
  position: fixed; inset: auto 0 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .75)); color: #fff; transition: opacity .3s;
}
.player .controls.hidden { opacity: 0; pointer-events: none; }
.player .controls .iconbtn { color: #fff; }
.player .bar { flex: 1; height: 6px; background: rgba(255, 255, 255, .25); border-radius: 99px; overflow: hidden; cursor: pointer; }
.player .bar i { display: block; height: 100%; background: #fff; }
.player .time { font-variant-numeric: tabular-nums; font-size: 14px; min-width: 92px; text-align: center; direction: ltr; unicode-bidi: isolate; }
bdi.ltr { direction: ltr; unicode-bidi: isolate; }
.t-fade-in { animation: tfade var(--td, 1s) ease forwards; }
@keyframes tfade { from { opacity: 0; } to { opacity: 1; } }
.t-push-in { animation: tpush var(--td, 1s) cubic-bezier(.3, .8, .3, 1) forwards; }
@keyframes tpush { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.t-push-out { animation: tpushout var(--td, 1s) cubic-bezier(.3, .8, .3, 1) forwards; }
@keyframes tpushout { to { transform: translateX(100%); } }
.t-wipe-in { animation: twipe var(--td, 1s) ease forwards; }
@keyframes twipe { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
.t-cover-in { animation: tpush var(--td, 1s) cubic-bezier(.3, .8, .3, 1) forwards; }
.t-zoom-in { animation: tzoom var(--td, 1s) ease forwards; }
@keyframes tzoom { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- export ---------- */
.checklist { display: grid; gap: 8px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check-row .ic { width: 22px; flex: none; text-align: center; }
.progress-steps { display: grid; gap: 10px; margin-top: 14px; }
.pstep { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.pstep.on { color: var(--text); font-weight: 500; }
.pstep.ok { color: var(--ok); }
.howto ol { padding-inline-start: 22px; margin: 8px 0; line-height: 1.7; }
.build-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.build-row:last-child { border-bottom: 0; }

/* ---------- settings ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .theme-grid { grid-template-columns: repeat(3, 1fr); } }
.theme-opt { border: 2px solid transparent; border-radius: 14px; padding: 6px; background: var(--surface); cursor: pointer; text-align: center; font-size: 14px; }
.theme-opt.on { border-color: var(--primary); }
.font-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 2px solid transparent; background: var(--surface); cursor: pointer; width: 100%; text-align: start; }
.font-opt.on { border-color: var(--primary); }
.font-opt .sample { font-size: 22px; }

.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 80% -10%, #2a3a7a 0%, transparent 60%), linear-gradient(160deg, #0A1330, #1C2D61); }
.login .card { width: 100%; max-width: 380px; text-align: center; padding: 28px 22px; }
.login img { width: 72px; height: 72px; border-radius: 18px; }
.login h1 { margin: 12px 0 4px; font-size: 24px; }
.login .input { text-align: center; font-size: 22px; letter-spacing: 4px; margin: 18px 0 12px; }
.err { color: var(--danger); font-size: 14px; min-height: 20px; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .big { font-size: 46px; margin-bottom: 8px; }
.viewer-img { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 12px; background: var(--surface-2); display: block; }
.sticky-actions { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); z-index: 15; display: flex; gap: 8px; flex-wrap: wrap; padding: 10px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); margin-top: 12px; align-items: center; }
@media (min-width: 900px) { .sticky-actions { bottom: 16px; } }
