@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..24,300..600,0..1,0&display=block");
/* ============================================================================
   ITALK website — "Ink & Amber" v2 kit. Same tokens and components as the app
   (I TALK design system: tokens.json + components/bundle.css) plus the desktop
   shell (sidebar, top bar, grids, tables, drawers). Loaded on every page by
   /js/theme.js. Dark mode: html.italk-dark (theme.js is the single switch).
   ========================================================================= */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
/* I TALK v2 — token values from the I TALK design system's tokens.json (light, dark) */
:root, [data-theme="light"], html:not(.italk-dark) [data-theme="light"] {
  --page: #f6f3ec; --surface: #ffffff; --surface-2: #fbf9f4; --sunken: #efeadf;
  --ink: #15130e; --ink-2: #665d50; --ink-3: #978d7e; --line: #e8e2d6; --line-strong: #d6cdbd;
  --amber: #ffc23d; --on-amber: #15130e; --amber-soft: #fff0c7; --accent-text: #8a6300;
  --bold: #15130e; --on-bold: #ffc23d;
  --hero: #1b1913; --on-hero: #f6f2e9; --on-hero-2: #b9b09f;
  --sent: #ffd166; --on-sent: #15130e;
  --success: #1b7a4b; --success-soft: #dff1e6; --danger: #b8382b; --danger-soft: #fbe4e0; --info: #2b6390; --info-soft: #e1edf7;
  --tint-sage: #e4eedf; --on-tint-sage: #3d6a36; --tint-lilac: #ece7f6; --on-tint-lilac: #5b4a8c;
  --tint-sky: #e0ecf6; --on-tint-sky: #2b6390; --tint-clay: #f6e5dd; --on-tint-clay: #9a4a2c;
  --focus: #15130e;
  --shadow-card: 0 1px 2px rgba(21, 19, 14, 0.05), 0 4px 16px rgba(21, 19, 14, 0.05);
  --shadow-float: 0 12px 32px rgba(21, 19, 14, 0.18);
}
html.italk-dark, [data-theme="dark"] {
  --page: #12100b; --surface: #1c1a14; --surface-2: #23201a; --sunken: #26221b;
  --ink: #f3efe6; --ink-2: #ada493; --ink-3: #7d7566; --line: #2c281f; --line-strong: #3b362c;
  --amber: #ffc94d; --on-amber: #15130e; --amber-soft: #2f2716; --accent-text: #ffcf5c;
  --bold: #ffc94d; --on-bold: #15130e;
  --hero: #262219; --on-hero: #f3efe6; --on-hero-2: #ada493;
  --sent: #edb843; --on-sent: #15130e;
  --success: #7fd1a3; --success-soft: #15301f; --danger: #f39a8f; --danger-soft: #3e1a15; --info: #93c5e6; --info-soft: #15283a;
  --tint-sage: #1e2a1b; --on-tint-sage: #a9cf9f; --tint-lilac: #26213a; --on-tint-lilac: #c2b5ee;
  --tint-sky: #172736; --on-tint-sky: #9cc8ea; --tint-clay: #33201a; --on-tint-clay: #f0b49c;
  --focus: #ffc94d;
  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.07);
  --shadow-float: 0 12px 32px rgba(0, 0, 0, 0.6);
}
:root {
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-7: 28px; --space-10: 40px;
  --radius-sm: 8px; --radius-md: 12px; --radius-input: 16px; --radius-card: 20px; --radius-hero: 24px; --radius-bubble: 22px; --radius-pill: 999px;
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", Roboto, system-ui, sans-serif;
}

/* ── Components (design-system bundle) ──────────────────────────────────── */

/* I TALK v2 — "Ink & Amber". Every colour, radius and shadow comes from the tokens. */

html, body { margin: 0; background: var(--page); color: var(--ink); }
body, .it { font-family: var(--font-sans); font-size: 16px; line-height: 24px; -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; }
/* Resets wrapped in :where() so they never outrank a component class */
:where(.it, .screen) a { color: inherit; text-decoration: none; }
:where(.it, .screen) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
:where(.it, .screen) :where(h1, h2, h3, p) { margin: 0; }

