/* amah.ai — white light theme, matte dark theme. Haiti blue + red, a touch of yellow, green on hover. No purple. */
:root {
  --bg: #ffffff;
  --bg-soft: #f4f6fb;
  --card: #ffffff;
  --line: #e3e7f0;
  --text: #0b1220;
  --muted: #5a6478;
  --blue: #00209f;
  --blue-soft: #e8ecfb;
  --red: #d21034;
  --red-dark: #a90c29;
  --yellow: #f5c518;
  --green: #12a150;
  --ink: #0b1220;
  --shadow: 0 10px 30px rgba(11, 18, 32, 0.08);
  --radius: 18px;
  --accent: var(--blue);
  --chip-on-bg: var(--blue);
  --chip-on-text: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-soft: #131a24;
    --card: #161d29;
    --line: #253043;
    --text: #f2f4f8;
    --muted: #9aa5b8;
    --blue-soft: #1b2434;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --accent: var(--yellow);
    --chip-on-bg: var(--yellow);
    --chip-on-text: #0b1220;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
a { color: inherit; }
img, video { max-width: 100%; display: block; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue) 0 50%, var(--red) 50% 100%);
  color: #fff; font-size: 16px; font-weight: 800;
}
.brand b { color: var(--red); }
.nav { display: flex; align-items: center; gap: 8px; }
.btn, .credits-pill, .nav a.link { white-space: nowrap; }
.nav a.link { text-decoration: none; color: var(--muted); font-weight: 600; padding: 8px 12px; border-radius: 10px; }
.nav a.link:hover { color: var(--green); }
.credits-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--blue-soft); color: var(--accent); font-weight: 700; font-size: 14px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 12px 20px; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(210, 16, 52, 0.25); }
.btn-red:hover { background: var(--green); box-shadow: 0 8px 20px rgba(18, 161, 80, 0.25); }
.btn-ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-lg { padding: 15px 26px; font-size: 17px; border-radius: 14px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 32, 159, .14), transparent 70%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--blue-soft); color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .02em;
}
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; }
h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.05; letter-spacing: -0.035em; margin: 18px 0 18px; }
h1 .hl { color: var(--red); }
.lead { font-size: 19px; color: var(--muted); max-width: 540px; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 16px; color: var(--muted); font-size: 14px; }

