/*
 * Loghy — Neumorphism Mixed with Ink.
 *
 * Tokens come from ui/theme/Color.kt and Type.kt; surfaces reproduce
 * ui/components/NeumorphicSurfaces.kt: raised = two hard-edged offset shadows
 * (no blur), debossed = corner gradients, pressed = scale .97 with the shadow off.
 */

:root {
  --paper-base: #f4f0ea;
  --paper-surface: #faf7f2;
  --paper-card: #ece6dc;
  --paper-elevated: #fbf9f5;
  --paper-debossed: #e5dfd4;

  --shadow-dark: rgba(140, 131, 117, 0.22);
  --shadow-dark-strong: rgba(140, 131, 117, 0.34);
  --shadow-dark-subtle: rgba(140, 131, 117, 0.13);
  --shadow-light: rgba(255, 255, 255, 0.94);

  --ink: #0b0a09;
  --ink-ghost: rgba(11, 10, 9, 0.7);
  --ink-muted: rgba(11, 10, 9, 0.4);
  --ink-faint: rgba(11, 10, 9, 0.12);
  --ink-hairline: rgba(11, 10, 9, 0.06);
  --error: #b3261c;

  --swot-strength: #2e5d3e;
  --swot-weakness: #8a3b2c;
  --swot-threat: #7a4b1a;
  --swot-opportunity: #1b557a;

  --tone-0: #f4f0ea;
  --tone-1: #f7f2e7;
  --tone-2: #eaf0e6;
  --tone-3: #f3ece3;
  --tone-4: #e9edf0;
  --tone-5: #f6ece6;
  --tone-6: #eceef6;

  --serif: "Noto Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Roboto", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --r-lg: 16px;
  --r-md: 14px;
  --r-sm: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #ddd7cc;
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0.25px;
  -webkit-font-smoothing: antialiased;
}

