:root {
  color-scheme: light dark;
  --background: #f0f9ff;
  --surface: #ffffff;
  --surface-soft: #e8f2f8;
  --text: #0c4a6e;
  --text-strong: #082f49;
  --text-muted: #475569;
  --primary: #0369a1;
  --primary-soft: #e0f2fe;
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --border: #bae6fd;
  --focus: #0284c7;
  --danger: #b91c1c;
  --success: #166534;
  --sentiment-positive: #15803d;
  --sentiment-negative: #b91c1c;
  --sentiment-neutral: #64748b;
  --sentiment-mixed: #7c3aed;
  --shadow: 0 16px 40px rgba(12, 74, 110, 0.1);
  --shadow-soft: 0 8px 24px rgba(12, 74, 110, 0.07);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --motion-fast: 160ms;
  --motion-standard: 240ms;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #071b27;
    --surface: #0b2635;
    --surface-soft: #123748;
    --text: #d8f0fb;
    --text-strong: #f4fbff;
    --text-muted: #b8d0dc;
    --primary: #7dd3fc;
    --primary-soft: #0c3b51;
    --accent: #fb923c;
    --accent-hover: #fdba74;
    --border: #25556a;
    --focus: #7dd3fc;
    --danger: #fca5a5;
    --success: #86efac;
    --sentiment-positive: #4ade80;
    --sentiment-negative: #f87171;
    --sentiment-neutral: #94a3b8;
    --sentiment-mixed: #a78bfa;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.2);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--background);
  scroll-padding-top: 92px;
}

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 5% 0%, color-mix(in srgb, var(--primary) 15%, transparent), transparent 34rem),
    radial-gradient(circle at 100% 16%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 30rem),
    var(--background);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  touch-action: manipulation;
}

button {
  font: inherit;
}

button:not(:disabled),
a {
  cursor: pointer;
}

a {
  color: var(--primary);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--surface);
  background: var(--text-strong);
  transform: translateY(-160%);
  transition: transform var(--motion-fast) ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
  background: color-mix(in srgb, var(--background) 90%, transparent);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, 100%);
  min-height: 72px;
  margin: 0 auto;
  padding: 12px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text-strong);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(145deg, #0284c7, #0c4a6e);
  box-shadow: 0 8px 18px rgba(3, 105, 161, 0.2);
  font-size: 18px;
  font-weight: 850;
}

.header-actions,
.language-switch {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 10px;
}

.logout-form {
  position: relative;
  margin: 0;
}

.logout-error {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, calc(100vw - 32px));
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 38%, var(--border));
  border-radius: var(--radius-sm);
  color: var(--text-strong);
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  box-shadow: var(--shadow-card);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.language-switch {
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.language-switch button {
  min-width: 44px;
  min-height: 44px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  color: var(--text-muted);
  background: transparent;
  font-size: 13px;
  font-weight: 750;
  transition: color var(--motion-fast) ease, background var(--motion-fast) ease;
}

.language-switch button[aria-pressed="true"] {
  color: var(--text-strong);
  background: var(--primary-soft);
}

.quiet-button,
.primary-button,
.secondary-button {
  min-height: 44px;
  border-radius: 999px;
  font-weight: 750;
  transition:
    color var(--motion-fast) ease,
    background var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    opacity var(--motion-fast) ease;
}

.quiet-button {
  padding: 8px 14px;
  border: 1px solid transparent;
  color: var(--text-muted);
  background: transparent;
}

.quiet-button:hover {
  color: var(--text-strong);
  background: var(--surface-soft);
}

.primary-button {
  padding: 10px 20px;
  border: 1px solid var(--accent);
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 20%, transparent);
}

.primary-button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.secondary-button {
  padding: 10px 22px;
  border: 1px solid var(--border);
  color: var(--text-strong);
  background: var(--surface);
}

.secondary-button:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.page-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) 20px calc(64px + env(safe-area-inset-bottom));
}

.notice {
  margin-bottom: 24px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--success) 38%, var(--border));
  border-radius: var(--radius-sm);
  color: var(--text-strong);
  background: color-mix(in srgb, var(--success) 8%, var(--surface));
  font-weight: 650;
}

.notice[data-state="error"] {
  border-color: color-mix(in srgb, var(--danger) 38%, var(--border));
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
}

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 36px;
}

.eyebrow,
.state-kicker,
.section-label {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  color: var(--text-strong);
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, 6vw, 62px);
  letter-spacing: -0.052em;
}