/* ---------- Page loader: a ring around the icon of the page you're going to ---------- */
.it-load { position: relative; width: 76px; height: 76px; display: flex; align-items: center; justify-content: center; flex: none; }
.it-load::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 4px solid var(--amber-soft); border-top-color: var(--amber); animation: itLoadRing .8s linear infinite; }
.it-load .ic { position: relative; width: 54px; height: 54px; border-radius: 50%; background: var(--hero); color: var(--amber); display: flex; align-items: center; justify-content: center; }
@keyframes itLoadRing { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .it-load::before { animation-duration: 2.4s; } }

/* ---------- Icons: Material Symbols Rounded ---------- */
.ic { font-family: "Material Symbols Rounded"; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1; display: inline-block; flex: none; white-space: nowrap; direction: ltr; user-select: none; font-variation-settings: "FILL" 0, "wght" 500, "opsz" 24; }
.ic.fill { font-variation-settings: "FILL" 1, "wght" 500, "opsz" 24; }
.ic.sm { font-size: 20px; }
.ic.xs { font-size: 16px; font-variation-settings: "FILL" 0, "wght" 600, "opsz" 20; }
.ic.xs.fill { font-variation-settings: "FILL" 1, "wght" 600, "opsz" 20; }
.ic.lg { font-size: 28px; }

/* ---------- Type ---------- */
.t-display { font-family: var(--font-display); font-size: 32px; line-height: 38px; font-weight: 800; letter-spacing: -0.9px; }
.t-title { font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 800; letter-spacing: -0.4px; }
.t-section { font-family: var(--font-display); font-size: 18px; line-height: 24px; font-weight: 700; letter-spacing: -0.2px; }
.t-number { font-family: var(--font-display); font-size: 28px; line-height: 32px; font-weight: 800; letter-spacing: -0.6px; font-variant-numeric: tabular-nums; }
.t-headline { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -0.2px; }
.t-body { font-size: 16px; line-height: 24px; }
.t-callout { font-size: 15px; line-height: 20px; }
.t-footnote { font-size: 13px; line-height: 18px; }
.t-caption { font-size: 12px; line-height: 16px; font-weight: 600; }
.t-eyebrow { font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: 0.9px; text-transform: uppercase; }
.w5 { font-weight: 500; } .w6 { font-weight: 600; } .w7 { font-weight: 700; } .w8 { font-weight: 800; }
.c2 { color: var(--ink-2); } .c3 { color: var(--ink-3); } .ca { color: var(--accent-text); }
.cs { color: var(--success); } .cd { color: var(--danger); } .ci { color: var(--info); }
.tnum { font-variant-numeric: tabular-nums; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Layout ---------- */
.screen { width: 390px; height: 844px; position: relative; overflow: hidden; display: flex; flex-direction: column; padding-top: 54px; background: var(--page); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 24px; -webkit-font-smoothing: antialiased; }
.body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: var(--space-7); padding: 4px var(--space-5) var(--space-6); }
.body > *, .thread > * { flex-shrink: 0; }
.body.flush { padding-left: 0; padding-right: 0; }
.body.tight { gap: var(--space-4); }
.gutter { padding-left: var(--space-5); padding-right: var(--space-5); }
.row { display: flex; align-items: center; gap: var(--space-3); }
.col { display: flex; flex-direction: column; }
.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.stack-2 { display: flex; flex-direction: column; gap: var(--space-2); }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.demo { padding: var(--space-5); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); background: var(--page); }
.demo.col { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }

/* ---------- Headers ---------- */
.hdr { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px var(--space-5) 20px; }
.hdr .kicker { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink-2); }
.nav { flex: none; height: 56px; display: flex; align-items: center; gap: 4px; padding: 0 12px; }
.nav .ttl { flex: 1; min-width: 0; text-align: center; font-size: 17px; line-height: 22px; font-weight: 700; letter-spacing: -0.2px; }
.nav.edge { border-bottom: 1px solid var(--line); background: var(--surface); }

