:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
    "Noto Sans KR", sans-serif;
  color: var(--ink);
  background: var(--base);
  color-scheme: light;
  font-size: 16px;
  font-synthesis: none;
  --muted: #66666d;
  --line: #ececef;
  --line-strong: #d7d7dc;
  --accent: #c02665;
  --soft: #f5f5f6;
  --soft-hover: #f3f3f5;
  --selected: #eeeef0;
  --surface: #fff;
  --base: #fff;
  --ink: #18181b;
  --subtle: #8a8a96;
  --strong: #19191d;
  --on-strong: #fff;
  --tooltip: #252529;
  --tooltip-ink: #fff;
  --danger: #b91c35;
  --error: #b41f3d;
  --warning: #8b4c00;
  --scrim: #18181b55;
  --nav-glass: #fffffff0;
  --selection: #18181b;
  --selection-ink: #fff;
  --avatar-ink: #4e4e55;
  --radius: 12px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --base: #101114;
  --surface: #191a1f;
  --soft: #23252c;
  --soft-hover: #2a2c34;
  --selected: #30323b;
  --ink: #f4f4f5;
  --muted: #b0b0ba;
  --subtle: #a0a0ab;
  --line: #353740;
  --line-strong: #686a75;
  --accent: #f078a7;
  --strong: #f4f4f5;
  --on-strong: #101114;
  --tooltip: #30323b;
  --tooltip-ink: #f4f4f5;
  --danger: #f06d87;
  --error: #ff91a5;
  --warning: #ffca76;
  --scrim: #000a;
  --nav-glass: #191a1ff0;
  --selection: #f078a7;
  --selection-ink: #101114;
  --avatar-ink: #f4f4f5;
}
* {
  box-sizing: border-box;
}
html, dialog {
  touch-action: pan-x pan-y;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  color: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  background: none;
}
svg {
  width: 24px;
  height: 24px;
  display: block;
  flex-shrink: 0;
}
span[data-icon] {
  display: inline-flex;
  vertical-align: middle;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
button:hover {
  filter: brightness(0.94);
}
[hidden] {
  display: none !important;
}
.skip {
  position: fixed;
  left: 16px;
  top: -80px;
  background: var(--strong);
  color: var(--on-strong);
  padding: 12px;
  z-index: 100;
}
.skip:focus {
  top: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.sidebar {
  width: 80px; position: fixed; inset: 0 auto 0 0; padding: 28px 16px 24px; display: flex; flex-direction: column; background: var(--base); z-index: 10;
}
.wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-style: italic;
  font-size: 42px;
  letter-spacing: -2.6px;
  line-height: 1.2;
  display: block;
}
.wordmark span {
  color: var(--accent);
}
.sidebar .wordmark {
  font-size: 0; margin: 0 0 32px; text-align: center;
}
.sidebar .wordmark::before { content: "s"; font-size: 42px; }
.sidebar .wordmark span { font-size: 36px; }
.nav-item {
  position: relative; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 12px; border-radius: 16px; color: var(--muted);
}
.nav-item > span:last-child { position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); padding: 7px 10px; border-radius: 7px; color: var(--tooltip-ink); background: var(--tooltip); font-size: 12px; white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; }
.nav-item:hover > span:last-child, .nav-item:focus-visible > span:last-child { opacity: 1; visibility: visible; }
.nav-item:hover {
  background: var(--soft);
}
:root[data-theme="dark"] .filter.active { box-shadow: inset 0 0 0 1px var(--line-strong); }
.nav-item[data-action="compose"] { color: var(--on-strong); background: var(--strong); }
.sidebar-bottom {
  margin-top: auto;
}
.workspace {
  margin-left: 80px; padding: 32px 40px 0; min-height: 100dvh; display: flex; flex-direction: column;
}
#main { width: 100%; max-width: 1080px; margin: 0 auto; min-width: 0; flex: 1; }
.page-header {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 12px; min-height: 52px;
}
h1 {
  font-size: 29px;
  font-weight: 720;
  letter-spacing: -1.15px;
  line-height: 1.3;
  margin: 0;
}
h2,
h3,
p {
  margin-top: 0;
}
.primary,
.secondary,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}
.primary {
  background: var(--strong);
  color: var(--on-strong);
}
.primary svg,
.secondary svg {
  width: 18px;
  height: 18px;
}
.secondary {
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.danger {
  background: var(--danger);
  color: var(--on-strong);
}
.wide {
  width: 100%;
}
.text-button {
  font-size: 13px;
  font-weight: 600;
  min-height: 44px;
}
.gate {
  width: 100%;
  max-width: 420px;
  margin: clamp(32px, 8dvh, 96px) auto 32px;
  padding: 24px 16px;
  text-align: left;
}
.gate h2 {
  font-size: 28px;
  letter-spacing: -0.9px;
  line-height: 1.3;
  margin-bottom: 12px;
}
.gate > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.gate > button {
  margin-top: 8px;
}
.gate-footer {
  font-size: 12px !important;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 24px 0 0;
}
.gate-footer svg {
  width: 13px;
  height: 13px;
}
#gate-status {
  font-size: 13px;
  margin: 16px 0 0;
}
#gate-status:empty { display: none; }
#gate-description { margin-bottom: 24px; }
.signed-in-account {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 24px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--soft);
  text-align: left;
}
.account-confirmed { display: flex; color: var(--muted); }
.account-confirmed svg { width: 22px; height: 22px; }
.signed-in-identity { flex: 1; min-width: 0; }
.signed-in-identity > span { display: block; margin-bottom: 4px; font-size: 11px; color: var(--muted); }
.signed-in-identity strong { display: block; font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
#switch-account { flex: none; min-height: 44px; padding: 6px 0 6px 4px; font-size: 12px; }
label:not(.check):not(.dropzone) {
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-bottom: 9px;
}
input[type="password"],
input[type="text"],
.secret {
  width: 100%;
  border: 1px solid var(--line-strong);
  padding: 13px;
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  min-width: 0;
  font-size: 14px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 17px;
}
.check input {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--strong);
}
.field-note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 9px 0 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.field-note svg {
  width: 14px;
  height: 14px;
}
.library-toolbar {
  padding: 0 0 16px; overflow-x: auto;
}
.filters {
  display: flex; align-items: center; gap: 6px; min-width: max-content;
}
.filter {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 8px 12px; min-height: 44px; color: var(--muted); border-radius: 12px;
}
.filter.active {
  color: var(--ink); background: var(--soft); font-weight: 650;
}
.icon-button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
}
.icon-button:hover {
  background: var(--soft-hover);
}
.post-visual {
  width: 100%;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  position: relative;
  background: var(--soft-hover);
  aspect-ratio: 1;
  padding: 0;
}
.post-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-visual .loading-image {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--subtle);
}
.post-visual svg {
  width: 32px;
  height: 32px;
}
.text-card {
  padding: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  background: var(--soft);
  color: var(--ink);
}
.text-card .text-body {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.text-card .text-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 12px;
  color: var(--muted);
}
.text-meta svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.file-card {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px;
  gap: 16px;
  aspect-ratio: 1.35;
  background: var(--soft);
}
.file-card > svg {
  width: 48px;
  height: 48px;
  color: var(--muted);
}
.file-card strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.file-card small {
  color: var(--muted);
  font-size: 12px;
}
.search-area {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  background: var(--soft);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 11px;
}
.search-area svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
}
.search-area input {
  background: none;
  color: var(--ink);
  outline: none;
  border: 0;
  flex: 1;
  min-width: 0;
  font-size: 16px;
  height: 22px;
}
.search-area:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-area kbd {
  font-family: inherit;
  font-size: 12px;
  color: var(--subtle);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 1px 6px;
}
.item-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
}
.tile {
  aspect-ratio: 3 / 4; position: relative; min-width: 0; overflow: hidden; padding: 0; border-radius: 6px; text-align: left;
}
.tile .post-visual {
  height: 100%; border-radius: 6px; aspect-ratio: auto;
}
.tile .text-card {
  padding: 18px;
  min-height: 0;
}
.tile .text-body {
  font-size: 16px;
  line-height: 1.7;
  -webkit-line-clamp: 5;
}
.tile .text-meta {
  font-size: 12px;
}
.tile .file-card {
  padding: 16px;
  gap: 10px;
}
.tile .file-card strong {
  font-size: 13px;
}
.tile .file-card > svg {
  width: 30px;
  height: 30px;
}
.tile .file-card small {
  display: none;
}
.tile-type {
  position: absolute;
  right: 9px;
  top: 9px;
  padding: 5px;
  background: #17171d50;
  color: white;
  border-radius: 6px;
}
.tile-type svg {
  width: 15px;
  height: 15px;
}
.tile-video-label { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; line-height: 1.4; white-space: nowrap; }
.tile-video-label svg { width: 13px; height: 13px; }
.tile-type.tile-video-label { background: #18181bdd; padding: 4px 6px; }
.empty {
  text-align: center;
  padding: 72px 20px;
}
.empty > span {
  color: var(--subtle);
  margin-bottom: 20px;
}
.empty > span svg {
  width: 44px;
  height: 44px;
}
.empty h2 {
  font-size: 20px;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.empty p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}
.empty button {
  margin-top: 8px;
}
.page-status { min-height: 20px; margin: 20px 0 28px; color: var(--muted); font-size: 12px; text-align: center; }
.page-status:empty { margin: 0; min-height: 0; }
.page-error { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 20px 0 28px; color: var(--error); font-size: 13px; }
.page-error[hidden] { display: none; }
.page-error p { margin: 0; }
.page-error button { min-height: 44px; }
.search-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 12px;
}
.search-status:empty {
  display: none;
}
dialog {
  scroll-padding-block: 96px;
  border: 1px solid var(--line);
  padding: 0;
  width: calc(100% - 32px);
  max-width: 510px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 24px 80px #0002;
  overscroll-behavior: contain;
  max-height: 90dvh;
  overflow-y: auto;
  color: inherit;
}
#agent-dialog { width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
#agent-dialog .dialog-body { overflow-y: auto; max-height: calc(100dvh - 130px); }
#agent-dialog section + section, #agent-search-form, #agent-plan { margin-top: 24px; }
.agent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.agent-actions input { flex: 1 1 160px; min-width: 0; width: auto; margin: 0; }
#agent-query { font: inherit; font-size: 16px; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
#agent-destination { overflow-wrap: anywhere; }
.agent-items { list-style: none; padding: 0; margin: 12px 0; }
.agent-items li { padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.agent-items small { display: block; color: var(--muted); font-size: 12px; margin: 4px 0; }
#agent-read { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; background: var(--soft); padding: 12px; }
#agent-dialog select { width: 100%; max-width: 100%; }
@media (max-width: 640px) { #agent-dialog { width: 100%; } }
dialog::backdrop {
  background: var(--scrim);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
}
.dialog-header > div { min-width: 0; }
.dialog-context { margin: 4px 0 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.dialog-header h2 {
  overflow-wrap: anywhere;
  font-size: 16px;
  letter-spacing: -0.3px;
  margin: 0;
}
.dialog-body {
  padding: 20px;
}
.dialog-body > p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
.dialog-footer {
  padding: 12px 20px 20px;
  position: sticky;
  bottom: 0;
  background: var(--surface);
  z-index: 1;
}
.dialog-footer.button-row {
  justify-content: flex-end;
}
.button-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.secret {
  resize: none;
  font-family: ui-monospace, SFMono-Regular, monospace;
  line-height: 1.7;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.error {
  color: var(--error) !important;
  font-size: 13px !important;
  margin-top: 12px;
}
.error:empty {
  display: none;
}
.password-field { position: relative; min-width: 0; }
.password-field > input[data-password] { width: 100%; min-height: 48px; padding: 11px 72px 11px 12px; font: inherit; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.password-toggle { position: absolute; right: 2px; top: 2px; bottom: 2px; min-width: 64px; padding: 0 10px; border-radius: 8px; font-size: 13px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.password-toggle:hover { background: var(--soft); }
.library-notice { display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin-bottom: 16px; border-radius: 10px; background: var(--soft); }
.library-notice p { flex: 1; margin: 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.library-notice button { flex-shrink: 0; min-height: 44px; }
.dialog-notice { margin: 0; padding: 12px 20px; background: var(--soft); color: var(--ink); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
#compose-text {
  display: block;
  border: 0;
  resize: vertical;
  width: 100%;
  min-height: 130px;
  font-size: 16px;
  line-height: 1.8;
  margin: 0 0 16px;
  padding: 0 0 15px;
  outline-offset: 4px;
}
.dropzone {
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  gap: 9px;
  padding: 20px 12px;
  position: relative;
  background: var(--surface);
  cursor: pointer;
}
.dropzone > span:first-child {
  color: var(--subtle);
  margin-bottom: 5px;
}
.dropzone strong {
  font-size: 14px;
  font-weight: 550;
}
.dropzone > span:last-of-type {
  font-size: 12px;
  color: var(--muted);
}
.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}
.attachment {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.attachment .attachment-name {
  flex: 1;
  overflow-wrap: anywhere;
}
.attachment small {
  color: var(--muted);
}
progress {
  width: 100%;
  height: 6px;
  accent-color: var(--ink);
}
#upload-status {
  font-size: 13px;
}
dialog.content-dialog[open] {
  --photo-h: min(calc(100dvh - 48px), calc((100vw - 533px) * 1.25));
  --photo-w: calc(var(--photo-h) * .8);
  --info-w: clamp(405px, calc(100vw - 128px - var(--photo-w)), 500px);
  display: flex;
  flex-direction: column;
  width: calc(var(--photo-w) + var(--info-w));
  height: var(--photo-h);
  max-width: none;
  max-height: none;
  margin: auto;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
}
.content-dialog > form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.content-dialog .dialog-header, .content-dialog .dialog-footer { flex: none; position: relative; }
.content-dialog .dialog-header { gap: 8px; }
.content-dialog .dialog-header > h2, .content-dialog .dialog-header > div:not(.detail-header-actions) { flex: 1; }
.content-dismiss { flex-shrink: 0; }
.content-dismiss [data-icon="chevron"] { display: none; }
.content-dialog .dialog-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.content-dialog > form > .dialog-body { width: 100%; max-width: 760px; align-self: center; }
#detail-dialog {
  color: var(--ink);
  background: var(--surface);
  outline: none;
}
#detail-dialog:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
#detail-dialog .icon-button:hover { background: var(--line); }
#detail-dialog[open] { display: grid; grid-template-columns: var(--photo-w) minmax(0, var(--info-w)); grid-template-rows: 64px minmax(0, 1fr) 70px auto; }
#detail-content, .detail-post { display: contents; }
.detail-post-header, .detail-post-actions { display: none; }
#detail-dialog > .dialog-header { grid-column: 2; grid-row: 1; padding: 8px 16px; }
#detail-dialog > .dialog-notice { grid-column: 2; grid-row: 4; max-height: 25dvh; overflow: auto; }
.detail-header-actions, .detail-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.detail-header-actions #detail-group-action { display: flex; gap: 2px; }
.detail-group-delete { min-height: 44px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
.detail-post-step:disabled { visibility: hidden; }
#detail-previous-post svg { transform: rotate(90deg); }
#detail-next-post svg { transform: rotate(-90deg); }
#detail-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-width: 0; }
.detail-stage { grid-column: 1; grid-row: 1 / 5; min-height: 0; min-width: 0; position: relative; background: var(--soft); overflow: hidden; }
.detail-media { width: 100%; height: 100%; position: relative; display: flex; align-items: center; justify-content: center; overflow: auto; overscroll-behavior: contain; }
.detail-media.detail-text-slide { display: block; }
.detail-media > .post-visual { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
.detail-media > .post-visual img { object-fit: contain; }
.detail-media > .text-card { padding: 24px; }
.detail-media > .detail-text { width: 100%; padding: 32px 64px 60px; margin: 0; line-height: 1.8; }
.detail-media > .detail-text-editor { width: 100%; padding: 28px 64px 60px; }
.detail-text-editor { min-width: 0; cursor: text; }
.detail-text-editor > .detail-text { margin: 0; line-height: 1.8; }
.detail-text-editor:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
.detail-edit-hint { display: block; margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.detail-edit-hint:is(button) { min-height: 44px; padding: 6px 0; text-align: left; }
.detail-empty-text { color: var(--muted) !important; min-height: 44px; }
textarea.detail-text-input { display: block; width: 100%; min-height: 96px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.8; overflow: hidden; resize: none; }
textarea.detail-text-input:focus-visible { outline: none; box-shadow: none; }
.detail-text-editor.is-editing { cursor: auto; }
.detail-text-editor.is-editing > .detail-edit-hint { display: none; }
.detail-text-editor.is-editing:focus-within { box-shadow: inset 3px 0 var(--accent); }
.detail-caption-section .detail-text-editor.is-editing { padding-left: 12px; }
.detail-media .detail-text-input { min-height: min(360px, 40dvh); }
.detail-editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.detail-editor-actions button { min-height: 44px; min-width: 64px; }
.detail-media > .field-note { padding: 20px; }
.detail-media > .file-card { background: var(--soft); color: var(--ink); }
.detail-video { width: 100%; height: 100%; object-fit: contain; background: #101113; }
.detail-video-player { position: relative; width: 100%; height: 100%; background: #101113; }
.detail-video-player > .detail-video { display: block; }
.detail-video-toggle { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; color: white; }
.detail-video-toggle.is-paused::after { content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0; border-top: 16px solid transparent; border-bottom: 16px solid transparent; border-left: 25px solid white; transform: translate(-35%, -50%); filter: drop-shadow(0 1px 5px #0009); }
.detail-video-toggle:focus-visible { outline: 2px solid white; outline-offset: -6px; }
.detail-video-mute { position: absolute; z-index: 4; right: 8px; bottom: 44px; display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border-radius: 50%; color: white; background: #18181bcc; }
.detail-video-mute svg { width: 24px; height: 24px; }
.detail-video-mute:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.detail-video-track { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; height: 3px; background: linear-gradient(to right, white var(--video-progress, 0%), #ffffff66 var(--video-progress, 0%)); pointer-events: none; }
.detail-video-seek { position: absolute; z-index: 4; right: 0; bottom: 0; left: 0; width: 100%; height: 44px; margin: 0; padding: 0; border: 0; background: transparent; appearance: none; touch-action: none; cursor: pointer; }
.detail-video-seek::-webkit-slider-runnable-track { height: 44px; background: transparent; }
.detail-video-seek::-webkit-slider-thumb { appearance: none; width: 44px; height: 44px; border: 0; background: transparent; }
.detail-video-seek::-moz-range-track { height: 44px; background: transparent; }
.detail-video-seek::-moz-range-thumb { width: 44px; height: 44px; border: 0; background: transparent; }
.detail-video-seek:focus-visible { outline: 2px solid white; outline-offset: -5px; }
.detail-video-seek:disabled { cursor: default; }
.detail-photo-surface { position: absolute; inset: 0; touch-action: none; user-select: none; overflow: hidden; }
.detail-image { position: absolute; left: 50%; top: 50%; max-width: none; max-height: none; user-select: none; -webkit-user-drag: none; }
.detail-zoom-controls { position: absolute; right: 8px; top: 8px; display: flex; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.detail-zoom-controls button { min-width: 44px; min-height: 44px; padding: 8px; font-size: 13px; }
.detail-zoom-controls button:disabled { cursor: default; }
.detail-stage > .icon-button { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: 0 1px 8px #0002; }
.detail-stage > .icon-button:disabled { visibility: hidden; }
.detail-stage .detail-previous { left: 12px; }
.detail-stage .detail-next { right: 12px; }
.detail-next svg { transform: rotate(180deg); }
.detail-navigation { position: absolute; bottom: 4px; left: 56px; right: 56px; display: flex; justify-content: center; pointer-events: none; }
.detail-navigation.is-transient { bottom: calc(var(--detail-media-bottom, 0px) + 15px); }
.detail-navigation.is-transient.is-faded { opacity: 0; }
.detail-stage-video > .icon-button, .detail-stage-video .detail-navigation { z-index: 3; }
.detail-stage-video > .icon-button { top: min(50%, calc(100% - 112px)); }
.detail-dots { display: flex; gap: 4px; max-width: 100%; height: 6px; overflow: hidden; pointer-events: none; }
.detail-navigation.is-transient .detail-dots { filter: drop-shadow(0 1px 1px #0009); }
@media (prefers-reduced-motion: no-preference) {
  .detail-navigation.is-transient.is-faded { transition: opacity 350ms ease; }
  .detail-media.slide-from-next { animation: detail-slide-from-next 220ms ease-out; }
  .detail-media.slide-from-previous { animation: detail-slide-from-previous 220ms ease-out; }
}
@keyframes detail-slide-from-next { from { transform: translateX(32px); opacity: .5; } }
@keyframes detail-slide-from-previous { from { transform: translateX(-32px); opacity: .5; } }
.detail-dot { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: white; opacity: .48; }
.detail-dot.is-current { opacity: 1; }
.detail-navigation:not(.is-transient) .detail-dot { background: var(--ink); }
.detail-caption { grid-column: 2; grid-row: 2; min-height: 0; min-width: 0; padding: 20px 24px; overflow-y: auto; overscroll-behavior: contain; }
.detail-caption-section { position: relative; border-top: 1px solid var(--line); padding: 16px 44px 16px 0; }
.detail-caption-section:first-child { border-top: 0; padding-top: 0; }
.detail-caption-section h3 { font-size: 13px; margin: 0 0 8px; color: var(--muted); }
.detail-caption-section .icon-button { position: absolute; right: 0; top: 8px; }
.detail-caption-section:first-child .icon-button { top: -8px; }
.detail-caption-section .detail-text { margin: 0; line-height: 1.8; }
#detail-footer { grid-column: 2; grid-row: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 8px 12px; min-width: 0; }
.detail-current { min-width: 0; flex: 1; text-align: right; }
.detail-current strong, .detail-current span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-current strong { font-size: 12px; font-weight: 400; }
.detail-current span { font-size: 11px; color: var(--muted); }
#detail-dialog .detail-text { color: var(--ink) !important; }
#detail-dialog.detail-reading > .dialog-header, #detail-dialog.detail-empty > .dialog-header,
#detail-dialog.detail-reading > .dialog-footer, #detail-dialog.detail-empty > .dialog-footer,
#detail-dialog.detail-reading > .dialog-notice, #detail-dialog.detail-empty > .dialog-notice { grid-column: 1 / -1; }
.detail-post.detail-reading .detail-stage { grid-column: 1 / -1; grid-row: 2; background: var(--surface); }
.detail-post.detail-reading .detail-caption { display: none; }
.detail-post.detail-reading .detail-media > .detail-text { max-width: 800px; margin: auto; padding: 32px; }
.detail-post.detail-reading .detail-media > .detail-text-editor { max-width: 800px; margin: auto; padding: 28px 32px 40px; }
#detail-dialog.detail-empty #detail-content { display: block; grid-column: 1 / -1; grid-row: 2; padding: 24px; overflow-y: auto; }
.detail-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 16px !important;
  color: var(--ink) !important;
}
.detail-text a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
#account-email { font-weight: 650; overflow-wrap: anywhere; margin-bottom: 8px; }
.settings-section { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 20px; }
.settings-section h3, .settings-section summary { font-size: 15px; font-weight: 650; }
.settings-section summary { cursor: pointer; min-height: 44px; padding: 12px 0; }
.settings-section[open] summary { margin-bottom: 16px; }
.session-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.session-row > div { flex: 1; min-width: 0; }
.session-row strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.session-row small { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.session-row button { flex: none; }
#account-sessions { margin-bottom: 12px; }
#toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--tooltip);
  color: var(--tooltip-ink);
  font-size: 14px;
  line-height: 1.6;
  padding: 13px 22px;
  border-radius: 10px;
  box-shadow: 0 4px 25px #0002;
  max-width: calc(100% - 32px);
  width: max-content;
}
#global-drop {
  position: fixed;
  inset: 15px;
  background: var(--nav-glass);
  border: 2px dashed var(--accent);
  z-index: 90;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: 600;
  pointer-events: none;
}
.mobile-header,
.upload-fab {
  display: none;
}
#sentinel {
  height: 1px;
}
@media (max-width: 600px) {
  html { scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .sidebar {
    display: none;
  }
  .workspace {
    margin: 0;
    padding: 0 20px 88px;
  }
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    margin: 0 -20px 12px;
    padding: 0 20px;
  }
  .mobile-header .wordmark {
    font-size: 30px;
  }
  .mobile-header-actions { display: flex; gap: 4px; }
  .page-header { gap: 8px; margin-bottom: 10px; }
  .upload-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: calc(16px + env(safe-area-inset-right));
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: var(--on-strong);
    background: var(--strong);
    box-shadow: 0 6px 18px #18181b33;
    z-index: 20;
  }
  .upload-fab svg { width: 26px; height: 26px; }
  .gate { padding: 20px 4px; margin: 24px auto; }
  .gate h2 { font-size: 26px; }
  .library-toolbar {
    padding: 0 0 12px;
  }
  .filter { padding: 8px; font-size: 12px; gap: 4px; }
  .filters { gap: 2px; }
  .item-grid { margin: 0 -14px; gap: 4px; }
  .tile .text-card {
    padding: 12px;
    gap: 12px;
  }
  .tile .text-body {
    font-size: 13px;
    line-height: 1.65;
    -webkit-line-clamp: 4;
  }
  .tile .text-meta {
    font-size: 12px;
  }
  .tile .text-meta svg {
    width: 12px;
    height: 12px;
  }
  .tile .file-card strong {
    font-size: 12px;
  }
  .tile .file-card > svg {
    width: 25px;
    height: 25px;
  }
  .tile-type {
    right: 6px;
    top: 6px;
    padding: 3px;
  }
  .tile-type svg {
    width: 12px;
    height: 12px;
  }
  .search-area {
    padding: 11px 12px;
  }
  .search-area input { font-size: 16px; }
  .search-area:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-area kbd {
    display: none;
  }
  #toast {
    bottom: calc(88px + env(safe-area-inset-bottom));
  }
  .dialog-body {
    padding: 20px;
  }
  .dialog-footer { padding: 12px 20px calc(20px + env(safe-area-inset-bottom)); }
  dialog { width: 100%; max-width: none; max-height: calc(100dvh - 20px); margin: auto 0 0; border-radius: 24px 24px 0 0; border-bottom: 0; }
  input, select, textarea {
    font-size: 16px;
  }
  .dropzone {
    padding: 20px 12px;
  }
  .post-visual {
    border-radius: 9px;
  }
  .empty {
    padding: 50px 10px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  dialog[open] {
    animation: appear 0.16s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Account and vault controls use the same forms and dialogs as the library. */
select, input[type="email"], input[type="password"], input:not([type]) { font:inherit; color:var(--ink); background:var(--surface); border:1px solid var(--line-strong); border-radius:var(--radius); min-height:44px; padding:11px 12px; max-width:100%; box-sizing:border-box; }
textarea { color: var(--ink); background: var(--surface); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.dialog-body form { display:grid; gap:8px; margin-bottom:16px; }
.dialog-body form > label:not(.check) { margin: 4px 0 0; }
.dialog-body form > .field-note { margin: 0 0 4px; }
.dialog-body h3 { margin:24px 0 8px; font-size:15px; line-height:1.5; }
.dialog-body .member-row { display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:12px 0; border-bottom:1px solid var(--line); font-size:14px; }
.member-row .member-label { flex:1; min-width:160px; overflow-wrap:anywhere; }
.member-row small { display:block; }
.auth-actions { margin-top:12px; justify-content:flex-start; }
#unlock-form { display:grid; gap:10px; text-align:left; }
#invite-result { margin:16px 0; }
#invite-result input { width:100%; margin-bottom:10px; }
#vault-rotation-status { color:var(--warning); }
#storage-usage { flex-basis:100%; }
@media(max-width:700px) { .member-row { align-items:flex-start; } }

/* Google brand asset is served locally; the vault loads no third-party scripts. */
.google-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #747775;
  border-radius: 4px;
  background: #fff;
  color: #1f1f1f;
  font: 500 14px/20px "Google Sans", Arial, sans-serif;
}
.google-signin img { flex: none; width: 20px; height: 20px; }
.google-signin:hover { background: #f2f2f2; }

/* One picker keeps vault navigation distinct from the media filters at any count. */
.vault-picker { flex: 1; min-width: 0; max-width: 420px; }
.vault-picker label { display: block; margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 500; }
#vault-select { width: 100%; min-width: 0; min-height: 48px; padding: 10px 14px; background: var(--soft); font-size: 18px; font-weight: 650; text-overflow: ellipsis; cursor: pointer; }
#vault-select:hover { border-color: var(--muted); }
.sharing-controls, .shared-people { display: flex; align-items: center; }
.sharing-controls { gap: 14px; flex: none; align-self: flex-end; }
.member-avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--selected); color: var(--avatar-ink); border: 6px solid var(--base); font-size: 12px; font-weight: 650; margin-left: -7px; }
#manage-vault { min-height: 44px; padding: 8px 15px; font-size: 13px; }
@media (min-width: 1440px) {
  #main { max-width: 1456px; }
  .item-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1800px) { .item-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 800px) { .workspace { padding: 32px 24px 0; } }
@media (max-width: 600px) {
  .workspace { padding: 0 20px calc(88px + env(safe-area-inset-bottom)); margin-left: 0; }
  #vault-select { font-size: 16px; }
  .sharing-controls { gap: 8px; }
  .member-avatar { border-width: 8px; font-size: 10px; }
  .shared-people .member-avatar:nth-child(n+3) { display: none; }
}

@media (prefers-contrast: more) {
  :root { --muted: #45454b; --line: #8b8b93; --line-strong: #66666d; }
  :root[data-theme="dark"] { --muted: #dedee3; --line: #9b9da6; --line-strong: #b0b0ba; }
  .filter.active { outline: 1px solid currentColor; outline-offset: -1px; }
}
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.tile:focus-visible { outline-offset: -3px; }

/* Selection controls share the existing cards and 44px action targets. */
.selection-tools, #selection-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
#selection-actions { flex: 1; margin-bottom: 0; }
#selection-count { font-size: 13px; color: var(--muted); }
#delete-selected { margin-left: auto; }
.tile[aria-pressed]::after { content: ""; position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border: 2px solid var(--selection); border-radius: 50%; background: var(--surface); }
.tile[aria-pressed="true"]::after { content: "✓"; display: grid; place-items: center; background: var(--selection); color: var(--selection-ink); border-color: var(--selection); }
.tile[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--selection); }
.tile:disabled { opacity: .5; }
.tile-stack { position: absolute; right: 8px; top: 8px; display: flex; color: #fff; filter: drop-shadow(0 1px 2px #0009); pointer-events: none; }
.tile-stack svg { width: 22px; height: 22px; }
.tile .text-card:has(+ .tile-stack) { padding-top: 36px; }
.text-card + .tile-stack, .file-card + .tile-stack { color: var(--ink); filter: none; }
.tile-pin { position: absolute; left: 8px; top: 8px; display: flex; color: #fff; filter: drop-shadow(0 1px 2px #0009); pointer-events: none; }
.tile-pin svg { width: 20px; height: 20px; }
.tile-pin svg path, .detail-pin.is-pinned svg path { fill: currentColor; }
.tile .text-card:has(~ .tile-pin) { padding-top: 36px; }
.text-card ~ .tile-pin, .file-card ~ .tile-pin { color: var(--ink); filter: none; }
.tile[aria-pressed] .tile-pin { display: none; }
.attachment-preview { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; flex: 0 0 56px; }
.attachment-preview-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 6px; background: var(--surface); }
#attachments .attachment { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "preview name size" "preview actions actions"; }
#attachments .attachment-preview, #attachments .attachment-preview-icon { grid-area: preview; }
#attachments .attachment-name { grid-area: name; }
#attachments .attachment small { grid-area: size; }
#attachments .attachment-actions { grid-area: actions; justify-content: flex-end; }
.attachment-actions { display: flex; flex-wrap: wrap; gap: 2px; }
.attachment .attachment-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.attachment button { min-width: 44px; min-height: 44px; }
@media (max-width: 1000px) {
  dialog.content-dialog[open] { width: 100%; height: calc(100dvh - 16px); margin: 8px 0; border-radius: 10px; }
  #detail-dialog[open] { grid-template-columns: minmax(0, 1fr); grid-template-rows: 58px minmax(0, min(125vw, max(0px, calc(100dvh - 136px - env(safe-area-inset-bottom) - min(200px, 30dvh))))) minmax(0, 1fr) calc(62px + env(safe-area-inset-bottom)) auto; }
  #detail-dialog > .dialog-header { grid-column: 1; grid-row: 1; min-height: 0; padding: 6px 12px; }
  .detail-stage { grid-column: 1; grid-row: 2; }
  .detail-caption { grid-column: 1; grid-row: 3; padding: 18px 22px; }
  #detail-footer { grid-column: 1; grid-row: 4; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  #detail-dialog > .dialog-notice { grid-column: 1; grid-row: 5; }
  .detail-post.detail-reading .detail-stage, #detail-dialog.detail-empty #detail-content { grid-row: 2 / 4; }
  .detail-post.detail-reading .detail-media > .detail-text { padding: 24px; }
}
@media (min-width: 601px) and (max-width: 1000px) {
  #detail-dialog[open]:has(.detail-stage-photo, .detail-stage-video) { grid-template-rows: 58px minmax(200px, min(125vw, max(0px, calc(100dvh - 136px - env(safe-area-inset-bottom) - min(200px, 30dvh))))) minmax(0, 1fr) calc(62px + env(safe-area-inset-bottom)) auto; }
}
@media (max-width: 600px) {
  dialog.content-dialog[open] { width: 100%; height: 100dvh; margin: 0; border-radius: 0; }
  .content-dismiss [data-icon="chevron"] { display: inline-flex; }
  .content-dismiss [data-icon="close"] { display: none; }
  .detail-zoom-controls button:disabled:not(:last-child) { display: none; }
  dialog.content-dialog[open] .dialog-header { min-height: calc(64px + env(safe-area-inset-top)); padding-top: calc(12px + env(safe-area-inset-top)); }
  #detail-dialog[open] { position: fixed; top: var(--detail-viewport-top, 0px); bottom: auto; height: var(--detail-viewport-height, 100dvh); grid-template-rows: calc(58px + env(safe-area-inset-top)) minmax(0, 1fr) auto auto; }
  #detail-dialog > .dialog-header { min-height: 0; padding-top: calc(6px + env(safe-area-inset-top)); }
  #detail-content { display: block; grid-column: 1; grid-row: 2; min-height: 0; padding: 0 0 env(safe-area-inset-bottom); overflow-y: auto; overscroll-behavior: contain; overflow-anchor: none; scroll-padding-block: 20px; }
  /* Feed posts can always cover the reading line, so the first and last posts become current too. */
  .detail-post { display: block; position: relative; min-height: calc(var(--detail-viewport-height, 100dvh) * .5); }
  .detail-post + .detail-post { border-top: 1px solid var(--line); }
  .detail-post-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px; }
  .detail-post-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--soft); color: var(--ink); }
  .detail-post-icon svg { width: 20px; height: 20px; }
  .detail-post-heading { display: grid; gap: 1px; min-width: 0; }
  .detail-post-heading strong, .detail-post-heading span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .detail-post-heading strong { font-size: 14px; font-weight: 650; }
  .detail-post-heading span { font-size: 12px; color: var(--muted); }
  .detail-post.detail-empty { padding: 24px; }
  .detail-post-step, #detail-footer { display: none; }
  .detail-post-actions { display: flex; align-items: center; padding: 2px 8px; }
  /* An inline edit keeps its fixed save and cancel buttons at the bottom; the post rows return when it ends. */
  #detail-dialog:has(.detail-text-editor.is-editing) #detail-footer { display: flex; min-height: calc(62px + env(safe-area-inset-bottom)); }
  #detail-dialog:has(.detail-text-editor.is-editing) .detail-post-actions { display: none; }
  .detail-stage { touch-action: pan-y; }
  .detail-feed-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; padding: 24px 22px calc(24px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 13px; text-align: center; }
  .detail-feed-end p { margin: 0; }
  .detail-media { overflow: visible; overscroll-behavior: auto; }
  /* Every post frame shares one height, like a feed's media box: text, photos, videos and bundle members never resize the feed. */
  #detail-content { --detail-stage-height: max(200px, min(125vw, calc(100dvh - 58px - env(safe-area-inset-top) - 172px - env(safe-area-inset-bottom)))); }
  .detail-stage, .detail-post.detail-reading .detail-stage { height: var(--detail-stage-height); background: var(--soft); }
  .detail-stage-text .detail-media, .detail-post.detail-reading .detail-media { height: 100%; overflow-y: auto; }
  /* Editing the body falls back to the single feed scroll so the caret stays reachable; the frame grows only then. */
  .detail-stage:has(.detail-text-editor.is-editing) { height: auto; min-height: var(--detail-stage-height); }
  .detail-stage:has(.detail-text-editor.is-editing) .detail-media { overflow: visible; }
  .detail-caption { padding: 18px 22px; overflow: visible; }
  #detail-dialog > .dialog-notice { grid-row: 4; }
  .detail-stage-text .detail-media > .detail-text { padding: 24px 24px 60px; }
  .detail-stage-text .detail-media > .detail-text-editor { padding: 20px 22px 48px; }
  .detail-stage-text .detail-media > .detail-text-editor.is-editing { padding-bottom: 24px; }
  .detail-post.detail-reading .detail-media > .detail-text { padding: 24px 22px 12px; }
  .detail-post.detail-reading .detail-media > .detail-text-editor { padding: 20px 22px 8px; }
  .detail-post.detail-reading .detail-media > .detail-text-editor.is-editing { padding-bottom: 24px; }
  .detail-caption-section { padding-right: 0; }
  .detail-caption-section:has(> .icon-button) { padding-right: 44px; }
  .detail-media .detail-text-input { min-height: min(360px, calc(var(--detail-viewport-height, 100dvh) * .4)); }
  #detail-dialog.detail-empty #detail-content { grid-row: 2; }
}

/* The native dialog keeps the same sheet layout as account settings. */
.theme-options { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.theme-option { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 48px; margin: 0; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.theme-option input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--accent); }
.theme-option span { min-width: 0; overflow-wrap: anywhere; }
.theme-option:has(input:checked) { border-color: var(--accent); background: var(--soft); }
.theme-option input:checked + span { font-weight: 650; }
.theme-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
