:root {
  --bg: #16110e; --card: #211a16; --card2: #2a211c; --text: #fbf3ec; --mut: #bfae9f; --line: #3a2f28;
  --brand: #ff6b2c; --brand2: #ffb534; --ok: #3ccf8e; --bad: #ff5a5a; --warn: #ffc23d;
  --radius: 16px; --shadow: 0 10px 30px rgba(0,0,0,.35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body { font: 16px/1.45 var(--font); background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--brand2); }
button { font: inherit; color: inherit; }
.hide { display: none !important; }
.mut { color: var(--mut); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.center { text-align: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--card2);
  color: var(--text); padding: 11px 16px; border-radius: 12px; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 44px; transition: transform .08s, border-color .15s, background .15s; }
.btn:active { transform: scale(.97); }
.btn:hover { border-color: var(--brand); }
.btn.pri { background: linear-gradient(135deg, var(--brand), #ff8d3a); color: #1a0f08; border: 0; }
.btn.wa { background: #25d366; color: #062b14; border: 0; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--card2); display: grid; place-items: center; cursor: pointer; font-size: 18px; }

label.f { display: block; font-size: 13px; color: var(--mut); margin: 0 0 6px; font-weight: 600; }
.input, input:not([type]), input[type=text], input[type=number], input[type=tel], input[type=email], input[type=search], input[type=date], input[type=time], input[type=url], select, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 12px 13px; font: inherit; min-height: 46px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,107,44,.18); }
textarea { min-height: 84px; resize: vertical; }
.hint { font-size: 12.5px; color: var(--mut); margin-top: 6px; }
.field { margin-bottom: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 14px; }
.card h3 { margin: 0 0 10px; font-size: 16px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 12px; background: var(--card2); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { color: var(--ok); } .pill.bad { color: var(--bad); } .pill.warn { color: var(--warn); }

/* switch */
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; }
.chip.on { background: var(--brand); color: #1a0f08; border-color: var(--brand); }

/* sheet / modal */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 60; display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; backdrop-filter: blur(2px); }
.overlay.show { opacity: 1; }
.sheet { background: var(--card); width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(30px); transition: transform .22s; border: 1px solid var(--line); border-bottom: 0; }
.overlay.show .sheet { transform: none; }
.sheet .grab { width: 44px; height: 5px; background: var(--line); border-radius: 9px; margin: -6px auto 12px; }
.sheet h2 { margin: 0 0 14px; font-size: 20px; }
@media (min-width: 700px) { .overlay { align-items: center; } .sheet { border-radius: 22px; border-bottom: 1px solid var(--line); } }

#cb-toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: #2c2420; color: #fff; border: 1px solid var(--brand);
  padding: 11px 16px; border-radius: 12px; z-index: 99; opacity: 0; pointer-events: none; transition: .25s; max-width: 90vw; text-align: center; box-shadow: var(--shadow); font-weight: 600; }
#cb-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* splash */
#splash { position: fixed; inset: 0; z-index: 100; background: radial-gradient(circle at 50% 40%, #2a1d16 0%, #120d0a 70%); display: grid; place-items: center; transition: opacity .45s ease, visibility .45s; }
#splash.done { opacity: 0; visibility: hidden; }
#splash .mark { width: 128px; height: 128px; animation: pop .7s cubic-bezier(.2,1.4,.4,1) both; filter: drop-shadow(0 18px 40px rgba(255,107,44,.35)); }
#splash .mark .steam path { stroke-dasharray: 120; stroke-dashoffset: 120; animation: steam 1s .35s ease forwards, float 2.4s 1.35s ease-in-out infinite; }
#splash .mark .steam path:nth-child(2) { animation-delay: .5s, 1.5s; }
#splash .mark .steam path:nth-child(3) { animation-delay: .65s, 1.65s; }
#splash .word { margin-top: 18px; font: 700 30px/1 var(--display); letter-spacing: .01em; text-align: center; opacity: 0; animation: rise .6s .55s ease forwards; }
#splash .word span { color: var(--brand2); font-weight: 400; font-style: italic; }
#splash .tag { margin-top: 8px; font-size: 13px; color: var(--mut); letter-spacing: .14em; text-transform: uppercase; text-align: center; opacity: 0; animation: rise .6s .8s ease forwards; }
@keyframes pop { from { transform: scale(.4) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes steam { to { stroke-dashoffset: 0; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
