:root {
  --surface-radius: var(--space-10);
  --surface-inset: var(--space-8);
  --row-inset: var(--space-4);
  --row-icon-radius: var(--radius-control);
  --row-radius: calc(var(--row-icon-radius) + var(--row-inset));
  --content-width: 680px;
  --floating-radius: var(--radius-pill);
  --route-reveal: -24%;
  --header-height: 78px;
  --chip-media: var(--accent);
  --chip-youtube: #c41527;
  --chip-instagram: #b91b71;
  --app-safe-top: calc(max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
  --app-safe-bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px)) + var(--tg-content-safe-area-inset-bottom, 0px));
  --app-safe-left: calc(max(env(safe-area-inset-left, 0px), var(--tg-safe-area-inset-left, 0px)) + var(--tg-content-safe-area-inset-left, 0px));
  --app-safe-right: calc(max(env(safe-area-inset-right, 0px), var(--tg-safe-area-inset-right, 0px)) + var(--tg-content-safe-area-inset-right, 0px));
}
[data-theme="dark"] {
  --chip-youtube: #ff626b;
  --chip-instagram: #ff67ad;
}
[data-accent="nature"][data-theme="light"] {
  --app-bg: #f7f8f4;
  --app-card: #fffffc;
  --app-soft: #f0f2eb;
  --accent: #266845;
  --accent-fill: #286f49;
}
[data-accent="nature"][data-theme="dark"] {
  --app-bg: #141a15;
  --app-card: #202921;
  --app-soft: #2a352b;
  --accent: #88d4a4;
  --accent-fill: #507858;
}
* { box-sizing: border-box; }
html, .library-scroll, .detail-scroll { touch-action: manipulation; }
html { background: var(--app-bg); }
body.app { display: block; margin: 0; padding: 0; max-width: none; color: var(--app-text); background: var(--app-bg); font: 500 16px/1.45 var(--font-sans); min-height: 100dvh; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }
button { touch-action: manipulation; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
svg { display: block; width: 20px; height: 20px; }
.top { position: relative; flex: none; }
.appearance { position: relative; flex: none; }
.appearance-actions {
  position: absolute;
  right: calc(100% + var(--space-2));
  top: 0;
  display: flex;
  gap: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateX(14px) scale(.94);
  transform-origin: right center;
  transition: transform var(--dur-base) var(--ease-sheet), opacity var(--dur-fast) ease,
              visibility 0s var(--dur-base);
}
.appearance:has([aria-expanded="true"]) .appearance-actions {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
#appearance-toggle[aria-expanded="true"] { color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .appearance-actions { transition: none; }
}
.accent-button span { width: 18px; height: 18px; border-radius: 50%; background: var(--accent-fill); }
.top, .shell { width: min(100% - 2 * var(--space-4), var(--content-width)); margin-inline: auto; }
.top { height: var(--header-height); padding-inline: calc(var(--row-radius) / 2); display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: var(--space-2); font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-control); color: var(--on-accent, white); background: var(--accent); }
.brand-mark svg { width: 21px; height: 21px; }
.icon-button { display: grid; place-items: center; border: 0; border-radius: var(--radius-pill); width: 44px; height: 44px; color: var(--app-text); background: var(--app-card); }
.icon-button:hover { color: var(--accent); }
.shell { padding: var(--space-8) 0 calc(106px + var(--app-safe-bottom)); }
.shell:has(#records:not([hidden])),
.shell:has(#templates:not([hidden])) { padding-top: var(--space-4); }
#record-list > .section:first-child,
#template-list > .section:first-child { margin-top: 0; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(38px, 8vw, 62px); line-height: 1.04; letter-spacing: -.042em; font-weight: 650; }
.meta, .hint { color: var(--app-muted); }
.section { margin-top: var(--space-8); gap: var(--space-3); }
#record-list .section { grid-template-columns: minmax(0, 1fr); }
.section-title { margin-inline: calc(var(--row-radius) / 2); font-size: 16px; font-weight: 600; color: var(--app-muted); }
.section.message .section-title { margin-inline: calc(var(--surface-radius) / 2); }
.surface { border-radius: var(--surface-radius); background: var(--app-card); padding-inline: var(--surface-inset); }
.rows { display: flex; flex-direction: column; gap: var(--space-1); }
.row.app-row { border: 0; border-radius: var(--row-radius); position: relative; display: block; min-height: 0; padding: var(--row-inset); width: 100%; color: var(--app-text); background: var(--app-card); text-align: left; }
.row-layout { display: flex; align-items: center; column-gap: var(--space-3); }
[data-record] .row-layout { column-gap: var(--row-inset); }
.row.app-row { -webkit-user-select: none; user-select: none; }
.row-hit {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  border: 0;
  padding: 0;
  border-radius: inherit;
  background: transparent;
  appearance: none;
}
html[data-pointer] .row-hit:focus { outline: none; }
.row-hit:focus-visible { outline-color: var(--app-muted); outline-offset: -2px; }
.row-icon { flex: none; align-self: start; display: grid; place-items: center; width: 44px; height: 44px; color: var(--accent); background: var(--accent-soft); border-radius: max(0px, calc(var(--row-radius) - var(--row-inset))); }
[data-record] .row-icon { align-self: center; width: 48px; height: 48px; }
.row-main { flex: 1; display: flex; flex-direction: column; min-width: 0; gap: var(--space-1); overflow-wrap: anywhere; }
[data-record] .row-main { gap: calc(var(--space-1) + 2px); }
.record-processing { color: var(--accent); font-size: 13px; font-variant-numeric: tabular-nums; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.record-facts { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.record-media {
  --media-tone: var(--chip-media);
  --media-tint: 8%;
  color: var(--media-tone);
  background: color-mix(in srgb, var(--media-tone) var(--media-tint), transparent);
}
.record-media[data-media="youtube"] { --media-tone: var(--chip-youtube); --media-tint: 14%; }
.record-media[data-media="instagram"] { --media-tone: var(--chip-instagram); --media-tint: 14%; }
.project-icon {
  position: relative;
  z-index: 1;
  display: none;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  touch-action: manipulation;
}
.project-icon img { display: block; border-radius: inherit; }
.project-icon svg { width: 14px; height: 14px; }
a.project-icon::after { content: ""; position: absolute; inset: -6px; border-radius: inherit; }
.record-duration { font-size: 12px; color: var(--app-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-title { font-size: 16px; line-height: 1.24; font-weight: 650; }
[data-record] .row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 1.2; }
.meta { font-size: 14px; }
.row-arrow { flex: none; align-self: center; color: var(--app-muted); }
.row-arrow svg { width: 23px; height: 23px; }
.unread-badge { flex: none; display: grid; place-items: center; min-width: 24px; min-height: 24px; padding: 0 6px; border-radius: var(--radius-pill); color: var(--on-accent); background: var(--accent-fill); font-size: 12px; font-variant-numeric: tabular-nums; }
.section.message .surface { padding-block: var(--space-5); }
.floating.fab { display: flex; align-items: center; left: calc(var(--space-4) + var(--app-safe-left)); right: calc(var(--space-4) + var(--app-safe-right)); bottom: calc(var(--space-5) + var(--app-safe-bottom)); }
.floating { --tab-size: 46px; --pill-inset: var(--space-1); --pill-border: 1px; --tab-gap: var(--space-1); --create-gap: var(--space-2); }
.dock { position: relative; transition: transform var(--dur-spring) var(--ease-sheet); }
.dock[data-view=templates] { transform: translateX(calc((var(--tab-size) + var(--create-gap)) / -2)); }
.floating .fab__pill { background: var(--glass); border: var(--pill-border) solid var(--border); padding: var(--pill-inset); }
.tab-list { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--tab-gap); }
.tab-list::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc((100% - var(--tab-gap)) / 2); border-radius: calc(var(--floating-radius) - var(--pill-inset) - var(--pill-border)); background: var(--accent-soft); transition: transform var(--dur-spring) var(--ease-sheet); pointer-events: none; }
.dock[data-view=templates] .tab-list::before { transform: translateX(calc(100% + var(--tab-gap))); }
.tab { position: relative; display: flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--tab-size); padding: 0 var(--space-4); border: 0; border-radius: calc(var(--floating-radius) - var(--pill-inset) - var(--pill-border)); color: var(--app-muted); background: transparent; font-weight: 600; transition: color var(--dur-fast) ease; }
.tab[aria-selected=true] { color: var(--accent); }
.create-template { position: absolute; left: calc(100% + var(--create-gap)); top: 50%; display: grid; place-items: center; width: var(--tab-size); height: var(--tab-size); margin: 0; padding: 0; border: 0; border-radius: 50%; color: var(--on-accent); background: var(--accent-fill); transform: translate(-12px, -50%) scale(.74) rotate(-32deg); opacity: 0; visibility: hidden; pointer-events: none; transition: transform var(--dur-spring) var(--ease-sheet), opacity var(--dur-fast) ease, visibility 0s var(--dur-spring); }
.dock[data-view=templates] .create-template { transform: translate(0, -50%) scale(1) rotate(0); opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.create-template:hover { background: var(--accent-hover); }
.create-template svg { width: 24px; height: 24px; }
.btn { white-space: normal; }
.btn svg { width: 17px; height: 17px; }
@media (prefers-reduced-motion: reduce) {
  .dock, .tab-list::before, .create-template, .tab { transition: none; }
}
.library-view, .route-stack { position: fixed; inset: 0; overflow: hidden; }
.library-view { background: var(--app-bg); }
.library-view[data-covered] { transform: translateX(var(--route-reveal)); }
.library-scroll { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; padding: var(--app-safe-top) var(--app-safe-right) 0 var(--app-safe-left); }
.route-stack { z-index: 2; }
.detail { position: absolute; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: var(--app-card); }
.detail.is-leaving { pointer-events: none; }
.detail.is-on-top { z-index: 1; }
.detail-scroll { overflow: auto; overscroll-behavior: contain; padding: calc(var(--surface-inset) + var(--app-safe-top)) calc(var(--surface-inset) + var(--app-safe-right)) var(--space-5) calc(var(--surface-inset) + var(--app-safe-left)); }
.detail-content { max-width: calc(var(--content-width) - 2 * var(--surface-inset)); margin-inline: auto; }
.detail-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-3) max(var(--surface-inset), calc((100% - var(--content-width)) / 2 + var(--surface-inset))) calc(var(--space-4) + var(--app-safe-bottom)); background: var(--app-card); border-top: 1px solid var(--border); }
.detail-footer:not(.detail-islands) {
  padding-left: max(calc(var(--surface-inset) + var(--app-safe-left)), calc((100% - var(--content-width) + var(--app-safe-left) - var(--app-safe-right)) / 2 + var(--surface-inset)));
  padding-right: max(calc(var(--surface-inset) + var(--app-safe-right)), calc((100% - var(--content-width) + var(--app-safe-right) - var(--app-safe-left)) / 2 + var(--surface-inset)));
}
.detail-footer .btn { min-height: 48px; justify-content: center; gap: var(--space-2); padding: var(--space-2) var(--space-4); }
.detail:has(.detail-islands) .detail-scroll { padding-bottom: calc(92px + var(--app-safe-bottom)); }
.detail[data-current-page]:has(.template-note) {
  top: var(--editor-viewport-top, 0px);
  bottom: var(--editor-viewport-bottom, 0px);
}
.detail[data-editor-keyboard] { --app-safe-bottom: 0px; }
.detail-islands { --island-size: 52px; position: absolute; z-index: 1; left: calc(50% + (var(--app-safe-left) - var(--app-safe-right)) / 2); bottom: calc(var(--space-5) + var(--app-safe-bottom)); transform: translateX(-50%); display: grid; grid-template-columns: var(--island-size) minmax(0, max-content) var(--island-size); justify-content: center; align-items: center; gap: var(--space-2); width: max-content; max-width: calc(100% - 2 * var(--surface-inset) - var(--app-safe-left) - var(--app-safe-right)); margin: 0; padding: 0; background: transparent; border: 0; }
.detail-islands .btn { min-height: var(--island-size); border-radius: var(--radius-pill); box-shadow: 0 3px 20px color-mix(in srgb, var(--scrim) 4%, transparent); }
.detail-islands .btn:focus-visible { outline: 2px solid var(--app-muted); outline-offset: 3px; }
.detail-islands .footer-icon { width: var(--island-size); height: var(--island-size); padding: 0; border-radius: 50%; border: 1px solid var(--border); background: var(--glass); color: var(--app-text); backdrop-filter: blur(var(--blur-glass)) saturate(1.4); }
.detail-islands .footer-icon:hover { color: var(--accent); }
.detail-islands .footer-icon svg { width: 23px; height: 23px; }
.detail-islands > .footer-icon:only-child { grid-column: 2; }
.detail-islands:has(.island-slot) { display: flex; flex-wrap: nowrap; gap: 0; }
.detail-islands:has(.island-slot) > .btn { flex: none; }
.detail-islands:has(.island-slot) > .btn + .btn { margin-inline-start: var(--space-2); }
.island-slot {
  --slot-size: var(--island-size);
  flex: none;
  width: 0;
  margin-inline-start: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px) scale(.94);
  transform-origin: left center;
  transition: width var(--dur-base) var(--ease-sheet), margin-inline-start var(--dur-base) var(--ease-sheet),
              transform var(--dur-base) var(--ease-sheet), opacity var(--dur-fast) ease,
              visibility 0s var(--dur-base);
}
.island-slot--apply { --slot-size: 144px; }
.island-slot > .btn { width: var(--slot-size); white-space: nowrap; }
.island-slot[data-visible] {
  width: var(--slot-size);
  margin-inline-start: var(--space-2);
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
@media (prefers-reduced-motion: reduce) {
  .island-slot { transition: none; }
}
.detail h2 { max-width: calc(100% - 24px); font-size: clamp(25px, 5vw, 36px); line-height: 1.12; letter-spacing: -.025em; font-weight: 650; overflow-wrap: anywhere; }
.detail-lead h2:focus { outline: none; }
.detail-lead h2::selection { background: var(--app-soft); color: var(--app-text); }
.detail-lead { display: grid; gap: var(--space-2); }
.detail-lead:has(.record-headline) { gap: calc(var(--space-2) + 2px); }
.record-headline { display: flex; align-items: center; gap: var(--space-3); }
.record-headline h2 { min-width: 0; }
.detail-record-icon { display: none; }
.detail-section { margin-top: var(--space-6); }
.media-original summary { cursor: pointer; font-weight: 650; }
.media-original :is(p, img, h4, a) { margin-top: var(--space-3); }
.media-original p { white-space: pre-wrap; overflow-wrap: anywhere; }
.media-original img { display: block; max-width: 100%; max-height: 480px; border-radius: var(--radius-control); }
.media-original-link { display: inline-block; color: var(--accent); }
.detail-section h3 { font-size: 16px; margin: 0 0 var(--space-3); font-weight: 650; }
.transcript { margin: 0; padding: 0; list-style: none; }
.transcript li { padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.line-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-1); color: var(--app-muted); font-size: 13px; }
.line-meta time { color: var(--accent); font-variant-numeric: tabular-nums; }
.speaker-chip {
  --speaker-tone: var(--accent);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  color: var(--speaker-tone);
  background: color-mix(in srgb, var(--speaker-tone) 16%, transparent);
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.speaker-chip[data-tone="1"] { --speaker-tone: #206350; }
.speaker-chip[data-tone="2"] { --speaker-tone: #855018; }
.speaker-chip[data-tone="3"] { --speaker-tone: #843d72; }
[data-theme="dark"] .speaker-chip[data-tone="1"] { --speaker-tone: #75d5b1; }
[data-theme="dark"] .speaker-chip[data-tone="2"] { --speaker-tone: #f0b879; }
[data-theme="dark"] .speaker-chip[data-tone="3"] { --speaker-tone: #e4a0d1; }
[data-theme="light"] { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
@media (prefers-reduced-motion: no-preference) {
  :is(body.app, .library-view, .detail, .row.app-row, .row-icon, .detail-footer, .detail-islands .footer-icon, .floating .fab__pill, .tab-list::before, .speaker-chip, .record-media, .template-option, .icon-button) {
    transition: background-color 230ms ease, color 230ms ease, border-color 230ms ease;
  }
  .tab-list::before { transition: transform var(--dur-spring) var(--ease-sheet), background-color 230ms ease; }
}
.template-note__screen-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.template-note { display: grid; gap: var(--space-4); }
.template-note__field { display: grid; min-width: 0; font-size: 16px; line-height: 1.55; }
.template-note__field--name { font-size: 20px; font-weight: 650; line-height: 1.25; }
.template-note__field::after,
.template-note textarea {
  grid-area: 1 / 1;
  box-sizing: border-box;
  min-width: 0;
  padding: 0;
  border: 0;
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.template-note__field::after { content: attr(data-value) " "; visibility: hidden; pointer-events: none; }
.template-note textarea {
  display: block;
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  resize: none;
  appearance: none;
  border-radius: 0;
  background: transparent;
  color: var(--app-text);
  caret-color: var(--accent);
}
.template-note textarea:focus-visible { outline: none; }
.template-note textarea::placeholder { color: var(--app-muted); opacity: 1; }
.template-note__field--prompt { grid-template-rows: minmax(8em, auto); }
.template-options { display: grid; gap: var(--space-2); min-width: 0; margin: var(--space-5) 0 0; padding: 0; border: 0; }
.template-option {
  --check-size: 20px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) var(--check-size);
  align-items: center;
  gap: var(--space-3);
  position: relative;
  min-width: 0;
  padding: var(--row-inset);
  border-radius: var(--row-radius);
  background: color-mix(in srgb, var(--app-soft) 65%, var(--app-card));
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.template-option:has(:checked) { background: var(--accent-soft); }
.template-option:has(:disabled:not(:checked)) { opacity: .6; cursor: default; }
.template-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; appearance: none; -webkit-tap-highlight-color: transparent; }
html:not([data-pointer]) .template-option:has(:focus-visible) { box-shadow: 0 0 0 2px var(--accent); }
.template-option__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: max(0px, calc(var(--row-radius) - var(--row-inset)));
  background: var(--accent-soft);
  color: var(--accent);
}
.template-option__mark {
  display: grid;
  place-items: center;
  width: var(--check-size);
  height: var(--check-size);
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--app-muted) 35%, transparent);
  color: transparent;
}
.template-option :checked ~ .template-option__mark { border-color: var(--accent-fill); color: var(--on-accent); background: var(--accent-fill); }
.template-option__mark svg { width: 13px; height: 13px; }
.template-option__text { display: grid; gap: var(--space-1); min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
.template-option__text small { color: var(--app-muted); font-size: 13px; }
.template-progress {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-control);
  background: var(--app-soft);
  color: var(--app-text);
  font-size: 14px;
}
.template-progress span { display: block; color: var(--app-muted); }
.result-list {
  --row-inset: var(--space-3);
  margin-bottom: var(--space-4);
}
.result-list .row.app-row { background: var(--app-soft); }
.result-list > h3 { padding-inline: calc(var(--row-radius) / 2); }
.result-document {
  margin-top: var(--space-6);
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.result-document > * + * { margin-top: var(--space-4); }
.result-document :is(h1, h2, h3, h4, h5, h6) { margin-block: var(--space-6) var(--space-2); line-height: 1.25; }
.result-document > :first-child { margin-top: 0; }
.result-document h1 { font-size: clamp(23px, 4vw, 31px); }
.result-document h2 { font-size: clamp(19px, 3vw, 24px); }
.result-document :is(h3, h4, h5, h6) { font-size: 17px; }
.result-document :is(ul, ol) { padding-inline-start: var(--space-5); }
.result-document li + li,
.result-document li > :is(p, ul, ol) + :is(p, ul, ol) { margin-top: var(--space-2); }
.result-document input[type=checkbox] { margin-inline: 0 var(--space-1); accent-color: var(--accent); }
.result-document .task-list-item { list-style: none; }
:is(.result-document, .result-document blockquote) > :is(ul, ol):has(> .task-list-item) {
  padding-inline-start: 0;
}
:is(.result-document, .result-document blockquote) > :is(ul, ol):has(> .task-list-item) > li:not(.task-list-item) {
  margin-inline-start: var(--space-5);
}
.result-document a { color: var(--accent); }
.result-document blockquote {
  margin-inline: 0;
  padding: var(--row-inset);
  border-radius: var(--row-radius);
  background: var(--app-soft);
}
.result-document blockquote > * + * { margin-top: var(--space-3); }
.result-document hr { height: 1px; border: 0; background: color-mix(in srgb, var(--app-muted) 18%, transparent); }
.result-document :is(pre, table) {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}
.result-document pre { padding: var(--space-3); border-radius: var(--radius-control); background: var(--app-soft); }
.result-document code { font-family: ui-monospace, monospace; }
.result-document :is(th, td) {
  padding: var(--space-2) var(--space-3);
  text-align: start;
  border-bottom: 1px solid var(--border);
  min-width: 84px;
}
.result-document .legacy-result { white-space: pre-wrap; }
.notice { position: fixed; z-index: 1000; bottom: calc(88px + var(--app-safe-bottom)); left: calc(50% + (var(--app-safe-left) - var(--app-safe-right)) / 2); transform: translateX(-50%); background: var(--app-text); color: var(--app-bg); border-radius: var(--radius-pill); padding: var(--space-2) var(--space-4); text-align: center; width: max-content; max-width: calc(100% - var(--space-6) - var(--app-safe-left) - var(--app-safe-right)); }
.notice:not(:empty) { display: flex; align-items: center; gap: var(--space-2); }
.notice:empty { display: none; }
.notice[data-tone="success"] {
  --notice-mark-size: 24px;
  --notice-mark-radius: calc(var(--notice-mark-size) / 2);
  --notice-inset: var(--space-2);
  background: color-mix(in srgb, var(--success) 14%, var(--app-card));
  color: var(--success);
  padding: var(--notice-inset);
  padding-inline-end: calc(var(--notice-inset) + var(--space-2));
  border-radius: calc(var(--notice-mark-radius) + var(--notice-inset));
}
.notice-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--notice-mark-size);
  height: var(--notice-mark-size);
  border-radius: var(--notice-mark-radius);
  color: var(--app-card);
  background: var(--success);
}
.notice-mark svg { width: 15px; height: 15px; }
.clipboard-source { position: fixed; inset: 0 auto auto 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; font-size: 16px; }
@media (pointer: coarse) {
  .detail:has(.transcript) .detail-scroll { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .notice:not(:empty) { animation: toast-enter 220ms var(--ease-sheet) both; }
}
@keyframes toast-enter {
  from { opacity: 0; transform: translate(-50%, 8px) scale(.97); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 600px) {
  :root { --surface-radius: var(--space-5); --surface-inset: var(--space-5); --row-inset: var(--space-3); }
  :root { --header-height: 62px; }
  .shell { padding-top: var(--space-5); }
  .section { margin-top: var(--space-6); }
  .tab { padding-inline: var(--space-3); }
  .detail-footer:not(.detail-islands) { display: grid; grid-template-columns: 1fr; }
  :is(.template-option__text small, #template-list .app-row__meta) {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
}
.empty-state { color: var(--app-muted); padding-inline: calc(var(--surface-radius) / 2); }
.more-records { margin-top: var(--space-4); margin-inline: auto; display: flex; }
.request-error { padding: var(--space-3); margin-bottom: var(--space-3); border-radius: var(--radius-control); color: var(--danger); background: var(--app-soft); }
