/* ==========================================================================
   Marksy prototype styles. Tokens live in index.html (:root).
   Screens are mobile-first and switch to desktop layouts through the
   `app` container (the device frame), not the browser viewport.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--lantern); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--leaf); }
.ic { flex-shrink: 0; display: block; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.pad { padding: 24px 16px; }
.hstack { display: flex; align-items: center; gap: 12px; }
.hstack.tight { gap: 8px; }
.hstack.wrap { flex-wrap: wrap; }
.stack-c { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.chili-text { color: var(--chili) !important; }
.h-display { font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.25; letter-spacing: -.005em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--lantern-ink); }
.eyebrow.light { color: var(--glow); }
.link-btn { color: var(--leaf); font-weight: 600; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.sel-all { user-select: all; }

/* ---------- prototype shell ---------- */
.proto { height: 100%; display: flex; flex-direction: column; background: var(--shell); color: var(--shell-ink); }
.pbar { flex-shrink: 0; padding: 12px 16px 8px; border-bottom: 1px solid var(--shell-line); display: flex; flex-direction: column; gap: 8px; background: var(--shell); }
.pbar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pbar-brand { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.proto-tag { font: 600 12px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--shell-ink-2); border: 1px solid var(--shell-line); padding: 2px 8px; border-radius: 9999px; }
.pbar .seg { background: var(--shell-2); border-color: var(--shell-line); }
.pbar .seg button { color: var(--shell-ink-2); }
.pbar .seg button.on { background: var(--shell-ink); color: var(--shell); box-shadow: none; }
.pbar-tools { display: flex; align-items: center; gap: 8px; }
.pbar .icon-btn { color: var(--shell-ink-2); }
.pbar .icon-btn:hover, .pbar .icon-btn.on { background: var(--shell-2); color: var(--glow); }
.pbar .logo-word { color: var(--shell-ink); }
.reset { height: 34px; min-width: 34px; display: inline-grid; place-items: center; border-radius: 8px; color: var(--shell-ink-2); padding: 0 8px; font-size: 12px; font-weight: 600; }
.reset:hover { background: var(--shell-2); }
.reset.on { background: var(--chili); color: #fff; }
.pbar-steps { display: flex; align-items: center; gap: 8px; }
.step-select { position: relative; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 8px; background: var(--shell-2); border: 1px solid var(--shell-line); min-width: 0; flex: 0 1 300px; }
.step-select .mono { color: var(--glow); font-size: 12px; }
.step-select select { appearance: none; background: transparent; border: 0; color: var(--shell-ink); font-weight: 600; flex: 1; min-width: 0; cursor: pointer; padding-right: 4px; }
.step-select select option { color: #111; background: #fff; }
.step-dots { display: flex; gap: 4px; margin-left: 8px; flex-wrap: wrap; }
.step-dots button { width: 22px; height: 6px; border-radius: 4px; background: var(--shell-line); }
.step-dots button.past { background: #5A5F5B; }
.step-dots button.on { background: var(--glow); }
.stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; padding: 12px; background: var(--shell); position: relative; }
.stage.flow-stage { place-items: stretch; overflow: auto; padding: 0; }
/* full screen: no prototype bar, the device gets the whole window */
.presenting .stage { padding: 0; }
.present-ctrl { position: fixed; z-index: 100; top: calc(10px + env(safe-area-inset-top, 0px)); right: 10px; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; background: rgba(24,24,24,.82); backdrop-filter: blur(10px); box-shadow: 0 6px 20px -8px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); opacity: .55; transition: opacity 0.2s var(--ease); }
.present-ctrl:hover, .present-ctrl:focus-within { opacity: 1; }
.present-ctrl .icon-btn { color: var(--shell-ink); }
.present-ctrl .icon-btn:hover:not(:disabled) { background: var(--shell-2); color: var(--glow); }
.present-ctrl .mono { font-size: 12px; color: var(--shell-ink-2); padding: 0 4px; }
@media (hover: none) { .present-ctrl { opacity: .9; } }
@media (max-height: 640px) {
  .pbar { padding: 8px 12px; gap: 4px; }
  .step-dots { display: none; }
  .stage { padding: 0; }
}
/* dev handoff: a drawer on the right with the current screen's HTML / CSS / tokens */
.dev-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--shell-line); color: var(--shell-ink); font: 600 12px var(--f-ui); }
.dev-btn:hover, .dev-btn.on { background: var(--shell-2); color: var(--glow); border-color: #313131; }
.devp-scrim { position: fixed; inset: 0; z-index: 190; background: rgba(0,0,0,.35); }
.devp { position: fixed; z-index: 200; top: 10px; right: 10px; bottom: 10px; width: min(620px, calc(100vw - 20px)); display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: var(--shell); color: var(--shell-ink); border: 1px solid var(--shell-line); box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); animation: devp-in 0.2s var(--ease); }
@keyframes devp-in { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.devp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.devp-head b { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.devp-head small { display: block; margin-top: 2px; font-size: 12px; color: var(--shell-ink-2); }
.devp .icon-btn { color: var(--shell-ink-2); }
.devp .icon-btn:hover { background: var(--shell-2); color: var(--glow); }
.devp .seg { background: var(--shell-2); border-color: var(--shell-line); }
.devp .seg button { color: var(--shell-ink-2); }
.devp .seg button.on { background: var(--shell-ink); color: var(--shell); box-shadow: none; }
.devp-bar { display: flex; align-items: center; gap: 8px; }
.devp-tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--shell-line); flex-wrap: wrap; }
.devp-tabs > button { height: 36px; padding: 0 12px; font: 600 12px var(--f-ui); color: var(--shell-ink-2); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.devp-tabs > button.on { color: var(--glow); border-bottom-color: var(--glow); }
.devp-scope { margin-left: auto; padding-bottom: 4px; }
.devp-pick { display: flex; align-items: center; gap: 4px; }
.devp-select { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; height: 44px; border-radius: 12px; background: var(--shell-2); border: 1px solid var(--shell-line); }
.devp-select:focus-within { outline: 2px solid var(--lantern); outline-offset: 1px; }
.devp-select select { appearance: none; -webkit-appearance: none; flex: 1; min-width: 0; height: 100%; padding: 0 32px 0 8px; border: 0; background: transparent; color: var(--shell-ink); font: 600 14px var(--f-ui); cursor: pointer; outline: none; text-overflow: ellipsis; }
.devp-select select option, .devp-select select optgroup { background: var(--shell); color: var(--shell-ink); }
.devp-select > .ic { position: absolute; right: 10px; pointer-events: none; color: var(--shell-ink-2); }
.devp-lang { flex-shrink: 0; margin-left: 8px; padding: 4px 8px; border-radius: 8px; font: 700 12px var(--f-mono); letter-spacing: .03em; background: #272727; color: #D9E4D6; }
.devp-lang.l-html { background: #E4572E; color: #fff; }
.devp-lang.l-css { background: #2D6FD6; color: #fff; }
.devp-lang.l-javascript { background: #F0D43A; color: #1D1A05; }
.devp-lang.l-json { background: #6F8F2C; color: #fff; }
.devp-lang.l-svg { background: #E9A23B; color: #2B1A02; }
.devp-why { margin: -2px 2px 0; font-size: 12px; color: var(--shell-ink-2); line-height: 1.45; }
.devp-why b { font-family: var(--f-mono); color: var(--shell-ink); font-weight: 600; }
.devp-code { flex: 1; min-height: 0; width: 100%; resize: none; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--shell-line); background: #000000; color: #D9E4D6; font: 12px/1.55 var(--f-mono); tab-size: 2; white-space: pre; overflow: auto; }
.devp-code:focus { outline: 2px solid var(--lantern); outline-offset: 1px; }
.devp-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.devp-foot .mono { font-size: 12px; color: var(--shell-ink-2); }
.devp-sp { flex: 1; }
.devp .btn.ghost { color: var(--shell-ink); border-color: var(--shell-line); background: transparent; }
.devp .btn.ghost:hover { background: var(--shell-2); }
.devp-tip { font-size: 12px; color: var(--shell-ink-2); line-height: 1.5; }
.devp-tip code { font-family: var(--f-mono); color: var(--glow); }
/* phone: one slim row (logo · journey · menu); the menu opens tools and page steps */
.pbar.narrow { padding: 8px 12px; gap: 8px; }
.pbar.narrow .pbar-row { flex-wrap: nowrap; gap: 8px; }
.pbar.narrow .pbar-brand { margin-right: 0; }
.pbar.narrow .pbar-brand .logo-word { display: none; }
.pbar.narrow > .pbar-row > .seg { flex: 1; min-width: 0; }
.pbar.narrow > .pbar-row > .seg button { flex: 1; padding-inline: 8px; height: 32px; font-size: 12px; }
.pbar.narrow .pbar-more { flex-shrink: 0; }
.pbar.narrow:not(.folded) .pbar-row { flex-wrap: wrap; }
.pbar.narrow .pbar-tools { width: 100%; justify-content: space-between; order: 3; padding-top: 4px; border-top: 1px solid var(--shell-line); }
@media (max-width: 639px) {
  .pbar { padding: 8px 12px 8px; }
  .pbar-brand .proto-tag { display: none; }
  .step-dots { display: none; }
  .step-select { flex: 1; }
  .stage { padding: 0; }
}

/* ---------- device frames ---------- */
.dev-sizer { position: relative; flex-shrink: 0; }
.dev { position: absolute; top: 0; left: 0; transform-origin: top left; display: flex; flex-direction: column; overflow: hidden; }
.dev.desktop { border-radius: 12px; background: var(--paper); box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 40px 80px -30px rgba(0,0,0,.8); }
.win-bar { height: 42px; flex-shrink: 0; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--paper-2); border-bottom: 1px solid var(--line); color: var(--ink-3); }
.win-dots { display: flex; gap: 8px; }
.win-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.win-dots i:first-child { background: #E36B5B; } .win-dots i:nth-child(2) { background: #E8B44A; } .win-dots i:nth-child(3) { background: #5DB284; }
.win-nav { display: flex; gap: 8px; align-items: center; }
.url { display: inline-flex; align-items: center; gap: 8px; font: 12px var(--f-mono); color: var(--ink-2); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.win-bar .url { flex: 0 1 560px; }
.url b { font-weight: 500; color: var(--ink); }
.win-sp { flex: 1; }
.dev.mobile { background: #070C0A; border-radius: 24px; padding: 12px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), inset 0 0 0 2px #1d2a24, 0 40px 80px -30px rgba(0,0,0,.85); }
.dev.mobile .phone-top { background: var(--paper-2); border-radius: 24px 24px 0 0; flex-shrink: 0; }
.phone-status { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px 0 32px; font-size: 14px; font-weight: 600; color: var(--ink); }
.notch { width: 108px; height: 30px; border-radius: 24px; background: #070C0A; }
.sig { display: flex; align-items: flex-end; gap: 2px; }
.sig i { width: 3px; background: var(--ink); border-radius: 2px; }
.sig i:nth-child(1) { height: 5px; } .sig i:nth-child(2) { height: 8px; } .sig i:nth-child(3) { height: 11px; }
.sig b { width: 22px; height: 11px; border: 1.5px solid var(--ink); border-radius: 4px; margin-left: 8px; position: relative; }
.sig b::after { content: ""; position: absolute; inset: 1.5px 6px 1.5px 1.5px; background: var(--ink); border-radius: 2px; }
.phone-url { padding: 2px 12px 8px; border-bottom: 1px solid var(--line); }
.phone-url .url { width: 100%; justify-content: center; border-radius: 12px; font-size: 12px; padding: 8px 12px; }
.dev.mobile .device-screen { border-radius: 0 0 24px 24px; }
.home-ind { position: absolute; bottom: 20px; left: 50%; width: 120px; height: 4px; margin-left: -64px; border-radius: 4px; background: var(--ink); opacity: .35; z-index: 60; pointer-events: none; }
.dev.bare, .dev-sizer.bare { border-radius: 0; padding: 0; box-shadow: none; background: var(--paper); }
.dev.bare .phone-top { border-radius: 0; }
.dev.bare .device-screen { border-radius: 0; }
.device-screen { flex: 1; min-height: 0; position: relative; overflow: hidden; container: app / inline-size; background: var(--paper); color: var(--ink); font-size: 14px; line-height: 1.5; }
.device-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 50; }
.device-overlay > * { pointer-events: auto; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--night); position: relative; display: inline-grid; place-items: center; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.logo-mark::before { content: ""; position: absolute; left: 3px; right: 3px; top: 7px; height: 8px; border-top: 1.5px solid rgba(255,230,180,.6); border-radius: 50% 50% 0 0 / 100% 100% 0 0; transform: scaleY(-1); }
.logo-mark i { width: 7px; height: 7px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 8px 2px rgba(255,190,90,.75); margin-top: 8px; }
.logo-word { font-family: var(--f-display); font-size: 18px; letter-spacing: -.01em; color: var(--ink); line-height: 1; }
.logo.small .logo-mark { width: 22px; height: 22px; border-radius: 8px; }
.logo.small .logo-word { font-size: 16px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 12px; font-weight: 600; font-size: 14px; white-space: nowrap; background: var(--card); color: var(--ink); border: 1px solid var(--line-2); text-decoration: none; transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease); cursor: pointer; }
.btn:hover:not(:disabled) { border-color: var(--ink-3); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; }
.btn.primary { background: var(--leaf); color: var(--leaf-ink); border-color: transparent; }
.btn.primary:hover:not(:disabled) { background: var(--leaf-hover); }
.btn.lantern { background: var(--lantern); color: #2B1A02; border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover:not(:disabled) { background: var(--paper-2); border-color: transparent; }
.btn.danger { background: var(--chili); color: #fff; border-color: transparent; }
.btn.danger-ghost { background: transparent; border-color: transparent; color: var(--chili); }
.btn.danger-ghost:hover { background: var(--chili-soft); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 8px; gap: 4px; }
.btn.lg { height: 48px; padding: 0 24px; font-size: 14px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; color: var(--ink-2); flex-shrink: 0; position: relative; }
.icon-btn:hover:not(:disabled) { background: var(--paper-2); color: var(--ink); }
.icon-btn.on { background: var(--leaf-soft); color: var(--leaf); }
.icon-btn:disabled { opacity: .35; }
.icon-btn.has-dot::after { content: ""; position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--chili); box-shadow: 0 0 0 2px var(--paper); }
.line-btn { background: #06C755 !important; color: #fff !important; border-color: transparent !important; }
.proto-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; border: 1.5px dashed var(--lantern); background: var(--lantern-soft); color: var(--lantern-ink); text-align: left; font-weight: 600; font-size: 12px; }
.proto-btn small { display: block; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; opacity: .75; }
.proto-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- chips, pills, seg, tabs ---------- */
.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 9999px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip:hover { border-color: var(--ink-3); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-count { font: 600 12px var(--f-mono); background: var(--paper-2); color: var(--ink-2); border-radius: 9999px; padding: 2px 8px; }
.chip.on .chip-count { background: rgba(255,255,255,.18); color: inherit; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; min-width: 0; padding-bottom: 2px; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chips-wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 9999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--paper-2); color: var(--ink-2); }
.pill.pending, .pill.verifying, .pill.offered { background: var(--lantern-soft); color: var(--lantern-ink); }
.pill.approved, .pill.deposit, .pill.open { background: var(--leaf-soft); color: var(--leaf); }
.pill.paid { background: var(--leaf); color: var(--leaf-ink); }
.pill.overdue, .pill.rejected, .pill.expired { background: var(--chili-soft); color: var(--chili-ink); }
.pill.waitlist { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.seg.sm button { height: 26px; padding: 0 8px; font-size: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; font-weight: 600; font-size: 12px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tab.on { color: var(--ink); border-color: var(--leaf); }
.tab-count { font: 600 12px var(--f-mono); background: var(--paper-2); padding: 2px 8px; border-radius: 9999px; color: var(--ink-2); }
.tab.on .tab-count { background: var(--leaf-soft); color: var(--leaf); }
.countdown { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 9999px; background: var(--lantern-soft); color: var(--lantern-ink); font: 600 12px var(--f-mono); white-space: nowrap; }
.countdown.urgent { background: var(--chili-soft); color: var(--chili-ink); animation: pulse 2s infinite; }
.countdown.over { background: var(--chili); color: #fff; }
.countdown.big { height: auto; padding: 8px 16px; font-size: 20px; border-radius: 12px; gap: 8px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--chili) 18%, transparent); } }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field-label .opt { font-weight: 400; color: var(--ink-3); }
.field-hint { font-size: 12px; color: var(--ink-3); }
.input { width: 100%; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); min-width: 0; }
textarea.input { height: auto; padding: 12px 12px; resize: vertical; line-height: 1.5; }
.input.lg { height: 46px; font-size: 16px; font-weight: 600; }
.input:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 3px color-mix(in srgb, var(--leaf) 20%, transparent); }
.input.bare { border-color: transparent; background: transparent; height: 32px; padding: 0 8px; font-weight: 600; }
.input.bare:focus { background: var(--card); }
.input-wrap { position: relative; }
.verified { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 600; color: var(--leaf); }
.num { display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); overflow: hidden; min-width: 0; width: 100%; }
.num input { border: 0; background: transparent; width: 100%; min-width: 0; height: 100%; padding: 0 4px 0 12px; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.num input:focus { outline: none; }
.num:focus-within { border-color: var(--leaf); }
.num span { padding: 0 8px 0 2px; color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.num.lg { height: 48px; font-size: 18px; }
.switch-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 8px 0; cursor: pointer; }
.switch-text { display: flex; flex-direction: column; min-width: 0; }
.switch-text span { font-weight: 500; }
.switch-text small { color: var(--ink-3); font-size: 12px; }
.switch { appearance: none; width: 40px; height: 24px; border-radius: 9999px; background: var(--line-2); position: relative; flex-shrink: 0; cursor: pointer; transition: background 0.2s var(--ease); margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform 0.2s var(--ease); }
.switch:checked { background: var(--leaf); }
.switch:checked::after { transform: translateX(16px); }
.switch:disabled { opacity: .45; }
.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding: 8px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--leaf); margin: 2px 0 0; flex-shrink: 0; }
.range-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; font-size: 12px; }
.range-row input { accent-color: var(--leaf); width: 100%; }
.meter { height: 8px; border-radius: 9999px; background: var(--paper-2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.meter.thin { height: 4px; }
.meter i { display: block; height: 100%; background: var(--leaf); border-radius: inherit; }
.meter.lantern i { background: var(--lantern); }
.meter.chili i { background: var(--chili); }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink-3); min-width: 0; }
.search input { border: 0; background: transparent; outline: none; min-width: 0; flex: 1; color: var(--ink); }
.search.big { height: 48px; border-radius: 16px; font-size: 14px; }

/* ---------- surfaces ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel h3 { font-size: 14px; font-weight: 600; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.stat-value { font: 600 20px var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-sub { font-size: 12px; color: var(--ink-3); }
.stat.leaf .stat-value { color: var(--leaf); }
.stat.lantern { border-color: color-mix(in srgb, var(--lantern) 50%, var(--line)); }
.stat.lantern .stat-value { color: var(--lantern-ink); }
.stat.chili { border-color: color-mix(in srgb, var(--chili) 50%, var(--line)); }
.stat.chili .stat-value { color: var(--chili); }
.callout { display: flex; gap: 12px; padding: 16px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); align-items: flex-start; }
.callout > .ic { color: var(--leaf); margin-top: 2px; }
.callout div { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.callout p { color: var(--ink-2); font-size: 12px; }
.callout.warn { background: var(--chili-soft); border-color: transparent; }
.callout.warn > .ic { color: var(--chili); }
.callout.soft { background: var(--leaf-soft); border-color: transparent; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 16px; color: var(--ink-2); }
.empty-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-3); margin-bottom: 4px; }
.empty h4 { font-size: 14px; color: var(--ink); }
.empty p { max-width: 34ch; font-size: 12px; }
.ux-note { background: color-mix(in srgb, var(--lantern-soft) 70%, var(--card)); border: 1px dashed color-mix(in srgb, var(--lantern) 70%, transparent); border-radius: 12px; padding: 12px 16px; font-size: 12px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.ux-note b { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--lantern-ink); }
.table-wrap { overflow-x: auto; min-width: 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.zdot { display: inline-block; width: 10px; height: 10px; border-radius: 4px; background: var(--zc); margin-right: 8px; vertical-align: -1px; }

/* shop tile & photo placeholders */
.shop-tile { flex-shrink: 0; display: inline-grid; place-items: center; border-radius: 12px; font-weight: 700; color: hsl(var(--h) 45% 22%); background: hsl(var(--h) 60% 82%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); letter-spacing: -.02em; }
.photo { aspect-ratio: 4 / 3; border-radius: 12px; background-size: cover; background-position: center; max-width: 100%; }
.photo.ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: hsl(var(--h) 40% 25%); background: hsl(var(--h) 60% 82%); font-size: 12px; font-weight: 600; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--lantern-soft); color: var(--lantern-ink); font-weight: 700; font-size: 12px; flex-shrink: 0; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }

/* string lights */
.lights { position: absolute; left: 0; right: 0; top: 0; height: 30px; color: rgba(255,230,180,.35); pointer-events: none; }
.lights svg { position: absolute; inset: 0; width: 100%; height: 24px; }
.lights i { position: absolute; width: 7px; height: 7px; margin-left: -4px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 10px 3px rgba(255,190,90,.55); animation: twinkle 3.2s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .55; box-shadow: 0 0 5px 1px rgba(255,190,90,.35); } }

/* cover art: night market with tents */
.cover { position: relative; background: color-mix(in srgb, hsl(var(--h) 45% 30%) 45%, var(--night)); color: #FFF4DE; overflow: hidden; min-height: 150px; }
.cover-tents { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 48px; fill: rgba(0,0,0,.35); }
.cover.small { min-height: 104px; border-radius: 12px 12px 0 0; }
.cover-title { position: absolute; left: 14px; bottom: 14px; right: 14px; font-family: var(--f-display); font-size: 18px; line-height: 1.25; text-shadow: 0 2px 10px rgba(0,0,0,.5); }

/* modal → bottom sheet on narrow frames */
.scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade 0.2s var(--ease); }
.modal { position: absolute; left: 0; right: 0; bottom: 0; max-height: 90%; display: flex; flex-direction: column; background: var(--card); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-lg); animation: rise .2s var(--ease); color: var(--ink); }
.modal-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 8px auto 0; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 16px 8px; }
.modal-head h3 { font-size: 16px; font-weight: 600; }
.modal-head p { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.modal-body { padding: 8px 16px 16px; overflow: auto; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@container app (min-width: 760px) {
  .modal { left: 50%; top: 50%; bottom: auto; right: auto; width: min(520px, 92%); max-height: 86%; transform: translate(-50%, -50%); border-radius: 16px; animation: pop 0.2s var(--ease); }
  .modal.wide { width: min(860px, 94%); }
  .modal-grip { display: none; }
  .modal-head { padding-top: 16px; }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } }
}