/* film visual */
.screen {
  position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: 26px; overflow: hidden;
  background: #0b1220; box-shadow: 0 30px 60px rgba(11, 18, 32, .25);
  border: 1px solid rgba(255, 255, 255, .06);
}
.scene { position: absolute; inset: 0; }
.sky { position: absolute; inset: 0; background: linear-gradient(180deg, #0a1a5c 0%, #0f3a8a 40%, #f08a3c 78%, #f5c518 100%); animation: sky 14s ease-in-out infinite alternate; }
.sun { position: absolute; left: 50%; top: 58%; width: 120px; height: 120px; margin-left: -60px; border-radius: 50%; background: radial-gradient(circle, #ffe27a, #f5a623 60%, transparent 62%); animation: rise 14s ease-in-out infinite alternate; }
.sea { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; background: linear-gradient(180deg, #0b2f7a, #061536); }
.sea::before, .sea::after {
  content: ""; position: absolute; left: -50%; width: 200%; height: 2px; background: rgba(255, 226, 122, .55);
  top: 18%; animation: wave 6s linear infinite;
}
.sea::after { top: 38%; opacity: .5; animation-duration: 9s; }
.hills { position: absolute; left: 0; right: 0; bottom: 33%; height: 22%; background:
  radial-gradient(120% 100% at 20% 100%, #071233 60%, transparent 61%),
  radial-gradient(90% 90% at 75% 100%, #0a1a45 60%, transparent 61%); }
.palm { position: absolute; bottom: 30%; left: 12%; width: 6px; height: 34%; background: #050b1f; border-radius: 4px; transform: rotate(-6deg); transform-origin: bottom; animation: sway 5s ease-in-out infinite alternate; }
.palm::before { content: ""; position: absolute; top: -18px; left: -46px; width: 100px; height: 40px; border-radius: 50% 50% 0 0; border-top: 10px solid #050b1f; }
.hud { position: absolute; inset: 0; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; font-size: 13px; }
.hud-top { display: flex; justify-content: space-between; align-items: center; }
.rec { display: inline-flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, .35); padding: 5px 10px; border-radius: 999px; font-weight: 700; }
.rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: blink 1.2s infinite; }
.prompt-card { background: rgba(8, 14, 30, .72); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 14px 16px; }
.prompt-card small { color: var(--yellow); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; }
.prompt-card p { margin: 4px 0 10px; font-size: 14px; line-height: 1.45; }
.bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.bar span { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, var(--red), var(--yellow)); animation: load 4s ease-in-out infinite; }

@keyframes sky { to { filter: hue-rotate(-12deg) brightness(1.08); } }
@keyframes rise { from { transform: translateY(30px); } to { transform: translateY(-40px); } }
@keyframes wave { to { transform: translateX(25%); } }
@keyframes sway { to { transform: rotate(3deg); } }
@keyframes blink { 50% { opacity: .2; } }
@keyframes load { 0% { width: 8%; } 70% { width: 92%; } 100% { width: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }

/* ---------- sections ---------- */
section { padding: 64px 0; }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; letter-spacing: -0.025em; margin: 10px 0 12px; }
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin: 14px 0 6px; font-size: 19px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); }
.icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--accent); }
.icon.red { background: rgba(210, 16, 52, .1); color: var(--red); }
.icon.yellow { background: rgba(245, 197, 24, .18); color: #9a7a00; }
@media (prefers-color-scheme: dark) { .icon.yellow { color: var(--yellow); } .site-foot { background: #0a0e14; } }
.icon svg { width: 24px; height: 24px; }
.step-n { font-weight: 800; color: var(--red); font-size: 14px; letter-spacing: .08em; }

.cta {
  border-radius: 26px; padding: 48px 32px; text-align: center; color: #fff;
  background: linear-gradient(180deg, #00209f 0%, #001a80 100%);
  border-bottom: 6px solid #d21034;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .82); margin: 0 auto 24px; max-width: 520px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 48px 0 28px; color: var(--muted); font-size: 14px; background: var(--bg-soft); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.foot-brand p { margin: 12px 0 0; max-width: 360px; }
.foot-mail a { color: var(--accent); font-weight: 700; }
.site-foot nav h3 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--text); margin: 6px 0 12px; }
.site-foot nav a { display: block; text-decoration: none; padding: 4px 0; }
.site-foot nav a:hover, .foot-mail a:hover { color: var(--green); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------- auth ---------- */
.auth { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 16px; background: var(--bg-soft); }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { font-size: 30px; margin: 0 0 6px; }
.auth-card .sub { color: var(--muted); margin: 0 0 22px; }
label { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.form-msg { min-height: 22px; margin: 12px 0 0; font-size: 14px; color: var(--red); }
.form-msg.ok { color: var(--green); }
.auth-alt { margin-top: 18px; color: var(--muted); font-size: 15px; text-align: center; }
.auth-alt a { color: var(--accent); font-weight: 700; }
.w-full { width: 100%; margin-top: 18px; }

/* ---------- studio ---------- */
.studio { padding: 32px 0 64px; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
.studio h1 { font-size: 32px; margin: 0 0 4px; }
.studio .sub { color: var(--muted); margin: 0 0 20px; }
.credit-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; color: #fff;
  background: linear-gradient(120deg, #00209f, #0b1a5c);
}
.credit-card .num { font-size: 30px; font-weight: 800; line-height: 1; }
.credit-card small { color: rgba(255, 255, 255, .75); }
.credit-card .tag { background: var(--yellow); color: #0b1220; font-weight: 800; padding: 6px 10px; border-radius: 10px; font-size: 13px; }
.step { margin-bottom: 20px; }
.step-title { display: flex; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 10px; }
.step-title .n { width: 26px; height: 26px; border-radius: 8px; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 13px; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice {
  text-align: left; border: 1.5px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 14px; padding: 14px; cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s;
}
.choice:hover { border-color: var(--green); }
.choice b { display: block; font-size: 15px; }
.choice span { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.choice[aria-pressed=true] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.drops { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drop {
  position: relative; display: grid; place-items: center; text-align: center; min-height: 140px;
  border: 2px dashed var(--line); border-radius: 14px; background: var(--bg-soft); color: var(--muted);
  cursor: pointer; overflow: hidden; font-size: 14px; padding: 12px;
}
.drop:hover { border-color: var(--green); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop.single { grid-column: 1 / -1; }
.counter { text-align: right; font-size: 13px; color: var(--muted); margin-top: 4px; }
textarea { min-height: 120px; resize: vertical; }
.opts { display: grid; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-soft); }
.opt { display: grid; gap: 8px; }
.opt-label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 6px; padding: 5px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.seg-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; min-width: 0;
  padding: 8px 6px; border: 1.5px solid transparent; border-radius: 10px; background: transparent; color: var(--text);
  font: inherit; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.seg-btn:hover { border-color: var(--green); }
.seg-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.seg-main { font-weight: 800; font-size: 15px; line-height: 1.2; white-space: nowrap; }
.seg-sub { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.seg-sub:empty { display: none; }
.seg-shape { display: block; height: 18px; max-width: 30px; border: 2px solid currentColor; border-radius: 4px; opacity: .7; margin-bottom: 2px; }
.seg-btn[aria-pressed=true] { background: var(--chip-on-bg); border-color: var(--chip-on-bg); color: var(--chip-on-text); box-shadow: 0 6px 16px color-mix(in srgb, var(--chip-on-bg) 30%, transparent); }
.seg-btn[aria-pressed=true] .seg-sub { color: inherit; opacity: .85; }
.seg-btn[aria-pressed=true] .seg-shape { opacity: 1; }
.seg-btn[disabled] { opacity: .35; cursor: not-allowed; }
.seg-btn[disabled]:hover { border-color: transparent; }
.generate {
  width: 100%; border: 0; border-radius: 14px; padding: 16px; color: #fff; font: inherit; font-size: 17px; font-weight: 800;
  background: linear-gradient(100deg, #d21034, #e8432f); cursor: pointer; box-shadow: 0 10px 24px rgba(210, 16, 52, .28);
}
.generate:hover { background: linear-gradient(100deg, #12a150, #0f8a45); box-shadow: 0 10px 24px rgba(18, 161, 80, .28); }
.generate[disabled] { opacity: .6; cursor: not-allowed; }
.privacy { font-size: 13px; color: var(--muted); text-align: center; margin-top: 10px; }
.note { font-size: 13px; color: var(--muted); margin-top: 6px; }

.gal-section { padding: 0; }
.gallery-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.gallery-head h2 { font-size: 22px; margin: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; align-items: start; }
.vcard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); container-type: inline-size; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.vcard:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--green) 45%, var(--line)); box-shadow: 0 16px 36px rgba(11, 18, 32, .12); }
.vmedia { aspect-ratio: 16 / 9; background: #0b1220; display: grid; place-items: center; color: #fff; position: relative; overflow: hidden; }
.vmedia.is-square { aspect-ratio: 1 / 1; }
.vmedia.is-story { aspect-ratio: 4 / 5; }
.vmedia video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.vmedia .spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--yellow); animation: spin 1s linear infinite; }
.vmedia .state { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .8); }
.vmedia.failed { background: #2a0a12; padding: 14px; text-align: center; font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }
.vbody { display: flex; flex-direction: column; gap: 10px; padding: 14px; flex: 1; }
.vprompt { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vmeta { display: flex; flex-wrap: wrap; gap: 6px; }
.vchip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.vchip.ok { background: rgba(18, 161, 80, .1); border-color: rgba(18, 161, 80, .3); color: var(--green); }
.vactions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.vbtn {
  flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 10px; border-radius: 11px; border: 1.5px solid var(--line); background: transparent;
  color: var(--accent); font: inherit; font-size: 13px; font-weight: 800; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.vbtn span { overflow: hidden; text-overflow: ellipsis; }
.vbtn svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.vbtn:hover { border-color: var(--green); color: var(--green); }
.vbtn-red { order: -1; flex: 1 0 100%; background: var(--red); border-color: var(--red); color: #fff; }
.vbtn-red:hover { background: var(--green); border-color: var(--green); color: #fff; }
.vbtn-icon { flex: 0 0 40px; padding: 0; color: var(--muted); }
.vbtn-icon:hover { border-color: var(--red); color: var(--red); }
.vbtn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
/* Wide cards: all three actions on one line. */
@container (min-width: 420px) {
  .vactions { flex-wrap: nowrap; }
  .vbtn-red { order: 0; flex: 1 1 0; }
}
.empty { border: 2px dashed var(--line); border-radius: 16px; padding: 40px 20px; text-align: center; color: var(--muted); grid-column: 1 / -1; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); z-index: 50; max-width: calc(100% - 32px); }
.hidden { display: none !important; }

/* ---------- shared bits ---------- */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-auth { display: inline-flex; align-items: center; gap: 8px; }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.narrow { width: min(820px, 100% - 32px); }
section.tight { padding-top: 8px; }
.center-note { text-align: center; color: var(--muted); font-size: 14px; margin: 22px auto 0; max-width: 640px; }
.center-note a { color: var(--accent); font-weight: 700; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.legal-note { text-align: center; margin-top: 14px; }
.legal-note a { color: var(--accent); }
.notice { background: rgba(210, 16, 52, .08); border: 1px solid rgba(210, 16, 52, .3); color: var(--text); padding: 12px 16px; border-radius: 12px; text-align: center; margin: 0 auto 22px; max-width: 640px; }
.notice.ok { background: rgba(18, 161, 80, .1); border-color: rgba(18, 161, 80, .35); }
.icon.green { background: rgba(18, 161, 80, .12); color: var(--green); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.eyebrow.on-dark { background: rgba(255, 255, 255, .12); color: var(--yellow); }

/* key facts */
.trust { padding: 0 0 40px; }
.trust-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--card); box-shadow: var(--shadow); }
.trust-row div { text-align: center; }
.trust-row b { display: block; font-size: 26px; letter-spacing: -0.02em; color: var(--accent); }
.trust-row span { color: var(--muted); font-size: 14px; }

/* Petiht community */
.petiht { background: linear-gradient(135deg, #00165f 0%, #0b1220 70%); color: #fff; overflow: hidden; }
.petiht-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.petiht h2 { color: #fff; }
.petiht p { color: rgba(255, 255, 255, .82); font-size: 17px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 24px; }
.ticks li { position: relative; padding-left: 28px; margin: 8px 0; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 9px; border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg); }
.ticks.small li { font-size: 15px; color: var(--muted); }
.petiht .ticks li { color: #fff; }
.store-row { display: flex; flex-wrap: wrap; gap: 10px; }
.store { display: inline-flex; align-items: center; gap: 10px; background: #000; color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px; padding: 8px 16px 8px 12px; min-height: 52px; transition: border-color .15s, transform .15s; }
.store:hover { border-color: var(--green); transform: translateY(-1px); }
.store svg { width: 24px; height: 24px; flex: none; }
.store span { display: flex; flex-direction: column; font-weight: 700; font-size: 17px; line-height: 1.1; }
.store small { font-weight: 600; font-size: 11px; opacity: .8; }
/* Petiht phone mockup (landing) */
.mock { position: relative; margin: 0; justify-self: center; width: min(300px, 78vw); padding: 24px 0; }
.mock-glow { position: absolute; inset: 8% -18%; border-radius: 50%; filter: blur(48px); opacity: .55;
  background: radial-gradient(closest-side, rgba(210, 16, 52, .8), transparent), radial-gradient(closest-side at 30% 70%, rgba(0, 32, 159, .9), transparent); }
.device { position: relative; aspect-ratio: 924 / 2000; border-radius: 46px; padding: 10px;
  background: linear-gradient(145deg, #3a4150, #111621 40%, #2a303c 70%, #0b0f17);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .18), 0 40px 80px rgba(0, 0, 0, .55), 0 8px 24px rgba(0, 0, 0, .35);
  transform: rotate(-3deg); transition: transform .5s ease; }
.mock:hover .device { transform: rotate(0deg) translateY(-6px); }
.device-screen { position: relative; width: 100%; height: 100%; border-radius: 37px; overflow: hidden; background: #fff; }
.device-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.device-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, .22) 0%, transparent 28%, transparent 70%, rgba(255, 255, 255, .06) 100%); }
.device-status { position: absolute; top: 0; left: 0; right: 0; height: 44px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px 0 26px; color: #0b1220; font-size: 13px; font-weight: 800; }
.device-island { position: absolute; left: 50%; top: 10px; width: 88px; height: 25px; margin-left: -44px; border-radius: 20px; background: #05070b; }
.device-icons { display: flex; align-items: center; gap: 5px; }
.device-icons i { display: block; background: #0b1220; }
.device-icons .sig { width: 15px; height: 9px; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.device-icons .wifi { width: 13px; height: 9px; border-radius: 13px 13px 0 0; clip-path: polygon(50% 100%, 0 0, 100% 0); }
.device-icons .bat { width: 21px; height: 10px; border-radius: 3px; box-shadow: 0 0 0 1.5px #0b1220; background: linear-gradient(90deg, #0b1220 75%, transparent 75%); }
.device-btn { position: absolute; width: 3px; border-radius: 2px; background: #2a303c; }
.device-btn.b1 { left: -3px; top: 18%; height: 7%; }
.device-btn.b2 { left: -3px; top: 27%; height: 11%; }
.device-btn.b3 { right: -3px; top: 24%; height: 15%; }
.float-card { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .96); color: #0b1220; box-shadow: 0 16px 36px rgba(0, 0, 0, .35); font-size: 13px; line-height: 1.25; white-space: nowrap;
  animation: floaty 5s ease-in-out infinite; }
.float-card b { display: block; font-size: 14px; }
.float-card small { display: block; color: #5a6478; font-weight: 600; }
.fc-1 { left: -26%; top: 22%; }
.fc-2 { right: -22%; bottom: 20%; animation-delay: -2.5s; }
.fc-ico { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, #00209f 0 50%, #d21034 50% 100%); }
.fc-heart { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(210, 16, 52, .12); color: #d21034; font-size: 17px; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
@media (max-width: 900px) {
  .fc-1 { left: -12%; }
  .fc-2 { right: -10%; }
}
@media (max-width: 560px) {
  .mock { width: min(260px, 72vw); }
  .fc-1 { left: -14%; top: 14%; }
  .fc-2 { right: -12%; bottom: 14%; }
  .float-card { padding: 8px 11px; font-size: 12px; }
}

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1.5px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); }
.plan.featured { border-color: var(--red); box-shadow: 0 16px 40px rgba(210, 16, 52, .16); }
.plan h3, .plan .plan-name { margin: 0; font-size: 20px; }
.plan .price { margin: 12px 0 0; display: flex; align-items: baseline; gap: 6px; }
.plan .price b { font-size: 44px; letter-spacing: -0.03em; line-height: 1; }
.plan .price span { color: var(--muted); font-weight: 600; }
.plan-credits { display: inline-block; align-self: flex-start; margin: 12px 0 0; padding: 4px 10px; border-radius: 8px; background: var(--blue-soft); color: var(--accent); font-weight: 800; }
.plan .ticks { flex: 1; }
.badge { position: absolute; top: -12px; right: 20px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; letter-spacing: .02em; }
.page-hero { padding: 56px 0 24px; }
.page-hero .section-head { margin-bottom: 0; }
.h1-page { font-size: clamp(34px, 4.6vw, 52px); margin: 10px 0 12px; }
.page-lead { color: var(--muted); font-size: 18px; margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.price-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.price-table th, .price-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.price-table tbody tr:last-child th, .price-table tbody tr:last-child td { border-bottom: 0; }
.price-table thead th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.price-table td { font-weight: 700; }
.price-table small { display: block; color: var(--muted); font-weight: 600; }

/* FAQ */
details { border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 0 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 16px 28px 16px 0; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 22px; color: var(--accent); }
details[open] summary::after { content: "\2212"; }
summary:hover { color: var(--green); }
details p { margin: 0 0 16px; color: var(--muted); }
details a { color: var(--accent); }

/* text pages */
.prose h2 { font-size: 24px; margin: 34px 0 10px; }
.prose p, .prose li { color: var(--muted); }
.prose a { color: var(--accent); }
.prose b { color: var(--text); }
.prose .card h3 { margin-top: 0; }
.prose .btn-red { color: #fff; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.facts { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--card); }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; color: var(--muted); }

/* studio additions */
.credit-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.credit-buy { color: #fff; font-size: 13px; font-weight: 700; }
.credit-buy:hover { color: var(--green); }
.generate.buy { background: linear-gradient(100deg, #00209f, #0b1a5c); }
@media (prefers-color-scheme: dark) { .generate.buy { background: var(--yellow); color: #0b1220; box-shadow: 0 10px 24px rgba(245, 197, 24, .2); } }
.app-promo { container: promo / inline-size; border-radius: 22px; overflow: hidden; margin-bottom: 22px; color: #fff; box-shadow: 0 18px 44px rgba(0, 22, 95, .28);
  background: radial-gradient(120% 80% at 100% 0%, rgba(210, 16, 52, .35), transparent 55%), linear-gradient(160deg, #00209f 0%, #001466 45%, #0b1220 100%); }
.promo-banner { position: relative; display: block; overflow: hidden; aspect-ratio: 1024 / 500; background: #001466; }
.promo-banner img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.promo-banner:hover img, .promo-banner:focus-visible img { transform: scale(1.04); }
.promo-banner::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: linear-gradient(90deg, var(--blue) 50%, var(--red) 50%); }
.promo-banner:focus-visible { outline: 3px solid var(--yellow); outline-offset: -3px; }
.promo-free { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 5px 11px; border-radius: 999px; background: var(--yellow); color: #0b1220;
  font-size: 12px; font-weight: 800; letter-spacing: .02em; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.app-promo-text { padding: 18px 22px 22px; }
.app-promo h2 { color: #fff; font-size: clamp(21px, 2.2vw, 26px); line-height: 1.2; margin: 10px 0 6px; }
.app-promo p { color: rgba(255, 255, 255, .85); margin: 0 0 14px; font-size: 15px; }
.promo-feats { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 16px; }
.promo-feats li { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); }
.promo-feats li:last-child { color: #0b1220; background: var(--yellow); border-color: var(--yellow); }
.app-promo .store { background: #000; border-color: rgba(255, 255, 255, .3); }
@container promo (max-width: 460px) { .app-promo .store { flex: 1 1 130px; justify-content: center; padding: 8px 10px; } .app-promo .store span { font-size: 15px; } }
.promo-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 16px 0 0; }
.promo-steps li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12); font-size: 13px; line-height: 1.3; color: rgba(255, 255, 255, .9); }
.promo-steps b { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: var(--yellow); color: #0b1220; font-size: 12px; }
@container promo (max-width: 460px) { .promo-steps { grid-template-columns: 1fr; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .studio-grid { grid-template-columns: 1fr; }
  .screen { max-width: 420px; margin: 0 auto; justify-self: center; }
  .grid-3, .plans, .petiht-grid { grid-template-columns: 1fr; }
  .grid-4, .trust-row { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .plan.featured { order: -1; }
}
@media (max-width: 560px) {
  .hero { padding-top: 40px; }
  .nav a.link.hide-sm { display: none; }
  .choices { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; gap: 14px; }
  .opts { padding: 12px; gap: 14px; }
  .seg-main { font-size: 14px; }
  .seg-sub { font-size: 11px; }
  .cta { padding: 36px 20px; }
  .grid-4, .duo { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .nav .btn-sm { padding: 7px 10px; font-size: 13px; }
  .nav-auth .link { padding: 8px 6px; }
  .nav-auth .btn { padding: 9px 12px; font-size: 14px; }
  .top .brand { font-size: 18px; gap: 8px; }
  .nav { gap: 6px; }
  .brand { font-size: 18px; }

  .nav-auth .credits-pill { padding: 5px 9px; font-size: 13px; }
}
/* ================= signed-in app ================= */
.app-top .app-bar { display: flex; align-items: center; gap: 16px; height: 64px; }
.app-top .brand { flex: none; }
.app-nav { display: flex; gap: 4px; margin: 0 auto; padding: 4px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); }
.app-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 14px; transition: color .15s, background .15s; }
.app-nav a:hover { color: var(--green); }
.app-nav a[aria-current=page] { background: var(--card); color: var(--accent); box-shadow: 0 2px 8px rgba(11, 18, 32, .08); }
.app-nav svg, .tabbar svg, .credits-pill svg, .menu-pop svg, .tool-btn svg, .pick-asset svg, .btn-ico, .sheet-x svg, .send svg, .bot-mark svg, .upload-ico svg, .search-row svg {
  width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.app-right { display: flex; align-items: center; gap: 8px; flex: none; }
a.credits-pill { text-decoration: none; border: 1px solid transparent; }
a.credits-pill:hover { border-color: var(--green); color: var(--green); }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex: none;
  background: linear-gradient(135deg, var(--blue) 0 50%, var(--red) 50% 100%); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }
.avatar.xl { width: 88px; height: 88px; font-size: 30px; box-shadow: 0 0 0 4px var(--card), 0 0 0 5px var(--line); }
.menu { position: relative; }
.avatar-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; }
.avatar-btn:hover, .avatar-btn[aria-expanded=true] { border-color: var(--green); color: var(--green); }
.avatar-btn .chev { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.avatar-btn[aria-expanded=true] .chev { transform: rotate(180deg); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 10px); width: 290px; max-width: calc(100vw - 24px); z-index: 60;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 8px; box-shadow: 0 24px 60px rgba(11, 18, 32, .2); }
.menu-pop[hidden] { display: none; }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; }
.menu-who { min-width: 0; }
.menu-who b, .menu-who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-who small { color: var(--muted); font-size: 13px; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: transparent;
  color: var(--text); font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover, .menu-pop a:focus-visible, .menu-pop button:focus-visible { background: var(--bg-soft); color: var(--green); outline: none; }
.menu-pop a.menu-credits { justify-content: space-between; margin: 0 0 6px; background: var(--blue-soft); border-radius: 12px; }
.menu-credits small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.menu-credits b { color: var(--accent); font-size: 18px; }
.menu-buy { background: var(--red); color: #fff; padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 800; }
.menu-pop .menu-out { color: var(--red); border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 6px; padding-top: 12px; }
.tabbar { display: none; }

.app-main { padding: 28px 0 64px; }
.narrow-app { width: min(860px, 100% - 32px); }
.page-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-top h1 { font-size: clamp(28px, 3.4vw, 36px); margin: 0 0 4px; line-height: 1.15; }
.page-top .sub { color: var(--muted); margin: 0; }
.count-pill { padding: 6px 12px; border-radius: 999px; background: var(--blue-soft); color: var(--accent); font-weight: 800; font-size: 14px; }
.btn-ico { margin-right: -2px; }
.row-end { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.row-end .form-msg { margin: 0 auto 0 0; min-height: 0; }
.empty { grid-column: 1 / -1; }

/* small buttons */
.mini-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 10px;
  border: 1.5px solid var(--line); background: transparent; color: var(--accent); font: inherit; font-size: 13px; font-weight: 800; text-decoration: none; cursor: pointer; white-space: nowrap; }
.mini-btn:hover { border-color: var(--green); color: var(--green); }
.mini-btn[disabled] { opacity: .55; cursor: default; }
.mini-red { background: var(--red); border-color: var(--red); color: #fff; }
.mini-red:hover { background: var(--green); border-color: var(--green); color: #fff; }
.mini-quiet { color: var(--muted); }
.mini-quiet:hover { color: var(--red); border-color: var(--red); }
.mini-icon { width: 36px; padding: 0; color: var(--muted); }
.mini-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mini-icon:hover { color: var(--red); border-color: var(--red); }

/* studio: photo slots, prompt tools, picker sheet */
.slot { display: grid; gap: 8px; align-content: start; }
.slot.single { grid-column: 1 / -1; }
.pick-asset { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--accent); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.pick-asset:hover { border-color: var(--green); color: var(--green); }
.prompt-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.prompt-tools .counter { margin: 0 0 0 auto; }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.tool-btn:hover { border-color: var(--green); color: var(--green); }
.tool-btn svg { width: 16px; height: 16px; }
.tool-ai { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.sheet { width: min(640px, 100vw - 24px); max-height: min(80vh, 720px); padding: 0; border: 1px solid var(--line); border-radius: 22px;
  background: var(--card); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.sheet::backdrop { background: rgba(5, 10, 20, .55); backdrop-filter: blur(2px); }
.sheet[open] { display: flex; flex-direction: column; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 18px; }
.sheet-x { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.sheet-x:hover { color: var(--red); border-color: var(--red); }
.sheet-body { padding: 16px 18px 20px; overflow-y: auto; }
.sheet-empty { color: var(--muted); text-align: center; padding: 24px 8px; margin: 0; }
.sheet-empty a { color: var(--accent); font-weight: 700; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pick-tile { aspect-ratio: 1; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: var(--bg-soft); cursor: pointer; }
.pick-tile img { width: 100%; height: 100%; object-fit: cover; }
.pick-tile:hover, .pick-tile:focus-visible { border-color: var(--green); outline: none; }
.pick-list { display: grid; gap: 8px; }
.pick-row { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.pick-row:hover, .pick-row:focus-visible { border-color: var(--green); outline: none; }
.pick-row span { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* assets */
.upload-zone { position: relative; display: grid; place-items: center; gap: 6px; text-align: center; padding: 30px 16px; margin-bottom: 22px;
  border: 2px dashed var(--line); border-radius: 20px; background: var(--bg-soft); cursor: pointer; transition: border-color .15s, background .15s; }
.upload-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-zone:hover, .upload-zone.over { border-color: var(--green); background: color-mix(in srgb, var(--green) 6%, var(--bg-soft)); }
.upload-zone.busy { opacity: .7; pointer-events: none; }
.upload-zone small { color: var(--muted); }
.upload-ico { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--blue-soft); color: var(--accent); }
.upload-ico svg { width: 26px; height: 26px; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.asset { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.asset img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--bg-soft); }
.asset-bar { padding: 10px; display: grid; gap: 8px; }
.asset-name { font-size: 13px; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-acts { display: flex; gap: 6px; }
.asset-acts .mini-red { flex: 1; }

/* prompts */
.new-prompt { display: grid; gap: 10px; margin-bottom: 18px; }
.new-prompt textarea { min-height: 96px; }
.new-prompt .row-end { margin-top: 0; }
.search-row { position: relative; margin-bottom: 14px; }
.search-row svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-row input { width: 100%; padding: 12px 14px 12px 42px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); font: inherit; }
.search-row input:focus { outline: none; border-color: var(--accent); }
.prompt-list { display: grid; gap: 12px; }
.prompt-card { display: grid; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.prompt-card h2 { font-size: 16px; margin: 0 0 4px; }
.prompt-card p { margin: 0; color: var(--muted); font-size: 15px; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.prompt-card textarea { min-height: 120px; }
.prompt-acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* settings */
.set-card { display: block; padding: 20px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.set-head h2 { font-size: 18px; margin: 0 0 4px; }
.set-head p { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.set-head a { color: var(--accent); }
.set-card label { margin-top: 12px; }
.set-quiet { box-shadow: none; background: var(--bg-soft); }
.avatar-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 12px; }
.file-btn { position: relative; overflow: hidden; margin: 0; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.plan-row b { font-size: 24px; color: var(--accent); }
.plan-row small { color: var(--muted); }

/* assistant chat */
.app-chat { display: flex; flex-direction: column; min-height: 100vh; }
.chat-main { flex: 1; display: flex; }
.chat-wrap { width: min(820px, 100% - 32px); margin: 0 auto; display: flex; flex-direction: column; flex: 1; padding: 20px 0 16px; min-height: 0; }
.chat-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.chat-id { display: flex; align-items: center; gap: 12px; }
.chat-id h1 { font-size: 22px; margin: 0; }
.chat-id p { margin: 0; color: var(--muted); font-size: 14px; }
.bot-mark { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff;
  background: linear-gradient(135deg, var(--blue) 0 50%, var(--red) 50% 100%); }
.bot-mark svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 8px 2px 16px; min-height: 280px; max-height: calc(100vh - 290px); }
.chat-hello { margin: auto 0; text-align: center; color: var(--muted); }
.chat-hello[hidden] { display: none; }
.idea-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.idea { padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.idea:hover { border-color: var(--green); color: var(--green); }
.msg { display: flex; flex-direction: column; gap: 10px; }
.msg.me { align-items: flex-end; }
.bubble { max-width: min(560px, 88%); padding: 12px 16px; border-radius: 18px; line-height: 1.5; }
.bubble p { margin: 0; white-space: pre-wrap; }
.msg.me .bubble { background: var(--blue); color: #fff; border-bottom-right-radius: 6px; }
.msg.bot .bubble { background: var(--bg-soft); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
.idea-list { display: grid; gap: 10px; }
.idea-card { padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); display: grid; gap: 10px; }
.idea-card h3 { margin: 0; font-size: 16px; }
.idea-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.idea-text { margin: 0; font-size: 15px; white-space: pre-wrap; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 8px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.composer:focus-within { border-color: var(--accent); }
.composer textarea { border: 0; box-shadow: none; padding: 10px; min-height: 44px; max-height: 160px; resize: none; background: transparent; }
.composer textarea:focus { box-shadow: none; }
.send { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 0; background: var(--red); color: #fff; cursor: pointer; }
.send:hover { background: var(--green); }
.send[disabled] { opacity: .5; cursor: default; }
.send svg { stroke-width: 2.6; }
.chat-note { text-align: center; color: var(--muted); font-size: 12px; margin: 8px 0 0; }

@media (prefers-color-scheme: dark) {
  .app-nav a[aria-current=page] { background: #1f2836; }
  .msg.me .bubble { background: #253043; }
  .menu-pop { box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
}

@media (max-width: 960px) {
  .app-nav a span { display: none; }
  .app-nav a { padding: 8px 10px; }
  .hide-md { display: none !important; }
}
@media (max-width: 700px) {
  .app-nav { display: none; }
  .app-top .app-bar { justify-content: space-between; height: 58px; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 700; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar a[aria-current=page] { color: var(--accent); background: var(--blue-soft); }
  body.app, .app-chat { padding-bottom: 72px; }
  .chat-log { max-height: calc(100vh - 330px); }
  .two { grid-template-columns: 1fr; }
  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .menu-pop { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; max-width: none; }
  .brand-text { display: none; }
  .sheet { margin: auto auto 0; width: 100vw; max-width: 100vw; border-radius: 22px 22px 0 0; max-height: 85vh; }
}