/* ---------- Buttons ---------- */
.btn { height: 52px; padding: 0 24px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; line-height: 20px; font-weight: 700; letter-spacing: -0.1px; white-space: nowrap; flex: none; }
.btn:focus-visible, .icon-btn:focus-visible, .chip:focus-visible, .tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn-primary { background: var(--amber); color: var(--on-amber); }
.btn-dark { background: var(--ink); color: var(--page); }
.btn-outline { box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink); }
.btn-quiet { background: var(--sunken); color: var(--ink); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-text { height: auto; padding: 0; border-radius: 0; color: var(--accent-text); font-size: 15px; }
.btn-hero { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.22); color: var(--on-hero); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 15px; }
.btn-xs { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn.grow { flex: 1; min-width: 0; }
.btn[disabled] { opacity: 0.4; cursor: default; }
.icon-btn { width: 44px; height: 44px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); flex: none; position: relative; }
.icon-btn.soft { background: var(--surface); box-shadow: var(--shadow-card); }
.icon-btn.sunk { background: var(--sunken); }
.icon-btn.bold { background: var(--bold); color: var(--on-bold); }
.icon-btn.amber { background: var(--amber); color: var(--on-amber); }
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn .udot { position: absolute; top: 9px; right: 10px; box-shadow: 0 0 0 2px var(--surface); }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .label { font-size: 14px; line-height: 18px; font-weight: 700; color: var(--ink); }
.input { width: 100%; height: 54px; border-radius: var(--radius-input); background: var(--surface); border: 1.5px solid var(--line-strong); padding: 0 16px; font: inherit; font-size: 16px; line-height: 24px; color: var(--ink); outline: none; display: flex; align-items: center; gap: 10px; }
.input::placeholder { color: var(--ink-3); }
.input:focus, .input.focus { border-color: var(--ink); box-shadow: 0 0 0 4px var(--amber-soft); }
.input.invalid { border-color: var(--danger); }
.input[disabled] { background: var(--sunken); border-color: transparent; color: var(--ink-2); }
.help { font-size: 13px; line-height: 18px; color: var(--ink-2); }
.help.err { color: var(--danger); font-weight: 600; }
.search { height: 48px; border-radius: var(--radius-input); background: var(--sunken); color: var(--ink-2); display: flex; align-items: center; gap: 10px; padding: 0 14px; font-size: 16px; }
.search .ic { color: var(--ink-3); }
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 14px; background: var(--sunken); }
.seg > * { flex: 1; min-width: 0; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; line-height: 18px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.seg > .on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); }
.code { display: flex; gap: 8px; }
.code > * { flex: 1; min-width: 0; height: 60px; border-radius: var(--radius-input); background: var(--surface); border: 1.5px solid var(--line-strong); font: inherit; font-family: var(--font-display); font-size: 24px; font-weight: 800; text-align: center; color: var(--ink); outline: none; display: flex; align-items: center; justify-content: center; }
.code > .on { border-color: var(--ink); box-shadow: 0 0 0 4px var(--amber-soft); }
.check { width: 24px; height: 24px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--on-amber); background: var(--surface); }
.check.on { background: var(--amber); border-color: var(--amber); }
.toggle { width: 51px; height: 31px; border-radius: var(--radius-pill); background: var(--line-strong); position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #ffffff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18); }
.toggle.on { background: var(--amber); }
.toggle.on::after { left: 22px; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.card.pad { padding: var(--space-4); }
.card.pad-lg { padding: var(--space-5); }
.hero { position: relative; overflow: hidden; border-radius: var(--radius-hero); background: var(--hero); color: var(--on-hero); padding: var(--space-5); }
.hero > * { position: relative; }
.hero > .orb { position: absolute; border-radius: 50%; background: var(--amber); opacity: 0.16; pointer-events: none; }
.hero .c2 { color: var(--on-hero-2); }
.hero .t-eyebrow { color: var(--amber); }
.tile { background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: var(--space-4); display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 128px; position: relative; }
.ti { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex: none; background: var(--sunken); color: var(--ink); }
.tile .count { position: absolute; top: 16px; right: 16px; }

/* ---------- Lists ---------- */
.list { background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; }
.li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 64px; position: relative; }
.li + .li::before { content: ""; position: absolute; top: 0; left: 70px; right: 0; height: 1px; background: var(--line); }
.list.plain .li + .li::before { left: 16px; }
.li .t { font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: -0.1px; }
.li .s { font-size: 13px; line-height: 18px; color: var(--ink-2); }
.li .v { font-size: 15px; line-height: 20px; color: var(--ink-2); white-space: nowrap; }
.lead { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex: none; background: var(--sunken); color: var(--ink); }
.chev { color: var(--ink-3); }
.group { display: flex; flex-direction: column; }
.sec { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; min-height: 24px; }
.link { font-size: 15px; line-height: 20px; font-weight: 700; color: var(--accent-text); white-space: nowrap; }

/* ---------- Avatars ---------- */
.av { width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; position: relative; font-family: var(--font-display); font-size: 16px; font-weight: 800; letter-spacing: -0.2px; background: var(--sunken); color: var(--ink); }
.av.xs { width: 28px; height: 28px; font-size: 11px; }
.av.sm { width: 36px; height: 36px; font-size: 13px; }
.av.md { width: 54px; height: 54px; font-size: 17px; }
.av.lg { width: 72px; height: 72px; font-size: 24px; }
.av.xl { width: 88px; height: 88px; font-size: 30px; }
.av .online { position: absolute; right: -1px; bottom: -1px; width: 15px; height: 15px; border-radius: 50%; background: var(--success); border: 3px solid var(--page); }
.av-pair { position: relative; width: 54px; height: 54px; flex: none; }
.av-pair > .av { position: absolute; }
.av-pair > .av:first-child { top: 0; left: 0; width: 38px; height: 38px; font-size: 13px; }
.av-pair > .av:last-child { right: 0; bottom: 0; width: 30px; height: 30px; font-size: 11px; box-shadow: 0 0 0 3px var(--page); }
.av-row { display: flex; }
.av-row > .av { box-shadow: 0 0 0 2px var(--hero); }
.av-row > .av + .av { margin-left: -5px; }

/* ---------- Badges, counts, chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: var(--radius-sm); font-size: 12px; line-height: 16px; font-weight: 700; white-space: nowrap; flex: none; background: var(--sunken); color: var(--ink-2); }
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.amber { background: var(--amber-soft); color: var(--accent-text); }
.badge.solid { background: var(--amber); color: var(--on-amber); }
.count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--radius-pill); background: var(--amber); color: var(--on-amber); font-size: 12px; line-height: 16px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; font-variant-numeric: tabular-nums; }
.udot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); flex: none; display: inline-block; }
.chips { display: flex; gap: 8px; overflow: hidden; }
.chip { height: 38px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--surface); box-shadow: var(--shadow-card); display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 18px; font-weight: 700; color: var(--ink); white-space: nowrap; flex: none; }
.chip.on { background: var(--ink); color: var(--page); box-shadow: none; }
.chip > .av { width: 28px; height: 28px; font-size: 11px; margin-left: -9px; }

/* ---------- Stats, progress, banners, empty ---------- */
.stat { padding: var(--space-4); display: flex; flex-direction: column; gap: 6px; }
.stat .lbl { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.stat .delta { font-size: 13px; line-height: 18px; font-weight: 700; color: var(--ink-2); }
.progress { height: 8px; border-radius: var(--radius-pill); background: var(--sunken); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--amber); }
.hero .progress { background: rgba(255, 255, 255, 0.14); }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-input); font-size: 14px; line-height: 20px; background: var(--info-soft); color: var(--ink); }
.banner > .ic { color: var(--info); font-size: 20px; margin-top: 0; }
.banner.amber { background: var(--amber-soft); } .banner.amber > .ic { color: var(--accent-text); }
.banner.danger { background: var(--danger-soft); } .banner.danger > .ic { color: var(--danger); }
.banner.ok { background: var(--success-soft); } .banner.ok > .ic { color: var(--success); }
.empty { padding: var(--space-10) var(--space-6); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.empty .ti { width: 64px; height: 64px; border-radius: 50%; margin-bottom: 8px; }

/* ---------- Tab bar and FAB ---------- */
.tabbar { flex: none; display: flex; padding: 8px 8px 30px; background: var(--surface); border-top: 1px solid var(--line); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-2); position: relative; }
.tab .pill { width: 60px; height: 32px; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; }
.tab.on { color: var(--ink); font-weight: 800; }
.tab.on .pill { background: var(--amber); color: var(--on-amber); }
.tab .count { position: absolute; top: -3px; left: calc(50% + 8px); height: 18px; min-width: 18px; padding: 0 5px; font-size: 11px; box-shadow: 0 0 0 2px var(--surface); }
.fab { position: absolute; right: var(--space-5); bottom: 106px; width: 60px; height: 60px; border-radius: 22px; background: var(--bold); color: var(--on-bold); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-float); }
.fab .ic { font-size: 28px; }

