/* Support suite: shared design system. Warm Sand + Persimmon, matched to the Schema Generator. */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('fonts/manrope-latin-wght.woff2') format('woff2'); }

:root {
  color-scheme: light dark;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;

  /* light: warm sand ground, persimmon brand */
  --bg: #f6f2eb;
  --bg-2: #f2ece3;
  --surface: #fffcf8;
  --surface-2: #faf6f0;
  --ink: #1c1917;
  --ink-2: #3d3732;
  --muted: #6f6963;
  --line: #e8e1d6;
  --line-2: #d9cfc1;
  --brand: #b42318;        /* fills: buttons, marks, staff bubbles */
  --brand-ink: #ffffff;
  --brand-2: #8f1c13;
  --link: #b42318;         /* text-on-ground accent */
  --link-2: #8f1c13;
  --brand-soft: #f8e4de;
  --brand-glow: rgb(180 35 24 / 0.22);
  --accent: #8a3b16;       /* ochre: high priority, unread, highlights */
  --accent-soft: #f8e8dc;
  --ok: #1f6b4a;   --ok-soft: #e6f3ec;
  --warn: #8a5a0b; --warn-soft: #f7ecd6;
  --bad: #9f1d14;  --bad-soft: #fbe3df;
  --info: #3b5b78; --info-soft: #e5ecf2;
  --none: #ddd4c7;

  --r-sm: 10px; --r: 12px; --r-lg: 18px; --r-xl: 24px;
  --shadow-1: 0 1px 0 rgb(28 25 23 / 0.05), 0 1px 2px rgb(28 25 23 / 0.04);
  --shadow-2: 0 16px 40px -24px rgb(28 25 23 / 0.28);
  --shadow-3: 0 22px 48px -22px rgb(28 25 23 / 0.32), 0 6px 14px -8px rgb(28 25 23 / 0.10);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t: 200ms;
  accent-color: var(--brand);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161412; --bg-2: #1d1a17;
    --surface: #211e1b; --surface-2: #26221f;
    --ink: #f3eee8; --ink-2: #d9d2ca; --muted: #b4aea6;
    --line: #3a342e; --line-2: #4a423b;
    --brand: #b42318; --brand-ink: #ffffff; --brand-2: #c9372b;
    --link: #e89286; --link-2: #f0a090;
    --brand-soft: #3a1f1b; --brand-glow: rgb(232 146 134 / 0.3);
    --accent: #f0b37a; --accent-soft: #3a2a1b;
    --ok: #8fd0b0; --ok-soft: #1c3228;
    --warn: #f0c27a; --warn-soft: #3a2e1b;
    --bad: #f39a8f; --bad-soft: #3d1c18;
    --info: #9fbbd6; --info-soft: #1e2a35;
    --none: #554c44;
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-2: 0 18px 44px -20px rgb(0 0 0 / 0.55);
    --shadow-3: 0 24px 50px -18px rgb(0 0 0 / 0.6), 0 8px 18px -8px rgb(0 0 0 / 0.4);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.55; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
::selection { background: var(--brand-soft); color: var(--ink); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; caret-color: var(--link); }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--link-2); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--link) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.03em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 750; letter-spacing: -0.045em; line-height: 1.05; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; text-wrap: pretty; }
.num, time, .tabular { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: var(--r-sm); z-index: 100; transition: top var(--t); }
.skip:focus { top: 12px; }
.skip:hover, .skip:focus { color: var(--bg); }