.lede {
  max-width: 690px;
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: clamp(16px, 2.2vw, 19px);
}

.count-card {
  display: grid;
  min-width: 112px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  color: var(--text-muted);
  text-align: center;
}

.count-card strong,
.count-card > span:first-child {
  color: var(--text-strong);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  line-height: 1.1;
}

.sms-capture-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: -8px 0 28px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--primary-soft) 58%, var(--surface));
  box-shadow: var(--shadow-soft);
}

.sms-capture-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  color: var(--primary);
  background: var(--surface);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 12%, transparent);
}

.sms-capture-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sms-capture-copy {
  min-width: 0;
}

.sms-capture-copy .section-label {
  margin-bottom: 3px;
}

.sms-capture-copy h2 {
  margin: 0;
  font-size: clamp(19px, 2.5vw, 24px);
}

.sms-capture-copy p:last-child {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.sms-number {
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  text-underline-offset: 4px;
}

.sms-capture-action {
  white-space: nowrap;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.library-toolbar {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.library-toolbar h2 { margin: 0 0 16px; font-size: 21px; }
.library-categories, .library-category-editor { margin: 0; padding: 0; border: 0; min-width: 0; }
.library-categories legend, .library-category-editor legend { margin-bottom: 8px; font-weight: 650; }
.library-categories { display: flex; flex-wrap: wrap; gap: 8px; }
.library-chip {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
}
.library-chip[aria-pressed="true"] { color: var(--surface); background: var(--primary); border-color: var(--primary); font-weight: 700; }
.library-chip:hover { box-shadow: 0 0 0 2px var(--border); }
.library-hint { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.library-search, .library-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.library-field { display: grid; gap: 8px; flex: 1 1 210px; min-width: 0; font-weight: 600; }
.library-field input, .library-field select {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-strong);
  font: inherit;
  font-weight: 400;
}
.library-toolbar :focus-visible, .library-dialog :focus-visible, .library-card :focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.library-result { font-weight: 650; }
.library-notice:empty, .library-result:empty, .library-dialog-status:empty { display: none; }
.library-collection-status, .library-selection, .library-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.library-selection { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.library-selection[hidden] { display: none; }
.library-card { min-width: 0; display: flex; flex-direction: column; }
.library-card .saved-card { flex: 1; }
.library-item-select, .library-check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.library-item-select { align-self: start; padding: 4px 12px; }
.library-item-select input, .library-check input { width: 20px; height: 20px; accent-color: var(--primary); }
.library-detail-actions { margin-top: 16px; }
.library-toolbar .quiet-button, .library-dialog .quiet-button, .library-detail-actions .quiet-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.library-dialog-body { display: grid; gap: 16px; }
.library-dialog-body p { margin: 0; line-height: 1.6; overflow-wrap: anywhere; }
.library-dialog-body button { min-height: 44px; }
.library-collection-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 16px; border-top: 1px solid var(--border); }
.library-collection-row p { flex: 1 1 100%; font-weight: 650; }
.library-dialog-status { line-height: 1.6; }
.library-dialog-status button { display: block; margin-top: 12px; }
.library-category-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 440px) {
  .library-toolbar { padding: 16px; }
  .library-search .library-field, .library-tools .library-field { flex-basis: 140px; }
  .library-dialog { padding: 18px; }
}

.saved-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 290px;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  border-radius: var(--radius-md);
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  transition:
    border-color var(--motion-standard) ease,
    box-shadow var(--motion-standard) ease,
    background var(--motion-standard) ease;
}

.saved-card:hover {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-top,
.tag-row,
.place-facts,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.card-top {
  justify-content: space-between;
  gap: 12px;
}

.tag-row,
.place-facts,
.detail-meta {
  gap: 8px;
}

.tag,
.fact,
.status-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

.tag,
.fact {
  color: var(--text-muted);
  background: var(--surface-soft);
}

.status-pill {
  color: var(--primary);
  background: var(--primary-soft);
}

.status-pill[data-status="needs_review"] {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.card-copy {
  display: grid;
  gap: 10px;
}

.card-copy h2 {
  margin: 0;
  font-size: clamp(21px, 3vw, 26px);
  letter-spacing: -0.028em;
}

.card-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.place-block {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}

.place-name {
  margin: 0;
  color: var(--text-strong);
  font-weight: 800;
}

.place-address,
.card-footer {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card-action {
  flex: 0 0 auto;
  color: var(--primary);
  font-weight: 800;
  white-space: nowrap;
}

.skeleton-card,
.detail-skeleton {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.skeleton-card {
  display: grid;
  min-height: 290px;
  align-content: start;
  gap: 18px;
  padding: 22px;
}

.skeleton-card span,
.detail-skeleton span {
  display: block;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--surface-soft), color-mix(in srgb, var(--surface-soft) 52%, var(--surface)), var(--surface-soft));
  background-size: 220% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
}

.skeleton-card span:nth-child(1) { width: 28%; }
.skeleton-card span:nth-child(2) { width: 78%; height: 28px; }
.skeleton-card span:nth-child(3) { width: 94%; }
.skeleton-card span:nth-child(4) { width: 62%; margin-top: 74px; }

@keyframes skeleton {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.state-card {
  max-width: 720px;
  margin: 24px auto;
  padding: clamp(28px, 6vw, 48px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.state-card h1,
.state-card h2 {
  margin: 0;
  font-size: clamp(27px, 5vw, 38px);
  letter-spacing: -0.035em;
}

.state-card > p:not(.state-kicker) {
  max-width: 560px;
  margin: 14px auto 22px;
  color: var(--text-muted);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  min-height: 76px;
  padding-top: 28px;
}

.back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-bottom: 24px;
  font-weight: 750;
  text-decoration: none;
}

.detail-skeleton {
  display: grid;
  gap: 22px;
  padding: clamp(26px, 5vw, 48px);
}

.detail-skeleton span:nth-child(1) { width: 22%; }
.detail-skeleton span:nth-child(2) { width: 76%; height: 46px; }
.detail-skeleton span:nth-child(3) { width: 92%; }
.detail-skeleton span:nth-child(4) { width: 82%; }
.detail-skeleton span:nth-child(5) { width: 58%; height: 120px; margin-top: 20px; }

.detail-header,
.detail-section,
.place-detail,
.media-section {
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.detail-header {
  padding: clamp(26px, 6vw, 52px);
}

.media-section {
  margin-top: 20px;
  padding: 22px;
}

.media-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.media-heading h2,
.media-heading p {
  margin: 0;
}

.media-heading h2 {
  color: var(--text-strong);
  font-size: 21px;
}

.media-heading p {
  color: var(--text-muted);
  font-size: 13px;
}

.media-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 36%);
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--border) transparent;
}

.image-gallery {
  grid-auto-columns: minmax(260px, 43%);
}

.media-card {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  scroll-snap-align: start;
}

.media-card img {
  display: block;
  width: 100%;
  height: clamp(210px, 30vw, 360px);
  object-fit: contain;
}

.video-gallery .media-card img {
  object-fit: cover;
}

.media-card figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(8, 47, 73, 0.84);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.detail-header h1 {
  margin-top: 14px;
}

.detail-summary {
  max-width: 780px;
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: 18px;
}

.engagement-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}

.engagement-item {
  display: grid;
  min-width: 86px;
  gap: 2px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.engagement-item dt {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.engagement-item dd {
  margin: 0;
  color: var(--text-strong);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 20px;
  margin-top: 20px;
}

.detail-column {
  display: grid;
  align-content: start;
  gap: 20px;
}

.detail-section,
.place-detail {
  padding: 24px;
}

.detail-section h2,
.place-detail h2 {
  margin: 0 0 12px;
  font-size: 21px;
}

.detail-section p,
.place-detail p {
  color: var(--text-muted);
}

.analysis-fallback {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  background: var(--primary-soft);
  font-size: 13px;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
}

.timeline-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 5px;
  padding: 0 0 22px 26px;
  border-left: 2px solid var(--border);
}

.timeline-item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.timeline-item::before {
  position: absolute;
  top: 4px;
  left: -6px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
  content: "";
}

.timeline-item h3,
.timeline-item p {
  margin: 0;
}

.timeline-item h3 {
  font-size: 16px;
}

.timeline-label {
  color: var(--primary) !important;
  font-size: 13px;
  font-weight: 800;
}

.coverage-note {
  width: fit-content;
  margin: 14px 0 20px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 750;
}

.insight-chart-block + .insight-chart-block {
  margin-top: 22px;
}

.sentiment-bar {
  display: flex;
  height: 14px;
  margin: 8px 0 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.sentiment-segment {
  min-width: 0;
}

.sentiment-positive {
  background: var(--sentiment-positive);
}

.sentiment-negative {
  background: var(--sentiment-negative);
}

.sentiment-neutral {
  background: var(--sentiment-neutral);
}

.sentiment-mixed {
  background: var(--sentiment-mixed);
}

.sentiment-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.sentiment-legend li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: var(--surface-soft);
  font-size: 13px;
}

.chart-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.chart-label {
  min-width: 0;
}

.sentiment-legend strong,
.intent-heading strong {
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.intent-bars {
  display: grid;
  gap: 12px;
  margin: 8px 0 20px;
  padding: 0;
  list-style: none;
}

.intent-bars li {
  display: grid;
  gap: 5px;
}

.intent-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.intent-track {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.intent-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 64%, var(--accent)));
}

.insight-list-block + .insight-list-block {
  margin-top: 18px;
}

.source-body {
  max-height: 480px;
  overflow: auto;
  padding: 14px;
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--surface-soft);
}

.source-link,
.maps-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-weight: 750;
}