/* The phone frame. Inside the portfolio's 390x844 frame it simply fills it. */
.device {
  width: min(100%, 430px);
  height: 100%;
  margin: 0 auto;
  background: var(--paper-base);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
@media (min-width: 480px) and (min-height: 940px) {
  body { display: grid; place-items: center; }
  .device { height: min(844px, 100vh); border-radius: 34px; border: 1px solid var(--ink-faint); box-shadow: 0 24px 60px rgba(60, 54, 45, 0.35); }
}

button { font: inherit; letter-spacing: inherit; color: inherit; }

/* ------------------------------------------------------------- neumorphism */

.raised {
  --e: 4px;
  background: var(--paper-surface);
  border: 0.75px solid var(--ink-hairline);
  border-radius: var(--r-lg);
  box-shadow:
    calc(var(--e) * -0.75) calc(var(--e) * -0.75) 0 var(--shadow-light),
    calc(var(--e) * 0.85) calc(var(--e) * 0.85) 0 var(--shadow-dark);
}

.debossed {
  background:
    linear-gradient(135deg, var(--shadow-dark-subtle) 0, transparent 17px),
    linear-gradient(135deg, transparent calc(100% - 17px), var(--shadow-light) 100%),
    var(--paper-debossed);
  border: 1px solid var(--ink-faint);
  border-radius: var(--r-lg);
}

.btn {
  font: inherit;
  color: var(--ink);
  background: var(--paper-surface);
  border: 0.75px solid var(--ink-hairline);
  border-radius: var(--r-md);
  padding: 12px;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 100ms ease, background 100ms ease, box-shadow 100ms ease;
  box-shadow:
    -2.45px -2.45px 0 var(--shadow-light),
    2.8px 2.8px 0 var(--shadow-dark);
}
.btn:hover { background: var(--paper-elevated); }
.btn:active {
  transform: scale(0.97);
  background: var(--paper-card);
  border-color: var(--ink-faint);
  box-shadow: none;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.icon { padding: 9px; border-radius: 50%; display: grid; place-items: center; }
.btn.tiny { padding: 6px 10px; font-size: 11px; }
.btn.circ { width: 38px; height: 38px; padding: 0; border-radius: 19px; display: grid; place-items: center; flex: none; }
.btn.circ.big { width: 48px; height: 48px; border-radius: 24px; }
.btn[hidden] { display: none; }
.btn svg, .ibtn svg { display: block; }

/* ------------------------------------------------------------------ typography */

.display { font-family: var(--serif); font-weight: 700; font-size: 26px; letter-spacing: -0.25px; }
.headline { font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: 0; }
.title { font-family: var(--serif); font-weight: 500; font-size: 18px; }
.title-sm { font-family: var(--sans); font-weight: 600; font-size: 15px; }
.body { font-family: var(--serif); font-size: 16px; line-height: 1.5; }
.body-sm { font-family: var(--sans); font-size: 14px; line-height: 1.45; color: var(--ink-ghost); }
.caption { font-family: var(--sans); font-size: 12px; color: var(--ink-muted); letter-spacing: 0.4px; }
.label { font-family: var(--sans); font-size: 10px; font-weight: 500; letter-spacing: 0.8px; color: var(--ink-muted); text-transform: uppercase; }

/* ---------------------------------------------------------------- droplets */

.drop {
  --d: 12px;
  --tint: var(--ink);
  flex: none;
  width: var(--d); height: var(--d); border-radius: 50%;
  background:
    radial-gradient(circle calc(var(--d) * 0.125) at 35% 32.5%, rgba(255, 255, 255, 0.45) 99%, transparent 100%),
    radial-gradient(circle at 37% 37%, var(--tint), var(--tint)),
    var(--tint);
  box-shadow: 0 1.2px 0 rgba(140, 131, 117, 0.12);
}
.ink-ul { overflow: hidden; width: 100%; }
.ink-ul svg { display: block; }

/* ---------------------------------------------------------------- top bar */

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 16px;
  flex: 0 0 auto;
}
.brand { display: flex; align-items: center; gap: 8px; flex: none; }
.brand span { font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 24px; letter-spacing: 2px; }
.pill-idea {
  display: flex; align-items: center; gap: 4px;
  min-width: 0; padding: 6px 12px; border-radius: 20px; cursor: pointer; text-align: left;
  font-size: 10px; line-height: 14px; touch-action: manipulation;
}
.pill-idea .t { font-weight: 700; letter-spacing: 0.8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pill-idea .c { color: var(--ink-ghost); letter-spacing: 0.8px; flex: none; }
.pill-idea:active { transform: scale(0.97); }
.actions { display: flex; gap: 6px; align-items: center; flex: none; }

/* ---------------------------------------------------------------- creature */

.stage-head {
  display: flex; align-items: center; justify-content: center;
  padding: 6px 14px;
  flex: 0 0 auto;
}
.device.compact .stage-head { padding: 1px 14px; }
.device.off-stage:not(.compact) .stage-head { padding: 2px 14px; }
#creature { cursor: pointer; flex: 0 0 auto; overflow: visible; -webkit-tap-highlight-color: transparent; }

.bubble-wrap { padding-left: 10px; display: flex; align-items: center; min-width: 0; }
.bubble-wrap[hidden] { display: none; }
.bubble {
  --e: 4px;
  max-width: 210px;
  border-radius: 14px;
  padding: 8px 10px;
  cursor: pointer;
  opacity: 0; transform: scale(0.85);
  transition: opacity 180ms ease, transform 180ms ease;
}
.bubble.in { opacity: 1; transform: scale(1); }
.bubble .bh { display: flex; align-items: center; gap: 4px; }
.bubble .bi { display: grid; width: 13px; height: 13px; }
.bubble .bl { font-size: 9px; font-weight: 700; letter-spacing: 0.8px; color: var(--ink-ghost); line-height: 14px; }
.bubble .bt { margin-top: 3px; font-size: 11.5px; line-height: 15.5px; font-weight: 500; letter-spacing: 0.4px; color: var(--ink); }

/* ---------------------------------------------------------------- tab bar */

.tabpanel { padding: 4px 12px; flex: 0 0 auto; display: flex; justify-content: center; }
.tabbar {
  width: 100%; max-width: 520px; height: 54px; border-radius: 27px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 3px 4px; overflow: hidden;
}
.tab {
  flex: 1 1 0; min-width: 0; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; border-radius: 20px; background: transparent; cursor: pointer; padding: 0;
  color: var(--ink-muted); font-family: var(--sans); font-size: 10px; font-weight: 500; line-height: 14px; letter-spacing: 0.8px;
  touch-action: manipulation;
}
.tab svg { width: 16px; height: 16px; color: var(--ink-ghost); }
.tab span { white-space: nowrap; }
.tab.on { background: var(--ink); color: var(--paper-surface); font-weight: 700; }
.tab.on svg { color: var(--paper-surface); }

/* ------------------------------------------------------------------ screens */

.screens { flex: 1 1 auto; min-height: 0; position: relative; }
.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 90ms linear, visibility 0s linear 90ms;
}
.screen.active {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity 220ms linear 90ms, visibility 0s;
}
.scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px 14px 14px; scrollbar-width: thin; }
.scroll::-webkit-scrollbar { width: 6px; }
.scroll::-webkit-scrollbar-thumb { background: var(--ink-faint); border-radius: 3px; }

/* ---------------------------------------------------------------- chat */

.chat-list {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: 6px 16px; display: flex; flex-direction: column; gap: 14px;
  scrollbar-width: thin;
}
.chat-list > * { flex: none; }
.chat-list::-webkit-scrollbar { width: 6px; }
.chat-list::-webkit-scrollbar-thumb { background: var(--ink-faint); border-radius: 3px; }

.chat-empty {
  flex: 1 1 auto !important; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px; text-align: center;
}
.chat-empty .h { margin-top: 12px; font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: 0.15px; }
.chat-empty .s { margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--ink-ghost); }