/* ---------- Messaging ---------- */
.conv { display: flex; align-items: center; gap: 14px; padding: 12px var(--space-5); }
.conv .name { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -0.2px; }
.conv .prev { font-size: 15px; line-height: 20px; color: var(--ink-2); }
.conv .time { font-size: 13px; line-height: 18px; color: var(--ink-2); white-space: nowrap; }
.conv .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.conv.unread .name { font-weight: 800; }
.conv.unread .prev { color: var(--ink); font-weight: 500; }
.conv.unread .time { color: var(--accent-text); font-weight: 700; }
.thread { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 4px 16px 12px; }
.day { align-self: center; font-size: 12px; line-height: 16px; font-weight: 700; color: var(--ink-2); padding: 5px 12px; border-radius: var(--radius-pill); background: var(--sunken); margin: 6px 0 10px; }
.msg { display: flex; flex-direction: column; gap: 4px; max-width: 80%; }
.msg.in { align-self: flex-start; align-items: flex-start; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.msg.gap { margin-top: 12px; }
.bub { padding: 10px 15px; border-radius: var(--radius-bubble); font-size: 16px; line-height: 22px; }
.in .bub { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); border-bottom-left-radius: 6px; }
.out .bub { background: var(--sent); color: var(--on-sent); border-bottom-right-radius: 6px; }
.screen.sent-ink .out .bub { background: var(--ink); color: var(--page); }
.bub.media { padding: 4px; }
.bub.media .cap { padding: 6px 11px 4px; }
.mthumb { display: flex; align-items: center; justify-content: center; border-radius: 18px; background: var(--sunken); color: var(--ink-3); }
.quote { border-radius: 14px; padding: 7px 11px; margin: 0 -5px 7px; font-size: 14px; line-height: 19px; background: rgba(255, 255, 255, 0.5); }
.in .quote { background: var(--sunken); }
.screen.sent-ink .out .quote { background: rgba(255, 255, 255, 0.12); }
.filecard { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 10px; width: 272px; }
.filecard .ti { width: 44px; height: 48px; }
.quote b { display: block; font-size: 12px; line-height: 16px; font-weight: 800; }
.stamp { font-size: 12px; line-height: 16px; color: var(--ink-2); display: flex; align-items: center; gap: 4px; padding: 0 8px; font-weight: 500; }
.stamp .ic { font-size: 15px; }
.reacts { display: flex; gap: 4px; margin-top: -9px; padding: 0 10px; position: relative; z-index: 1; }
.reacts > span { height: 26px; padding: 0 8px; border-radius: var(--radius-pill); background: var(--surface); box-shadow: 0 0 0 2px var(--page), var(--shadow-card); font-size: 13px; line-height: 16px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.sysmsg { align-self: center; max-width: 86%; text-align: center; font-size: 13px; line-height: 18px; color: var(--ink-2); margin: 8px 0; }
.typing { display: flex; gap: 4px; align-items: center; height: 22px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.pinbar { flex: none; margin: 0 16px 6px; padding: 10px 14px; border-radius: var(--radius-input); background: var(--surface); box-shadow: var(--shadow-card); display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 18px; }
.pinbar .ic { color: var(--accent-text); }
.composer { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 34px; background: var(--surface); border-top: 1px solid var(--line); }
.composer .box { flex: 1; min-width: 0; min-height: 44px; border-radius: 22px; background: var(--sunken); display: flex; align-items: center; gap: 6px; padding: 0 6px 0 16px; color: var(--ink-3); font-size: 16px; }
.composer .box .grow { color: var(--ink-3); }
.composer .go { width: 44px; height: 44px; border-radius: 50%; background: var(--amber); color: var(--on-amber); display: flex; align-items: center; justify-content: center; flex: none; }
.voice { display: flex; align-items: center; gap: 10px; }
.voice .play { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--page); display: flex; align-items: center; justify-content: center; flex: none; }
.wave { display: flex; align-items: center; gap: 3px; height: 26px; }
.wave i { width: 3px; border-radius: 2px; background: currentColor; opacity: 0.55; }

/* ---------- Page pieces ---------- */
.ptitle { flex: none; padding: 0 var(--space-5) 18px; }
.ptitle > p { margin-top: 4px; color: var(--ink-2); font-size: 15px; line-height: 20px; }
.screen.on-hero { background: var(--hero); color: var(--on-hero); }
.screen.on-hero .c2 { color: var(--on-hero-2); }
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 15px; line-height: 20px; }
.kv > :first-child { color: var(--ink-2); }
.kv > :last-child { font-weight: 600; text-align: right; }
.hero .kv > :first-child { color: var(--on-hero-2); }
.panel { background: var(--surface-2); border-radius: var(--radius-input); padding: 14px 16px; }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.code-text { font-family: var(--font-display); font-weight: 800; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px 12px; font-size: 13px; line-height: 16px; font-weight: 700; color: var(--ink); background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.qa .ic { color: var(--accent-text); }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dp { height: 68px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: var(--surface); box-shadow: var(--shadow-card); }
.dp .d { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-2); }
.dp .n { font-family: var(--font-display); font-size: 18px; line-height: 22px; font-weight: 800; }
.dp .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); }
.dp .dot.none { background: transparent; }
.dp.off { background: transparent; box-shadow: none; }
.dp.off .n { color: var(--ink-3); }
.dp.on { background: var(--ink); color: var(--page); box-shadow: none; }
.dp.on .d { color: var(--page); opacity: 0.75; }
.tcol { width: 58px; flex: none; }
.tcol .tm { font-family: var(--font-display); font-size: 17px; line-height: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.2px; }
.tcol .du { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-2); }
.meter { display: flex; gap: 6px; }
.meter > i { flex: 1; height: 6px; border-radius: 3px; background: var(--sunken); }
.meter > i.on { background: var(--amber); }
.meter.ok > i.on { background: var(--success); }
.cover { aspect-ratio: 3 / 4; border-radius: 10px 14px 14px 10px; padding: 12px 10px; display: flex; flex-direction: column; justify-content: space-between; font-family: var(--font-display); font-size: 14px; line-height: 16px; font-weight: 800; letter-spacing: -0.2px; box-shadow: var(--shadow-card), inset 4px 0 0 rgba(0, 0, 0, 0.08); }
.cover small { font-family: var(--font-sans); font-size: 10px; line-height: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; opacity: 0.8; }
.swatch { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.swatch.on { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }

/* ---------- Sheet ---------- */
.scrim { position: absolute; inset: 0; background: rgba(12, 10, 6, 0.45); display: flex; flex-direction: column; justify-content: flex-end; z-index: 5; }
.sheet { background: var(--surface); border-radius: var(--radius-hero) var(--radius-hero) 0 0; padding: 10px 0 34px; box-shadow: var(--shadow-float); }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 0 auto 14px; }