/* toast & LINE push */
.toast { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 500; box-shadow: var(--shadow-lg); animation: rise .2s var(--ease); width: max-content; }
.toast .ic { color: var(--leaf-soft); }
.toast.warn .ic { color: var(--lantern); }
.toast button { color: var(--glow); font-weight: 700; white-space: nowrap; padding-left: 8px; border-left: 1px solid rgba(255,255,255,.2); }
.flow-toast { position: fixed; left: 0; right: 0; bottom: 24px; height: 0; }
.push { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(16px); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); animation: drop .35s cubic-bezier(.2,.9,.3,1.2); color: var(--ink); }
.push-app { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink-3); margin-bottom: 2px; }
.push-app small { margin-left: auto; font-weight: 400; }
.push-ic { width: 18px; height: 18px; border-radius: 6px; background: #06C755; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.push b { font-size: 14px; }
.push span:last-child { font-size: 12px; color: var(--ink-2); }
@keyframes drop { from { transform: translateY(-120%); } }
@container app (min-width: 760px) { .push { left: auto; width: 360px; right: 16px; top: 16px; } .toast { bottom: 28px; } }

/* hotspot hints */
.show-hot [data-hot] { animation: hot 1.6s ease-in-out infinite; }
@keyframes hot { 0%, 100% { box-shadow: 0 0 0 0 rgba(242,176,76,.0); } 50% { box-shadow: 0 0 0 5px rgba(242,176,76,.55); } }

/* shared bottom tab bar (mobile web nav) */
.tabbar { display: flex; flex-shrink: 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--card) 94%, transparent); padding: 8px 4px 16px; }
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 4px 2px; min-width: 0; }
.tab-item span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tab-item.on { color: var(--leaf); }
.ti-ic { position: relative; }
.ti-ic i { position: absolute; top: -4px; right: -10px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9999px; background: var(--chili); color: #fff; font: 700 12px/16px var(--f-mono); font-style: normal; text-align: center; }
.dev.bare .tabbar { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }

/* ==========================================================================
   MAP
   ========================================================================== */
.mapview { position: relative; min-height: 0; border-radius: 16px; overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); }
.map-svg { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.map-ctrl { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 2px; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 4px; }
.ground { fill: var(--ground); stroke: var(--line-2); stroke-width: .08; }
.walkway { fill: none; stroke: var(--paper); stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.zone-hull rect { fill-opacity: .07; stroke-opacity: .45; stroke-width: .08; stroke-dasharray: .45 .3; }
.zone-hull.dim { opacity: .3; }
.zone-label { font: 600 1px var(--f-ui); }
.landmark rect { fill: var(--card-2); stroke: var(--line-2); stroke-width: .07; }
.landmark .glyph { fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.landmark.lm-stage rect { fill: var(--lantern-soft); stroke: var(--lantern); }
.landmark.lm-entrance rect { fill: var(--leaf); stroke: none; }
.landmark.lm-entrance .glyph { stroke: var(--leaf-ink); }
.landmark.lm-seating rect { stroke-dasharray: .3 .2; }
.landmark.sel rect { stroke: var(--ink); stroke-width: .16; }
.lm-label { font: 600 .75px var(--f-ui); fill: var(--ink-2); text-anchor: middle; }
.stall .stall-body { fill: var(--st-free); stroke: var(--zc); stroke-width: .09; }
.m-zone .stall .stall-body { fill: color-mix(in srgb, var(--zc) 14%, var(--card)); }
.stall-awning { fill: var(--zc); }
.stall-code { font-family: var(--f-mono); font-weight: 600; fill: var(--ink); text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.stall .glyph { fill: none; stroke: var(--lantern); stroke-width: 2.4; pointer-events: none; }
.stall.st-reserved .stall-body { fill: url(#tarp); }
.stall.st-closed .stall-body { fill: var(--st-closed); stroke: var(--line-2); }
.stall.st-closed .stall-code { fill: var(--ink-3); }
.stall.sel .stall-body { stroke: var(--ink); stroke-width: .2; }
.m-zone .stall.sel .stall-body { fill: color-mix(in srgb, var(--zc) 30%, var(--card)); }
.m-zone .stall, .m-zone .landmark { cursor: move; }
.m-status .stall, .m-vendor .stall { cursor: pointer; }
.m-status .stall .stall-body, .m-vendor .stall .stall-body, .m-mini .stall .stall-body { stroke: var(--st-free-line); stroke-width: .08; }
.stall.st-pending .stall-body { fill: var(--st-pending); stroke: var(--lantern); }
.stall.st-approved .stall-body { fill: var(--st-approved); stroke: var(--leaf); }
.stall.st-paid .stall-body { fill: var(--st-paid); stroke: var(--st-paid); }
.stall.st-paid .stall-code { fill: var(--st-paid-ink); }
.m-vendor .stall.st-paid .stall-body, .m-vendor .stall.st-approved .stall-body { fill: var(--st-closed); stroke: var(--line-2); }
.m-vendor .stall.st-paid .stall-code, .m-vendor .stall.st-approved .stall-code { fill: var(--ink-3); }
.stall.inelig { opacity: .25; }
.m-vendor .stall.st-free:not(.inelig):hover .stall-body { stroke: var(--leaf); stroke-width: .18; }
.m-vendor .stall.sel .stall-body, .m-status .stall.sel .stall-body { stroke: var(--ink); stroke-width: .22; }
.stall.chosen .stall-body { stroke: var(--ink); stroke-width: .2; }
.m-mini .stall.sel .stall-body { fill: var(--chili); stroke: var(--chili); }
.m-mini .stall.chosen .stall-body { stroke: var(--chili); stroke-width: .25; }
.badge circle { fill: var(--lantern); }
.badge text { font: 700 .5px var(--f-mono); fill: #2B1A02; text-anchor: middle; }
.choice circle { fill: var(--ink); }
.choice text { font: 700 .62px var(--f-mono); fill: var(--paper); text-anchor: middle; }
.flag-pin circle { fill: var(--lantern); }
.legend { position: absolute; left: 10px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; background: color-mix(in srgb, var(--card) 92%, transparent); padding: 8px 12px; border-radius: 12px; box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); font-size: 12px; max-width: calc(100% - 70px); }
.lg { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.lg i { width: 12px; height: 12px; border-radius: 4px; background: var(--st-free); box-shadow: inset 0 0 0 1.5px var(--st-free-line); }
.lg b { font: 600 12px var(--f-mono); color: var(--ink); }
.lg-pending i { background: var(--st-pending); box-shadow: inset 0 0 0 1.5px var(--lantern); }
.lg-approved i { background: var(--st-approved); box-shadow: inset 0 0 0 1.5px var(--leaf); }
.lg-paid i { background: var(--st-paid); box-shadow: none; }
.lg-taken i { background: var(--st-closed); box-shadow: inset 0 0 0 1px var(--line-2); }
.lg-reserved i { background: repeating-linear-gradient(45deg, var(--st-closed) 0 3px, var(--lantern-soft) 3px 6px); box-shadow: none; }
.minimap { display: block; width: 100%; height: 100%; }
.minimap .ground { stroke-width: .25; }

/* ==========================================================================
   LAYOUT EDITOR: a full-screen studio
   phone: top bar / canvas / area bar / tool rail at the bottom, panels slide up over the canvas
   desktop: top bar across, tool rail on the left, one panel beside it, the canvas takes the rest
   ========================================================================== */
.ed { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; grid-template-areas: "top" "canvas" "foot" "rail"; position: relative; background: var(--paper); }
.ed-top { grid-area: top; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--card); min-width: 0; z-index: 2; }
.ed-back { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: var(--ink-2); flex-shrink: 0; }
.ed-back:hover { background: var(--paper-2); color: var(--ink); }
.ed-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ed-title b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-title small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-hist { display: flex; gap: 2px; margin-left: 8px; flex-shrink: 0; }
.ed-hbtn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px; border-radius: 12px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.ed-hbtn:hover { background: var(--paper-2); color: var(--ink); }
.ed-hbtn span { display: none; }
.ed-sp { flex: 1; min-width: 4px; }
.ed-top .issue-chip span, .ed-next-l { display: none; }
.ed-top .btn { flex-shrink: 0; }
.opt-x { color: var(--ink-3); }

/* tool rail */
.ed-rail { grid-area: rail; display: flex; justify-content: space-around; gap: 2px; padding: 4px 8px calc(6px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--card); z-index: 31; }
.rail-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 54px; padding: 4px 2px; border-radius: 12px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.rb-ic { position: relative; width: 40px; height: 32px; display: grid; place-items: center; border-radius: 12px; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.rail-btn:hover .rb-ic { background: var(--paper-2); color: var(--ink); }
.rail-btn.on { color: var(--ink); }
.rail-btn.on .rb-ic { background: var(--ink); color: var(--paper); }
.rail-btn.add .rb-ic { background: var(--leaf); color: var(--leaf-ink); }
.rail-btn.add.on .rb-ic { background: var(--ink); color: var(--paper); }
.rb-l { white-space: nowrap; }
.rb-badge { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9999px; background: var(--chili); color: #fff; font: 700 12px/18px var(--f-mono); font-style: normal; }

/* panel */
.ed-panel { grid-area: canvas; align-self: end; position: relative; z-index: 30; max-height: 72%; display: flex; flex-direction: column; min-height: 0; background: var(--card); border-radius: 24px 24px 0 0; box-shadow: 0 -12px 40px -16px rgba(20,12,0,.45), 0 0 0 1px var(--line); animation: ep-up .2s var(--ease); }
@keyframes ep-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ep-in { from { transform: translateX(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.ep-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 8px 16px; flex-shrink: 0; }
.ep-head h3 { font-size: 16px; font-weight: 700; }
.ep-close { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--ink-3); }
.ep-close:hover { background: var(--paper-2); color: var(--ink); }
.ep-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 16px 24px; }
.ep { display: flex; flex-direction: column; gap: 16px; }
.ep.insp { gap: 16px; }
.ep > *, .ep-body > * { flex-shrink: 0; }
.ep-sec { display: flex; flex-direction: column; gap: 8px; }
.ep-sec h4 { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .02em; }
.ep-tip { font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.el-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.el-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 1; padding: 8px 4px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); color: var(--ink-2); cursor: grab; transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease); min-width: 0; }
.el-tile:hover { border-color: var(--leaf); background: var(--card); transform: translateY(-1px); }
.el-tile:active { cursor: grabbing; }
.el-tile b { font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.el-tile.draw { border-style: dashed; cursor: pointer; }
.el-tile.on { border-color: var(--leaf); background: var(--leaf-soft); }
.el-shape { display: block; max-width: 72%; max-height: 54%; border-radius: 4px; background: color-mix(in srgb, var(--zc) 26%, var(--card)); border: 1.5px solid var(--zc); box-shadow: inset 0 3px 0 var(--zc); }
.el-grid.lm .el-tile { aspect-ratio: auto; padding: 12px 4px 12px; }
.el-grid.lm .el-tile .ic { color: var(--lantern-ink); }
.el-row { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); text-align: left; cursor: grab; transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.el-row:hover { border-color: var(--leaf); background: var(--card); }
.el-rowviz { display: grid; gap: 2px; width: 92px; flex-shrink: 0; }
.el-rowviz i { height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--zc) 30%, var(--card)); border: 1px solid var(--zc); }
.el-rowtx { display: flex; flex-direction: column; min-width: 0; }
.el-rowtx b { font-size: 12px; }
.el-rowtx small { font-size: 12px; color: var(--ink-3); }
.ep-more summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--leaf); padding: 4px 0; }
.ep-form { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.ep-f { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--ink-2); }
.ep-f .num { width: 92px; }
.ep-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ep-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: var(--paper); min-width: 0; }
.ep-stats b { font-size: 14px; }
.ep-stats span { font-size: 12px; color: var(--ink-3); }
.paint-btn { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; height: 32px; padding: 0 12px; border-radius: 9999px; border: 1px dashed var(--zc); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.paint-btn:hover { background: color-mix(in srgb, var(--zc) 10%, var(--card)); }
.paint-btn.on { background: var(--zc); border-style: solid; color: #fff; }
.zone-card.painting { box-shadow: inset 3px 0 0 var(--zc), 0 0 0 2px var(--zc); }

/* canvas: the area is the "page" on a dotted workspace */
.ed-canvas { grid-area: canvas; position: relative; min-height: 0; overflow: hidden; background-color: var(--paper-2); background-image: radial-gradient(color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1.2px); background-size: 18px 18px; }
.ed-canvas .map-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sel-box { fill: color-mix(in srgb, var(--leaf) 6%, transparent); stroke: var(--leaf); pointer-events: none; }
.sel-handle { fill: var(--card); stroke: var(--leaf); cursor: nwse-resize; }
.sel-handle.h-ne, .sel-handle.h-sw { cursor: nesw-resize; }
.sel-stem { stroke: var(--leaf); pointer-events: none; }
.sel-rot { fill: var(--card); stroke: var(--leaf); cursor: grab; }
.sel-rot-ic { fill: none; stroke: var(--leaf); stroke-linecap: round; pointer-events: none; }
.mode-pill { position: absolute; z-index: 15; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 24px); padding: 4px 4px 4px 16px; border-radius: 9999px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 600; box-shadow: var(--shadow-lg); white-space: nowrap; }
.mode-pill > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mode-pill .ic { flex-shrink: 0; }
.mp-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--zc); flex-shrink: 0; }
.mp-done, .mp-go { height: 30px; padding: 0 16px; border-radius: 9999px; background: var(--paper); color: var(--ink); font-size: 12px; font-weight: 700; flex-shrink: 0; }
.mp-go { background: var(--lantern); color: #2B1A02; }
.float-bar { position: absolute; z-index: 14; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); white-space: nowrap; animation: fb-in 0.2s var(--ease); }
@keyframes fb-in { from { opacity: 0; transform: translate(-50%, 4px); } to { opacity: 1; transform: translateX(-50%); } }
.float-bar .icon-btn { width: 36px; height: 36px; }
.fb-zone, .fb-info { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px; border-radius: 12px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.fb-zone:hover, .fb-info:hover { background: var(--paper-2); color: var(--ink); }
.fb-zone i { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; }
.fb-info b { font-size: 12px; color: var(--ink); }
.fb-info span { color: var(--ink-3); font-weight: 500; }
.fb-sep { width: 1px; height: 22px; background: var(--line); margin: 0 2px; }
.float-bar .fb-del:hover { color: var(--chili); }
.fb-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px; display: flex; flex-direction: column; padding: 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.fb-menu button { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border-radius: 8px; font-size: 12px; text-align: left; color: var(--ink-2); }
.fb-menu button:hover { background: var(--paper-2); color: var(--ink); }
.fb-menu button.on { font-weight: 700; color: var(--ink); }
.fb-menu i { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.ed-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 32px; border-radius: 16px; background: var(--card); border: 2px dashed var(--line-2); box-shadow: var(--shadow); color: var(--leaf); }
.ed-empty:hover { border-color: var(--leaf); }
.ed-empty b { font-size: 16px; color: var(--ink); }
.ed-empty small { font-size: 12px; color: var(--ink-3); }

/* bottom bar: areas are the "pages", zoom on the right */
.ed-foot { grid-area: foot; display: flex; align-items: center; gap: 12px; padding: 4px 8px; border-top: 1px solid var(--line); background: var(--card); min-width: 0; }
.area-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; }
.area-tabs::-webkit-scrollbar { display: none; }
.area-tab { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; flex-shrink: 0; }
.area-tab .mono { font-size: 12px; background: var(--paper-2); padding: 0 8px; border-radius: 9999px; }
.area-tab.on { background: var(--paper-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.area-tab.add { color: var(--ink-3); }
.ed-stats { display: none; align-items: center; gap: 16px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.ed-stats b { color: var(--ink); }
.ed-zoom { display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.ed-zoom .icon-btn { width: 34px; height: 34px; }
.ez-pct { min-width: 46px; height: 32px; border-radius: 8px; font-size: 12px; color: var(--ink-2); }
.ez-pct:hover { background: var(--paper-2); color: var(--ink); }
.ed-zoom .ez-hand { display: none; }
.issue-chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px; border-radius: 9999px; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.issue-chip.ok { background: var(--leaf-soft); color: var(--leaf); }
.issue-chip.warn { background: var(--lantern-soft); color: var(--lantern-ink); }

@container app (min-width: 760px) {
  .ed { grid-template-columns: 76px auto minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr) auto; grid-template-areas: "top top top" "rail panel canvas" "rail panel foot"; }
  .ed-top { padding: 8px 16px 8px 12px; gap: 8px; }
  .ed-title b { font-size: 14px; }
  .ed-top .issue-chip span, .ed-next-l { display: inline; }
  .ed-rail { flex-direction: column; justify-content: flex-start; gap: 8px; padding: 12px 8px; border-top: 0; border-right: 1px solid var(--line); }
  .rail-btn { min-width: 0; width: 64px; padding: 8px 0; }
  .rb-ic { width: 46px; height: 40px; border-radius: 12px; }
  .ed-panel { grid-area: panel; align-self: stretch; width: 316px; max-height: none; border-radius: 0; box-shadow: none; border-right: 1px solid var(--line); z-index: 3; animation: ep-in 0.2s var(--ease); }
  .ep-head { padding: 16px 16px 8px 16px; }
  .ep-body { padding: 4px 16px 24px; }
  .ed-foot { padding: 8px 12px; }
  .ed-stats { display: flex; }
  .ed-zoom .ez-hand { display: inline-grid; }
}
@container app (max-width: 420px) {
  .ed-hist { margin-left: 0; }
  .float-bar .fb-info span { display: none; }
}

/* beginner mode: everything labelled and bigger */
.ed-easy .ed-hbtn span { display: inline; }
.ed-easy .rail-btn { font-size: 12px; }
.ed-easy .rb-ic { width: 48px; height: 38px; }
.ed-easy .el-tile b, .ed-easy .el-rowtx b { font-size: 14px; }
.ed-easy .mode-pill { font-size: 14px; padding: 8px 8px 8px 16px; }
.ed-easy .mp-done, .ed-easy .mp-go { height: 36px; font-size: 14px; padding: 0 16px; }
.ed-easy .float-bar .icon-btn { width: 44px; height: 44px; }
.ed-easy .fb-zone, .ed-easy .fb-info { height: 44px; font-size: 14px; }
.ed-easy .area-tab { height: 40px; font-size: 14px; }
.easy .zone-chip { height: 40px; font-size: 14px; padding: 0 16px; }
.easy .insp-head b { font-size: 18px; }
/* phone: the top bar keeps the market name and the next button; undo/redo shrink to icons */
@container app (max-width: 520px) {
  .ed-easy .ed-hbtn span { display: none; }
  .ed-title { flex: 1 1 60px; }
  .ed-sp { display: none; }
  .ed-hbtn { padding: 0 8px; }
}
@container app (min-width: 760px) {
  .ed-easy { grid-template-columns: 96px auto minmax(0, 1fr); }
  .ed-easy .rail-btn { width: 84px; font-size: 12px; }
  .ed-easy .rb-ic { width: 60px; height: 48px; }
  .ed-easy .ed-panel { width: 340px; }
}
.ed-focus { height: 100%; }
.zone-chip { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 9999px; border: 1px solid var(--line-2); background: var(--card); font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--ink-2); }
.zone-chip i { width: 10px; height: 10px; border-radius: 4px; background: var(--zc); }
.zone-chip.on { border-color: var(--zc); background: color-mix(in srgb, var(--zc) 16%, var(--card)); color: var(--ink); }
.zone-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-select .map-svg { cursor: default; }
.tool-hand .map-svg { cursor: grab; }
.tool-stall .map-svg, .tool-row .map-svg, .tool-street .map-svg, .tool-landmark .map-svg { cursor: crosshair; }
.tool-zone .map-svg { cursor: cell; }
.area-edge { fill: none; stroke: var(--ink-3); stroke-width: .08; stroke-dasharray: .5 .35; pointer-events: none; }
.area-dim { font: 500 .8px var(--f-mono); fill: var(--ink-3); }
.ghost-stall { fill: color-mix(in srgb, var(--zc) 28%, transparent); stroke: var(--zc); stroke-width: .1; stroke-dasharray: .3 .2; pointer-events: none; }
.ghost-dim { font: 600 .7px var(--f-mono); fill: var(--ink-2); text-anchor: middle; pointer-events: none; }
.ghost-dot { fill: var(--chili); pointer-events: none; }
.ghost-path { fill: none; stroke: var(--chili); stroke-width: .16; stroke-dasharray: .5 .3; pointer-events: none; }
.ghost-node { fill: var(--card); stroke: var(--chili); stroke-width: .14; pointer-events: none; }
.ghost-lm { fill: var(--lantern-soft); stroke: var(--lantern); stroke-width: .1; stroke-dasharray: .3 .2; pointer-events: none; }
.marquee { fill: color-mix(in srgb, var(--leaf) 10%, transparent); stroke: var(--leaf); stroke-width: .08; stroke-dasharray: .3 .2; }
.marquee.zone { fill: color-mix(in srgb, var(--zc) 15%, transparent); stroke: var(--zc); }
.insp { display: flex; flex-direction: column; gap: 16px; }
.insp-head { display: flex; align-items: center; gap: 12px; }
.insp-head b { display: block; font-size: 14px; }
.insp-head small { color: var(--ink-3); font-size: 12px; }
.insp-code { min-width: 56px; height: 44px; padding: 0 8px; border-radius: 12px; display: grid; place-items: center; font-size: 14px; font-weight: 600; background: color-mix(in srgb, var(--zc) 16%, var(--card)); box-shadow: inset 0 3px 0 var(--zc), inset 0 0 0 1px color-mix(in srgb, var(--zc) 50%, transparent); }
.insp-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); flex-shrink: 0; }
.insp-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--line); padding-top: 12px; }
.kbd-list { display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--ink-3); padding: 12px; background: var(--paper); border-radius: 12px; }
kbd { font: 600 12px var(--f-mono); padding: 2px 8px; border-radius: 6px; background: var(--card); box-shadow: 0 1px 0 var(--line-2), 0 0 0 1px var(--line); color: var(--ink-2); }
.zones-panel, .layers-panel, .check-panel { display: flex; flex-direction: column; gap: 12px; }
.zone-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: inset 3px 0 0 var(--zc); }
.zone-card-head { display: flex; align-items: center; gap: 8px; }
.zone-swatch { width: 24px; height: 24px; border-radius: 8px; background: var(--zc); flex-shrink: 0; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.zone-cats { display: flex; flex-wrap: wrap; gap: 4px; }
.zone-cats .chip { height: 26px; padding: 0 8px; font-size: 12px; }
.zone-price { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.zone-price .num { width: 140px; height: 32px; }
.layer-bg { padding: 12px; border-radius: 12px; background: var(--paper); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.layer-bg-head { display: flex; align-items: center; gap: 8px; }
.layer-bg .switch-row, .layer-bg .range-row { width: 100%; }
.ok-box { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--leaf-soft); color: var(--leaf); }
.ok-box b { display: block; color: var(--ink); }
.ok-box small { color: var(--ink-2); }
.issue { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 12px; text-align: left; font-weight: 600; font-size: 12px; }
.issue span { flex: 1; }
.issue.chili { background: var(--chili-soft); color: var(--chili-ink); }
.issue.lantern { background: var(--lantern-soft); color: var(--lantern-ink); }

/* ==========================================================================
   LAYOUT START + AI IMPORT
   ========================================================================== */
.ls { padding: 16px 16px 32px; display: flex; flex-direction: column; gap: 16px; max-width: 1180px; margin: 0 auto; }
.ls-head p { max-width: 62ch; margin-top: 8px; }
.ls-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.ls-hero { position: relative; text-align: left; border-radius: 16px; overflow: hidden; background: var(--night); color: #FFF4DE; display: grid; min-height: 260px; box-shadow: var(--shadow); }
.ls-hero-art { position: relative; min-height: 120px; }
.scan-demo { position: absolute; left: 20px; right: 20px; top: 40px; bottom: 6px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.scan-demo i { border: 1.5px dashed rgba(255,244,222,.35); border-radius: 4px; animation: detect 3.6s infinite; }
.scan-demo i:nth-child(2n) { animation-delay: .4s; } .scan-demo i:nth-child(3n) { animation-delay: .8s; } .scan-demo i:nth-child(5) { animation-delay: 1.2s; }
@keyframes detect { 40%, 70% { border-style: solid; border-color: var(--glow); background: rgba(255,210,126,.14); } }
.ls-hero-text { padding: 16px 24px 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.ls-hero h3 { font-family: var(--f-display); font-weight: 400; font-size: 20px; line-height: 1.25; }
.ls-hero p { color: rgba(255,244,222,.8); max-width: 52ch; font-size: 14px; }
.ls-formats { display: flex; flex-wrap: wrap; gap: 8px; }
.ls-formats span { font-size: 12px; padding: 4px 8px; border-radius: 9999px; background: rgba(255,244,222,.1); color: rgba(255,244,222,.85); }
.ls-hero .btn { margin-top: 4px; }
.ls-hero:hover .btn { filter: brightness(1.05); }
.ls-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ls-card-head { display: flex; gap: 12px; align-items: flex-start; }
.ls-card-head > .ic { width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: var(--paper-2); color: var(--ink-2); }
.ls-card h4 { font-size: 14px; font-weight: 600; }
.ls-card p { font-size: 12px; color: var(--ink-3); }
.tpl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tpl { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); min-width: 0; }
.tpl:hover { border-color: var(--leaf); }
.tpl .minimap { height: 74px; border-radius: 8px; background: var(--paper-2); }
.tpl b { font-size: 12px; }
.tpl small { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.prev-round { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); text-align: left; }
.prev-round:hover { border-color: var(--leaf); }
.prev-round .minimap { width: 88px; height: 60px; flex-shrink: 0; }
.prev-round span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.prev-round small { color: var(--ink-3); font-size: 12px; }
.err-text { display: flex; gap: 8px; align-items: center; color: var(--chili); font-size: 12px; }
.csv-prev { display: grid; gap: 12px; }
.csv-map { height: 160px; background: var(--paper-2); border-radius: 12px; padding: 8px; }
@container app (min-width: 760px) {
  .ls { padding: 32px 32px 40px; }
  .ls-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ls-hero { grid-column: span 2; grid-template-columns: 1fr 1.1fr; min-height: 300px; }
  .ls-hero-art { order: 2; }
  .ls-hero-text { padding: 32px; justify-content: center; }
  .ls-hero h3 { font-size: 24px; }
  .ls-templates { grid-row: span 2; }
  .tpl .minimap { height: 92px; }
  .csv-prev { grid-template-columns: 1fr 1fr; }
}

.ai-wrap { height: 100%; overflow: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; align-content: start; }
.ai-pick { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ai-pick-head p { margin-top: 8px; max-width: 60ch; }
.ai-status { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; font-weight: 600; padding: 8px 12px; border-radius: 9999px; background: var(--paper-2); color: var(--ink-2); }
.ai-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.ai-status.ok { background: var(--leaf-soft); color: var(--leaf); }
.ai-status.ok .dot { background: var(--leaf); box-shadow: 0 0 0 3px color-mix(in srgb, var(--leaf) 25%, transparent); }
.ai-status.demo { background: var(--lantern-soft); color: var(--lantern-ink); }
.ai-status.demo .dot { background: var(--lantern); }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; min-height: 200px; padding: 24px; border-radius: 16px; border: 2px dashed var(--line-2); background: var(--card); cursor: pointer; transition: border-color 0.2s var(--ease), background 0.2s var(--ease); color: var(--ink-2); }
.dropzone:hover, .dropzone.over { border-color: var(--leaf); background: var(--leaf-soft); }
.dropzone small { color: var(--ink-3); }
.dropzone.has { padding: 8px; }
.dropzone.has img { max-height: 260px; border-radius: 12px; object-fit: contain; }
.dropzone.small { min-height: 120px; }
.dz-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--paper-2); color: var(--leaf); margin-bottom: 4px; }
.ai-opts { padding: 4px 2px; }
.ai-samples { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ai-samples h4 { font-size: 14px; color: var(--ink-2); }
.sample-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 12px; padding: 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.sample-card img { grid-row: span 2; width: 112px; height: 84px; object-fit: cover; border-radius: 8px; }
.sample-meta { display: flex; flex-direction: column; min-width: 0; padding-top: 2px; }
.sample-meta b { font-size: 12px; }
.sample-meta small { font-size: 12px; color: var(--ink-3); }
.sample-actions { display: flex; gap: 8px; flex-wrap: wrap; align-self: end; }
.ai-wrap.analyzing { align-content: stretch; }
.ai-stage { display: grid; place-items: center; min-width: 0; }
.ai-img { position: relative; width: 100%; max-height: 100%; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: #000; max-width: 100%; }
.ai-img img { display: block; width: 100%; height: 100%; object-fit: contain; filter: saturate(.9); }
.reveal { position: absolute; inset: 0; width: 100%; height: 100%; }
.reveal rect { fill: rgba(93,178,132,.22); stroke: #5DB284; stroke-width: 2.4; animation: blip .4s var(--ease); }
@keyframes blip { from { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(1.3); } }
.scanline { position: absolute; left: 0; right: 0; height: 3px; top: -3%; background: var(--glow); box-shadow: 0 0 12px 2px rgba(255,210,126,.55); animation: scan 2.2s linear infinite; mix-blend-mode: screen; }
@keyframes scan { to { top: 100%; } }
.ai-side { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.ai-count { display: flex; align-items: baseline; gap: 12px; }
.ai-count b { font-size: 36px; font-weight: 600; letter-spacing: -.03em; color: var(--leaf); line-height: 1; }
.ai-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ai-steps li { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; }
.ai-steps .dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-2); flex-shrink: 0; }
.ai-steps li.done { color: var(--ink-2); }
.ai-steps li.done .dot { background: var(--leaf); border-color: var(--leaf); }
.ai-steps li.now { color: var(--ink); font-weight: 600; }
.ai-steps li.now .dot { border-color: var(--lantern); animation: pulse2 1s infinite; }
@keyframes pulse2 { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--lantern) 30%, transparent); } }
.callout .btn { margin-top: 4px; }
/* review */
.ai-wrap.review { gap: 16px; }
.rv-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rv-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rv-top h3 { font-size: 16px; font-weight: 600; margin-top: 4px; }
.rv-legend { display: flex; gap: 12px; font-size: 12px; color: var(--ink-3); }
.rv-legend span { display: inline-flex; align-items: center; gap: 8px; }
.rv-legend i { width: 14px; height: 10px; border-radius: 2px; }
.lg-img { background: var(--paper-2); }
.lg-dig { background: var(--leaf); }
.compare { position: relative; width: 100%; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow), 0 0 0 1px var(--line); user-select: none; touch-action: none; max-width: 100%; }
.compare > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.compare svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cmp-digital { position: absolute; inset: 0; }
.cmp-ground { fill: var(--ground); }
.cmp-outline .det-st rect { fill: rgba(93,178,132,.12); }
.cmp-digital .det-st rect { fill: color-mix(in srgb, var(--zc) 22%, var(--card)); }
.det-st rect { stroke: var(--zc); stroke-width: 2.4; }
.det-st text { font: 600 12px var(--f-mono); fill: var(--ink); text-anchor: middle; }
.cmp-outline .det-st text { display: none; }
.det-st.low rect { stroke: var(--lantern); stroke-dasharray: 6 4; }
.det-st.gone { opacity: .12; }
.det-st.ref rect { stroke: var(--chili); stroke-width: 4; }
.det-st.pickable { cursor: crosshair; }
.det-st.pickable:hover rect { stroke-width: 5; }
.det-lm { fill: var(--lantern-soft); stroke: var(--lantern); stroke-width: 2; }
.cmp-outline .det-lm { fill: rgba(242,176,76,.15); }
.det-walk { fill: none; stroke: var(--paper); stroke-linecap: round; opacity: .7; }
.cmp-outline .det-walk { display: none; }
.cmp-pins { pointer-events: none; }
.u-pin { pointer-events: auto; cursor: pointer; }
.u-pin circle { fill: var(--lantern); stroke: #fff; stroke-width: 3; }
.u-pin text { font: 700 18px var(--f-mono); fill: #2B1A02; text-anchor: middle; }
.u-pin.active circle { fill: var(--chili); animation: pinpulse 1s infinite; }
@keyframes pinpulse { 50% { stroke-width: 10; stroke-opacity: .4; } }
.cmp-handle { position: absolute; top: 0; bottom: 0; width: 36px; margin-left: -16px; cursor: ew-resize; display: grid; place-items: center; }
.cmp-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.cmp-handle span { position: relative; display: flex; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #16241E; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.pick-hint { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--chili-soft); color: var(--chili-ink); font-size: 12px; font-weight: 600; }
.rv-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rv-stats div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; }
.rv-stats b { font-size: 20px; font-weight: 600; }
.rv-stats span { font-size: 12px; color: var(--ink-3); }
.rv-sec { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.rv-sec h4 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.count-badge { font-size: 12px; padding: 2px 8px; border-radius: 9999px; font-weight: 600; }
.count-badge.warn { background: var(--lantern-soft); color: var(--lantern-ink); }
.count-badge.ok { background: var(--leaf-soft); color: var(--leaf); }
.u-item { display: flex; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.u-item.active { border-color: var(--chili); box-shadow: 0 0 0 3px color-mix(in srgb, var(--chili) 15%, transparent); }
.u-item p { font-size: 12px; margin-bottom: 8px; }
.u-num { width: 22px; height: 22px; border-radius: 50%; background: var(--lantern); color: #2B1A02; font: 700 12px/22px var(--f-mono); text-align: center; flex-shrink: 0; }
.scale-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.scale-row .num { width: 100px; }
.ref-pick { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--chili); color: var(--chili); font-weight: 600; font-size: 12px; background: var(--card); }
.ref-pick.on { background: var(--chili); color: #fff; }
.scale-out { font-size: 12px; color: var(--ink-2); padding: 8px 12px; border-radius: 8px; background: var(--paper-2); }
.zone-found { display: flex; flex-wrap: wrap; gap: 8px; }
.zone-found span { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 9999px; background: var(--card); border: 1px solid var(--line); font-size: 12px; }
.zone-found i { width: 10px; height: 10px; border-radius: 4px; background: var(--zc); }
.zone-found b { font-size: 12px; color: var(--ink-3); }
.rv-actions { display: flex; flex-direction: column; gap: 8px; position: sticky; bottom: 0; background: var(--paper); padding: 12px 0 4px; }
@container app (min-width: 760px) {
  .ai-wrap { grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); padding: 24px 32px; gap: 32px; }
  .ai-wrap.analyzing { grid-template-columns: minmax(0, 1fr) 300px; align-items: center; }
  .ai-wrap.review { grid-template-columns: minmax(0, 1fr) 340px; padding: 16px 24px; align-items: start; }
  .rv-side { position: sticky; top: 0; }
}

/* ==========================================================================
   ORGANIZER
   ========================================================================== */
.org-app { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--paper); }
.org-side { display: none; }
.org-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; height: 100%; }
/* phone: title + (mode, bell) on one row; page actions on one scrollable row underneath */
.org-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title tools" "actions actions"; align-items: center; gap: 8px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
.org-top-title { grid-area: title; min-width: 0; }
.org-top h1 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.org-top p { font-size: 12px; color: var(--ink-3); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.org-top-actions { grid-area: actions; display: flex; align-items: center; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.org-top-actions::-webkit-scrollbar { display: none; }
.org-top-actions > * { flex-shrink: 0; }
.org-top-tools { grid-area: tools; display: flex; align-items: center; gap: 4px; align-self: start; }
.org-scroll { flex: 1; min-height: 0; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.org-scroll.bare { padding: 0; gap: 0; overflow: hidden; }
/* scrolling flex columns: children keep their natural height */
.org-scroll > *, .ad-body > *, .apps-list > *, .board-list > *, .ed-side-body > *, .modal-body > *, .pick-side > *, .live-side > *, .ven-scroll > *, .wiz-body > * { flex-shrink: 0; }
.org-scroll.bare > * { flex-shrink: 1; }
.org-brand { padding: 4px 8px 16px; }
.market-switch { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-align: left; }
.market-switch span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.market-switch b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.market-switch small { font-size: 12px; color: var(--ink-3); }
.ms-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 3px var(--leaf-soft); flex-shrink: 0; }
.org-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 12px; color: var(--ink-2); font-weight: 600; font-size: 12px; }
.nav-item:hover { background: var(--paper-2); color: var(--ink); }
.nav-item.on { background: var(--ink); color: var(--paper); }
.nav-item span:nth-child(2) { flex: 1; text-align: left; }
.nav-badge { font: 700 12px var(--f-mono); background: var(--lantern); color: #2B1A02; padding: 2px 8px; border-radius: 9999px; }
.org-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.new-market { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 12px; border: 1.5px dashed var(--line-2); color: var(--ink-2); font-weight: 600; font-size: 12px; }
.new-market:hover { border-color: var(--leaf); color: var(--leaf); }
.me { display: flex; align-items: center; gap: 12px; padding: 8px; }
.me span:last-child { display: flex; flex-direction: column; min-width: 0; }
.me b { font-size: 12px; }
.me small { font-size: 12px; color: var(--ink-3); }
@container app (min-width: 760px) {
  .org-app { grid-template-columns: 248px minmax(0, 1fr); }
  .org-side { display: flex; flex-direction: column; padding: 16px 12px; border-right: 1px solid var(--line); background: var(--paper-2); min-height: 0; overflow: auto; }
  .org-main .tabbar { display: none; }
  .org-top { padding: 16px 32px; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "title actions tools"; gap: 12px; }
  .org-top-tools { align-self: center; gap: 8px; }
  .org-top-actions { overflow: visible; flex-wrap: wrap; justify-content: flex-end; }
  .org-top p { display: block; }
  .org-top h1 { font-size: 20px; }
  .org-scroll { padding: 24px 32px 32px; gap: 24px; }
}

/* dashboard */
.todo { display: grid; grid-template-columns: 1fr; gap: 12px; }
.todo-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: left; }
.todo-card:hover { border-color: var(--ink-3); }
.todo-card > span:nth-child(2) { flex: 1; min-width: 0; font-weight: 600; }
.todo-card b { font-size: 18px; margin-right: 4px; }
.todo-card small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; }
.todo-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); flex-shrink: 0; }
.todo-card.urgent { border-color: color-mix(in srgb, var(--chili) 50%, var(--line)); }
.todo-card.urgent .todo-ic { background: var(--chili-soft); color: var(--chili); }
.todo-card.warn .todo-ic { background: var(--lantern-soft); color: var(--lantern-ink); }
.feature-market { border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.feature-market .cover { min-height: 170px; display: flex; align-items: flex-end; }
.fm-head { position: relative; padding: 48px 16px 24px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.fm-head h2 { font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.2; }
.fm-head p { color: rgba(255,244,222,.8); font-size: 12px; }
.fm-head .pill { background: rgba(93,178,132,.22); color: #BFF0D3; }
.fm-body { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 16px; }
.fm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fm-stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fm-stat > span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.fm-stat b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.fm-stat b small { font-size: 12px; color: var(--ink-3); }
.fm-stat > small { font-size: 12px; color: var(--ink-3); }
.fm-map { position: relative; height: 170px; border-radius: 12px; background: var(--paper-2); padding: 8px; cursor: pointer; }
.fm-map-cta { position: absolute; right: 10px; bottom: 10px; display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 9999px; background: var(--card); box-shadow: var(--shadow-sm); }
.fm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.mk-list { display: flex; flex-direction: column; }
.mk-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.mk-row:first-child { border-top: 0; }
.mk-thumb { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; background: hsl(var(--h) 45% 32%); }
.mk-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mk-text b { font-size: 12px; }
.mk-text small { font-size: 12px; color: var(--ink-3); }
.ch-bars { display: flex; flex-direction: column; gap: 12px; }
.ch-bar { display: grid; grid-template-columns: 96px 1fr 28px; align-items: center; gap: 12px; font-size: 12px; }
.ch-bar .bar { height: 10px; border-radius: 9999px; background: var(--paper-2); overflow: hidden; }
.ch-bar .bar i { display: block; height: 100%; background: var(--lantern); border-radius: inherit; }
.ch-bar b { text-align: right; }
@container app (min-width: 760px) {
  .todo { grid-template-columns: repeat(3, 1fr); }
  .fm-head { padding: 48px 24px 24px; }
  .fm-head h2 { font-size: 30px; }
  .fm-body { grid-template-columns: 1.3fr 1fr; padding: 24px 24px; }
  .fm-actions { grid-column: span 2; }
  .dash-grid { grid-template-columns: 1.2fr 1fr; }
}

/* wizard */
.wiz { height: 100%; display: flex; flex-direction: column; background: var(--paper); }
.wiz-top { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-bottom: 1px solid var(--line); background: var(--card); flex-wrap: wrap; }
.wiz-exit { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--ink-2); }
.wiz-exit:hover { background: var(--paper-2); }
.wiz-title { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.wiz-title small { font-size: 12px; color: var(--ink-3); }
.wiz-title b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper { order: 3; width: 100%; list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.stepper li { flex: 1; min-width: 0; }
.stepper button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 8px; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.stepper .st-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 12px var(--f-mono); background: var(--paper-2); flex-shrink: 0; }
.stepper .st-l { display: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper li.now .st-l { display: block; color: var(--ink); }
.stepper li.now .st-n { background: var(--ink); color: var(--paper); }
.stepper li.done .st-n { background: var(--leaf); color: var(--leaf-ink); }
.stepper li.now { flex: 3; }
.wiz-actions { display: flex; align-items: center; gap: 8px; }
.saved { display: none; align-items: center; gap: 4px; font-size: 12px; color: var(--leaf); font-weight: 600; }
.wiz-progress { height: 3px; background: var(--line); flex-shrink: 0; }
.wiz-progress i { display: block; height: 100%; background: var(--leaf); transition: width .3s var(--ease); }
.wiz-body { flex: 1; min-height: 0; overflow: auto; }
.wiz.full .wiz-body { overflow: hidden; }
.wiz-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 16px; border-top: 1px solid var(--line); background: var(--card); }
.wiz-step-of { font-size: 12px; color: var(--ink-3); }
@container app (min-width: 760px) {
  .wiz-top { padding: 12px 24px; flex-wrap: nowrap; gap: 16px; }
  .wiz-title { margin-right: 0; max-width: 200px; }
  .stepper { order: 0; width: auto; flex: 1; justify-content: center; gap: 2px; }
  .stepper li, .stepper li.now { flex: 0 1 auto; }
  .stepper button { padding: 8px 12px; }
  .stepper button:hover { background: var(--paper-2); }
  .stepper .st-l { display: block; }
  .stepper li:not(:last-child)::after { content: ""; }
  .saved { display: inline-flex; }
  .wiz-foot { padding: 12px 32px; }
}

/* forms layout */
.form-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 16px 16px 32px; max-width: 1180px; margin: 0 auto; }
.form-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.form-narrow { max-width: 760px; margin: 0 auto; padding: 16px 16px 32px; display: flex; flex-direction: column; gap: 24px; }
.form-sec { display: flex; flex-direction: column; gap: 16px; }
.sec-title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.sec-title.big { font-family: var(--f-display); font-weight: 400; font-size: 20px; }
.sum-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); padding: 12px 12px; border-radius: 12px; background: var(--leaf-soft); }
.sum-line .ic { color: var(--leaf); }
.sum-line.warn { background: var(--lantern-soft); }
.sum-line.warn .ic { color: var(--lantern-ink); }
.pin-map { position: relative; height: 120px; border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--leaf) 14%, var(--paper-2)); border: 1px solid var(--line); }
.pin-map::after { content: ""; position: absolute; left: -10%; right: -10%; top: 62%; height: 14px; background: color-mix(in srgb, #5FA6B8 45%, transparent); transform: rotate(-6deg); }
.pin-dot { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -100%); color: var(--chili); z-index: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.pin-label { position: absolute; left: 10px; bottom: 10px; z-index: 1; font-size: 12px; font-weight: 600; background: var(--card); padding: 4px 8px; border-radius: 9999px; box-shadow: var(--shadow-sm); }
.day-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.day { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); font-weight: 600; }
.day.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.quota-list { display: flex; flex-direction: column; gap: 8px; }
.quota-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.quota-row.off { opacity: .55; }
.q-ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); }
.q-name { flex: 1; font-weight: 600; }
.stepper-num { display: flex; align-items: center; gap: 4px; }
.stepper-num button { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--paper-2); }
.stepper-num span { min-width: 38px; text-align: center; font-weight: 600; }
.amen { display: flex; flex-wrap: wrap; gap: 8px; }
.form-preview { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pv-card { border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.pv-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.pv-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.pv-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pv-tags span { font-size: 12px; padding: 2px 8px; border-radius: 9999px; background: var(--paper-2); color: var(--ink-2); }
.cover-pick { display: flex; align-items: center; gap: 8px; }
.cover-sw { width: 28px; height: 28px; border-radius: 8px; background: hsl(var(--h) 45% 32%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.cover-sw.on { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--lantern); }
.pv-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; padding: 8px 0; color: var(--ink-2); }
.pv-row b { color: var(--ink); font-weight: 600; }
.pv-row.ok b { color: var(--leaf); }
.pv-row.total { border-top: 1px dashed var(--line-2); margin-top: 4px; padding-top: 12px; font-weight: 700; color: var(--ink); }
.pv-row.total b { font-size: 16px; }
.pv-row.hl { background: var(--leaf-soft); border-radius: 8px; padding: 8px 12px; color: var(--leaf); }
.pv-plans { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pv-plan { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 12px; }
.pv-plan.on { border-color: var(--leaf); background: var(--leaf-soft); }
.pv-methods { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pv-methods span { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 4px 8px; border-radius: 9999px; background: var(--paper-2); }
.price-tbl .num { width: 120px; height: 34px; }
.method-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.method { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.method.on { border-color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); }
.method.soon { opacity: .55; cursor: default; }
.mt-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); flex-shrink: 0; }
.method.on .mt-ic { background: var(--leaf-soft); color: var(--leaf); }
.mt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mt-text small { font-size: 12px; color: var(--ink-3); }
.plan-list { display: flex; flex-direction: column; gap: 8px; }
.plan { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.plan.on { border-color: var(--leaf); }
.plan input { width: 18px; height: 18px; accent-color: var(--leaf); margin-top: 2px; }
.plan span { display: flex; flex-direction: column; }
.plan small { color: var(--ink-3); font-size: 12px; }
.plan-cfg { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px; margin: -2px 0 2px 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--card-2); }
.mode-cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
.mode-card { position: relative; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; text-align: left; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
.mode-card.on { border-color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); }
.mode-card b { font-size: 14px; }
.mode-card p { font-size: 12px; color: var(--ink-3); }
.mc-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); margin-bottom: 4px; }
.mode-card.on .mc-ic { background: var(--leaf); color: var(--leaf-ink); }
.mode-card .tag { position: absolute; right: 14px; top: 14px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 9999px; background: var(--lantern-soft); color: var(--lantern-ink); }
.sla { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.sla li { position: relative; display: flex; flex-direction: column; padding: 0 0 16px 24px; }
.sla li::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.sla li:last-child::before { display: none; }
.sla-dot { position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink-3); }
.sla li.lantern .sla-dot { border-color: var(--lantern); background: var(--lantern-soft); }
.sla li.leaf .sla-dot { border-color: var(--leaf); background: var(--leaf); }
.sla small { color: var(--ink-3); font-size: 12px; }
.check-grid { display: grid; grid-template-columns: 1fr; gap: 2px; }
@container app (min-width: 760px) {
  .form-split { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding: 32px 32px 40px; }
  .form-preview { position: sticky; top: 24px; align-self: start; }
  .form-narrow { padding: 32px 32px 40px; }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .mode-cards { grid-template-columns: 1fr 1fr; }
  .check-grid { grid-template-columns: 1fr 1fr; }
}