/* ---------- shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in oklab, var(--line) 70%, transparent);
}
.topbar-in { max-width: 1160px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -0.03em; font-size: 1.0625rem; }
.logo-svg { width: 32px; height: 32px; flex: none; overflow: visible; }
.logo-back { fill: #fffcf8; fill-opacity: 0.9; stroke: #b42318; stroke-opacity: 0.42; transform-box: fill-box; transform-origin: 50% 50%; transform: rotate(9deg); transition: transform 0.35s var(--ease-out); }
.brand:hover .logo-back, .brand:focus-visible .logo-back { transform: rotate(15deg) translate(0.6px, -0.6px); }
@media (prefers-color-scheme: dark) { .logo-back { fill: #f3eee8; fill-opacity: 0.16; stroke: #e89286; stroke-opacity: 0.78; } }
.brand-word { white-space: nowrap; }
.brand-word b { font-weight: 760; }
.brand-word span { font-weight: 600; color: var(--muted); margin-left: 0.12em; }
.brand:hover { color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; font-weight: 600; padding: 7px 12px; border-radius: 999px; transition: background var(--t), color var(--t); }
.nav a:hover { background: var(--bg-2); color: var(--ink); }
.nav a[aria-current='page'] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.cmdk-trigger { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 8px 0 12px; font: inherit; font-size: 0.9375rem; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-1); cursor: pointer; transition: border-color var(--t), color var(--t); }
.cmdk-trigger:hover { color: var(--ink); border-color: var(--line-2); }
.cmdk-trigger svg { width: 18px; height: 18px; flex: none; }
.cmdk-trigger kbd { font-family: var(--font); font-weight: 650; color: var(--muted); }
@media (max-width: 720px) {
  .topbar-in { flex-wrap: wrap; gap: 8px 16px; padding: 10px 16px; }
  .nav { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; order: 2; }
  .cmdk-trigger { margin-left: auto; order: 1; width: 40px; height: 40px; padding: 0; justify-content: center; }
  .cmdk-trigger-label, .cmdk-trigger kbd { display: none; }
}

.cmdk { width: min(640px, calc(100vw - 32px)); max-height: min(560px, calc(100dvh - 32px)); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-3); overflow: hidden; }
.cmdk::backdrop { background: rgb(28 25 23 / 0.38); backdrop-filter: blur(3px); }
.cmdk[open] { display: flex; }
@media (max-width: 720px) { .cmdk { margin-top: 16px; } }
.cmdk-box { display: flex; flex-direction: column; width: 100%; min-height: 0; margin: 0; }
.cmdk-field { display: flex; align-items: center; gap: 12px; padding: 6px 12px 6px 18px; border-bottom: 1px solid var(--line); }
.cmdk-field > svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.cmdk-field input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.0625rem; color: var(--ink); padding: 14px 0; outline: none; }
.cmdk-field input::placeholder { color: var(--muted); opacity: 1; }
.cmdk-esc { background: none; border: 0; padding: 4px; cursor: pointer; border-radius: 8px; }
.cmdk-body { overflow-y: auto; padding: 6px 8px 10px; min-height: 0; flex: 1; overscroll-behavior: contain; }
.cmdk-group { font-size: 0.75rem; font-weight: 700; color: var(--muted); padding: 12px 12px 6px; }
.cmdk-opt { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.cmdk-opt:hover { color: var(--ink); text-decoration: none; }
.cmdk-opt[aria-selected='true'] { background: var(--brand-soft); }
.cmdk-opt-t { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-opt-s { font-size: 0.8125rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-opt[aria-selected='true'] .cmdk-opt-s { color: var(--ink-2); }
.cmdk-msg { padding: 18px 12px; color: var(--muted); font-size: 0.9375rem; }
.cmdk-msg:empty { display: none; }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 0.8125rem; color: var(--muted); }
.cmdk-foot kbd + kbd { margin-left: 3px; }
@media (hover: none) { .cmdk-foot { display: none; } }
main { flex: 1; width: 100%; max-width: 1160px; margin: 0 auto; padding: 48px 24px 80px; }
@media (max-width: 720px) { main { padding: 28px 16px 64px; } }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.footer-in { max-width: 1160px; margin: 0 auto; padding: 24px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.footer a { color: var(--ink-2); }

.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; margin-top: 14px; line-height: 1.5; }
.page-head { margin-bottom: 36px; }

/* ---------- surfaces ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); transition: box-shadow 0.25s ease, border-color 0.25s ease; }
.panel-pad { padding: 28px; }
@media (max-width: 720px) { .panel-pad { padding: 20px; } }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.hr { height: 1px; background: var(--line); border: 0; margin: 24px 0; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field > label, .label { font-size: 0.82rem; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.field .hint { font-size: 0.8125rem; color: var(--muted); }
.field .hint.count { justify-self: end; }
.input, .select, .textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: var(--r); padding: 11px 14px; min-height: 46px;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in oklab, var(--line-2) 50%, var(--muted)); }
.input:focus, .select:focus, .textarea:focus { outline: 3px solid var(--brand-glow); outline-offset: 2px; border-color: var(--link); background: var(--surface); }
.field.is-valid .input, .field.is-valid .textarea { border-color: color-mix(in oklab, var(--ok) 55%, var(--line-2)); }
.field.is-invalid .input, .field.is-invalid .textarea, .field.is-invalid .select { border-color: var(--bad); }
.field .err { font-size: 0.8125rem; color: var(--bad); min-height: 0; }
.select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236f6963' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.seg { display: inline-flex; padding: 4px; background: var(--bg-2); border-radius: 999px; gap: 2px; flex-wrap: wrap; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 7px 14px; border-radius: 999px; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: background var(--t), color var(--t), box-shadow var(--t); }
.seg label:hover { color: var(--ink); }
.seg input:checked + label { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg input:focus-visible + label { outline: 2px solid var(--link); outline-offset: 1px; }
.seg input[value='urgent']:checked + label { color: var(--bad); }
.seg input[value='high']:checked + label { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  --b: var(--surface); --c: var(--ink); --bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 650; font-size: 0.9375rem; line-height: 1; white-space: nowrap;
  min-height: 42px; padding: 0 16px; border-radius: 999px; cursor: pointer; text-decoration: none;
  background: var(--b); color: var(--c); border: 1px solid var(--bd); box-shadow: var(--shadow-1);
  transition: background var(--t), border-color var(--t), box-shadow var(--t), transform var(--t) var(--ease-out), color var(--t);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { border-color: color-mix(in srgb, var(--link) 40%, var(--line)); box-shadow: var(--shadow-2); transform: translateY(-1px); text-decoration: none; }
.btn:hover, .btn:focus-visible { color: var(--c); }
.btn:active { transform: translateY(0) scale(0.98); box-shadow: var(--shadow-1); }
.btn-primary { --b: var(--brand); --c: var(--brand-ink); --bd: transparent; box-shadow: var(--shadow-2); }
.btn-primary:hover { --b: var(--brand-2); border-color: transparent; box-shadow: var(--shadow-3); }
.btn-ghost { --b: transparent; --bd: transparent; box-shadow: none; }
.btn-ghost:hover { --b: var(--bg-2); border-color: transparent; box-shadow: none; transform: none; }
.btn-danger { --c: var(--bad); }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 1rem; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 0.875rem; }
.btn[disabled], .btn[aria-busy='true'] { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn[aria-busy='true']::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
.icon-btn { width: 38px; padding: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.01em; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; text-transform: capitalize; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.s-open, .s-investigating { background: var(--info-soft); color: var(--info); }
.s-pending, .s-identified, .s-minor, .p-high { background: var(--warn-soft); color: var(--warn); }
.s-resolved, .s-operational, .s-up, .s-monitoring { background: var(--ok-soft); color: var(--ok); }
.s-closed, .p-low, .s-unknown { background: var(--bg-2); color: var(--muted); }
.p-urgent, .s-major, .s-down { background: var(--bad-soft); color: var(--bad); }
.p-normal { background: var(--bg-2); color: var(--ink-2); }
.s-maintenance { background: var(--info-soft); color: var(--info); }

/* ---------- thread (tickets) ---------- */
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.msg { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.8125rem; background: var(--bg-2); color: var(--ink-2); }
.msg.staff .avatar { background: var(--brand); color: var(--brand-ink); }
.bubble { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px var(--r-lg) var(--r-lg) var(--r-lg); padding: 14px 16px; }
.msg.staff .bubble { background: var(--brand-soft); border-color: color-mix(in oklab, var(--brand) 22%, transparent); }
.bubble-meta { display: flex; gap: 10px; align-items: baseline; font-size: 0.8125rem; color: var(--muted); margin-bottom: 6px; }
.bubble-meta strong { color: var(--ink); font-weight: 650; font-size: 0.875rem; }
.bubble-body { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 70ch; }