.private-note {
  margin: 0;
  padding: 16px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-strong) !important;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.attribution {
  margin: 16px 0 0;
  font-size: 12px;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
}

.app-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.app-nav a[aria-current] {
  color: var(--text-strong);
  background: var(--primary-soft);
}

.repeat-section .button-link {
  margin-top: 16px;
}

.plans-views {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 16px;
}

.plans-view {
  min-height: 36px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: transparent;
  font-weight: 650;
  transition:
    color var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    background var(--motion-fast) ease;
}

.plans-view:hover {
  color: var(--text-strong);
  border-color: var(--accent);
}

.plans-view[aria-selected="true"] {
  color: var(--text-strong);
  border-color: var(--accent);
  background: var(--surface-soft);
}

.archive-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.calendar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.calendar-note {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.button-link {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.plans-hero {
  align-items: center;
}

.plan-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.plan-card {
  display: flex;
  min-width: 0;
  min-height: 260px;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  border-radius: var(--radius-md);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  transition: border-color var(--motion-standard) ease, box-shadow var(--motion-standard) ease;
}

.plan-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.plan-card .card-footer {
  margin-top: auto;
}

.plan-date {
  color: var(--text-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.plan-preview {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
  color: var(--text-muted);
}

.workspace-header {
  margin-bottom: 28px;
}

.workspace-header h1 {
  max-width: 820px;
}

.step-indicator {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.step-indicator li {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  font-size: 13px;
  font-weight: 750;
}

.step-indicator li[aria-current="step"] {
  border-color: var(--primary);
  color: var(--text-strong);
  background: var(--primary-soft);
}

.step-indicator li > span:first-child {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 50%;
  color: var(--surface);
  background: var(--primary);
  font-variant-numeric: tabular-nums;
}

.plan-form {
  display: grid;
  gap: 20px;
}

.form-section,
.plan-section,
.plan-detail-header,
.detail-plan-action {
  margin: 0;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

fieldset.form-section {
  min-width: 0;
}

.form-section legend {
  padding: 0 6px;
  color: var(--text-strong);
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field,
.field-wide {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.field-wide {
  grid-column: 1 / -1;
}

.form-section > .field-wide {
  margin-bottom: 18px;
}

.field label {
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 800;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-strong);
  background: var(--surface);
  font: inherit;
  font-size: 16px;
}

.field input:hover,
.field select:hover {
  border-color: var(--primary);
}

.field-help,
.section-help {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.optional-section {
  padding: 0;
}

.optional-section > summary,
.edit-plan-section > summary {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  color: var(--text-strong);
  cursor: pointer;
  font-weight: 850;
  list-style-position: inside;
}

.optional-section > summary > span:last-child {
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
}

.optional-fields {
  padding: 0 24px 24px;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.choice-card,
.save-option {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--surface);
}

.choice-card {
  min-height: 92px;
  padding: 16px;
}

.choice-card:has(input:checked),
.save-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.choice-card input,
.save-option input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}

.choice-card span,
.save-option span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.choice-card strong,
.save-option strong {
  color: var(--text-strong);
}

.choice-card small,
.save-option small {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.save-picker {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

#plan-save-picker-status {
  color: var(--text-muted);
  font-size: 14px;
}

.save-option-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.save-option {
  min-height: 82px;
  padding: 14px;
}

.form-actions,
.inline-actions,
.binary-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.form-actions {
  justify-content: flex-end;
}

.form-error,
.plan-feedback {
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--danger) 42%, var(--border));
  border-radius: var(--radius-sm);
  color: var(--text-strong);
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  font-weight: 700;
}

.plan-feedback[data-state="success"] {
  border-color: color-mix(in srgb, var(--success) 42%, var(--border));
  background: color-mix(in srgb, var(--success) 8%, var(--surface));
}

.detail-plan-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding: 18px 20px;
  border-style: dashed;
  box-shadow: none;
}

.detail-plan-action h2 {
  margin: 0;
  font-size: 20px;
}

.plan-detail-shell {
  display: grid;
  gap: 20px;
}

.plan-detail-header h1 {
  margin-top: 14px;
}

.plan-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.plan-section h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
}

.plan-section p {
  color: var(--text-muted);
}

.edit-plan-section {
  padding: 0;
}

.edit-plan-section > .section-help,
.edit-plan-section > .plan-edit-form {
  margin-inline: 24px;
}

.edit-plan-section > .section-help {
  margin-top: -8px;
  margin-bottom: 18px;
}

.edit-plan-section > .plan-edit-form {
  margin-bottom: 24px;
}

.plan-edit-form {
  display: grid;
  gap: 18px;
}

.section-heading,
.confirm-section,
.execution-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.section-heading p,
.confirm-section p,
.execution-section p {
  margin: 7px 0 0;
}

.itinerary-list {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.itinerary-stop {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-soft) 56%, var(--surface));
}

.stop-position {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary);
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.stop-body {
  min-width: 0;
}

.stop-body h3,
.stop-body p {
  margin: 0;
}

.stop-body h3 {
  margin-top: 3px;
  font-size: 19px;
}

.stop-address,
.stop-rationale {
  margin-top: 7px !important;
  color: var(--text-muted);
}
.stop-rationale-shared { color: var(--text-muted); font-size: 13px; }

.stop-body .place-facts {
  margin-top: 10px;
}

.stop-controls {
  display: flex;
  gap: 6px;
}

.icon-button,
.dialog-close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-strong);
  background: var(--surface);
  font-size: 20px;
  font-weight: 850;
}

.icon-button:hover,
.dialog-close:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.danger-button {
  color: var(--danger);
}

/* Removal sits apart from the plan actions above it: it is the one control in
   the header that discards rather than creates. */
.detail-places .places-coverage {
  margin: 0 0 14px;
  padding: 9px 12px;
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  background: var(--primary-soft);
  font-size: 13px;
}

.place-group-list,
.place-candidate-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.place-group {
  padding: 14px 0;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.place-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.place-group-header {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.place-group-header h3 {
  margin: 0;
  font-size: 15px;
}

/* A merchant still waiting on a choice is the one thing here that needs doing. */
.place-group[data-state="ambiguous"] .place-group-header h3 {
  color: var(--text-strong);
}

.place-group[data-state="no_match"] {
  opacity: 0.7;
}

.place-group-note,
.place-group-status {
  margin: 6px 0 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.place-group-status {
  color: var(--danger);
  font-weight: 600;
}

.place-candidate {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin-top: 8px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: var(--radius-sm, 10px);
  background: var(--surface);
}

.place-candidate-chosen {
  border-color: color-mix(in srgb, var(--primary) 45%, transparent);
  background: var(--primary-soft);
}

.place-candidate-copy p {
  margin: 0;
}

.place-candidate-name {
  font-weight: 650;
  font-size: 14px;
}

.place-candidate-address,
.place-candidate-rating {
  font-size: 12px;
  color: var(--text-muted);
}

.place-candidate .secondary-button {
  flex: 0 0 auto;
  padding: 7px 13px;
  font-size: 13px;
}

.optimise-notice {
  margin: 0 0 14px;
  padding: 9px 12px;
  border-left: 3px solid var(--border);
  border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--border) 22%, transparent);
  font-size: 13px;
  color: var(--text-muted);
}

.place-search {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed color-mix(in srgb, var(--border) 90%, transparent);
  border-radius: var(--radius-sm, 10px);
}

.place-search-form {
  display: flex;
  gap: 8px;
}

.place-search-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-strong);
  font-size: 14px;
}

