:root {
  --bg: #fbf7f4;
  --surface: #ffffff;
  --surface2: #f3ece8;
  --ink: #2b2220;
  --ink2: #5a4d49;
  --muted: #8a7c77;
  --line: #efe6e1;
  --accent: #c4787a;
  --accent-soft: #f6e3e1;
  --accent-ink: #9a5457;
  --star: #e0a43b;
  --success: #4f8a63;
  --success-soft: #e6f1e9;
  --warn: #b7791f;
  --warn-soft: #fbf0de;
  --danger: #c2514f;
  --shadow: 0 6px 22px rgba(138, 106, 96, 0.1);
  --r-s: 12px;
  --r-m: 16px;
  --r-l: 22px;
}
* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }

.page { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: 120px; }
.pad { padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.label { font-size: 12px; font-weight: 500; }
.bold { font-weight: 700; }
h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.8px; font-weight: 700; }
h2 { font-size: 21px; letter-spacing: -0.4px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.2px; }
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* loading */
.loading { min-height: 100vh; display: grid; place-items: center; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 0.3; transform: scale(0.8); } to { opacity: 1; transform: scale(1.1); } }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: rgba(251, 247, 244, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.brand { font-weight: 800; font-size: 22px; letter-spacing: -0.8px; color: var(--accent); }
.lang { display: flex; background: var(--surface2); border-radius: 999px; padding: 3px; }
.lang button { padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); }
.lang button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* hero */
.hero { position: relative; height: min(58vh, 460px); overflow: hidden; background: var(--surface2); }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: top; transform: scale(1.04); animation: kb 9s ease-out forwards; }
@keyframes kb { to { transform: scale(1); } }
.sheet-top { position: relative; margin-top: -28px; border-radius: 28px 28px 0 0; background: var(--bg); padding: 24px 20px 0; }
.pro { display: inline-flex; align-items: center; gap: 4px; background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 800; letter-spacing: 0.6px; vertical-align: middle; }
.facts { display: flex; margin-top: 16px; background: var(--surface); border-radius: var(--r-m); padding: 12px 0; box-shadow: var(--shadow); }
.facts > div { flex: 1; text-align: center; padding: 0 6px; }
.facts > div + div { border-left: 1px solid var(--line); }
.facts b { display: block; font-size: 16px; }
.facts span { font-size: 12px; color: var(--muted); }
.star { color: var(--star); }

/* tabs */
.tabs { display: flex; gap: 4px; background: var(--surface2); padding: 4px; border-radius: 999px; margin-top: 22px; position: sticky; top: 58px; z-index: 10; }
.tabs button { flex: 1; height: 38px; border-radius: 999px; font-weight: 600; color: var(--muted); transition: background 0.2s, color 0.2s; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* portfolio */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; }
.grid button { aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; background: var(--surface2); }
.grid img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.4s; }
.grid button:hover img { transform: scale(1.04); }

/* lists */
.card { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); }
.list { padding: 0 16px; }
.list > * { padding: 14px 0; }
.list > * + * { border-top: 1px solid var(--line); }
.policy { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; color: var(--ink2); font-size: 13px; }
.ico { flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-size: 14px; }
.review { padding: 14px; margin-top: 10px; }
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; background: var(--surface2); color: var(--ink2); }
.pill.ok { background: var(--success-soft); color: var(--success); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 22px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; font-size: 16px; transition: transform 0.15s, opacity 0.2s; }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn.block { width: 100%; }
.btn.small { height: 40px; padding: 0 16px; font-size: 14px; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn.wa { background: #25d366; }
.link { color: var(--accent); font-weight: 600; }

/* bottom CTA */
.cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); }
.cta .inner { max-width: 520px; margin: 0 auto; display: flex; gap: 16px; align-items: center; }
.cta .price { font-size: 22px; font-weight: 700; }