/* share */
.share { display: flex; flex-direction: column; gap: 16px; padding: 16px; max-width: 1180px; margin: 0 auto; width: 100%; }
.org-scroll .share { padding: 0; }
.share-status { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--leaf-soft); }
.share-status > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.share-status small { color: var(--ink-2); font-size: 12px; }
.share-status .switch-row { padding: 0; }
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 4px color-mix(in srgb, var(--leaf) 25%, transparent); animation: pulse2 2s infinite; flex-shrink: 0; }
.share-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.link-box { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--paper); min-width: 0; }
.link-box .mono { flex: 1; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-block { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.qr-frame { padding: 12px; border-radius: 16px; background: #FFF4DE; box-shadow: var(--shadow); --qr-fg: #13231C; --qr-bg: #FFF4DE; }
.qr { display: block; }
.qr-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; flex: 1; min-width: 180px; }
.poster-stage { display: grid; place-items: center; background: var(--paper-2); border-radius: 12px; padding: 16px; }
.poster { display: block; max-width: 100%; max-height: 420px; width: auto; height: auto; border-radius: 6px; box-shadow: var(--shadow); }
.poster-stage.post .poster { max-height: 320px; }
.ch-list { display: flex; flex-direction: column; }
.ch-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.ch-row:first-child { border-top: 0; }
.ch-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); }
.ch-name { display: flex; flex-direction: column; min-width: 0; }
.ch-name small { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-num { display: none; flex-direction: column; align-items: flex-end; }
.ch-num small { font-size: 12px; color: var(--ink-3); }
.ch-rate { font-size: 12px; color: var(--leaf); font-weight: 600; }
@container app (min-width: 760px) {
  .share { padding: 24px 32px; }
  .share-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .share-ch { grid-column: span 2; }
  .share-poster { grid-row: span 2; }
  .ch-row { grid-template-columns: 36px minmax(0, 1fr) 70px 70px 64px auto; }
  .ch-num { display: flex; }
}

/* applications */
.apps { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.apps-top { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.quota-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.qs { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); min-width: 150px; flex-shrink: 0; font-size: 12px; }
.qs span { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.qs .meter { grid-column: span 2; }
.qs.near { border-color: color-mix(in srgb, var(--lantern) 60%, var(--line)); }
.qs.full { border-color: color-mix(in srgb, var(--chili) 60%, var(--line)); }
.apps-filter { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.apps-filter .chips-scroll { flex: 1 1 100%; }
.apps-filter .search { flex: 1 1 100%; }
@container app (min-width: 760px) {
  .apps-filter .chips-scroll { flex: 1 1 0; }
  .apps-filter .search { flex: 0 1 220px; }
}
.apps-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); position: relative; }
.apps-list { overflow: auto; padding: 12px 12px 24px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.apps-detail { position: absolute; inset: 0; background: var(--paper); transform: translateX(100%); transition: transform .22s var(--ease); z-index: 5; display: flex; flex-direction: column; min-height: 0; }
.apps-split.detail-open .apps-detail { transform: none; }
/* phone: an open detail takes the whole screen above the tab bar (page header and filters step aside) */
@container app (max-width: 759px) {
  .org-main:has(.apps-split.detail-open) > .org-top { display: none; }
  .org-scroll:has(.apps-split.detail-open) { padding: 0; gap: 0; overflow: hidden; }
  .org-scroll:has(.apps-split.detail-open) > :not(:has(.detail-open)):not(.detail-open),
  .apps:has(.apps-split.detail-open) > .apps-top { display: none !important; }
  .ad-head .hstack, .ad-title > div { flex-wrap: wrap; }
}
.bulk-bar { display: flex; align-items: center; gap: 8px; padding: 4px 4px 8px; flex-wrap: wrap; }
.bulk-bar .muted { flex: 1; }
.app-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); cursor: pointer; min-width: 0; }
.app-card:hover { border-color: var(--ink-3); }
.app-card.on { border-color: var(--leaf); box-shadow: inset 3px 0 0 var(--leaf); }
.app-card.compact { padding: 12px; gap: 12px; }
.app-check { width: 18px; height: 18px; accent-color: var(--leaf); flex-shrink: 0; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.app-line1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.app-line1 b { font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.you-tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 9999px; background: var(--lantern); color: #2B1A02; white-space: nowrap; }
.app-line2 { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }
.code-chip { font-size: 12px; padding: 0 8px; border-radius: 6px; background: var(--paper-2); color: var(--ink-2); }
.code-chip.solid { background: var(--leaf-soft); color: var(--leaf); }
.app-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.flag-ic { display: inline-flex; align-items: center; gap: 4px; font: 600 12px var(--f-mono); color: var(--lantern-ink); }
.app-detail { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ad-head { display: flex; gap: 12px; align-items: flex-start; padding: 16px 16px; border-bottom: 1px solid var(--line); }
.ad-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ad-title h2 { font-size: 18px; font-weight: 700; }
.ad-title p { font-size: 12px; color: var(--ink-3); }
.ad-body { flex: 1; overflow: auto; padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.ad-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ad-sec { display: flex; flex-direction: column; gap: 8px; }
.ad-sec h4 { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .02em; }
.menu-list { margin: 0; padding-left: 16px; color: var(--ink-2); font-size: 12px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checks li { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; padding: 8px 12px; border-radius: 12px; background: var(--paper-2); }
.checks li .ic { margin-top: 2px; }
.checks li.leaf { background: var(--leaf-soft); } .checks li.leaf .ic { color: var(--leaf); }
.checks li.lantern { background: var(--lantern-soft); } .checks li.lantern .ic { color: var(--lantern-ink); }
.checks li.chili { background: var(--chili-soft); } .checks li.chili .ic { color: var(--chili); }
.checks li.wait { color: var(--ink-3); }
.history { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.history div { display: flex; flex-direction: column; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); min-width: 0; }
.history b { font-size: 16px; }
.history span { font-size: 12px; color: var(--ink-3); }
.history.small { grid-template-columns: repeat(3, 1fr); }
.ad-choices { display: flex; flex-direction: column; gap: 8px; }
.choice-row { display: grid; grid-template-columns: 22px 54px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); text-align: left; }
.choice-row.on { border-color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); }
.choice-row.no { opacity: .6; }
.cr-n { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 700 12px/22px var(--f-mono); text-align: center; }
.cr-z { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-st { font-size: 12px; font-weight: 600; }
.cr-st.leaf { color: var(--leaf); } .cr-st.lantern { color: var(--lantern-ink); } .cr-st.chili { color: var(--chili); }
.ad-map { height: 150px; background: var(--paper-2); border-radius: 12px; padding: 8px; }
.ad-cost { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 12px; border-radius: 12px; background: var(--paper-2); font-size: 12px; }
.ad-cost b { font-size: 16px; }
.ad-cost small { color: var(--ink-3); grid-column: span 2; }
.ad-actions { display: flex; gap: 8px; padding: 12px 12px 16px; border-top: 1px solid var(--line); background: var(--card); flex-wrap: wrap; justify-content: flex-end; }
.ad-actions .btn.primary { flex: 1 1 100%; order: -1; height: 44px; }
.confirm-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.confirm-sum div { display: flex; flex-direction: column; padding: 12px; border-radius: 12px; background: var(--paper-2); }
.confirm-sum span { font-size: 12px; color: var(--ink-3); }
.msg-preview { padding: 12px; border-radius: 12px; background: var(--leaf-soft); font-size: 12px; }
.msg-preview small { font-size: 12px; color: var(--leaf); font-weight: 700; }
.reason-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.offer-map .mapview { height: 360px; }
.compare-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.cmp-col { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); }
.cmp-col .hstack div { display: flex; flex-direction: column; }
.board { flex: 1; min-height: 0; display: flex; gap: 12px; overflow-x: auto; padding: 16px 16px; }
.board-col { flex: 0 0 260px; display: flex; flex-direction: column; gap: 8px; min-height: 0; background: var(--paper-2); border-radius: 16px; padding: 12px; }
.board-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 2px 4px; }
.board-list { display: flex; flex-direction: column; gap: 8px; overflow: auto; min-height: 0; }
.board .app-card .app-right .countdown { font-size: 12px; }
.ad-back { display: inline-grid; }
@container app (min-width: 760px) {
  .apps-top { padding: 16px 32px; }
  .apps-split { grid-template-columns: minmax(340px, 430px) minmax(0, 1fr); }
  .apps-list { border-right: 1px solid var(--line); padding: 16px 16px 24px 32px; }
  .apps-detail { position: relative; transform: none; z-index: auto; }
  .ad-back { display: none; }
  .ad-head { padding: 16px 24px; }
  .ad-body { padding: 16px 24px 24px; }
  .ad-actions { padding: 12px 24px; flex-wrap: nowrap; }
  .ad-actions .btn.primary { flex: 0 0 auto; order: 0; height: 38px; }
  .ad-photos .photo { aspect-ratio: 16 / 10; }
  .compare-grid { grid-template-columns: 1fr 1fr; }
  .board { padding: 16px 32px; }
}

/* payments */
.stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pay-tabs .tabs { border-bottom: 1px solid var(--line); }
.pay-list { display: flex; flex-direction: column; gap: 8px; }
.pay-head { display: none; }
.pay-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "shop st" "paid act"; gap: 8px 12px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); align-items: center; }
.pay-row.needs { border-color: color-mix(in srgb, var(--lantern) 60%, var(--line)); }
.pr-shop { grid-area: shop; display: flex; align-items: center; gap: 12px; min-width: 0; }
.pr-shop > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.pr-shop b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-shop small { font-size: 12px; color: var(--ink-3); }
.pr-code, .pr-plan { display: none; }
.pr-paid { grid-area: paid; display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; }
.pr-paid small { color: var(--ink-3); font-size: 12px; }
.pr-st { grid-area: st; justify-self: end; }
.pr-act { grid-area: act; display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.slip-check { display: grid; grid-template-columns: 1fr; gap: 16px; }
.slip-art { position: relative; border-radius: 16px; padding: 16px; background: #F1F8F4; color: #1A2A22; box-shadow: inset 0 0 0 1px #D5E6DC; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.slip-top { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-bottom: 8px; border-bottom: 1px dashed #C9DCD1; }
.slip-bank { width: 34px; height: 34px; border-radius: 50%; background: #2E8B57; margin-bottom: 4px; }
.slip-top small { color: #5B6F64; font-size: 12px; }
.slip-amt { font-size: 24px; font-weight: 600; text-align: center; padding: 8px 0; }
.slip-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.slip-row small { color: #5B6F64; }
.slip-stamp { position: absolute; right: -28px; top: 18px; transform: rotate(35deg); background: var(--chili); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 32px; letter-spacing: .1em; }
@container app (min-width: 760px) {
  .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pay-head { display: grid; grid-template-columns: minmax(0, 1.6fr) 70px 110px minmax(0, 1.2fr) 150px 190px; gap: 12px; padding: 0 16px; font-size: 12px; color: var(--ink-3); font-weight: 600; }
  .pay-row { grid-template-columns: minmax(0, 1.6fr) 70px 110px minmax(0, 1.2fr) 150px 190px; grid-template-areas: none; padding: 12px 16px; }
  .pr-shop, .pr-paid, .pr-st, .pr-act { grid-area: auto; }
  .pr-code, .pr-plan { display: block; font-size: 12px; }
  .pr-st { justify-self: start; }
  .slip-check { grid-template-columns: 240px 1fr; align-items: start; }
}

/* live map */
.live { display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1; }
.live-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.live-bar .chips-scroll { flex: 1; }
.live-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; flex: 1; min-height: 0; }
.live-map { height: 420px; }
.live-side { display: flex; flex-direction: column; gap: 12px; }
.live-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
/* phone: dates on one swipeable row, areas as a full-width switch, map uses the height it has */
@container app (max-width: 759px) {
  .live-bar { gap: 8px; }
  .live-bar .chips-scroll { flex: 1 1 100%; min-width: 0; }
  .live-bar > .seg { flex: 1 1 100%; }
  .live-bar > .seg button { flex: 1; }
  .live-map { height: min(480px, 62cqh); min-height: 320px; }
  .live-side > .empty { flex-direction: row; padding: 12px 12px; gap: 12px; text-align: left; }
  .live-side > .empty p { display: none; }
}
.lc-head { display: flex; align-items: baseline; gap: 12px; }
.lc-head b { font-size: 20px; }
.lc-head span { font-size: 12px; color: var(--ink-3); }
.lc-shop { display: flex; align-items: center; gap: 12px; }
.lc-shop div { display: flex; flex-direction: column; }
.lc-shop small { font-size: 12px; color: var(--ink-3); }
.lc-list { display: flex; flex-direction: column; gap: 4px; }
.lc-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 8px; background: var(--paper-2); font-size: 12px; font-weight: 600; text-align: left; }
.doc-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.doc-preview { display: grid; place-items: start center; }
.doc-side { display: flex; flex-direction: column; gap: 12px; }
.doc-side h3 { font-size: 16px; }
@container app (min-width: 760px) {
  .live-split { grid-template-columns: minmax(0, 1fr) 300px; }
  .live-map { height: auto; min-height: 520px; }
  .doc-split { grid-template-columns: minmax(0, 1fr) 320px; }
}

/* ---------- operations: move, vacancies, cancel & refund, P&L, phone sales ---------- */
.lantern-text { color: var(--lantern-ink); }
.pill.cancelled, .pill.cancelReq { background: var(--chili-soft); color: var(--chili-ink); }
.lc-head .icon-btn { margin-left: auto; flex-shrink: 0; }
.lc-head b { white-space: nowrap; }
.lc-head span { min-width: 0; }
.lc-hold { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.lc-hold:first-of-type { border-top: 0; padding-top: 0; }
.lc-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.move-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 12px; border-radius: 12px; background: var(--lantern-soft); color: var(--lantern-ink); font-size: 12px; }
.move-bar > span { flex: 1 1 220px; min-width: 0; }
.live-map.moving { box-shadow: 0 0 0 2px var(--lantern); border-radius: 16px; }
.move-sum { display: flex; flex-direction: column; gap: 12px; }
.move-row { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 12px; background: var(--paper-2); }
.move-row b { font-size: 16px; }
.move-row span { margin-left: auto; font-size: 12px; color: var(--ink-2); text-align: right; }

.dash-grid.two { margin-top: 16px; }
.vac-panel { gap: 12px; }
.vac-day { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.vac-day:nth-of-type(1) { border-top: 0; padding-top: 0; }
.vac-date { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.vac-n { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 9999px; background: var(--leaf-soft); color: var(--leaf); }
.vac-n.full { background: var(--paper-2); color: var(--ink-3); }
.vac-codes { display: flex; flex-wrap: wrap; gap: 4px; }
.vac-code { font-size: 12px; padding: 2px 8px; border-radius: 6px; border: 1px dashed var(--leaf); color: var(--ink-2); }
.vac-code.more { border-style: solid; border-color: var(--line-2); color: var(--ink-3); }

.vgrid-wrap { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.vgrid-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.vgrid-tools .chips-scroll { flex: 1 1 100%; min-width: 0; }
.vgrid-scroll { overflow: auto; max-height: 560px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.vgrid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.vgrid th, .vgrid td { padding: 4px; border-bottom: 1px solid var(--line); text-align: center; }
.vgrid thead th { position: sticky; top: 0; z-index: 2; background: var(--card-2); font-weight: 600; white-space: nowrap; padding: 8px 8px; }
.vgrid thead th small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.vgrid tbody th { position: sticky; left: 0; z-index: 1; background: var(--card); text-align: left; padding: 4px 12px; white-space: nowrap; }
.vgrid tbody th small { margin-left: 8px; font-size: 12px; color: var(--ink-3); }
.vgrid tbody tr.on th, .vgrid tbody tr.on td { background: var(--leaf-soft); }
.vgrid tfoot th, .vgrid tfoot td { position: sticky; bottom: 0; background: var(--card-2); border-bottom: 0; padding: 8px 8px; }
.vgrid tfoot th { text-align: left; padding-left: 12px; }
.vg-cell { width: 100%; min-width: 74px; height: 32px; padding: 0 8px; border-radius: 8px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid transparent; }
.vg-free { border: 1.5px dashed var(--leaf); color: var(--leaf); background: transparent; }
.vg-free:hover { background: var(--leaf-soft); }
.vg-pending { background: var(--lantern-soft); color: var(--lantern-ink); }
.vg-approved { background: var(--leaf-soft); color: var(--leaf); }
.vg-paid { background: var(--leaf); color: var(--leaf-ink); }
.vg-closed, .vg-reserved { color: var(--ink-3); background: repeating-linear-gradient(135deg, var(--paper-2) 0 6px, transparent 6px 12px); border-color: var(--line); }
.vg-none { padding: 24px !important; color: var(--ink-3); }

.refunds { display: flex; flex-direction: column; gap: 8px; }
.refund-sum { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); padding: 4px 2px 8px; }
.refund-sum b { color: var(--ink); font-size: 14px; margin-right: 4px; }
.refund-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "tile main amt" "tile act act"; gap: 8px 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.refund-row.needs { border-color: var(--lantern); box-shadow: inset 3px 0 0 var(--lantern); }
.refund-row > .shop-tile { grid-area: tile; }
.rf-main { grid-area: main; display: flex; flex-direction: column; min-width: 0; }
.rf-main small { font-size: 12px; color: var(--ink-3); }
.rf-amt { grid-area: amt; display: flex; flex-direction: column; align-items: flex-end; }
.rf-amt small { font-size: 12px; color: var(--ink-3); }
.rf-act { grid-area: act; display: flex; justify-content: flex-end; }
@container app (min-width: 760px) {
  .refund-row { grid-template-columns: auto minmax(0, 1fr) auto 150px; grid-template-areas: "tile main amt act"; }
}
.cx-body { display: flex; flex-direction: column; gap: 16px; }
.cx-money { padding: 8px 12px; border-radius: 12px; background: var(--paper-2); }
.cx-money .pv-row span.small { text-align: right; max-width: 60%; }

.pnl-stats { margin-bottom: 16px; }
.pnl-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.pnl-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pnl-sheet { gap: 4px; }
.pnl-sheet h3 { margin-bottom: 8px; }
.pnl-group { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.pnl-group .link-btn { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; letter-spacing: 0; font-weight: 600; }
.pnl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; font-size: 12px; color: var(--ink-2); }
.pnl-row span { display: flex; flex-direction: column; min-width: 0; }
.pnl-row small { font-size: 12px; color: var(--ink-3); }
.pnl-row b { color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pnl-row.sum { border-top: 1px dashed var(--line-2); font-weight: 700; color: var(--ink); }
.pnl-row.net { margin-top: 8px; padding: 12px 12px; border-radius: 12px; background: var(--leaf-soft); color: var(--leaf); font-weight: 700; }
.pnl-row.net b { color: var(--leaf); font-size: 18px; }
.pnl-row.net.loss { background: var(--chili-soft); color: var(--chili-ink); }
.pnl-row.net.loss b { color: var(--chili); }
.pnl-cost { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 8px; align-items: center; padding: 4px 0; }
.input.sm { height: 34px; font-size: 12px; }
.num.sm { height: 34px; }
.pnl-notes { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.pnl-notes span { display: flex; gap: 8px; align-items: flex-start; }
.pnl-bars { display: flex; flex-direction: column; gap: 12px; }
.pnl-bars > div { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 12px; }
.pnl-bars .bar { height: 12px; border-radius: 9999px; background: var(--paper-2); overflow: hidden; }
.pnl-bars .bar i { display: block; height: 100%; border-radius: inherit; }
.pnl-bars .bar i.leaf { background: var(--leaf); }
.pnl-bars .bar i.chili { background: var(--chili); }
.be { display: flex; flex-direction: column; gap: 24px; margin-top: 16px; }
.be-track { position: relative; height: 12px; border-radius: 9999px; background: var(--paper-2); }
.be-track > i { display: block; height: 100%; border-radius: inherit; background: var(--lantern); }
.be-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.be-mark small { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px; font-size: 12px; white-space: nowrap; color: var(--ink-2); }
.pnl-mini { gap: 2px; }
@container app (min-width: 760px) {
  .pnl-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
}

.ph-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; padding: 0; list-style: none; }
.ph-steps li { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 4px; border-radius: 9999px; background: var(--paper-2); font-size: 12px; color: var(--ink-2); }
.ph-steps li span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--card); font: 700 12px var(--f-mono); }
.ph-steps li.ok { background: var(--leaf-soft); color: var(--leaf); }
.ph-steps li.ok span { background: var(--leaf); color: var(--leaf-ink); }
.ph-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 24px; }
.ph-form, .ph-pick { display: flex; flex-direction: column; min-width: 0; }
.ph-known { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 12px; background: var(--leaf-soft); }
.ph-known > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ph-known small { font-size: 12px; color: var(--ink-2); }
.ph-known.bad { background: var(--chili-soft); color: var(--chili-ink); }
.ph-photo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ph-thumb { width: 56px; height: 56px; border-radius: 12px; background: center / cover no-repeat var(--paper-2); flex-shrink: 0; }
.ph-thumb.blank { display: grid; place-items: center; color: var(--ink-3); border: 1px dashed var(--line-2); }
.cat-pick.sm .cat-btn { padding: 12px 4px; }
.ph-free { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-stall { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 12px; border-radius: 12px; border: 1.5px dashed var(--leaf); background: var(--card); text-align: left; }
.ph-stall b { font-size: 14px; }
.ph-stall small { font-size: 12px; color: var(--ink-3); }
.ph-stall.req { border-color: var(--lantern); }
.ph-stall.on { border-style: solid; background: var(--leaf); color: var(--leaf-ink); }
.ph-stall.on small { color: inherit; opacity: .85; }
.ph-map { height: 300px; }
.ph-sum { padding: 8px 12px; border-radius: 12px; background: var(--paper-2); }
.ph-done { max-width: 560px; margin: 24px auto; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.ph-done-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--leaf); color: var(--leaf-ink); }
.ph-done h2 { font-size: 20px; text-wrap: balance; }
.ph-done .callout { text-align: left; width: 100%; }
@container app (min-width: 760px) {
  .ph-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ph-map { height: 340px; }
}

/* vendor: chosen stalls as a ranked list, remove button at the end of each row */
.choice-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.choice-list li { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.choice-list li.on { border-color: var(--leaf); }
.choice-list li > i { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; background: var(--ink); color: var(--paper); font: 700 12px/24px var(--f-mono); font-style: normal; text-align: center; }
.cl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.cl-main b { font-size: 14px; }
.cl-main small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cl-x { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px; color: var(--ink-3); }
.cl-x:hover { background: var(--chili-soft); color: var(--chili); }
.cl-empty { display: flex; align-items: center; gap: 8px; margin: 0; }
.pick-choices .choice-list { flex: 1 1 100%; min-width: 0; gap: 4px; }
.pick-choices .choice-list li { padding: 4px 4px 4px 8px; min-width: 0; }
.pick-choices .cl-main { flex-direction: row; align-items: baseline; gap: 8px; }
.pick-choices .cl-main small { flex: 1; min-width: 0; }
.pick-choices .cl-x { width: 30px; height: 30px; }
@container app (min-width: 760px) {
  .pick-choices .choice-list { display: none; }
  .pick-choices .cl-empty { display: none; }
}
.easy .choice-list li { padding: 12px 8px 12px 12px; }
.easy .cl-main b { font-size: 16px; }
.easy .cl-x { width: 42px; height: 42px; }

/* ticket (booking confirmation) */
.ticket { width: 100%; max-width: 440px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); overflow: hidden; position: relative; --qr-fg: #13231C; --qr-bg: #FFFAF1; }
.tk-top { position: relative; padding: 16px 24px 16px; background: var(--night); color: #FFF4DE; display: flex; flex-direction: column; gap: 4px; }
.tk-top .logo-word { color: #FFF4DE; }
.tk-brand { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.tk-kind { font-size: 12px; font-weight: 700; letter-spacing: .06em; padding: 4px 8px; border-radius: 9999px; background: rgba(255,244,222,.12); }
.tk-market { font-family: var(--f-display); font-weight: 400; font-size: 20px; }
.tk-place { display: flex; align-items: center; gap: 4px; font-size: 12px; color: rgba(255,244,222,.75); }
.tk-hero { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 16px 24px 8px; align-items: center; }
.tk-stall { display: flex; flex-direction: column; }
.tk-stall small { font-size: 12px; color: var(--ink-3); font-weight: 700; letter-spacing: .06em; }
.tk-stall b { font-size: 36px; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; color: var(--leaf); }
.tk-stall span { font-size: 12px; color: var(--ink-2); }
.tk-map { height: 90px; background: var(--paper-2); border-radius: 12px; padding: 4px; }
.tk-rows { margin: 0; padding: 8px 24px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.tk-rows div, .tk-money div { display: flex; flex-direction: column; min-width: 0; }
.tk-rows dt, .tk-money dt { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.tk-rows dd, .tk-money dd { margin: 0; font-size: 12px; font-weight: 600; }
.tk-perf { position: relative; height: 0; border-top: 2px dashed var(--line-2); margin: 0 16px; }
.tk-perf::before, .tk-perf::after { content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.tk-perf::before { left: -30px; } .tk-perf::after { right: -30px; }
.tk-bottom { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 16px 24px; align-items: center; }
.tk-money { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tk-money dd.ok { color: var(--leaf); }
.tk-qr { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 12px; background: #FFFAF1; box-shadow: inset 0 0 0 1px var(--line); color: #13231C; }
.tk-qr small { font-size: 12px; }
.tk-qr span { font-size: 12px; color: #5B6F64; }
.tk-note { display: flex; gap: 8px; align-items: flex-start; padding: 12px 24px 16px; font-size: 12px; color: var(--ink-3); background: var(--paper-2); }
.tk-note .ic { margin-top: 2px; }

/* ==========================================================================
   VENDOR
   ========================================================================== */
.ven-app { height: 100%; display: flex; flex-direction: column; background: var(--paper); }
.ven-top { flex-shrink: 0; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 92%, transparent); }
.ven-top-in { display: flex; align-items: center; gap: 8px; padding: 8px 12px; max-width: 1200px; margin: 0 auto; }
.ven-back { width: 34px; height: 34px; display: grid; place-items: center; margin-left: -8px; color: var(--ink); }
.ven-logo { display: inline-flex; }
.ven-title { display: none; }
.ven-links { display: none; }
.ven-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ven-bell { position: relative; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: var(--ink-2); }
.ven-bell i { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; border-radius: 9999px; background: var(--chili); color: #fff; font: 700 12px/16px var(--f-mono); font-style: normal; text-align: center; padding: 0 4px; }
.ven-me { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12px; }
.ven-me span { display: none; }
.ven-app:has(.ven-back) .ven-logo { display: none; }
.ven-app:has(.ven-back) .ven-title { display: block; font-weight: 700; font-size: 16px; }
.ven-scroll { flex: 1; min-height: 0; overflow: auto; position: relative; }
.ven-foot { position: sticky; bottom: 0; z-index: 4; background: color-mix(in srgb, var(--card) 96%, transparent); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -20px rgba(0,0,0,.4); }
@container app (min-width: 760px) {
  .ven-top-in { padding: 12px 32px; gap: 24px; }
  .ven-app:has(.ven-back) .ven-logo { display: inline-flex; }
  .ven-app:has(.ven-back) .ven-title { display: none; }
  .ven-back { display: none; }
  .ven-links { display: flex; gap: 4px; }
  .ven-links button { height: 36px; padding: 0 12px; border-radius: 8px; font-weight: 600; color: var(--ink-2); }
  .ven-links button.on, .ven-links button:hover { background: var(--paper-2); color: var(--ink); }
  .ven-me span { display: inline; }
  .ven-tabs { display: none; }
}

/* market page */
.ven-app .cover { min-height: 230px; display: flex; align-items: flex-end; }
.mp-hero { position: relative; padding: 48px 16px 64px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; max-width: 1200px; width: 100%; margin: 0 auto; }
.mp-hero h1 { font-family: var(--f-display); font-weight: 400; font-size: 30px; line-height: 1.15; }
.mp-hero p { color: rgba(255,244,222,.7); font-size: 14px; }
.from-qr { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 9999px; background: rgba(255,244,222,.14); }
.mp-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 0 16px 24px; max-width: 1200px; margin: -24px auto 0; position: relative; }
.mp-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.org-chip { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); align-self: flex-start; }
.org-chip span:last-child { display: flex; flex-direction: column; }
.org-chip small { font-size: 12px; color: var(--ink-3); }
.facts { display: grid; grid-template-columns: 1fr; gap: 2px; background: var(--line); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.facts > div { display: flex; gap: 12px; padding: 12px 16px; background: var(--card); align-items: flex-start; }
.facts .ic { color: var(--leaf); margin-top: 2px; }
.facts span { display: flex; flex-direction: column; min-width: 0; }
.facts small { color: var(--ink-3); font-size: 12px; }
.mp-sec { display: flex; flex-direction: column; gap: 12px; }
.mp-sec h2 { font-family: var(--f-display); font-weight: 400; font-size: 18px; }
.mp-sec p { color: var(--ink-2); max-width: 65ch; }
.cat-quota { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cq { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 0 12px; align-items: center; padding: 12px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.cq .ic { grid-row: span 2; color: var(--ink-3); }
.cq b { font-size: 12px; }
.cq span { font-size: 12px; color: var(--leaf); font-weight: 600; }
.cq.few span { color: var(--lantern-ink); }
.cq.full { opacity: .55; }
.cq.full span { color: var(--chili); }
.cq.mine { border-color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); }
.amen-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; padding: 4px 12px; border-radius: 9999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 8px; counter-reset: how; }
.how li { counter-increment: how; display: flex; flex-direction: column; padding: 12px 12px 12px 48px; position: relative; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.how li::before { content: counter(how); position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 700 12px/24px var(--f-mono); text-align: center; }
.how span { font-size: 12px; color: var(--ink-3); }
.mp-side { display: flex; flex-direction: column; gap: 12px; }
.mp-map { position: relative; height: 230px; border-radius: 16px; background: var(--paper-2); border: 1px solid var(--line); padding: 8px 8px 40px; cursor: pointer; }
.mp-map .legend { left: 8px; bottom: 8px; }
.price-list { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.price-list div { display: flex; align-items: center; font-size: 12px; }
.price-list div span:nth-child(2) { flex: 1; }
.book-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 16px; max-width: 1200px; margin: 0 auto; }
.book-bar small { display: block; font-size: 12px; color: var(--ink-3); }
.book-bar b { font-size: 20px; }
.book-bar b small { display: inline; font-size: 12px; }
@container app (min-width: 760px) {
  .ven-app .cover { min-height: 300px; }
  .mp-hero { padding: 80px 32px 64px; }
  .mp-hero h1 { font-size: 36px; }
  .mp-body { grid-template-columns: minmax(0, 1fr) 360px; padding: 0 32px 40px; gap: 40px; }
  .mp-side { position: sticky; top: 20px; align-self: start; margin-top: 64px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .cat-quota { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .how { grid-template-columns: repeat(4, 1fr); }
  .how li { padding: 48px 12px 12px; }
  .book-bar { padding: 12px 32px; }
}

/* explore */
.ex-head { display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 12px; max-width: 1200px; margin: 0 auto; }
.ex-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 0 16px 24px; max-width: 1200px; margin: 0 auto; }
.ex-card { display: flex; flex-direction: column; text-align: left; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.ex-card:hover { border-color: var(--ink-3); }
.ex-cover { position: relative; height: 110px; background: color-mix(in srgb, hsl(var(--h) 45% 30%) 45%, var(--night)); }
.ex-badge { position: absolute; left: 12px; bottom: 10px; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 9999px; background: var(--lantern); color: #2B1A02; }
.ex-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.ex-body > b { font-size: 14px; }
.ex-body small { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 12px; }
.ex-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tags span { font-size: 12px; padding: 2px 8px; border-radius: 9999px; background: var(--paper-2); color: var(--ink-2); }
@container app (min-width: 760px) {
  .ex-head { padding: 32px 32px 16px; }
  .ex-head .h-display { font-size: 30px; }
  .ex-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 32px 40px; gap: 16px; }
}

/* auth */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { position: relative; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 16px; padding: 48px 24px 24px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.auth-lights { color: color-mix(in srgb, var(--lantern) 50%, transparent); }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp input { height: 52px; text-align: center; font-size: 20px; font-weight: 600; border-radius: 12px; border: 1px solid var(--line-2); background: var(--paper); min-width: 0; }
.fine { font-size: 12px; color: var(--ink-3); text-align: center; }

/* profile */
.prof { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 16px 16px 24px; max-width: 1100px; margin: 0 auto; }
.prof-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mini-steps { display: flex; gap: 8px; }
.mini-steps button { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink-3); padding-top: 8px; border-top: 3px solid var(--line); text-align: left; }
.mini-steps button span { display: none; }
.mini-steps button.on { color: var(--ink); border-color: var(--leaf); }
.mini-steps button.done { border-color: var(--leaf); color: var(--ink-2); }
.cat-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cat-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.cat-btn.on { border-color: var(--leaf); background: var(--leaf-soft); color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photo-slot { position: relative; cursor: pointer; }
.ps-btn { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; background: var(--card); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.prof-preview { display: none; }
.prof-card .pc-head { display: flex; gap: 12px; align-items: center; padding: 16px 16px 0; }
.prof-card .pc-head div { display: flex; flex-direction: column; }
.prof-card .pc-head small { font-size: 12px; color: var(--ink-3); }
.prof-card > p { padding: 12px 16px; font-size: 12px; color: var(--ink-2); }
.pc-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 16px; }
.pc-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; padding: 12px 16px 16px; font-size: 12px; color: var(--ink-3); }
.pc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.step-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px 16px; max-width: 1100px; margin: 0 auto; }
@container app (min-width: 760px) {
  .prof { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; padding: 32px 32px 40px; }
  .mini-steps button span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--paper-2); font: 700 12px var(--f-mono); }
  .mini-steps button.on span { background: var(--leaf); color: var(--leaf-ink); }
  .cat-pick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .prof-preview { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 24px; align-self: start; }
  .step-foot { padding: 12px 32px; }
}

/* pick */
.ven-app.flush .ven-scroll { display: flex; flex-direction: column; }
.pick { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.pick-map { position: relative; display: flex; flex-direction: column; min-height: 0; padding: 12px 12px 0; gap: 8px; }
.pick-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pick-tools .switch-row { padding: 0; gap: 8px; }
.pick-tools .switch-text span { font-size: 12px; }
.date-btn { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line-2); text-align: left; }
.date-btn span { display: flex; flex-direction: column; }
.date-btn b { font-size: 12px; }
.date-btn small { font-size: 12px; color: var(--ink-3); }
.pick-mapview { flex: 1; min-height: 360px; }
.pick-sheet { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 6; animation: rise .2s var(--ease); }
.pick-side { display: none; }
.stall-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.sc-head { display: flex; align-items: center; gap: 12px; }
.sc-head > b { font-size: 24px; }
.sc-head .zone-chip { margin-right: auto; height: 26px; font-size: 12px; }
.sc-facts { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--ink-2); }
.sc-facts span { display: inline-flex; align-items: center; gap: 8px; }
.sc-status { font-size: 12px; font-weight: 600; padding: 8px 12px; border-radius: 12px; }
.sc-status.leaf { background: var(--leaf-soft); color: var(--leaf); }
.sc-status.lantern { background: var(--lantern-soft); color: var(--lantern-ink); }
.sc-status.chili { background: var(--chili-soft); color: var(--chili-ink); }
.pick-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ch ch" "tot btn"; gap: 8px 12px; align-items: center; padding: 12px 16px 16px; }
.pick-choices { grid-area: ch; display: flex; gap: 8px; flex-wrap: wrap; min-height: 28px; align-items: center; }
.pick-total { grid-area: tot; display: flex; flex-direction: column; }
.pick-total small { font-size: 12px; color: var(--ink-3); }
.pick-total b { font-size: 18px; }
.pick-bar .btn { grid-area: btn; }
.pc-chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 4px 0 4px; border-radius: 9999px; background: var(--paper-2); border: 1px solid var(--line); font-size: 12px; }
.pc-chip i { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 700 12px/20px var(--f-mono); font-style: normal; text-align: center; }
.pc-chip button { width: 20px; height: 20px; display: grid; place-items: center; color: var(--ink-3); }
.date-pick { display: flex; flex-direction: column; gap: 12px; }
.date-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.date-cell { display: flex; flex-direction: column; align-items: center; padding: 4px 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); line-height: 1.2; }
.date-cell small { font-size: 12px; color: var(--ink-3); }
.date-cell b { font: 600 14px var(--f-mono); }
.date-cell.on { background: var(--leaf); border-color: var(--leaf); color: var(--leaf-ink); }
.date-cell.on small { color: inherit; opacity: .8; }
.date-open { display: flex; align-items: center; gap: 8px; margin: 0; }
.ok-text { color: var(--leaf); font-weight: 600; }
/* vendor: an event has few days, so give each one a big tap target */
.ev-days.few { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.ev-days.few .date-cell { padding: 8px 4px; }
.ev-days.few .date-cell b { font-size: 18px; }
.ev-days.few .date-cell small { font-size: 12px; }
/* organizer: month calendar for picking event days */
.ev-cal { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 8px 12px 12px; max-width: 380px; }
.ev-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.ev-cal-head b { font-size: 14px; text-align: center; }
.ev-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ev-dow { text-align: center; font-size: 12px; color: var(--ink-3); padding: 2px 0 4px; }
.ev-day { aspect-ratio: 1; max-width: 100%; border-radius: 12px; border: 1px solid transparent; background: transparent; font: 600 14px var(--f-mono); color: var(--ink); cursor: pointer; }
.ev-day:hover:not(:disabled) { background: var(--leaf-soft); }
.ev-day.today { border-color: var(--line-2); }
.ev-day.on { background: var(--leaf); color: var(--leaf-ink); border-color: var(--leaf); }
.ev-day:disabled { color: var(--ink-3); opacity: .45; cursor: default; }
.easy .ev-day { font-size: 16px; }
.tap-hint { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: 16px; border: 1.5px dashed var(--line-2); color: var(--ink-3); font-size: 12px; }
@container app (min-width: 760px) {
  .pick { grid-template-columns: minmax(0, 1fr) 360px; }
  .pick-map { padding: 16px 0 16px 32px; }
  .pick-sheet { display: none; }
  .pick-side { display: flex; flex-direction: column; gap: 16px; padding: 16px 32px 24px 24px; overflow: auto; min-height: 0; }
  .pick-side h3 { font-size: 14px; margin-bottom: 8px; }
  .side-stall .stall-card { box-shadow: 0 0 0 1px var(--line); }
  .pick-bar { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "ch tot btn"; padding: 12px 32px; }
  .pick-total { align-items: flex-end; }
}

/* apply */
.apply { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 16px 16px 24px; max-width: 1100px; margin: 0 auto; }
.apply-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.apply-choices { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.ac { flex: 0 0 auto; display: flex; flex-direction: column; padding: 12px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); min-width: 112px; }
.ac:first-child { border-color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); }
.ac span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.ac b { font-size: 20px; }
.ac small { font-size: 12px; color: var(--ink-3); }
.ac.add { align-items: center; justify-content: center; flex-direction: row; gap: 8px; color: var(--leaf); font-weight: 600; border-style: dashed; box-shadow: none; }
.from-profile { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 12px; background: var(--paper-2); }
.from-profile div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.from-profile small { font-size: 12px; color: var(--ink-3); }
.menu-edit { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.menu-row { display: flex; gap: 4px; width: 100%; }
.radio-cards { display: flex; flex-direction: column; gap: 8px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.radio-card.on { border-color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); }
.radio-card input { accent-color: var(--leaf); width: 18px; height: 18px; margin-top: 2px; }
.radio-card span { display: flex; flex-direction: column; }
.radio-card small { font-size: 12px; color: var(--ink-3); }
.method-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.mpill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.mpill.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.agree { font-size: 12px; }
.rules-box { padding: 12px 16px; border-radius: 12px; background: var(--paper-2); font-size: 12px; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; }
.sum-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.sum-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 8px; }
.sum-card .callout { margin-top: 8px; }
.apply-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 16px; max-width: 1100px; margin: 0 auto; }
.apply-bar small { display: block; font-size: 12px; color: var(--leaf); font-weight: 600; }
.apply-bar b { font-size: 20px; }
.apply-side { display: none; }
@container app (min-width: 760px) {
  .apply { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; padding: 32px 32px 40px; }
  .apply-side { display: block; position: sticky; top: 24px; align-self: start; }
  .apply-bar { padding: 12px 32px; }
}

/* wait */
.wait { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 16px 16px 32px; max-width: 1100px; margin: 0 auto; }
.wait-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.wait-hero { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.wait-hero > div:last-child { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.wait-hero.ok { border-color: color-mix(in srgb, var(--leaf) 45%, var(--line)); }
.wait-hero.no { border-color: color-mix(in srgb, var(--chili) 40%, var(--line)); }
.wait-hero .offer-map { width: 100%; height: 150px; background: var(--paper-2); border-radius: 12px; padding: 8px; }
.reason { font-size: 14px; color: var(--ink); padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--chili) 35%, transparent); background: var(--chili-soft); border-radius: 8px; }
.big-ic { width: 64px; height: 64px; border-radius: 24px; display: grid; place-items: center; flex-shrink: 0; }
.big-ic.leaf { background: var(--leaf); color: var(--leaf-ink); }
.big-ic.chili { background: var(--chili-soft); color: var(--chili); }
.big-ic.lantern { background: var(--lantern-soft); color: var(--lantern-ink); }
.ring { position: relative; width: 160px; height: 160px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: var(--paper-2); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--lantern); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease); }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-text b { font-size: 20px; font-weight: 600; }
.ring-text small { font-size: 12px; color: var(--ink-3); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.timeline li::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li.done::before { background: var(--leaf); }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-3); font: 700 12px var(--f-mono); flex-shrink: 0; box-shadow: inset 0 0 0 1px var(--line-2); }
.timeline li.done .tl-dot { background: var(--leaf); color: var(--leaf-ink); box-shadow: none; }
.timeline li.now .tl-dot { background: var(--lantern); color: #2B1A02; box-shadow: 0 0 0 4px var(--lantern-soft); }
.timeline li.fail .tl-dot { background: var(--chili); color: #fff; }
.timeline li div { display: flex; flex-direction: column; padding-top: 4px; }
.timeline small { font-size: 12px; color: var(--ink-3); }
.wait-side { display: flex; flex-direction: column; gap: 16px; }
.ws-choices { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ex-mini { display: flex; flex-direction: column; gap: 8px; }
.ex-mini-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-align: left; }
.ex-mini-card span:last-child { display: flex; flex-direction: column; }
.ex-mini-card small { font-size: 12px; color: var(--ink-3); }
@container app (min-width: 760px) {
  .wait { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding: 32px 32px 40px; }
  .wait-hero { flex-direction: row; align-items: center; padding: 24px; gap: 24px; }
  .wait-hero .offer-map { width: 260px; flex-shrink: 0; }
  .wait-hero .h-display { font-size: 24px; }
}

/* notifications */
.notifs { max-width: 720px; margin: 0 auto; padding: 16px 16px 32px; display: flex; flex-direction: column; gap: 16px; }
.notifs-head { display: flex; justify-content: space-between; align-items: center; }
.notif-list { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.notif { position: relative; display: flex; gap: 12px; padding: 16px; text-align: left; border-top: 1px solid var(--line); }
.notif:first-child { border-top: 0; }
.notif.unread { background: color-mix(in srgb, var(--lantern-soft) 45%, var(--card)); }
.n-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); flex-shrink: 0; }
.n-ic.leaf { background: var(--leaf); color: var(--leaf-ink); }
.n-ic.chili { background: var(--chili-soft); color: var(--chili); }
.n-ic.lantern { background: var(--lantern-soft); color: var(--lantern-ink); }
.n-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.n-text span { font-size: 12px; color: var(--ink-2); }
.n-text small { font-size: 12px; color: var(--ink-3); }
.n-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--chili); flex-shrink: 0; margin-top: 8px; }

/* pay */
.pay { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 16px 16px 32px; max-width: 1100px; margin: 0 auto; }
.pay-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pay-due { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: var(--night); color: #FFF4DE; }
.pay-due .eyebrow { color: var(--glow); }
.pay-due .muted { color: rgba(255,244,222,.65); }
.pay-amt { font-size: 36px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; margin: 4px 0; }
.pay-due .countdown { align-self: flex-start; }
.pay-methods { display: flex; flex-direction: column; gap: 16px; }
.pp { display: flex; flex-direction: column; gap: 16px; align-items: center; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.pp-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border-radius: 16px; background: #FFFAF1; --qr-fg: #13231C; --qr-bg: #FFFAF1; box-shadow: inset 0 0 0 1px var(--line); }
.pp-tag { font-size: 12px; font-weight: 700; color: var(--chili-ink); background: var(--chili-soft); padding: 2px 8px; border-radius: 9999px; }
.pp-info { display: flex; flex-direction: column; gap: 8px; }
.mini-ol { margin: 4px 0 0; padding-left: 16px; font-size: 12px; color: var(--ink-2); }
.bank-box { display: flex; flex-direction: column; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.bank-box > div { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.bank-box > div:first-child { border-top: 0; }
.bank-box small { width: 110px; color: var(--ink-3); font-size: 12px; flex-shrink: 0; }
.bank-box b { flex: 1; }
.slip-up { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.slip-up .link-btn { align-self: flex-start; }
.slip-checking, .slip-sent { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 24px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--paper-2); border-top-color: var(--leaf); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pay-side { display: flex; flex-direction: column; gap: 12px; }
@container app (min-width: 760px) {
  .pay { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding: 32px 32px 40px; }
  .pay-due { flex-direction: row; justify-content: space-between; align-items: center; padding: 24px; }
  .pp { flex-direction: row; align-items: center; }
}

/* confirm */
.confirm { display: flex; flex-direction: column; gap: 24px; padding-bottom: 32px; }
.confirm-head { position: relative; padding: 48px 16px 24px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; background: color-mix(in srgb, var(--lantern-soft) 60%, var(--paper)); }
.confirm-head .lights { color: color-mix(in srgb, var(--lantern) 60%, transparent); }
.confirm-head p { max-width: 46ch; }
.confirm-body { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 0 16px; }
.confirm-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 440px; }
@container app (min-width: 760px) {
  .confirm-head { padding: 64px 32px 24px; }
  .confirm-head .h-display { font-size: 30px; }
  .confirm-body { flex-direction: row; align-items: flex-start; justify-content: center; gap: 32px; }
  .confirm-actions { width: 280px; }
}

/* bookings */
.bookings { max-width: 760px; margin: 0 auto; padding: 16px 16px 32px; display: flex; flex-direction: column; gap: 16px; }
.bk-list { display: flex; flex-direction: column; gap: 8px; }
.bk-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: left; }
.bk-card:hover { border-color: var(--ink-3); }
.bk-date { width: 52px; display: flex; flex-direction: column; align-items: center; padding: 8px 0; border-radius: 12px; background: var(--paper-2); line-height: 1.15; flex-shrink: 0; }
.bk-date small { font-size: 12px; color: var(--ink-3); }
.bk-date b { font: 600 20px var(--f-mono); }
.bk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bk-main small { font-size: 12px; color: var(--ink-3); }

/* ==========================================================================
   FLOW OVERVIEW (outside the device frame)
   ========================================================================== */
.flow { color: var(--shell-ink); padding: 32px 24px 48px; max-width: 1400px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 32px; }
.flow-head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.flow-head h1 { font-family: var(--f-display); font-weight: 400; font-size: 30px; line-height: 1.2; }
.flow-head p { color: var(--shell-ink-2); }
.flow-scroll { min-width: 0; }
.flow-grid { display: flex; flex-direction: column; gap: 16px; }
.lane-labels { display: none; }
.phase { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; background: var(--shell-2); border: 1px solid var(--shell-line); }
.ph-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.ph-head .mono { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--glow); color: #2B1A02; font-size: 12px; }
.ph-cell { display: flex; flex-direction: column; gap: 8px; }
.ph-cell:empty { display: none; }
.fnode { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 12px; border-radius: 12px; font-size: 12px; border: 1px solid transparent; transition: transform 0.2s var(--ease), border-color 0.2s var(--ease); }
.fnode:hover { transform: translateY(-1px); }
.fnode small { font-size: 12px; opacity: .75; }
.fnode.org { background: #EFE4CF; color: #16241E; }
.fnode.org:hover { border-color: var(--glow); }
.fnode.ven { background: #2C6A49; color: #FFFAF1; }
.fnode.ven:hover { border-color: var(--glow); }
.handoff { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--glow); padding: 8px 12px; border-radius: 9999px; border: 1px dashed rgba(255,210,126,.45); }
.decisions { display: flex; flex-direction: column; gap: 16px; }
.decisions h2 { font-family: var(--f-display); font-weight: 400; font-size: 20px; }
.dec-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.dec { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; background: var(--shell-2); border: 1px solid var(--shell-line); }
.dec-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,210,126,.12); color: var(--glow); margin-bottom: 4px; }
.dec p { color: var(--shell-ink-2); font-size: 12px; line-height: 1.55; }
@media (min-width: 1000px) {
  .flow { padding: 40px 32px 64px; }
  .flow-head h1 { font-size: 36px; }
  .flow-scroll { overflow-x: auto; padding-bottom: 8px; }
  .flow-grid { flex-direction: row; gap: 12px; min-width: 1240px; align-items: stretch; }
  .lane-labels { display: flex; flex-direction: column; gap: 8px; width: 120px; flex-shrink: 0; padding-top: 48px; }
  .lane-labels > span:first-child { display: none; }
  .ll { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
  .ll small { font-weight: 400; font-size: 12px; color: var(--shell-ink-2); }
  .ll.org { height: 230px; }
  .ll.hand { height: 70px; }
  .phase { flex: 1; min-width: 0; padding: 12px; }
  .ph-head { height: 30px; }
  .ph-cell:empty { display: flex; }
  .ph-cell.org { height: 230px; overflow: auto; }
  .ph-cell.hand { height: 70px; justify-content: center; }
  .ph-cell.ven { flex: 1; }
  .handoff { border-radius: 12px; }
  .dec-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   VENDOR HOME: the one big "book a stall" button
   ========================================================================== */
.home { display: flex; flex-direction: column; }
.home-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 48px 16px 96px; color: #FFF4DE;
  background: var(--night); }
.home-hello { position: relative; display: flex; flex-direction: column; gap: 2px; }
.home-hello span { font-family: var(--f-display); font-size: 20px; line-height: 1.25; }
.home-hello small { font-size: 12px; color: rgba(255,244,222,.7); }
.big-book { position: relative; width: min(236px, 66cqi); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; margin: 24px 0 12px; -webkit-tap-highlight-color: transparent; }
.big-book:focus-visible { outline: 3px solid var(--glow); outline-offset: 18px; }
.bb-glow { position: absolute; inset: -30%; border-radius: 50%; background: color-mix(in srgb, var(--glow) 26%, transparent); animation: breathe 3.4s ease-in-out infinite; pointer-events: none; }
.bb-ring { position: absolute; inset: -9%; border-radius: 50%; border: 2px dashed rgba(255,214,140,.45); animation: spin 48s linear infinite; pointer-events: none; }
.bb-core { position: relative; width: 100%; height: 100%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #2B1A02;
  background: var(--glow);
  box-shadow: inset 0 -12px 26px rgba(150,70,0,.35), inset 0 6px 14px rgba(255,255,255,.55), 0 24px 60px -14px rgba(255,150,40,.65); transition: transform 0.2s var(--ease); }
.big-book:hover .bb-core { transform: scale(1.03); }
.big-book:active .bb-core { transform: scale(.95); }
.bb-core b { font-family: var(--f-display); font-weight: 400; font-size: 36px; line-height: 1.1; letter-spacing: -.01em; }
.bb-core small { font-size: 14px; font-weight: 700; opacity: .72; }
.awning { margin-bottom: 8px; filter: drop-shadow(0 3px 2px rgba(120,50,0,.35)); }
.aw-a rect, .aw-a path { fill: #C2432B; }
.aw-b rect, .aw-b path { fill: #FFF4DE; }
.aw-top { fill: #6E2414; }
.bb-promise { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #C8F2D8; background: rgba(93,178,132,.16); box-shadow: inset 0 0 0 1px rgba(93,178,132,.3); padding: 8px 16px; border-radius: 9999px; }
.bb-steps { position: relative; list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; font-size: 14px; color: rgba(255,244,222,.82); }
.bb-steps li { display: flex; align-items: center; gap: 8px; }
.bb-steps li + li::before { content: ""; width: 16px; height: 1px; background: rgba(255,244,222,.35); margin-right: 2px; }
.bb-steps i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,244,222,.14); font: 700 12px var(--f-mono); }
.home-hero .cover-tents { height: 60px; }
.home-below { position: relative; width: 100%; max-width: 760px; margin: -48px auto 0; padding: 0 16px 32px; display: flex; flex-direction: column; gap: 16px; }
.home-status { display: flex; align-items: center; gap: 12px; padding: 16px 16px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); text-align: left; }
.hs-ic { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); flex-shrink: 0; }
.home-status.lantern .hs-ic { background: var(--lantern-soft); color: var(--lantern-ink); }
.home-status.leaf .hs-ic { background: var(--leaf); color: var(--leaf-ink); }
.hs-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.hs-text b { font-size: 14px; }
.hs-text > span { font-size: 12px; color: var(--ink-2); }
.hs-cta { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--leaf); white-space: nowrap; }
.home-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.home-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--ink); }
.home-tile:hover { border-color: var(--ink-3); }
.home-tile small { font-weight: 500; font-size: 12px; color: var(--ink-3); }
.ht-ic { position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--leaf); }
.ht-ic i { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9999px; background: var(--chili); color: #fff; font: 700 12px/18px var(--f-mono); font-style: normal; }
.home-help { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 16px; border: 1.5px dashed var(--line-2); color: var(--ink-2); font-weight: 600; }
.home-help:hover { border-color: var(--leaf); color: var(--leaf); }
.mk-pick { display: flex; flex-direction: column; gap: 12px; }
.mk-pick-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); text-align: left; }
.mk-pick-card:hover { border-color: var(--ink-3); }
.mk-pick-card.first { border-color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); }
.mk-thumb.big { width: 56px; height: 56px; border-radius: 16px; }
.mpc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mpc-text b { font-size: 14px; }
.mpc-text small { color: var(--ink-3); font-size: 12px; }
.mpc-free { display: flex; flex-direction: column; align-items: center; min-width: 56px; }
.mpc-free b { font-size: 20px; font-weight: 600; color: var(--leaf); line-height: 1.1; }
.mpc-free small { font-size: 12px; color: var(--ink-3); }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .7; } }
.easy .bb-core b { font-size: 36px; }
.easy .bb-core small { font-size: 16px; }
.easy .bb-promise, .easy .bb-steps { font-size: 16px; }
.easy .home-tile { font-size: 16px; }
.easy .hs-text b { font-size: 18px; }
@container app (min-width: 760px) {
  .home-hero { padding: 64px 32px 96px; gap: 16px; }
  .home-hello span { font-size: 30px; }
  .big-book { width: 290px; margin: 32px 0 16px; }
  .bb-core b { font-size: 48px; }
  .home-below { margin-top: -48px; }
}

/* ==========================================================================
   MODE SWITCH (Beginner / Advanced)
   ========================================================================== */
.pbar-mode { margin-left: auto; }
.mode-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 8px; border-radius: 9999px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.mode-btn:hover { border-color: var(--ink-3); }
.mode-btn.on { background: var(--lantern-soft); border-color: var(--lantern); color: var(--lantern-ink); }
.mode-aa { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; grid-auto-flow: column; align-items: baseline; gap: 0; background: var(--paper-2); color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1; }
.mode-aa b { font-size: 14px; }
.mode-btn.on .mode-aa { background: var(--lantern); color: #2B1A02; }
.mode-aa.big { width: 44px; height: 44px; font-size: 14px; }
.mode-aa.big b { font-size: 20px; }
.ms-full { display: none; }
.ms-compact { display: inline-flex; }
@container app (min-width: 760px) { .ms-full { display: inline-flex; } .ms-compact { display: none; } }
.mode-cards-v { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-card-v { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--paper); text-align: left; }
.mode-card-v > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.mode-card-v small { font-size: 12px; color: var(--ink-3); }
.mode-card-v .mode-aa { width: 44px; height: 44px; flex-shrink: 0; }
.mode-card-v.on { border-color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); background: var(--leaf-soft); }
.form-split.single { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
/* ---------- many markets: navigation ---------- */
.nav-sep { margin: 16px 8px 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.org-side .market-switch { margin-bottom: 4px; }
.ms-dot.live { background: var(--leaf); }
.ms-dot.open { background: var(--lantern); box-shadow: 0 0 0 3px var(--lantern-soft); }
.ms-dot.draft { background: var(--ink-3); box-shadow: 0 0 0 3px var(--paper-2); }
.org-side .org-nav { margin-top: 8px; }
.mkt-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin-bottom: 4px; padding: 4px 12px 4px 8px; border-radius: 9999px; background: var(--paper-2); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }
.mkt-chip b { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mkt-chip:hover { border-color: var(--ink-3); }
.crumb-all { color: var(--ink-3); }
/* phone: the "all events" tab is in the bottom bar, so the chip shows just the market */
@container app (max-width: 759px) {
  .mkt-chip .crumb-all, .mkt-chip .crumb-all + .ic { display: none; }
  .mkt-chip { padding: 4px 12px; font-size: 12px; }
}
.mk-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--h) 60% 50%); flex-shrink: 0; font-style: normal; }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.crumbs button { color: var(--leaf); font-weight: 600; padding: 2px 0; }
.crumbs button:hover { text-decoration: underline; }
.crumbs b { color: var(--ink); }
.mini-badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 9999px; font-size: 12px; font-weight: 700; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; vertical-align: middle; }
.mini-badge.chili { background: var(--chili-soft); color: var(--chili-ink); }
.mini-badge.lantern { background: var(--lantern-soft); color: var(--lantern-ink); }
.mini-badge.leaf { background: var(--leaf-soft); color: var(--leaf); }
.pill.live { background: var(--leaf); color: var(--leaf-ink); }
.dash-grid.single { grid-template-columns: minmax(0, 1fr) !important; }
.vdb-link { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; }

