/* Cheapest Food palette: chocolate brown, golden yellow, cream, pepperoni red, leaf green */
:root {
  --bg: #1c0e06;
  --surface: #2a160b;
  --surface-2: #381e10;
  --line: #4b2a16;
  --line-hi: #6b3f20;
  --text: #fff2d9;
  --muted: #c9a582;
  --accent: #ffb321;
  --accent-2: #f07c12;
  --accent-ink: #2a1407;
  --red: #d8322a;
  --ok: #8bc34a;
  --radius: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(700px 420px at 100% 0%, rgba(255, 179, 33, 0.16), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, rgba(240, 124, 18, 0.10), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 Inter, system-ui, sans-serif;
  min-height: 100vh;
}
button, input, textarea { font: inherit; color: inherit; }

.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(28, 14, 6, 0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--accent);
  margin-bottom: 24px;
}
.top-inner {
  max-width: 1180px; margin: 0 auto; padding: 10px 16px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
}
.top:empty { height: 69px; }
.logo {
  display: flex; align-items: center; gap: 10px; flex: none;
  font-family: "Lilita One", sans-serif; font-weight: 400;
  font-size: 28px; letter-spacing: 0.01em; color: var(--accent); text-decoration: none;
  text-shadow: 0 2px 0 var(--accent-ink);
}
.logo img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4)); }
.logo .dot { color: var(--text); }

.nav { display: flex; gap: 2px; justify-content: center; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; flex: none;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 13.5px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--accent); background: rgba(255, 179, 33, 0.1); }
.nav svg, .account-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }

.account-btn {
  display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 700; font-size: 14px;
  box-shadow: 0 3px 0 var(--accent-2); white-space: nowrap; max-width: 180px;
}
.account-btn .account-label { overflow: hidden; text-overflow: ellipsis; }
.account-btn.in { background: var(--surface-2); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line-hi); }
.account-btn:hover { filter: brightness(1.08); }

@media (max-width: 1080px) {
  .top-inner { grid-template-columns: 1fr auto; row-gap: 6px; padding-bottom: 6px; }
  .nav { grid-column: 1 / -1; order: 3; justify-content: flex-start; margin: 0 -16px; padding: 0 12px; }
}

.status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; flex: none; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(139, 195, 74, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(139, 195, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(139, 195, 74, 0); } }

main { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; }
main.wide { max-width: 1080px; }

h1 { font-family: "Lilita One", sans-serif; font-weight: 400; line-height: 1; color: var(--text); }
h1 span { color: var(--accent); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: clamp(30px, 6.5vw, 42px); margin: 0 0 6px; }
.page-head p { color: var(--muted); max-width: 480px; margin: 0; }
.empty { background: var(--surface); border: 1px dashed var(--line-hi); border-radius: var(--radius); padding: 48px 16px; text-align: center; color: var(--muted); }

/* home */
.banner {
  display: block; width: 100%; height: auto; aspect-ratio: 1983 / 793; object-fit: cover;
  border-radius: var(--radius); border: 2px solid var(--line);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8), 0 0 0 6px rgba(255, 179, 33, 0.06);
}
.home { text-align: center; }
.home h1 { font-size: clamp(36px, 8vw, 58px); margin: 32px 0 12px; }
.lede { color: var(--muted); font-size: 17px; max-width: 540px; margin: 0 auto 28px; }
.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 32px; text-align: left; }
.perk { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; }
.perk-big { font-family: "Lilita One", sans-serif; font-size: 26px; color: var(--accent); line-height: 1.1; margin-bottom: 6px; }
.perk p { margin: 0; color: var(--muted); font-size: 14px; }
.cta { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.order-now {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none;
  font-family: "Lilita One", sans-serif; font-size: 24px; letter-spacing: 0.01em;
  padding: 14px 30px; border-radius: 999px; box-shadow: 0 5px 0 var(--accent-2);
  transition: transform .1s, box-shadow .1s;
}
.order-now svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.order-now:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--accent-2); }
.order-now:hover svg { transform: translateX(3px); }
.order-now:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--accent-2); }