/* ---------- Tints for avatars and icon tiles: one per person or tool, kept everywhere (last, so they win) ---------- */
.tint-amber { background: var(--amber-soft); color: var(--accent-text); }
.tint-sage { background: var(--tint-sage); color: var(--on-tint-sage); }
.tint-lilac { background: var(--tint-lilac); color: var(--on-tint-lilac); }
.tint-sky { background: var(--tint-sky); color: var(--on-tint-sky); }
.tint-clay { background: var(--tint-clay); color: var(--on-tint-clay); }
.tint-bold { background: var(--bold); color: var(--on-bold); }

/* ── Website shell ──────────────────────────────────────────────────────── */
/* ITALK website — desktop shell on the same "Ink & Amber" tokens (styles/italk.css)
   and kit classes (ds/italk/components/bundle.css) as the app. Same colours, type,
   radii and components; only the layout changes for a wide screen. */

/* ── Page shell: sidebar + content ─────────────────────────────────────────── */
.web { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: flex-start; background: var(--page); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 24px; -webkit-font-smoothing: antialiased; }
.web *, .web *::before, .web *::after { box-sizing: border-box; }
/* The kit's resets (scoped to .it/.screen) applied to web pages too; :where() keeps them below any component class. */
:where(.web) a { color: inherit; text-decoration: none; }
:where(.web) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
:where(.web) :where(h1, h2, h3, p) { margin: 0; }
.side { flex: 1 1 248px; max-width: 248px; min-height: 100vh; padding: 24px 16px; display: flex; flex-direction: column; gap: 20px; border-right: 1px solid var(--line); background: var(--page); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 8px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--amber); color: var(--on-amber); display: inline-flex; align-items: center; justify-content: center; }
.brand-name { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.4px; }
/* The real logo: app icon tile + the amber "I TALK™" wordmark, shown as is. */
.brand-icon { width: 32px; height: 32px; border-radius: 9px; flex: none; display: block; }
.brand-word { display: inline-flex; align-items: center; }
.brand-word img { height: 14px; width: auto; display: block; }
.hero .brand-word img { height: 14px; }
.brand-role { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-2); }
.snav { display: flex; flex-direction: column; gap: 2px; }
.snav-h { font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: 0.9px; text-transform: uppercase; color: var(--ink-2); padding: 14px 12px 6px; }
.snav a { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: var(--radius-pill); color: var(--ink); text-decoration: none; font-size: 15px; line-height: 20px; font-weight: 600; }
.snav a:hover { background: var(--sunken); }
.snav a.on { background: var(--amber); color: var(--on-amber); }
.snav a .ic { font-size: 22px; }
.snav a .count { margin-left: auto; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: var(--radius-card); text-decoration: none; color: var(--ink); }
.side-foot:hover { background: var(--sunken); }