.msg-row { display: flex; }
.msg-row.user { justify-content: flex-end; }
.cm {
  --e: 3px; width: 94%; padding: 14px;
  border-radius: 16px 16px 16px 4px;
  touch-action: manipulation;
}
.cm.user { width: 84%; background: var(--paper-card); border-radius: 16px 16px 4px 16px; }
.cm.saved { --e: 6px; }
.cm .hd { display: flex; align-items: center; justify-content: space-between; }
.cm .who { display: flex; align-items: center; gap: 6px; font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: 1px; color: var(--ink); }
.cm.user .who { color: var(--ink-ghost); }
.cm .bm { width: 24px; height: 24px; border: 0; background: transparent; padding: 0; display: grid; place-items: center; cursor: pointer; color: var(--ink-muted); border-radius: 12px; }
.cm.saved .bm { color: var(--ink); }
.cm .txt { margin-top: 6px; font-family: var(--serif); font-size: 16px; line-height: 22px; letter-spacing: 0.25px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm.user .txt { font-family: var(--sans); }
.cm .txt a { color: var(--ink); text-decoration: underline; }
.cm .saved-note { margin-top: 8px; }
.cm .saved-note .cap { margin-top: 2px; font-size: 10px; line-height: 14px; color: var(--ink-muted); letter-spacing: 0.8px; }
.cm .opts { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.opt-chip {
  display: flex; align-items: center; gap: 5px; cursor: pointer;
  background: var(--paper-base); border: 0.8px solid var(--ink-faint); border-radius: 8px; padding: 5px 9px;
  font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: 0.8px; color: var(--ink-muted);
}
.opt-chip svg { width: 13px; height: 13px; }
.opt-chip.hl { background: var(--paper-debossed); border-color: rgba(11, 10, 9, 0.25); color: var(--ink); font-weight: 600; }

.quick { display: flex; gap: 8px; align-items: center; padding: 4px 16px; flex: 0 0 auto; }
.glob-chip {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  background: var(--paper-surface); border: 0.6px solid var(--ink-faint); border-radius: 14px; padding: 6px 12px;
  font-size: 10px; line-height: 14px; font-weight: 500; letter-spacing: 0.8px; color: var(--ink); white-space: nowrap;
}
.glob-chip svg { width: 14px; height: 14px; }
.quick .btn.circ { width: 36px; height: 36px; border-radius: 18px; padding: 6px; }

/* Where the composer was, once the demo's replies are used up. */
.limit-card { flex: 0 0 auto; margin: 6px 12px 12px; padding: 16px; border-radius: 18px; text-align: center; }
.limit-card[hidden], .composer[hidden], .quick[hidden] { display: none; }
.limit-title { font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: 1.2px; color: var(--ink); }
.limit-body { margin: 8px 0 14px; font-size: 13px; line-height: 19px; letter-spacing: 0.25px; color: var(--ink-ghost); }
.limit-cta {
  display: inline-block; padding: 12px 22px; border-radius: 24px;
  background: var(--ink); color: var(--paper-base); text-decoration: none;
  font-family: var(--sans); font-weight: 700; font-size: 13px; letter-spacing: 0.8px;
  transition: transform 100ms ease;
}
.limit-cta:active { transform: scale(0.97); }

.composer { display: flex; align-items: flex-end; gap: 8px; padding: 4px 12px; flex: 0 0 auto; }
.composer .field {
  flex: 1; min-width: 0; min-height: 48px; max-height: 130px; border-radius: 20px;
  display: flex; align-items: center; padding: 8px 12px;
}
.composer textarea {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none; resize: none; overflow-y: auto;
  font-family: var(--serif); font-size: 15px; line-height: 22px; letter-spacing: 0.25px; color: var(--ink);
  padding: 0; margin: 0; max-height: 114px; height: 22px; display: block;
}
.composer textarea::placeholder { font-family: var(--sans); font-size: 14px; color: var(--ink-muted); letter-spacing: 0.25px; }
.ibtn { flex: none; width: 36px; height: 36px; border: 0; background: transparent; padding: 0; display: grid; place-items: center; cursor: pointer; color: var(--ink-ghost); border-radius: 18px; }
.ibtn.on { color: var(--ink); }
#sendBtn:disabled { opacity: 1; cursor: default; color: var(--ink-muted); }
#sendBtn:not(:disabled) { color: var(--ink); }

/* in-app keyboard */
.kbd { flex: 0 0 auto; background: var(--paper-base); padding: 6px 4px; user-select: none; -webkit-user-select: none; animation: fadeIn 180ms ease; }
.kbd[hidden] { display: none; }
.kbd .strip { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; margin-bottom: 4px; }
.kbd .strip .l { flex: 1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.kbd .strip .l::-webkit-scrollbar { display: none; }
.kbd .strip .r { display: flex; align-items: center; gap: 4px; margin-left: 4px; }
.kbd .qchip {
  flex: none; border: 0; cursor: pointer; background: var(--paper-surface); border-radius: 8px; padding: 5px 9px;
  font-family: var(--serif); font-size: 10px; line-height: 14px; font-weight: 600; letter-spacing: 0.8px; color: var(--ink); white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}
.kbd .clear { border: 0; background: transparent; cursor: pointer; font-size: 10px; font-weight: 500; letter-spacing: 0.8px; color: var(--ink-ghost); padding: 4px 6px; border-radius: 6px; }
.kbd .hide { width: 32px; height: 32px; border: 0; background: transparent; color: var(--ink-muted); display: grid; place-items: center; cursor: pointer; padding: 0; }
.kbd .krow { display: flex; gap: 3px; margin-top: 5px; }
.kbd .krow.pad { padding: 0 10px; }
.kbd .krow.wide { gap: 4px; }
.kbd .key {
  flex: 1 1 0; min-width: 0; height: 44px; border: 0; border-radius: 8px; cursor: pointer; padding: 0;
  display: grid; place-items: center; background: var(--paper-surface); color: var(--ink);
  font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: 0.25px;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.89), inset 0 -1.5px 0 rgba(0, 0, 0, 0.14);
  transition: transform 70ms ease;
}
.kbd .key:active { transform: scale(0.93); background: var(--paper-debossed); box-shadow: none; }
.kbd .key.mod { font-family: var(--sans); }
.kbd .key.shift.on { background: var(--ink); color: var(--paper-base); box-shadow: none; }
.kbd .key.sp { font-family: var(--sans); font-size: 10px; font-weight: 500; letter-spacing: 1px; color: var(--ink-ghost); }
.kbd .key.send { background: var(--ink); color: var(--paper-base); box-shadow: none; transition: background 150ms ease; }
.kbd .key.send:disabled { background: var(--paper-debossed); color: var(--ink-ghost); cursor: default; }
.kbd .key.q { font-family: var(--sans); font-size: 12px; font-weight: 700; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------- SWOT, Lateral, Hit List, Vault */

/* Shared by SwotStudioScreen.kt, LateralThinkingScreen.kt, ScheduleScreen.kt and
   NotesVaultSheet.kt: 16px side padding, a 26px serif header with a 4px ink wave. */
.scroll.kt { padding: 0 16px; }
.scroll.kt.col { display: flex; flex-direction: column; overflow: hidden; }
.kt .lst { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; }
.kt .lst > * { flex: none; }
.kt .lst.mid { justify-content: center; }
.kt .lst::-webkit-scrollbar { width: 6px; }
.kt .lst::-webkit-scrollbar-thumb { background: var(--ink-faint); border-radius: 3px; }
.kt .tail { height: 24px; flex: none; }

.kt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kt-head > div:first-child { min-width: 0; flex: 1 1 auto; }
.kt-title { font-family: var(--serif); font-weight: 700; font-size: 26px; line-height: 32px; letter-spacing: 1px; color: var(--ink); }
.kt-title.sm { font-family: var(--sans); font-size: 15px; line-height: 20px; letter-spacing: 1.2px; }
.kt-sub { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.4px; color: var(--ink-ghost); }
.kt-head.sm .kt-sub { font-weight: 400; color: var(--ink-muted); }
.kt .ink-ul.hd { margin: 8px 0; flex: none; }

.btn.c44 { width: 44px; height: 44px; padding: 0; border-radius: 22px; display: grid; place-items: center; flex: none; }
.btn.lsm, .lsm { font-size: 10px; line-height: 14px; letter-spacing: 0.8px; font-weight: 500; }
.btn .row { display: flex; align-items: center; justify-content: center; }
.btn .row svg { flex: none; }
.btn:disabled { box-shadow: -2.45px -2.45px 0 var(--shadow-light), 2.8px 2.8px 0 var(--shadow-dark); }

.ic44 { width: 44px; height: 44px; flex: none; border: 0; background: transparent; padding: 0; display: grid; place-items: center; cursor: pointer; border-radius: 22px; -webkit-tap-highlight-color: transparent; }
.ic44 svg { opacity: 0.8; }

/* the centred "nothing yet" card */
.kt-empty { width: 90%; padding: 16px; margin: 0 auto; }
.kt-empty .raised { border-radius: 16px; padding: 20px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.kt-empty .h { margin-top: 10px; font-family: var(--serif); font-weight: 700; font-size: 15px; line-height: 20px; letter-spacing: 0.15px; color: var(--ink); }
.kt-empty .s { margin-top: 6px; font-size: 12px; line-height: 16px; letter-spacing: 0.4px; color: var(--ink-muted); }
.kt-empty .btn { margin-top: 14px; border-radius: 10px; }

/* SWOT cards */
.sw { --e: 4px; border-radius: 18px; padding: 16px; }
.sw .t { display: flex; align-items: center; gap: 8px; }
.sw .t .nm { font-weight: 700; font-size: 15px; line-height: 20px; letter-spacing: 1px; color: var(--ink); }
.sw .sb { margin: 2px 0 10px; font-size: 12px; line-height: 16px; letter-spacing: 0.4px; color: var(--ink-muted); }
.sw .ink-ul { opacity: 0.25; margin-bottom: 10px; }
.sw .it { display: flex; align-items: flex-start; padding: 6px 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sw .it .no { width: 20px; flex: none; font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: 0.8px; }
.sw .it .tx { flex: 1 1 0; min-width: 0; font-family: var(--serif); font-size: 16px; line-height: 22px; letter-spacing: 0.25px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.sw .it .tx a { color: var(--ink); text-decoration: underline; }
.sw .it .ic44 { margin: -6px 0; }
.sw.eth .t { justify-content: space-between; }
.sw.eth .t .l { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.sw.eth .sq { width: 10px; height: 10px; border-radius: 5px; background: #2E7D32; flex: none; }
.sw.eth .nm { font-size: 13px; line-height: 18px; letter-spacing: 1px; }
.sw.eth .es { font-size: 12px; line-height: 16px; letter-spacing: 0.4px; color: var(--ink-ghost); }
.sw.eth .eb { margin-top: 10px; background: rgba(46, 125, 50, 0.08); border-radius: 12px; padding: 14px; font-size: 14px; line-height: 22px; letter-spacing: 0.25px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Lateral */
.lat { display: flex; flex-direction: column; gap: 10px; }
.lat > * { flex: none; }
.lat-trig { display: flex; gap: 8px; }
.lat-trig .btn { flex: 1 1 0; min-width: 0; border-radius: 12px; padding: 8px; }
.lat-trig .btn .col { display: flex; flex-direction: column; align-items: center; }
.lat-trig .btn .col svg { margin-bottom: 4px; }
.lat-trig .btn .col span { font-weight: 600; }
.lbl-g { font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: 1px; color: var(--ink-ghost); }
.lat-hh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lat-hh .sl { font-size: 10px; line-height: 16px; letter-spacing: 0.4px; color: var(--ink-muted); }
.hats { display: flex; gap: 6px; }
.hatb { --e: 2px; flex: 1 1 0; min-width: 0; height: 54px; border-radius: 10px; padding: 4px 2px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; font: inherit; color: var(--ink); touch-action: manipulation; }
.hatb:active { transform: scale(0.97); }
.hatb .dot { width: 10px; height: 10px; border-radius: 50%; border: 0.5px solid rgba(11, 10, 9, 0.2); margin-bottom: 3px; }
.hatb .hn { font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: 0.8px; }
.hatb .hs { font-size: 8.5px; line-height: 16px; letter-spacing: 0.4px; color: var(--ink-ghost); }
.stim { --e: 5px; border-radius: 18px; padding: 16px; }
.stim .th { display: flex; justify-content: space-between; align-items: center; }
.stim .th .nm { font-weight: 700; font-size: 15px; line-height: 20px; letter-spacing: 1px; text-transform: uppercase; }
.stim .bd { margin-top: 6px; font-family: var(--serif); font-size: 16px; line-height: 22px; letter-spacing: 0.25px; white-space: pre-wrap; overflow-wrap: anywhere; }
.stim .refl { margin-top: 12px; height: 84px; border-radius: 12px; padding: 10px; }
.stim textarea { width: 100%; height: 100%; border: 0; outline: none; background: transparent; resize: none; padding: 0; display: block; font: 14px/20px var(--sans); letter-spacing: 0.25px; color: var(--ink); }
.stim textarea::placeholder { font-size: 12px; line-height: 16px; letter-spacing: 0.4px; color: var(--ink-muted); }
.stim .cm-row { margin-top: 10px; display: flex; justify-content: flex-end; }
.stim .cm-row .btn { border-radius: 12px; padding: 8px; }
.stim .cm-row .btn svg { margin-right: 6px; }
.stim .cm-row .btn span { font-weight: 700; }
.hist { --e: 2px; border-radius: 14px; padding: 12px; background: var(--paper-card); }
.hist .ht { display: flex; align-items: center; gap: 6px; font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: 0.8px; }
.hist .hb { margin-top: 4px; font-family: var(--serif); font-size: 14px; line-height: 20px; letter-spacing: 0.25px; white-space: pre-wrap; overflow-wrap: anywhere; }
.lat .mid-empty { padding: 12px 0; }

/* Hit List */
.hit { display: flex; flex-direction: column; gap: 14px; }
.hit > * { flex: none; }
.hit-btns { display: flex; gap: 6px; flex: none; }
.hit-btns .btn { border-radius: 10px; padding: 8px; }
.hit-btns .btn .row svg { margin-right: 4px; }
.hit-btns .btn span { font-weight: 700; }
.prog { --e: 3px; border-radius: 14px; padding: 14px; }
.prog .pr { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.prog .pr b { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.5px; }
.prog .pr span { font-size: 10px; line-height: 14px; font-weight: 500; letter-spacing: 0.8px; color: var(--ink-ghost); }
.prog .bar { margin-top: 8px; height: 6px; border-radius: 3px; background: var(--paper-debossed); overflow: hidden; }
.prog .bar i { display: block; height: 100%; background: var(--ink); }
.prog .wit { margin-top: 8px; font-size: 12px; line-height: 18px; letter-spacing: 0.4px; color: var(--ink-muted); }
.add-hit { width: 100%; border-radius: 12px; padding: 10px; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.5px; }
.hit-empty { border-radius: 14px; padding: 20px; margin: 12px 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hit-empty svg { color: var(--swot-strength); }
.hit-empty .h { margin-top: 8px; font-size: 14px; line-height: 20px; font-weight: 700; letter-spacing: 0.25px; }
.hit-empty .s { margin-top: 4px; font-size: 12px; line-height: 16px; letter-spacing: 0.4px; color: var(--ink-muted); }
.tk { --e: 3px; border-radius: 12px; padding: 10px; display: flex; align-items: center; }
.tk.done { --e: 1px; background: var(--paper-card); }
.tk .cb { width: 44px; height: 44px; flex: none; border: 0; background: transparent; padding: 0; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.tk .cb i { width: 26px; height: 26px; border-radius: 8px; background: var(--paper-debossed); border: 1px solid var(--ink-faint); display: grid; place-items: center; color: var(--paper-surface); }
.tk.done .cb i { background: var(--ink); border-color: var(--ink); }
.tk .mn { flex: 1 1 0; min-width: 0; margin-left: 6px; }
.tk .tt { font-size: 14px; line-height: 20px; font-weight: 700; letter-spacing: 0.25px; overflow-wrap: anywhere; }
.tk.done .tt { text-decoration: line-through; color: var(--ink-ghost); }
.tk .dd { margin-top: 2px; font-size: 12px; line-height: 16px; letter-spacing: 0.4px; color: var(--ink-muted); overflow-wrap: anywhere; }
.tk.done .dd { color: var(--ink-ghost); }
.tk .hrs { margin: 0 2px 0 6px; flex: none; border-radius: 6px; background: var(--paper-debossed); padding: 2px 6px; font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: 0.8px; }
.tk.done .hrs { color: var(--ink-ghost); }
.tk .ic44 svg { opacity: 1; }
.hq { display: flex; gap: 6px; }
.hq button { flex: 1 1 0; min-width: 0; border: 0; cursor: pointer; border-radius: 8px; padding: 6px 0; background: var(--paper-card); color: var(--ink); font: 700 11px/14px var(--sans); letter-spacing: 0.8px; }
.hq button.on { background: var(--ink); color: var(--paper-surface); }
.dlg .h-t { font-weight: 700; font-size: 15px; line-height: 20px; letter-spacing: 1px; }
.fin.sm { font-size: 12px; line-height: 16px; letter-spacing: 0.4px; }

/* Vault */
.vl { gap: 12px; }
.vn { --e: 3.5px; border-radius: 16px; padding: 16px; cursor: pointer; }
.vn .vt { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vn .vt b { font-family: var(--serif); font-weight: 700; font-size: 15px; line-height: 20px; letter-spacing: 0.15px; overflow-wrap: anywhere; }
.vn .vb { margin-top: 6px; font-family: var(--serif); font-size: 14px; line-height: 20px; letter-spacing: 0.25px; color: var(--ink-ghost); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; }
.vn .vm { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vn .vm .dt { font-size: 10px; line-height: 14px; font-weight: 500; letter-spacing: 0.8px; color: var(--ink-muted); }
.vn .vm .tg { font-size: 10px; line-height: 14px; font-weight: 500; letter-spacing: 0.8px; color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.vn .va { margin-top: 10px; display: flex; justify-content: flex-end; gap: 8px; }
.vn .va .btn { border-radius: 8px; padding: 6px; }
.vn .va .btn .row svg { margin-right: 4px; }

.ved { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-top: 8px; }
.ved .top { display: flex; justify-content: space-between; align-items: center; flex: none; }
.ved .top .rg { display: flex; align-items: center; gap: 8px; }
.ved .top .btn.tx { border-radius: 12px; padding: 8px; }
.ved .top .btn.tx .row svg { margin-right: 4px; }
.ved .top .btn.tx span { font-weight: 700; }
.ved .pal { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; flex: none; }
.ved .pal button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ink-faint); padding: 0; cursor: pointer; display: grid; place-items: center; }
.ved .pal button.on { border-width: 2px; border-color: var(--ink); }
.ved .hp { margin: 10px 0 0; min-height: 120px; max-height: 220px; border-radius: 14px; overflow-y: auto; padding: 8px; flex: none; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.ved .hp.none { align-items: center; justify-content: center; padding: 24px; text-align: center; font-size: 12px; line-height: 16px; letter-spacing: 0.4px; color: var(--ink-muted); }
.ved .hp .hh { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 2px 4px; flex: none; }
.ved .hp .hh b { font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: 1px; color: var(--ink-ghost); }
.ved .hp .hh span { font-size: 10px; line-height: 14px; font-weight: 500; letter-spacing: 0.8px; color: var(--ink-muted); }
.ved .sn { flex: none; border-radius: 8px; background: var(--paper-surface); padding: 8px 10px; cursor: pointer; }
.ved .sn .sr { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ved .sn .vv { font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: 0.8px; }
.ved .sn .cur { margin-left: 6px; font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: 0.8px; color: var(--ink); }
.ved .sn .sd { font-size: 11px; line-height: 16px; letter-spacing: 0.4px; color: var(--ink-muted); }
.ved .sn .btn { height: 28px; border-radius: 6px; padding: 4px; flex: none; }
.ved .sn .btn span { font-weight: 700; }
.ved .sn .btn .row svg { margin-right: 3px; }
.ved .sn .sc { margin-top: 4px; font-family: var(--serif); font-size: 12px; line-height: 16px; letter-spacing: 0.4px; color: var(--ink-ghost); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; }
.ved .sn.open .sc { -webkit-line-clamp: 10; line-clamp: 10; }
.ved .card { --e: 5px; flex: 1 1 auto; min-height: 0; margin: 10px 0 16px; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; }
.ved .card .ti { width: 100%; border: 0; outline: none; background: transparent; padding: 0; font-family: var(--serif); font-weight: 700; font-size: 20px; line-height: 26px; letter-spacing: 0; color: var(--ink); }
.ved .card .ti::placeholder { color: var(--ink-muted); font-weight: 400; }
.ved .card .ink-ul { margin: 8px 0; flex: none; }
.ved .card .bo { flex: 1 1 auto; min-height: 0; width: 100%; border: 0; outline: none; background: transparent; resize: none; padding: 0; font-family: var(--serif); font-size: 16px; line-height: 24px; letter-spacing: 0.25px; color: var(--ink); }
.ved .card .bo::placeholder { color: var(--ink-muted); }

/* ---------------------------------------------------------------- dialogs */

#dialogs { position: absolute; inset: 0; z-index: 50; pointer-events: none; }
.dlg-scrim {
  position: absolute; inset: 0; background: rgba(0, 0, 0, 0.32);
  display: flex; align-items: center; justify-content: center;
  padding: var(--pad, 24px); pointer-events: auto; animation: fadeIn 150ms ease;
}
.dlg-wrap { width: 100%; max-height: 100%; display: flex; }
.dlg {
  flex: 1 1 auto; min-width: 0; min-height: 0; max-height: 100%;
  background: var(--paper-surface); border-radius: 20px; padding: 20px; overflow-y: auto;
  animation: dlgIn 160ms ease;
}
.dlg.tall { height: 88%; display: flex; flex-direction: column; overflow: hidden; padding: 18px; }
.dlg.tall .dlg-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.dlg-wrap.tall { height: 88%; }
@keyframes dlgIn { from { transform: scale(0.94); opacity: 0.4; } to { transform: none; opacity: 1; } }
.dlg::-webkit-scrollbar, .dlg-list::-webkit-scrollbar { width: 5px; }
.dlg::-webkit-scrollbar-thumb, .dlg-list::-webkit-scrollbar-thumb { background: var(--ink-faint); border-radius: 3px; }

.dh { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dh .tt { font-family: var(--sans); font-size: 15px; line-height: 20px; font-weight: 700; letter-spacing: 1px; }
.dh .tt.sm { font-size: 14px; letter-spacing: 0.8px; }
.dh .tt.serif { font-family: var(--serif); letter-spacing: 0.15px; display: flex; align-items: center; gap: 8px; }
.dh .sub { font-size: 10px; line-height: 14px; font-weight: 500; letter-spacing: 0.8px; color: var(--ink-ghost); }
.dh .x { width: 32px; height: 32px; border-radius: 16px; padding: 0; flex: none; display: grid; place-items: center; }
.dlg .ink-ul { margin: 8px 0; }

.fl { font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: 0.8px; color: var(--ink-ghost); }
.fnote { font-size: 12px; line-height: 16px; letter-spacing: 0.4px; color: var(--ink-muted); }
.fin { width: 100%; height: 42px; border-radius: 10px; padding: 10px; margin-top: 4px; border: 1px solid var(--ink-faint); outline: none; color: var(--ink); font: 14px/20px var(--sans); letter-spacing: 0.25px; display: block; }
.fin.area { height: 72px; resize: none; font-size: 12px; line-height: 16px; }
.fin::placeholder { color: var(--ink-muted); }
.gap4 { height: 4px; } .gap6 { height: 6px; } .gap8 { height: 8px; } .gap10 { height: 10px; } .gap12 { height: 12px; } .gap14 { height: 14px; } .gap16 { height: 16px; }

.chips3 { display: flex; gap: 4px; margin-top: 4px; }
.sel-chip {
  flex: 1 1 0; min-width: 0; border: 0; cursor: pointer; background: var(--paper-card); color: var(--ink);
  border-radius: 8px; padding: 6px 2px; font-size: 10px; line-height: 14px; font-weight: 500; letter-spacing: 0.8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sel-chip.on { background: var(--ink); color: var(--paper-surface); }
.row2 { display: flex; gap: 8px; margin-top: 6px; }
.row2 .btn, .dbtn { flex: 1 1 0; }
.dbtn {
  border-radius: 10px; padding: 8px; display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 10px; line-height: 14px; font-weight: 500; letter-spacing: 0.8px; width: 100%;
}
.dbtn svg { width: 14px; height: 14px; }
.dbtn.b { font-weight: 700; }
.dbtn.r12 { border-radius: 12px; }
.dbtn.card { background: var(--paper-card); }
.dbtn.big { padding: 10px; font-size: 13px; line-height: 18px; letter-spacing: 0.5px; font-weight: 700; }
.dbtn.lbl { font-weight: 700; font-family: var(--sans); }
.stack8 { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }

.srow { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 12px; line-height: 16px; letter-spacing: 0.4px; }
.srow b { font-weight: 500; }
.srow span { font-size: 10px; letter-spacing: 0.8px; color: var(--ink-ghost); font-weight: 500; }
input[type=range].sl {
  --v: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer; display: block;
}
input[type=range].sl::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--ink) var(--v), var(--paper-card) var(--v)); }
input[type=range].sl::-moz-range-track { height: 4px; border-radius: 2px; background: var(--paper-card); }
input[type=range].sl::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--ink); }
input[type=range].sl::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); margin-top: -8px; border: 0; }
input[type=range].sl::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); border: 0; }

.inset { border-radius: 12px; padding: 12px; }
.inset .ih { display: flex; align-items: center; gap: 6px; font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: 0.8px; }
.inset .ih svg { width: 16px; height: 16px; flex: none; }
.inset .ib { margin-top: 6px; font-size: 11.5px; line-height: 16px; letter-spacing: 0.4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.inset .ib.serif { font-family: var(--serif); }
.inset .ib.muted { color: var(--ink-muted); }
.inset .ib.italic { font-style: italic; font-size: 11px; color: var(--ink-ghost); margin-top: 4px; }
.inset.card { background-color: var(--paper-card); }
.lib { display: flex; align-items: center; gap: 6px; padding: 3px 0; color: inherit; text-decoration: none; }
.lib .lt { flex: 1; min-width: 0; }
.lib .lt b { display: block; font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: 0.8px; }
.lib .lt i { display: block; font-style: normal; font-size: 10.5px; line-height: 14px; color: var(--ink-muted); letter-spacing: 0.4px; }
.lib svg { width: 13px; height: 13px; color: var(--ink-ghost); flex: none; }

.sess { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border-radius: 10px; background: var(--paper-base); border: 0.5px solid var(--ink-faint); cursor: pointer; }
.sess.on { background: var(--paper-card); border: 1.5px solid var(--ink); }
.sess .st { font-size: 14px; line-height: 20px; font-weight: 700; letter-spacing: 0.1px; overflow-wrap: anywhere; }
.sess .sd { font-size: 12px; line-height: 16px; color: var(--ink-ghost); letter-spacing: 0.4px; }
.sess-list { height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px; }
.dom { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; text-align: left; cursor: pointer; background: var(--paper-card); color: var(--ink); border-radius: 8px; padding: 6px 10px; font-size: 10px; line-height: 14px; letter-spacing: 0.8px; font-weight: 500; }
.dom.on { background: var(--ink); color: var(--paper-surface); font-weight: 700; }
.dom .drop { --tint: var(--ink-ghost); }
.dom.on .drop { --tint: var(--paper-surface); }
.red { color: var(--error); }
.dbtn.danger { background: rgba(179, 38, 28, 0.12); color: var(--error); font-weight: 700; font-size: 12px; letter-spacing: 0.5px; }

.rtypes { display: flex; gap: 6px; margin-top: 4px; }
.rcard { border-radius: 10px; background: var(--paper-card); --e: 2px; padding: 10px; }
.rcard .rh { display: flex; justify-content: space-between; align-items: center; }
.rcard .badge { display: inline-block; border-radius: 4px; padding: 2px 6px; font-size: 9px; font-weight: 700; color: var(--paper-surface); background: var(--ink); letter-spacing: 0.8px; }
.rcard .badge.BUG { background: var(--swot-threat); }
.rcard .badge.IDEA { background: var(--swot-strength); }
.rcard .when { font-size: 10px; color: var(--ink-ghost); margin-left: 6px; }
.rcard .del { width: 22px; height: 22px; border: 0; background: transparent; color: var(--error); padding: 0; display: grid; place-items: center; cursor: pointer; }
.rcard .del svg { width: 13px; height: 13px; }
.rcard .rt { margin-top: 4px; font-size: 11.5px; line-height: 15px; white-space: pre-wrap; overflow-wrap: anywhere; letter-spacing: 0.4px; }

/* ---------------------------------------------------------------- lock */

/* AuthLockScreen.kt: 90 creature, 16 gap, LOGHY VAULT, 140px underline,
   12 gap, prompt, 28 gap, a 64px debossed pill of four 18px rings, 36 gap,
   a 280px keypad of 72px keys with 14px rows. */
.lock { position: absolute; inset: 0; background: var(--paper-base); z-index: 60; display: none; flex-direction: column; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.lock.open { display: flex; }
.lock #lockCreature { flex: none; }
.lock-title { margin-top: 16px; font-family: var(--serif); font-weight: 700; font-size: 26px; letter-spacing: 2px; color: var(--ink); }
.lock-ul { width: 140px; color: var(--ink); overflow: hidden; }
.lock-sub { margin-top: 12px; font-size: 14px; letter-spacing: 0.25px; color: var(--ink-ghost); text-align: center; }
.lock .dots { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 28px; width: 70%; max-width: 280px; height: 64px; border-radius: 32px; padding: 0; }
.lock .pd { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--ink-faint); background: var(--paper-surface); }
.lock .pd.on { border-color: var(--ink); background: var(--ink); }
.lock .err { min-height: 20px; margin-top: 10px; font-size: 12px; color: var(--swot-weakness); text-align: center; }
.keypad { display: grid; grid-template-columns: repeat(3, 72px); justify-content: space-between; row-gap: 14px; width: 280px; margin-top: 16px; }
.keypad .btn, .keypad .pin-lock { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 36px; padding: 0; color: var(--ink); }
.keypad .btn { font-family: var(--serif); font-weight: 600; font-size: 28px; }
.keypad .pin-lock { color: var(--ink-ghost); }

/* ---------------------------------------------------------------- toast */

.toast {
  position: absolute; left: 14px; right: 14px; bottom: 84px; z-index: 70;
  padding: 12px 14px; font-size: 13px;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.show { opacity: 1; transform: none; }