.discord {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  background: #5865f2; color: #fff; text-decoration: none; font-weight: 700; font-size: 16px;
  padding: 13px 20px; border-radius: 999px; box-shadow: 0 4px 0 #3c45a5; transition: transform .1s, box-shadow .1s;
}
.discord svg { width: 24px; height: 24px; fill: currentColor; }
.discord:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #3c45a5; }
.discord:active { transform: translateY(3px); box-shadow: 0 1px 0 #3c45a5; }
.discord.small { font-size: 14px; padding: 7px 14px; box-shadow: 0 3px 0 #3c45a5; }
.discord.small svg { width: 18px; height: 18px; }

.foot {
  max-width: 1080px; margin: 0 auto; padding: 24px 16px 32px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px;
}

@media (max-width: 600px) {
  .logo { font-size: 24px; }
  .logo img { width: 38px; height: 38px; }
  .perks { grid-template-columns: 1fr; }
  .home h1 { margin-top: 24px; }
}

.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.tabs button {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 12px; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, transform .1s;
}
.tabs button:hover { border-color: var(--line-hi); }
.tabs button:active { transform: scale(0.98); }
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 0 var(--accent-2); }
.tab-name { display: block; font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 20px; letter-spacing: 0.01em; }
.tab-sub { display: block; font-size: 12px; opacity: 0.7; margin-top: 2px; }

.chat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; height: min(640px, 72vh); overflow: hidden;
}
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.agent { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--text); overflow: hidden; flex: none; box-shadow: 0 0 0 2px var(--accent);
  font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 18px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); }
.agent-name { font-weight: 600; }
.agent-sub { font-size: 12px; color: var(--muted); }
.ghost { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; color: var(--muted); }
.ghost:hover { color: var(--text); border-color: var(--line-hi); }

.progress { height: 3px; background: var(--surface-2); }
.bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .35s ease; }