.place-search-input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.place-search-form .secondary-button {
  flex: 0 0 auto;
  padding: 8px 15px;
  font-size: 13px;
}

.place-search-wide {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}

.place-search-results:empty {
  display: none;
}

@media (max-width: 560px) {
  .place-search-form {
    flex-direction: column;
  }

  .place-search-form .secondary-button {
    width: 100%;
  }
}

.place-candidate-picked {
  border-color: color-mix(in srgb, var(--primary) 55%, transparent);
  background: var(--primary-soft);
}

/* The submit bar only exists once something is waiting to be sent. */
.place-submit {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

@media (max-width: 560px) {
  .place-submit .primary-button {
    width: 100%;
  }
}

.link-button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: underline;
}

@media (max-width: 560px) {
  .place-candidate {
    flex-direction: column;
    align-items: stretch;
  }

  .place-candidate .secondary-button {
    width: 100%;
  }
}

.detail-owner-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin: 14px 0 0;
}

.detail-owner-actions .danger-button {
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
  border-radius: 999px;
  background: transparent;
  font-weight: 650;
  cursor: pointer;
}

.detail-owner-actions .danger-button:hover:not(:disabled) {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

.detail-owner-actions .remove-error {
  margin: 0;
  align-self: center;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}

.detail-owner-actions .danger-button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.context-note,
.outcome-note {
  margin: 18px 0 0;
  padding: 11px 13px;
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  background: var(--primary-soft);
  font-size: 13px;
}

.outcome-note[data-confirmation="system_default"] {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.outcome-section .binary-actions {
  margin-top: 18px;
}

.binary-actions button[aria-pressed="true"] {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.empty-itinerary {
  margin: 18px 0 0;
}

.plan-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: min(720px, calc(100dvh - 40px));
  padding: 24px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.plan-dialog::backdrop {
  background: rgba(7, 27, 39, 0.62);
}

.dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dialog-header h2 {
  margin: 0;
  font-size: 25px;
}

#add-to-plan-status {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.dialog-plan-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.dialog-plan-option {
  display: grid;
  min-height: 64px;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-strong);
  background: var(--surface);
  text-align: left;
}

.dialog-plan-option:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.dialog-plan-option small {
  color: var(--text-muted);
}

.sr-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 66px;
    padding-inline: 16px;
  }

  .brand > span:last-child {
    display: none;
  }

  .app-nav a {
    padding-inline: 12px;
  }

  .header-actions {
    gap: 4px;
  }

  .quiet-button {
    padding-inline: 10px;
  }

  .page-shell {
    padding: 36px 16px calc(48px + env(safe-area-inset-bottom));
  }

  .hero-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .count-card {
    display: flex;
    width: fit-content;
    min-width: 0;
    align-items: baseline;
    gap: 7px;
    padding: 10px 14px;
  }

  .count-card > span:first-child {
    font-size: 20px;
  }

  .sms-capture-card {
    grid-template-columns: auto minmax(0, 1fr);
    margin-top: -4px;
    padding: 18px;
  }

  .sms-capture-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .feed-grid,
  .detail-grid,
  .plan-list,
  .save-option-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-grid,
  .choice-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .step-indicator {
    grid-template-columns: minmax(0, 1fr);
  }

  .step-indicator li:not([aria-current="step"]) {
    display: none;
  }

  .detail-plan-action,
  .section-heading,
  .confirm-section,
  .execution-section {
    align-items: stretch;
    flex-direction: column;
  }

  .itinerary-stop {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .stop-controls {
    grid-column: 2;
  }

  .saved-card {
    min-height: 0;
  }

  .card-footer {
    align-items: flex-end;
  }

  .sentiment-legend {
    grid-template-columns: minmax(0, 1fr);
  }

  .media-heading {
    display: block;
  }

  .media-heading p {
    margin-top: 3px;
  }

  .media-gallery,
  .image-gallery {
    grid-auto-columns: minmax(260px, 86%);
  }
}