/* ---------- table ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; table-layout: fixed; }
.table th { text-align: left; font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 650; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr { transition: background var(--t); cursor: pointer; }
.table tbody tr:hover, .table tbody tr.is-active { background: var(--surface-2); }
.table tbody tr:focus-visible { outline-offset: -3px; border-radius: 0; }
.table tbody tr:last-child td { border-bottom: 0; }

/* ---------- toast ---------- */
.toasts { position: fixed; z-index: 60; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: center; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: var(--r); box-shadow: var(--shadow-3); font-size: 0.9375rem; font-weight: 550; }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.bad { background: var(--bad); color: #fff; }

/* ---------- misc ---------- */
.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--surface-2), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: var(--r-sm); min-height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--line-2); }
.empty-state h2, .empty-state h3 { color: var(--ink); margin-bottom: 6px; font-size: 1.0625rem; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--brand-soft); color: var(--ink); font-size: 0.9375rem; }
.callout svg { width: 20px; height: 20px; color: var(--link); flex: none; margin-top: 2px; }
.callout.warn { background: var(--warn-soft); }
.callout.warn svg { color: var(--warn); }
.code { font-family: var(--mono); font-size: 0.875rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; overflow-x: auto; white-space: pre; color: var(--ink); }
kbd { font-family: var(--mono); font-size: 0.75rem; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 1px 0 var(--line-2); }
[hidden] { display: none !important; }

/* login gate */
.gate { max-width: 420px; margin: 8vh auto 0; }