/* market picker */
.mkpick { display: flex; flex-direction: column; gap: 12px; }
.mkpick-list { display: flex; flex-direction: column; gap: 8px; }
.mkpick-list.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mkpick-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); text-align: left; }
.mkpick-row:hover { border-color: var(--ink-3); }
.mkpick-row.on { border-color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); }
.mkpick-row > .ic { color: var(--ink-3); flex-shrink: 0; }
.mkp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mkp-main b { font-size: 14px; }
.mkp-main small { font-size: 12px; color: var(--ink-3); }
.mkp-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cc-hot.sm { padding: 2px 8px; font-size: 12px; }
.mkp-badge { display: flex; flex-direction: column; align-items: center; min-width: 58px; line-height: 1.15; }
.mkp-badge b { font-size: 20px; color: var(--ink); }
.mkp-badge small { font-size: 12px; color: var(--ink-3); }
.mkp-badge.hot b { color: var(--chili); }
.mkp-badge.quiet b { color: var(--ink-3); }
.apps-level { display: flex; flex-direction: column; gap: 12px; }
/* phone: drop what the header already says; give market cards a tighter, wider layout */
@container app (max-width: 759px) {
  .crumbs-dup, .apps-hint { display: none !important; }
  .mkpick-row { gap: 12px; align-items: flex-start; padding: 12px 8px 12px 12px; }
  .mkpick-row .mk-thumb { width: 32px !important; height: 32px !important; margin-top: 2px; }
  .mkpick-row > .ic { align-self: center; }
  .mkp-badge { min-width: 52px; align-self: center; }
  .mkp-badge b { font-size: 18px; }
}