@media (max-width: 390px) {
  .language-switch button {
    min-width: 40px;
    padding-inline: 8px;
  }

  /* Header only. Unscoped, this hid every quiet button on small phones:
     source links, archive, remove, calendar "not now", library close. */
  .header-actions .quiet-button {
    display: none;
  }

  .header-inner {
    gap: 6px;
  }

  .app-nav {
    order: 2;
  }

  .app-nav a {
    padding-inline: 10px;
  }

  h1 {
    font-size: 34px;
  }
}

.idea-editor { display: grid; gap: 20px; }
.idea-edit-disclosure > summary { min-height: 44px; padding: 12px; cursor: pointer; color: var(--primary); font-weight: 600; }
.idea-edit-disclosure > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.idea-section { margin-block: 20px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.idea-field-grid, .idea-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.idea-field { display: grid; gap: 8px; margin-block: 12px; min-width: 0; font-weight: 600; }
.idea-field :is(input, select, textarea) { box-sizing: border-box; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-weight: 400; }
.idea-field textarea { min-height: 100px; resize: vertical; }
.idea-field [aria-invalid="true"] { border-color: var(--danger); }
.idea-check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; overflow-wrap: anywhere; }
.idea-check input { width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--primary); }
.idea-days { display: flex; flex-wrap: wrap; gap: 12px; border: 0; padding: 0; margin-block: 20px; }
.idea-days legend { margin-bottom: 8px; font-weight: 600; }
.idea-selected-item, .idea-material { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.idea-selected-item a { overflow-wrap: anywhere; min-width: 0; }
.idea-material .idea-check { flex: 1 1 200px; }
.idea-card { background: var(--surface); padding: 20px; border: 1px solid var(--border); border-radius: 18px; min-width: 0; }
.idea-card-title { display: block; color: var(--text); font-size: 22px; font-weight: 650; overflow-wrap: anywhere; }
.idea-session { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 20px; overflow-wrap: anywhere; }
.idea-steps { padding-left: 24px; }
.idea-steps li { margin-block: 16px; }
.idea-steps li > p { margin: 0 0 8px; }
.idea-step-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; }
.idea-step-kind { padding: 2px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.idea-step-kind-estimate { border-color: var(--accent); color: var(--accent); }
.idea-feeling { display: flex; flex-wrap: wrap; gap: 8px 20px; border: 0; padding: 0; margin: 0 0 16px; }
.idea-feeling legend { font-weight: 650; margin-bottom: 8px; }
.idea-review-drills { display: grid; gap: 10px; margin-block: 8px 16px; }
.idea-review-drill { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.idea-review-drill span { flex: 1 1 220px; min-width: 0; }
#idea-block-review textarea { width: 100%; min-height: 72px; margin-top: 6px; }
.idea-step-frame { margin: 4px 0 8px; }
.idea-step-frame img { display: block; width: 180px; max-width: 60%; height: auto; border-radius: 10px; border: 1px solid var(--border); }
.idea-step-frame figcaption { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.idea-step-clip video { display: block; width: 220px; max-width: 70%; max-height: 360px; aspect-ratio: 9 / 16; object-fit: contain; border-radius: 10px; border: 1px solid var(--border); background: #000; }
/* A step's keyframe as the button that plays its clip: the same box as the player, so nothing moves when one replaces the other. */
.idea-clip-poster { position: relative; display: block; padding: 0; width: 220px; max-width: 70%; max-height: 360px; aspect-ratio: 9 / 16; border-radius: 10px; border: 1px solid var(--border); background: #000; overflow: hidden; }
.idea-clip-poster[hidden] { display: none; }
.idea-replaced { margin-top: 16px; }
.idea-replaced > summary { cursor: pointer; color: var(--text-muted); }
.idea-replaced .idea-session { opacity: 0.72; }
.idea-clip-status { margin: 4px 0 0; font-size: 12px; color: var(--text-muted); }
.idea-step-frame .idea-clip-poster img { width: 100%; height: 100%; max-width: none; object-fit: contain; border: 0; border-radius: 0; }
.idea-clip-poster::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%); border-style: solid; border-width: 14px 0 14px 24px; border-color: transparent transparent transparent rgba(255, 255, 255, 0.92); filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6)); }
@media (max-width: 600px) { .idea-step-clip video, .idea-clip-poster { width: 62vw; max-width: 260px; max-height: 60vh; } }
.idea-warning { color: var(--danger); line-height: 1.65; }
#ideas-view progress { width: 100%; height: 16px; accent-color: var(--primary); }
#ideas-view :is(button, a, input, textarea, select):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
#ideas-view .form-actions { display: flex; flex-wrap: wrap; gap: 12px; }
#ideas-view .muted { color: var(--text-muted); line-height: 1.65; }
@media (max-width: 600px) {
  .idea-field-grid, .idea-list { grid-template-columns: minmax(0, 1fr); }
  .idea-section { padding: 16px; }
  .idea-days { gap: 8px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
.idea-reschedule-dialog { width: min(34rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; }
.idea-reschedule-dialog .idea-field { min-width: 0; }
#idea-schedule-change { scroll-margin-top: 6rem; }