/* admin layout */
.admin-grid { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 24px; align-items: start; }
@media (max-width: 960px) { .admin-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .admin-bar > h1 { flex: 1 0 100%; } }
.list-scroll { max-height: calc(100vh - 260px); overflow: auto; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.filters .input, .filters .select { min-height: 38px; padding-top: 7px; padding-bottom: 7px; font-size: 0.9375rem; }

/* entrance: content is visible by default; JS adds motion only when allowed */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- 3D hero stack (pure CSS 3D, decorative, aria-hidden) ---------- */
.hero-split { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-split { grid-template-columns: 1fr; gap: 20px; } }
.s3d { position: relative; width: 100%; max-width: 460px; aspect-ratio: 6 / 5; margin-inline: auto; perspective: 1400px; contain: layout paint; pointer-events: none; user-select: none; }
.s3d-rig { position: absolute; inset: 6% 8% 30% 16%; transform-style: preserve-3d; transform: rotateX(20deg) rotateY(-26deg) rotateZ(5deg); }
.s3d-float { position: absolute; inset: 0; transform-style: preserve-3d; }
.s3d-card {
  position: absolute; inset: 0; border-radius: 20px; padding: 20px 22px; overflow: hidden;
  translate: var(--x, 0) var(--y, 0) var(--z, 0);
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  border: 1px solid color-mix(in srgb, var(--line-2) 70%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 34px 60px -34px rgb(28 25 23 / 0.45), 0 2px 0 rgb(255 255 255 / 0.5) inset;
  font-size: 13px; line-height: 1.45; color: var(--ink);
}
.s3d-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(140deg, rgb(255 255 255 / 0.22), transparent 42%); pointer-events: none; }
.s3d-card.b2 { --x: -16%; --y: 34%; --z: -140px; opacity: 0.85; }
.s3d-card.b1 { --x: -8%; --y: 17%; --z: -70px; opacity: 0.95; }
.s3d-card.front { --z: 0px; background: #1c1917; color: #f3eee8; border-color: rgb(255 255 255 / 0.08); box-shadow: 0 40px 70px -30px rgb(28 25 23 / 0.6); }
.s3d-card.front::after { background: linear-gradient(140deg, rgb(255 255 255 / 0.10), transparent 40%); }
@media (prefers-color-scheme: dark) {
  .s3d-card { box-shadow: 0 34px 60px -30px rgb(0 0 0 / 0.7); }
  .s3d-card.front { background: #0f0d0c; border-color: rgb(255 255 255 / 0.1); }
  .s3d-card::after { background: linear-gradient(140deg, rgb(255 255 255 / 0.06), transparent 42%); }
}
.s3d-k { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; margin-bottom: 8px; }
.s3d-t { display: block; font-size: 16px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
.s3d-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgb(232 146 134 / 0.16); color: #f2a99e; }
.s3d-pill.ok { background: rgb(143 208 176 / 0.16); color: #9fdcbd; }
.s3d-card:not(.front) .s3d-pill { background: var(--brand-soft); color: var(--link); }
.s3d-card:not(.front) .s3d-pill.ok { background: var(--ok-soft); color: var(--ok); }
.s3d-line { display: block; height: 7px; border-radius: 4px; background: currentColor; opacity: 0.16; margin-top: 9px; }
.s3d-line.w40 { width: 40%; } .s3d-line.w60 { width: 60%; } .s3d-line.w80 { width: 80%; }
.s3d-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.s3d-bub { display: block; width: fit-content; max-width: 82%; padding: 7px 11px; border-radius: 14px; margin-top: 8px; font-size: 12.5px; background: rgb(255 255 255 / 0.08); }
.s3d-bub.me { margin-left: auto; background: #b42318; color: #fff; border-bottom-right-radius: 4px; }
.s3d-bub.them { border-bottom-left-radius: 4px; }
.s3d-bars { display: flex; gap: 3px; margin-top: 10px; }
.s3d-bars i { flex: 1; height: 26px; border-radius: 3px; background: #8fd0b0; opacity: 0.85; }
.s3d-bars i.w { background: #f0b37a; }
@media (max-width: 900px) {
  .s3d { max-width: 340px; aspect-ratio: 16 / 10; }
  .s3d-rig { inset: 6% 12% 26% 16%; transform: rotateX(12deg) rotateY(-14deg) rotateZ(3deg); }
  .s3d-card.b2 { display: none; }
  .s3d-card.b1 { --x: -8%; --y: 20%; --z: -50px; }
  .s3d-card { padding: 14px 16px; font-size: 12px; }
  .s3d-t { font-size: 14px; margin-bottom: 6px; }
}
@media (max-width: 900px) { .s3d-card.front .s3d-bub + .s3d-bub, .s3d-card.front .s3d-bub.me:nth-of-type(3) { display: none; } }