/* portfolio dashboard */
.pf-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pf-kpis .stat-sub { display: flex; align-items: center; gap: 8px; }
.pf-kpis .stat-sub .meter { flex: 1; }
.attn-list { display: flex; flex-direction: column; gap: 8px; }
/* phone: the countdown sits under the text so names get the full width */
.attn-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "ic main go" "ic extra go"; column-gap: 12px; row-gap: 8px; align-items: center; padding: 12px 12px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); text-align: left; }
.attn-row .attn-ic { grid-area: ic; align-self: start; }
.attn-row .attn-main { grid-area: main; }
.attn-more { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 12px; font-weight: 600; font-size: 12px; color: var(--ink-2); border: 1px dashed var(--line-2); }
.attn-more:hover { color: var(--ink); border-color: var(--ink-3); }
@container app (max-width: 759px) { .pf-attn { padding: 12px; } }
.attn-row:not(:has(.attn-extra)) { grid-template-areas: "ic main go"; }
.attn-row:not(:has(.attn-extra)) .attn-ic { align-self: center; }
.attn-extra { grid-area: extra; justify-self: start; }
.attn-row > .ic { grid-area: go; }
@container app (min-width: 760px) {
  .attn-row { grid-template-columns: 36px minmax(0, 1fr) auto auto; grid-template-areas: "ic main extra go"; }
  .attn-row .attn-ic { align-self: center; }
}
.attn-row:hover { border-color: var(--ink-3); }
.attn-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--paper-2); color: var(--ink-2); }
.attn-row.chili .attn-ic { background: var(--chili-soft); color: var(--chili); }
.attn-row.lantern .attn-ic { background: var(--lantern-soft); color: var(--lantern-ink); }
.attn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.attn-main b { font-size: 14px; }
.attn-main small { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.attn-row > .ic { color: var(--ink-3); flex-shrink: 0; }
.pf-markets { display: flex; flex-direction: column; gap: 12px; }
.pf-head { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.pf-head h3 { font-size: 16px; }
.pf-head .chips-scroll { flex: 1 1 260px; }
.pf-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sort-sel { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.sort-sel select { height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); padding: 0 8px; font-size: 12px; }
.pf-table { display: flex; flex-direction: column; gap: 8px; }
.pf-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name go" "next next" "occ pend" "pay rev"; gap: 8px 12px; align-items: center; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); cursor: pointer; text-align: left; }
.pf-row:hover { border-color: var(--ink-3); }
.pf-row.active { box-shadow: inset 3px 0 0 var(--leaf); }
.pf-row.head { display: none; }
.pf-name { grid-area: name; display: flex; align-items: center; gap: 12px; min-width: 0; }
.pf-name > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.pf-name b { font-size: 14px; }
.pf-name small { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-3); }
.st-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.st-dot.live { background: var(--leaf); }
.st-dot.open { background: var(--lantern); }
.pf-next { grid-area: next; font-size: 12px; color: var(--ink-2); }
.pf-occ { grid-area: occ; display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.pf-pend { grid-area: pend; justify-self: end; }
.pf-pay { grid-area: pay; display: flex; gap: 8px; flex-wrap: wrap; }
.pf-rev { grid-area: rev; justify-self: end; display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; }
.pf-go { grid-area: go; color: var(--ink-3); }
.lbl { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.pf-next .lbl { margin-right: 8px; }
.pend-btn { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: 9999px; background: var(--lantern-soft); color: var(--lantern-ink); font-size: 12px; font-weight: 600; white-space: nowrap; }
.pend-btn b { font-size: 14px; }
.pend-btn.hot { background: var(--chili-soft); color: var(--chili-ink); }
.pend-btn.hot span { font-weight: 700; }
.pend-btn:hover { filter: brightness(.97); }
.cal-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.cal { display: grid; min-width: max-content; }
.cal-corner, .cal-day { position: sticky; top: 0; background: var(--card-2); border-bottom: 1px solid var(--line); }
.cal-corner { left: 0; z-index: 2; padding: 8px 12px; font-size: 12px; font-weight: 700; color: var(--ink-3); display: flex; align-items: flex-end; }
.cal-day { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 8px 0; line-height: 1.15; }
.cal-day small { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.cal-day b { font: 600 12px var(--f-mono); }
.cal-day.wk, .cal-cell.wk { background: color-mix(in srgb, var(--lantern-soft) 35%, var(--card)); }
.cal-day.today b { color: #fff; background: var(--chili); border-radius: 6px; padding: 0 4px; }
.cal-name { position: sticky; left: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; background: var(--card); border-top: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-name:hover { color: var(--leaf); }
.cal-cell { height: 38px; display: grid; place-items: center; border-top: 1px solid var(--line); }
.cal-cell.today { box-shadow: inset 2px 0 0 color-mix(in srgb, var(--chili) 50%, transparent); }
.cal-dot { width: 18px; height: 18px; border-radius: 6px; background: hsl(var(--h) 60% 50%); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.cal-dot:hover { transform: scale(1.15); }
@container app (min-width: 760px) {
  .pf-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pf-row { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.3fr) minmax(0, 1fr) 128px minmax(0, 1fr) minmax(0, 1.1fr) 24px; grid-template-areas: none; padding: 12px 16px; border-radius: 12px; }
  .pf-row > span { grid-area: auto !important; }
  .pf-row.head { display: grid; background: transparent; border: 0; padding: 0 16px; cursor: default; font-size: 12px; font-weight: 600; color: var(--ink-3); }
  .pf-row .lbl { display: none; }
  .pf-pend, .pf-rev { justify-self: start; }
  .pf-rev { align-items: flex-start; }
}

/* category groups (main → sub) */
.cat-groups { display: flex; flex-direction: column; gap: 16px; }
.cat-group { display: flex; flex-direction: column; gap: 12px; }
.cg-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cg-head h4 { font-size: 16px; }
.cg-head .cc-ic { width: 32px; height: 32px; border-radius: 12px; }

/* vendor database */
.grp-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@container app (max-width: 759px) {
  .grp-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .grp-filter::-webkit-scrollbar { display: none; }
  .grp-filter > * { flex-shrink: 0; }
}
.grp-sep { color: var(--ink-3); display: inline-flex; }
.chip.chili.on { background: var(--chili); border-color: var(--chili); color: #fff; }
/* the list switches to a table only when the list itself is wide enough, not the whole screen */
.apps-split.vdb .apps-list { container: vlist / inline-size; }
.v-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: "shop shop st" "cat mk on"; gap: 8px 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: left; width: 100%; }
.v-row > span { min-width: 0; }
.v-row:hover { border-color: var(--ink-3); }
.v-row.on { border-color: var(--leaf); box-shadow: inset 3px 0 0 var(--leaf); }
.v-row.black { background: color-mix(in srgb, var(--chili-soft) 40%, var(--card)); }
.v-row.head { display: none; }
.v-shop { grid-area: shop; display: flex; align-items: center; gap: 12px; min-width: 0; }
.v-shop > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.v-shop b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-shop small { font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.v-cat { grid-area: cat; font-size: 12px; line-height: 1.5; }
.v-mk { grid-area: mk; font-size: 12px; line-height: 1.5; display: flex; align-items: baseline; gap: 8px; }
.v-mk small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-on { grid-area: on; justify-self: end; font-size: 12px; }
.v-on::after { content: " ตรงเวลา"; font-family: var(--f-ui); font-size: 12px; color: var(--ink-3); }
.v-st { grid-area: st; justify-self: end; }
.contact-rows { display: flex; flex-direction: column; gap: 8px; }
.contact-rows > div { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; background: var(--paper-2); }
.contact-rows > div span { flex: 1; }
.vh-list { display: flex; flex-direction: column; gap: 8px; }
.vh-row { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); text-align: left; }
.vh-row:hover { border-color: var(--ink-3); }
.vh-row > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vh-row small { font-size: 12px; color: var(--ink-3); }
.v-note { padding: 12px 12px; border-radius: 12px; background: var(--lantern-soft); }
.v-note p { font-size: 12px; color: var(--ink); }
.note-add { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
@container app (min-width: 760px) {
  .apps-split.vdb { grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr); }
}
@container vlist (min-width: 680px) {
  .v-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1.3fr) 64px 110px; grid-template-areas: none; padding: 12px 12px; border-radius: 12px; }
  .v-row > span { grid-area: auto !important; justify-self: start !important; }
  .v-row.head { display: grid; background: transparent; border: 0; padding: 0 12px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
  .v-on::after { content: none; }
}

/* excel import */
.imp-1 { display: flex; flex-direction: column; gap: 12px; }
.imp-map { display: flex; flex-direction: column; gap: 12px; }
.map-row { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 12px 12px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.map-field { font-weight: 600; font-size: 14px; }
.req { color: var(--chili); margin-left: 2px; }
.map-sample { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-3 { display: flex; flex-direction: column; gap: 12px; }
.imp-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.imp-sum > div { display: flex; flex-direction: column; padding: 12px; border-radius: 12px; background: var(--paper-2); }
.imp-sum b { font-size: 20px; }
.imp-sum span { font-size: 12px; color: var(--ink-3); }
.imp-sum .leaf b { color: var(--leaf); }
.imp-sum .lantern b { color: var(--lantern-ink); }
.imp-sum .chili b { color: var(--chili); }
@container app (min-width: 760px) { .map-row { grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr); align-items: center; } }

/* applications by product category */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.apps-split.no-cat { grid-template-columns: minmax(0, 1fr) !important; }
.apps-split.no-cat .apps-detail { display: none; }
.apps-split.no-cat .apps-list { border-right: 0; }
.cat-card { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.cat-card:hover { border-color: var(--ink-3); box-shadow: var(--shadow); }
.cat-card.quiet { opacity: .7; }
.cc-top { display: flex; align-items: center; gap: 12px; }
.cc-top b { flex: 1; font-size: 16px; }
.cc-top > .ic { color: var(--ink-3); }
.cc-ic { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; background: var(--paper-2); color: var(--leaf); flex-shrink: 0; }
.cc-count { font-size: 14px; color: var(--ink-2); }
.cc-count b { font-size: 24px; color: var(--ink); margin-right: 4px; }
.cc-hot { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 9999px; background: var(--chili-soft); color: var(--chili-ink); }
.cc-calm { font-size: 12px; color: var(--ink-3); }
.cc-quota { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
/* phone: three short rows instead of a tall card — name + count / repeat-warning + quota / meter */
@container app (max-width: 759px) {
  .cat-grid { gap: 8px; }
  .cat-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px 16px; border-radius: 16px; }
  .cat-card .cc-top { grid-column: 1; grid-row: 1; }
  .cat-card .cc-top > .ic { display: none; }
  .cat-card .cc-ic { width: 34px; height: 34px; border-radius: 12px; }
  .cat-card .cc-count { grid-column: 2; grid-row: 1; justify-self: end; font-size: 12px; white-space: nowrap; }
  .cat-card .cc-count b { font-size: 20px; }
  .cat-card .cc-hot, .cat-card .cc-calm { grid-column: 1; grid-row: 2; justify-self: start; }
  .cat-card .cc-quota { grid-column: 2; grid-row: 2; margin: 0; gap: 8px; justify-self: end; }
  .cat-card .meter { grid-column: 1 / -1; grid-row: 3; }
}
.cat-detail { display: flex; flex-direction: column; gap: 16px; }
.cd-head { display: flex; flex-direction: column; gap: 8px; }
.cd-back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--leaf); padding: 4px 0; }
.cd-head h3 { display: flex; align-items: center; gap: 12px; font-size: 20px; }
.stall-group { border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.stall-group.hot { border-color: color-mix(in srgb, var(--chili) 45%, var(--line)); }
.sg-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card-2); border-bottom: 1px solid var(--line); }
.sg-code { min-width: 58px; height: 42px; padding: 0 8px; border-radius: 12px; display: grid; place-items: center; font-size: 14px; font-weight: 600; background: color-mix(in srgb, var(--zc) 16%, var(--card)); box-shadow: inset 0 3px 0 var(--zc); }
.sg-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sg-meta b { font-size: 12px; }
.sg-meta small { font-size: 12px; color: var(--ink-3); }
.sg-count { display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--ink-3); line-height: 1.2; }
.sg-count b { font-size: 20px; color: var(--ink-2); }
.sg-count.hot b { color: var(--chili); }
.sg-taken { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 16px; font-size: 12px; background: var(--chili-soft); color: var(--chili-ink); }
.sg-list { display: flex; flex-direction: column; }
.sg-shop { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-align: left; border-top: 1px solid var(--line); }
.sg-shop:first-child { border-top: 0; }
.sg-shop:hover { background: var(--paper); }
.sg-shop.on { background: var(--leaf-soft); box-shadow: inset 3px 0 0 var(--leaf); }
.sgs-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sgs-main b { font-size: 14px; }
.sgs-main small { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sgs-meta { display: flex; align-items: center; gap: 8px; }
.rank { font-weight: 700; padding: 0 8px; border-radius: 9999px; background: var(--paper-2); color: var(--ink-2); }
.rank.first { background: var(--ink); color: var(--paper); }
.sg-shop .countdown { flex-shrink: 0; }
/* phone: the countdown drops under the shop text so the name keeps the width */
@container app (max-width: 759px) {
  .sg-shop { display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "tile main" "tile cd"; column-gap: 12px; row-gap: 8px; align-items: start; }
  .sg-shop > .shop-tile { grid-area: tile; }
  .sg-shop > .sgs-main { grid-area: main; }
  .sg-shop > .countdown { grid-area: cd; justify-self: start; }
  .cd-head p { display: none; }
}
.easy .cc-top b { font-size: 18px; }
.easy .sgs-main b { font-size: 16px; }
.easy .sgs-main small { font-size: 14px; }
.easy .sg-shop { padding: 16px 16px; }
@container app (min-width: 760px) {
  .apps-split.by-cat { grid-template-columns: minmax(380px, 470px) minmax(0, 1fr); }
  .apps-split.by-cat .apps-list { padding-top: 24px; }
  .apps-split.no-cat .apps-list { padding: 24px 32px; }
}

/* appliances in watts */
.watt { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.watt > .btn { align-self: flex-start; }
.watt-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); }
.watt-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px auto; gap: 12px; align-items: center; padding: 8px 12px 8px 16px; border-top: 1px solid var(--line); }
.watt-row:first-child { border-top: 0; }
.watt-row.on { background: color-mix(in srgb, var(--lantern-soft) 45%, var(--card)); }
.watt-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watt-row .input.bare { height: 36px; padding: 0 4px; }
.watt-w { height: 34px; }
.watt-row .stepper-num button { width: 34px; height: 34px; }
.watt-row .stepper-num span { min-width: 26px; }
.watt-row:not(.on) .stepper-num span { color: var(--ink-3); }
.watt-total { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--leaf-soft); color: var(--leaf); }
.watt-total div { display: flex; flex-direction: column; }
.watt-total b { font-size: 20px; color: var(--ink); }
.watt-total span { font-size: 12px; color: var(--ink-2); }
.watt-total.warn { background: var(--lantern-soft); color: var(--lantern-ink); }
.sc-warn { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; padding: 8px 12px; border-radius: 12px; background: var(--lantern-soft); color: var(--lantern-ink); }
.sc-warn .ic { margin-top: 2px; }
.watt-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); padding: 8px 12px; border-radius: 12px; background: var(--paper-2); }
.watt-line .ic { color: var(--lantern); }
.watt-line.warn { background: var(--lantern-soft); color: var(--lantern-ink); }
.easy .watt-row { padding: 12px 12px 12px 16px; }
.easy .watt-name { font-size: 16px; }
.easy .watt-row .stepper-num button { width: 44px; height: 44px; }
.easy .watt-w { height: 44px; }
.date-sum { display: flex; align-items: center; gap: 8px; padding: 12px 12px; border-radius: 12px; background: var(--leaf-soft); color: var(--ink-2); }
.easy-steps { margin: 0; padding: 16px 16px 16px 32px; border-radius: 12px; background: var(--paper); display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }

/* ---------- Beginner mode: bigger type and targets, stronger contrast ---------- */
.device-screen.easy { --ink-3: var(--ink-2); --line: var(--line-2); font-size: 16px; line-height: 1.6; }
.easy .btn { height: 50px; padding: 0 24px; font-size: 16px; border-radius: 16px; gap: 8px; }
.easy .btn .ic { width: 20px; height: 20px; }
.easy .btn.sm { height: 42px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
.easy .btn.lg { height: 58px; font-size: 18px; }
.easy .icon-btn { width: 44px; height: 44px; }
.easy .icon-btn .ic { width: 22px; height: 22px; }
.easy .input { height: 52px; font-size: 16px; border-radius: 12px; border-width: 1.5px; }
.easy .input.lg { height: 58px; font-size: 18px; }
.easy textarea.input { height: auto; }
.easy .num { height: 48px; font-size: 16px; }
.easy .field { gap: 8px; }
.easy .field-label { font-size: 16px; color: var(--ink); }
.easy .field-hint, .easy .muted.small, .easy .small, .easy small { font-size: 14px; }
.easy .chip { height: 46px; padding: 0 16px; font-size: 16px; }
.easy .seg button { height: 44px; padding: 0 16px; font-size: 16px; }
.easy .seg.sm button { height: 38px; font-size: 14px; }
.easy .tab { height: 50px; font-size: 16px; padding: 0 16px; }
.easy .tabbar { padding-top: 8px; }
.easy .tab-item { font-size: 12px; gap: 4px; }
.easy .tab-item .ic { width: 26px; height: 26px; }
.easy .switch { width: 54px; height: 32px; }
.easy .switch::after { width: 26px; height: 26px; }
.easy .switch:checked::after { transform: translateX(22px); }
.easy .switch-text span { font-size: 16px; }
.easy .check input, .easy .plan input, .easy .radio-card input { width: 24px; height: 24px; }
.easy .pill, .easy .countdown { height: 30px; font-size: 14px; padding: 0 12px; }
.easy .h-display { font-size: 24px; }
.easy .sec-title { font-size: 20px; }
.easy .sec-title.big { font-size: 24px; }
.easy .org-top h1 { font-size: 24px; }
.easy .org-top p { font-size: 14px; }
.easy .nav-item { height: 52px; font-size: 16px; }
.easy .todo-card { padding: 16px; font-size: 16px; }
.easy .todo-card b { font-size: 24px; }
.easy .app-card { padding: 16px; gap: 16px; }
.easy .app-line1 b { font-size: 16px; }
.easy .app-line2 { font-size: 14px; }
.easy .code-chip { font-size: 12px; padding: 2px 8px; }
.easy .ad-title h2 { font-size: 20px; }
.easy .ad-sec h4 { font-size: 14px; }
.easy .checks li { font-size: 16px; padding: 12px 16px; }
.easy .ad-actions .btn { flex: 1 1 0; height: 56px; font-size: 16px; }
.easy .choice-row { padding: 12px; font-size: 16px; }
.easy .pv-row { font-size: 16px; }
.easy .stall-card { font-size: 16px; }
.easy .sc-facts { font-size: 14px; gap: 8px 16px; }
.easy .date-cell b { font-size: 18px; }
.easy .date-cell small { font-size: 12px; }
.easy .notif .n-text span { font-size: 16px; }
.easy .facts > div { padding: 16px; }
.easy .how li span, .easy .cq span { font-size: 14px; }
.easy .pay-amt { font-size: 36px; }
.easy .mode-btn { height: 42px; font-size: 14px; }
.easy .wiz-title b { font-size: 16px; }
.easy .stepper .st-n { width: 30px; height: 30px; font-size: 14px; }
.easy .stepper button { font-size: 14px; }
.easy .legend { font-size: 14px; }
.easy .lg i { width: 16px; height: 16px; }
.easy .map-ctrl .icon-btn { width: 48px; height: 48px; }
.easy .cat-btn { padding: 16px 8px; font-size: 14px; }
.easy .ls-card h4 { font-size: 16px; }
.easy .ls-card p { font-size: 14px; }
.easy .tpl b { font-size: 14px; }
.easy .u-item p { font-size: 14px; }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- studio: demo clips, beginner layout start, "Marksy จัดให้" ---------- */
.clip { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.clip canvas { display: block; width: 100%; aspect-ratio: 16 / 10; max-width: 100%; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.clip-cap { min-height: 1.5em; font-size: 14px; font-weight: 600; color: var(--ink); text-align: center; text-wrap: balance; }
.clip.mini { gap: 8px; }
.clip.mini .clip-cap { min-height: 0; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.clip-ctl { display: flex; align-items: center; gap: 12px; }
.clip-play { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); }
.clip-track { flex: 1; height: 8px; border-radius: 9999px; background: var(--paper-2); cursor: pointer; overflow: hidden; }
.clip-track i { display: block; height: 100%; width: 0; background: var(--leaf); border-radius: inherit; }
.clip-time { font-size: 12px; color: var(--ink-3); min-width: 64px; text-align: right; }
.ez-ways { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.ez-way { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.ez-way.fresh { border-color: var(--leaf); box-shadow: 0 0 0 1px var(--leaf), var(--shadow); }
.ez-media { position: relative; display: block; padding: 0; border-radius: 12px; text-align: left; }
.ez-play { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 12px; border-radius: 9999px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 600; }
.ez-text { display: flex; gap: 12px; align-items: flex-start; }
.ez-n { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--leaf-soft); color: var(--leaf); font: 700 16px var(--f-mono); }
.ez-text h3 { font-size: 18px; line-height: 1.25; margin: 2px 0 4px; text-wrap: balance; }
.ez-text p { color: var(--ink-2); font-size: 14px; }
.ez-tag { font-size: 12px; color: var(--ink-3); }
.ez-new { display: inline-block; padding: 2px 8px; border-radius: 9999px; background: var(--lantern); color: #2B1A02; font-size: 12px; }
.ez-way > .btn { margin-top: auto; }
.ez-prev { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; }
@container app (min-width: 760px) {
  .ez-ways { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ls-auto { text-align: left; border-color: var(--leaf); }
.ls-auto .ls-card-head > .ic:last-child { margin-left: auto; width: auto; height: auto; padding: 0; background: none; }
.ai-clip { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.ai-clip h4 { display: flex; align-items: center; gap: 8px; }

.auto { padding: 16px 16px 32px; max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.auto-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.auto-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.auto-form .h-display { font-size: 24px; text-wrap: balance; }
.auto-brief { font-size: 16px; }
.auto-ex { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.auto-ex .chip { height: auto; min-height: 30px; white-space: normal; text-align: left; padding: 4px 12px; }
.auto-hints { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.auto-hints li { display: flex; gap: 8px; align-items: center; }
.auto-form > .btn { align-self: flex-start; }
.auto-demo { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.auto-think ol { list-style: none; margin: 0; padding: 12px 16px; border-radius: 16px; background: var(--paper-2); display: flex; flex-direction: column; gap: 8px; }
.auto-think li { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 14px; }
.auto-think .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.auto-think li.done { color: var(--ink-2); }
.auto-think li.done .dot { background: var(--leaf); }
.auto-think li.now { color: var(--ink); font-weight: 600; }
.auto-think li.now .dot { background: var(--lantern); animation: pulse2 1s infinite; }
.auto-sum { display: flex; flex-direction: column; gap: 8px; }
.auto-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.auto-chips > span { padding: 4px 12px; border-radius: 9999px; background: var(--paper-2); font-size: 12px; }
.auto-chips .link-btn { display: inline-flex; gap: 4px; align-items: center; }
.auto-edit { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 16px; background: var(--paper-2); }
.auto-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.auto-map { padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.auto-map .minimap { width: 100%; height: auto; max-height: 420px; }
.auto-zones { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.az { display: grid; grid-template-columns: auto minmax(0, 1fr) 128px; gap: 12px; align-items: center; padding: 12px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.az-dot { width: 14px; height: 14px; border-radius: 4px; }
.az-main { display: flex; flex-direction: column; min-width: 0; }
.az-main small { font-size: 12px; color: var(--ink-3); }
.az-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; border-radius: 12px; background: var(--leaf-soft); }
.az-money div { display: flex; flex-direction: column; min-width: 0; }
.az-money small { font-size: 12px; color: var(--ink-2); }
.az-money b { font-size: 16px; color: var(--leaf); }
.auto-tips { padding: 16px 16px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); }
.auto-tips h3 { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-bottom: 8px; }
.auto-tips ul { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.auto-cta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@container app (min-width: 760px) {
  .auto-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .auto-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
}
@container app (max-width: 459px) {
  .az { grid-template-columns: auto minmax(0, 1fr); }
  .az-price { grid-column: 2; }
  .az-money { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .auto-cta .btn { flex: 1 1 100%; }
}

/* ---------- strategies & promotions ---------- */
.pr-sec { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.pr-sec > h3, .pr-sec.panel > h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.sg-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.sg-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.sg-card.lantern { border-color: var(--lantern); box-shadow: inset 3px 0 0 var(--lantern); }
.sg-ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; background: var(--paper-2); color: var(--ink-2); }
.sg-card.lantern .sg-ic { background: var(--lantern-soft); color: var(--lantern-ink); }
.sg-card p { font-size: 12px; color: var(--ink-2); }
.sg-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.sg-foot small { color: var(--leaf); font-weight: 600; }
@container app (min-width: 760px) { .sg-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pr-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.pr-list { display: flex; flex-direction: column; gap: 8px; }
.pr-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "deal main pill" "deal act act"; gap: 8px 12px; align-items: center; padding: 12px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.pr-deal { grid-area: deal; min-width: 58px; height: 46px; padding: 0 8px; display: grid; place-items: center; border-radius: 12px; background: var(--chili-soft); color: var(--chili-ink); font: 700 14px var(--f-mono); }
.pr-main { grid-area: main; display: flex; flex-direction: column; min-width: 0; }
.pr-main small { font-size: 12px; color: var(--ink-3); }
.pr-row > .pill { grid-area: pill; }
.pr-act { grid-area: act; display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
@container app (min-width: 760px) { .pr-row { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "deal main pill act"; } }
.pr-two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.pr-two .pr-sec { margin-top: 16px; }
.tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl li { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 8px 0 8px 0; border-left: 2px solid var(--line); padding-left: 16px; margin-left: 8px; }
.tl li::before { content: ""; position: absolute; left: -7px; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--line-2); }
.tl li.past { opacity: .55; }
.tl li.now::before { background: var(--lantern); border-color: var(--lantern); box-shadow: 0 0 0 4px var(--lantern-soft); }
.tl li.now b { color: var(--lantern-ink); }
.tl-d { font-size: 12px; color: var(--ink-3); padding-top: 2px; }
.tl li > span:last-child { display: flex; flex-direction: column; }
.tl small { font-size: 12px; color: var(--ink-3); }
.ideas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ideas li { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 12px; background: var(--paper-2); font-size: 12px; }
.ideas li span { font-size: 12px; color: var(--ink-2); }
.pe { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.pe-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pe-stalls { display: flex; flex-wrap: wrap; gap: 4px; max-height: 150px; overflow: auto; }
.pe-stall { display: flex; flex-direction: column; align-items: center; padding: 4px 8px; border-radius: 8px; border: 1.5px dashed var(--line-2); background: var(--card); }
.pe-stall small { font-size: 12px; color: var(--ink-3); }
.pe-stall.on { border: 1.5px solid var(--leaf); background: var(--leaf-soft); }
.pe-auto { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }
.pe-auto .num { width: 96px; }
.pe-preview { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; background: var(--paper-2); align-self: start; }
.pe-big { display: flex; align-items: baseline; gap: 8px; }
.pe-big b { font-size: 30px; }
.pe-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.pe-price s { color: var(--ink-3); }
.pe-price b { font-size: 18px; color: var(--chili); }
@container app (min-width: 760px) { .pe { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
/* vendor-facing sale prices */
.sale { color: var(--chili); }
.sale-tag { display: inline-block; margin-left: 4px; padding: 2px 8px; border-radius: 9999px; background: var(--chili-soft); color: var(--chili-ink); font-size: 12px; font-weight: 600; }
.pl-sale { display: inline-flex; gap: 8px; align-items: baseline; }
.pl-sale s { color: var(--ink-3); font-size: 12px; }
.promo-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--chili-soft); color: var(--chili-ink); text-align: left; width: 100%; }
.promo-banner > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.promo-banner small { font-size: 12px; opacity: .85; }
.pb-deal { min-width: 54px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--chili); color: #fff; font: 700 14px var(--f-mono); }
.promo-strip h3 { display: flex; align-items: center; gap: 4px; }
.ps-chip { display: flex; flex-direction: column; align-items: flex-start; padding: 4px 12px; border-radius: 12px; border: 1.5px solid var(--chili); background: var(--card); }
.ps-chip small { font-size: 12px; color: var(--chili); }
.ps-chip small s { color: var(--ink-3); }
.ps-pill { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: 9999px; background: var(--chili); color: #fff; font-size: 12px; font-weight: 600; }
@container app (min-width: 760px) { .ps-pill { display: none; } }

/* ---------- organizer notification inbox ---------- */
.ob { position: relative; }
.ob-btn { position: relative; }
.ob-badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9999px; background: var(--chili); color: #fff; font: 700 12px/18px var(--f-mono); text-align: center; }
.ob-panel { position: absolute; right: -4px; top: calc(100% + 6px); z-index: 60; width: min(380px, calc(100cqw - 24px)); max-height: min(560px, 76cqh); display: flex; flex-direction: column; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); overflow: hidden; animation: rise 0.2s var(--ease); }
.ob-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 4px 16px; }
.ob-head b { font-size: 16px; margin-right: auto; }
.ob-tabs { padding: 0 12px; }
.ob-list { overflow: auto; padding: 4px 8px 8px; flex: 1; min-height: 0; }
.ob-group { padding: 12px 12px 4px; font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .04em; }
.ob-item { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px; border-radius: 12px; text-align: left; position: relative; }
.ob-item:hover { background: var(--paper-2); }
.ob-item.unread { background: var(--leaf-soft); }
.ob-item.unread::after { content: ""; position: absolute; right: 10px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); }
.ob-ic { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: var(--paper-2); color: var(--ink-2); }
.ob-ic.chili { background: var(--chili-soft); color: var(--chili); }
.ob-ic.lantern { background: var(--lantern-soft); color: var(--lantern-ink); }
.ob-ic.leaf { background: var(--leaf-soft); color: var(--leaf); }
.ob-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-right: 16px; }
.ob-text b { font-size: 12px; }
.ob-text span { font-size: 12px; color: var(--ink-2); }
.ob-text small { font-size: 12px; color: var(--ink-3); }
.ob-demo { display: inline-block; padding: 0 8px; border-radius: 9999px; background: var(--paper-2); color: var(--ink-3); font-size: 12px; font-weight: 600; }
.ob-cta { align-self: center; flex-shrink: 0; padding: 4px 12px; border-radius: 9999px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 600; margin-right: 12px; }
.ob-empty { padding: 24px 12px; text-align: center; }
.ob-foot { padding: 8px 16px 12px; border-top: 1px solid var(--line); }
.ob-foot .link-btn { display: inline-flex; gap: 8px; align-items: center; }
.ob-prefs { display: flex; flex-direction: column; gap: 4px; }
.line-prev { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; background: #8CABD9; }
.line-prev .eyebrow { color: #10233F; }
.lp-bubble { align-self: flex-start; max-width: 300px; display: flex; flex-direction: column; gap: 4px; padding: 12px 12px; border-radius: 4px 16px 16px 16px; background: #fff; color: #1B1B1B; font-size: 12px; }
.lp-btn { margin-top: 4px; padding: 8px; border-radius: 8px; background: #06C755; color: #fff; text-align: center; font-weight: 600; font-size: 12px; }
.modal .clip canvas { width: min(100%, 500px); margin: 0 auto; }

/* ==========================================================================
   TEAM: admins, roles & permissions, activity, view-as
   ========================================================================== */
/* avatar tinted per person: a pastel chip with dark text reads on both themes */
.tm-av { background: hsl(var(--h, 34) 52% 84%); color: hsl(var(--h, 34) 48% 24%); }
.tm-av.off { filter: grayscale(1); opacity: .6; }
.role-pill { --rc: var(--leaf); display: inline-flex; align-items: center; height: 24px; padding: 0 12px; border-radius: 9999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: color-mix(in srgb, var(--rc) 15%, var(--card)); color: color-mix(in srgb, var(--rc) 72%, var(--ink)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 28%, transparent); }
.r-owner { --rc: var(--z1); }
.r-manager { --rc: var(--leaf); }
.r-sales { --rc: var(--lantern); }
.r-finance { --rc: var(--z3); }
.r-floor { --rc: var(--z4); }

/* sidebar "me" button + phone avatar trigger */
.me-btn { width: 100%; border-radius: 12px; text-align: left; }
.me-btn:hover { background: var(--card); }
.me-btn > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.me-btn b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-btn > .ic { color: var(--ink-3); flex-shrink: 0; }
.actor-top { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; }
.actor-top:hover .avatar { box-shadow: 0 0 0 3px var(--line); }
@container app (min-width: 760px) { .actor-top { display: none; } }
.nav-none { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 12px 12px; font-size: 12px; color: var(--ink-3); }

/* view-as picker */
.va-list { display: flex; flex-direction: column; gap: 8px; }
.va-row { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); text-align: left; }
.va-row:hover { border-color: var(--ink-3); }
.va-row.on { border-color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); }
.va-row > .ic { color: var(--leaf); flex-shrink: 0; }
.va-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.va-main b { font-size: 14px; }
.va-main b small { font-weight: 400; color: var(--ink-3); }
.va-main > small { font-size: 12px; color: var(--ink-3); }

/* banner while viewing as someone else */
.viewas-bar { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--lantern-soft); color: var(--lantern-ink); border-bottom: 1px solid color-mix(in srgb, var(--lantern) 35%, transparent); font-size: 12px; flex-shrink: 0; }
.viewas-bar > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.viewas-bar small { display: none; font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@container app (min-width: 560px) { .viewas-bar small { display: block; } }
.viewas-bar button { flex-shrink: 0; height: 32px; padding: 0 12px; border-radius: 9999px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 12px; }
@container app (min-width: 760px) { .viewas-bar { padding: 8px 32px; } .viewas-bar > span:nth-child(2) { flex-direction: row; gap: 12px; align-items: baseline; } }

/* no-access page */
.noaccess { max-width: 520px; margin: 32px auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.noaccess h2 { font-size: 20px; text-wrap: balance; }
.noaccess p { line-height: 1.6; }
.noaccess .hstack { justify-content: center; margin-top: 8px; }
.na-ic { width: 64px; height: 64px; border-radius: 24px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); }

/* members */
.tm-tabs { overflow-x: auto; scrollbar-width: none; }
.tm-members, .tm-roles, .tm-activity { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tm-sum { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--ink-2); }
.tm-sum b { font-size: 16px; color: var(--ink); margin-right: 4px; }
.tm-list { display: flex; flex-direction: column; gap: 8px; }
.tm-head { display: none; }
.tm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who act" "role role" "mkts mkts" "st st"; gap: 8px 12px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); align-items: center; }
.tm-row.off { background: var(--card-2); }
.tm-row.invited { border-style: dashed; border-color: var(--line-2); }
.tm-who { grid-area: who; display: flex; align-items: center; gap: 12px; min-width: 0; text-align: left; }
.tm-who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.tm-who b { font-size: 14px; }
.tm-who small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-you { display: inline-block; font-size: 12px !important; font-weight: 700; padding: 2px 8px; border-radius: 9999px; background: var(--leaf-soft); color: var(--leaf) !important; vertical-align: 2px; }
.tm-role { grid-area: role; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tm-mkts { grid-area: mkts; font-size: 12px; color: var(--ink-2); min-width: 0; }
.tm-st { grid-area: st; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.tm-act { grid-area: act; display: flex; align-items: center; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.tm-row.invited .tm-act { grid-area: st; justify-content: flex-start; }
.tm-row.invited .tm-st { grid-area: mkts; }
.tm-row.invited .tm-mkts { display: none; }
.tm-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 9999px; }
.tm-badge.on { background: var(--leaf-soft); color: var(--leaf); }
.tm-badge.on i { width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); }
.tm-badge.wait { background: var(--lantern-soft); color: var(--lantern-ink); }
.tm-badge.off { background: var(--paper-2); color: var(--ink-2); }
@container app (min-width: 760px) {
  .tm-head { display: grid; grid-template-columns: minmax(220px, 1.4fr) 150px minmax(120px, 1fr) minmax(140px, 1fr) 236px; gap: 16px; padding: 0 16px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
  .tm-row, .tm-row.invited { grid-template-columns: minmax(220px, 1.4fr) 150px minmax(120px, 1fr) minmax(140px, 1fr) 236px; grid-template-areas: "who role mkts st act"; gap: 16px; padding: 12px 16px; }
  .tm-row.invited .tm-act { grid-area: act; justify-content: flex-end; }
  .tm-row.invited .tm-st { grid-area: st; }
  .tm-row.invited .tm-mkts { display: block; }
  .tm-st { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* member / invite dialogs */
.tm-edit { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tm-edit-main, .tm-edit-perms { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 720px) { .modal.wide .tm-edit { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.role-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.rp-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 12px 32px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); text-align: left; }
.rp-card b { font-size: 12px; }
.rp-card small { font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.rp-dot { position: absolute; left: 11px; top: 13px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--line-2); }
.rp-card.on { border-color: var(--rc); background: color-mix(in srgb, var(--rc) 9%, var(--card)); }
.rp-card.on .rp-dot { border-color: var(--rc); background: var(--rc); box-shadow: inset 0 0 0 2px var(--card); }
.mk-pick { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.tm-perm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tm-perms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tm-perms li + li { border-top: 1px solid var(--line); }
.tm-perm { display: flex; align-items: center; gap: 12px; padding: 8px 12px; cursor: pointer; color: var(--ink-3); background: var(--card); }
.tm-perm.on { color: var(--ink); }
.tm-perm > span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12px; }
.tm-perm small { font-size: 12px; font-weight: 600; color: var(--lantern-ink); }
.tm-perm.diff { background: color-mix(in srgb, var(--lantern) 9%, var(--card)); }
.modal-foot .tm-del { margin-right: auto; }
.tm-del-q { margin-right: auto; font-weight: 600; color: var(--chili); align-self: center; }
.iv-link { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); text-align: center; }
.iv-qr { padding: 8px; border-radius: 12px; background: #FFFAF1; }
.iv-url { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 4px 4px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.iv-url span { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tm-edit-perms .line-prev { margin-top: 0; }
.iv-sum { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); }
.iv-sum b { font-size: 12px; }
.iv-sum ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.iv-sum li { display: flex; align-items: center; gap: 8px; }
.iv-sum li .ic { color: var(--leaf); }

/* roles & permission table */
.tm-role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.trc { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--rc); align-items: flex-start; }
.trc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.trc p { font-size: 12px; color: var(--ink-2); line-height: 1.5; flex: 1; }
.perm-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.perm-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 560px; font-size: 12px; }
.perm-table th, .perm-table td { padding: 8px 8px; border-bottom: 1px solid var(--line); }
.perm-table thead th { font-size: 12px; font-weight: 700; color: var(--ink-2); text-align: center; white-space: nowrap; position: sticky; top: 0; background: var(--card); }
.perm-table thead th:first-child, .perm-table tbody th { text-align: left; }
.perm-table tbody th { font-weight: 500; white-space: nowrap; }
.perm-table tbody th .ic { display: inline-block; color: var(--ink-3); margin-right: 8px; vertical-align: -3px; }
.perm-table td { text-align: center; }
.pt-cell { width: 34px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center; color: var(--ink-3); border: 1px dashed var(--line-2); }
.pt-cell:hover:not(:disabled) { border-color: var(--leaf); }
.pt-cell.on { background: var(--leaf-soft); color: var(--leaf); border: 1px solid transparent; }
.pt-cell.fixed { cursor: default; opacity: .75; }
.pt-cell.fixed:not(.on) { border-style: solid; }

/* activity log */
.act-tools { display: flex; flex-direction: column; gap: 12px; }
.act-tools-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.act-tools-row .seg { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.act-day h4 { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .02em; margin-bottom: 8px; }
.act-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.act-list li + li { border-top: 1px solid var(--line); }
.act-row { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 12px 12px; text-align: left; }
.act-row:not(:disabled):hover { background: var(--card-2); }
.act-row:disabled { cursor: default; opacity: 1; }
.act-row > .ic { color: var(--ink-3); align-self: center; flex-shrink: 0; }
.act-time { font-size: 12px; color: var(--ink-3); width: 38px; flex-shrink: 0; padding-top: 8px; }
.act-av { position: relative; flex-shrink: 0; }
.act-ic { position: absolute; right: -4px; bottom: -4px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); box-shadow: 0 0 0 2px var(--card); }
.act-ic.k-approve, .act-ic.k-pay, .act-ic.k-cash { background: var(--leaf); color: var(--leaf-ink); }
.act-ic.k-reject, .act-ic.k-refund { background: var(--chili); color: var(--paper); }
.act-ic.k-promo, .act-ic.k-phone { background: var(--lantern); color: #2B1A02; }
.act-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; line-height: 1.45; }
.act-text small { font-size: 12px; }
.rf-staff { color: var(--ink-3); font-size: 12px; }

﻿/* ==========================================================================
   Redesign layer: neutral surfaces, one accent, Manrope + Anuphan,
   Tailwind type scale, 4/8 spacing table, Tailwind radii, one motion curve.
   ========================================================================== */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
p, li, small { text-wrap: pretty; }
h1, h2, h3, h4, .h-display { text-wrap: balance; font-weight: 600; letter-spacing: -.01em; }
.h-display { font-weight: 600; }
.logo-word { font-weight: 700; letter-spacing: -.02em; }

/* focus: one visible ring on every interactive element */
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }

/* buttons: 12px sides, weighted hover, physical press */
.btn { padding: 0 12px; font-weight: 600; }
.btn.lg { padding: 0 16px; }
.btn.sm { padding: 0 8px; }
.btn:hover:not(:disabled) { background: var(--paper-2); }
.btn.primary:hover:not(:disabled) { background: var(--leaf-hover); }
.btn:active:not(:disabled), .chip:active, .seg button:active, .tab-item:active { transform: scale(.98); }
.btn, .chip, .seg button, .tab-item, .icon-btn { transition: background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease), opacity .3s var(--ease); }

/* floating surfaces get a translucent blurred plate */
.ven-top { background: color-mix(in srgb, var(--paper) 82%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.tabbar { -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }

/* screens settle into place once, on transform and opacity only */
@keyframes screen-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.device-screen > * { animation: screen-in .5s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .device-screen > * { animation: none; }
}

/* ==========================================================================
   Vendor home: a plain page with one decisive action
   ========================================================================== */
.hv-hero { display: flex; flex-direction: column; gap: 32px; padding: 32px 16px 32px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.hv-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.hv-hello { font-size: 14px; font-weight: 600; color: var(--leaf); }
.hv-title { font-size: 36px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; }
.hv-sub { font-size: 16px; line-height: 24px; color: var(--ink-2); max-width: 480px; }
.hv-cta { width: 100%; max-width: 480px; display: flex; align-items: center; gap: 16px; margin-top: 12px; padding: 12px 16px; border-radius: 16px; background: var(--leaf); color: var(--leaf-ink); text-align: left; transition: background .3s var(--ease), transform .3s var(--ease); }
.hv-cta:hover { background: var(--leaf-hover); }
.hv-cta:active { transform: scale(.98); }
.hv-cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.hv-cta .awning { flex-shrink: 0; background: var(--card); border-radius: 12px; padding: 8px; box-sizing: content-box; }
.hv-cta-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hv-cta-text b { font-size: 24px; line-height: 32px; font-weight: 600; }
.hv-cta-text small { font-size: 14px; line-height: 20px; opacity: .85; }
.hv-promise { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.hv-promise .ic { color: var(--leaf); }
.hv-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hv-steps li { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.hv-steps i { font-style: normal; width: 24px; height: 24px; border-radius: 9999px; display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 600 12px var(--f-mono); }
.hv-steps b { font-size: 14px; line-height: 20px; margin-top: 4px; }
.hv-steps small { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.home-below { margin-top: 0; padding-top: 24px; }
.home-status { box-shadow: none; border: 1px solid var(--line); }
.ht-ic { border-radius: 12px; }
.home-tile { gap: 12px; }
@container app (min-width: 760px) {
  .hv-hero { flex-direction: row; align-items: center; justify-content: space-between; gap: 48px; padding: 64px 48px; }
  .hv-copy { flex: 1; }
  .hv-title { font-size: 60px; }
  .hv-steps { flex: 0 0 280px; grid-template-columns: 1fr; }
  .hv-steps li { flex-direction: row; align-items: center; gap: 12px; padding: 16px; }
  .hv-steps b { margin-top: 0; }
  .hv-steps small { margin-left: auto; }
}

/* ==========================================================================
   Organizer: dark navigation rail, one summary band, one ledger table
   ========================================================================== */
.org-side { --paper: #181818; --paper-2: #1F1F1F; --card: #272727; --card-2: #313131; --ink: #F2F2EE; --ink-2: #C2C6C0; --ink-3: #8D938D; --line: #313131; --line-2: #3A3A3A; --leaf: #4FB57F; --leaf-hover: #68C794; --leaf-ink: #06130C; --leaf-soft: #172B20; --lantern: #F2B04C; --lantern-soft: #2E2410; --lantern-ink: #FBD493; --chili: #EE7458; --chili-soft: #321A14; background: #181818; color: var(--ink); }
.org-top { background: var(--paper); border-bottom: 0; }
.org-top h1 { font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; }
@container app (min-width: 760px) { .org-top h1 { font-size: 30px; } .org-top { padding-top: 24px; padding-bottom: 8px; } }

/* summary band: one card, four figures, hairlines between them */
.pf-kpis { gap: 2px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.pf-kpis .stat, .pf-kpis .stat.lantern, .pf-kpis .stat.chili { border: 0; border-radius: 0; padding: 16px; gap: 8px; background: var(--card); box-shadow: none; }
.pf-kpis .stat-value { font-family: var(--f-ui); font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -.02em; }
.pf-kpis .stat-label { font-size: 12px; }
.pf-kpis .stat.lantern .stat-value { color: var(--lantern-ink); }
@container app (min-width: 760px) { .pf-kpis .stat { padding: 24px; } .pf-kpis .stat-value { font-size: 36px; line-height: 40px; } }

/* what needs you first */
.pf-attn { border-radius: 16px; }
.pf-attn h3, .pf-head h3 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.01em; }
.attn-row { background: var(--card); border-radius: 12px; transition: border-color .3s var(--ease), background .3s var(--ease); }
.attn-row.chili { border-color: color-mix(in srgb, var(--chili) 45%, var(--line)); background: color-mix(in srgb, var(--chili-soft) 40%, var(--card)); }
.attn-row.lantern { border-color: color-mix(in srgb, var(--lantern) 45%, var(--line)); background: color-mix(in srgb, var(--lantern-soft) 40%, var(--card)); }
.attn-main b { font-size: 16px; line-height: 24px; }

/* market ledger: one table, rows divided by hairlines */
.pf-table { gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.pf-row, .pf-row:hover { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.pf-row + .pf-row { border-top: 1px solid var(--line); }
.pf-row:hover { background: var(--card-2); }
.pf-row.active, .pf-row.active:hover { background: var(--leaf-soft); box-shadow: none; }
.pf-row.head, .pf-row.head:hover { background: var(--card-2); padding-top: 12px; padding-bottom: 12px; border-top: 0; }
.pf-row.head + .pf-row { border-top: 1px solid var(--line); }
.pf-name b { font-size: 16px; line-height: 24px; }
.pf-row .mono { font-family: var(--f-mono); }

/* tabs and chips get a firmer shape */
.chip { height: 32px; }
.panel { box-shadow: none; }


/* ==========================================================================
   Layout editor: dark tool dock, floating panel, floating status pill
   ========================================================================== */
.ed-rail { --paper: #181818; --paper-2: #272727; --card: #181818; --ink: #F2F2EE; --ink-2: #C2C6C0; --ink-3: #8D938D; --line: #272727; --leaf: #4FB57F; --leaf-ink: #06130C; background: #181818; border-color: #272727; }
.ed-top { background: var(--paper); border-bottom: 0; }
.ed-title b { font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; }
.ed-canvas { background-color: var(--ground); }
@container app (min-width: 760px) {
  .ed { grid-template-columns: 80px minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr); grid-template-areas: "top top" "rail canvas"; }
  .ed-panel { grid-area: canvas; justify-self: start; align-self: start; width: 316px; max-height: calc(100% - 96px); margin: 16px; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); z-index: 20; }
  .ed-foot { grid-area: canvas; justify-self: center; align-self: end; margin-bottom: 16px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 9999px; background: color-mix(in srgb, var(--card) 82%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--shadow); z-index: 10; max-width: calc(100% - 32px); }
  .ed-rail { border-right: 0; }
}
.mode-pill { box-shadow: var(--shadow-lg); }

/* ==========================================================================
   Live map: status strip, map as the stage, a detail card beside it
   ========================================================================== */
.lv-sum { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; border: 1px solid var(--line); border-radius: 16px; background: var(--line); overflow: hidden; }
.lv-c { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; background: var(--card); min-width: 0; }
.lv-c i { width: 16px; height: 4px; border-radius: 9999px; background: var(--st-free-line); }
.lv-c.pending i { background: var(--lantern); }
.lv-c.approved i { background: var(--st-approved); }
.lv-c.paid i { background: var(--st-paid); }
.lv-c.reserved i { background: var(--st-closed); }
.lv-c b { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.02em; }
.lv-c span { font-size: 12px; line-height: 16px; color: var(--ink-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@container app (max-width: 520px) { .lv-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lv-c { padding: 8px 12px; } }
.live-bar { padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.live-map { border: 1px solid var(--line); border-radius: 16px; background: var(--ground); overflow: hidden; }
.live-card { box-shadow: var(--shadow); }
.lc-head b { font-size: 30px; line-height: 36px; letter-spacing: -.02em; }
@container app (min-width: 760px) {
  .live-split { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .live-side { position: sticky; top: 0; }
}
.legend { border-radius: 9999px; padding: 8px 16px; }
.map-ctrl { border: 1px solid var(--line); }

/* mid width: the page actions drop under the title instead of squeezing it */
@container app (min-width: 760px) and (max-width: 1080px) {
  .org-top { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title tools" "actions actions"; }
  .org-top-actions { justify-content: flex-start; }
}


/* passcode gate for the code panel */
.gate-scrim { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: var(--scrim); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.gate { width: min(360px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 16px; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: screen-in .5s var(--ease) both; }
.gate h3 { font-size: 20px; line-height: 28px; font-weight: 600; }
.gate p { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.gate-lbl { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-3); }
.gate input { text-align: center; letter-spacing: .5em; }
.gate-err { min-height: 20px; color: var(--chili) !important; font-weight: 600; }
.gate-acts { display: flex; justify-content: flex-end; gap: 8px; }