.messages { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; word-wrap: break-word; animation: pop .2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.msg.bot { background: var(--surface-2); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.user { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; align-self: flex-end; font-weight: 500; }
.msg.system { align-self: center; background: transparent; color: var(--muted); font-size: 12px; text-align: center; max-width: 100%; padding: 4px 8px; }
.msg .meta { display: block; font-size: 11px; opacity: 0.6; margin-top: 4px; }
.typing { align-self: flex-start; background: var(--surface-2); border-radius: 16px; padding: 12px 14px; display: flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: 0.25; } }

.summary { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 6px; align-self: stretch; animation: pop .2s ease-out; }
.summary h3 { margin: 8px 10px 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.row { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px; }
.row + .row { border-top: 1px solid var(--line); }
.row .k { color: var(--muted); font-size: 13px; }
.row .v { white-space: pre-wrap; word-break: break-word; }
.row .edit { background: none; border: none; color: var(--accent); font-size: 13px; cursor: pointer; padding: 0; }
.row .edit:hover { text-decoration: underline; }
.order-id { font-family: ui-monospace, Consolas, monospace; background: var(--bg); padding: 2px 6px; border-radius: 6px; }

.composer { border-top: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; cursor: pointer; transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--accent); }
.chip.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.chip.subtle { color: var(--muted); }
.input-row { display: flex; gap: 8px; align-items: flex-end; }
.input-row textarea, .input-row input {
  flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 14px; resize: none; outline: none; min-height: 44px; max-height: 160px;
}
.input-row textarea:focus, .input-row input:focus { border-color: var(--accent); }
.send {
  width: 44px; height: 44px; flex: none; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center;
}
.send:disabled { opacity: 0.4; cursor: default; }
.hint { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.hint .err { color: #ff7a6b; }

.ticket-id { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }

/* embeds (bot step cards) */
.bot-block { align-self: stretch; display: flex; flex-direction: column; gap: 8px; animation: pop .2s ease-out; max-width: 560px; }
.embed { background: var(--surface-2); border-left: 4px solid var(--accent); border-radius: 6px 12px 12px 6px; padding: 12px 16px 14px; }
.embed-title { font-weight: 700; margin-bottom: 6px; }
.embed-body { white-space: pre-wrap; word-wrap: break-word; font-size: 14px; }
.embed-body b { font-weight: 700; }
.embed-body code { font-family: ui-monospace, Consolas, monospace; background: var(--bg); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.embed-footer { margin-top: 10px; font-size: 12px; color: var(--muted); font-weight: 600; }
.embed .meta { font-size: 11px; color: var(--muted); margin-top: 6px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumbs img { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; background: var(--bg); }
.msg.user .thumbs { margin-top: 0; }
.msg.user .thumbs + span { margin-top: 6px; }
.msg.user.has-img { background: transparent; padding: 0; }
.msg.user.has-img .meta { color: var(--muted); opacity: 1; text-align: right; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { border: none; border-radius: 8px; padding: 8px 16px; font-weight: 600; font-size: 14px; cursor: pointer; transition: filter .15s, transform .1s; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; filter: none; transform: none; }
.btn.green { background: #1f8b4c; color: #fff; }
.btn.red { background: var(--red); color: #fff; }
.btn.grey { background: #5a3a24; color: #fff; }
.btn.accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 0 var(--accent-2); }
.btn.big { padding: 12px 18px; width: 100%; }

.composer .muted { color: var(--muted); font-size: 13px; text-align: center; padding: 6px 0; }
.select-row { display: flex; gap: 8px; }
.select-row select {
  flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; color: var(--text); font: inherit; outline: none;
}
.select-row select:focus { border-color: var(--accent); }
.drop {
  border: 1.5px dashed var(--line-hi); border-radius: 14px; padding: 16px; text-align: center; cursor: pointer; color: var(--muted); font-size: 13px; transition: border-color .15s, background .15s;
}
.drop strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }
.drop:hover, .chat.dragging .drop { border-color: var(--accent); background: rgba(255, 179, 33, 0.07); }

/* modal */
.modal { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-x: hidden; }
.modal::backdrop, .lightbox::backdrop { background: rgba(0, 0, 0, 0.7); }
.modal form { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.modal h2 { margin: 0; font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 24px; letter-spacing: 0.01em; color: var(--accent); }
.modal .warn { background: rgba(255, 176, 32, 0.1); border: 1px solid rgba(255, 176, 32, 0.4); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field label .req { color: #ff7a6b; }
.field input, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field .chips { margin-top: 8px; }
.field .chip { padding: 5px 11px; font-size: 13px; }
.seg { display: flex; gap: 8px; }
.seg label { flex: 1; margin: 0; position: relative; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; font-weight: 600; }
.seg input:checked + span { border-color: var(--accent); background: rgba(255, 179, 33, 0.14); color: var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.modal .err { color: #ff7a6b; font-size: 12px; margin-top: 4px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.lightbox { background: transparent; border: none; padding: 0; max-width: 92vw; max-height: 92vh; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 10px; display: block; cursor: zoom-out; }

.note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 16px; }

@media (max-width: 520px) {
  .tab-sub { display: none; }
  .tab-name { font-size: 16px; text-align: center; }
  .tabs button { padding: 12px 6px; }
  .chat { height: 70vh; }
  .msg { max-width: 90%; }
  .row { grid-template-columns: 1fr auto; }
  .row .k { grid-column: 1 / -1; }
}

/* restaurant picking (Restaurants page + order chat step 1) */
.tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  padding: 2px 7px; border-radius: 999px; background: rgba(255, 179, 33, 0.15); color: var(--accent); white-space: nowrap;
}
.tag.gl { background: rgba(139, 195, 74, 0.15); color: var(--ok); }
.pick-search {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; outline: none; color: var(--text); font: inherit;
}
.pick-search:focus { border-color: var(--accent); }
.page-head .pick-search { max-width: 260px; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; max-height: 230px; overflow-y: auto; padding-right: 2px; }
.pick {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; text-align: left;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; cursor: pointer; font-weight: 600; font-size: 14px;
  transition: border-color .15s, background .15s;
}
.pick:hover { border-color: var(--accent); background: rgba(255, 179, 33, 0.08); }
.pick[hidden] { display: none; }

.rest-group { margin-bottom: 24px; }
.rest-group h2 { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 22px; color: var(--accent); margin: 0 0 10px; }
.rest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.rest {
  display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-weight: 600;
  transition: border-color .15s, background .15s, transform .1s;
}
.rest-name { flex: 1; }
.rest-go { color: var(--muted); transition: transform .15s, color .15s; }
.rest:hover { border-color: var(--accent); background: var(--surface-2); }
.rest:hover .rest-go { color: var(--accent); transform: translateX(3px); }
.rest:active { transform: scale(0.98); }
.rest[hidden], .rest-group[hidden] { display: none; }

/* how it works */
.how { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.how-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; }
.how-card h2 { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 26px; color: var(--accent); margin: 0 0 12px; }
.how-card h2 span { color: var(--text); }
.how-card ol { list-style: none; counter-reset: s; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
/* Number badge sits in the left padding so links inside the text flow normally. */
.how-card li { counter-increment: s; position: relative; padding-left: 34px; min-height: 24px; }
.how-card li::before {
  content: counter(s); position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px;
}
.how-card a { color: var(--accent); font-weight: 600; }
.how-cta { align-self: flex-start; text-decoration: none; }
.how-cta:hover { text-decoration: underline; }

/* rules */
.rules { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.rules li {
  display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: 6px 14px 14px 6px; padding: 16px 18px; font-size: 16px;
}
.rules li:first-child { border-left-color: var(--red); }
.rule-icon { font-size: 22px; flex: none; width: 30px; text-align: center; }

@media (max-width: 600px) {
  .how { grid-template-columns: 1fr; }
  .page-head .pick-search { max-width: none; }
}

/* ---------- shared bits ---------- */
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.fine { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.fine a, .note a, .callout a, .side-head a { color: var(--accent); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.ok { background: rgba(139, 195, 74, 0.15); color: var(--ok); }
.pill.bad { background: rgba(216, 50, 42, 0.18); color: #ff8a80; }
.stars { color: var(--accent); letter-spacing: 1px; }
.callout { background: rgba(255, 179, 33, 0.08); border: 1px solid rgba(255, 179, 33, 0.3); border-radius: 14px; padding: 12px 16px; margin: 16px 0; }
.meter { height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; margin: 8px 0 4px; }
.meter > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: inherit; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.stat b { display: block; font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 28px; color: var(--accent); line-height: 1.1; }
.stat span { color: var(--muted); font-size: 13px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 28px; margin: 0; }
.section-head a { color: var(--accent); font-weight: 600; text-decoration: none; }
.more-row { text-align: center; margin-top: 16px; }
.center-cta { text-align: center; margin: 28px 0 8px; }

.toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { background: var(--surface-2); border: 1px solid var(--line-hi); border-radius: 12px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); animation: pop .2s ease-out; transition: opacity .3s; }
.toast.ok { border-color: var(--ok); }
.toast.err { border-color: var(--red); }
.toast.out { opacity: 0; }

/* ---------- home ---------- */
.trust {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 14px auto 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; width: fit-content; max-width: 100%;
  color: var(--text); text-decoration: none; font-size: 14px;
}
.trust[hidden] { display: none; }
.trust:hover { border-color: var(--accent); }
.trust b { color: var(--accent); }
.dotsep { color: var(--muted); }
.home-grid { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; margin-top: 8px; }
.home-grid .home { text-align: left; }
.home-grid .lede { margin: 0 0 24px; }
.home-grid .cta { justify-content: flex-start; }
.home-grid .note { text-align: left; }
.home-side { margin-top: 32px; }
.side-head h2 { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 26px; margin: 0 0 4px; color: var(--accent); }
.side-head p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.welcome { display: flex; flex-direction: column; gap: 10px; }
.welcome h2 { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 26px; margin: 0; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 6px; }
.mini-stats div { background: var(--bg); border-radius: 10px; padding: 10px 8px; text-align: center; }
.mini-stats b { display: block; font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 22px; color: var(--accent); }
.mini-stats span { font-size: 11px; color: var(--muted); }
.vouch-section { margin-top: 48px; }
.vouch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.vouch-grid > .empty { grid-column: 1 / -1; padding: 32px 16px; }
.vouch { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.vouch-top { display: flex; align-items: center; justify-content: space-between; }
.vouch-body { margin: 0; white-space: pre-wrap; word-wrap: break-word; flex: 1; }
.vouch-by { color: var(--muted); font-size: 13px; }
.vouch-by b { color: var(--text); }

@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; gap: 8px; }
  .home-grid .home { text-align: center; }
  .home-grid .lede { margin: 0 auto 24px; }
  .home-grid .cta { justify-content: center; }
  .home-grid .note { text-align: center; }
  .home-side { margin-top: 24px; }
}

/* ---------- auth ---------- */
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.auth-center { max-width: 420px; margin: 0 auto; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.auth-tabs button { border: none; background: none; padding: 9px; border-radius: 9px; font-weight: 700; cursor: pointer; color: var(--muted); }
.auth-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.field label > input, .field label > textarea, .field label > select { display: block; margin-top: 6px; }
.field input, .field select { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; color: var(--text); font: inherit; }
.field input:focus { border-color: var(--accent); }
.hint-s { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-err { background: rgba(216, 50, 42, 0.12); border: 1px solid rgba(216, 50, 42, 0.5); color: #ffb4ad; border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.form-err[hidden] { display: none; }
.auth-form .fine { text-align: center; }
.staff-title { font-family: "Lilita One", sans-serif; font-weight: 400; margin: 0 0 14px; color: var(--accent); }

.modal-body { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-body h2 { margin: 0; font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 24px; color: var(--accent); }
.muted-p { margin: 0; color: var(--muted); font-size: 14px; }
.key-box {
  font-family: ui-monospace, Consolas, monospace; font-size: 18px; font-weight: 700; letter-spacing: 0.04em; text-align: center;
  background: var(--bg); border: 2px dashed var(--accent); border-radius: 12px; padding: 16px 10px; color: var(--accent); user-select: all; word-break: break-all;
}
.key-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- payments ---------- */
.pay-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.pay { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; font-weight: 700; font-size: 17px; }
.pay-mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--c); color: #111; font-weight: 800; font-size: 20px; }
.pay-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-pick label { position: relative; margin: 0; }
.pay-pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pay-pick span { display: block; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-weight: 600; font-size: 14px; cursor: pointer; }
.pay-pick input:checked + span { border-color: var(--accent); background: rgba(255, 179, 33, 0.14); color: var(--accent); }
.pay-pick input:focus-visible + span { outline: 2px solid var(--accent); }

/* ---------- rewards ---------- */
.reward-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.reward { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.reward-icon { font-size: 30px; width: 52px; height: 52px; flex: none; display: grid; place-items: center; background: var(--surface-2); border-radius: 14px; }
.reward h2 { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 22px; margin: 0 0 4px; color: var(--accent); }
.reward p { margin: 0; color: var(--muted); }
.reward > div:last-child { flex: 1; min-width: 0; }
.progress-wrap { margin-top: 10px; }
.progress-wrap[hidden] { display: none; }
.progress-line span { font-size: 13px; color: var(--muted); }
.code-line { margin-top: 8px; font-size: 14px; }
.ref-code { font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: var(--accent); background: var(--bg); padding: 3px 8px; border-radius: 6px; letter-spacing: 0.06em; }
.ref-code.big { font-size: 22px; padding: 8px 14px; }
.free-count { font-size: 18px; margin: 0 0 14px; }
.free-count b { color: var(--accent); }
.referral-rules ol { margin-bottom: 0; }
.referral-rules li { font-size: 15px; }

/* ---------- account ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 18px; }
.dash-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.dash-card h3 { margin: 0 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.dash-card.highlight { background: linear-gradient(135deg, rgba(255, 179, 33, 0.18), rgba(240, 124, 18, 0.08)); border-color: rgba(255, 179, 33, 0.5); }
.big-num { font-family: "Lilita One", sans-serif; font-size: 40px; color: var(--accent); line-height: 1; }
.big-num.sm { font-size: 28px; }
.dash-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.dash-section h2 { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 24px; color: var(--accent); margin: 0 0 4px; }
.ref-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.inline-form { margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.inline-form .row { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input, .inline-form select { flex: 1; min-width: 140px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: none; color: var(--text); font: inherit; }
.inline-form input:focus { border-color: var(--accent); }
.ref-list, .order-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.ref-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--bg); border-radius: 10px; padding: 10px 12px; flex-wrap: wrap; }
.ref-list.big li { padding: 12px 14px; }
.ref-list li p { margin: 4px 0 0; }
.ref-list li.dim { opacity: 0.55; }
.order-row { background: var(--bg); border-radius: 12px; padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.order-main { min-width: 0; }
.vouched { color: var(--ok); }
.vouch-form { flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.vouch-form textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; resize: vertical; }
.vouch-form textarea:focus { border-color: var(--accent); }
.vouch-form .btn { align-self: flex-start; }
.star-pick { display: flex; gap: 2px; }
.star-pick button { background: none; border: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--line-hi); padding: 2px; }
.star-pick button.on { color: var(--accent); }
.pw-form { display: grid; gap: 12px; max-width: 360px; margin-top: 12px; }
.pw-form .btn { justify-self: start; }

/* ---------- order chat additions ---------- */
.msg.chef { border: 1px solid rgba(255, 179, 33, 0.4); }
.msg.chef .who { display: block; font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.end-row { display: flex; gap: 8px; }
.end-row > * { flex: 1; }

/* ---------- staff ---------- */
.staff-badge { font-family: Inter, sans-serif; font-size: 12px; background: var(--red); color: #fff; padding: 2px 8px; border-radius: 999px; vertical-align: middle; text-shadow: none; }
.staff-body .top-inner { grid-template-columns: 1fr auto; }
.staff-who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.staff-tabs, .seg-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.staff-tabs button, .seg-tabs button { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.staff-tabs button[aria-selected="true"], .seg-tabs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.seg-tabs { margin: 0; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .pick-search { flex: 1; min-width: 200px; }
.split { display: grid; grid-template-columns: 340px 1fr; gap: 14px; align-items: start; }
.staff-list { display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow-y: auto; }
.staff-list .empty { padding: 24px 12px; }
.row-btn { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.row-btn:hover { border-color: var(--accent); }
.row-btn .fine { margin: 0; font-size: 12px; }
.row-btn .tag, .row-btn .pill { margin-left: 6px; }
.staff-detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.staff-detail h2 { margin: 0 0 12px; font-size: 20px; }
.staff-detail h3 { margin: 18px 0 6px; font-size: 15px; color: var(--accent); }
.staff-detail .actions { margin: 12px 0; }
.staff-panel > h2 { font-family: "Lilita One", sans-serif; font-weight: 400; color: var(--accent); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; white-space: pre-wrap; }
.thread { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.tmsg { background: var(--bg); border-radius: 10px; padding: 8px 12px; }
.tmsg.staff { border-left: 3px solid var(--accent); }
.tmsg.system { opacity: 0.7; }
.tmsg .fine { margin: 0 0 2px; display: block; font-size: 11px; }
.reply { display: flex; gap: 8px; margin-top: 10px; }
.reply textarea { flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: none; resize: vertical; }

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .staff-list { max-height: 40vh; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 6px; }
  .reward { flex-direction: column; gap: 10px; }
}

/* ---------- live chat widget ---------- */
.lc-launch {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  display: flex; align-items: center; gap: 8px; border: none; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 15px;
  padding: 12px 18px; border-radius: 999px; box-shadow: 0 4px 0 var(--accent-2), 0 12px 30px rgba(0, 0, 0, 0.45);
  transition: transform .12s;
}
.lc-launch:hover { transform: translateY(-2px); }
.lc-launch.on { background: var(--surface-2); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line-hi), 0 12px 30px rgba(0, 0, 0, 0.45); }
.lc-dot { width: 9px; height: 9px; border-radius: 50%; background: #3fbf3f; box-shadow: 0 0 0 0 rgba(63, 191, 63, 0.7); animation: pulse 2s infinite; }
.lc-badge { background: var(--red); color: #fff; font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0 5px; }
.lc-badge[hidden] { display: none; }
.lc-panel {
  position: fixed; right: 18px; bottom: 80px; z-index: 50; width: min(360px, calc(100vw - 24px)); height: min(480px, calc(100vh - 120px));
  background: var(--surface); border: 1px solid var(--line-hi); border-radius: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex; flex-direction: column; overflow: hidden; animation: pop .18s ease-out;
}
.lc-panel[hidden] { display: none; }
.lc-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.lc-head b { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 18px; color: var(--accent); }
.lc-online { color: var(--muted); font-size: 12px; }
.lc-x { background: none; border: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.lc-x:hover { color: var(--text); }
.lc-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.lc-msg { background: var(--surface-2); border-radius: 12px; padding: 7px 11px; max-width: 88%; align-self: flex-start; word-wrap: break-word; }
.lc-msg.mine { align-self: flex-end; background: rgba(255, 179, 33, 0.16); }
.lc-meta { font-size: 11px; color: var(--muted); }
.lc-meta b { color: var(--accent); font-size: 12px; }
.lc-text { font-size: 14px; white-space: pre-wrap; }
.lc-empty { color: var(--muted); text-align: center; margin: auto 0; font-size: 14px; }
.lc-foot { border-top: 1px solid var(--line); padding: 10px; }
.lc-form { display: flex; gap: 8px; }
.lc-form input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: none; color: var(--text); font: inherit; }
.lc-form input:focus { border-color: var(--accent); }
.lc-gate { text-align: center; }
.lc-gate p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }

/* On the order page keep the launcher clear of the ticket's send button. */
body[data-page="order.html"] .lc-launch { right: auto; left: 18px; }
body[data-page="order.html"] .lc-panel { right: auto; left: 18px; }
@media (max-width: 600px) {
  .lc-launch { padding: 10px 14px; font-size: 14px; right: 12px; bottom: 12px; }
  body[data-page="order.html"] .lc-launch { left: 12px; }
  .lc-panel { right: 12px; bottom: 68px; }
  body[data-page="order.html"] .lc-panel { left: 12px; }
}

/* ---------- my orders ---------- */
.order-cards { display: flex; flex-direction: column; gap: 12px; }
.order-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.order-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.order-id { font-family: ui-monospace, Consolas, monospace; color: var(--accent); }
.order-what { font-weight: 600; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.kv-row { background: var(--bg); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.kv-row span { color: var(--muted); font-size: 12px; }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.order-actions:empty { display: none; }
.center { text-align: center; }
.complete-form .row { align-items: flex-end; }
.complete-form label.mini { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); flex: 1; min-width: 110px; }
.complete-form label.mini.wide { flex: 3; min-width: 200px; }
.complete-form .btn { align-self: flex-start; }

/* order page login gate */
.gate { display: flex; flex-direction: column; gap: 14px; max-width: 460px; width: 100%; align-self: center; }

/* tracking info window */
.track-text { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px; white-space: pre-wrap; word-break: break-word; user-select: text; max-height: 50vh; overflow-y: auto; font-size: 15px; line-height: 1.5; }
.track-text a { color: var(--accent); }
.complete-form textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; color: var(--text); font: inherit; resize: vertical; }
