/* The island appearance is scoped so the existing discreet mode stays neutral. */
:root:not([data-appearance="discreet"]) {
  --bg: #101e2c;
  --panel: #162839;
  --panel-2: #1b3042;
  --line: #304659;
  --ink: #f2eee4;
  --muted: #a5b7c6;
  --accent: #ebc58c;
  --accent-2: #9cd3c8;
  --pink: #e9acc6;
  --radius: 20px;
  --read: 'Nunito Sans', ui-sans-serif, system-ui, sans-serif;
  --pixel: 'Fraunces', Georgia, serif;
}
.chat-heading { display: none; }

:where(html:not([data-appearance="discreet"])) body {
  background:
    radial-gradient(ellipse at 18% 0%, #29415a 0, transparent 52%),
    radial-gradient(ellipse at 100% 100%, #183638 0, transparent 55%), #101e2c;
  font-size: 15px;
}
:where(html:not([data-appearance="discreet"])) #app {
  max-width: 1760px;
  margin: 0 auto;
  padding: clamp(16px, 2.2vw, 34px);
  gap: clamp(18px, 2.2vw, 34px);
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 1fr);
}
:where(html:not([data-appearance="discreet"])) #stage {
  display: grid;
  grid-template-rows: auto auto auto minmax(180px, 1fr) auto;
  gap: 16px;
  min-height: 0;
}
:where(html:not([data-appearance="discreet"])) .brand {
  margin: 0;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
}
:where(html:not([data-appearance="discreet"])) .brand-copy { min-width: 0; }
:where(html:not([data-appearance="discreet"])) .brand h1 {
  color: var(--ink);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -1.4px;
  line-height: 1.15;
}
:where(html:not([data-appearance="discreet"])) .brand-spark {
  display: inline-block;
  color: var(--accent);
  font-size: 25px;
  vertical-align: 3px;
  margin-right: 4px;
}
:where(html:not([data-appearance="discreet"])) .tagline {
  display: block;
  margin: 6px 0 0 37px;
  color: #aebfcc;
  font-size: 12px;
  line-height: 1.4;
}
:where(html:not([data-appearance="discreet"])) .status {
  flex: none;
  color: #aebfcc;
  background: #12233380;
  border-color: #426074;
  font-size: 10px;
  padding: 6px 9px;
  letter-spacing: .2px;
}
:where(html:not([data-appearance="discreet"])) .status::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  background: currentColor;
  border-radius: 50%;
}
:where(html:not([data-appearance="discreet"])) .status.live { color: #add5c4; border-color: #47685f; }
:where(html:not([data-appearance="discreet"])) .status.demo { color: #ebc58c; }
:where(html:not([data-appearance="discreet"])) .status.offline { color: #efafb1; }
:where(html:not([data-appearance="discreet"])) .stage-actions {
  margin: 0;
  gap: 5px;
  padding: 0 0 13px;
  border-bottom: 1px solid #bcd2e11a;
}
:where(html:not([data-appearance="discreet"])) .ghost-btn {
  color: #bbcad6;
  background: #ffffff04;
  border: 1px solid #50677966;
  border-radius: 10px;
  min-height: 36px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
}
:where(html:not([data-appearance="discreet"])) .ghost-btn:hover {
  background: #d6e7f00a;
  color: #fff4dd;
  border-color: #b39a7370;
}
:where(html:not([data-appearance="discreet"])) .stage-actions .ghost-btn {
  background: transparent;
  border-color: transparent;
}
:where(html:not([data-appearance="discreet"])) .stage-actions .ghost-btn:hover { background: #e2ebf00a; }
:where(html:not([data-appearance="discreet"])) .btn-icon { width: 14px; height: 14px; }
:where(html:not([data-appearance="discreet"])) .account { margin-left: auto; gap: 5px; }
:where(html:not([data-appearance="discreet"])) .account-name { max-width: 75px; font-size: 11px; }
:where(html:not([data-appearance="discreet"])) .account-pic { width: 25px; height: 25px; border-radius: 50%; }

:where(html:not([data-appearance="discreet"])) .island-stage-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
:where(html:not([data-appearance="discreet"])) .section-eyebrow {
  margin: 0 0 6px;
  color: #a4bcbf;
  font: 600 9px/1.3 var(--read);
  letter-spacing: 1.8px;
}
:where(html:not([data-appearance="discreet"])) .island-stage-heading h2,
:where(html:not([data-appearance="discreet"])) .chat-heading h2 {
  margin: 0;
  color: #f0eadf;
  font: 500 25px/1.15 var(--pixel);
  letter-spacing: -.6px;
}
:where(html:not([data-appearance="discreet"])) .archive-count {
  color: #bbd0d4;
  font-size: 11px;
  padding-bottom: 3px;
  white-space: nowrap;
}
:where(html:not([data-appearance="discreet"])) .stage-scene-wrap {
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: hidden;
  border-radius: 24px;
}
:where(html:not([data-appearance="discreet"])) .island-frame {
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 24px;
  border: 1px solid #66839555;
  box-shadow: inset 0 1px 0 #d4e6f022, 0 12px 36px #07132035;
}
:where(html:not([data-appearance="discreet"])) .island-frame #scene { aspect-ratio: auto; }
:where(html:not([data-appearance="discreet"])) .island-frame .room-label {
  top: 14px;
  left: 14px;
  padding: 7px 10px;
  color: #d3dedf;
  font: 600 9px/1.3 var(--read);
  letter-spacing: .7px;
  background: #172d40c9;
  border: 1px solid #a5c6d426;
  border-radius: 9px;
}
:where(html:not([data-appearance="discreet"])) .island-activity {
  bottom: 13px;
  left: 16px;
  right: 16px;
  color: #c7d9e3;
  font: 11px/1.4 var(--read);
}
:where(html:not([data-appearance="discreet"])) .island-controls { left: 16px; right: 16px; bottom: 44px; }
:where(html:not([data-appearance="discreet"])) .island-controls button {
  font-family: var(--read);
  border-color: #91b7c53d;
  background: #162e40df;
  padding: 9px 12px;
  border-radius: 12px;
}
:where(html:not([data-appearance="discreet"])) #island-memories {
  color: #f2ddbb;
  border-color: #c4a57677;
  background: #333930ee;
}
:where(html:not([data-appearance="discreet"])) .cabinet-tip {
  color: #f2eada;
  font: 12px/1.4 var(--read);
  background: #132637eb;
  border-color: #658196;
  border-radius: 10px;
  padding: 8px 11px;
}
:where(html:not([data-appearance="discreet"])) .cabinet-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  max-height: none;
}
:where(html:not([data-appearance="discreet"])) .dir-chip {
  min-width: 0;
  min-height: 65px;
  border: 1px solid #6a879333;
  border-radius: 14px;
  padding: 10px;
  gap: 8px;
  text-align: left;
  background: #132b3bb0;
  transition: background .18s, border-color .18s, transform .18s;
}
:where(html:not([data-appearance="discreet"])) .dir-chip:hover,
:where(html:not([data-appearance="discreet"])) .dir-chip[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--chip-color) 55%, transparent);
  background: color-mix(in srgb, var(--chip-color) 10%, #142838);
}
:where(html:not([data-appearance="discreet"])) .dir-glyph {
  display: grid;
  place-items: center;
  width: 29px;
  height: 32px;
  flex: none;
  color: var(--chip-color);
  border-radius: 9px;
  background: color-mix(in srgb, var(--chip-color) 12%, transparent);
}
:where(html:not([data-appearance="discreet"])) .dir-glyph .category-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex: none;
}
:where(html:not([data-appearance="discreet"])) .dir-copy { display: flex; flex-direction: column; min-width: 0; gap: 4px; }
:where(html:not([data-appearance="discreet"])) .dir-category { color: #e1e7e7; font-size: 12px; font-weight: 700; }
:where(html:not([data-appearance="discreet"])) .dir-island { color: #a7bac7; font-size: 10px; line-height: 1.3; }
:where(html:not([data-appearance="discreet"])) .dir-chip .count { margin-left: auto; font-size: 11px; font-variant-numeric: tabular-nums; }

:where(html:not([data-appearance="discreet"])) #chat {
  background: linear-gradient(160deg, #22374aeb, #162a38f5 65%);
  border: 1px solid #7391a33b;
  border-radius: 26px;
  padding: 22px;
  box-shadow: 0 20px 70px #08121d38, inset 0 1px 0 #dbe8e50d;
  overflow: hidden;
}
:where(html:not([data-appearance="discreet"])) .chat-heading {
  display: flex;
  flex: none;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 20px;
  margin-bottom: 12px;
  border-bottom: 1px solid #bad0de1f;
}
:where(html:not([data-appearance="discreet"])) .chat-companion { display: flex; align-items: center; gap: 11px; min-width: 0; }
:where(html:not([data-appearance="discreet"])) .chat-heading h2 { font-size: clamp(18px, 1.55vw, 23px); }
:where(html:not([data-appearance="discreet"])) .chat-heading .section-eyebrow { font-size: 8px; letter-spacing: 1.3px; }
:where(html:not([data-appearance="discreet"])) .companion-portrait {
  position: relative;
  width: 49px;
  height: 49px;
  flex: none;
  border-radius: 17px;
  background: #9dd2bf1c;
  border: 1px solid #aacfc133;
}
:where(html:not([data-appearance="discreet"])) .companion-portrait img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
:where(html:not([data-appearance="discreet"])) .companion-portrait span {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  background: #aad1b5;
  border: 2px solid #21384a;
  border-radius: 50%;
}
:where(html:not([data-appearance="discreet"])) .primary-btn {
  background: linear-gradient(135deg, #efd5a7, #dabb89);
  border: 1px solid #ffe3b14d;
  border-radius: 11px;
  padding: 9px 12px;
  font: 700 12px/1.3 var(--read);
  color: #3b3326;
  box-shadow: 0 3px 12px #00000015;
  white-space: nowrap;
}
:where(html:not([data-appearance="discreet"])) #new-chat-btn { font-size: 10px; gap: 5px; padding: 8px; }
:where(html:not([data-appearance="discreet"])) .messages { gap: 16px; padding: 8px 4px 16px 0; }
:where(html:not([data-appearance="discreet"])) .msg { font-size: 14px; line-height: 1.75; padding: 12px 15px; max-width: 88%; box-shadow: none; }
:where(html:not([data-appearance="discreet"])) .msg.pip {
  background: #2d435480;
  border-color: #7593a528;
  margin-left: 34px;
  color: #e6edf0;
  border-radius: 17px 17px 17px 5px;
}
:where(html:not([data-appearance="discreet"])) .msg.user {
  background: #e0c39b;
  border: 1px solid #fbe2b75c;
  color: #382f25;
  border-radius: 17px 17px 5px 17px;
}
:where(html:not([data-appearance="discreet"])) .msg.pip .who { font: 700 10px/1.4 var(--read); letter-spacing: .5px; color: #b6d6c9; margin-bottom: 6px; }
:where(html:not([data-appearance="discreet"])) .msg-avatar { left: -34px; width: 27px; height: 27px; border-radius: 10px; image-rendering: auto; }
:where(html:not([data-appearance="discreet"])) .day-divider { font: 600 10px/1.4 var(--read); color: #a6bbc9; letter-spacing: .5px; margin: 8px 0; }
:where(html:not([data-appearance="discreet"])) .msg-time { font-size: 10px; }
:where(html:not([data-appearance="discreet"])) .note-flag-lead,
:where(html:not([data-appearance="discreet"])) .msg .note-flag { font-size: 10px; line-height: 1.4; }
:where(html:not([data-appearance="discreet"])) .tag-chip { font-size: 11px; padding: 5px 9px; }
:where(html:not([data-appearance="discreet"])) .composer {
  margin-top: 16px;
  padding: 7px;
  border: 1px solid #7e9eab66;
  border-radius: 18px;
  background: #102533a6;
  box-shadow: inset 0 2px 8px #08121e20;
  animation: none;
}
:where(html:not([data-appearance="discreet"])) .composer:focus-within { border-color: #bdc8aa; box-shadow: 0 0 0 3px #c8d4ad0d; }
:where(html:not([data-appearance="discreet"])) .composer.thinking { border-color: #a4cfc4; animation: none; box-shadow: 0 0 16px #97cdbc15; }
:where(html:not([data-appearance="discreet"])) #input { font-size: 16px; line-height: 1.55; padding: 9px 4px 9px 10px; min-width: 0; }
:where(html:not([data-appearance="discreet"])) #input::placeholder { font-size: 13px; color: #9baebb; }
:where(html:not([data-appearance="discreet"])) #send { width: 40px; height: 40px; border-radius: 12px; background: #ead0a3; color: #45392a; box-shadow: 0 2px 8px #0002; }
:where(html:not([data-appearance="discreet"])) .mic-btn { width: 36px; height: 40px; border-radius: 11px; }
:where(html:not([data-appearance="discreet"])) .typing { background: #243d4c; border: 1px solid #94c7b53b; box-shadow: none; animation: fade .2s ease; font-size: 12px; }
:where(html:not([data-appearance="discreet"])) .quickfire { flex-wrap: nowrap; gap: 7px; }
:where(html:not([data-appearance="discreet"])) .qf-card { min-width: 0; padding: 11px 9px; border-radius: 12px; gap: 6px; background: #acc4c309; border-color: #93b2be2e; }
:where(html:not([data-appearance="discreet"])) .qf-card:hover { background: #e4cc9a0c; border-color: #b6a88a; }
:where(html:not([data-appearance="discreet"])) .qf-card .qf-label { font-size: 11px; font-weight: 700; }
:where(html:not([data-appearance="discreet"])) .qf-card .qf-hint { font-size: 10px; line-height: 1.4; }
:where(html:not([data-appearance="discreet"])) .disclaimer { color: #a0b1bf; font-size: 10px; line-height: 1.5; margin: 12px 10px 0; }

:where(html:not([data-appearance="discreet"])) .drawer,
:where(html:not([data-appearance="discreet"])) .modal { background: #071623a8; backdrop-filter: blur(12px); }
:where(html:not([data-appearance="discreet"])) .drawer-card,
:where(html:not([data-appearance="discreet"])) .modal-card { background: linear-gradient(145deg, #243a4c, #162c3b); border: 1px solid #7d9cac5e; padding: 24px; box-shadow: 0 28px 90px #020b1555; }
:where(html:not([data-appearance="discreet"])) .drawer-card { border-radius: 24px 24px 0 0; max-height: 82dvh; }
:where(html:not([data-appearance="discreet"])) .drawer-head h2 { font: 500 23px/1.2 var(--pixel); letter-spacing: -.4px; flex-wrap: wrap; }
:where(html:not([data-appearance="discreet"])) .drawer-count { font-size: 12px; }
:where(html:not([data-appearance="discreet"])) .drawer-search,
:where(html:not([data-appearance="discreet"])) .note-edit-textarea { background: #102431; border: 1px solid #567281; font-size: 16px; padding: 12px; border-radius: 12px; }
:where(html:not([data-appearance="discreet"])) .note-card { background: #263e4f; border-color: #55728066; border-left-width: 3px; font-size: 14px; line-height: 1.7; padding: 14px; border-radius: 13px; }
:where(html:not([data-appearance="discreet"])) .note-card time,
:where(html:not([data-appearance="discreet"])) .chat-open time { font-size: 11px; }
:where(html:not([data-appearance="discreet"])) .note-card .edit,
:where(html:not([data-appearance="discreet"])) .note-card .del,
:where(html:not([data-appearance="discreet"])) .chat-card .del { color: #adbdc8; min-width: 30px; min-height: 30px; }
:where(html:not([data-appearance="discreet"])) .chat-card { border-radius: 13px; background: #1b3344; }
:where(html:not([data-appearance="discreet"])) .chat-open { font-size: 15px; padding: 14px; }
:where(html:not([data-appearance="discreet"])) .chat-card.current .chat-title::after { font-size: 11px; }
:where(html:not([data-appearance="discreet"])) .drawer-empty { font-size: 15px; line-height: 1.7; padding: 28px 16px; }
:where(html:not([data-appearance="discreet"])) .modal-card p,
:where(html:not([data-appearance="discreet"])) .resources { font-size: 14px; line-height: 1.75; }
:where(html:not([data-appearance="discreet"])) .settings-row label { font-size: 15px; font-weight: 700; }
:where(html:not([data-appearance="discreet"])) .settings-note { color: #a5b7c6; font-size: 12px !important; }
:where(html:not([data-appearance="discreet"])) .island-intro { background: radial-gradient(ellipse at 12% 50%, color-mix(in srgb, var(--island-accent) 15%, #193144), #142b3a); }
:where(html:not([data-appearance="discreet"])) .island-intro h3 { font: 500 23px/1.2 var(--pixel); }
:where(html:not([data-appearance="discreet"])) #island-description { font-family: var(--read); color: #b9cad6; }
:where(html:not([data-appearance="discreet"])) .mindmap-stage { border: 1px solid #506a7a; box-shadow: none; background: #102432; }
:where(html:not([data-appearance="discreet"])) .mindmap-stage::after { display: none; }
:where(html:not([data-appearance="discreet"])) .mindmap-hint { font: 11px/1.5 var(--read); color: #acbfcc; letter-spacing: 0; }
:where(html:not([data-appearance="discreet"])) .toast { background: #233c4ef5; border-color: #66889b; font-size: 13px; border-radius: 14px; }
:where(html:not([data-appearance="discreet"])) .toast-action { font-size: 12px; }
:where(html:not([data-appearance="discreet"])) .auth-gate { background: radial-gradient(ellipse at 50% 30%, #324d64, #10222f 75%); }
:where(html:not([data-appearance="discreet"])) .auth-card { border: 1px solid #86a3ad4a; border-radius: 28px; background: #1c3445ed; padding: 34px; }
:where(html:not([data-appearance="discreet"])) .auth-card h1 { color: #f1eadf; font: 500 38px/1.2 var(--pixel); }
:where(html:not([data-appearance="discreet"])) .auth-sub { font-size: 15px; line-height: 1.7; }
:where(html:not([data-appearance="discreet"])) .auth-fine { font-size: 12px; line-height: 1.6; }
:where(html:not([data-appearance="discreet"])) :is(button, a, input, textarea):focus-visible { outline: 2px solid #a6d9c9; outline-offset: 3px; }

@media (min-width: 861px) and (max-width: 1120px) {
  :where(html:not([data-appearance="discreet"])) #app { gap: 18px; padding: 18px; grid-template-columns: minmax(0, 1.15fr) minmax(345px, 1fr); }
  :where(html:not([data-appearance="discreet"])) .dir-glyph { width: 24px; height: 28px; }
  :where(html:not([data-appearance="discreet"])) .dir-glyph .category-icon { width: 21px; height: 21px; }
  :where(html:not([data-appearance="discreet"])) .dir-chip { padding: 10px; }
  :where(html:not([data-appearance="discreet"])) #chat { padding: 16px; }
  :where(html:not([data-appearance="discreet"])) .stage-actions .ghost-btn { padding: 6px; font-size: 10px; gap: 4px; }
}
@media (max-width: 860px) {
  :where(html:not([data-appearance="discreet"])) #app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); padding: 12px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); gap: 12px; }
  :where(html:not([data-appearance="discreet"])) #stage { display: flex; gap: 10px; }
  :where(html:not([data-appearance="discreet"])) .brand h1 { font-size: 27px; }
  :where(html:not([data-appearance="discreet"])) .tagline { display: none; }
  :where(html:not([data-appearance="discreet"])) .stage-toggle { width: 30px; height: 30px; border: 1px solid #5d7b8e55; border-radius: 9px; background: #20394b; color: #c2d8df; }
  :where(html:not([data-appearance="discreet"])) .stage-actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 5px; gap: 4px; }
  :where(html:not([data-appearance="discreet"])) .stage-actions > * { flex: none; }
  :where(html:not([data-appearance="discreet"])) .stage-actions .ghost-btn { font-size: 11px; min-height: 32px; padding: 5px 8px; }
  :where(html:not([data-appearance="discreet"])) .island-stage-heading h2 { font-size: 20px; }
  :where(html:not([data-appearance="discreet"])) .island-stage-heading .section-eyebrow { display: none; }
  :where(html:not([data-appearance="discreet"])) .stage-scene-wrap { height: clamp(165px, 28dvh, 310px); max-height: 32dvh; flex: none; border-radius: 18px; }
  :where(html:not([data-appearance="discreet"])) .island-frame { border-radius: 18px; }
  :where(html:not([data-appearance="discreet"])) .cabinet-directory { display: flex; flex-wrap: nowrap; overflow-x: auto; max-height: 68px; gap: 7px; padding-bottom: 2px; }
  :where(html:not([data-appearance="discreet"])) .dir-chip { flex: 0 0 167px; min-height: 59px; padding: 8px; }
  :where(html:not([data-appearance="discreet"])) #stage.collapsed { gap: 6px; }
  :where(html:not([data-appearance="discreet"])) #stage.collapsed .island-stage-heading { display: none; }
  :where(html:not([data-appearance="discreet"])) #stage.collapsed .stage-scene-wrap { height: 0; max-height: 0; }
  :where(html:not([data-appearance="discreet"])) #stage.collapsed .cabinet-directory { max-height: 0; padding: 0; }
  :where(html:not([data-appearance="discreet"])) #chat { padding: 14px; border-radius: 20px; }
  :where(html:not([data-appearance="discreet"])) .chat-heading { padding-bottom: 11px; margin-bottom: 4px; }
  :where(html:not([data-appearance="discreet"])) .chat-heading h2 { font-size: 20px; }
  :where(html:not([data-appearance="discreet"])) .companion-portrait { width: 39px; height: 39px; border-radius: 13px; }
  :where(html:not([data-appearance="discreet"])) .msg { font-size: 14px; }
  :where(html:not([data-appearance="discreet"])) .quickfire { margin-top: 8px; }
  :where(html:not([data-appearance="discreet"])) .composer { margin-top: 10px; }
  :where(html:not([data-appearance="discreet"])) .disclaimer { margin-top: 8px; font-size: 9px; }
}
@media (max-width: 560px) {
  :where(html:not([data-appearance="discreet"])) .status { font-size: 9px; padding: 5px 7px; }
  :where(html:not([data-appearance="discreet"])) .island-frame .room-label { top: 9px; left: 9px; padding: 5px 7px; font-size: 8px; }
  :where(html:not([data-appearance="discreet"])) .island-controls { left: 10px; right: 10px; bottom: 39px; }
  :where(html:not([data-appearance="discreet"])) .island-controls button { padding: 7px 9px; font-size: 10px; }
  :where(html:not([data-appearance="discreet"])) .island-activity { font-size: 9px; bottom: 10px; }
  :where(html:not([data-appearance="discreet"])) .chat-heading .section-eyebrow { font-size: 7px; }
  :where(html:not([data-appearance="discreet"])) .chat-heading h2 { font-size: 18px; }
  :where(html:not([data-appearance="discreet"])) .drawer-card,
  :where(html:not([data-appearance="discreet"])) .modal-card { padding: 19px 16px; }
  :where(html:not([data-appearance="discreet"])) .drawer-head h2 { font-size: 21px; }
  :where(html:not([data-appearance="discreet"])) .island-intro h3 { font-size: 20px; }
}
@media (max-height: 700px) and (max-width: 860px) {
  :where(html:not([data-appearance="discreet"])) .chat-heading { padding-bottom: 8px; }
  :where(html:not([data-appearance="discreet"])) .chat-heading .section-eyebrow { display: none; }
  :where(html:not([data-appearance="discreet"])) .qf-card .qf-hint { display: none; }
  :where(html:not([data-appearance="discreet"])) .qf-card { padding: 8px; }
  :where(html:not([data-appearance="discreet"])) .stage-scene-wrap { height: 22dvh; min-height: 0; }
}
@media (max-height: 480px) and (max-width: 860px) {
  :where(html:not([data-appearance="discreet"])) #app { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); padding: 8px; gap: 8px; }
  :where(html:not([data-appearance="discreet"])) #stage .brand { display: flex; }
  :where(html:not([data-appearance="discreet"])) #stage .stage-actions { display: flex; }
  :where(html:not([data-appearance="discreet"])) .island-stage-heading { display: none; }
  :where(html:not([data-appearance="discreet"])) .stage-scene-wrap { flex: 1; height: auto; max-height: none; }
  :where(html:not([data-appearance="discreet"])) .cabinet-directory { max-height: 58px; }
  :where(html:not([data-appearance="discreet"])) #chat { padding: 10px; }
  :where(html:not([data-appearance="discreet"])) .chat-heading h2 { font-size: 16px; }
  :where(html:not([data-appearance="discreet"])) .companion-portrait { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  :where(html:not([data-appearance="discreet"])) *,
  :where(html:not([data-appearance="discreet"])) *::before,
  :where(html:not([data-appearance="discreet"])) *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

:where(html:not([data-appearance="discreet"])) .empty-hint {
  margin: auto 0;
  padding: 20px 14px;
  text-align: center;
  color: #b8c8d2;
  font-size: 14px;
  line-height: 1.7;
}
:where(html:not([data-appearance="discreet"])) .empty-hint .hint-pip {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 12px;
  image-rendering: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px #091b2838);
}
:where(html:not([data-appearance="discreet"])) .empty-hint h3 {
  margin: 0 0 12px;
  color: #f0e9db;
  font: 500 25px/1.2 var(--pixel);
  letter-spacing: -.5px;
}
:where(html:not([data-appearance="discreet"])) .empty-hint p { max-width: 32ch; margin: 0 auto; font-size: 13px; line-height: 1.8; }
:where(html:not([data-appearance="discreet"])) .skeleton { background-color: #213b4c; background-image: linear-gradient(115deg, #a2bfb511, #bbd6dd22, #a2bfb511); }
:where(html:not([data-appearance="discreet"])) .stat-chip { font-size: 12px; border-radius: 12px; padding: 9px 12px; background: #243d4e; }
:where(html:not([data-appearance="discreet"])) .stat-chip b { font-size: 18px; font-weight: 700; }
:where(html:not([data-appearance="discreet"])) .moodmap-next { font-size: 12px; line-height: 1.6; margin: 6px 0; }
:where(html:not([data-appearance="discreet"])) .moodmap-chart-wrap { background: #102735; border-radius: 15px; padding: 14px; }
:where(html:not([data-appearance="discreet"])) .moodmap-chart-title { font: 600 10px/1.4 var(--read); letter-spacing: .7px; }
:where(html:not([data-appearance="discreet"])) .mood-day { font-size: 13px; padding: 12px; border-radius: 12px; }
:where(html:not([data-appearance="discreet"])) .mood-day time { font-size: 11px; }
:where(html:not([data-appearance="discreet"])) .mood-cats .note-flag { font-size: 10px; }
:where(html:not([data-appearance="discreet"])) .memory-card { background: #1c3545; border-radius: 12px; }
:where(html:not([data-appearance="discreet"])) .memory-card .memory-head { font-size: 11px; }
:where(html:not([data-appearance="discreet"])) .memory-card p { font-size: 13px; line-height: 1.7; }
:where(html:not([data-appearance="discreet"])) .google-btn { font: 600 14px/1.5 var(--read); border-radius: 12px; }
@media (max-height: 800px) and (max-width: 860px) {
  :where(html:not([data-appearance="discreet"])) .empty-hint { padding: 8px; }
  :where(html:not([data-appearance="discreet"])) .empty-hint .hint-pip { width: 48px; height: 48px; margin-bottom: 6px; }
  :where(html:not([data-appearance="discreet"])) .empty-hint h3 { font-size: 20px; margin-bottom: 7px; }
  :where(html:not([data-appearance="discreet"])) .empty-hint p { font-size: 12px; line-height: 1.6; }
}

/* Memory discovery and one consistent accent for the selected island. */
.archive-heading-actions, .chat-heading-actions { display: flex; align-items: center; gap: 8px; }
.archive-heading-actions { flex-wrap: wrap; justify-content: flex-end; }
.pip-activity { margin: 6px 0 0; font: 500 10px/1.4 var(--read); color: #b9d9ce; }
.pip-activity::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 6px; background: currentColor; }
.pip-activity[data-activity="storing"] { color: #ebc58c; }
.pip-activity[data-activity="finding"], .pip-activity[data-activity="thinking"] { color: #bfceed; }
.holder-callout {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -100%);
  max-width: min(220px, 52%);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid var(--selected-island-accent, #9cd3c8);
  border-radius: 12px;
  color: #eef4ee;
  background: #142b3bed;
  box-shadow: 0 4px 20px #07152455;
  font: 600 11px/1.35 var(--read);
  text-align: center;
  cursor: pointer;
  transition: background .16s, box-shadow .16s;
}
.holder-callout::after { content: ''; position: absolute; left: calc(50% - 4px); bottom: -5px; width: 8px; height: 8px; background: #142b3b; border-right: 1px solid var(--selected-island-accent, #9cd3c8); border-bottom: 1px solid var(--selected-island-accent, #9cd3c8); transform: rotate(45deg); }
.holder-action { color: var(--selected-island-accent, #9cd3c8); font-size: 10px; font-weight: 500; }
.holder-callout:hover, .holder-callout.is-hovered, .holder-callout:focus-visible { background: #243f50; box-shadow: 0 0 20px color-mix(in srgb, var(--selected-island-accent) 25%, transparent); }
:where(html:not([data-appearance="discreet"])) .island-frame.has-selected-island { border-color: color-mix(in srgb, var(--selected-island-accent) 60%, #263f50); box-shadow: 0 0 0 1px color-mix(in srgb, var(--selected-island-accent) 12%, transparent), 0 12px 36px #07132035; }
:where(html:not([data-appearance="discreet"])) .has-selected-island .room-label { color: var(--selected-island-accent); border-color: color-mix(in srgb, var(--selected-island-accent) 55%, transparent); }
:where(html:not([data-appearance="discreet"])) .has-selected-island #island-memories { color: var(--selected-island-accent); border-color: color-mix(in srgb, var(--selected-island-accent) 65%, transparent); background: color-mix(in srgb, var(--selected-island-accent) 12%, #132a39); }
:where(html:not([data-appearance="discreet"])) .dir-chip { position: relative; }
:where(html:not([data-appearance="discreet"])) .dir-chip[aria-pressed="true"] { box-shadow: inset 3px 0 0 var(--chip-color), 0 0 14px color-mix(in srgb, var(--chip-color) 8%, transparent); }
:where(html:not([data-appearance="discreet"])) .dir-chip[aria-pressed="true"] .dir-category,
:where(html:not([data-appearance="discreet"])) .dir-chip[aria-pressed="true"] .dir-island { color: var(--chip-color); }
:where(html:not([data-appearance="discreet"])) .dir-chip[aria-pressed="true"] .count { background: color-mix(in srgb, var(--chip-color) 14%, transparent); border-radius: 7px; padding: 3px 5px; }
.drawer-category-icon { display: inline-flex; align-items: center; }
:where(html:not([data-appearance="discreet"])) #drawer .drawer-head h2 { color: var(--island-accent, var(--ink)); }
:where(html:not([data-appearance="discreet"])) #drawer .drawer-search:focus { border-color: var(--island-accent); outline-color: var(--island-accent); }
:where(html:not([data-appearance="discreet"])) .memory-search-target { outline: 2px solid var(--island-accent); outline-offset: 3px; background: color-mix(in srgb, var(--island-accent) 10%, #1b3445); }
.memory-search-card { width: min(700px, 94vw); max-height: 86dvh; display: flex; flex-direction: column; overflow: hidden; }
.memory-search-card .drawer-head { flex: none; }
.memory-search-label { display: block; color: var(--muted); font: 600 12px/1.5 var(--read); margin-bottom: 8px; }
.memory-search-card .drawer-search { flex: none; margin-bottom: 4px; }
.memory-search-card .memory-search-status { flex: none; font: 12px/1.5 var(--read); color: var(--muted); margin: 8px 0 14px; }
.memory-search-results { min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; padding: 2px 5px 6px 2px; }
.memory-search-result { border: 1px solid var(--line); border-left: 3px solid var(--island-accent); background: var(--panel-2); border-radius: 13px; padding: 14px; }
.memory-result-heading { display: flex; align-items: center; gap: 8px; color: var(--island-accent); font: 600 11px/1.5 var(--read); }
.memory-result-heading > span:first-child { display: flex; flex: none; }
.memory-result-heading svg { width: 20px; height: 20px; }
.memory-search-result p { white-space: pre-wrap; overflow-wrap: anywhere; }
.memory-result-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.memory-result-footer time { color: var(--muted); font: 11px/1.5 var(--read); }
.memory-result-footer button { color: var(--island-accent); }
@media (max-width: 560px) {
  .archive-heading-actions { gap: 5px; }
  :where(html:not([data-appearance="discreet"])) .memory-search-open { font-size: 10px; padding: 6px 8px; }
  .pip-activity { font-size: 9px; margin-top: 4px; }
  .holder-callout { font-size: 10px; padding: 6px 9px; }
  .holder-action { font-size: 9px; }
  .chat-heading-actions { gap: 4px; }
  :where(html:not([data-appearance="discreet"])) .chat-heading h2 { font-size: 16px; }
  :where(html:not([data-appearance="discreet"])) .chat-heading-actions .icon-btn { width: 30px; padding: 6px; }
  .memory-result-footer { flex-wrap: wrap; }
}
