/* AI App Builder — chrome styles. Sky-blue / smoke-white, Burmese-first. */
@font-face {
  font-family: 'ABMyanmar';
  src: url('/fonts/NotoSansMyanmar-Regular.woff2') format('woff2');
  font-weight: 400;
}
@font-face {
  font-family: 'ABMyanmar';
  src: url('/fonts/NotoSansMyanmar-Bold.woff2') format('woff2');
  font-weight: 700;
}
:root {
  --bg: #EEF2F5;
  --surface: #FFFFFF;
  --ink: #0F172A;
  --grey: #64748B;
  --line: #E2E8F0;
  --sky: #0EA5E9;
  --sky-deep: #0284C7;
  --danger: #EF4444;
  --radius: 20px;
}
html[data-theme='dark'] {
  --bg: #0B1220;
  --surface: #16202E;
  --ink: #E7EEF5;
  --grey: #94A3B8;
  --line: #24344A;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html, body { overflow-x: hidden; overscroll-behavior-x: none; }
body {
  font-family: 'ABMyanmar', 'Noto Sans Myanmar', 'Padauk', system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--ink);
  line-height: 1.75; -webkit-font-smoothing: antialiased;
  position: relative;
}
.page { overflow-x: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
h1 { font-size: 24px; line-height: 1.6; }
h2 { font-size: 18px; line-height: 1.6; }

/* ---------- buttons ---------- */
.btn-primary {
  background: var(--sky-deep); color: #fff; border-radius: 999px;
  padding: 10px 20px; font-weight: 700; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-primary.big { width: 100%; min-height: 52px; font-size: 16px; }
.btn-primary.small { min-height: 38px; padding: 6px 16px; font-size: 14px; }
.btn-outline {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 9px 26px; font-weight: 700; min-height: 44px;
}
.icon-btn {
  width: 44px; height: 44px; border-radius: 999px; font-size: 21px;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.icon-btn:hover { background: var(--line); }
.icon-btn.small { width: 32px; height: 32px; font-size: 14px; }
.btn-primary:active, .btn-outline:active, .tpl-card:active, .proj-row:active { transform: scale(.97); }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(130% 55% at 50% -5%, rgba(46, 134, 232, .20), rgba(46, 134, 232, 0) 60%), var(--bg); }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 30px 24px 20px; width: 100%; max-width: 380px; box-shadow: 0 24px 60px rgba(11, 21, 38, .14); }
.auth-logo { text-align: center; color: var(--sky); }
.about-head { text-align: center; padding: 6px 0 2px; }
.about-icon { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 8px 20px rgba(11, 21, 38, .20); }
.about-name { font-size: 20px; font-weight: 800; margin-top: 10px; }
.about-tag { color: var(--sky); font-weight: 700; font-size: 13.5px; margin-top: 2px; }
.about-body { color: var(--muted); font-size: 13.5px; line-height: 1.7; text-align: center; margin: 12px 2px 14px; }
.about-feats { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.about-feat { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; }
.about-feat .af-ic { width: 34px; height: 34px; flex: none; border-radius: 11px; background: var(--sky-soft); color: var(--sky); display: flex; align-items: center; justify-content: center; }
.about-feat .af-ic .ic { width: 18px; height: 18px; }
.about-foot { text-align: center; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.auth-logo-img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 10px 24px rgba(11, 21, 38, .22); }
svg.ic { flex: none; vertical-align: -5px; }
button svg.ic, a svg.ic { width: 18px; height: 18px; }
.auth-title { text-align: center; font-weight: 800; font-size: 22px; margin: 10px 0 0; }
.auth-tagline { text-align: center; color: var(--sky-deep); font-weight: 700; font-size: 13px; margin: 3px 0 18px; }
.auth-input { position: relative; display: block; }
.auth-input .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--grey); pointer-events: none; }
.auth-input input { padding-left: 38px !important; }
.auth-forgot { align-self: flex-end; color: var(--sky-deep); font-size: 12.5px; font-weight: 700; padding: 2px 2px 0; }
.auth-card .btn-primary { background: var(--sky); box-shadow: 0 8px 18px rgba(15, 35, 55, .20); border: none; }
.auth-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 9px; }
.auth-lang { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.auth-lang .ic { width: 15px; height: 15px; color: var(--sky-deep); }
.auth-lang-chev { color: var(--grey); font-size: 10px; }
.auth-ver { color: var(--grey); font-size: 11px; }
.forgot-sent-ic { width: 56px; height: 56px; margin: 6px auto 10px; border-radius: 50%; background: #E8F7EE; color: #16A34A; display: flex; align-items: center; justify-content: center; }
.forgot-sent-ic .ic { width: 28px; height: 28px; }
.reset-flag { color: #D97706 !important; font-weight: 700; }
.auth-tabs { display: flex; background: var(--bg); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.auth-tab { flex: 1; border-radius: 999px; padding: 9px; font-weight: 700; color: var(--grey); }
.auth-tab.active { background: var(--surface); color: var(--sky-deep); box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form label, .field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; }
.auth-form input, .field input, .field textarea {
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface); min-height: 48px; font-weight: 400;
}
.auth-form input:focus, .field input:focus, .field textarea:focus { outline: 2px solid var(--sky); border-color: transparent; }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; font-weight: 400; }

/* ---------- pages ---------- */
.page { max-width: 560px; margin: 0 auto; padding: 14px 16px 0; min-height: 100dvh; animation: pageIn .3s cubic-bezier(.2, .8, .25, 1); }
@keyframes pageIn { from { opacity: 0; transform: translateX(26px) scale(.995); } to { opacity: 1; transform: none; } }
.page-bar { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.page-title { flex: 1; text-align: center; font-weight: 800; font-size: 17px; line-height: 1.6; }
.bar-spacer { width: 44px; flex: none; }
.back-btn { font-size: 26px; }
.bottom-space { height: 40px; }
.section-head { display: flex; align-items: center; gap: 8px; margin: 24px 0 12px; }
.section-head h2 { flex: 1; }
.see-more { color: var(--sky-deep); font-weight: 700; padding: 8px 4px; }
.count-badge { background: var(--line); color: var(--grey); border-radius: 999px; min-width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; padding: 0 7px; }

/* ---------- home ---------- */
.greet-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; }
.greet-texts { flex: 1; min-width: 0; }
.greet-line { color: var(--sky-deep); font-weight: 700; font-size: 15px; }
.home-heading { margin-top: 8px; font-size: clamp(21px, 6vw, 26px); font-weight: 800; line-height: 1.35; white-space: nowrap; }
.avatar-btn {
  width: 46px; height: 46px; border-radius: 999px; flex: none;
  background: linear-gradient(160deg, #1B2B45, #0B1526); color: #fff; font-weight: 800; font-size: 19px;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
}
.create-card {
  margin-top: 18px; width: 100%; border-radius: 26px; padding: 22px;
  background: var(--sky-deep); color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  box-shadow: 0 14px 30px rgba(15, 35, 55, .22);
}
.create-plus {
  width: 62px; height: 62px; border-radius: 999px; background: rgba(255, 255, 255, .22);
  display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 300;
}
.create-label { font-weight: 800; font-size: 18px; }
.create-go { background: #fff; color: var(--sky-deep); border-radius: 999px; padding: 8px 18px; font-weight: 700; font-size: 14px; }
.recent-list { display: flex; flex-direction: column; gap: 0; }
.proj-list { gap: 0; }
.proj-list .proj-row + .proj-row, .recent-list .recent-card + .recent-card { border-top: 1px solid var(--line); }
.recent-card, .proj-row {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  background: transparent; border: 0; border-radius: 0; padding: 10px 2px; box-shadow: none; cursor: pointer; font: inherit;
}
.proj-ic { width: 60px; height: 60px; border-radius: 16px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 26px; flex: none; }
.proj-texts { flex: 1; min-width: 0; }
.proj-name { font-weight: 700; font-size: 16.5px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-meta { color: var(--grey); font-size: 13px; line-height: 1.5; }
.proj-del { color: var(--danger); width: 40px; height: 40px; font-size: 16px; flex: none; }
.proj-list { display: flex; flex-direction: column; gap: 10px; }
.empty-line { color: var(--grey); font-size: 14px; padding: 8px 2px; }

/* templates */
.tpl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.tpl-card {
  position: relative; overflow: hidden; min-height: 126px; min-width: 0;
  border-radius: 22px; border: 0; cursor: pointer; font: inherit;
  padding: 14px; display: flex; flex-direction: column; justify-content: flex-end;
  align-items: flex-start; text-align: left;
  background: var(--tile-l, var(--surface));
  box-shadow: 0 10px 22px rgba(31, 52, 84, .14);
}
.tpl-ic { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex: none; }
.tpl-ic .ic { width: 19px; height: 19px; }
.tpl-texts { display: flex; flex-direction: column; min-width: 0; }
.tpl-name { color: #FFFFFF; font-weight: 800; font-size: 16.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tpl-cat { color: rgba(255,255,255,.74); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-texts { display: flex; flex-direction: column; gap: 2px; min-width: 0; position: relative; z-index: 1; }
.tpl-art { position: absolute; right: -12px; top: -10px; opacity: .7; pointer-events: none; }
.tpl-card .tpl-art svg.ic { width: 80px; height: 80px; stroke-width: 1.2; }
.chips-row { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 12px; scrollbar-width: none; overscroll-behavior-x: contain; max-width: 100%; }
.chips-row::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 700; min-height: 40px; }
.chip.active { background: var(--sky-deep); border-color: var(--sky-deep); color: #fff; }
#genre-create { width: 100%; margin-bottom: 14px; }

/* ---------- chat ---------- */
.chat-page { display: flex; flex-direction: column; height: var(--vvh, 100dvh); padding-top: 6px; }
body.chat-lock { position: fixed; left: 0; right: 0; top: var(--vvo, 0px); height: var(--vvh, 100dvh); width: 100%; overflow: hidden; }
.chat-bar { flex: none; }
.chat-bar-icon {
  flex: 1; text-align: center; font-size: 21px;
  display: flex; align-items: center; justify-content: center;
}
.chat-bar-icon::after {
  content: ''; width: 42px; height: 42px; border-radius: 999px; background: var(--sky);
  position: absolute; z-index: -1;
}
.chat-bar-icon { position: relative; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.2); }
.slim-progress { flex: none; height: 3px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 2px 0 0; }
.slim-progress span { display: block; height: 100%; width: 0; background: var(--sky); transition: width .5s ease; }
.chat-messages { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 2px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 20px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-end; background: var(--sky-deep); color: #fff; border-bottom-right-radius: 6px; }
.msg.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.narration { align-self: flex-start; background: transparent; border: 0; color: var(--grey); font-size: 13.5px; padding: 2px 6px; }
.msg.error { align-self: flex-start; background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
html[data-theme='dark'] .msg.error { background: #3B1113; border-color: #7F1D1D; color: #FCA5A5; }
.msg img.msg-photo { max-width: 100%; border-radius: 12px; display: block; }
.msg-row { display: flex; gap: 8px; align-items: flex-start; }
.msg-row { animation: msgIn .32s cubic-bezier(.21,.61,.35,1) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.msg-row .builder-av { transition: opacity .3s ease, transform .3s ease, width .3s ease, margin .3s ease; }
.msg-row .builder-av.av-gone { opacity: 0; transform: scale(.5); width: 0; margin-right: -8px; overflow: hidden; }
.msg-row .builder-av {
  width: 32px; height: 32px; border-radius: 999px; background: var(--sky); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 15px; flex: none; margin-top: 2px;
}
.app-card { align-self: stretch; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 14px; }
.app-card-head { display: flex; gap: 12px; align-items: center; }
.app-card .proj-name { font-size: 16px; }
.app-card-actions { display: flex; gap: 10px; margin-top: 12px; }
.app-card-actions .btn-primary { flex: 1; }
.app-card-actions .btn-outline { flex: 1; }
.working-ind { display: flex; gap: 8px; align-items: flex-start; }
.working-bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; border-bottom-left-radius: 6px; padding: 10px 14px; }
.dots { display: inline-flex; gap: 4px; margin-right: 8px; vertical-align: middle; }
.dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--sky); animation: blink 1.5s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .18s; } .dots i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.working-stage { font-weight: 600; font-size: 14.5px; }
.working-pct { color: var(--sky-deep); font-weight: 800; font-size: 13.5px; margin-top: 2px; }
.queue-badge { background: var(--line); border-radius: 999px; padding: 1px 9px; font-size: 12px; color: var(--grey); font-weight: 700; margin-left: 6px; }
.composer-wrap { flex: none; padding: 8px 0 calc(10px + env(safe-area-inset-bottom)); }
.composer {
  display: flex; align-items: flex-end; gap: 6px; background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 26px; padding: 6px;
}
.composer textarea {
  flex: 1; border: 0; resize: none; background: none; max-height: 120px;
  padding: 9px 4px; line-height: 1.7; outline: none;
}
.send-btn {
  width: 44px; height: 44px; border-radius: 999px; background: var(--sky-deep); color: #fff;
  font-size: 19px; flex: none; display: flex; align-items: center; justify-content: center;
}
.photo-preview { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 8px; margin-bottom: 8px; }
.photo-preview img { width: 52px; height: 52px; object-fit: cover; border-radius: 12px; }
.photo-types { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.ptype { padding: 6px 11px; border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 700; color: var(--grey); }
.ptype.active { background: var(--sky-deep); color: #fff; }

/* ---------- edit ---------- */
.edit-body { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
.color-row { display: flex; gap: 10px; align-items: center; }
.color-row input[type='color'] { width: 52px; height: 48px; border: 1.5px solid var(--line); border-radius: 12px; padding: 4px; background: var(--surface); }
.color-row input[type='text'] { flex: 1; }
.edit-screen { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.edit-screen > .field { margin-bottom: 10px; }
.edit-item { display: flex; gap: 8px; margin-top: 8px; }
.edit-item input { flex: 1; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 10px; min-width: 0; }
.edit-item input.price { flex: 0 0 96px; }
.edit-item .icon-btn { width: 40px; height: 44px; color: var(--danger); }
.add-item-btn { margin-top: 10px; color: var(--sky-deep); font-weight: 700; padding: 8px 2px; }
.edit-sec-title { color: var(--grey); font-size: 12.5px; font-weight: 700; margin-top: 10px; }

/* ---------- preview ---------- */
.seg-toggle { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin: 10px auto 16px; width: fit-content; }
.seg-toggle button { padding: 8px 20px; border-radius: 999px; font-weight: 700; color: var(--grey); min-height: 40px; }
.seg-toggle button.active { background: var(--sky-deep); color: #fff; }
.export-pill { margin-left: auto; }
.preview-stage { display: flex; flex-direction: column; align-items: center; padding: 6px 0 10px; }
.phone-frame {
  width: 248px; height: 470px; border: 9px solid #111827; border-radius: 38px; overflow: hidden;
  position: relative; background: #fff; box-shadow: 0 18px 44px rgba(15, 23, 42, .22);
}
.phone-frame .gapp { height: 100%; }
.fs-btn {
  position: absolute; right: 10px; bottom: 76px; z-index: 5;
  width: 38px; height: 38px; border-radius: 999px; background: rgba(15, 23, 42, .55); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 16px; backdrop-filter: blur(2px);
}
.phone-frame .fs-btn { bottom: 76px; }
.laptop-frame { width: 100%; max-width: 520px; }
.laptop-screen {
  border: 10px solid #111827; border-bottom-width: 4px; border-radius: 16px 16px 0 0;
  overflow: hidden; position: relative; background: #fff; aspect-ratio: 1280 / 800;
}
.laptop-base { height: 14px; background: linear-gradient(#374151, #111827); border-radius: 0 0 14px 14px; margin: 0 -14px; position: relative; }
.laptop-base::after { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 90px; height: 5px; background: #1F2937; border-radius: 0 0 8px 8px; }
.desk-stage { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; transform-origin: top left; background: #fff; }
.desk-stage .gapp { height: 100%; }

/* fullscreen + takeover */
.fs-overlay, .takeover-overlay { position: fixed; inset: 0; z-index: 60; background: #000; }
.fs-overlay { display: flex; flex-direction: column; }
.fs-overlay.hidden { display: none; }
/* The preview gets its own chrome bar: the app area stays 100% tappable,
   and Exit is a labelled pill on OUR bar - never a faint floating circle. */
.fs-bar {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: var(--surface); border-bottom: 1px solid var(--line); color: var(--ink);
}
.fs-bar-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--sky); color: #fff; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.fs-bar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fs-bar-name { flex: 1; font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-exit-btn {
  flex: none; display: flex; align-items: center; gap: 6px; border: none; cursor: pointer;
  background: var(--ink); color: var(--bg); font-weight: 800; font-size: 14px;
  padding: 9px 14px; border-radius: 999px;
}
.fs-exit-btn .ic { width: 15px; height: 15px; }
.fs-exit-btn:active { transform: scale(.96); }
.fs-stage { position: relative; flex: 1; min-height: 0; }
.fs-stage .gapp { height: 100%; }
.fs-confirm { position: absolute; inset: 0; z-index: 6; background: rgba(10, 15, 25, .5); display: flex; align-items: center; justify-content: center; padding: 24px; }
.fs-confirm.hidden { display: none; }
.fs-confirm-card { background: var(--surface); color: var(--ink); border-radius: 20px; padding: 20px; width: 100%; max-width: 320px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); animation: msgIn .25s cubic-bezier(.21,.61,.35,1) both; }
.fs-confirm-q { font-weight: 800; font-size: 16.5px; text-align: center; }
.fs-confirm-btns { display: flex; gap: 10px; margin-top: 16px; }
.fs-confirm-btns .btn-outline, .fs-confirm-btns .btn-primary { flex: 1; }
.takeover-wrap { position: absolute; inset: 0; overflow: hidden; }
.takeover-stage { position: absolute; top: 50%; left: 50%; width: 1280px; height: 800px; transform-origin: center; background: #fff; }
.takeover-stage .gapp { height: 100%; }
.takeover-controls {
  position: absolute; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; gap: 6px; align-items: center; background: rgba(17, 24, 39, .78); border-radius: 999px; padding: 6px 10px;
  transition: opacity .4s; z-index: 5;
}
.takeover-controls.faded { opacity: 0; pointer-events: none; }
.takeover-controls button { color: #fff; min-width: 40px; height: 40px; border-radius: 999px; font-weight: 700; padding: 0 10px; }
.takeover-controls button:hover { background: rgba(255, 255, 255, .15); }
.takeover-controls span { color: #fff; font-size: 13px; min-width: 42px; text-align: center; }
.rotate-hint {
  position: absolute; top: 16%; left: 50%; transform: translateX(-50%); z-index: 6;
  background: rgba(17, 24, 39, .8); color: #fff; border-radius: 16px; padding: 12px 18px; font-size: 26px;
  display: flex; align-items: center; gap: 12px;
}
.rotate-hint button { color: #fff; font-size: 15px; }

/* ---------- profile ---------- */
.profile-head { display: flex; align-items: center; gap: 13px; padding: 16px 2px 4px; }
.profile-avatar {
  width: 54px; height: 54px; border-radius: 999px; background: linear-gradient(160deg, #1B2B45, #0B1526); color: #fff; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800;
  background-size: cover; background-position: center;
}
.profile-id { flex: 1; min-width: 0; }
.profile-name { font-weight: 800; font-size: 17.5px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-handle { color: var(--grey); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-bio { color: var(--grey); font-size: 14px; margin-top: 4px; max-width: 300px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stats-row { display: flex; gap: 34px; margin: 16px 0; }
.stat { text-align: center; }
.stat b { display: block; font-size: 19px; }
.stat span { color: var(--grey); font-size: 12.5px; }
.credit-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 16px; padding: 15px 16px; }
.credit-top { display: flex; align-items: center; gap: 9px; }
.credit-ic { color: var(--sky); display: flex; }
.credit-ic .ic { width: 20px; height: 20px; }
.credit-label { font-weight: 700; font-size: 15.5px; flex: 1; }
.credit-pct { color: var(--grey); font-size: 14px; font-weight: 600; }
.credit-track { height: 8px; border-radius: 99px; background: var(--line); margin: 12px 0 9px; overflow: hidden; }
.credit-fill { height: 100%; width: 0%; border-radius: 99px; background: var(--sky); transition: width .5s ease; }
.credit-sub { color: var(--grey); font-size: 13px; display: flex; gap: 6px; }
.settings-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 16px; overflow: hidden; }
.setting-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.s-ic { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: var(--grey); flex: none; }
.s-ic .ic { width: 21px; height: 21px; }
.setting-row.danger .s-ic { color: var(--danger); }
.s-label { flex: 1; font-weight: 600; }
.s-value { color: var(--grey); font-size: 14px; max-width: 45%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-chev { color: var(--grey); font-size: 19px; }
.setting-row.danger .s-label { color: var(--danger); }

/* ---------- sheet / toast ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 70; display: flex; align-items: flex-end; }
.sheet {
  background: var(--surface); width: 100%; max-width: 560px; margin: 0 auto; max-height: 88dvh; overflow-y: auto;
  border-radius: 26px 26px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  animation: sheetUp .32s cubic-bezier(.2, .8, .25, 1);
}
@keyframes sheetUp { from { transform: translateY(48px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-title { font-weight: 800; font-size: 18px; margin-bottom: 12px; line-height: 1.6; }
.sheet .field { margin-bottom: 12px; }
.fmt-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 12px; border: 1.5px solid var(--line); border-radius: 14px; margin-bottom: 9px; text-align: left; font-weight: 700; }
.fmt-row.selected { border-color: var(--sky-deep); background: color-mix(in srgb, var(--sky) 8%, var(--surface)); }
.fmt-row .fmt-ic { display: flex; color: var(--sky); }
.fmt-row .fmt-ic .ic { width: 21px; height: 21px; }
.fmt-row .fmt-radio { margin-left: auto; width: 21px; height: 21px; border-radius: 999px; border: 2px solid var(--line); flex: none; }
.fmt-row.selected .fmt-radio { border-color: var(--sky-deep); background: var(--sky-deep); box-shadow: inset 0 0 0 3px var(--surface); }
.apk-line { color: var(--grey); font-size: 13px; text-align: center; margin: 6px 0 12px; }
.progress-track { height: 9px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 14px 0 8px; }
.progress-fill { height: 100%; width: 0; background: var(--sky); transition: width .25s; }
.progress-pct { text-align: center; font-weight: 800; color: var(--sky-deep); }
.lang-row { width: 100%; display: flex; align-items: center; padding: 13px 6px; font-weight: 700; border-bottom: 1px solid var(--line); text-align: left; }
.lang-row:last-child { border-bottom: 0; }
.lang-row .tick { margin-left: auto; color: var(--sky-deep); }
.toast {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #0F172A; color: #fff; padding: 11px 20px; border-radius: 999px; z-index: 90;
  font-size: 14.5px; box-shadow: 0 10px 30px rgba(15, 23, 42, .3); max-width: 88vw; text-align: center;
}
html[data-theme='dark'] .toast { background: #E7EEF5; color: #0F172A; }
@media (prefers-reduced-motion: reduce) {
  .page, .sheet { animation: none; }
  .dots i { animation: none; opacity: .8; }
}

/* --- generated app (Easy App preview + fullscreen + takeover) --- */
.gapp{--gt:#0EA5E9;display:flex;flex-direction:column;background:#F4F7FA;color:#0F172A;height:100%}
.gapp *{box-sizing:border-box}
.gapp-head{display:flex;align-items:center;gap:10px;padding:16px;background:var(--gt);color:#fff;box-shadow:0 6px 18px -8px color-mix(in srgb,var(--gt) 65%,transparent);position:relative;z-index:2}
.gapp-avatar{width:42px;height:42px;border-radius:13px;background:rgba(255,255,255,.22);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:19px;flex:none}
.gapp-name{font-weight:800;font-size:17px;line-height:1.45}
.gapp-sub{font-size:12px;opacity:.85;line-height:1.45}
.gapp-head-texts{flex:1;min-width:0}
.gapp-cart{position:relative;background:rgba(255,255,255,.22);border:0;border-radius:999px;width:42px;height:42px;font-size:19px;cursor:pointer;color:#fff}
.gapp-badge{position:absolute;top:-4px;right:-4px;background:#EF4444;color:#fff;font-size:11px;min-width:19px;height:19px;border-radius:999px;display:flex;align-items:center;justify-content:center;padding:0 4px}
.gapp .hidden{display:none!important}
.gapp-body{flex:1;overflow-y:auto;padding:16px 16px 22px;display:flex;flex-direction:column;gap:20px}
.gsec-title{font-weight:800;font-size:16px;margin-bottom:10px;line-height:1.55;display:flex;align-items:center;gap:8px;color:#0F172A}
.gsec-title::before{content:'';width:4px;height:18px;border-radius:2px;background:var(--gt);flex:none}
.gsec-hero{background:var(--gt);border-radius:22px;padding:20px;color:#fff;position:relative;overflow:hidden;box-shadow:0 14px 28px -14px color-mix(in srgb,var(--gt) 70%,transparent)}
.gsec-hero::after{content:'';position:absolute;width:190px;height:190px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.28),rgba(255,255,255,0) 70%);top:-80px;right:-60px;pointer-events:none}
.ghero-title{font-size:21px;font-weight:800;line-height:1.5;position:relative;z-index:1}
.ghero-text{color:rgba(255,255,255,.88);font-size:14px;line-height:1.75;margin-top:5px;position:relative;z-index:1}
.glist{display:flex;flex-direction:column;gap:10px}
.ggrid{display:grid;grid-template-columns:1fr 1fr;gap:11px}
.gitem{display:flex;align-items:center;gap:11px;background:#fff;border:1px solid rgba(226,232,240,.75);border-radius:16px;padding:12px;box-shadow:0 1px 3px rgba(15,23,42,.05),0 10px 22px -14px rgba(15,23,42,.18)}
.ggrid .gitem{flex-direction:column;align-items:flex-start;padding:14px;gap:9px}
.gitem-emoji{width:44px;height:44px;border-radius:13px;background:color-mix(in srgb,var(--gt) 13%,#fff);display:flex;align-items:center;justify-content:center;font-size:20px;flex:none}
.ggrid .gitem-emoji{width:48px;height:48px;font-size:23px;border-radius:14px}
.gitem-texts{flex:1;min-width:0}
.gitem-title{font-weight:700;font-size:14px;line-height:1.55}
.gitem-sub{font-size:12px;color:#64748B;line-height:1.55}
.gitem-right{text-align:right}
.ggrid .gitem-right{text-align:left}
.gitem-price{font-weight:800;color:color-mix(in srgb,var(--gt) 78%,#000);font-size:13px}
.gadd{margin-top:5px;width:30px;height:30px;border-radius:999px;border:0;background:var(--gt);color:#fff;font-size:17px;cursor:pointer;box-shadow:0 6px 14px -8px rgba(15,35,55,.35)}
.gstats{display:flex;gap:10px}
.gstat{flex:1;background:#fff;border:1px solid rgba(226,232,240,.75);border-radius:16px;padding:14px 8px;text-align:center;box-shadow:0 1px 3px rgba(15,23,42,.05),0 10px 22px -14px rgba(15,23,42,.16)}
.gstat b{display:block;font-size:17px;overflow-wrap:anywhere;font-weight:800;color:color-mix(in srgb,var(--gt) 75%,#000);line-height:1.4}
.gstat span{font-size:12px;color:#64748B;line-height:1.5}
.gform{display:flex;flex-direction:column;gap:11px}
.gfield{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:700;color:#334155}
.gfield input,.gfield select,.gfield textarea{padding:12px;border:1px solid #E2E8F0;border-radius:12px;font:inherit;font-weight:400;min-height:46px;background:#fff;color:#0F172A}
.gfield input:focus,.gfield select:focus,.gfield textarea:focus{outline:none;border-color:var(--gt);box-shadow:0 0 0 3px color-mix(in srgb,var(--gt) 22%,transparent)}
.gbtn{background:var(--gt);color:#fff;border:0;border-radius:14px;padding:14px;font:inherit;font-weight:800;cursor:pointer;min-height:50px;box-shadow:0 10px 20px -12px rgba(15,35,55,.4)}
.gbtn:active{transform:scale(.985)}
.gcta{margin-top:2px}
.gtext{line-height:1.85;color:#334155;background:#fff;border:1px solid rgba(226,232,240,.75);border-radius:16px;padding:14px 16px;box-shadow:0 1px 3px rgba(15,23,42,.05)}
.gapp-tabs{display:flex;background:rgba(255,255,255,.94);backdrop-filter:blur(10px);border-top:1px solid #E8EDF2;padding:6px 6px calc(6px + env(safe-area-inset-bottom));position:relative;z-index:2}
.gnav-btn{flex:1;background:none;border:0;display:flex;flex-direction:column;align-items:center;gap:2px;padding:5px 2px;font:inherit;font-size:11px;color:#64748B;border-radius:12px;cursor:pointer;min-height:50px}
.gnav-btn .gnav-emoji{font-size:18px;padding:2px 13px;border-radius:999px;line-height:1.35}
.gnav-btn.active{color:color-mix(in srgb,var(--gt) 80%,#000);font-weight:800}
.gnav-btn.active .gnav-emoji{background:color-mix(in srgb,var(--gt) 14%,#fff)}
.gdesktop{flex-direction:row}
.gdesk-side{width:252px;flex:none;background:#fff;border-right:1px solid #E8EDF2;padding:18px 12px;display:flex;flex-direction:column;gap:16px}
.gdesk-brand{display:flex;gap:10px;align-items:center;padding:0 6px}
.gdesk-brand .gapp-avatar{background:var(--gt);color:#fff}
.gapp-side{display:flex;flex-direction:column;gap:4px}
.gapp-side .gnav-btn{flex-direction:row;justify-content:flex-start;gap:10px;padding:11px 12px;font-size:14px;min-height:48px}
.gapp-side .gnav-btn .gnav-emoji{padding:2px 6px}
.gapp-side .gnav-btn.active{background:color-mix(in srgb,var(--gt) 10%,#fff)}
.gdesk-main{flex:1;display:flex;flex-direction:column;min-width:0}
.gdesktop .gapp-body{display:grid;grid-template-columns:1fr 1fr;align-content:start}
.gdesktop .gsec-hero,.gdesktop .gcta{grid-column:1/-1}

.gapp{position:relative}
.gsecwrap{display:flex;flex-direction:column;gap:20px}
.gsearch input{width:100%;padding:12px 14px;border:1px solid #E2E8F0;border-radius:999px;font:inherit;font-size:14px;background:#fff;color:#0F172A;min-height:46px}
.gsearch input:focus{outline:none;border-color:var(--gt);box-shadow:0 0 0 3px color-mix(in srgb,var(--gt) 22%,transparent)}
.gitem{cursor:pointer}
.gitem:active{transform:scale(.99)}
.gitem-titlerow{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.gchip{background:#EF4444;color:#fff;font-size:10px;font-weight:800;padding:2px 7px;border-radius:999px;line-height:1.5}
.grating{color:#D97706;font-size:12px;font-weight:800;margin-top:1px}
.gsheet-wrap{position:absolute;inset:0;z-index:30;display:flex;align-items:flex-end;justify-content:center}
.gsheet-wrap.hidden{display:none!important}
.gsheet-back{position:absolute;inset:0;background:rgba(15,23,42,.48)}
.gsheet{position:relative;background:#fff;width:100%;max-height:88%;overflow-y:auto;border-radius:22px 22px 0 0;padding:22px 18px calc(18px + env(safe-area-inset-bottom));animation:gup .28s cubic-bezier(.2,.9,.25,1);box-shadow:0 -12px 34px rgba(15,23,42,.22)}
@keyframes gup{from{transform:translateY(28px);opacity:.35}}
.gdesktop .gsheet-wrap{align-items:center;padding:18px}
.gdesktop .gsheet{max-width:440px;border-radius:22px}
.gsheet-x{position:absolute;top:12px;right:12px;width:34px;height:34px;border-radius:999px;border:0;background:#F1F5F9;color:#475569;font-size:14px;cursor:pointer;z-index:2}
.gsheet-title{font-size:17px;font-weight:800;margin-bottom:12px;line-height:1.5}
.gdetail-emoji{width:78px;height:78px;font-size:39px;border-radius:21px;background:color-mix(in srgb,var(--gt) 13%,#fff);display:flex;align-items:center;justify-content:center;margin:4px auto 10px}
.gdetail-badge{display:block;width:fit-content;margin:0 auto 6px;background:#EF4444;color:#fff;font-size:11px;font-weight:800;padding:3px 10px;border-radius:999px}
.gdetail-title{font-size:19px;font-weight:800;text-align:center;line-height:1.55}
.gdetail-sub{font-size:13px;color:#64748B;text-align:center;line-height:1.6;margin-top:2px}
.gdetail-rate{text-align:center;color:#D97706;font-weight:800;font-size:14px;margin-top:3px}
.gdetail-desc{line-height:1.85;color:#334155;background:#F8FAFC;border-radius:14px;padding:13px 15px;margin-top:13px;font-size:14px}
.gprice-row{display:flex;align-items:center;justify-content:space-between;margin-top:16px;gap:10px}
.gprice-big{font-size:19px;font-weight:800;color:color-mix(in srgb,var(--gt) 78%,#000)}
.gqty{display:flex;align-items:center;gap:11px}
.gqty button{width:36px;height:36px;border-radius:999px;border:1px solid #E2E8F0;background:#fff;font-size:18px;cursor:pointer;color:#0F172A;line-height:1}
.gqty b{min-width:20px;text-align:center;font-size:15px}
.gsheet .gbtn{width:100%;margin-top:14px}
.gcart-line{display:flex;gap:10px;align-items:center;padding:11px 0;border-bottom:1px solid #F1F5F9}
.gcart-line .gitem-emoji{width:40px;height:40px;font-size:18px;border-radius:11px}
.gcart-amt{font-weight:800;font-size:13px;color:color-mix(in srgb,var(--gt) 78%,#000);white-space:nowrap}
.gcheck{width:64px;height:64px;border-radius:50%;background:#22C55E;color:#fff;font-size:31px;display:flex;align-items:center;justify-content:center;margin:10px auto 12px}
.gfield input.gerr,.gfield textarea.gerr{border-color:#EF4444;box-shadow:0 0 0 3px rgba(239,68,68,.14)}
.gentries{margin-top:14px;display:flex;flex-direction:column;gap:8px}
.gentries .gsec-title{margin-bottom:2px}
.gentry{background:#F8FAFC;border:1px solid #EEF2F6;border-radius:12px;padding:9px 12px;font-size:13px;display:flex;justify-content:space-between;align-items:center;gap:8px;line-height:1.6}
.gentry-x{border:0;background:none;color:#94A3B8;font-size:12px;cursor:pointer;padding:4px}
.gempty{color:#94A3B8;font-size:13px;text-align:center;padding:16px}

/* publish sheet */
.pub-link{width:100%;padding:12px;border:1px solid #E2E8F0;border-radius:12px;font:inherit;font-size:13px;background:#F8FAFC;color:#0369A1;margin-bottom:10px}
.btn-ghost{background:none;border:1px solid #E2E8F0;color:#64748B;border-radius:12px;padding:13px;font:inherit;font-weight:700;cursor:pointer;min-height:48px;width:100%;margin-top:8px}
.pub-body{display:flex;flex-direction:column}

/* code mode */
.mode-toggle{display:flex;gap:4px;background:#E2E8F0;border-radius:999px;padding:3px;margin:0 auto 8px;width:fit-content}
.mode-toggle button{border:0;background:none;padding:6px 14px;border-radius:999px;font:inherit;font-size:13px;font-weight:700;color:#64748B;cursor:pointer}
.mode-toggle button.active{background:#0EA5E9;color:#fff;box-shadow:0 2px 8px rgba(14,165,233,.35)}
.code-frame{width:100%;height:100%;border:0;display:block;background:#fff}
.code-frame-fs{position:absolute;inset:0}
.code-actions{display:flex;gap:8px;margin-bottom:6px}
.code-actions .btn-primary,.code-actions .btn-outline{flex:1}
.code-pre{max-height:300px;overflow:auto;background:#0F172A;color:#A5F3FC;font-size:10.5px;line-height:1.55;padding:12px;border-radius:12px;white-space:pre-wrap;word-break:break-all;margin-top:10px;text-align:left}
.ver-row{display:flex;align-items:center;gap:8px;padding:9px 2px;border-bottom:1px solid #EEF2F5;font-size:13px}
.ver-note{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ver-date{color:#94A3B8;font-size:12px}
.ver-cur{color:#0EA5E9;font-weight:700;font-size:12px}

/* preview: scaled code app + tidy page bar */
.code-scale{position:absolute;inset:0;overflow:hidden;background:#fff}
.code-frame-scaled{position:absolute;top:0;left:0;transform-origin:top left}
.page-bar .page-title{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.page-bar .export-pill{flex:none}
.page-bar .icon-btn{flex:none}
.attach-plus{font-size:26px;font-weight:300;line-height:1;color:#0EA5E9}

/* vector icon sizing in chrome spots */
.chat-bar-icon .ic { width: 21px; height: 21px; }
.builder-av .ic { width: 18px; height: 18px; }
.msg.narration .ic { width: 14px; height: 14px; vertical-align: -2px; }
.fs-btn .ic { width: 18px; height: 18px; }
.proj-del .ic { width: 19px; height: 19px; }
.icon-btn .ic { width: 20px; height: 20px; }
.mode-toggle .ic, .dev-toggle .ic { width: 15px; height: 15px; vertical-align: -3px; }
.rotate-hint .ic { width: 17px; height: 17px; vertical-align: -3px; }
#tk-fit .ic { width: 15px; height: 15px; vertical-align: -3px; }

/* project "..." menu */
.proj-menu { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--grey); border-radius: 999px; }
.proj-menu .ic { width: 20px; height: 20px; }
.proj-menu:active { background: var(--line); }
.fmt-row.danger .fmt-ic, .fmt-row.danger span { color: var(--danger); }
.btn-danger { background: var(--danger); color: #fff; border-radius: 999px; padding: 12px 22px; font-weight: 700; flex: 1; }
.btn-danger:disabled { opacity: .55; }
.confirm-q { font-size: 15.5px; font-weight: 600; line-height: 1.6; padding: 2px 2px 16px; }
.confirm-btns { display: flex; gap: 10px; }
.confirm-btns .btn-outline { flex: 1; }
.danger-text { color: var(--danger); }
#sheet .btn-primary.big, #sheet .btn-outline.big { width: 100%; margin-top: 10px; }
#sheet .pub-link { width: 100%; }

/* template variants gallery */
.variants-hint { color: var(--grey); font-size: 13.5px; font-weight: 600; margin: 2px 2px 12px; }
.variants-list { display: flex; flex-direction: column; gap: 14px; }
.variant-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; box-shadow: 0 2px 10px rgba(15, 23, 42, .05); }
.variant-stage { background: var(--bg); border-radius: 14px; padding: 16px 0 12px; display: flex; justify-content: center; }
.variant-name { font-weight: 800; font-size: 16px; margin: 12px 2px 10px; line-height: 1.55; }
.variant-card .btn-primary.big { width: 100%; }
.shot-legacy { box-sizing: border-box; width: 172px; background: #fff; border: 1.5px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 8px 22px rgba(15, 23, 42, .12); color: #0F172A; }
.mock-head { display: flex; align-items: center; gap: 6px; padding: 7px 9px; color: #fff; }
.mock-ava { width: 17px; height: 17px; border-radius: 999px; background: rgba(255,255,255,.28); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; flex: none; }
.mock-appname { font-size: 10.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-hero { display: flex; align-items: center; gap: 7px; margin: 8px; padding: 8px; border-radius: 10px; }
.mock-hero-em { font-size: 19px; }
.mock-hero-tx { font-size: 10.5px; font-weight: 700; line-height: 1.4; min-width: 0; }
.mock-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; padding: 0 8px 8px; }
.mock-item { background: #F8FAFC; border-radius: 9px; padding: 6px 6px; display: flex; flex-direction: column; gap: 1px; min-width: 0; box-sizing: border-box; }
.mock-em { font-size: 14px; }
.mock-item b { font-size: 9.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-item i { font-style: normal; font-size: 8.5px; letter-spacing: -.01em; color: #0284C7; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-tabs { display: flex; justify-content: space-around; padding: 6px 14px 8px; border-top: 1px solid #EEF2F5; }
.mock-tabs i { width: 15px; height: 4px; border-radius: 99px; background: #E2E8F0; }
.mock-tabs i.on { background: #0EA5E9; }

/* daily credit footer + plans */
.credit-foot { display: flex; align-items: center; margin-top: 10px; }
.credit-bal { color: var(--sky-deep); font-weight: 800; font-size: 13.5px; flex: 1; }
.upgrade-link { color: var(--sky-deep); font-weight: 800; font-size: 14.5px; padding: 4px 2px; }
.plans-list { display: flex; flex-direction: column; gap: 12px; }
.plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.plan-card.current { border-color: var(--sky); }
.plan-top { display: flex; align-items: center; }
.plan-tag { background: var(--sky); color: #fff; font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.plan-name { font-weight: 800; font-size: 15px; flex: 1; }
.plan-never { color: var(--grey); font-size: 12px; font-weight: 600; }
.plan-big { font-size: 21px; font-weight: 800; margin-top: 8px; }
.plan-sub { color: var(--grey); font-size: 13.5px; margin-top: 2px; }
.plan-card .btn-primary.big { width: 100%; margin-top: 12px; }

/* admin panel */
.admin-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.admin-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px; display: flex; flex-direction: column; }
.admin-stat b { font-size: 21px; }
.admin-stat span { color: var(--grey); font-size: 12.5px; font-weight: 600; }
.admin-users { display: flex; flex-direction: column; gap: 10px; }
.admin-user { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.admin-user-head { width: 100%; display: flex; gap: 11px; align-items: flex-start; padding: 13px 14px; text-align: left; }
.admin-ava { width: 38px; height: 38px; border-radius: 999px; background: var(--sky); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.admin-user-tx { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.admin-user-tx b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-user-sub { color: var(--grey); font-size: 12.5px; line-height: 1.5; }
.admin-user-body { border-top: 1px solid var(--line); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.admin-proj { display: flex; flex-direction: column; }
.admin-proj-name { font-weight: 700; font-size: 13.5px; }

/* variant mock layouts (grid/list/hero/menu/cards) + dark theme */
.mock-rows { display: flex; flex-direction: column; gap: 6px; }
.mock-row { display: flex; align-items: center; gap: 7px; background: var(--soft, #F4F7FA); border-radius: 9px; padding: 5px 7px; min-width: 0; }
.mock-thumb { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex: none; }
.mock-thumb.lg { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; }
.mock-rowtx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mock-rowtx b { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-rowtx i { font-style: normal; font-size: 8.5px; color: #0EA5E9; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-chev { color: var(--muted); font-size: 12px; flex: none; }
.mock-search { background: var(--soft, #F4F7FA); border-radius: 999px; color: var(--muted); font-size: 9px; letter-spacing: 2px; padding: 4px 10px; margin-bottom: 7px; }
.mock-big { border-radius: 12px; padding: 12px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 8px; }
.mock-big-emoji { font-size: 34px; line-height: 1.1; }
.mock-big b { font-size: 11.5px; }
.mock-big-chip { color: #fff; font-size: 8.5px; font-weight: 800; border-radius: 999px; padding: 2px 9px; max-width: 92%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-minirow { display: flex; gap: 6px; }
.mock-mini { flex: 1; min-width: 0; overflow: hidden; background: var(--soft, #F4F7FA); border-radius: 9px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mock-mini span { font-size: 15px; }
.mock-mini i { font-style: normal; font-size: 7.5px; color: #0EA5E9; font-weight: 700; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mock-menu-title { text-align: center; font-size: 11px; letter-spacing: 3px; margin: 2px 0 8px; }
.mock-menu { display: flex; flex-direction: column; gap: 9px; padding: 0 2px; }
.mock-leader { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.mock-leader-emoji { font-size: 12px; }
.mock-leader b { font-size: 10px; white-space: nowrap; }
.mock-dots { flex: 1; border-bottom: 2px dotted #C9D4DE; transform: translateY(-2px); min-width: 8px; }
.mock-leader i { font-style: normal; font-size: 9px; color: #0EA5E9; font-weight: 800; white-space: nowrap; }
.mock-cards { display: flex; flex-direction: column; gap: 7px; }
.mock-card-lg { display: flex; align-items: center; gap: 8px; background: var(--soft, #F4F7FA); border-radius: 12px; padding: 7px; min-width: 0; }
.shot.mock-dark { background: #0B1220; }
.shot.mock-dark .mock-item, .shot.mock-dark .mock-row, .shot.mock-dark .mock-mini, .shot.mock-dark .mock-card-lg { background: rgba(255,255,255,.06); }
.shot.mock-dark .mock-item b, .shot.mock-dark .mock-rowtx b { color: #E2E8F0; }
.shot.mock-dark .mock-big b, .shot.mock-dark .mock-leader b { color: #E2E8F0; }
.shot.mock-dark .mock-search { background: rgba(255,255,255,.08); }
.shot.mock-dark .mock-dots { border-color: rgba(255,255,255,.25); }
.shot.mock-dark .mock-tabs { border-color: rgba(255,255,255,.12); }
.shot.mock-dark .mock-hero b { color: #E2E8F0; }
.shot.mock-dark .mock-menu-title { filter: brightness(1.6); }

/* template screenshot gallery — Home / Detail / Profile at real-app size */
.variant-stage { display: block; padding: 14px 0 4px; }
.shot-strip { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 12px 8px; scrollbar-width: none; }
.shot-strip::-webkit-scrollbar { display: none; }
.shot-fig { margin: 0; flex: none; scroll-snap-align: center; }
.shot { width: 204px; height: 404px; border-radius: 24px; border: 1px solid rgba(15,35,55,.14); box-shadow: 0 10px 24px rgba(15,35,55,.13); background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.shot.mock-dark { background: #0B1220; color: #E2E8F0; border-color: rgba(255,255,255,.16); }
.shot-cap { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 7px; }
.shot-status { display: flex; justify-content: space-between; align-items: center; padding: 7px 14px 3px; font-size: 10.5px; font-weight: 700; }
.shot-sig { display: flex; gap: 2px; align-items: flex-end; }
.shot-sig i { width: 3px; background: currentColor; border-radius: 1px; display: block; }
.shot-sig i.dim { opacity: .35; }
.shot-sig .batt { width: 15px; height: 8px; border: 1.5px solid currentColor; border-radius: 2.5px; margin-left: 3px; display: block; }
.shot .mock-head { border-radius: 0; padding: 9px 12px; }
.shot-body { flex: 1; overflow: hidden; padding: 10px; }
.shot-tabs { display: flex; justify-content: space-around; padding: 8px 6px 10px; border-top: 1px solid rgba(15,35,55,.08); }
.shot-tab { color: #9FB2C3; display: flex; }
.shot-tab svg { width: 19px; height: 19px; }
.shot.mock-dark .shot-tabs { border-color: rgba(255,255,255,.1); }
.shot .mock-item { padding: 7px; }
.shot .mock-item b { font-size: 11px; }
.shot .mock-item i { font-size: 10px; }
.shot .mock-tile { height: 38px; font-size: 19px; }
.shot .mock-hero { padding: 10px; }
.shot .mock-hero b { font-size: 12.5px; }
.shot .mock-hero-emoji { font-size: 22px; }
.shot .mock-rowtx b { font-size: 11.5px; }
.shot .mock-rowtx i { font-size: 10px; }
.shot .mock-thumb { width: 34px; height: 34px; font-size: 17px; }
.shot .mock-thumb.lg { width: 44px; height: 44px; font-size: 22px; }
.shot .mock-leader b { font-size: 11px; }
.shot .mock-leader i { font-size: 10.5px; }
.shot .mock-big-emoji { font-size: 38px; }
.shot .mock-big b { font-size: 13px; }
.shot .mock-search { font-size: 10px; }
.shot-topbar { display: flex; justify-content: space-between; align-items: center; padding: 4px 12px 6px; font-size: 12px; }
.shot-back { font-size: 19px; width: 18px; line-height: 1; }
.shot-hero { margin: 0 10px; border-radius: 16px; height: 148px; display: flex; align-items: center; justify-content: center; flex: none; }
.shot-hero-emoji { font-size: 64px; }
.shot-info { padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.shot-name { font-size: 15px; }
.shot-pricerow { display: flex; justify-content: space-between; align-items: center; }
.shot-price { color: #0EA5E9; font-weight: 800; font-size: 13px; }
.shot-stars { color: #F59E0B; font-size: 10.5px; }
.shot-lines { display: flex; flex-direction: column; gap: 6px; }
.shot-lines i { display: block; height: 7px; border-radius: 4px; background: rgba(120,140,160,.25); }
.shot-qty { display: flex; gap: 14px; align-items: center; }
.shot-qty span { width: 24px; height: 24px; border-radius: 50%; background: rgba(120,140,160,.18); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.shot-foot { padding: 10px 12px 14px; }
.shot-cta { width: 100%; border: 0; color: #fff; font-weight: 800; font-size: 13px; border-radius: 999px; padding: 11px 0; }
.shot-profhead { padding: 14px 14px 13px; color: #fff; display: flex; flex-direction: column; gap: 2px; flex: none; }
.shot-ava { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.shot-profhead b { font-size: 14.5px; }
.shot-profhead i { font-style: normal; font-size: 10.5px; opacity: .85; }
.shot-stats { display: flex; padding: 12px 6px 4px; flex: none; }
.shot-stat { flex: 1; text-align: center; display: flex; flex-direction: column; }
.shot-stat b { font-size: 14px; }
.shot-stat i { font-style: normal; font-size: 9.5px; color: var(--muted); }
.shot-rows { padding: 6px 12px; display: flex; flex-direction: column; flex: none; }
.shot-row { display: flex; align-items: center; gap: 10px; padding: 8.5px 2px; border-bottom: 1px solid rgba(15,35,55,.06); font-size: 12px; font-weight: 600; }
.shot-row:last-child { border: 0; }
.shot-row .mock-chev { margin-left: auto; }
.shot.mock-dark .shot-row { border-color: rgba(255,255,255,.07); }
.shot-dot { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none; }
.shot-dot i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.shot-flex { flex: 1; }

/* app icons + admin suggestion */
.proj-ic { overflow: hidden; }
.proj-ic-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.icon-big { width: 108px; height: 108px; border-radius: 26px; display: block; margin: 6px auto 10px; box-shadow: 0 10px 24px rgba(15,35,55,.18); }
.icon-note { text-align: center; color: var(--muted); font-size: 12.5px; margin-bottom: 12px; padding: 0 8px; }
.msg-actions { display: flex; gap: 8px; margin-top: 10px; }
.msg-actions .small { padding: 7px 14px; font-size: 13px; }

/* screenshot fit fixes (QA 2026-11-08): profile/detail content must fit 404px */
.shot-profhead { padding: 10px 14px 9px; }
.shot-ava { width: 36px; height: 36px; font-size: 16px; margin-bottom: 4px; }
.shot-profhead b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.shot-stats { padding: 7px 6px 2px; }
.shot-row { padding: 6.5px 2px; }
.shot-hero { height: 118px; }
.shot-info { gap: 7px; padding: 10px 14px; }
.shot-foot { padding: 8px 12px 10px; }
.shot-cta { padding: 9px 0; }
.shot.mock-dark .mock-item, .shot.mock-dark .mock-row, .shot.mock-dark .mock-mini, .shot.mock-dark .mock-card-lg { background: rgba(255,255,255,.07); }
.shot.mock-dark .mock-item b, .shot.mock-dark .mock-rowtx b, .shot.mock-dark .mock-big b, .shot.mock-dark .mock-leader b, .shot.mock-dark .mock-hero b { color: #E2E8F0; }
.shot.mock-dark .mock-search { background: rgba(255,255,255,.08); }
.shot.mock-dark .mock-dots { border-color: rgba(255,255,255,.25); }
/* profile shot: guarantee the tab bar fits (QA round 2) */
.shot-status { padding: 5px 14px 2px; }
.shot-profhead { padding: 8px 14px 7px; }
.shot-ava { width: 32px; height: 32px; font-size: 15px; }
.shot-profhead b { line-height: 1.25; }
.shot-profhead i { line-height: 1.25; }
.shot-row { padding: 5.5px 2px; }
.shot-dot { width: 24px; height: 24px; }

/* app-like: no tap zoom, no focus zoom on inputs */
html, body { touch-action: manipulation; }
input, textarea, select { font-size: 16px; }

/* ---- Preview page layout (owner, 2026-11-08): one neat action row on top,
   Mobile/Desktop toggle attached under the phone, page must not shift ---- */
#view-preview { overflow-x: hidden; }
.preview-actions { display: flex; gap: 8px; padding: 2px 16px 12px; }
.preview-actions .export-pill {
  flex: 1 1 0; min-width: 0; margin-left: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 8px 2px; min-height: 52px;
  font-size: 10.5px; font-weight: 700; border-radius: 14px; line-height: 1.15;
}
.preview-actions .export-pill span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-actions .export-pill .ic { width: 17px; height: 17px; }
#view-preview .preview-stage { touch-action: pan-y; width: 100%; box-sizing: border-box; }
#view-preview .seg-toggle { margin: 4px auto 20px; }

/* ---- Contact chat box + admin messages ---- */
.contact-thread { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; padding: 6px 2px 10px; }
.cbubble { max-width: 82%; padding: 9px 12px; border-radius: 16px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.cbubble.them { align-self: flex-start; background: var(--surface2, #EEF2F5); color: var(--ink); border-bottom-left-radius: 6px; }
.cbubble.me { align-self: flex-end; background: var(--sky-deep); color: #fff; border-bottom-right-radius: 6px; }
.contact-input-row { display: flex; gap: 8px; align-items: center; padding-top: 8px; }
.contact-input { flex: 1; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 11px 14px; font-size: 16px; color: var(--ink); }
.contact-send { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--sky-deep); color: #fff; display: flex; align-items: center; justify-content: center; }
.contact-send svg { width: 18px; height: 18px; }
.contact-send:disabled { opacity: .5; }
.admin-sec-title { font-weight: 800; font-size: 15px; margin: 14px 2px 8px; }
.admin-msg { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.admin-msg-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.admin-msg-body { margin-top: 4px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.admin-msg-reply { display: inline-block; margin-top: 6px; color: var(--sky-deep); font-weight: 700; font-size: 13px; text-decoration: none; }
.convo-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.convo-row .admin-user-tx { flex: 1; min-width: 0; }
.convo-row .admin-user-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.char-count { text-align: right; font-size: 10.5px; color: var(--grey); padding: 3px 22px 0; font-weight: 600; }
.char-count.warn { color: #D97706; }
.char-count.max { color: #DC2626; font-weight: 800; }
.gift-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 14px; }
.gift-row { display: flex; gap: 8px; }
.gift-input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 16px; background: var(--surface); color: var(--ink); }
.gift-amt { flex: 0 0 110px; }
.gift-chips { display: flex; gap: 6px; margin: 8px 0; }
.gift-chip { border: 1.5px solid var(--line); background: var(--surface); color: var(--accent); border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: 13px; }
.gift-mini { border: 1.5px solid var(--accent); color: var(--accent); background: none; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.act-chip { font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: 2px; }
.act-chip.web { background: #E0F2FE; color: #0369A1; }
.act-chip.apk { background: #FEF3C7; color: #92400E; }
.act-row { display: flex; align-items: baseline; gap: 8px; padding: 6px 2px; border-top: 1px solid var(--line); }
.act-ic { flex: 0 0 20px; text-align: center; }
.act-tx { flex: 1; min-width: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.act-time { flex: 0 0 auto; }
.chat-composer { margin-top: 4px; }
.attach-btn { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--accent); font-size: 22px; font-weight: 700; line-height: 1; }
.attach-menu { display: flex; gap: 8px; padding: 8px 0 2px; }
.attach-item { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 13.5px; color: var(--ink); }
.attach-preview { display: flex; align-items: center; gap: 10px; padding-top: 8px; }
.attach-thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.attach-file-name { font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.attach-x { border: none; background: #FEE2E2; color: #B91C1C; width: 26px; height: 26px; border-radius: 50%; font-weight: 800; }
.cbubble-img { display: block; max-width: 210px; width: 100%; border-radius: 10px; margin-bottom: 4px; }
.cbubble-file { display: inline-block; color: inherit; font-weight: 700; text-decoration: underline; margin-bottom: 2px; }

/* ---- EZ mascot ---- */
.builder-av.ez-av { background: linear-gradient(160deg, #1B2B45, #0B1526); border: 1px solid var(--line); overflow: hidden; }
.builder-av.ez-av svg { width: 100%; height: 100%; display: block; }
.ez-hero { display: flex; flex-direction: column; align-items: center; padding: 16px 0 2px; }
.ez-hero-svgwrap { width: 118px; height: 118px; }
.ez-hero-svg { width: 100%; height: 100%; display: block; animation: ezFloat 4.4s ease-in-out infinite; filter: drop-shadow(0 10px 16px rgba(27, 95, 196, .25)); }
.ez-hero-name { font-weight: 800; color: var(--accent); letter-spacing: 3px; font-size: 13px; margin-top: 2px; }
.ez-svg .ez-eye { transform-box: fill-box; transform-origin: center; animation: ezBlink 5.4s infinite; }
.ez-svg .ez-wing { transform-box: fill-box; transform-origin: 85% 90%; animation: ezWing 4.4s ease-in-out infinite; }
.ez-svg .ez-arm { transform-box: fill-box; transform-origin: 15% 10%; }
.ez-wave .ez-arm { animation: ezWaveA 1.7s ease-in-out 2; }
@keyframes ezFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes ezBlink { 0%, 93%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(.08); } }
@keyframes ezWing { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-4deg); } }
@keyframes ezWaveA { 0%, 100% { transform: rotate(0deg); } 30% { transform: rotate(-22deg); } 55% { transform: rotate(-6deg); } 78% { transform: rotate(-17deg); } }
.msg.ai { white-space: pre-line; }
.ez-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 2px 10px; }
.ez-chip { border: 1.5px solid var(--accent); color: var(--accent); background: var(--surface); padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 13.5px; cursor: pointer; animation: ezChipIn .4s cubic-bezier(.21,.61,.35,1) both; }
.ez-chip:active { transform: scale(.96); }
@keyframes ezChipIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
/* ---- export sheet: Select File Type expander ---- */
.fmt-toggle .fmt-chev { margin-left: auto; color: var(--accent); font-size: 15px; }
.fmt-more { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.fmt-more.hidden { display: none; }

/* ---- account page / settings (reference-style grouped cards) ---- */
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 999px; display: block; }
.profile-head { cursor: pointer; }
.settings-group-label { font-weight: 800; font-size: 15px; margin: 18px 4px 8px; }
.acc-head { display: flex; flex-direction: column; align-items: center; padding: 18px 0 8px; }
.acc-avatar-wrap { background: none; border: none; cursor: pointer; padding: 0; }
.acc-avatar { width: 96px; height: 96px; border-radius: 999px; background: linear-gradient(160deg, #1B2B45, #0B1526); color: #fff; font-size: 38px; font-weight: 800; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.acc-photo-hint { color: var(--grey); margin-top: 10px; font-size: 14px; }
.acc-delete-note { color: var(--grey); font-size: 13px; padding: 8px 6px 0; }
.btn-danger { background: var(--danger); color: #fff; border: none; border-radius: 999px; padding: 14px; font-weight: 800; font-size: 15px; width: 100%; cursor: pointer; }
.btn-danger:disabled { opacity: .55; }
/* ---- EZ Plan paywall ---- */
.plan-hero { display: flex; flex-direction: column; align-items: center; padding: 10px 0 4px; }
.plan-hero-ez { width: 84px; height: 84px; }
.plan-hero-svg { width: 100%; height: 100%; display: block; animation: ezFloat 4.4s ease-in-out infinite; }
.plan-hero-title { font-size: 26px; font-weight: 800; margin-top: 6px; }
.plan-hero-sub { color: var(--grey); margin-top: 2px; }
.plan-free-line { text-align: center; color: var(--grey); font-size: 13.5px; margin: 10px 0 14px; }
.plan-pick-row { display: flex; gap: 10px; }
.plan-pick { flex: 1; position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 16px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--ink); }
.plan-pick.selected { border-color: var(--sky); background: color-mix(in srgb, var(--sky) 7%, var(--surface)); }
.plan-pick-name { font-weight: 800; font-size: 15px; }
.plan-pick-price { font-weight: 800; font-size: 16.5px; margin-top: 6px; white-space: nowrap; }
.plan-pick-per { color: var(--grey); font-size: 12.5px; }
.plan-pop { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--sky); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.plan-feats { margin: 20px 2px 6px; display: flex; flex-direction: column; gap: 12px; }
.plan-feat { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.feat-tick { color: #22C55E; font-weight: 900; flex: none; }
.plan-cta { margin-top: 16px; }
/* ---- app icon picker ---- */
.appicon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 8px 2px 14px; }
.appicon-tile { position: relative; border: 2px solid var(--line); border-radius: 26px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.appicon-tile.selected { border-color: var(--sky); }
.appicon-face { width: 72%; height: 72%; display: block; }
.appicon-face svg { width: 100%; height: 100%; display: block; }
.appicon-check { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); background: var(--sky); color: #fff; width: 22px; height: 22px; border-radius: 999px; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.appicon-mini { width: 30px; height: 30px; display: inline-block; }
.appicon-mini svg { width: 100%; height: 100%; display: block; }

/* ---- chat header EZ: bigger, waiting pose / laptop while working ---- */
.chat-bar-icon::after { width: 58px; height: 58px; background: color-mix(in srgb, var(--sky) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sky) 20%, transparent); }
.chat-ez-face { position: relative; z-index: 1; width: 54px; height: 54px; display: block; }
.chat-ez-svg { width: 100%; height: 100%; display: block; animation: ezIdle 4.4s ease-in-out infinite; }
@keyframes ezIdle { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-2px) rotate(-1deg); } }
#chat-ez::before { content: ''; position: absolute; z-index: 3; right: calc(50% - 31px); bottom: 1px; width: 10px; height: 10px; border-radius: 99px; background: #22C55E; border: 2px solid var(--bg, #EEF2F5); animation: ezReady 2.8s ease-out infinite; }
@keyframes ezReady { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); } 70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
#chat-ez.working::before { background: var(--sky); animation: none; }
.ez-face-idle, .ez-face-work { position: absolute; inset: 0; display: block; transition: opacity .32s ease, transform .32s ease; }
.ez-face-idle { opacity: 1; }
.ez-face-work { opacity: 0; transform: scale(.94); pointer-events: none; }
.ez-face-work svg { width: 100%; height: 100%; display: block; }
#chat-ez.working .ez-face-idle { opacity: 0; transform: scale(.94); }
#chat-ez.working .ez-face-work { opacity: 1; transform: none; }
#chat-ez.working .chat-ez-svg { animation: none; }
#chat-ez.working .ez-face-work svg { animation: ezWorkBob 1.36s ease-in-out infinite; }
@keyframes ezWorkBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(.8px); } }
.ezw-arm-l { transform-box: fill-box; transform-origin: 15% 0%; }
.ezw-arm-r { transform-box: fill-box; transform-origin: 85% 0%; }
#chat-ez.working .ezw-arm-l { animation: ezTap .34s ease-in-out infinite alternate; }
#chat-ez.working .ezw-arm-r { animation: ezTapR .34s ease-in-out infinite alternate; }
@keyframes ezTap { from { transform: rotate(0deg); } to { transform: rotate(2.6deg); } }
@keyframes ezTapR { from { transform: rotate(0deg); } to { transform: rotate(-2.6deg); } }
.ezw-paw-l, .ezw-paw-r { transform-box: fill-box; transform-origin: center; }
#chat-ez.working .ezw-paw-l { animation: ezPaw .34s ease-in-out infinite alternate; }
#chat-ez.working .ezw-paw-r { animation: ezPaw .34s ease-in-out infinite alternate-reverse; }
@keyframes ezPaw { from { transform: translateY(0); } to { transform: translateY(1.7px); } }
.ez-hero { animation: ezHeroIn .5s cubic-bezier(.21,.61,.35,1) both; }
@keyframes ezHeroIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .chat-ez-svg, .ez-hero-svg, .plan-hero-svg, .ez-svg .ez-eye, .ez-svg .ez-wing, .ez-wave .ez-arm, .msg-row, .ez-chip, #chat-ez::before, #chat-ez.working .ez-face-work svg, #chat-ez.working .ezw-arm-l, #chat-ez.working .ezw-arm-r, #chat-ez.working .ezw-paw-l, #chat-ez.working .ezw-paw-r { animation: none !important; }
}

/* fresh chat: the top-bar EZ waves hello (the big in-chat hero is gone) */
#chat-ez.greet-wave .ez-arm { animation: ezWaveA 1.7s ease-in-out 2; }

/* ---- floating mini bar (scroll-up reveal on long pages) ---- */
.float-bar {
  position: fixed; z-index: 45; top: calc(8px + env(safe-area-inset-top)); left: 50%;
  transform: translate(-50%, -90px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 9px; max-width: calc(100vw - 32px);
  padding: 6px 16px 6px 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line); box-shadow: 0 10px 26px rgba(15, 40, 80, .18);
  transition: transform .3s cubic-bezier(.21,.61,.35,1), opacity .25s ease;
}
.float-bar.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.float-back { width: 36px; height: 36px; flex: none; border: none; border-radius: 999px; background: var(--sky); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.float-back .ic { width: 19px; height: 19px; }
.float-back:active { transform: scale(.93); }
.float-title { font-weight: 800; font-size: 14.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* profile avatars showing EZ (the chosen app icon) instead of a letter */
.has-ez { background: color-mix(in srgb, var(--sky) 12%, #FFFFFF) !important; display: flex !important; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--sky) 25%, transparent); overflow: hidden; }
.avatar-ez { width: 82%; height: 82%; display: block; }
.avatar-ez svg { width: 100%; height: 100%; display: block; }

/* ---- home header v3: profile alone on top, texts below ---- */
.home-toprow { display: flex; justify-content: flex-end; padding-top: 10px; }
.greet-line { margin-top: 12px; }

/* ---- first-run welcome sheet ---- */
.welcome-wrap { text-align: center; padding: 6px 2px 2px; }
.welcome-ez { width: 92px; height: 92px; margin: 2px auto 4px; }
.welcome-ez svg { width: 100%; height: 100%; }
.welcome-title { font-size: 19px; font-weight: 800; color: var(--ink); }
.welcome-sub { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.welcome-guides { text-align: left; margin: 14px 2px; display: flex; flex-direction: column; gap: 8px; }
.welcome-guide { display: flex; gap: 8px; font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.welcome-dot { color: var(--sky); font-weight: 900; }
.welcome-wrap .field { text-align: left; margin-top: 4px; }
.welcome-save { width: 100%; margin-top: 12px; }
.welcome-skip { width: 100%; margin-top: 8px; padding: 11px; border: none; background: none; color: var(--muted); font-weight: 700; font-size: 14px; cursor: pointer; }

/* ---- App Data (owner's cloud viewer) ---- */
.adata-entry { width: 100%; text-align: left; font: inherit; cursor: pointer; margin-top: 14px; }
.adata-name { font-size: 17px; font-weight: 800; margin: 4px 0 2px; }
.adata-empty { margin-top: 14px; padding: 16px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.adata-users { display: flex; flex-direction: column; gap: 8px; }
.adata-user { display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.adata-uavatar { width: 38px; height: 38px; flex: none; border-radius: 999px; background: var(--sky); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.adata-uname { font-weight: 700; font-size: 14px; }
.adata-umeta { font-size: 12px; color: var(--muted); }
.adata-items { display: flex; flex-direction: column; gap: 8px; }
.adata-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.adata-ihead { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.adata-iowner { font-weight: 700; font-size: 13px; }
.adata-idate { font-size: 11.5px; color: var(--muted); }
.adata-del { margin-left: auto; border: none; background: none; color: var(--danger); font-weight: 700; font-size: 12.5px; cursor: pointer; padding: 4px 6px; }
.adata-kv { display: flex; gap: 8px; font-size: 13px; line-height: 1.55; }
.adata-k { color: var(--muted); font-weight: 700; flex: none; }
.adata-v { color: var(--ink); word-break: break-word; }

/* ---- model tier picker (chat) ---- */
.tier-bar { display: flex; align-items: center; gap: 9px; padding: 7px 4px 1px; }
.tier-pill { border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 800; font-size: 12.5px; letter-spacing: .02em; padding: 6px 12px; border-radius: 999px; cursor: pointer; flex: none; }
.tier-pill:active { transform: scale(.95); }
.tier-hint { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tier-row { text-align: left; }
.tier-main { display: flex; flex-direction: column; gap: 1px; }
.tier-name { font-weight: 800; font-size: 14.5px; }
.tier-desc { font-size: 12px; color: var(--muted); font-weight: 600; }
.tier-check { margin-left: auto; color: var(--sky); font-weight: 900; font-size: 16px; }

/* credit card: exact reset time + bonus credit bar */
.credit-foot { justify-content: flex-end; }
.credit-bonus { margin-top: 13px; }
.credit-bonus-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.credit-bonus-val { color: var(--ink); font-weight: 800; font-size: 13.5px; }
.credit-track.bonus { height: 6px; margin-top: 6px; }
.bonus-fill { background: #F59E0B; }

/* ---- EZ-generated logos (App Icon sheet) ---- */
.ez-logo-row { border: 1.5px solid color-mix(in srgb, var(--sky) 45%, transparent); background: color-mix(in srgb, var(--sky) 7%, var(--surface)); }
.ez-logo-box { margin: 2px 0 4px; }
.ez-logo-status { font-size: 13px; color: var(--muted); text-align: center; padding: 10px 4px 2px; line-height: 1.6; }
.ez-logo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.ez-logo-opt { border: 2px solid var(--line); border-radius: 20px; padding: 0; overflow: hidden; background: var(--surface); cursor: pointer; }
.ez-logo-opt img { width: 100%; aspect-ratio: 1; display: block; object-fit: cover; }
.ez-logo-opt:active { transform: scale(.95); border-color: var(--sky); }
.ez-logo-again { width: 100%; margin-top: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--sky-deep); font-weight: 800; font-size: 13.5px; cursor: pointer; }

/* ---- App Icon sheet: sections, style row, upload + ---- */
.icon-sec-label { font-size: 12.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 18px 2px 8px; }
.icon-style-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.icon-style-opt { border: 2px solid var(--line); border-radius: 18px; padding: 0; overflow: hidden; background: var(--surface); cursor: pointer; }
.icon-style-opt img { width: 100%; aspect-ratio: 1; display: block; }
.icon-style-opt:active { transform: scale(.95); border-color: var(--sky); }
.icon-plus { width: 100%; margin-top: 18px; padding: 15px; border: 1.5px dashed color-mix(in srgb, var(--sky) 45%, var(--line)); border-radius: 16px; background: none; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; color: var(--sky-deep); }
.icon-plus-sign { font-size: 26px; font-weight: 300; line-height: 1; }
.icon-plus-label { font-weight: 800; font-size: 14.5px; }
.icon-src-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.icon-src-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 700; font-size: 14px; cursor: pointer; color: var(--ink); }

.pub-qr{display:block;width:180px;height:180px;margin:14px auto 10px;border-radius:14px;background:#fff;padding:6px}
.pub-qr-dl{text-decoration:none;text-align:center}
.msg-retry{display:block;margin-top:8px}

.acc-created{padding:7px 16px 2px;font-size:12px;color:#8A97A8;letter-spacing:.02em}
.working-step{margin-top:5px;font-size:12.5px;line-height:1.5;color:#8A97A8;min-height:19px}

.proj-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 2.5px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; width: fit-content; }
.proj-badge.working { background: rgba(14, 165, 233, .14); color: #0284C7; }
.proj-badge.replying { background: rgba(124, 58, 237, .12); color: #7C3AED; }
.proj-badge-dot { width: 6px; height: 6px; border-radius: 99px; background: currentColor; animation: ezReady 1.6s ease-out infinite; }
.building-ic .avatar-ez { width: 88%; height: 88%; }

.photo-preview { flex-wrap: wrap; }
.photo-thumbs { display: flex; gap: 8px; overflow-x: auto; flex: 1; min-width: 0; padding: 2px; align-items: center; }
.photo-thumb { position: relative; flex: none; }
.photo-thumb img { width: 54px; height: 54px; object-fit: cover; border-radius: 12px; display: block; }
.photo-thumb-x { position: absolute; top: -6px; right: -6px; width: 19px; height: 19px; border-radius: 99px; background: #111827; color: #fff; font-size: 10px; line-height: 1; border: 2px solid var(--surface); cursor: pointer; }
.photo-add { flex: none; width: 54px; height: 54px; border-radius: 12px; border: 1.5px dashed var(--line); background: none; color: var(--grey); font-size: 22px; cursor: pointer; }
.photo-count { font-size: 12px; font-weight: 700; color: var(--grey); }
.msg-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 6px; }
.msg-photos .msg-photo { width: 100%; height: 76px; object-fit: cover; border-radius: 10px; margin: 0; }

.apikey-row { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.apikey-row:last-child { border-bottom: none; }
.apikey-head { display: flex; align-items: center; gap: 8px; }
.apikey-dot { width: 9px; height: 9px; border-radius: 99px; background: #B6C2CF; flex: none; }
.apikey-dot.ok { background: #22C55E; }
.apikey-dot.quota { background: #F59E0B; }
.apikey-name { font-weight: 800; font-size: 14px; }
.apikey-status { margin-left: auto; font-size: 11.5px; font-weight: 700; color: #8A97A8; }
.apikey-status.ok { color: #16A34A; }
.apikey-status.quota { color: #D97706; }
.apikey-stats { margin-top: 3px; font-size: 12.5px; color: #5B7186; font-variant-numeric: tabular-nums; }
.apikey-bar { margin-top: 7px; height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.apikey-fill { height: 100%; border-radius: 99px; background: #22C55E; }
.apikey-models { padding: 8px 14px 2px; font-size: 11.5px; color: #8A97A8; word-break: break-all; }
.about-foot { white-space: pre-line; }

.chat-bar-icon.tappable { cursor: pointer; flex-direction: column; gap: 0; }
.chat-model-label { font-size: 9.5px; font-weight: 800; letter-spacing: .5px; color: var(--sky-deep); margin-top: -3px; }
.tier-mark { width: 44px; height: 44px; flex: none; border-radius: 13px; display: flex; align-items: center; justify-content: center; margin-right: 10px; }
.tier-mark svg { width: 36px; height: 36px; }

.skel-row { height: 66px; border-radius: 16px; margin-bottom: 10px; background: linear-gradient(100deg, var(--line) 40%, var(--surface) 50%, var(--line) 60%); background-size: 200% 100%; animation: skelShimmer 1.15s linear infinite; }
@keyframes skelShimmer { from { background-position: 120% 0; } to { background-position: -80% 0; } }

/* premium mock pass (owner, 2026-11-08: templates must look as slick as
   modern award-winning app UIs - soft canvas, white floating cards,
   gradient heroes, floating pill tab bar) */
.shot { background: #EDF1F5; }
.shot .mock-head { border-radius: 0 0 20px 20px; box-shadow: 0 8px 18px rgba(15,35,55,.16); position: relative; z-index: 1; }
.shot .mock-item, .shot .mock-row, .shot .mock-card-lg, .shot .mock-mini { background: #FFFFFF; box-shadow: 0 5px 16px rgba(15,35,55,.08); border-radius: 14px; }
.shot .mock-search { background: #FFFFFF; box-shadow: 0 4px 12px rgba(15,35,55,.07); }
.shot .mock-tile { border-radius: 12px; }
.shot-tabs { margin: 0 10px 10px; border-top: none; border-radius: 999px; background: #FFFFFF; box-shadow: 0 12px 26px rgba(15,35,55,.20); padding: 6px 8px; align-items: center; }
.shot-tab { padding: 5px 10px; border-radius: 999px; }
.shot.mock-dark .shot-tabs { background: #182233; border: none; box-shadow: 0 12px 26px rgba(0,0,0,.5); }
.shot.mock-dark .mock-item, .shot.mock-dark .mock-row, .shot.mock-dark .mock-card-lg, .shot.mock-dark .mock-mini { box-shadow: 0 5px 16px rgba(0,0,0,.35); }
.shot .mock-hero.mock-grad, .shot .mock-big.mock-grad { color: #FFFFFF; box-shadow: 0 12px 24px rgba(15,35,55,.20); border-radius: 18px; }
.shot .mock-hero.mock-grad b, .shot .mock-big.mock-grad b { color: #FFFFFF; }
.shot .mock-big.mock-grad .mock-big-chip { background: rgba(255,255,255,.28) !important; }
.mock-herotx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mock-hero-chip { align-self: flex-start; background: rgba(255,255,255,.28); color: #fff; font-size: 8.5px; font-weight: 800; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.admin-view-btn { align-self: flex-start; margin-top: 5px; border: 1px solid var(--line); background: var(--card, #fff); color: var(--ink); border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }

/* ============================================================
   DARK THEME REDESIGN "Midnight Studio" (owner, 2026-11-08:
   the old dark mode looked like generic AI UI - flat blue-grey,
   one border on everything, no atmosphere). A designed dark:
   warm near-black canvas with a soft accent glow, layered glass
   surfaces, hairline light borders, gradient primary actions
   with a glow, and brighter display type.
   ============================================================ */
html[data-theme='dark'] {
  --bg: #08090C;
  --surface: #14161C;
  --ink: #F2F5F9;
  --grey: #9AA3B2;
  --line: #23262F;
  --sky: #38BDF8;
  --sky-deep: #0EA5E9;
}
html[data-theme='dark'] body {
  background:
    radial-gradient(120% 55% at 85% -5%, rgba(124, 58, 237, .20), transparent 60%),
    radial-gradient(130% 60% at 8% -10%, rgba(14, 165, 233, .24), transparent 62%),
    radial-gradient(90% 45% at 50% 48%, rgba(14, 165, 233, .055), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
html[data-theme='dark'] ::selection { background: rgba(56, 189, 248, .35); }
html[data-theme='dark'] ::-webkit-scrollbar { width: 5px; height: 5px; }
html[data-theme='dark'] ::-webkit-scrollbar-thumb { background: #262A33; border-radius: 99px; }

/* layered cards instead of flat bordered boxes */
html[data-theme='dark'] .proj-row,
html[data-theme='dark'] .recent-card,
html[data-theme='dark'] .tpl-card,
html[data-theme='dark'] .credit-card,
html[data-theme='dark'] .admin-card {
  background: linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.022));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 16px 38px rgba(0,0,0,.5);
}
html[data-theme='dark'] .proj-ic { box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 6px 16px rgba(0,0,0,.4); }

/* credit card gets a designed gradient edge */
html[data-theme='dark'] .credit-card {
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 2px 0 rgba(255,210,63,.55), inset 0 1px 0 rgba(255,255,255,.07), 0 16px 38px rgba(0,0,0,.5);
}

/* primary actions: flat solid, house style */
html[data-theme='dark'] .btn-primary {
  background: #38BDF8; color: #052A42;
  box-shadow: 0 10px 24px rgba(0,0,0,.45);
}
html[data-theme='dark'] .btn-outline { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); }

/* chat: glass composer, gradient user bubbles, elevated EZ bubbles */
html[data-theme='dark'] .msg.user {
  background: #0EA5E9;
  box-shadow: 0 10px 24px rgba(0,0,0,.42);
}
html[data-theme='dark'] .msg.ai {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border-color: rgba(255,255,255,.11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 28px rgba(0,0,0,.42);
}
html[data-theme='dark'] .composer {
  background: rgba(26, 29, 38, .92);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
html[data-theme='dark'] .composer textarea { background: transparent; }

/* inputs sit IN the surface, not on it */
html[data-theme='dark'] .auth-form input,
html[data-theme='dark'] .field input,
html[data-theme='dark'] .field textarea {
  background: #0E1015;
  border-color: rgba(255,255,255,.09);
}
html[data-theme='dark'] .auth-form input:focus,
html[data-theme='dark'] .field input:focus,
html[data-theme='dark'] .field textarea:focus { outline-color: rgba(56,189,248,.55); }

/* sheets and scrims */
html[data-theme='dark'] .sheet { background: #171A21; box-shadow: 0 -18px 50px rgba(0,0,0,.55); }
html[data-theme='dark'] .sheet-backdrop { background: rgba(2, 3, 6, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
html[data-theme='dark'] .setting-row { border-bottom-color: rgba(255,255,255,.09); }

/* floating mini bar + auth card */
html[data-theme='dark'] .float-bar { background: rgba(15, 17, 23, .82); border-color: rgba(255,255,255,.09); box-shadow: 0 14px 34px rgba(0,0,0,.55); }
html[data-theme='dark'] .auth-card { background: #12141A; border-color: rgba(255,255,255,.08); box-shadow: 0 30px 70px rgba(0,0,0,.6); }
html[data-theme='dark'] .skel-row { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border-color: rgba(255,255,255,.06); }

/* ---- Template detail: Play Store-style listing (owner) ---- */
.store-head { display: flex; gap: 14px; align-items: center; padding: 4px 2px 14px; }
.store-ic { width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center; flex: none; }
.store-ic svg { width: 30px; height: 30px; }
.store-name { font-size: 20px; font-weight: 800; line-height: 1.35; }
.store-dev { color: var(--sky-deep); font-weight: 700; font-size: 13px; margin-top: 2px; }
.store-sub { color: var(--grey); font-size: 12.5px; margin-top: 1px; }
.store-stats { display: flex; border: 1px solid var(--line); border-radius: 16px; padding: 11px 0; margin-bottom: 6px; background: var(--surface); }
.store-stat { flex: 1; text-align: center; }
.store-stat + .store-stat { border-left: 1px solid var(--line); }
.store-stat b { display: block; font-size: 15px; }
.store-stat span { font-size: 11px; color: var(--grey); }
.store-sec { font-size: 15px; font-weight: 800; margin: 20px 0 10px; }
.store-style { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-bottom: 8px; cursor: pointer; font: inherit; color: inherit; min-height: 52px; }
.store-style.on { border-color: var(--sky); box-shadow: 0 0 0 1px var(--sky); }
.store-dot { width: 22px; height: 22px; border-radius: 999px; flex: none; }
.store-style-nm { font-weight: 700; flex: 1; line-height: 1.4; }
.store-style-lt { color: var(--grey); font-size: 12px; text-transform: capitalize; }
.store-check { color: var(--sky-deep); font-weight: 800; }
.store-desc { line-height: 1.7; font-size: 14.5px; margin: 0; }
.store-feats { list-style: none; padding: 0; margin: 0; }
.store-feats li { display: flex; gap: 9px; padding: 6px 0; font-size: 14px; line-height: 1.6; align-items: flex-start; }
.store-ck { color: var(--sky-deep); font-weight: 800; flex: none; }
.store-info { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 2px 14px; }
.store-irow { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; font-size: 13.5px; }
.store-irow + .store-irow { border-top: 1px solid var(--line); }
.store-ik { color: var(--grey); flex: none; }
.store-iv { font-weight: 700; text-align: right; }
.store-cta { position: sticky; bottom: 0; padding: 12px 0 calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); margin-top: 18px; }
.store-cta .btn-primary { width: 100%; }

/* Mock screenshots are self-contained worlds: they must never inherit the
   shell's ink colour, or in dark mode their light surfaces get white text
   (found in the store-page audit: product names white-on-white). */
.shot { color: #22304A; }
.shot.mock-dark { color: #E8ECF3; }
.shot .mock-item b, .shot .mock-rowtx b,
.shot.mock-dark .mock-item b, .shot.mock-dark .mock-rowtx b { color: #22304A; }
.shot .shot-qty span { color: #43536B; }

/* App Store project rows stay flat in dark mode too (owner) */
html[data-theme='dark'] .recent-card,
html[data-theme='dark'] .proj-row { background: transparent; border: 0; box-shadow: none; }
html[data-theme='dark'] .proj-list .proj-row + .proj-row,
html[data-theme='dark'] .recent-list .recent-card + .recent-card { border-top: 1px solid var(--line); }

/* Template tiles: deep shade in dark mode (owner) */
html[data-theme='dark'] .tpl-card { background: var(--tile-d, #14161C); box-shadow: 0 14px 28px rgba(0, 0, 0, .35); }

/* Design gallery: every style as a mini phone preview (owner) */
.store-designs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.store-use { margin-left: auto; align-self: center; flex: none; background: var(--sky); color: #fff; border: none; border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 14.5px; white-space: nowrap; cursor: pointer; }
.store-use:active { transform: scale(.97); }
.style-block { margin: 6px 0 22px; }
.style-block-head { display: flex; align-items: center; gap: 8px; padding: 2px 2px 10px; }
.style-block-name { font-weight: 700; font-size: 16.5px; }
.style-block .style-build { width: 100%; margin-top: 10px; }
.chip-sub { font-size: 13px; padding: 7px 12px; }
.browse-empty { grid-column: 1 / -1; color: var(--grey); font-size: 14.5px; line-height: 1.7; padding: 18px 6px; text-align: center; }
.store-design { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 8px; text-align: left; cursor: pointer; font: inherit; }
.store-design.on { border-color: var(--sky); box-shadow: 0 0 0 1.5px var(--sky); }
.design-frame { height: 320px; border-radius: 12px; overflow: hidden; position: relative; background: #EDF1F5; }
.design-frame .shot { position: absolute; left: 50%; top: 4px; transform: translateX(-50%) scale(.77); transform-origin: top center; box-shadow: 0 6px 16px rgba(15,35,55,.18); }
.design-info { padding: 8px 4px 2px; display: flex; flex-direction: column; gap: 1px; }
.design-meta { display: flex; align-items: center; gap: 7px; min-width: 0; }
.design-nm { font-weight: 800; font-size: 14.5px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.design-lt { color: var(--grey); font-size: 11.5px; font-weight: 600; text-transform: capitalize; }
.design-check { position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--sky); color: #fff; font-size: 13px; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(14,165,233,.4); }

/* EZ refresh loader (owner): while the app refreshes / the server wakes, a
   small dark pill floats at the top centre with the EZ mark inside a
   rotating arc ring - branded and pro instead of a plain system spinner. */
#ez-refresh { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 50%; transform: translate(-50%, -16px); z-index: 400; background: rgba(11,21,38,.94); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 6px 12px 6px 7px; display: flex; align-items: center; gap: 8px; opacity: 0; pointer-events: none; transition: opacity .28s ease, transform .28s cubic-bezier(.22,1,.36,1); box-shadow: 0 10px 28px rgba(5,12,24,.35); }
#ez-refresh.on { opacity: 1; transform: translate(-50%, 0); animation: ezrBob 1.8s ease-in-out .3s infinite alternate; }
#ez-refresh .ezr-stage { position: relative; width: 30px; height: 30px; flex: none; }
#ez-refresh .ezr-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); border-top-color: #FFFFFF; animation: ezrSpin .85s linear infinite; }
#ez-refresh .ezr-mark { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 19px; height: 19px; display: block; }
#ez-refresh .ezr-mark svg { width: 100%; height: 100%; display: block; }
#ez-refresh .ezr-txt { color: #E8EEF6; font-size: 12.5px; font-weight: 600; letter-spacing: .01em; }
@keyframes ezrSpin { to { transform: rotate(360deg); } }
@keyframes ezrBob { from { transform: translate(-50%, 0); } to { transform: translate(-50%, 3px); } }
@media (prefers-reduced-motion: reduce) { #ez-refresh.on { animation: none; } #ez-refresh .ezr-ring { animation-duration: 1.6s; } }

/* ---------- house ads (free tier) ---------- */
.house-ad { position: relative; margin-top: 18px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 12px 10px 10px; }
.house-ad-label { position: absolute; top: -9px; left: 14px; background: var(--bg); padding: 0 8px; font-size: 11px; font-weight: 700; color: var(--grey); letter-spacing: .4px; }
.house-ad-main { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; padding: 4px 6px; cursor: pointer; color: var(--ink); font: inherit; }
.house-ad-ic { font-size: 30px; flex: none; line-height: 1.2; }
.house-ad-tx { flex: 1; min-width: 0; }
.house-ad-tx b { display: block; font-size: 15px; font-weight: 700; line-height: 1.5; }
.house-ad-tx small { display: block; font-size: 12.5px; color: var(--grey); line-height: 1.5; }
.house-ad-go { font-size: 22px; color: var(--grey); flex: none; }
.house-ad-x { position: absolute; top: 6px; right: 8px; width: 28px; height: 28px; border-radius: 99px; border: 0; background: var(--bg); color: var(--grey); font-size: 12px; cursor: pointer; }

/* sign-in footer legal links */
.auth-legal { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.auth-legal a { color: var(--grey); text-decoration: none; font-weight: 600; }
.auth-legal span { color: var(--line); }

/* new-app vs refine choice row */
.choice-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 12px; }
.choice-row.picked { opacity: .55; }

.ask-note { font-size: 12.5px; color: var(--grey); margin-top: 6px; line-height: 1.55; }

/* Library attach sheet */
.lib-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; }
.lib-title { font-size: 19px; font-weight: 700; }
.lib-all { color: var(--sky); font-size: 15.5px; font-weight: 600; background: none; border: none; padding: 6px 2px; cursor: pointer; }
.lib-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.lib-strip::-webkit-scrollbar { display: none; }
.lib-tile { flex: none; width: 76px; height: 76px; border-radius: 16px; border: none; background: color-mix(in srgb, var(--ink) 6%, var(--surface)); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--ink); padding: 0; cursor: pointer; }
.lib-tile svg.ic { width: 30px; height: 30px; stroke-width: 1.6; }
.lib-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-photo { box-shadow: inset 0 0 0 2px var(--sky); }
.lib-check { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%; background: var(--sky); color: #fff; display: flex; align-items: center; justify-content: center; }
.lib-check svg.ic { width: 12px; height: 12px; stroke-width: 3; }
.lib-rows { background: color-mix(in srgb, var(--ink) 6%, var(--surface)); border-radius: 18px; overflow: hidden; }
.lib-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; background: none; border: none; font-size: 16.5px; color: var(--ink); text-align: left; cursor: pointer; }
.lib-row-ic { display: flex; }
.lib-row-ic svg.ic { width: 24px; height: 24px; stroke-width: 1.8; }

/* Get Started checklist + Guide */
#getstarted-block { margin-top: 14px; }
.gs-card { border: 1.5px solid var(--line); border-radius: 20px; padding: 14px 14px 6px; background: var(--surface); }
.gs-head { display: flex; align-items: center; gap: 8px; }
.gs-title { font-size: 16.5px; font-weight: 800; }
.gs-prog { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--sky); }
.gs-x { border: none; background: none; color: var(--grey); font-size: 14px; padding: 4px 6px; cursor: pointer; }
.gs-bar { height: 6px; border-radius: 999px; background: var(--line); margin: 10px 0 4px; overflow: hidden; }
.gs-fill { height: 100%; border-radius: 999px; background: var(--sky); transition: width .45s cubic-bezier(.2,0,0,1); }
.gs-step { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 2px; background: none; border: none; border-top: 1px solid var(--line); text-align: left; cursor: pointer; color: var(--ink); }
.gs-step:first-of-type { border-top: none; }
.gs-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: var(--grey); }
.gs-dot.done { background: var(--sky); border-color: var(--sky); color: #fff; }
.gs-step-tx { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.gs-step-tx b { font-size: 15px; }
.gs-step-tx small { font-size: 12.5px; color: var(--grey); line-height: 1.45; }
.gs-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); font-size: 15px; font-weight: 700; color: var(--ink); cursor: pointer; }
.gs-link-ic { display: flex; color: var(--sky); }
.gs-link-ic svg.ic { width: 20px; height: 20px; }
.gs-link .s-chev { margin-left: auto; }
.guide-intro { color: var(--grey); font-size: 14.5px; line-height: 1.6; margin: 2px 2px 14px; }
.guide-card { display: flex; align-items: center; gap: 13px; width: 100%; padding: 14px; margin-bottom: 10px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--surface); text-align: left; cursor: pointer; color: var(--ink); }
.guide-ic { flex: none; width: 46px; height: 46px; border-radius: 14px; background: color-mix(in srgb, var(--sky) 12%, var(--surface)); color: var(--sky); display: flex; align-items: center; justify-content: center; }
.guide-ic svg.ic { width: 24px; height: 24px; stroke-width: 1.8; }
.guide-tx { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.guide-tx b { font-size: 15.5px; line-height: 1.45; }
.guide-tx small { font-size: 12.5px; color: var(--grey); line-height: 1.45; }
.guide-meta { color: var(--sky); font-weight: 600; }
.tut-hero { width: 84px; height: 84px; border-radius: 24px; background: color-mix(in srgb, var(--sky) 12%, var(--surface)); color: var(--sky); display: flex; align-items: center; justify-content: center; margin: 10px auto 14px; }
.tut-hero svg.ic { width: 42px; height: 42px; stroke-width: 1.6; }
.tut-prog { text-align: center; font-size: 13px; font-weight: 700; color: var(--sky); }
.tut-dots { display: flex; gap: 6px; justify-content: center; margin: 9px 0 16px; }
.tut-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.tut-dot.on { background: var(--sky); }
.tut-title { font-size: 21px; font-weight: 800; line-height: 1.5; margin: 0 2px 8px; }
.tut-desc { font-size: 15.5px; line-height: 1.75; color: var(--ink); margin: 0 2px; white-space: pre-wrap; }
.tut-nav { display: flex; gap: 10px; margin-top: 24px; }
.tut-nav-btn { flex: 1; padding: 14px; font-size: 16px; border-radius: 14px; }

/* Tutorial v2 — animated demo stage (research spec, 2026-11-09) */
.tut-bar-wrap { display: flex; align-items: center; gap: 12px; margin: 2px 0 14px; }
.tut-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.tut-bar-fill { height: 100%; border-radius: 999px; background: var(--sky); transition: width .35s cubic-bezier(.2,0,0,1); }
.tut-stage { position: relative; min-height: 302px; border-radius: 24px; background: color-mix(in srgb, var(--sky) 6%, var(--surface)); border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 20px 14px; overflow: hidden; }
.tut-guide { display: flex; align-items: flex-end; gap: 10px; margin: 16px 2px 10px; }
.tut-ez { flex: none; width: 46px; height: 46px; border-radius: 50%; background: #0C1D31; display: flex; align-items: center; justify-content: center; }
.tut-ez.big { width: 64px; height: 64px; margin: 0 auto; }
.tut-ez svg { width: 32px; height: 32px; }
.tut-ez.big svg { width: 46px; height: 46px; }
.tut-bubble { position: relative; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; border-bottom-left-radius: 4px; padding: 10px 14px; font-size: 16.5px; font-weight: 800; line-height: 1.5; }
.tut-hero-fallback svg.ic { width: 56px; height: 56px; color: var(--sky); }
/* --- scene primitives --- */
.sc-phone { position: relative; width: 176px; min-height: 252px; border: 2.5px solid var(--ink); border-radius: 26px; background: var(--surface); padding: 14px 12px; display: flex; flex-direction: column; gap: 9px; overflow: hidden; box-shadow: 0 14px 30px rgba(10, 25, 47, .12); }
.sc-line { height: 9px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 16%, transparent); }
.sc-line.w40 { width: 40%; } .sc-line.w50 { width: 50%; } .sc-line.w60 { width: 60%; } .sc-line.w70 { width: 70%; }
.sc-row { display: flex; align-items: center; gap: 9px; padding: 8px 6px; border-radius: 12px; }
.sc-row.big { border: 1.5px solid var(--line); padding: 12px 8px; }
.sc-row .sc-line { flex: 1; }
.sc-dot { flex: none; width: 22px; height: 22px; border-radius: 8px; background: color-mix(in srgb, var(--sky) 30%, var(--surface)); }
.sc-row.dim, .dim { opacity: .45; }
.sc-create { display: flex; align-items: center; gap: 10px; background: var(--sky); color: #fff; font-weight: 800; font-size: 14.5px; border-radius: 16px; padding: 15px 14px; }
.sc-plus { font-size: 22px; font-weight: 400; line-height: 1; }
.sc-target { position: relative; }
.sc-ring { position: absolute; inset: -5px; border: 2.5px solid var(--sky); border-radius: 18px; pointer-events: none; animation: scRing 2s cubic-bezier(.2,0,0,1) infinite; }
@keyframes scRing { 0% { transform: scale(.96); opacity: 0; } 25% { opacity: 1; } 60% { transform: scale(1.06); opacity: .9; } 100% { transform: scale(1.1); opacity: 0; } }
.sc-finger { position: absolute; right: 10px; bottom: -8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.92); border: 2px solid var(--sky); pointer-events: none; animation: scTap 2s ease-in-out infinite; }
@keyframes scTap { 0%, 100% { transform: scale(1); } 45% { transform: scale(1); } 55% { transform: scale(.78); } 65% { transform: scale(1); } }
.sc-area { flex: 1; display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; }
.sc-area.dim { justify-content: flex-start; }
.sc-bub { max-width: 88%; padding: 9px 12px; border-radius: 15px; font-size: 13px; line-height: 1.55; background: color-mix(in srgb, var(--ink) 7%, var(--surface)); }
.sc-bub.me { align-self: flex-end; background: var(--sky); color: #fff; border-bottom-right-radius: 4px; }
.sc-bub.ez { align-self: flex-start; border-bottom-left-radius: 4px; display: flex; align-items: center; gap: 8px; }
.sc-bub.pop { animation: scPop .45s cubic-bezier(.2,0,0,1); }
.sc-bub.w70 { width: 70%; height: 30px; } .sc-bub.w50 { width: 50%; height: 30px; }
@keyframes scPop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sc-composer { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 7px 7px 14px; min-height: 42px; }
.sc-typed { flex: 1; font-size: 12.5px; line-height: 1.5; color: var(--ink); }
.sc-send { flex: none; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 14%, var(--surface)); color: #fff; display: flex; align-items: center; justify-content: center; transition: background .3s; }
.sc-send.on { background: var(--sky); }
.sc-send-arrow { font-size: 15px; font-weight: 800; }
.sc-col { display: flex; flex-direction: column; align-items: center; gap: 13px; width: 100%; }
.sc-step { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 700; opacity: .3; animation: scStepOn 3.6s ease-in-out infinite; }
.sc-step-dot { width: 21px; height: 21px; border-radius: 50%; background: #10B981; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
@keyframes scStepOn { 0%, 100% { opacity: .3; } 18%, 82% { opacity: 1; } }
.sc-prog { width: 150px; height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.sc-prog.wide { width: 190px; }
.sc-prog-fill { height: 100%; width: 40%; border-radius: 99px; background: var(--sky); animation: scFill 3.6s cubic-bezier(.2,0,0,1) infinite; }
.sc-prog-fill.full { width: 100%; animation: none; }
.sc-prog-fill.gold { background: #D9A514; }
.sc-prog-fill.js { animation: none; transition: width .12s linear; }
@keyframes scFill { 0% { width: 6%; } 70% { width: 100%; } 100% { width: 100%; } }
.sc-mini-card { border: 1.5px solid var(--line); border-radius: 13px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.sc-mini-card.wide { width: 190px; }
.sc-btn { background: var(--sky); color: #fff; font-weight: 800; font-size: 13.5px; text-align: center; border-radius: 13px; padding: 11px 12px; }
.sc-btn.big { width: 220px; font-size: 14.5px; padding: 13px; }
.sc-toast { align-self: center; background: #0F2B1D; color: #7BE3AE; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 7px 13px; animation: scToastLoop 3.4s ease-in-out infinite; }
.sc-toast.static { animation: none; }
@keyframes scToastLoop { 0%, 12% { opacity: 0; transform: translateY(8px); } 30%, 88% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; } }
.sc-cdot { width: 17px; height: 17px; border-radius: 50%; border: 2px solid transparent; }
.sc-cdot.a { background: #F59E0B; } .sc-cdot.b { background: #0EA5E9; } .sc-cdot.c { background: #6366F1; }
.sc-cdot.on { border-color: var(--ink); transform: scale(1.15); }
.sc-apphead { height: 34px; border-radius: 11px; background: #0EA5E9; animation: scHue 4.5s ease-in-out infinite alternate; }
@keyframes scHue { from { background: #0EA5E9; } to { background: #6366F1; } }
.sc-app-ic { flex: none; width: 34px; height: 34px; border-radius: 11px; background: color-mix(in srgb, var(--sky) 14%, var(--surface)); color: var(--sky); display: flex; align-items: center; justify-content: center; }
.sc-app-ic svg.ic { width: 19px; height: 19px; }
.sc-ok { flex: none; width: 21px; height: 21px; border-radius: 50%; background: #10B981; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; animation: scPopLoop 3s ease-in-out infinite; }
.sc-ok.big { width: 34px; height: 34px; font-size: 18px; animation: none; }
@keyframes scPopLoop { 0%, 15% { transform: scale(.4); opacity: 0; } 35%, 85% { transform: scale(1); opacity: 1; } 100% { transform: scale(.4); opacity: 0; } }
.sc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.sc-grid.two { grid-template-columns: repeat(2, 1fr); }
.sc-tile { position: relative; aspect-ratio: 1; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.85); }
.sc-tile.t0 { background: #7FB2D9; } .sc-tile.t1 { background: #A8C3A0; } .sc-tile.t2 { background: #D9B48A; } .sc-tile.t3 { background: #B7A6D9; }
.sc-tile-ic svg.ic { width: 19px; height: 19px; }
.sc-tile.plus { background: color-mix(in srgb, var(--ink) 8%, var(--surface)); color: var(--sky); font-size: 24px; border: 1.5px dashed color-mix(in srgb, var(--ink) 25%, transparent); }
.sc-tile.fresh { animation: scPopLoop 4.4s ease-in-out infinite; }
.sc-tile-check { position: absolute; top: 4px; right: 4px; width: 17px; height: 17px; border-radius: 50%; background: var(--sky); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; animation: scPopLoop 3.6s ease-in-out infinite; }
.sc-split { display: flex; align-items: center; gap: 12px; }
.sc-split.cards { align-items: stretch; }
.sc-photo-card { width: 108px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); padding: 12px; display: flex; flex-direction: column; gap: 7px; align-items: flex-start; color: var(--sky); }
.sc-arrow { font-size: 21px; color: var(--sky); font-weight: 800; }
.sc-arrow.down { animation: scBounce 1.8s ease-in-out infinite; }
@keyframes scBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
.sc-list { display: flex; flex-direction: column; gap: 7px; width: 118px; }
.sc-list-row { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 11px; padding: 8px 10px; animation: scSlideLoop 4.6s ease-in-out infinite; }
.sc-list-row .sc-line { flex: 1; }
@keyframes scSlideLoop { 0%, 8% { opacity: 0; transform: translateX(14px); } 25%, 88% { opacity: 1; transform: translateX(0); } 100% { opacity: 0; } }
.sc-price { font-size: 12px; font-weight: 800; color: var(--sky); white-space: nowrap; }
.sc-paper { position: relative; width: 168px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 16px 14px; display: flex; flex-direction: column; gap: 9px; overflow: hidden; box-shadow: 0 10px 22px rgba(10,25,47,.10); }
.sc-scanline { position: absolute; left: 6%; right: 6%; height: 3px; border-radius: 99px; background: var(--sky); box-shadow: 0 0 0 5px color-mix(in srgb, var(--sky) 18%, transparent); animation: scScanY 2.8s ease-in-out infinite; }
.sc-phone .sc-scanline { top: 40px; }
.sc-paper .sc-scanline { left: 8px; right: 8px; }
@keyframes scScanY { 0%, 100% { top: 12%; opacity: 0; } 18% { opacity: 1; } 50% { top: 82%; opacity: 1; } 68% { opacity: 0; } }
.sc-chips { display: flex; gap: 6px; }
.sc-chip { font-size: 11.5px; font-weight: 700; border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 10px; }
.sc-chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.sc-tpl { border-radius: 13px; padding: 12px 10px; min-height: 56px; display: flex; align-items: flex-end; }
.sc-tpl.t0 { background: #C8D8E8; } .sc-tpl.t1 { background: #D5E2CC; } .sc-tpl.t2 { background: #EDDCC0; } .sc-tpl.t3 { background: #DCD2EE; }
.sc-tpl .sc-line { background: rgba(20,35,55,.35); }
.sc-styles { display: flex; gap: 10px; align-items: center; }
.sc-style { width: 86px; border: 1.5px solid var(--line); border-radius: 15px; background: var(--surface); padding: 12px 10px; display: flex; flex-direction: column; gap: 7px; }
.sc-style.t0 { border-top: 10px solid #7FB2D9; } .sc-style.t1 { border-top: 10px solid #A8C3A0; } .sc-style.t2 { border-top: 10px solid #D9B48A; }
.sc-style.mid { animation: scPick 3s ease-in-out infinite alternate; }
@keyframes scPick { from { transform: scale(1); box-shadow: 0 0 0 0 rgba(14,165,233,0); } to { transform: scale(1.09); box-shadow: 0 0 0 3px var(--sky); } }
.sc-style.wide { width: 220px; }
.sc-pvbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sc-pvbar .sc-line { flex: 1; }
.sc-pub-btn { background: var(--sky); color: #fff; font-size: 12.5px; font-weight: 800; border-radius: 999px; padding: 8px 15px; }
.sc-link-chip { display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 11px 17px; font-size: 14px; font-weight: 700; color: var(--sky); }
.sc-link-ic svg.ic { width: 18px; height: 18px; }
.sc-share-row { display: flex; gap: 12px; }
.sc-share-ic { width: 46px; height: 46px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--line); color: var(--sky); display: flex; align-items: center; justify-content: center; animation: scPopLoop 4s ease-in-out infinite; }
.sc-share-ic svg.ic { width: 20px; height: 20px; }
.sc-share-ic.person { font-weight: 800; font-size: 15px; background: color-mix(in srgb, var(--sky) 14%, var(--surface)); }
.sc-qr { align-self: center; display: grid; grid-template-columns: repeat(7, 13px); gap: 2.5px; padding: 11px; background: #fff; border-radius: 13px; border: 1.5px solid var(--line); }
.sc-qr span { width: 13px; height: 13px; border-radius: 2.5px; }
.sc-qr span.on { background: #14202F; }
.sc-menu { border: 1.5px solid var(--line); border-radius: 15px; overflow: hidden; }
.sc-menu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; font-size: 13px; font-weight: 700; border-top: 1px solid var(--line); }
.sc-menu-row:first-child { border-top: none; }
.sc-toggle { flex: none; width: 40px; height: 23px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 18%, var(--surface)); position: relative; animation: scTogBg 3.4s ease-in-out infinite alternate; }
.sc-toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; animation: scTog 3.4s ease-in-out infinite alternate; }
@keyframes scTog { from { transform: translateX(0); } to { transform: translateX(17px); } }
@keyframes scTogBg { from { background: color-mix(in srgb, var(--ink) 18%, var(--surface)); } to { background: var(--sky); } }
.sc-sheet { margin-top: auto; border: 1.5px solid var(--line); border-radius: 17px; padding: 9px; display: flex; flex-direction: column; gap: 5px; animation: scSheetUp 4.6s ease-in-out infinite; background: var(--surface); }
@keyframes scSheetUp { 0%, 10% { transform: translateY(26px); opacity: .35; } 30%, 88% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(26px); opacity: .35; } }
.sc-sheet-row { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; border-radius: 11px; padding: 9px 10px; }
.sc-sheet-row.on { background: color-mix(in srgb, var(--sky) 12%, var(--surface)); color: var(--sky); }
.sc-sheet-row svg.ic { width: 17px; height: 17px; }
.sc-big-ic { width: 62px; height: 62px; border-radius: 19px; background: color-mix(in srgb, var(--sky) 13%, var(--surface)); color: var(--sky); display: flex; align-items: center; justify-content: center; }
.sc-big-ic svg.ic { width: 29px; height: 29px; }
.sc-pct { font-size: 16px; font-weight: 800; color: var(--sky); }
.sc-apk-chip { display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 11px 17px; font-size: 14px; font-weight: 700; }
.sc-apk-chip svg.ic { width: 18px; height: 18px; color: var(--sky); }
.sc-mini-phone { display: flex; flex-direction: column; align-items: center; gap: 7px; border: 2.5px solid var(--ink); border-radius: 20px; padding: 16px 20px; background: var(--surface); }
.sc-installed { font-size: 13px; font-weight: 800; }
.sc-kind { flex: 1; border: 1.5px solid var(--line); border-radius: 17px; background: var(--surface); padding: 15px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 13.5px; }
.sc-kind-ic { color: var(--sky); display: flex; }
.sc-kind-ic svg.ic { width: 25px; height: 25px; }
.sc-kind.pick { animation: scPick 3s ease-in-out infinite alternate; }
.sc-badge { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 4px 10px; }
.sc-badge.admin { background: #E7F7EE; color: #0E7A3D; }
.sc-badge.none { background: color-mix(in srgb, var(--ink) 8%, var(--surface)); color: var(--grey); }
.sc-pin-dots { display: flex; gap: 13px; }
.sc-pin-dot { width: 17px; height: 17px; border-radius: 50%; border: 2.5px solid var(--ink); animation: scPinDot 3.4s ease-in-out infinite; }
@keyframes scPinDot { 0%, 12% { background: transparent; } 30%, 85% { background: var(--ink); } 100% { background: transparent; } }
.sc-pad { display: grid; grid-template-columns: repeat(3, 42px); gap: 8px; opacity: .55; }
.sc-pad-key { height: 34px; border: 1.5px solid var(--line); border-radius: 11px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; background: var(--surface); }
.sc-toast.pin-ok { animation-delay: 1.6s; }
.sc-order { border: 1.5px solid var(--line); border-radius: 15px; padding: 13px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.sc-pill { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 5px 12px; transition: background .4s, color .4s; }
.sc-pill.st0 { background: #FDEBC8; color: #8A5A00; }
.sc-pill.st1 { background: #D8EBFB; color: #0B5FA5; }
.sc-pill.st2 { background: #DFF5E6; color: #0E7A3D; }
.sc-data-hd { display: flex; align-items: center; gap: 8px; color: var(--sky); font-size: 14px; }
.sc-data-hd svg.ic { width: 18px; height: 18px; }
.sc-token-bal { display: flex; align-items: center; gap: 9px; font-size: 19px; }
.sc-zap { width: 34px; height: 34px; border-radius: 11px; background: #FBF3D5; color: #B8860B; display: flex; align-items: center; justify-content: center; }
.sc-zap svg.ic { width: 19px; height: 19px; }
.sc-minus { font-size: 17px; font-weight: 800; color: #D9534F; animation: scPopLoop 3.4s ease-in-out infinite; }
.sc-token-card { width: 216px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--surface); padding: 15px; display: flex; flex-direction: column; gap: 9px; }
.sc-token-top { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; }
.sc-token-top b { margin-left: auto; }
.sc-token-top.gold { color: #B8860B; }
.sc-token-num { font-size: 27px; font-weight: 800; }
.sc-token-sub { font-size: 12px; color: var(--grey); }
.sc-prog.gold { background: #F1E3B3; }
.sc-plans { display: flex; gap: 9px; align-items: stretch; }
.sc-plan { width: 76px; border: 1.5px solid var(--line); border-radius: 15px; background: var(--surface); padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; text-align: center; }
.sc-plan-price { font-size: 11.5px; color: var(--grey); font-weight: 700; }
.sc-plan.hot { animation: scPick 3s ease-in-out infinite alternate; }
.sc-confetti { position: absolute; top: -12px; width: 8px; height: 13px; border-radius: 2px; pointer-events: none; animation: scConfetti 2.6s ease-in forwards; }
@keyframes scConfetti { to { transform: translateY(330px) rotate(560deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .tut-stage *, .tut-bar-fill { animation: none !important; transition: none !important; }
}

/* Store Kit */
.sk-intro { color: var(--grey); font-size: 14px; line-height: 1.55; margin: 2px 0 4px; }
.sk-h { font-weight: 800; font-size: 15.5px; margin: 18px 0 8px; }
.sk-box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.sk-box .btn-primary.big { width: 100%; margin-top: 12px; }
.sk-url { word-break: break-all; font-size: 13.5px; color: var(--sky); line-height: 1.5; flex: 1; }
.sk-row { display: flex; gap: 8px; align-items: center; }
.sk-btn { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13.5px; cursor: pointer; flex: none; }
.sk-btn:disabled { opacity: .55; }
.sk-ta { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.55; margin: 4px 0 8px; resize: vertical; }
.sk-lab { font-size: 12.5px; color: var(--grey); font-weight: 700; margin: 8px 0 2px; }
.sk-assets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sk-asset img { width: 100%; max-height: 220px; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); display: block; background: #0C1D31; }
.sk-pre { white-space: pre-line; font-size: 13.5px; line-height: 1.65; color: var(--ink); margin-bottom: 14px; }
.sk-pre:last-child { margin-bottom: 0; }
.sk-note { font-size: 13px; color: var(--grey); line-height: 1.55; margin-bottom: 10px; }

/* template mock photos (2026-11-09): real photographs over the tinted tiles */
.mock-tile, .mock-thumb, .shot-hero { position: relative; overflow: hidden; }
.mock-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.mock-scrim { position: absolute; inset: 0; background: rgba(8, 12, 20, 0.34); }
.mock-hasphoto { position: relative; overflow: hidden; }
.mock-hasphoto b, .mock-hasphoto .mock-big-chip, .mock-hasphoto .mock-herotx { position: relative; z-index: 1; }
.mock-big.mock-hasphoto { min-height: 96px; justify-content: flex-end; align-items: flex-start; text-align: left; }
.mock-big.mock-hasphoto .mock-big-emoji, .mock-hero.mock-hasphoto .mock-hero-emoji { display: none; }

/* game-shaped template mocks (2026-11-09): playfield scene, HUD, PLAY */
.g-scene { position: relative; height: 118px; border-radius: 12px; overflow: hidden; margin-bottom: 8px; }
.g-scene.big { height: 148px; border-radius: 0; margin-bottom: 0; }
.g-hill { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.g-h1 { width: 130px; height: 130px; left: -30px; bottom: -86px; }
.g-h2 { width: 170px; height: 170px; right: -45px; bottom: -108px; background: rgba(0, 0, 0, 0.14); }
.g-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 15px; background: rgba(0, 0, 0, 0.22); }
.g-sprite { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); font-size: 52px; line-height: 1; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35)); }
.g-scene.big .g-sprite { font-size: 66px; }
.g-hud { position: absolute; top: 7px; left: 7px; right: 7px; display: flex; justify-content: space-between; z-index: 2; }
.g-chip { background: rgba(10, 14, 22, 0.55); color: #fff; font-size: 8.5px; font-weight: 800; border-radius: 999px; padding: 3px 8px; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 8px; }
.g-title-row b { font-size: 12.5px; }
.g-play { color: #fff; font-weight: 800; font-size: 11px; border-radius: 999px; padding: 7px 16px; flex: none; }
.g-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.g-card { background: rgba(127, 140, 160, 0.10); border-radius: 12px; padding: 6px; }
.shot.mock-dark .g-card { background: rgba(255, 255, 255, 0.06); }
.g-card .mock-tile { height: 44px; border-radius: 9px; margin-bottom: 5px; }
.g-card b { font-size: 10.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-cardrow { display: flex; align-items: center; justify-content: space-between; margin-top: 3px; }
.g-cardrow i { font-size: 8.5px; font-weight: 700; font-style: normal; color: #0284C7; }
.shot.mock-dark .g-cardrow i { color: #7DD3FC; }
.g-playbtn { width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 9px; display: flex; align-items: center; justify-content: center; flex: none; }
.g-level { display: flex; gap: 5px; margin: 9px 0 3px; }
.g-level i { width: 8px; height: 8px; border-radius: 50%; background: rgba(127, 140, 160, 0.35); }

/* reader + dashboard template mocks (2026-11-09) */
.bk-cont { display: flex; gap: 9px; background: rgba(127, 140, 160, 0.10); border-radius: 14px; padding: 9px; margin-bottom: 10px; }
.shot.mock-dark .bk-cont, .shot.mock-dark .ds-kpi, .shot.mock-dark .ds-chart { background: rgba(255, 255, 255, 0.06); }
.bk-cover { width: 44px; height: 62px; border-radius: 6px; flex: none; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.bk-cont-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bk-cont-tx b { font-size: 11.5px; }
.bk-cont-tx i { font-size: 9px; opacity: 0.65; font-style: normal; }
.bk-prog { height: 5px; border-radius: 99px; background: rgba(127, 140, 160, 0.30); overflow: hidden; margin-top: auto; }
.bk-prog i { display: block; height: 100%; border-radius: 99px; }
.bk-pct { font-size: 8.5px; font-weight: 700; }
.bk-seclabel { font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.55; margin: 2px 0 6px; }
.bk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.bk-cell .bk-cover { width: 100%; height: 56px; font-size: 20px; }
.bk-cell b { font-size: 8.8px; display: block; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-head { display: flex; gap: 9px; padding: 10px 12px 2px; }
.bk-page { margin: 10px 12px; border-radius: 12px; padding: 12px; background: #FBF7EE; }
.bk-page .bk-chap { font-family: Georgia, serif; font-size: 12.5px; font-weight: 700; color: #2B2620; margin-bottom: 7px; }
.bk-page .shot-lines i { background: rgba(43, 38, 32, 0.28); }
.bk-pageprog { display: flex; align-items: center; gap: 8px; margin: 0 12px; font-size: 8.5px; opacity: 0.85; }
.bk-pageprog .bk-prog { flex: 1; margin: 0; }
.ds-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 8px; }
.ds-kpi { border-radius: 14px; padding: 10px; background: rgba(127, 140, 160, 0.10); }
.ds-kpi b { font-size: 14.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-kpi i { font-size: 8.8px; opacity: 0.65; font-style: normal; }
.ds-chart { border-radius: 14px; padding: 10px; background: rgba(127, 140, 160, 0.10); margin-bottom: 8px; }
.ds-bars { display: flex; align-items: flex-end; gap: 6px; height: 56px; }
.ds-bars i { flex: 1; border-radius: 4px 4px 2px 2px; min-height: 6px; }
.ds-chart .bk-seclabel { margin: 7px 0 0; }
.ds-ring-wrap { display: flex; justify-content: center; padding: 12px 0 2px; }
.ds-ringcap { text-align: center; margin-bottom: 10px; }
.ds-ringcap b { font-size: 13px; display: block; }
.ds-ringcap i { font-size: 9px; opacity: 0.65; font-style: normal; }
.ds-cat { margin: 0 12px 8px; }
.ds-catrow { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font-size: 9.5px; }
.ds-catrow b { flex: 0 0 32%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ds-catrow .bk-prog { flex: 1; margin: 0; }
.ds-catrow span { font-weight: 700; white-space: nowrap; }

/* ---- EZ Knowledge (admin teaching) ---- */
.ak-hint { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 2px 2px 14px; }
.ak-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.ak-input { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 16px; font-family: inherit; }
.ak-input:focus { outline: none; border-color: var(--sky); }
textarea.ak-body { min-height: 110px; resize: vertical; line-height: 1.55; }
.ak-save { align-self: flex-start; }
.ak-export { align-self: flex-start; text-decoration: none; }
.ak-card { border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; background: var(--surface); }
.ak-card.ak-off { opacity: .55; }
.ak-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.ak-state { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ak-card-body { white-space: pre-wrap; font-size: 14px; line-height: 1.55; }
.ak-card-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ak-del { color: #DC2626; }

/* ================= DESKTOP VIEW (owner, 2026-11-10) =================
   Pro desktop layout + gentle motion, ONLY at ≥1024px.
   Below 1024px nothing in this section applies — mobile stays as-is. */
#desk-nav { display: none; }
.auth-brand { display: none; }

@keyframes deskUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes deskNavIn { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@keyframes deskFloat { from { transform: translateY(-4px); } to { transform: translateY(4px); } }
@keyframes sheetPop { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }

@media (min-width: 1024px) {
  body {
    background:
      radial-gradient(1100px 520px at 88% -10%, color-mix(in srgb, var(--sky) 12%, transparent), transparent 60%),
      radial-gradient(900px 520px at -8% 108%, color-mix(in srgb, var(--sky) 8%, transparent), transparent 55%),
      var(--bg);
    background-attachment: fixed;
  }
  #app { padding-left: 264px; }

  /* ---- sidebar ---- */
  #desk-nav {
    display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0;
    width: 264px; z-index: 60; padding: 24px 16px 18px;
    background: var(--surface); border-right: 1px solid var(--line);
    animation: deskNavIn .45s cubic-bezier(.22, 1, .36, 1) both;
  }
  .dn-brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 0; }
  .dn-brand img { width: 42px; height: 42px; border-radius: 13px; box-shadow: 0 8px 18px rgba(11, 21, 38, .22); }
  .dn-brand span { font-weight: 800; font-size: 19px; letter-spacing: .2px; }
  .dn-items { display: flex; flex-direction: column; gap: 4px; margin-top: 30px; }
  .dn-item {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
    padding: 12px 14px; border-radius: 14px; font-weight: 700; font-size: 15px; color: var(--grey);
    transition: background .22s ease, color .22s ease, transform .22s cubic-bezier(.22, 1, .36, 1);
  }
  .dn-item .ic { width: 20px; height: 20px; }
  .dn-item:hover { background: color-mix(in srgb, var(--sky) 9%, var(--surface)); color: var(--ink); transform: translateX(3px); }
  .dn-item.active { background: var(--sky-deep); color: #fff; }
  .dn-item.active:hover { background: var(--sky-deep); color: #fff; }
  .dn-user {
    margin-top: auto; display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
    padding: 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg);
    transition: border-color .22s ease, transform .22s cubic-bezier(.22, 1, .36, 1);
  }
  .dn-user:hover { transform: translateY(-2px); border-color: var(--sky); }
  .dn-user-av {
    width: 42px; height: 42px; border-radius: 999px; flex: none; overflow: hidden;
    background: linear-gradient(160deg, #1B2B45, #0B1526); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px;
    background-size: cover; background-position: center;
  }
  .dn-user-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .dn-user-tx b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
  .dn-user-tx small { color: var(--grey); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }

  /* ---- pages ---- */
  .page { max-width: 1060px; padding: 30px 40px 0; }
  #view-guide, #view-tutorial, #view-account, #view-appicon, #view-admin, #view-admin-messages,
  #view-admin-users, #view-admin-knowledge, #view-appdata, #view-plans, #view-edit { max-width: 840px; }
  #view-chat { max-width: 900px; }
  #view-preview { max-width: 1200px; }
  .page > * { animation: deskUp .55s cubic-bezier(.22, 1, .36, 1) both; }
  .page > *:nth-child(2) { animation-delay: .05s; }
  .page > *:nth-child(3) { animation-delay: .1s; }
  .page > *:nth-child(4) { animation-delay: .15s; }
  .page > *:nth-child(5) { animation-delay: .2s; }
  .page > *:nth-child(6) { animation-delay: .25s; }
  .page > *:nth-child(n+7) { animation-delay: .3s; }
  .page-bar { min-height: 58px; }
  .page-title { font-size: 20px; }

  /* ---- home ---- */
  .greet-line { font-size: 16px; }
  .home-heading { font-size: 34px; margin-top: 10px; }
  .create-card {
    flex-direction: row; align-items: center; gap: 20px; text-align: left;
    padding: 30px 34px; border-radius: 28px; margin-top: 24px;
    transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease;
  }
  .create-card:hover { transform: translateY(-3px); box-shadow: 0 22px 44px rgba(15, 35, 55, .28); }
  .create-plus { width: 74px; height: 74px; font-size: 40px; flex: none; animation: deskFloat 3.4s ease-in-out infinite alternate; }
  .create-label { font-size: 22px; }
  .create-go { margin-left: auto; padding: 11px 22px; font-size: 15px; flex: none; }
  .proj-texts { display: flex; flex-direction: column; }
  .recent-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .recent-card, .proj-row { transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s ease, border-color .25s ease; }
  .recent-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px;
    box-shadow: 0 6px 18px rgba(31, 52, 84, .06);
  }
  .recent-list .recent-card + .recent-card { border-top: 1px solid var(--line); }
  .proj-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .proj-row {
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px;
    box-shadow: 0 6px 18px rgba(31, 52, 84, .06);
  }
  .proj-list .proj-row + .proj-row { border-top: 1px solid var(--line); }
  html[data-theme='dark'] .proj-row, html[data-theme='dark'] .recent-card { background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
  .recent-card:hover, .proj-row:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(31, 52, 84, .13); border-color: var(--sky); }
  .tpl-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .tpl-card { min-height: 158px; transition: transform .28s cubic-bezier(.22, 1, .36, 1), box-shadow .28s ease; }
  .tpl-card:hover { transform: translateY(-5px); box-shadow: 0 20px 38px rgba(31, 52, 84, .2); }

  /* ---- profile / settings ---- */
  #view-profile .profile-head, #view-profile .credit-card, #view-profile .settings-group {
    max-width: 780px; margin-left: auto; margin-right: auto; width: 100%;
  }
  .setting-row { transition: background .2s ease, padding-left .25s cubic-bezier(.22, 1, .36, 1); }
  .setting-row:hover { background: color-mix(in srgb, var(--sky) 6%, var(--surface)); padding-left: 20px; }

  /* ---- chat / preview ---- */
  .msg { max-width: 72%; }
  .preview-stage { padding-top: 14px; }
  .laptop-frame { max-width: 1040px; margin: 0 auto; }
  .phone-frame { margin: 0 auto; }

  /* ---- buttons ---- */
  .btn-primary { transition: transform .22s cubic-bezier(.22, 1, .36, 1), box-shadow .22s ease, background .22s ease; }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(2, 132, 199, .3); }
  .btn-outline { transition: transform .22s cubic-bezier(.22, 1, .36, 1), border-color .22s ease; }
  .btn-outline:hover { transform: translateY(-2px); border-color: var(--sky); }
  .chip { transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
  .chip:hover { transform: translateY(-1px); border-color: var(--sky); }

  /* ---- sheets become centred dialogs ---- */
  .sheet-backdrop { align-items: center; justify-content: center; padding: 24px 24px 24px 288px; }
  .sheet { border-radius: 26px; max-width: 540px; animation: sheetPop .34s cubic-bezier(.22, 1, .36, 1); }
  .toast { left: calc(50% + 132px); }
  .float-bar { left: calc(50% + 132px); }
  #ez-refresh { left: calc(50% + 132px); }

  /* ---- auth: split brand + card ---- */
  .auth-wrap { padding: 44px; }
  .auth-brand {
    display: flex; flex-direction: column; width: 470px; flex: none;
    background: #0B1B30; color: #fff; border-radius: 30px 0 0 30px; padding: 48px 44px;
    box-shadow: 0 24px 60px rgba(11, 21, 38, .14);
    animation: deskNavIn .5s cubic-bezier(.22, 1, .36, 1) both;
  }
  .auth-brand-logo { width: 78px; height: 78px; border-radius: 21px; box-shadow: 0 12px 26px rgba(0, 0, 0, .35); }
  .auth-brand-name { font-size: 32px; font-weight: 800; margin-top: 20px; line-height: 1.3; }
  .auth-brand-tag { color: #7DD3FC; font-weight: 700; font-size: 16px; margin-top: 6px; }
  .auth-brand-feats { margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding-top: 44px; }
  .auth-brand-feat { display: flex; align-items: center; gap: 11px; font-weight: 600; font-size: 15px; }
  .auth-brand-feat .ic { width: 21px; height: 21px; color: #38BDF8; flex: none; }
  .auth-card { border-radius: 0 30px 30px 0; border-left: 0; max-width: 430px; padding: 38px 34px 24px; animation: deskUp .55s cubic-bezier(.22, 1, .36, 1) .08s both; }

  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--grey) 45%, transparent); border-radius: 99px; border: 2px solid var(--bg); }
  ::-webkit-scrollbar-track { background: transparent; }
}

@media (min-width: 1440px) {
  .page { max-width: 1140px; }
  #view-preview { max-width: 1280px; }
}

@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  #desk-nav, .auth-brand, .auth-card, .page > * { animation: none; }
  .create-plus { animation: none; }
  .create-card:hover, .tpl-card:hover, .proj-row:hover, .recent-card:hover, .btn-primary:hover, .btn-outline:hover, .dn-item:hover, .dn-user:hover { transform: none; }
}

/* ================= STAGING POLISH PACK (html.stg only) =================
   Level-up proposal for owner review on staging.ezapp.space — design,
   motion and micro-interactions. Live files do not carry the .stg class,
   so none of this applies there. If approved, the gate can be lifted. */
@keyframes stgPageIn { from { opacity: 0; transform: translateY(12px) scale(.997); } to { opacity: 1; transform: none; } }
@keyframes stgFloat { from { transform: translateY(-4px) rotate(-2deg); } to { transform: translateY(5px) rotate(2deg); } }
@keyframes stgPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .38); } 100% { box-shadow: 0 0 0 22px rgba(255, 255, 255, 0); } }
@keyframes stgSheet { from { opacity: .5; transform: translateY(58px); } to { opacity: 1; transform: none; } }
@keyframes stgSheen { 0% { transform: translateX(-130%) skewX(-18deg); } 55%, 100% { transform: translateX(240%) skewX(-18deg); } }

html.stg .page { animation: stgPageIn .48s cubic-bezier(.22, 1.15, .36, 1); }
html.stg .page > * { animation: deskUp .55s cubic-bezier(.22, 1, .36, 1) both; }
html.stg .page > *:nth-child(2) { animation-delay: .05s; }
html.stg .page > *:nth-child(3) { animation-delay: .1s; }
html.stg .page > *:nth-child(4) { animation-delay: .15s; }
html.stg .page > *:nth-child(5) { animation-delay: .2s; }
html.stg .page > *:nth-child(6) { animation-delay: .25s; }
html.stg .page > *:nth-child(n+7) { animation-delay: .3s; }

/* staging marker */
html.stg .stg-chip {
  display: inline-flex; margin-top: 12px; padding: 5px 13px; border-radius: 999px;
  background: color-mix(in srgb, var(--sky) 13%, var(--surface)); color: var(--sky-deep);
  border: 1px solid color-mix(in srgb, var(--sky) 45%, transparent);
  font-size: 12px; font-weight: 800; letter-spacing: .4px;
}
html.stg .dn-brand span::after, html.stg .auth-brand-name::after {
  content: 'STAGING'; margin-left: 9px; vertical-align: 3px;
  font-size: 9.5px; font-weight: 800; letter-spacing: 1.2px; color: #7DD3FC;
  border: 1px solid rgba(125, 211, 252, .55); border-radius: 6px; padding: 2px 6px;
}
html.stg .dn-brand span::after { color: var(--sky-deep); border-color: color-mix(in srgb, var(--sky) 55%, transparent); vertical-align: 2px; }

/* home hero */
.hero-ez { display: none; }
html.stg .hero-ez {
  display: block; float: left; width: 62px; height: 62px; border-radius: 19px;
  margin: 2px 14px 8px 0; box-shadow: 0 12px 24px rgba(11, 21, 38, .25);
  animation: stgFloat 3.8s ease-in-out infinite alternate;
}
html.stg .create-card { position: relative; overflow: hidden; clear: both; }
html.stg .create-art { position: absolute; right: -10px; bottom: -16px; width: 128px; opacity: .22; transform: rotate(-6deg); pointer-events: none; z-index: 0; }
html.stg .create-art svg { width: 100%; height: auto; display: block; }
html.stg .create-label, html.stg .create-go { position: relative; z-index: 1; }
html.stg .create-plus { animation: stgPulse 2.2s ease-out infinite; }
html.stg .home-heading::after { content: ''; display: block; width: 56px; height: 5px; border-radius: 99px; background: var(--sky); margin-top: 9px; }

/* idea chips */
.idea-chips { display: none; }
html.stg .idea-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
html.stg .idea-chips-label { width: 100%; color: var(--grey); font-size: 13px; font-weight: 700; margin-bottom: 2px; }
html.stg .idea-chip {
  padding: 9px 15px; border-radius: 999px; background: var(--surface);
  border: 1.5px solid var(--line); font-weight: 700; font-size: 13.5px; min-height: 42px;
  transition: transform .22s cubic-bezier(.22, 1, .36, 1), border-color .22s ease, background .22s ease;
}
html.stg .idea-chip:hover { border-color: var(--sky); background: color-mix(in srgb, var(--sky) 7%, var(--surface)); transform: translateY(-2px); }
html.stg .idea-chip:active { transform: scale(.96); }

/* section heads + cards */
html.stg .section-head h2 { position: relative; padding-left: 13px; }
html.stg .section-head h2::before { content: ''; position: absolute; left: 0; top: 16%; height: 68%; width: 4.5px; border-radius: 99px; background: var(--sky); }
html.stg .tpl-card { transition: transform .28s cubic-bezier(.22, 1, .36, 1), box-shadow .28s ease; }
html.stg .tpl-card .tpl-ic { transition: transform .35s cubic-bezier(.22, 1, .36, 1); }

/* template cards v3 (staging, owner reference 2026-11-10 — Yandex-style):
   pastel tint card, dark ink text, round solid icon + title row, short
   description, big soft template-colour art anchored bottom-right,
   white chevron chip top-right. Dark theme keeps deep tiles + white text. */
html.stg .tpl-card {
  justify-content: flex-start; gap: 9px; padding: 16px; min-height: 168px;
  border-radius: 26px; background: var(--tile-l);
  border: 1px solid color-mix(in srgb, var(--tile-c) 16%, transparent);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--tile-c) 20%, transparent);
}
html.stg .tpl-head { display: flex; align-items: center; gap: 9px; position: relative; z-index: 1; min-width: 0; }
html.stg .tpl-ic {
  width: 35px; height: 35px; border-radius: 999px; flex: none;
  background: var(--tile-c); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
html.stg .tpl-ic .ic { width: 18px; height: 18px; }
html.stg .tpl-name {
  color: var(--ink); font-size: 16.5px; text-align: left;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
html.stg .tpl-desc {
  color: color-mix(in srgb, var(--ink) 72%, transparent); font-size: 13px; line-height: 1.6;
  text-align: left; position: relative; z-index: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
html.stg .tpl-cat { color: var(--grey); font-size: 12px; margin-top: auto; position: relative; z-index: 1; max-width: 68%; }
html.stg .tpl-art { right: -16px; top: auto; bottom: -20px; opacity: .3; transform: rotate(-6deg); z-index: 0; transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
html.stg .tpl-card .tpl-art svg.ic { width: 98px; height: 98px; stroke-width: 1.1; }
html.stg .tpl-go {
  position: absolute; right: 12px; top: 12px; bottom: auto; width: 27px; height: 27px;
  border-radius: 999px; background: rgba(255, 255, 255, .78); color: var(--ink);
  box-shadow: 0 2px 8px rgba(20, 30, 45, .1);
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; z-index: 1;
}
html.stg[data-theme='dark'] .tpl-card { background: var(--tile-d); border-color: rgba(255, 255, 255, .08); }
html.stg[data-theme='dark'] .tpl-name { color: #fff; }
html.stg[data-theme='dark'] .tpl-desc { color: rgba(255, 255, 255, .78); }
html.stg[data-theme='dark'] .tpl-cat { color: rgba(255, 255, 255, .66); }
html.stg[data-theme='dark'] .tpl-go { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; }
html.stg[data-theme='dark'] .tpl-art { opacity: .38; }
html.stg .proj-row, html.stg .recent-card { transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s ease, border-color .25s ease, background .25s ease; }
@media (hover: hover) {
  html.stg .tpl-card:hover { transform: translateY(-5px); box-shadow: 0 20px 38px rgba(31, 52, 84, .2); }
  html.stg .tpl-card:hover .tpl-ic { transform: scale(1.1) rotate(-4deg); }
  html.stg .tpl-card:hover .tpl-art { transform: rotate(-3deg) scale(1.07); }
  html.stg .proj-row:hover, html.stg .recent-card:hover { transform: translateY(-2px); }
}
html.stg .tpl-card:active, html.stg .proj-row:active, html.stg .recent-card:active { transform: scale(.98); }

/* sheets spring + premium token card */
html.stg .sheet { animation: stgSheet .4s cubic-bezier(.3, 1.32, .4, 1); }
html.stg .credit-card { position: relative; overflow: hidden; }
html.stg .credit-card::after {
  content: ''; position: absolute; top: -10%; bottom: -10%; left: 0; width: 34%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--sky) 13%, transparent), transparent);
  animation: stgSheen 4.2s ease-in-out infinite; pointer-events: none;
}
html.stg .composer { box-shadow: 0 12px 30px rgba(15, 35, 55, .12); }
html.stg .dn-item.active { position: relative; }
html.stg .dn-item.active::before { content: ''; position: absolute; left: -16px; top: 22%; height: 56%; width: 4px; border-radius: 0 99px 99px 0; background: var(--sky); }
html.stg .auth-brand-logo { animation: stgFloat 4.4s ease-in-out infinite alternate; }

@media (prefers-reduced-motion: reduce) {
  html.stg .page, html.stg .page > *, html.stg .hero-ez, html.stg .auth-brand-logo { animation: none; }
  html.stg .create-plus, html.stg .credit-card::after { animation: none; }
}

/* ================= BAGAN THEME (owner, 2026-11-10) =================
   A warm, tidy Bagan-inspired appearance: sand background, warm-white
   surfaces, deep-brown ink, terracotta primary, gold accents. Chosen in
   Profile → Appearance → ပုဂံ (Bagan). Pure palette + a few warm touches;
   layout and motion are unchanged. */
html[data-theme='bagan'] {
  --bg: #F5EEE0;
  --surface: #FFFDF6;
  --ink: #3A2B1E;
  --grey: #8A7967;
  --line: #E7D9BE;
  --sky: #C05F2A;
  --sky-deep: #9E4A1F;
}
html[data-theme='bagan'] .create-card { box-shadow: 0 14px 30px rgba(94, 52, 20, .28); border: 1px solid rgba(201, 154, 46, .55); }
html[data-theme='bagan'] .create-plus { background: rgba(255, 235, 200, .25); }
html[data-theme='bagan'] .avatar-btn, html[data-theme='bagan'] .dn-user-av { background: linear-gradient(160deg, #4A2E1B, #2C1E12); }
html[data-theme='bagan'] .auth-brand { background: #2C1E12; }
html[data-theme='bagan'] .auth-brand-tag { color: #E3B34C; }
html[data-theme='bagan'] .section-head h2::before { background: #C99A2E; }
html.stg[data-theme='bagan'] .home-heading::after { background: #C99A2E; }
html[data-theme='bagan'] .sheet { box-shadow: 0 -18px 50px rgba(94, 52, 20, .3); }
html[data-theme='bagan'] .toast { background: #2C1E12; }
