/* Dach Creator web app. Brand: cream paper, ink, orange; Poppins 800 headings, Figtree body,
   Instrument Serif italic accents. Mirrors the iOS app (DC theme in Theme.swift). */

@font-face { font-family: "Figtree"; src: url("../fonts/figtree-400-normal.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-600-normal.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-700-normal.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../fonts/figtree-800-normal.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-700-normal.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-800-normal.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-400-italic.ttf") format("truetype"); font-style: italic; font-display: swap; }

:root {
  --orange: #E2470F; --orange2: #FF6A2B; --press: #C53B09; --tint: #FCEBE3; --soft: #F7C9B5; --blush: #FFF8F4;
  --paper: #FBF7F1; --sand: #F4EEE5; --ground: #F3F1EE; --stage: #E9E4DD; --card: #FFFFFF;
  --line: #E9E2D8; --line2: #DAD2C7; --ink: #17140F; --ink2: #4A4540; --muted: #857E76;
  --ok: #1E9A57; --ok-tint: #E3F4EA; --warn: #B45309; --warn-tint: #FFF4E5; --danger: #D92D20;
  --r-sm: 10px; --r: 12px; --r-md: 16px; --r-lg: 22px;
  --sh-1: 0 1px 2px rgba(23,20,15,.06), 0 1px 1px rgba(23,20,15,.04);
  --sh-2: 0 10px 30px -12px rgba(60,30,10,.28);
  --sh-3: 0 30px 60px -20px rgba(60,30,10,.35);
  --ease: cubic-bezier(.2,.8,.2,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
  --side: 268px; --insp: 360px; --tabbar: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body { min-height: 100%; background: var(--paper); color: var(--ink); font: 15px/1.45 "Figtree", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.fullscreen { overflow: hidden; }
img, canvas { display: block; max-width: 100%; }
canvas.thumb { width: var(--w); height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(226,71,15,.55); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--soft); }
h1, h2, h3 { font-weight: 800; letter-spacing: -.01em; }
.ic { display: inline-flex; flex: none; line-height: 0; }
.ic.accent { color: var(--orange); } .ic.ok { color: var(--ok); } .ic.muted { color: var(--muted); }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; } .row.end { justify-content: flex-end; } .row.wrap { flex-wrap: wrap; }
.gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap14 { gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.gap8 { gap: 8px; } .stack.gap10 { gap: 10px; } .stack.gap14 { gap: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mt16 { margin-top: 16px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.mono { font-family: ui-monospace, "DMMono-Regular", monospace; font-size: 12px; }
.fine { font-size: 12px; color: var(--muted); line-height: 1.4; }
.accent { color: var(--orange); }
.danger-text { color: var(--danger) !important; }
.center-block { display: block; margin: 0 auto; }
.center-col { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.center-pad { display: grid; place-items: center; padding: 30px 0; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scroll-x { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroll-x::-webkit-scrollbar { display: none; }
.only-phone { display: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.label { font-size: 13px; font-weight: 700; color: var(--ink2); }
.kicker { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--muted); }
@media (max-width: 899px) { .only-phone { display: flex; } .only-desk { display: none !important; } }

/* ---------------------------------------------------------------- splash */
#splash { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: var(--orange); transition: opacity .45s var(--ease), visibility .45s; }
#splash.done { opacity: 0; visibility: hidden; }
.splash-in { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.splash-dog { position: relative; width: 210px; aspect-ratio: 530 / 272; animation: hop 1s var(--ease) 1.15s 2; }
.splash-dog svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dog-fill { clip-path: inset(0 100% 0 0); animation: reveal 1.1s cubic-bezier(.6,.05,.3,1) .1s forwards; }
.splash-name { font: 800 30px/1 "Poppins", sans-serif; color: #fff; letter-spacing: -.02em; opacity: 0; transform: translateY(8px); animation: rise .5s var(--ease) .9s forwards; }
@keyframes reveal { to { clip-path: inset(0 0 0 0); } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-12px); } 60% { transform: translateY(-12px) scaleY(1.02); } }

/* ---------------------------------------------------------------- brand bits */
.logo { display: inline-flex; align-items: center; gap: 10px; font: 700 18px/1 "Poppins", sans-serif; letter-spacing: -.02em; white-space: nowrap; }
.logo img { border-radius: 9px; transition: transform .4s var(--spring); }
.logo:hover img { transform: rotate(-8deg) scale(1.06); }
.logo-word b { color: var(--orange); font-weight: 800; margin-left: 4px; }
.dog { display: inline-block; line-height: 0; }
.dog svg { width: 100%; height: auto; }
.dog.hop svg { animation: hop 1.1s var(--ease) infinite; }
.mascot { display: inline-grid; place-items: center; flex: none; border-radius: 50%; background: var(--tint); overflow: hidden; }
.mascot svg { display: block; }
.mascot-bubble { display: flex; align-items: center; gap: 10px; }
.bubble-box { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 13px 14px; font-weight: 600; font-size: 16px; }
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; color: #fff; font-weight: 800; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 60px; height: 60px; font-size: 24px; }
.display { font: 800 clamp(28px, 4.2vw, 44px)/1.08 "Poppins", sans-serif; letter-spacing: -.03em; }
.lead { font-size: 17px; color: var(--ink2); max-width: 46ch; }
.lead-muted { color: var(--ink2); margin: -6px 0 18px; }

/* ---------------------------------------------------------------- buttons & controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r); background: var(--orange); color: #fff; font-weight: 700; white-space: nowrap; transition: background .2s, transform .15s var(--ease), box-shadow .2s, opacity .2s; box-shadow: 0 8px 18px -10px rgba(226,71,15,.75); }
.btn:hover { background: var(--orange2); }
.btn:active { transform: scale(.98); background: var(--press); }
.btn:disabled { background: var(--soft); box-shadow: none; transform: none; }
.btn.lg { min-height: 52px; font-size: 16px; border-radius: var(--r); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: var(--r-sm); }
.btn.block { width: 100%; }
.btn.secondary { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.btn.secondary:hover { background: var(--ground); }
.btn.secondary:disabled { color: var(--muted); background: #fff; opacity: .6; }
.btn.white { background: #fff; color: var(--ink); box-shadow: 0 10px 26px -12px rgba(0,0,0,.35); }
.btn.white:hover { background: #fff; color: var(--orange); }
.btn.tint { background: var(--tint); color: var(--orange); box-shadow: none; }
.btn.danger { background: var(--danger); box-shadow: none; }
.btn .spinner { margin: 0 auto; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--ink); transition: background .15s, color .15s; flex: none; }
.icon-btn:hover { background: rgba(23,20,15,.06); }
.icon-btn:disabled { color: var(--line2); background: none; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.on-dark { color: #fff; } .icon-btn.on-dark:hover { background: rgba(255,255,255,.16); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; padding: 6px 2px; }
.link-btn:disabled { color: var(--muted); text-decoration: none; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--ink2); align-self: flex-start; padding: 6px 4px 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 13px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line2); font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s, transform .15s; }
.chip:hover { box-shadow: inset 0 0 0 1px var(--ink2); }
.chip:active { transform: scale(.97); }
.chip.on { background: var(--orange); color: #fff; box-shadow: none; }
.chip.on-dark { background: var(--ink); color: #fff; box-shadow: none; }
.chip.sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll-x { flex-wrap: nowrap; padding: 2px; margin: -2px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
.pill.neutral { background: #F0EDE9; color: var(--ink2); } .pill.green { background: var(--ok-tint); color: var(--ok); }
.pill.orange { background: var(--tint); color: var(--press); } .pill.dark { background: var(--ink); color: #fff; }
.spinner { display: inline-block; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(23,20,15,.15); border-top-color: var(--orange); animation: spin .8s linear infinite; }
.spinner.light { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

.input { width: 100%; min-height: 50px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(226,71,15,.12); }
.input.lg { min-height: 56px; font-size: 17px; }
.input.area { padding: 12px 14px; resize: none; line-height: 1.4; min-height: 80px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.input-at { display: flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding-left: 14px; transition: border-color .15s, box-shadow .15s; }
.input-at:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(226,71,15,.12); }
.input-at > span { color: var(--muted); font-size: 16px; }
.input-at .input { border: 0; box-shadow: none; padding-left: 2px; }
.form-err { color: var(--danger); font-size: 13.5px; font-weight: 600; min-height: 0; }
.form-err:empty { display: none; }

.toggle { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-weight: 600; }
.toggle-text { flex: 1; display: flex; flex-direction: column; }
.toggle-text small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { position: relative; width: 50px; height: 30px; border-radius: 999px; background: var(--line2); transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .25s var(--spring); }
.toggle input:checked + .switch { background: var(--orange); }
.toggle input:checked + .switch::after { transform: translateX(20px); }
.toggle input:focus-visible + .switch { outline: 3px solid rgba(226,71,15,.55); outline-offset: 2px; }

.seg { display: flex; padding: 3px; background: #EFEBE5; border-radius: 11px; gap: 2px; }
.seg.full { width: 100%; }
.seg-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 10px; border-radius: 9px; font-size: 13.5px; font-weight: 700; color: var(--ink2); transition: background .2s, color .2s, box-shadow .2s; white-space: nowrap; }
.seg-btn.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(23,20,15,.12); }
.seg.tabs { overflow-x: auto; scrollbar-width: none; }
.seg.tabs::-webkit-scrollbar { display: none; }

.slider { display: flex; flex-direction: column; gap: 6px; }
.slider-head { display: flex; justify-content: space-between; align-items: baseline; }
.slider-label { font-size: 13px; font-weight: 700; color: var(--ink2); }
.slider-val { font: 12px ui-monospace, monospace; color: var(--muted); }
.slider input { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; --p: 50%; }
.slider input::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--orange) var(--p), var(--line2) var(--p)); }
.slider input::-moz-range-track { height: 6px; border-radius: 6px; background: var(--line2); }
.slider input::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--orange); }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.04); transition: transform .15s; }
.slider input:active::-webkit-slider-thumb { transform: scale(1.12); }
.slider input::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }

.color-row { display: flex; flex-direction: column; gap: 8px; }
.swatches { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px; scrollbar-width: none; }
.swatches::-webkit-scrollbar { display: none; }
.sw { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--c, #fff); box-shadow: inset 0 0 0 1px rgba(23,20,15,.14); transition: transform .15s var(--spring), box-shadow .15s; }
.sw:hover { transform: scale(1.08); }
.sw.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--orange); }
.swatches.big .sw { width: 38px; height: 38px; }
.swatches.big .sw.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.sw.none { background: #fff; overflow: hidden; }
.sw.none::after { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; background: var(--danger); transform: rotate(45deg); }
.sw.pick { display: grid; place-items: center; background: conic-gradient(#ff4d4d, #ffd23f, #3fd47a, #2fb6ff, #7b5cff, #ff4dc4, #ff4d4d); color: #fff; cursor: pointer; }
.sw.pick .ic { filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.sw-picker, .color-pick { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.color-dot { position: relative; display: inline-block; width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(23,20,15,.14); cursor: pointer; flex: none; }
.brand-color-row { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 8px 0 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); font-weight: 600; }
.brand-colors { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--ground); border-radius: var(--r-md); margin-top: 12px; }
.hex-in { width: 86px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; text-transform: uppercase; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; }
.card.soft { background: var(--ground); border-color: transparent; }
.option-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); text-align: left; transition: border-color .15s, background .15s, transform .15s var(--ease); }
.option-row:hover:not(:disabled):not(.soon) { border-color: var(--line2); transform: translateY(-1px); box-shadow: var(--sh-1); }
.option-row.on { background: var(--blush); border-color: var(--orange); }
.option-row.soon { opacity: .55; }
.option-row.busy { pointer-events: none; }
.opt-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--tint); color: var(--orange); flex: none; }
.opt-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.opt-text b { font-size: 15px; }
.opt-text small { color: var(--muted); font-size: 12.5px; }
.radio { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line2); flex: none; transition: box-shadow .2s; }
.option-row.on .radio { box-shadow: inset 0 0 0 6px var(--orange); }

/* ---------------------------------------------------------------- toasts, modals, menus */
.toasts { position: fixed; z-index: 900; left: 50%; top: calc(66px + var(--safe-t)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: min(92vw, 520px); }
.toast { background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; padding: 11px 18px; border-radius: 999px; box-shadow: var(--sh-2); opacity: 0; transform: translateY(-12px) scale(.96); transition: opacity .25s var(--ease), transform .3s var(--spring); text-align: center; max-width: 100%; }
.toast.warn { background: #3A2410; }
.toast.in { opacity: 1; transform: none; }
.toast.out { opacity: 0; transform: translateY(-8px); }

.modal-wrap { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 24px; }
.modal-back { position: absolute; inset: 0; background: rgba(23,20,15,.38); opacity: 0; transition: opacity .25s; backdrop-filter: blur(2px); }
.modal { position: relative; width: min(520px, 100%); max-height: min(88vh, 860px); display: flex; flex-direction: column; background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-3); opacity: 0; transform: translateY(14px) scale(.97); transition: opacity .25s var(--ease), transform .35s var(--spring); overflow: hidden; }
.modal.wide { width: min(880px, 100%); }
.modal-wrap.in .modal-back { opacity: 1; }
.modal-wrap.in .modal { opacity: 1; transform: none; }
.modal-wrap.out .modal-back { opacity: 0; }
.modal-wrap.out .modal { opacity: 0; transform: translateY(10px) scale(.98); transition-duration: .2s; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 4px 22px; }
.modal-title { font-size: 19px; }
.modal-body { padding: 8px 22px 22px; overflow: auto; }
.modal.bare .modal-head { display: none; }
.modal.bare .modal-body { padding: 0; }
.sheet-wrap { place-items: end center; padding: 0; }
.modal.as-sheet { width: 100%; max-width: 640px; max-height: 92dvh; border-radius: 22px 22px 0 0; transform: translateY(100%); transition: transform .38s var(--ease), opacity .2s; opacity: 1; padding-bottom: var(--safe-b); }
.sheet-wrap.in .modal.as-sheet { transform: none; }
.sheet-wrap.out .modal.as-sheet { transform: translateY(100%); }
.grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--line2); margin: 8px auto 0; flex: none; }
.modal.confirm { width: min(420px, 100%); }
.modal.confirm .modal-title { font-size: 18px; }

.menu { position: fixed; z-index: 800; min-width: 220px; max-width: 300px; padding: 6px; background: #fff; border-radius: 14px; box-shadow: 0 18px 50px -12px rgba(23,20,15,.35), 0 0 0 1px rgba(23,20,15,.06); opacity: 0; transform: scale(.96) translateY(-4px); transform-origin: top left; transition: opacity .15s, transform .2s var(--spring); }
.menu.in { opacity: 1; transform: none; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 12px; border-radius: 9px; text-align: left; font-weight: 600; font-size: 14px; }
.menu-item:hover, .menu-item:focus-visible { background: var(--ground); outline: none; }
.menu-item.danger { color: var(--danger); }
.menu-item:disabled { color: var(--line2); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 6px; }

.wait { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 34px 30px; }
.wait .dog { width: 130px; margin-bottom: 8px; }
.wait h2 { font-size: 20px; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px 12px; background: var(--sand); border-right: 1px solid var(--line); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; transition: width .25s var(--ease); width: var(--side); }
.main { min-width: 0; outline: none; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; }
.side-new { margin: 2px 0 10px; width: 100%; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 11px; font-weight: 700; color: var(--ink2); transition: background .15s, color .15s; }
.side-link:hover { background: rgba(23,20,15,.05); color: var(--ink); }
.side-link.on { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.side-link.on .ic { color: var(--orange); }
.side-label { display: flex; align-items: center; justify-content: space-between; margin: 18px 4px 6px 12px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side-projects { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-project { border-radius: 12px; }
.side-project.on { background: rgba(255,255,255,.6); }
.side-proj-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 11px; text-align: left; }
.side-proj-btn:hover { background: rgba(23,20,15,.05); }
.side-proj-text { display: flex; flex-direction: column; min-width: 0; }
.side-proj-text b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-proj-text small { font-size: 12px; color: var(--muted); }
.side-carousels { display: flex; flex-direction: column; padding: 0 6px 8px 22px; }
.side-carousel { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 10px; border-radius: 8px; font-size: 13px; color: var(--ink2); border-left: 1.5px solid var(--line2); border-radius: 0 8px 8px 0; }
.side-carousel:hover { background: rgba(23,20,15,.05); color: var(--ink); }
.side-carousel.on { color: var(--orange); font-weight: 700; border-left-color: var(--orange); background: var(--tint); }
.side-carousel .dot { display: none; }
.side-c-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot { display: flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 8px; }
.side-plan { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 11px; background: var(--ink); color: #fff; font-weight: 700; font-size: 13px; min-width: 0; }
.side-plan > span:not(.ic) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-plan .ic { color: #FFD23F; }
.side-plan:hover { background: #2a251e; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border-radius: 11px; font-weight: 800; font-size: 12.5px; color: var(--ink2); background: #fff; box-shadow: inset 0 0 0 1px var(--line2); }
.lang-btn.ghost { background: transparent; box-shadow: none; }
.lang-btn:hover { color: var(--ink); }

.sidebar.collapsed { width: 76px; }
.sidebar.collapsed .logo-word, .sidebar.collapsed .side-link > span:not(.ic), .sidebar.collapsed .side-new > span:not(.ic), .sidebar.collapsed .side-label span,
.sidebar.collapsed .side-proj-text, .sidebar.collapsed .side-carousels, .sidebar.collapsed .side-plan > span:not(.ic), .sidebar.collapsed .lang-btn > span:not(.ic) { display: none; }
.sidebar.collapsed .side-top { flex-direction: column; gap: 8px; }
.sidebar.collapsed .side-link, .sidebar.collapsed .side-proj-btn { justify-content: center; padding: 0; min-height: 44px; }
.sidebar.collapsed .side-new { padding: 0; }
.sidebar.collapsed .side-label { justify-content: center; margin: 14px 0 6px; }
.sidebar.collapsed .side-foot { flex-direction: column; }
.sidebar.collapsed .side-plan { justify-content: center; padding: 0; width: 100%; flex: none; }
.shell:has(.sidebar.collapsed) { grid-template-columns: 76px minmax(0, 1fr); }

.tabbar { display: none; }

@media (max-width: 899px) {
  .shell { grid-template-columns: minmax(0, 1fr) !important; }
  .sidebar { display: none; }
  .main { padding-bottom: calc(var(--tabbar) + var(--safe-b) + 8px); }
  .fullscreen .main { padding-bottom: 0; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; display: flex; align-items: stretch; height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(255,255,255,.88); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); border-top: 1px solid var(--line); }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--muted); }
  .tab.on { color: var(--orange); }
  .tab.create { color: var(--ink2); }
  .create-btn { display: grid; place-items: center; width: 44px; height: 32px; border-radius: 11px; background: var(--orange); color: #fff; box-shadow: 0 6px 14px -6px rgba(226,71,15,.8); transition: transform .2s var(--spring); }
  .tab.create:active .create-btn { transform: scale(.92); }
  .tab.create span:last-child { margin-top: 1px; }
}

/* ---------------------------------------------------------------- pages */
.page { width: min(1120px, 100%); margin: 0 auto; padding: 28px 32px 48px; animation: fadeUp .35s var(--ease); }
.page.narrow { width: min(720px, 100%); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head.sticky { position: sticky; top: 0; z-index: 5; background: linear-gradient(var(--paper) 75%, rgba(251,247,241,0)); padding: 14px 0 10px; margin: -14px 0 8px; }
.page-title { font: 800 26px/1.15 "Poppins", sans-serif; letter-spacing: -.02em; flex: 1; }
.phone-top { align-items: center; gap: 8px; margin: -6px 0 14px; }
.greet { font: 800 30px/1.15 "Poppins", sans-serif; letter-spacing: -.025em; margin-bottom: 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 30px 0 12px; }
.section-head h2 { font-size: 18px; }
.home-top { display: grid; grid-template-columns: 1fr 300px; gap: 14px; align-items: stretch; }
.hero-card { position: relative; overflow: hidden; border-radius: var(--r-lg); background: radial-gradient(120% 140% at 0% 0%, #F36B2B 0%, var(--orange) 45%, #B8360A 100%); color: #fff; padding: 26px 26px 24px; min-height: 196px; box-shadow: var(--sh-2); }
.hero-in { position: relative; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; max-width: 460px; }
.hero-card h2 { font: 800 25px/1.15 "Poppins", sans-serif; letter-spacing: -.02em; }
.hero-card p { opacity: .93; max-width: 40ch; margin-bottom: 6px; }
.hero-dog { position: absolute; right: -24px; bottom: -14px; width: 250px; transition: transform .6s var(--ease); }
.hero-card:hover .hero-dog { transform: translateX(-8px) rotate(-3deg); }
.free-card { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; padding: 20px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); text-align: left; transition: transform .2s var(--ease), box-shadow .2s; }
.free-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.free-card span { font-weight: 600; }
.free-card small { font-weight: 800; }
.proj-row { display: flex; gap: 10px; padding: 2px; }
.proj-chip { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 160px; padding: 13px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); text-align: left; transition: border-color .15s, transform .2s var(--ease); }
.proj-chip:hover { transform: translateY(-2px); }
.proj-chip.on { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.proj-chip b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-chip small { color: var(--muted); font-size: 12px; }
.proj-chip.add { align-items: center; justify-content: center; color: var(--muted); background: transparent; border: 1.5px dashed var(--line2); min-height: 112px; }
.c-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 18px 16px; }
.c-card { position: relative; }
.c-card-link { display: flex; flex-direction: column; gap: 7px; }
.c-thumb { display: block; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), var(--sh-1); transition: transform .3s var(--ease), box-shadow .3s; background: var(--ground); }
.c-thumb canvas { width: 100%; height: auto; }
.c-card:hover .c-thumb { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 0 0 1px var(--line), var(--sh-2); }
.c-title { font-weight: 800; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-meta { font-size: 12px; color: var(--muted); }
.card-more { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.92); box-shadow: var(--sh-1); opacity: 0; transition: opacity .2s; }
.c-card:hover .card-more, .card-more:focus-visible { opacity: 1; }
@media (hover: none) { .card-more { opacity: 1; } }
.idea-list { display: flex; flex-direction: column; gap: 8px; }
.idea-row { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 15px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); text-align: left; transition: transform .2s var(--ease), border-color .15s, box-shadow .2s; }
.idea-row:hover { transform: translateY(-1px); border-color: var(--soft); box-shadow: var(--sh-1); }
.idea-n { font: 800 19px/1.2 "Poppins", sans-serif; color: var(--orange); min-width: 16px; }
.idea-text { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.idea-text b { font-size: 15px; }
.idea-text small { color: var(--muted); font-size: 12.5px; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.proj-card { display: flex; flex-direction: column; gap: 14px; }
.proj-card small { display: block; }
.h-handle { font-size: 16px; }
.proj-thumbs { display: flex; gap: 8px; min-height: 60px; align-items: center; }
.mini-thumb { flex: none; width: 92px; border-radius: 7px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); transition: transform .2s var(--ease); }
.mini-thumb:hover { transform: translateY(-2px); }
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-head h2 { font-size: 22px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px; }
.stat b { font: 800 24px/1.1 "Poppins", sans-serif; margin-top: 4px; }
.stat small { color: var(--muted); font-size: 12.5px; }
.list-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin-bottom: 14px; }
.list-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; text-align: left; transition: background .15s; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row:hover { background: #FCFAF7; }
.list-row b { display: block; font-size: 15px; font-weight: 600; }
.list-row small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #F0EDE9; flex: none; }
.list-ic.dark { background: var(--ink); color: #FFD23F; }
.list-ic.tint { background: var(--tint); color: var(--orange); }
.empty { display: grid; place-items: center; gap: 12px; padding: 60px 20px; text-align: center; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.form-foot { position: sticky; bottom: 0; padding: 12px 0 calc(8px + var(--safe-b)); background: linear-gradient(rgba(251,247,241,0), var(--paper) 30%); }
.logo-picker { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.logo-pick { flex: none; position: relative; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 1.5px dashed var(--line2); color: var(--muted); transition: transform .2s var(--spring), border-color .2s; }
.logo-pick:hover { transform: scale(1.04); border-color: var(--orange); color: var(--orange); }
.logo-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.logo-plus, .logo-edit { position: absolute; right: 2px; bottom: 2px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: #fff; box-shadow: 0 0 0 3px var(--paper); }
.kit-top { display: flex; align-items: center; gap: 22px; margin-bottom: 22px; flex-wrap: wrap; }
.kit-preview { display: flex; gap: 10px; justify-content: center; }
.kit-thumb { border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), var(--sh-2); }
.kit-thumb:nth-child(1) { transform: rotate(-2deg); } .kit-thumb:nth-child(2) { transform: rotate(2deg) translateY(6px); }
h3.sec { font-size: 15px; font-weight: 800; margin: 22px 0 10px; }
.panel-scroll h3.sec { margin: 4px 0 -4px; }
.notice { display: flex; align-items: center; gap: 12px; margin: 14px 0; background: var(--blush); border-color: var(--soft); }
.opt-trail { color: var(--muted); display: grid; place-items: center; width: 24px; }
@media (max-width: 899px) { .notice { flex-wrap: wrap; } .notice .btn { margin-left: 30px; } .exp-dl span:not(.ic) { display: none; } .exp-dl { width: 34px; height: 34px; padding: 0; justify-content: center; } }

/* pickers */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 14px 10px; }
.tpl { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tpl-thumb { display: block; width: 100%; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s, transform .25s var(--ease); }
.tpl-thumb canvas { width: 100%; height: auto; }
.tpl:hover .tpl-thumb { transform: translateY(-3px); }
.tpl.on .tpl-thumb { box-shadow: 0 0 0 3px var(--orange), var(--sh-2); }
.tpl-name { font-size: 12px; font-weight: 700; }
.tpl.on .tpl-name { color: var(--orange); }
.pal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 12px; }
.pal { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.pal-sw { position: relative; display: block; border-radius: 12px; padding: 3px; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, transform .2s var(--ease); }
.pal:hover .pal-sw { transform: translateY(-2px); }
.pal.on .pal-sw { box-shadow: inset 0 0 0 2.5px var(--ink); }
.pal-strip { display: flex; height: 40px; border-radius: 9px; overflow: hidden; }
.pal-strip i { flex: 1; }
.pal-plus { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.pal-plus .ic { padding: 5px; background: rgba(0,0,0,.45); border-radius: 50%; }
.pal-name { font-size: 12px; font-weight: 700; color: var(--ink2); text-align: center; }
.font-lib { display: flex; flex-direction: column; gap: 10px; }
.font-list { display: flex; flex-direction: column; gap: 6px; }
.font-item { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 0; border-radius: var(--r-sm); background: var(--ground); transition: background .15s; }
button.font-item { flex-direction: row; align-items: center; justify-content: space-between; min-height: 50px; padding: 0 14px; text-align: left; }
.font-item.on { background: var(--tint); }
.font-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 50px; padding: 0 14px; text-align: left; }
.font-name { font-size: 21px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.font-item:hover:not(.on) { background: #ECE8E2; }
.weights { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }

/* ---------------------------------------------------------------- login */
.login { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100dvh; transition: opacity .25s; }
.login.leaving { opacity: 0; }
.login-art { position: relative; overflow: hidden; background: radial-gradient(130% 120% at 0% 0%, #F36B2B 0%, var(--orange) 46%, #A92F06 100%); color: #fff; display: flex; align-items: center; padding: 48px clamp(28px, 5vw, 72px); }
.login-art-in { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 22px; max-width: 560px; }
.login-art .logo-word b { color: #fff; }
.login-art .logo img { box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.login-art .lead { color: rgba(255,255,255,.88); }
.art-dog { position: absolute; right: -30px; bottom: -18px; width: 340px; opacity: .8; transform: scaleX(-1); }
.login-fan, .onb-fan, .how-fan, .ai-fan { position: relative; height: 270px; margin-top: 12px; }
.fan-card { z-index: calc(3 - var(--a, 0)); position: absolute; left: 50%; top: 10px; width: 180px; border-radius: 12px; overflow: hidden; box-shadow: 0 24px 40px -18px rgba(0,0,0,.5); transform: translateX(calc(-50% + var(--i) * 128px)) translateY(calc(var(--a, 0) * 14px)) rotate(calc(var(--i) * 7deg)); animation: fanIn .8s var(--spring) both; animation-delay: calc((var(--i) + 1) * 90ms + 150ms); }
.fan-card canvas { width: 100%; height: auto; }
@keyframes fanIn { from { opacity: 0; transform: translateX(-50%) translateY(40px) rotate(0); } }
.login-card { display: flex; flex-direction: column; padding: 22px clamp(24px, 5vw, 64px) 28px; background: var(--paper); }
.login-top { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 44px; }
.login-form { flex: 1; display: flex; align-items: center; justify-content: center; }
.login-form > * { width: min(400px, 100%); animation: fadeUp .35s var(--ease); }
.login-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.login-head h2 { font: 800 28px/1.15 "Poppins", sans-serif; letter-spacing: -.02em; }
.mail-badge { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--tint); color: var(--orange); margin-bottom: 6px; }
.code-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code-box { width: 100%; aspect-ratio: 1 / 1.15; max-height: 66px; border-radius: 13px; border: 1.5px solid var(--line2); background: #fff; text-align: center; font: 800 26px "Poppins", sans-serif; transition: border-color .15s, box-shadow .15s, transform .15s var(--spring); }
.code-box:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(226,71,15,.14); transform: translateY(-1px); }
.code-box.filled { border-color: var(--ink); }
.code-row.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------------------------------------------------------------- onboarding */
.onb { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(80% 60% at 100% 0%, #FBE5D8 0%, rgba(251,247,241,0) 60%), var(--paper); transition: opacity .25s; }
.onb.leaving { opacity: 0; }
.onb-card { width: min(560px, 100%); height: min(800px, calc(100dvh - 48px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--sh-3); overflow: hidden; }
.onb-card.wide { width: min(760px, 100%); }
.onb-card.welcome { background: #fff; }
.onb-top { display: flex; align-items: center; gap: 12px; padding: 16px 18px 6px; min-height: 60px; }
.segments { flex: 1; display: flex; gap: 6px; }
.segments i { flex: 1; height: 4px; border-radius: 3px; background: var(--line2); transition: background .3s; }
.segments i.on { background: var(--orange); }
.onb-body { flex: 1; overflow-y: auto; padding: 14px 26px 20px; display: flex; flex-direction: column; gap: 16px; opacity: 0; transform: translateX(14px); transition: opacity .3s var(--ease), transform .35s var(--ease); }
.onb-body.in { opacity: 1; transform: none; }
.onb-foot { padding: 12px 26px calc(18px + var(--safe-b)); border-top: 1px solid var(--line); background: #fff; }
.welcome .onb-foot { border-top: 0; }
.step-title { font: 800 23px/1.2 "Poppins", sans-serif; letter-spacing: -.02em; }
.niche-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.niche { min-height: 52px; padding: 0 6px; border-radius: 11px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 14px; transition: background .15s, box-shadow .15s, transform .15s var(--spring); }
.niche:hover { box-shadow: inset 0 0 0 1px var(--line2); }
.niche.on { background: #FFF3EC; box-shadow: inset 0 0 0 1.5px var(--orange); }
.niche:active { transform: scale(.96); }
.kit-box { min-height: 200px; }

/* ---------------------------------------------------------------- paywall */
.modal.paywall { width: min(480px, 100%); max-height: min(94vh, 900px); }
.modal.paywall .modal-body { display: flex; flex-direction: column; }
.pw-hero { position: relative; overflow: hidden; padding: 56px 24px 26px; background: radial-gradient(130% 120% at 0% 0%, #F36B2B 0%, var(--orange) 50%, #B8360A 100%); color: #fff; flex: none; }
.pw-hero h2 { position: relative; font: 800 27px/1.15 "Poppins", sans-serif; letter-spacing: -.02em; max-width: 16ch; }
.pw-hero p { position: relative; opacity: .92; margin-top: 8px; max-width: 38ch; }
.pw-dog { position: absolute; right: -30px; top: 40px; width: 230px; }
.pw-x { position: absolute; top: 12px; left: 12px; }
.pw-body { padding: 18px 20px 6px; display: flex; flex-direction: column; gap: 12px; }
.pw-plan { position: relative; padding: 18px; border-radius: var(--r-md); border: 2px solid var(--orange); background: #fff; }
.pw-badge { position: absolute; top: -12px; right: 14px; }
.pw-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 10px; }
.pw-price b { font-size: 17px; }
.pw-price strong { font: 800 27px/1 "Poppins", sans-serif; }
.pw-price small { color: var(--muted); font-weight: 600; }
.pw-features { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.pw-features li { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; }
.pw-features .ic { margin-top: 2px; }
.pw-free p { margin-top: 6px; }
.pw-foot { display: flex; flex-direction: column; gap: 10px; padding: 14px 20px calc(16px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--ground); margin-top: 10px; }
.pw-links { display: flex; justify-content: center; gap: 16px; font-size: 12.5px; color: var(--muted); }
.pw-links a:hover { color: var(--ink); text-decoration: underline; }
.modal.paywall.as-sheet .pw-hero { padding-top: 46px; }

/* ---------------------------------------------------------------- chat */
.chat-page { display: grid; grid-template-columns: minmax(0, 1fr) 400px; height: 100dvh; }
.chat-col { display: flex; flex-direction: column; min-width: 0; height: 100dvh; background: var(--ground); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px; min-height: 60px; background: #fff; border-bottom: 1px solid var(--line); flex: none; padding-top: calc(8px + var(--safe-t)); }
.chat-who { display: flex; flex-direction: column; line-height: 1.2; }
.chat-who small { color: var(--ok); font-weight: 600; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-scroll { flex: 1; overflow-y: auto; scroll-behavior: smooth; }
.chat-list { width: min(760px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 12px; padding: 22px 18px 28px; }
.msg { display: flex; align-items: flex-end; gap: 8px; }
.msg-in { animation: msgIn .35s var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.msg .bubble { max-width: min(520px, 82%); padding: 11px 14px; font-size: 15px; line-height: 1.45; background: #fff; border: 1px solid var(--line); border-radius: 18px 18px 18px 5px; overflow-wrap: anywhere; }
.msg.bot.warn .bubble { background: var(--warn-tint); border-color: #F6DDB8; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble { background: var(--ink); color: #fff; border: 0; border-radius: 18px 18px 5px 18px; white-space: pre-wrap; }
.msg.typing small { margin-bottom: 4px; }
.dots { display: inline-flex; gap: 5px; padding: 4px 2px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line2); animation: blink 1.1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); background: var(--orange); } }
.msg-group { display: flex; flex-direction: column; gap: 8px; }
.msg-actions, .msg-block { padding-left: 38px; display: flex; gap: 8px; flex-wrap: wrap; }
.msg-block { flex-direction: column; flex-wrap: nowrap; }
.link-card { display: flex; align-items: center; gap: 10px; max-width: 360px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.link-card b { display: block; font-size: 13px; line-height: 1.3; }
.link-card small { color: var(--muted); font-size: 11.5px; }
.link-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 9px; background: var(--tint); color: var(--orange); flex: none; }
.hook { display: flex; gap: 10px; width: 100%; padding: 13px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 15px; transition: border-color .15s, background .15s, transform .2s var(--ease), box-shadow .2s; }
.hook:hover:not(:disabled) { border-color: var(--orange); transform: translateX(3px); box-shadow: var(--sh-1); }
.hook:disabled { cursor: default; }
.hook.on { background: var(--blush); border-color: var(--orange); }
.hook-n { font: 800 15px/1.4 "Poppins", sans-serif; color: var(--orange); width: 16px; flex: none; }
.hook-body { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.hook-body b { font-size: 14.5px; font-weight: 800; line-height: 1.32; }
.slide-card { padding: 12px 14px 14px; background: #fff; border: 1px solid var(--line); border-radius: 15px; transition: background 1.2s var(--ease); }
.slide-card.fresh { background: var(--tint); animation: freshOut 2.4s var(--ease) forwards; }
@keyframes freshOut { 0%, 40% { background: var(--tint); } 100% { background: #fff; } }
.slide-card-head { display: flex; align-items: center; gap: 2px; margin: -4px -6px 4px 0; color: var(--muted); }
.slide-title { display: block; font-size: 14px; font-weight: 800; line-height: 1.35; margin-bottom: 4px; }
.slide-body { font-size: 14px; color: var(--ink2); line-height: 1.45; }
.slide-card.loading .slide-title, .slide-card.loading .slide-body { color: transparent; background: linear-gradient(90deg, #EFEBE5 25%, #F7F4F0 45%, #EFEBE5 65%); background-size: 300% 100%; animation: shimmer 1.2s linear infinite; border-radius: 6px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.caption-card { display: flex; flex-direction: column; gap: 8px; }
.caption-text { font-size: 14px; color: var(--ink2); white-space: pre-wrap; }
.composer { flex: none; padding: 10px 14px calc(10px + var(--safe-b)); background: #fff; border-top: 1px solid var(--line); }
.composer > * { width: min(760px, 100%); margin: 0 auto; }
.composer-mode:not(:empty) { margin-bottom: 8px; }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.composer-input { flex: 1; min-height: 46px; max-height: 140px; padding: 12px 16px; border-radius: 23px; border: 1px solid var(--line); background: var(--ground); resize: none; line-height: 1.4; font-size: 15.5px; transition: border-color .15s, background .15s; }
.composer-input:focus { outline: none; border-color: var(--orange); background: #fff; }
.send-btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--orange); color: #fff; flex: none; transition: background .2s, transform .2s var(--spring); }
.send-btn:not(:disabled):hover { transform: scale(1.06); }
.send-btn:disabled { background: var(--soft); }
.chat-preview { height: 100dvh; overflow-y: auto; background: #fff; border-left: 1px solid var(--line); padding: 22px; }
.chat-preview h3 { font-size: 16px; }
.how { display: flex; flex-direction: column; gap: 16px; }
.how-steps { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.how-steps li { display: flex; gap: 12px; }
.how-steps .n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tint); color: var(--orange); font: 800 14px "Poppins", sans-serif; flex: none; }
.how-steps b { display: block; font-size: 14.5px; }
.how-steps small { color: var(--muted); font-size: 13px; }
.how-fan { height: 240px; }
.how-fan .fan-card { width: 150px; transform: translateX(calc(-50% + var(--i) * 96px)) translateY(calc(var(--a, 0) * 12px)) rotate(calc(var(--i) * 7deg)); }
.pv { display: flex; flex-direction: column; gap: 14px; animation: fadeUp .4s var(--ease); }
.pv-cover { border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), var(--sh-2); }
.pv-cover canvas { width: 100%; height: auto; }
.pv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pv-thumb { border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); transition: transform .2s var(--ease); }
.pv-thumb:hover { transform: translateY(-2px); }
.pv-thumb canvas { width: 100%; height: auto; }
@media (max-width: 1199px) { .chat-page { grid-template-columns: 1fr; } .chat-preview { display: none; } }

/* ---------------------------------------------------------------- editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) var(--insp); height: 100dvh; overflow: hidden; background: var(--stage); }
.ed-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100dvh; }
.ed-head { display: flex; align-items: center; gap: 4px; padding: 8px 12px; padding-top: calc(8px + var(--safe-t)); min-height: 58px; background: #fff; border-bottom: 1px solid var(--line); flex: none; }
.ed-titles { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 0 6px; line-height: 1.25; }
.ed-title { font-size: 14.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-sub { font-size: 12px; font-weight: 600; color: var(--muted); }
.ed-export { margin-left: 6px; }
.ed-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 1px 1px, rgba(23,20,15,.07) 1px, transparent 0) 0 0 / 22px 22px, var(--stage); }
.ed-canvas-wrap { position: relative; transition: transform .3s var(--ease); }
.ed-canvas-wrap.in-r { animation: inR .32s var(--ease); } .ed-canvas-wrap.in-l { animation: inL .32s var(--ease); }
@keyframes inR { from { transform: translateX(36px); opacity: .4; } } @keyframes inL { from { transform: translateX(-36px); opacity: .4; } }
.ed-canvas { touch-action: none; border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 18px 40px -16px rgba(40,20,5,.35); background: #fff; outline: none; }
.ed-canvas:focus-visible { box-shadow: 0 0 0 3px rgba(226,71,15,.5), 0 18px 40px -16px rgba(40,20,5,.35); }
.ed-overlay { position: absolute; inset: 0; pointer-events: none; }
.inline-edit { position: absolute; pointer-events: auto; transform-origin: center; resize: none; overflow: hidden; border: 1.5px dashed var(--orange); border-radius: 4px; background: rgba(255,255,255,.08); padding: 5px; outline: none; white-space: pre-wrap; box-shadow: 0 0 0 9999px rgba(23,20,15,.06); }
.drop-hint { position: absolute; inset: 16px; display: none; place-items: center; align-content: center; gap: 8px; border: 2px dashed var(--orange); border-radius: 18px; background: rgba(252,235,227,.85); color: var(--orange); font-weight: 800; pointer-events: none; }
.ed-stage.dropping .drop-hint { display: grid; }
.ed-ctx { flex: none; display: flex; align-items: center; gap: 6px; min-height: 54px; padding: 8px 14px; overflow-x: auto; scrollbar-width: none; background: #F7F5F2; border-top: 1px solid var(--line); }
.ed-ctx::-webkit-scrollbar { display: none; }
.ctx-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line2); font-size: 13px; font-weight: 700; white-space: nowrap; transition: transform .15s var(--spring), box-shadow .15s, background .15s; animation: ctxIn .25s var(--ease) both; }
.ctx-btn:hover { box-shadow: inset 0 0 0 1px var(--ink2); }
.ctx-btn:active { transform: scale(.95); }
.ctx-btn.danger { color: var(--danger); }
.ctx-btn.accent { background: var(--tint); color: var(--orange); box-shadow: none; }
.ctx-btn:nth-child(2) { animation-delay: .02s; } .ctx-btn:nth-child(3) { animation-delay: .04s; } .ctx-btn:nth-child(4) { animation-delay: .06s; } .ctx-btn:nth-child(5) { animation-delay: .08s; } .ctx-btn:nth-child(6) { animation-delay: .1s; } .ctx-btn:nth-child(7) { animation-delay: .12s; } .ctx-btn:nth-child(8) { animation-delay: .14s; } .ctx-btn:nth-child(9) { animation-delay: .16s; }
@keyframes ctxIn { from { opacity: 0; transform: translateY(4px); } }
.ctx-sel { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; }
.ctx-x { margin-left: auto; flex: none; }
.ed-strip { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px 12px; overflow-x: auto; background: #F7F5F2; scrollbar-width: thin; }
.strip-item { position: relative; flex: none; border-radius: 6px; cursor: pointer; transition: transform .2s var(--ease); outline: none; }
.strip-item canvas { border-radius: 5px; box-shadow: 0 0 0 1px rgba(23,20,15,.1); }
.strip-item:hover { transform: translateY(-2px); }
.strip-item.on::after { content: ""; position: absolute; inset: -4px; border-radius: 9px; box-shadow: 0 0 0 2.5px var(--orange); pointer-events: none; }
.strip-item:focus-visible::after { content: ""; position: absolute; inset: -4px; border-radius: 9px; box-shadow: 0 0 0 2.5px rgba(226,71,15,.5); }
.strip-item.dragging { opacity: .4; }
.strip-item.drop { transform: translateX(6px); }
.strip-item.drop::before { content: ""; position: absolute; left: -7px; top: 0; bottom: 0; width: 3px; border-radius: 2px; background: var(--orange); }
.strip-n { position: absolute; left: 4px; bottom: 3px; font-size: 10px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); pointer-events: none; }
.strip-more { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: rgba(255,255,255,.95); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.2); opacity: 0; transition: opacity .15s; }
.strip-item:hover .strip-more, .strip-item.on .strip-more { opacity: 1; }
@media (hover: none) { .strip-more { display: none; } }
.strip-add { flex: none; display: grid; place-items: center; border-radius: 6px; background: #fff; border: 1.5px dashed var(--line2); color: var(--ink2); transition: border-color .15s, color .15s, transform .2s var(--spring); }
.strip-add:hover { border-color: var(--orange); color: var(--orange); transform: scale(1.04); }
.ed-tools { display: none; }
.ed-dock { display: none; }
.ed-inspector { display: flex; flex-direction: column; min-height: 0; height: 100dvh; background: #fff; border-left: 1px solid var(--line); }
.insp-tabs { display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 8px 0; border-bottom: 1px solid var(--line); flex: none; padding-top: calc(8px + var(--safe-t)); }
.insp-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 10px; font-size: 11px; font-weight: 700; color: var(--muted); border-bottom: 2.5px solid transparent; transition: color .15s, border-color .15s; white-space: nowrap; }
.insp-tab:hover { color: var(--ink); }
.insp-tab.on { color: var(--orange); border-bottom-color: var(--orange); }
.insp-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 16px 18px 6px; flex: none; }
.panel-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.panel-title { font-size: 17px; }
.panel-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 18px 28px; display: flex; flex-direction: column; gap: 14px; animation: panelIn .25s var(--ease); scrollbar-width: thin; }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px); } }
.panel-back { margin-left: -8px; }
.panel-scroll > * { flex-shrink: 0; }
.ed-ctx.fade { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.layer-actions { padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.arrange-btn { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 12px; border-radius: 10px; background: var(--ground); font-size: 13px; font-weight: 700; text-align: left; transition: background .15s; }
.arrange-btn:hover { background: #ECE8E2; }
.shape-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shape-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 80px; border-radius: 12px; background: var(--ground); color: var(--orange); font-size: 12.5px; transition: background .15s, transform .2s var(--spring); }
.shape-btn span:last-child { color: var(--ink); font-weight: 700; }
.shape-btn:hover { background: var(--tint); transform: translateY(-2px); }
.lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 10px; }
.lib-item { position: relative; }
.lib-btn { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.lib-thumb { position: relative; display: block; border-radius: 7px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); transition: transform .2s var(--ease), box-shadow .2s; }
.lib-thumb canvas { width: 100%; height: auto; }
.lib-btn:hover .lib-thumb { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--orange); }
.lib-name { font-size: 11.5px; font-weight: 700; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-pin { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--orange); color: #fff; }
.lib-more { position: absolute; top: 3px; left: 3px; background: rgba(255,255,255,.92); width: 26px; height: 26px; }
.layer-list { display: flex; flex-direction: column; gap: 6px; }
.layer-row { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 6px 0 10px; border-radius: 10px; background: var(--ground); cursor: pointer; transition: background .15s; }
.layer-row:hover { background: #ECE8E2; }
.layer-row.on { background: var(--tint); }
.layer-row.hidden .layer-text b { color: var(--muted); }
.layer-ic { display: grid; place-items: center; width: 28px; color: var(--ink2); }
.layer-text b { display: block; font-size: 14px; }
.layer-text small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rewrite-now { display: flex; flex-direction: column; gap: 4px; background: var(--ground); border: 0; }
.rewrite-now b { font-size: 14px; }

/* AI images */
.ai-offer { display: flex; flex-direction: column; gap: 10px; }
.ai-feats { list-style: none; display: flex; flex-direction: column; gap: 9px; padding: 14px; background: var(--ground); border-radius: 14px; font-weight: 600; font-size: 14px; }
.ai-feats li { display: flex; gap: 10px; align-items: center; }
.ai-fan { height: 170px; margin-top: 4px; }
.ai-fan .fan-card { width: 96px; transform: translateX(calc(-50% + var(--i) * 70px)) translateY(calc(var(--a, 0) * 8px)) rotate(calc(var(--i) * 6deg)); }
.ai-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--ground); }
.ai-card.working { flex-direction: row; align-items: center; gap: 14px; }
.ai-card.working > div:last-child { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.ai-card.review { background: #fff; box-shadow: inset 0 0 0 1.5px rgba(226,71,15,.5); }
.ai-q { font-size: 16px; }
.ai-thumb { border-radius: 12px; overflow: hidden; box-shadow: var(--sh-2); display: inline-block; }
.ai-thumb canvas { display: block; }
.ai-thumb-wrap { position: relative; flex: none; }
.ai-thumb-wrap .ai-thumb { opacity: .4; }
.ai-spin { position: absolute; inset: 0; display: grid; place-items: center; }
.progress { height: 5px; border-radius: 3px; background: #E4DED6; overflow: hidden; }
.progress i { display: block; height: 100%; width: 40%; background: var(--orange); border-radius: 3px; animation: indet 1.4s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.ai-done { display: flex; align-items: center; gap: 8px; color: var(--ok); }
.ai-overview { display: flex; gap: 8px; padding: 6px 2px; }
.ai-ov { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ai-ov canvas { border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.ai-ov.busy canvas { opacity: .4; }
.ai-ov small { font-size: 11px; font-weight: 700; color: var(--muted); }
.ai-check { position: absolute; top: -5px; right: -5px; background: #fff; border-radius: 50%; line-height: 0; }

/* Instagram preview */
.modal.ig-modal { width: auto; }
.ig { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; max-width: 100%; }
.ig-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 14px; }
.ig-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ig-track::-webkit-scrollbar { display: none; }
.ig-page { flex: 0 0 100%; scroll-snap-align: start; }
.ig-page canvas { width: 100%; height: auto; }
.ig-actions { display: flex; gap: 16px; padding: 10px 12px 0; }
.ig-dots { display: flex; justify-content: center; gap: 4px; padding: 8px 0; }
.ig-dots i { width: 6px; height: 6px; border-radius: 50%; background: #D0D0D0; transition: background .2s, transform .2s; }
.ig-dots i.on { background: #3897F0; transform: scale(1.15); }
.ig-caption { padding: 0 12px 16px; font-size: 14px; white-space: pre-wrap; max-height: 180px; overflow: auto; }

/* Export */
.export-page { width: min(980px, 100%); }
.exp-progress { display: flex; align-items: center; gap: 10px; padding: 24px 0; color: var(--muted); font-weight: 600; }
.exp-strip { display: flex; gap: 12px; overflow-x: auto; padding: 6px 2px 16px; scroll-snap-type: x proximity; }
.exp-item { position: relative; flex: none; height: 230px; scroll-snap-align: start; animation: fadeUp .35s var(--ease) both; }
.exp-item img { height: 100%; width: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--line), var(--sh-2); }
.exp-item figcaption { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(23,20,15,.7); color: #fff; font-size: 11px; font-weight: 800; }
.exp-dl { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 999px; background: #fff; font-size: 12px; font-weight: 800; box-shadow: var(--sh-1); transition: transform .2s var(--spring), background .15s; }
.exp-dl:hover { background: var(--orange); color: #fff; transform: scale(1.05); }
.exp-opts { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 16px; }
.exp-done { display: flex; align-items: center; gap: 14px; padding: 16px; margin: 6px 0 10px; border-radius: 18px; background: var(--ok-tint); }
.exp-done.pop { animation: popIn .5s var(--spring); }
.exp-done .dog { width: 76px; flex: none; }
@keyframes popIn { from { transform: scale(.94); opacity: 0; } }

/* Tutorial */
.tut-wrap { position: fixed; inset: 0; z-index: 700; display: grid; place-items: center; background: rgba(23,20,15,.5); opacity: 0; transition: opacity .3s; padding: 16px; }
.tut-wrap.in { opacity: 1; } .tut-wrap.out { opacity: 0; }
.tut { --g1: #FF5F2E; --g2: #E2186A; position: relative; width: min(420px, 100%); height: min(760px, calc(100dvh - 32px)); display: flex; flex-direction: column; border-radius: 28px; overflow: hidden; color: #fff; background: linear-gradient(150deg, var(--g1), var(--g2)); box-shadow: var(--sh-3); transition: background .5s; transform: scale(.96); transition: transform .35s var(--spring); }
.tut-wrap.in .tut { transform: none; }
.tut::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.16); pointer-events: none; }
.tut > * { position: relative; }
.tut-bars { display: flex; gap: 4px; padding: 12px 14px 0; }
.tut-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); overflow: hidden; }
.tut-bars b { display: block; height: 100%; width: 0; background: #fff; }
.tut-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 0 14px; font-size: 14px; }
.tut-stage { flex: 1; display: grid; place-items: center; min-height: 0; cursor: pointer; user-select: none; }
.tut-phone { width: 196px; aspect-ratio: 9 / 18.5; border-radius: 34px; background: #111; padding: 8px; box-shadow: 0 24px 44px -16px rgba(0,0,0,.5); }
.tut-screen { position: relative; width: 100%; height: 100%; border-radius: 27px; background: #EDE9E3; overflow: hidden; display: grid; place-items: center; }
.tut-slide { width: 150px; border-radius: 6px; overflow: hidden; box-shadow: 0 10px 22px -10px rgba(0,0,0,.45); }
.tut-slide canvas { width: 100%; height: auto; }
.tut-sel { position: absolute; left: 50%; top: 58%; width: 140px; height: 46px; margin-left: -70px; border: 1.5px dashed #E2470F; border-radius: 3px; opacity: 0; }
.tut-finger { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.95); box-shadow: 0 2px 6px rgba(0,0,0,.35); opacity: 0; left: 50%; top: 62%; margin: -9px; }
.g-drag .tut-sel, .g-drag .f1 { opacity: 1; animation: dragY 2.2s var(--ease) infinite; }
@keyframes dragY { 0%, 15% { transform: translateY(0); } 55%, 70% { transform: translateY(-70px); } 100% { transform: translateY(0); } }
.g-pinch .tut-sel { opacity: 1; animation: pinchS 2s ease-in-out infinite; }
.g-pinch .f1, .g-pinch .f2 { opacity: 1; }
.g-pinch .f1 { animation: pinchA 2s ease-in-out infinite; } .g-pinch .f2 { animation: pinchB 2s ease-in-out infinite; }
@keyframes pinchS { 50% { transform: scale(1.3) rotate(-6deg); } }
@keyframes pinchA { 50% { transform: translate(-58px, -16px); } } @keyframes pinchB { 50% { transform: translate(58px, 16px); } }
.g-pulse .tut-sel { opacity: 1; animation: pulseS 1.3s ease-in-out infinite alternate; border-color: #fff; border-style: solid; border-width: 2.5px; border-radius: 8px; }
.g-pulse .f1 { opacity: 1; animation: tap2 1.3s ease-in-out infinite; }
@keyframes pulseS { from { transform: scale(.96); opacity: .5; } to { transform: scale(1.04); opacity: 1; } }
@keyframes tap2 { 0%, 100% { transform: scale(1); } 20%, 50% { transform: scale(.75); } 35% { transform: scale(1); } }
.tut-files { position: absolute; left: 0; right: 0; bottom: 34px; display: flex; justify-content: center; gap: 8px; }
.tut-files span { padding: 6px 10px; border-radius: 9px; background: #fff; color: #17140F; font-weight: 800; font-size: 12px; box-shadow: 0 6px 14px -6px rgba(0,0,0,.4); animation: fileUp 2.4s var(--spring) infinite; }
.tut-files span:nth-child(2) { animation-delay: .15s; } .tut-files span:nth-child(3) { animation-delay: .3s; }
@keyframes fileUp { 0% { transform: translateY(30px); opacity: 0; } 25%, 80% { transform: none; opacity: 1; } 100% { opacity: 0; } }
.g-none .tut-slide { animation: floaty 3s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-8px) rotate(-1.5deg); } }
.tut-copy { padding: 4px 24px 10px; }
.tut-title { font: 800 26px/1.15 "Poppins", sans-serif; letter-spacing: -.02em; }
.tut-text { margin-top: 8px; font-size: 16px; color: rgba(255,255,255,.88); min-height: 4.4em; }
.rise { animation: rise2 .45s var(--ease) both; }
@keyframes rise2 { from { opacity: 0; transform: translateY(12px); } }
.tut-foot { display: flex; align-items: center; gap: 10px; padding: 8px 18px calc(16px + var(--safe-b)); }
.tut-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; font-size: 14px; color: rgba(255,255,255,.92); }
.tut-check .box { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.8); color: transparent; transition: background .15s; }
.tut-check.on .box { background: #fff; color: var(--orange); box-shadow: none; }
.tut-next { min-height: 42px; padding: 0 20px; border-radius: 999px; background: rgba(255,255,255,.2); color: #fff; font-weight: 800; transition: background .15s, transform .15s var(--spring); }
.tut-next:hover { background: rgba(255,255,255,.3); }
.tut-next.primary { background: #fff; color: var(--orange); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1279px) and (min-width: 900px) {
  .route-editor .sidebar, .route-export .sidebar, .route-chat .sidebar { width: 76px; }
  .route-editor .shell, .route-chat .shell, .route-export .shell { grid-template-columns: 76px minmax(0, 1fr); }
  .route-editor .logo-word, .route-editor .side-link > span:not(.ic), .route-editor .side-new > span:not(.ic), .route-editor .side-label span, .route-editor .side-proj-text, .route-editor .side-carousels, .route-editor .side-plan > span:not(.ic), .route-editor .lang-btn > span:not(.ic),
  .route-chat .logo-word, .route-chat .side-link > span:not(.ic), .route-chat .side-new > span:not(.ic), .route-chat .side-label span, .route-chat .side-proj-text, .route-chat .side-carousels, .route-chat .side-plan > span:not(.ic), .route-chat .lang-btn > span:not(.ic),
  .route-export .logo-word, .route-export .side-link > span:not(.ic), .route-export .side-new > span:not(.ic), .route-export .side-label span, .route-export .side-proj-text, .route-export .side-carousels, .route-export .side-plan > span:not(.ic), .route-export .lang-btn > span:not(.ic) { display: none; }
  .route-editor .side-top, .route-chat .side-top, .route-export .side-top { flex-direction: column; gap: 8px; }
  .route-editor .side-link, .route-editor .side-proj-btn, .route-chat .side-link, .route-chat .side-proj-btn, .route-export .side-link, .route-export .side-proj-btn { justify-content: center; padding: 0; min-height: 44px; }
  .route-editor .side-new, .route-chat .side-new, .route-export .side-new { padding: 0; }
  .route-editor .side-foot, .route-chat .side-foot, .route-export .side-foot { flex-direction: column; }
  .route-editor .side-plan, .route-chat .side-plan, .route-export .side-plan { justify-content: center; padding: 0; width: 100%; flex: none; }
  .route-editor .side-toggle, .route-chat .side-toggle, .route-export .side-toggle { display: none; }
  :root { --insp: 330px; }
}
@media (max-width: 1100px) and (min-width: 900px) { .home-top { grid-template-columns: 1fr; } .stats { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 899px) {
  body { font-size: 15px; }
  .page { padding: calc(16px + var(--safe-t)) 16px 28px; }
  .greet { font-size: 25px; margin-bottom: 14px; }
  .page-title { font-size: 24px; }
  .home-top { grid-template-columns: 1fr; gap: 10px; }
  .hero-card { min-height: 0; padding: 20px; }
  .hero-card h2 { font-size: 21px; }
  .hero-dog { width: 170px; right: -20px; bottom: -10px; }
  .free-card { flex-direction: row; align-items: center; padding: 12px 14px; border-radius: var(--r-md); }
  .free-card > span:not(.pill) { flex: 1; font-size: 13.5px; }
  .free-card small { display: none; }
  .section-head { margin: 24px 0 10px; }
  .proj-row { margin: 0 -16px; padding: 2px 16px; }
  .proj-chip { width: 150px; }
  .c-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .proj-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .page-head.sticky { padding-top: calc(10px + var(--safe-t)); }

  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-card { padding: calc(14px + var(--safe-t)) 20px calc(20px + var(--safe-b)); min-height: 100dvh; }
  .login-top { justify-content: space-between; }
  .login-form { align-items: flex-start; padding-top: 8vh; }
  .login-head h2 { font-size: 25px; }
  .code-row { gap: 6px; }
  .code-box { font-size: 22px; border-radius: 11px; }

  .onb { padding: 0; place-items: stretch; background: #fff; }
  .onb-card, .onb-card.wide { width: 100%; min-height: 100dvh; border-radius: 0; border: 0; box-shadow: none; }
  .onb-top { padding-top: calc(12px + var(--safe-t)); }
  .onb-body { padding: 10px 20px 18px; }
  .onb-foot { padding: 10px 20px calc(14px + var(--safe-b)); }
  .display { font-size: 28px; }
  .login-fan, .onb-fan { height: 230px; }
  .onb-fan .fan-card { width: 130px; transform: translateX(calc(-50% + var(--i) * 92px)) translateY(calc(var(--a, 0) * 12px)) rotate(calc(var(--i) * 7deg)); }
  .niche-grid { gap: 7px; }

  .modal-wrap:not(.sheet-wrap) { padding: 16px; }
  .chat-page { grid-template-columns: 1fr; height: 100dvh; }
  .chat-list { padding: 16px 12px 22px; }
  .msg .bubble { max-width: 86%; }

  /* editor, phone */
  .editor { grid-template-columns: 1fr; }
  .ed-inspector { display: none; }
  .ed-head { min-height: 52px; padding: 4px 6px; padding-top: calc(4px + var(--safe-t)); }
  .ed-export > span:not(.ic) { display: none; }
  .ed-export { padding: 0 12px; }
  .ed-head .icon-btn { width: 38px; }
  .ed-ctx { padding: 7px 10px; min-height: 50px; }
  .ed-strip { padding: 8px 10px; gap: 8px; scrollbar-width: none; }
  .ed-strip::-webkit-scrollbar { display: none; }
  .ed-tools { display: flex; flex: none; padding: 4px 4px calc(4px + var(--safe-b)); background: #fff; border-top: 1px solid var(--line); }
  .ed-tool { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 52px; justify-content: center; font-size: 10.5px; font-weight: 700; color: var(--ink2); border-radius: 10px; }
  .ed-tool.on { color: var(--orange); }
  .ed-dock { display: none; flex-direction: column; flex: none; height: 46dvh; background: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px -12px rgba(40,20,5,.3); position: relative; z-index: 3; transition: height .3s var(--ease); padding-bottom: var(--safe-b); }
  .ed-dock.large { height: 80dvh; }
  .editor.dock-open .ed-dock { display: flex; animation: dockUp .32s var(--ease); }
  .editor.dock-open .ed-strip, .editor.dock-open .ed-tools { display: none; }
  .ed-dock .panel-head { position: relative; padding: 20px 14px 4px; touch-action: none; }
  .ed-dock .panel-head .grabber { position: absolute; top: 7px; left: 50%; margin: 0 0 0 -19px; }
  .editor.dock-open .ed-ctx { border-bottom: 0; }
  .ed-dock .panel-scroll { padding: 6px 14px 22px; }
  .dock-ok { flex: none; }
  @keyframes dockUp { from { transform: translateY(40%); opacity: .4; } }
  .tpl-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .lib-grid { grid-template-columns: repeat(3, 1fr); }
  .exp-item { height: 180px; }
  .tut { height: 100dvh; width: 100%; border-radius: 0; }
  .tut-wrap { padding: 0; }
}
@media (max-width: 380px) {
  .niche-grid { grid-template-columns: repeat(2, 1fr); }
  .ed-head .icon-btn { width: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .dog-fill { clip-path: none; }
  .splash-name { opacity: 1; transform: none; }
}

mark.hl { background: none; color: var(--orange); font-weight: inherit; }
.starters { flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 2px; }
.starters .kicker { margin: 4px 0 2px; }
.idea-chip { max-width: 100%; white-space: normal; text-align: left; min-height: 38px; padding: 7px 13px; line-height: 1.3; border-radius: 16px; }
.idea-chip .ic { color: var(--orange); }
@media (max-width: 899px) { .toast { font-size: 13.5px; padding: 9px 15px; } }