/* form */
.field { margin-top: 18px; }
.field > label, .field > .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); margin-bottom: 8px; }
.input { width: 100%; height: 50px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); padding: 0 14px; font-size: 16px; outline: none; transition: border-color 0.2s; }
.input:focus { border-color: var(--accent); }
textarea.input { height: 96px; padding: 12px 14px; resize: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; font-size: 14px; transition: background 0.2s; }
.chip.on { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.stepper { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
.stepper + .stepper { border-top: 1px solid var(--line); }
.stepper .ctl { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 18px; font-weight: 600; }
.stepper button[disabled] { opacity: 0.4; }
.stepper b { min-width: 22px; text-align: center; font-size: 17px; }
.note { margin-top: 10px; padding: 12px 14px; border-radius: var(--r-m); background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.err { color: var(--danger); font-size: 13px; margin-top: 10px; }

/* sheet */
.backdrop { position: fixed; inset: 0; background: rgba(43, 34, 32, 0.45); z-index: 50; opacity: 0; transition: opacity 0.25s; }
.backdrop.in { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: 92vh; overflow-y: auto; background: var(--bg); border-radius: 26px 26px 0 0; padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sheet.in { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
@media (min-width: 640px) { .sheet { left: 50%; width: 560px; margin-left: -280px; } }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(20, 16, 15, 0.94); display: grid; place-items: center; }
.lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lightbox button { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); font-size: 20px; }

/* status page */
.steps { display: flex; gap: 4px; margin-top: 18px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps span.on { background: var(--accent); }
.boxes { display: flex; gap: 8px; margin-top: 12px; }
.boxes > div { flex: 1; background: var(--surface); border-radius: 16px; padding: 12px; }
.boxes > div.dark { background: var(--accent); color: #fff; }
.boxes b { display: block; font-size: 17px; margin-top: 2px; }
.pay { display: flex; align-items: center; gap: 12px; }
.pay .v { font-weight: 600; word-break: break-all; }
.drop { margin-top: 14px; border: 1.5px dashed var(--accent); border-radius: 18px; padding: 16px; text-align: center; background: var(--surface); color: var(--accent-ink); cursor: pointer; display: block; }
.drop img { max-height: 140px; margin: 0 auto 8px; border-radius: 10px; }
.stars { display: flex; gap: 8px; justify-content: center; margin: 14px 0; }
.stars button { font-size: 38px; color: var(--line); transition: transform 0.15s, color 0.15s; }
.stars button.on { color: var(--star); }
.stars button:active { transform: scale(0.85); }
.done-badge { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 34px; margin: 0 auto; animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* landing */
.land-hero { padding: 26px 20px 8px; }
.land-hero h1 { font-size: 36px; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.acard img { aspect-ratio: 5/6; object-fit: cover; object-position: top; border-radius: 22px; width: 100%; background: var(--surface2); }
.acard h3 { font-size: 15px; margin-top: 8px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 40px; padding-bottom: 40px; }

#toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; transition: all 0.25s; z-index: 80; pointer-events: none; }
#toast.in { opacity: 1; transform: translate(-50%, 0); }

/* ── chat ── */
.chat { margin-top: 8px; padding: 0; overflow: hidden; scroll-margin-top: 12px; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-list { max-height: min(62vh, 560px); min-height: 180px; overflow-y: auto; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 4px; background: var(--bg); overscroll-behavior: contain; }
.chat-hint { background: var(--accent-soft); color: var(--accent-ink); border-radius: var(--r-m); padding: 12px 14px; font-size: 13px; margin-bottom: 8px; }
.chat-day { text-align: center; color: var(--muted); font-size: 12px; margin: 10px 0 4px; }
.chat-event { text-align: center; margin: 6px 0; }
.chat-event span { display: inline-block; background: var(--surface2); color: var(--ink2); border-radius: 14px; padding: 5px 12px; font-size: 12px; }
.msg { display: flex; flex-direction: column; max-width: 80%; animation: msgIn 0.22s ease-out; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.them { align-self: flex-start; align-items: flex-start; }
.msg.pending { opacity: 0.7; }
.bubble { padding: 9px 14px; border-radius: 20px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.me .bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.msg.them .bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.chat-img { display: block; width: 210px; height: 260px; border-radius: 18px; overflow: hidden; background: var(--surface2); margin-bottom: 4px; }
.chat-img img { width: 100%; height: 100%; object-fit: cover; }
.chat-meta { font-size: 11px; color: var(--muted); padding: 2px 6px 6px; }
button.chat-meta.err { color: var(--danger); text-decoration: underline; }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-compose[hidden], .chat-closed[hidden] { display: none; }
.chat-compose textarea { flex: 1; min-height: 40px; max-height: 140px; resize: none; border: 1px solid var(--line); background: var(--bg); border-radius: 20px; padding: 9px 14px; font-size: 16px; line-height: 1.35; outline: none; }
.chat-compose textarea:focus { border-color: var(--accent); }
.chat-compose .btn.small { width: 40px; height: 40px; padding: 0; font-size: 18px; flex: none; }
.chat-photo { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; cursor: pointer; font-size: 18px; }
.chat-photo:hover { background: var(--surface2); }
.chat-closed { padding: 14px 16px; text-align: center; border-top: 1px solid var(--line); }
.chat-thumb { position: relative; width: 72px; height: 90px; margin: 10px 0 0 14px; }
.chat-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.chat-thumb button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 14px; line-height: 22px; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .msg { animation: none; } }
.chat-video { width: 240px; max-width: 100%; border-radius: 18px; overflow: hidden; background: #1c1716; margin-bottom: 4px; min-height: 140px; display: grid; place-items: center; color: #fff; }
.chat-video video { width: 100%; max-height: 320px; display: block; background: #000; }
.chat-file { display: flex; align-items: center; gap: 12px; min-width: 200px; max-width: 280px; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 4px; }
.msg.me .chat-file { background: var(--accent-soft); }
.chat-file .ico { width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; flex: none; }
.msg.me .chat-file .ico { background: var(--surface); }
.chat-file .txt { display: flex; flex-direction: column; min-width: 0; }
.chat-file b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file small, .chat-thumb small { color: var(--muted); font-size: 12px; }
.chat-thumb.chip { width: auto; height: auto; max-width: 280px; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.chat-thumb.chip.video { background: #1c1716; color: #fff; border-color: #1c1716; }
.chat-thumb.chip div { display: flex; flex-direction: column; min-width: 0; }
.chat-thumb.chip b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