.main { flex: 999 1 560px; min-width: 0; padding: 28px 40px 64px; }
.main > .wrap { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.main > .wrap.narrow { max-width: 860px; }

/* ── Top bar: title + search, bell, avatar ─────────────────────────────────── */
.top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.top .grow { flex: 1 1 320px; min-width: 0; }
.kick { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink-2); }
/* Korean page headers wrap between words, never mid-word ("기 / 준"). */
:lang(ko) .kick, :lang(ko) .t-display, :lang(ko) .t-title, :lang(ko) .t-section { word-break: keep-all; overflow-wrap: break-word; }
.top-tools { display: flex; align-items: center; gap: 10px; }
.wsearch { display: flex; align-items: center; gap: 10px; height: 44px; width: 280px; max-width: 100%; padding: 0 16px; border-radius: var(--radius-pill); background: var(--sunken); color: var(--ink-2); font-size: 15px; }
.wsearch input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--ink); outline: none; }

/* ── Grids ─────────────────────────────────────────────────────────────────── */
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cols > .c-main { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.cols > .c-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .main { padding: 20px 16px 48px; } .side { max-width: none; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); } }

/* ── Cards and sections ────────────────────────────────────────────────────── */
.wcard { background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wcard-h { display: flex; align-items: center; gap: 12px; }
.wcard-h .t-section { flex: 1; min-width: 0; margin: 0; }
.stat-n { font-family: var(--font-display); font-size: 28px; line-height: 32px; font-weight: 800; letter-spacing: -0.6px; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 13px; line-height: 18px; color: var(--ink-2); }

/* ── Tables ────────────────────────────────────────────────────────────────── */
.tbox { background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow-x: auto; position: relative; } /* relative: hidden labels (.sr) inside a wide table stay in the box, not past the page edge */
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 20px; }
.tbl th { text-align: left; font-size: 12px; line-height: 16px; font-weight: 700; color: var(--ink-2); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.sel td { background: var(--amber-soft); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who .av { width: 36px; height: 36px; font-size: 13px; }

/* ── Split views (messages, master-detail) ─────────────────────────────────── */
.split { display: flex; flex-wrap: wrap; gap: 0; background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; min-height: 720px; }
.split > .pane-list { flex: 1 1 320px; max-width: 360px; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.split > .pane-main { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; background: var(--page); }
.split > .pane-info { flex: 1 1 280px; max-width: 320px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; padding: 20px; min-width: 0; background: var(--surface); }
.pane-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }

/* ── Side drawer and modal (drawn open in place) ───────────────────────────── */
.drawer { flex: 1 1 360px; max-width: 420px; background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-float); padding: 24px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.modal-stage { position: relative; }
.modal-scrim { position: absolute; inset: 0; background: rgba(21, 19, 14, 0.42); border-radius: var(--radius-card); }
.modal { position: relative; margin: 48px auto; max-width: 560px; background: var(--surface); border-radius: var(--radius-hero); box-shadow: var(--shadow-float); padding: 28px; display: flex; flex-direction: column; gap: 18px; }

/* ── Small helpers ─────────────────────────────────────────────────────────── */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar .grow { flex: 1 1 200px; }
.kbd { display: inline-flex; align-items: center; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--sunken); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.wmuted { color: var(--ink-2); }
.wnum { font-variant-numeric: tabular-nums; }
