:root {
  --couple: #d1245c;
  --couple-soft: #ffe8ef;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --couple: #ff94b3;
    --couple-soft: #3a1f29;
  }
}

:root[data-theme="dark"] {
  --couple: #ff94b3;
  --couple-soft: #3a1f29;
}

* { box-sizing: border-box; }

html, body, #root { height: 100%; }

body {
  margin: 0;
  background: var(--ds-color-bg-page);
  color: var(--ds-color-text-primary);
  font-family: var(--ds-font-family-sans);
  font-size: var(--ds-font-size-body);
  line-height: var(--ds-font-line-height-body);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum";
}

button, input, textarea { font: inherit; color: inherit; }

.shell { display: flex; height: 100%; }

.side {
  width: var(--ds-shell-sidebar-width);
  flex: none;
  padding: var(--ds-space-24) var(--ds-space-12);
  background: var(--ds-shell-sidebar-bg);
  border-right: var(--ds-border-width) solid var(--ds-shell-sidebar-border);
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
  overflow-y: auto;
}

.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: var(--ds-font-size-title); font-weight: 600; color: var(--ds-color-text-primary); padding: 0 var(--ds-space-12) var(--ds-space-20); letter-spacing: -0.01em; }

.nav {
  display: flex;
  align-items: center;
  height: var(--ds-nav-item-height);
  padding: 0 var(--ds-space-12);
  border-radius: var(--ds-nav-item-radius);
  color: var(--ds-nav-item-text);
  font-weight: var(--ds-font-weight-medium);
  text-decoration: none;
  transition: background-color var(--ds-motion-duration-base) var(--ds-motion-easing-out), color var(--ds-motion-duration-base) var(--ds-motion-easing-out);
  white-space: nowrap;
}
.nav:hover { background: var(--ds-nav-item-bg-hover); }
.nav.active { background: var(--ds-nav-item-bg-active); color: var(--ds-nav-item-text-active); }

.side-foot { margin-top: auto; }
.topbar { display: none; position: sticky; top: 0; z-index: var(--ds-z-sticky); align-items: center; gap: var(--ds-space-8); height: var(--ds-shell-header-height); padding: 0 var(--ds-space-12); background: var(--ds-color-bg-surface); box-shadow: inset 0 -1px 0 var(--ds-color-border-subtle); flex: none; }
.topbar-menu { width: 40px; height: 40px; border: 0; border-radius: var(--ds-radius-control); background: none; color: var(--ds-color-text-primary); cursor: pointer; display: grid; place-items: center; }
.topbar-menu:hover { background: var(--ds-color-bg-hover); }
.topbar-title { flex: 1; min-width: 0; font-size: var(--ds-font-size-title-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-icon { width: 26px; height: 26px; flex: none; }
.side-backdrop { display: none; position: fixed; inset: 0; z-index: var(--ds-z-overlay); border: 0; padding: 0; background: var(--ds-modal-backdrop); }
.topbar-menu:focus-visible, .link-button:focus-visible, .cal-cell:focus-visible, .cal-nav:focus-visible, .couple-subnav-item:focus-visible { outline: var(--ds-focus-width) solid var(--ds-focus-ring); outline-offset: var(--ds-focus-offset); }
.version { padding: 0 var(--ds-space-12) var(--ds-space-4); color: var(--ds-color-text-tertiary); font-size: var(--ds-font-size-caption); }
.link-button { background: none; border: 0; height: 36px; padding: 0 var(--ds-space-12); color: var(--ds-color-text-tertiary); cursor: pointer; font-weight: 500; border-radius: var(--ds-radius-control); width: 100%; text-align: left; }
.link-button:hover { background: var(--ds-color-bg-hover); }

.main { flex: 1; min-width: 0; overflow-y: auto; padding: var(--ds-space-32) var(--ds-space-32) var(--ds-space-64); }
.main.flush { padding: 0; overflow: hidden; }
.content { max-width: 1160px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--ds-space-16); }

.page-title { font-size: var(--ds-font-size-title-lg); line-height: var(--ds-font-line-height-title-lg); font-weight: var(--ds-page-header-title-weight); color: var(--ds-color-text-primary); margin: 0; letter-spacing: -0.02em; }
.page-sub { color: var(--ds-page-header-sub-color); margin: var(--ds-space-4) 0 0; }

.card { background: var(--ds-card-bg); border: var(--ds-border-width) solid var(--ds-card-border); border-radius: var(--ds-card-radius); padding: var(--ds-card-padding); min-width: 0; }
.card-title { font-size: var(--ds-font-size-title-sm); font-weight: 600; color: var(--ds-color-text-primary); margin: 0 0 var(--ds-space-16); }

.grid { display: grid; gap: var(--ds-space-16); }
.grid-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.grid-charts { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }

.tile-label { color: var(--ds-color-text-secondary); font-size: var(--ds-font-size-body); font-weight: 500; }
.tile-value { font-size: var(--ds-font-size-display); font-weight: 600; color: var(--ds-color-text-primary); letter-spacing: -0.02em; margin-top: var(--ds-space-4); }
.tile-note { color: var(--ds-color-text-tertiary); font-size: var(--ds-font-size-label); margin-top: 2px; }

.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid-line { stroke: var(--ds-color-border-subtle); stroke-width: 1; }
.chart .axis-label { fill: var(--ds-color-text-tertiary); font-size: var(--ds-font-size-caption); }
.chart .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .series-1 { stroke: var(--ds-color-chart-1); }
.chart .series-2 { stroke: var(--ds-color-chart-2); }
.chart .dot-1 { fill: var(--ds-color-chart-1); stroke: var(--ds-color-bg-surface); stroke-width: 2; }
.chart .dot-2 { fill: var(--ds-color-chart-2); stroke: var(--ds-color-bg-surface); stroke-width: 2; }
.chart .cross { stroke: var(--ds-color-text-tertiary); stroke-width: 1; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--ds-space-12); margin-bottom: var(--ds-space-12); }
.chart-head .card-title { margin: 0; }
.chart-now { color: var(--ds-color-text-primary); font-weight: 600; }
.legend { display: flex; gap: var(--ds-space-16); font-size: var(--ds-font-size-label); color: var(--ds-color-text-secondary); margin-top: var(--ds-space-8); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: var(--ds-radius-tag); margin-right: var(--ds-space-8); }
.swatch-1 { background: var(--ds-color-chart-1); }
.swatch-2 { background: var(--ds-color-chart-2); }
.tooltip {
  position: absolute;
  top: 8px;
  pointer-events: none;
  background: var(--ds-tooltip-bg);
  color: var(--ds-tooltip-text);
  border-radius: var(--ds-tooltip-radius);
  padding: var(--ds-space-4) var(--ds-tooltip-padding);
  font-size: var(--ds-tooltip-font-size);
  line-height: var(--ds-font-line-height-caption);
  white-space: nowrap;
  z-index: var(--ds-z-tooltip);
}
.empty { color: var(--ds-color-text-tertiary); padding: var(--ds-space-32) 0; text-align: center; }


.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--ds-grid-font-size); line-height: var(--ds-grid-line-height); font-variant-numeric: var(--ds-grid-numeric); }
th { text-align: left; font-weight: var(--ds-grid-header-weight); color: var(--ds-grid-header-text); font-size: var(--ds-font-size-label); height: var(--ds-grid-header-height); padding: 0 var(--ds-grid-cell-padding-x) 0 0; white-space: nowrap; }
td { height: var(--ds-grid-row-height); padding: var(--ds-grid-cell-padding-y) var(--ds-grid-cell-padding-x) var(--ds-grid-cell-padding-y) 0; border-top: var(--ds-border-width) solid var(--ds-grid-border); white-space: nowrap; }
tbody tr:hover td { background: var(--ds-grid-row-bg-hover); }
td.name { color: var(--ds-color-text-primary); font-weight: 500; }
td.dim, tr.stopped td { color: var(--ds-color-text-tertiary); }
td.num, th.num { text-align: right; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: var(--ds-space-8) var(--ds-space-16); margin: 0; }
.kv .k { color: var(--ds-color-text-secondary); }
.kv .v { margin: 0; color: var(--ds-color-text-primary); font-weight: 500; word-break: break-all; }

.login { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: var(--ds-space-16); }
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: var(--ds-space-12); }
.error { color: var(--ds-color-status-danger-text); font-size: var(--ds-font-size-body); }

.chat { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--ds-space-16); height: calc(100vh - 210px); min-height: 480px; }
.chat-side { align-self: start; min-width: 0; }
.chat-main { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.messages { flex: 1; overflow-y: auto; padding: var(--ds-space-24); display: flex; flex-direction: column; gap: var(--ds-space-12); }
.bubble { padding: var(--ds-space-12) var(--ds-space-16); border-radius: var(--ds-radius-modal); max-width: 82%; white-space: pre-wrap; word-break: break-word; }
.bubble-user { align-self: flex-end; background: var(--ds-color-brand-solid); color: var(--ds-color-brand-on-solid); }
.bubble-assistant { align-self: flex-start; background: var(--ds-color-bg-sunken); color: var(--ds-color-text-primary); }
.bubble-md { white-space: normal; }
.bubble-md .wiki-body { max-width: none; }
.bubble-md .wiki-body > :first-child { margin-top: 0; }
.bubble-md .wiki-body > :last-child { margin-bottom: 0; }
.bubble-md .wiki-h, .bubble-md .wiki-h3, .bubble-md .wiki-h4 { margin: var(--ds-space-16) 0 var(--ds-space-8); }
.bubble-md .wiki-code, .bubble-md .doc-code { background: var(--ds-color-bg-surface); }
.bubble-meta { align-self: flex-start; color: var(--ds-color-text-tertiary); font-size: var(--ds-font-size-caption); margin-top: -4px; }
.composer { display: flex; gap: var(--ds-space-8); padding: var(--ds-space-16); border-top: 1px solid var(--ds-color-border-subtle); align-items: flex-end; }
.composer textarea { flex: 1; resize: none; }
.settings { display: flex; flex-direction: column; gap: var(--ds-space-12); overflow-y: auto; }
.settings label { display: flex; flex-direction: column; gap: var(--ds-space-4); color: var(--ds-color-text-secondary); font-size: var(--ds-font-size-body); font-weight: 500; }

.frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }

@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .topbar { display: flex; }
  .side { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(280px, 84vw); padding: var(--ds-space-20) var(--ds-space-12); transform: translateX(-100%); transition: transform var(--ds-motion-duration-slow) var(--ds-motion-easing-out); box-shadow: var(--ds-shadow-modal); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open .side-backdrop { display: block; }
  .main { padding: var(--ds-space-20) var(--ds-space-16) var(--ds-space-48); }
  .grid-charts { grid-template-columns: 1fr; }
  .chat { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .chat-main { height: 70vh; }
}

.image-layout { display: grid; grid-template-columns: 320px 1fr; gap: var(--ds-space-16); align-items: start; }
.image-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--ds-space-16); min-width: 0; }
.image-result { display: block; width: 100%; height: auto; border-radius: var(--ds-radius-control); background: var(--ds-color-bg-sunken); }
.image-prompt { color: var(--ds-color-text-primary); margin-top: var(--ds-space-12); word-break: break-word; }
.image-meta { display: flex; justify-content: space-between; gap: var(--ds-space-12); color: var(--ds-color-text-tertiary); font-size: var(--ds-font-size-label); margin-top: var(--ds-space-4); }
.image-save { color: var(--ds-color-brand-solid); font-weight: 600; text-decoration: none; white-space: nowrap; }
.option-label { color: var(--ds-color-text-secondary); font-size: var(--ds-font-size-body); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: var(--ds-space-8); }
.chip { border: 0; border-radius: var(--ds-radius-control); padding: var(--ds-space-8) var(--ds-space-12); background: var(--ds-color-bg-sunken); color: var(--ds-color-text-primary); cursor: pointer; font-size: var(--ds-font-size-label); font-weight: 500; transition: background-color var(--ds-motion-duration-base) var(--ds-motion-easing-out), color var(--ds-motion-duration-base) var(--ds-motion-easing-out); }
.chip.active { background: var(--ds-color-bg-inverse); color: var(--ds-color-text-inverse); }

@media (max-width: 820px) {
  .image-layout { grid-template-columns: 1fr; }
}

.notice { color: var(--ds-color-status-success-text); font-size: var(--ds-font-size-body); }
.check { flex-direction: row !important; align-items: center; gap: var(--ds-space-8) !important; }
.chip:disabled { opacity: 0.45; cursor: default; }

.brand-icon { width: 28px; height: 28px; }
.login-icon { width: 56px; height: 56px; }

.power { max-width: 420px; }


.nav-children { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 var(--ds-space-4); }
.nav.nav-child { height: 32px; padding: 0 var(--ds-space-12) 0 28px; font-size: var(--ds-font-size-body); }
.nav.nav-parent.active { background: transparent; color: var(--couple); }
.couple-subnav { display: none; }
.nav.nav-child.active { background: var(--couple-soft); color: var(--couple); }

.main.tone-couple {
  --c-accent: #ff5c8a;
  --c-accent-strong: #f03e73;
  --c-soft: #ffe8ef;
  --c-bg: #fff6f8;
  --c-card: #ffffff;
  --c-line: #f6dde4;
  --c-text: #3a2a30;
  --c-sub: #8c7179;
  --c-plan: #ff5c8a;
  --c-record: #2bbf9b;
  --c-anniversary: #ff9f43;
  --c-milestone: #8b7cf6;
  --c-plan-soft: #ffe8ef;
  --c-milestone-soft: #eeebff;
  --c-anniversary-soft: #fff1e2;
  --c-accent-ink: #d1245c;
  --c-accent-ink-hover: #b81e4f;
  --c-plan-ink: #d1245c;
  --c-record-ink: #0f7f66;
  --c-anniversary-ink: #b35600;
  --c-milestone-ink: #6b5ce7;
  --c-on-ink: #ffffff;
  --c-hero: #c92a5f;
  background: var(--c-bg);
  color: var(--c-text);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav.nav-child.active { background: #3a1f29; color: #ff94b3; }
  :root:not([data-theme="light"]) .main.tone-couple {
    --c-accent: #ff7aa0;
    --c-accent-strong: #ff94b3;
    --c-soft: #3a1f29;
    --c-bg: #17121a;
    --c-card: #221a24;
    --c-line: #33262f;
    --c-text: #f3e9ee;
    --c-sub: #b39aa5;
    --c-plan: #ff7aa0;
    --c-record: #3fd3ae;
    --c-anniversary: #ffb469;
    --c-milestone: #a397ff;
    --c-plan-soft: #3a1f29;
    --c-milestone-soft: #2a2545;
    --c-anniversary-soft: #3a2a1a;
    --c-accent-ink: #ff7aa0;
    --c-accent-ink-hover: #ff94b3;
    --c-plan-ink: #ff7aa0;
    --c-record-ink: #3fd3ae;
    --c-anniversary-ink: #ffb469;
    --c-milestone-ink: #a397ff;
    --c-on-ink: #17121a;
    --c-hero: #5a1f35;
  }
}

:root[data-theme="dark"] .nav.nav-child.active { background: #3a1f29; color: #ff94b3; }
  :root[data-theme="dark"] .main.tone-couple {
    --c-accent: #ff7aa0;
    --c-accent-strong: #ff94b3;
    --c-soft: #3a1f29;
    --c-bg: #17121a;
    --c-card: #221a24;
    --c-line: #33262f;
    --c-text: #f3e9ee;
    --c-sub: #b39aa5;
    --c-plan: #ff7aa0;
    --c-record: #3fd3ae;
    --c-anniversary: #ffb469;
    --c-milestone: #a397ff;
    --c-plan-soft: #3a1f29;
    --c-milestone-soft: #2a2545;
    --c-anniversary-soft: #3a2a1a;
    --c-accent-ink: #ff7aa0;
    --c-accent-ink-hover: #ff94b3;
    --c-plan-ink: #ff7aa0;
    --c-record-ink: #3fd3ae;
    --c-anniversary-ink: #ffb469;
    --c-milestone-ink: #a397ff;
    --c-on-ink: #17121a;
    --c-hero: #5a1f35;
  }


.couple { width: 100%; display: flex; flex-direction: column; gap: var(--ds-space-16); }
.couple-head { display: flex; align-items: center; gap: var(--ds-space-16); margin-bottom: var(--ds-space-4); }
.couple-head-icon { width: 52px; height: 52px; border-radius: var(--ds-radius-modal); object-fit: cover; }
.couple-title { margin: 0; font-size: var(--ds-font-size-title-lg); font-weight: 600; letter-spacing: -0.02em; color: var(--c-text); }
.couple-sub { color: var(--c-sub); font-size: var(--ds-font-size-body); }
.couple-toast { align-self: flex-start; padding: var(--ds-space-8) var(--ds-space-16); border-radius: var(--ds-radius-full); background: var(--c-soft); color: var(--c-accent-strong); font-size: var(--ds-font-size-body); font-weight: 500; }
.couple-toast.bad { background: var(--ds-color-status-danger-bg); color: var(--ds-color-status-danger-text); }
.couple-toast.note { border-radius: var(--ds-radius-modal); background: var(--c-card); color: var(--c-sub); box-shadow: inset 0 0 0 1px var(--c-line); }
.couple-empty { color: var(--c-sub); text-align: center; padding: var(--ds-space-24) 0; font-size: var(--ds-font-size-body); }
.couple-faint { color: var(--c-sub); font-size: var(--ds-font-size-label); }

.couple-card { background: var(--c-card); border-radius: var(--ds-radius-card); padding: var(--ds-space-20); box-shadow: inset 0 0 0 1px var(--c-line); min-width: 0; }

.couple-hero { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-16); padding: var(--ds-space-24); border-radius: var(--ds-radius-card); color: #fff; background: var(--c-hero); }
.couple-hero-label { font-size: var(--ds-font-size-body-lg); font-weight: 500; opacity: 0.9; }
.couple-hero-days { font-size: 44px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.couple-hero-since { font-size: var(--ds-font-size-body); opacity: 0.9; margin-top: var(--ds-space-4); }
.couple-hero-icon { width: 96px; height: 96px; border-radius: var(--ds-radius-card); object-fit: cover; flex-shrink: 0; }

.couple-shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--ds-space-12); }
.couple-shortcut { display: flex; flex-direction: column; align-items: center; gap: var(--ds-space-8); padding: var(--ds-space-16) var(--ds-space-8); border-radius: var(--ds-radius-card); background: var(--c-card); color: var(--c-text); text-decoration: none; font-weight: 500; font-size: var(--ds-font-size-body); box-shadow: inset 0 0 0 1px var(--c-line); transition: background-color var(--ds-motion-duration-base) var(--ds-motion-easing-out), transform var(--ds-motion-duration-base) var(--ds-motion-easing-out); }
.couple-shortcut:hover { background: var(--c-soft); }
.couple-shortcut:active { transform: scale(0.97); }
.couple-shortcut img { width: 56px; height: 56px; border-radius: var(--ds-radius-modal); object-fit: cover; }

.couple-section { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-12); margin-top: var(--ds-space-8); }
.couple-section h2 { margin: 0; font-size: var(--ds-font-size-title-sm); font-weight: 600; color: var(--c-text); }
.couple-memories { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--ds-space-12); }
.couple-memory { display: flex; align-items: center; gap: var(--ds-space-12); padding: var(--ds-space-12); border: 0; border-radius: var(--ds-radius-card); background: var(--c-card); box-shadow: inset 0 0 0 1px var(--c-line); color: var(--c-text); text-align: left; cursor: pointer; min-width: 0; }
.couple-memory:hover { box-shadow: inset 0 0 0 1px var(--c-accent); }
.couple-memory:focus-visible { outline: 3px solid var(--c-accent); outline-offset: var(--ds-focus-offset); }
.couple-memory-thumb { width: 72px; height: 72px; flex: none; border-radius: var(--ds-radius-control); object-fit: cover; background: var(--c-soft); }
.couple-memory-body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--ds-space-4); min-width: 0; }
.couple-memory-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.couple-month { color: var(--c-sub); font-weight: 500; font-size: var(--ds-font-size-body); margin-top: var(--ds-space-8); }

.couple-row { display: flex; align-items: center; gap: var(--ds-space-12); padding: var(--ds-space-12) 0; border-top: 1px solid var(--c-line); }
.couple-card > .couple-row:first-child { border-top: 0; }
.couple-card.couple-row { border-top: 0; padding: var(--ds-space-16) var(--ds-space-20); }
.couple-row-body { flex: 1; min-width: 0; }
.couple-row-title { color: var(--c-text); font-weight: 500; }
.couple-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--c-accent); }
.couple-dot.plan { background: var(--c-plan); }
.couple-dot.record { background: var(--c-record); }
.couple-dot.anniversary { background: var(--c-anniversary); }
.couple-dot.milestone { background: var(--c-milestone); }

.couple-pill { padding: var(--ds-space-4) 10px; border-radius: var(--ds-radius-full); font-size: var(--ds-font-size-label); font-weight: 600; white-space: nowrap; }
.couple-pill.plan, .couple-pill.soft { background: var(--c-plan-soft); color: var(--c-accent-strong); }
.couple-pill.soft { font-weight: 500; }
.couple-pill.category { background: var(--c-soft); color: var(--c-accent-ink); }
.couple-entry-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--ds-space-4); }
.couple-category { display: flex; flex-direction: column; gap: var(--ds-space-8); }
.couple-category-head, .couple-category-row { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-8); }
.couple-category-row { color: var(--c-text); padding-left: var(--ds-space-4); }
.place-chip.add { background: none; box-shadow: inset 0 0 0 1px var(--c-line); }
.couple-pill.milestone { background: var(--c-milestone-soft); color: var(--c-milestone); }
.couple-pill.anniversary { background: var(--c-anniversary-soft); color: var(--c-anniversary); }

.couple-add { align-self: stretch; border: 1px dashed color-mix(in srgb, var(--c-sub) 45%, transparent); background: transparent; color: var(--c-sub); border-radius: var(--ds-radius-modal); padding: var(--ds-space-16); font-weight: 500; font-size: var(--ds-font-size-body-lg); cursor: pointer; transition: background-color var(--ds-motion-duration-base) var(--ds-motion-easing-out), color var(--ds-motion-duration-base) var(--ds-motion-easing-out); }
.couple-add:hover { background: var(--c-soft); color: var(--c-accent-ink); }

.couple-entry { display: flex; flex-direction: column; gap: var(--ds-space-8); border-left: 4px solid var(--c-record); }
.couple-entry.is-plan { border-left-color: var(--c-plan); }
.couple-entry-head { display: flex; justify-content: space-between; align-items: center; gap: var(--ds-space-8); }
.couple-entry-date { color: var(--c-sub); font-size: var(--ds-font-size-body); font-weight: 500; }
.couple-entry-title { color: var(--c-text); font-size: var(--ds-font-size-title-sm); font-weight: 600; word-break: break-word; }
.couple-memo { white-space: pre-wrap; word-break: break-word; line-height: 1.6; }
.couple-entry-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--ds-space-8); margin-top: 2px; }
.couple-actions { display: flex; gap: var(--ds-space-8); align-items: center; }
.couple-link { background: none; border: 0; padding: var(--ds-space-8) 10px; border-radius: var(--ds-radius-control); color: var(--c-accent-ink); font-weight: 500; font-size: var(--ds-font-size-body); cursor: pointer; }
.couple-link:hover { background: var(--c-soft); }
.couple-link.danger { color: var(--ds-color-status-danger-text); }

.couple-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: var(--ds-space-8); margin-top: var(--ds-space-4); }
.couple-thumb { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--ds-radius-control); background: var(--c-soft); cursor: zoom-in; }
.couple-thumb-wrap { position: relative; }
.couple-thumb-remove { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: var(--ds-font-size-title-sm); line-height: 1; cursor: pointer; }

.couple-form { display: flex; flex-direction: column; gap: var(--ds-space-12); }
.couple-form-title { margin: 0; font-size: var(--ds-font-size-title-sm); font-weight: 600; color: var(--c-text); }
.couple-form label { display: flex; flex-direction: column; gap: 6px; color: var(--c-sub); font-size: var(--ds-font-size-body); font-weight: 500; }
.couple-label { color: var(--c-sub); font-size: var(--ds-font-size-body); font-weight: 500; }
.couple-field { width: 100%; min-width: 0; padding: var(--ds-space-12) var(--ds-space-16); border: 1px solid var(--c-line); border-radius: var(--ds-radius-control); background: var(--c-bg); color: var(--c-text); outline: none; }
.couple-field:focus { border-color: var(--c-accent); }
.couple-when { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--ds-space-12); }
.couple-form label.couple-check { flex-direction: row; align-items: center; gap: var(--ds-space-8); color: var(--c-text); }
.couple-form label.couple-file { padding: var(--ds-space-16); border-radius: var(--ds-radius-control); background: var(--c-soft); color: var(--c-accent-ink); cursor: pointer; }
.couple-file input { font-size: var(--ds-font-size-label); color: var(--c-sub); }
.couple-button { border: 0; border-radius: var(--ds-radius-control); padding: var(--ds-space-12) var(--ds-space-20); font-weight: 600; background: var(--c-accent-ink); color: var(--c-on-ink); cursor: pointer; transition: background-color var(--ds-motion-duration-base) var(--ds-motion-easing-out), transform var(--ds-motion-duration-base) var(--ds-motion-easing-out); }
.couple-button:hover { background: var(--c-accent-ink-hover); }
.couple-button:active:not(:disabled) { transform: scale(0.98); }
.couple-button:disabled { opacity: 0.45; cursor: default; }
.couple-button.ghost { background: var(--c-soft); color: var(--c-accent-ink); }
.couple-button.ghost:hover { background: var(--c-line); }

.cal { padding: var(--ds-space-16); }
.cal-head { display: flex; align-items: center; gap: var(--ds-space-8); margin-bottom: var(--ds-space-12); }
.cal-month { flex: 1; text-align: center; font-size: var(--ds-font-size-title-sm); font-weight: 600; color: var(--c-text); }
.cal-nav { width: 36px; height: 36px; border: 0; border-radius: var(--ds-radius-control); background: var(--c-soft); color: var(--c-accent-ink); font-size: var(--ds-font-size-title); line-height: 1; cursor: pointer; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--ds-space-4); }
.cal-weekday { text-align: center; font-size: var(--ds-font-size-caption); font-weight: 500; color: var(--c-sub); padding: var(--ds-space-4) 0; }
.cal-weekday.sun { color: var(--c-plan); }
.cal-weekday.sat { color: var(--ds-color-status-info-text); }
.cal-cell { display: flex; flex-direction: column; align-items: stretch; gap: var(--ds-space-4); min-height: 84px; padding: 6px var(--ds-space-4); border: 0; border-radius: var(--ds-radius-control); background: transparent; color: var(--c-text); text-align: left; cursor: pointer; font: inherit; min-width: 0; }
.cal-cell.blank { cursor: default; }
.cal-cell:not(.blank):hover { background: var(--c-soft); }
.cal-cell.selected { background: var(--c-soft); box-shadow: inset 0 0 0 2px var(--c-accent); }
.cal-day { font-size: var(--ds-font-size-label); font-weight: 500; padding-left: var(--ds-space-4); }
.cal-cell.today .cal-day { color: var(--c-on-ink, #fff); background: var(--c-accent-ink, var(--c-accent)); border-radius: var(--ds-radius-full); padding: 1px 7px; align-self: flex-start; }
.cal-marks { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-mark { font-size: var(--ds-font-size-caption); font-weight: 500; padding: 1px 5px; border-radius: var(--ds-radius-tag); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--c-on-ink, #fff); background: var(--c-accent-ink, var(--c-accent)); }
.cal-mark.plan { background: var(--c-plan-ink, var(--c-plan)); }
.cal-mark.record { background: var(--c-record-ink, var(--c-record)); }
.cal-mark.anniversary { background: var(--c-anniversary-ink, var(--c-anniversary)); }
.cal-mark.milestone { background: var(--c-milestone-ink, var(--c-milestone)); }
.cal-more { font-size: var(--ds-font-size-caption); color: var(--c-sub); padding-left: var(--ds-space-4); }
.cal-legend { display: flex; flex-wrap: wrap; gap: var(--ds-space-12); margin-top: var(--ds-space-12); font-size: var(--ds-font-size-caption); color: var(--c-sub); }
.cal-legend > span { display: inline-flex; align-items: center; gap: 6px; }

.lightbox { position: fixed; inset: 0; z-index: var(--ds-z-modal); background: rgba(0, 0, 0, 0.88); display: flex; align-items: center; justify-content: center; padding: var(--ds-space-16); cursor: zoom-out; }
.lightbox-image { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--ds-radius-control); }

@media (max-width: 820px) {
  .couple-subnav { display: flex; gap: 6px; overflow-x: auto; margin: -4px -16px 2px; padding: 0 var(--ds-space-16) var(--ds-space-4); }
  .couple-subnav-item { flex: 0 0 auto; padding: var(--ds-space-8) var(--ds-space-16); border-radius: var(--ds-radius-full); background: var(--c-card); color: var(--c-sub); font-weight: 500; font-size: var(--ds-font-size-body); text-decoration: none; box-shadow: inset 0 0 0 1px var(--c-line); }
  .couple-subnav-item.active { background: var(--c-accent-ink); color: var(--c-on-ink); box-shadow: none; }
  .couple-field { font-size: var(--ds-font-size-input); }
  .couple-hero { padding: var(--ds-space-20); }
  .couple-hero-days { font-size: 38px; }
  .couple-hero-icon { width: 76px; height: 76px; }
  .cal { padding: var(--ds-space-12) var(--ds-space-8); }
  .cal-grid { gap: 2px; }
  .cal-cell { min-height: 56px; align-items: center; padding: var(--ds-space-4) 0; }
  .cal-day { padding-left: 0; }
  .cal-cell.today .cal-day { align-self: center; }
  .cal-marks { flex-direction: row; justify-content: center; gap: var(--ds-space-4); }
  .cal-mark { width: 6px; height: 6px; padding: 0; border-radius: 50%; font-size: 0; }
  .cal-more { display: none; }
}

@media (max-width: 480px) {
  .couple-when { grid-template-columns: minmax(0, 1fr); }
}

.code-block { margin: 0; padding: 14px var(--ds-space-16); border-radius: var(--ds-radius-control); background: var(--ds-color-bg-sunken); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: var(--ds-font-size-label); white-space: pre-wrap; word-break: break-all; user-select: all; }
.worklog-list { display: flex; flex-direction: column; gap: var(--ds-space-8); margin-top: var(--ds-space-16); padding-top: var(--ds-space-12); border-top: 1px solid var(--ds-color-border-subtle); font-size: var(--ds-font-size-body); color: var(--ds-color-text-secondary); }
.worklog-notes { color: var(--ds-color-text-primary); }

.schedule { --c-text: var(--ds-color-text-primary); --c-sub: var(--ds-color-text-secondary); --c-soft: var(--ds-color-bg-sunken); --c-accent: var(--ds-color-text-link); --c-accent-strong: var(--ds-color-text-link); --c-accent-ink: var(--ds-color-brand-solid); --c-on-ink: #fff; --c-plan: var(--ds-color-status-danger-text); --c-plan-ink: var(--ds-color-status-danger-solid); display: flex; flex-direction: column; gap: var(--ds-space-16); }
.schedule .cal-mark.event { background: var(--ds-color-brand-solid); }
.schedule .cal-mark.couple { background: var(--couple); }
.usage-bars { display: flex; flex-direction: column; gap: var(--ds-space-8); }
.usage-row { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: var(--ds-space-12); font-size: var(--ds-font-size-label); }
.usage-date { color: var(--ds-color-text-secondary); }
.usage-track { height: 8px; border-radius: var(--ds-radius-full); background: var(--ds-color-bg-sunken); overflow: hidden; }
.usage-fill { height: 100%; border-radius: var(--ds-radius-full); background: var(--ds-color-text-link); min-width: 2px; }
.usage-count { color: var(--ds-color-text-primary); font-weight: 500; min-width: 32px; text-align: right; }

.heat { display: grid; grid-template-columns: 24px repeat(24, minmax(0, 1fr)); gap: var(--ds-space-4); align-items: center; }
.heat-label { font-size: var(--ds-font-size-caption); color: var(--ds-color-text-secondary); text-align: center; }
.heat-hour { font-size: var(--ds-font-size-caption); color: var(--ds-color-text-tertiary); text-align: left; }
.heat-cell { aspect-ratio: 1; border-radius: var(--ds-radius-tag); background: var(--ds-color-text-link); min-width: 0; }
.heat-cell.empty { background: var(--ds-color-bg-sunken); opacity: 1; }

.place-map-card { padding: var(--ds-space-8); }
.place-map { width: 100%; height: 320px; border-radius: var(--ds-radius-modal); overflow: hidden; background: var(--c-soft); }
.place-info { padding: 6px 10px; font-size: var(--ds-font-size-label); font-weight: 600; color: #191f28; white-space: nowrap; }
.place-search { display: flex; gap: var(--ds-space-8); }
.place-search .couple-field { flex: 1; }
.place-chips { display: flex; flex-wrap: wrap; gap: var(--ds-space-8); }
.place-chip { border: 0; border-radius: var(--ds-radius-full); padding: var(--ds-space-8) var(--ds-space-12); background: var(--c-soft); color: var(--c-accent-ink); font-weight: 500; font-size: var(--ds-font-size-label); cursor: pointer; transition: background-color var(--ds-motion-duration-base) var(--ds-motion-easing-out), color var(--ds-motion-duration-base) var(--ds-motion-easing-out); }
.place-chip.active { background: var(--c-accent-ink); color: var(--c-on-ink); }
.place-row { align-items: flex-start; }
.place-row .couple-row-title a { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--c-line); }
.place-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
.place-edit { margin-top: 10px; }
.place-actions { display: flex; flex-wrap: wrap; gap: var(--ds-space-8); align-items: center; }
@media (max-width: 720px) { .place-map { height: 240px; } }


.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--ds-space-16); flex-wrap: wrap; margin-bottom: var(--ds-space-8); }
.page-head-text { min-width: 0; }
.page-actions { display: flex; align-items: center; gap: var(--ds-space-8); }

.nav:focus-visible, .chip:focus-visible { outline: var(--ds-focus-width) solid var(--ds-focus-ring); outline-offset: var(--ds-focus-offset); }

.card.tile { padding: var(--ds-space-20) var(--ds-space-24); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--ds-space-12); }
.stat { padding: var(--ds-space-16); border-radius: var(--ds-radius-control); background: var(--ds-color-bg-sunken); min-width: 0; }
.stat-value { font-size: var(--ds-font-size-title-lg); font-weight: 600; color: var(--ds-color-text-primary); margin-top: 2px; }
.inset { padding: var(--ds-space-16); border-radius: var(--ds-radius-control); background: var(--ds-color-bg-sunken); }

.nav-list { display: flex; flex-direction: column; gap: var(--ds-space-20); }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group-label { padding: 0 var(--ds-space-12) 6px; font-size: var(--ds-font-size-caption); font-weight: 500; color: var(--ds-color-text-tertiary); }

.couple-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ds-space-16); align-items: start; }
.couple-col { display: flex; flex-direction: column; gap: var(--ds-space-16); min-width: 0; }
.couple-entries { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ds-space-16); }
@media (min-width: 1100px) {
  .couple-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .couple-split.calendar { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .couple-split.places { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .couple-sticky { position: sticky; top: 0; }
  .couple-entries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .places .place-map { height: min(72vh, 680px); }
}

.place-date { display: flex; flex-direction: column; gap: var(--ds-space-8); color: var(--c-sub); font-size: var(--ds-font-size-label); font-weight: 500; }
.place-results { display: flex; flex-direction: column; max-height: 360px; overflow-y: auto; border-top: 1px solid var(--c-line); }
.place-memo { color: var(--c-text); font-size: var(--ds-font-size-body); margin-top: 2px; }
.place-visited { color: var(--c-record-ink); font-size: var(--ds-font-size-label); font-weight: 500; margin-top: 2px; }
.place-visit { display: flex; gap: var(--ds-space-8); align-items: center; margin-top: 10px; flex-wrap: wrap; }
.place-visit .couple-field { width: auto; flex: 1 1 160px; }

@media (max-width: 820px) {
  .page-head { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

.theme-switch { padding: 0 0 var(--ds-space-12); }
.theme-switch .ds-segmented { display: flex; width: 100%; }
.theme-switch .ds-segment { flex: 1; padding: 6px 0; font-size: var(--ds-font-size-label); }

.gallery-head { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-16); flex-wrap: wrap; }
.gallery-upload { position: relative; overflow: hidden; display: inline-flex; align-items: center; }
.gallery-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.gallery-upload:focus-within { outline: 2px solid var(--c-accent, var(--ds-color-text-link)); outline-offset: var(--ds-focus-offset); }
.couple-thumb-button { display: block; padding: 0; border: 0; background: none; border-radius: var(--ds-radius-control); cursor: zoom-in; }
.couple-thumb-button:focus-visible { outline: 3px solid var(--c-accent); outline-offset: var(--ds-focus-offset); }
.lightbox-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: var(--ds-font-size-title-lg); line-height: 1; cursor: pointer; }
.lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: var(--ds-focus-offset); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--ds-space-8); }
.gallery-item { position: relative; display: block; padding: 0; border: 0; border-radius: var(--ds-radius-control); overflow: hidden; aspect-ratio: 1; background: var(--c-soft); cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--ds-space-16) var(--ds-space-8) var(--ds-space-8); font-size: var(--ds-font-size-caption); font-weight: 500; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, 0.55)); opacity: 0; transition: opacity var(--ds-motion-duration-base) var(--ds-motion-easing-out); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-item:hover .gallery-caption, .gallery-item:focus-visible .gallery-caption { opacity: 1; }
.gallery-item:focus-visible { outline: 2px solid var(--c-accent); outline-offset: var(--ds-focus-offset); }
@media (min-width: 1100px) { .gallery { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }
@media (max-width: 820px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ds-space-4); }
  .gallery-caption { display: none; }
}
@media (max-width: 820px) { .couple-shortcuts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.wiki { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--ds-space-16); align-items: start; }
.wiki-side { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; display: flex; flex-direction: column; gap: var(--ds-space-8); padding-right: var(--ds-space-4); }
.wiki-home-link { font-weight: 600; color: var(--ds-color-text-primary); text-decoration: none; padding: var(--ds-space-4) var(--ds-space-8); }
.wiki-home-link:hover { color: var(--ds-color-text-link); }
.wiki-search { padding: 10px var(--ds-space-12); font-size: var(--ds-font-size-body); }
.wiki-group-title { font-size: var(--ds-font-size-label); font-weight: 500; color: var(--ds-color-text-secondary); padding: var(--ds-space-8) var(--ds-space-8) var(--ds-space-4); }
.wiki-group-toggle { display: block; width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer; border-radius: var(--ds-radius-control); }
.wiki-group-toggle:hover { color: var(--ds-color-text-primary); }
.wiki-group-toggle:focus-visible { outline: var(--ds-focus-width) solid var(--ds-focus-ring); }
.wiki-group-toggle::before { content: "▸ "; }
.wiki-group-toggle.open::before { content: "▾ "; }
.wiki-tree { list-style: none; margin: 0; padding: 0; }
.wiki-subtitle { font-size: var(--ds-font-size-caption); color: var(--ds-color-text-tertiary); padding: var(--ds-space-8) var(--ds-space-8) 2px; }
.wiki-tree-link { display: block; padding: 6px var(--ds-space-8); border-radius: var(--ds-radius-control); font-size: var(--ds-font-size-label); color: var(--ds-color-text-primary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiki-tree-link:hover { background: var(--ds-color-bg-hover); }
.wiki-tree-link.active { background: var(--ds-color-border-subtle); color: var(--ds-color-text-primary); font-weight: 500; }
.wiki-tree-link:focus-visible, .wiki-home-link:focus-visible, .wiki-toc-link:focus-visible { outline: var(--ds-focus-width) solid var(--ds-focus-ring); outline-offset: 1px; }
.wiki-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ds-space-16); align-items: start; min-width: 0; }
.wiki-article { padding: var(--ds-space-32); min-width: 0; }
.wiki-crumb { font-size: var(--ds-font-size-label); color: var(--ds-color-text-secondary); margin-bottom: var(--ds-space-8); }
.wiki-crumb a { color: var(--ds-color-text-secondary); }
.wiki-title { margin: 0 0 var(--ds-space-8); font-size: var(--ds-font-size-title-lg); font-weight: 600; letter-spacing: -0.02em; color: var(--ds-color-text-primary); word-break: break-all; }
.wiki-lead { margin: 0 0 var(--ds-space-12); font-size: var(--ds-font-size-input); line-height: 1.65; color: var(--ds-color-text-primary); }
.wiki-tags { margin-bottom: var(--ds-space-8); }
.wiki-meta { font-size: var(--ds-font-size-label); color: var(--ds-color-text-tertiary); padding-bottom: var(--ds-space-16); border-bottom: 1px solid var(--ds-color-border-subtle); word-break: break-all; }
.wiki-body { max-width: 760px; }
.wiki-h { margin: var(--ds-space-32) 0 var(--ds-space-12); font-size: var(--ds-font-size-title-sm); font-weight: 600; color: var(--ds-color-text-primary); scroll-margin-top: var(--ds-space-16); }
.wiki-h3 { margin: var(--ds-space-20) 0 var(--ds-space-8); font-size: var(--ds-font-size-input); font-weight: 600; color: var(--ds-color-text-primary); scroll-margin-top: var(--ds-space-16); }
.wiki-h4 { margin: var(--ds-space-16) 0 var(--ds-space-8); font-size: var(--ds-font-size-body-lg); font-weight: 600; color: var(--ds-color-text-primary); }
.wiki-p { margin: var(--ds-space-8) 0; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.wiki-ul { margin: var(--ds-space-8) 0; padding-left: 22px; line-height: 1.7; }
.wiki-ul li { margin: 3px 0; overflow-wrap: anywhere; }
.wiki-ul li.depth-1 { margin-left: var(--ds-space-20); list-style-type: circle; }
.wiki-ul li.depth-2, .wiki-ul li.depth-3 { margin-left: 40px; list-style-type: square; }
.wiki-table { margin: var(--ds-space-12) 0; }
.wiki-table td, .wiki-table th { vertical-align: top; overflow-wrap: anywhere; }
.wiki-quote { margin: var(--ds-space-12) 0; padding: var(--ds-space-8) var(--ds-space-16); border-left: 3px solid var(--ds-color-border-subtle); color: var(--ds-color-text-secondary); white-space: pre-wrap; }
.wiki-rule { border: 0; border-top: 1px solid var(--ds-color-border-subtle); margin: var(--ds-space-20) 0; }
.wiki-code { padding: 1px 6px; border-radius: var(--ds-radius-tag); background: var(--ds-color-bg-sunken); font-size: 0.9em; font-family: var(--ds-font-family-mono); }
.wiki-ref { color: var(--ds-color-text-link); text-decoration: none; border-bottom: 1px dashed currentColor; }
.wiki-ref:hover { border-bottom-style: solid; }
.wiki-missing { color: var(--ds-color-text-tertiary); }
.wiki-list { margin: var(--ds-space-8) 0; padding-left: var(--ds-space-20); line-height: 1.8; }
.wiki-list a { color: var(--ds-color-text-link); text-decoration: none; }
.wiki-list-text { color: var(--ds-color-text-secondary); }
.wiki-backlinks-title { padding-top: var(--ds-space-16); border-top: 1px solid var(--ds-color-border-subtle); }
.wiki-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--ds-space-8); margin: var(--ds-space-16) 0 var(--ds-space-8); }
.wiki-kind { padding: var(--ds-space-12) var(--ds-space-16); border-radius: var(--ds-radius-control); background: var(--ds-color-bg-sunken); }
.wiki-kind-count { font-size: var(--ds-font-size-title-lg); font-weight: 600; color: var(--ds-color-text-primary); }
.wiki-kind-label { font-size: var(--ds-font-size-label); color: var(--ds-color-text-secondary); }
.wiki-toc { display: none; }
@media (min-width: 1400px) {
  .wiki-main { grid-template-columns: minmax(0, 1fr) 190px; }
  .wiki-toc { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 24px; padding: var(--ds-space-4) 0; }
  .wiki-toc-title { font-size: var(--ds-font-size-caption); font-weight: 500; color: var(--ds-color-text-secondary); padding: 0 var(--ds-space-8) 6px; }
  .wiki-toc-link { font-size: var(--ds-font-size-label); color: var(--ds-color-text-secondary); text-decoration: none; padding: 3px var(--ds-space-8); border-left: 2px solid var(--ds-color-border-subtle); }
  .wiki-toc-link.level-3 { padding-left: 18px; }
  .wiki-toc-link:hover { color: var(--ds-color-text-link); border-left-color: var(--ds-color-text-link); }
}
@media (max-width: 900px) {
  .wiki { grid-template-columns: minmax(0, 1fr); }
  .wiki-side { position: static; max-height: 40vh; }
  .wiki-article { padding: var(--ds-space-20); }
  .wiki-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.knowledge { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: var(--ds-space-16); align-items: start; }
.knowledge-list { display: flex; flex-direction: column; gap: var(--ds-space-4); max-height: calc(100vh - 180px); overflow-y: auto; }
.knowledge-detail { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; min-width: 0; }
.knowledge-search { margin-bottom: var(--ds-space-8); }
.knowledge-count { font-size: var(--ds-font-size-label); color: var(--ds-color-text-secondary); padding: var(--ds-space-4) var(--ds-space-4) var(--ds-space-8); }
.knowledge-row { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: var(--ds-space-12); border-radius: var(--ds-radius-control); cursor: pointer; }
.knowledge-row:hover { background: var(--ds-color-bg-hover); }
.knowledge-row.active { background: var(--ds-color-border-subtle); }
.knowledge-row:focus-visible { outline: var(--ds-focus-width) solid var(--ds-focus-ring); outline-offset: -2px; }
.knowledge-row-head { display: flex; justify-content: space-between; gap: var(--ds-space-8); align-items: baseline; }
.knowledge-row-title { font-weight: 500; color: var(--ds-color-text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-row-meta { flex: none; font-size: var(--ds-font-size-caption); color: var(--ds-color-text-secondary); }
.knowledge-row-text { margin-top: var(--ds-space-4); font-size: var(--ds-font-size-label); color: var(--ds-color-text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.knowledge-title { margin: 0 0 var(--ds-space-8); font-size: var(--ds-font-size-title); font-weight: 600; color: var(--ds-color-text-primary); word-break: break-all; }
.knowledge-summary { color: var(--ds-color-text-primary); margin-bottom: var(--ds-space-12); line-height: 1.6; }
.knowledge-tag { padding: var(--ds-space-4) var(--ds-space-8); border-radius: var(--ds-radius-tag); background: var(--ds-color-bg-sunken); color: var(--ds-color-text-secondary); font-size: var(--ds-font-size-caption); font-weight: 500; }
.knowledge-meta { margin-top: var(--ds-space-8); font-size: var(--ds-font-size-label); color: var(--ds-color-text-tertiary); word-break: break-all; }
.knowledge-back { display: none; margin-bottom: var(--ds-space-12); }
.doc { margin-top: var(--ds-space-16); border-top: 1px solid var(--ds-color-border-subtle, var(--ds-color-bg-sunken)); padding-top: var(--ds-space-8); }
.doc-h { margin: var(--ds-space-20) 0 var(--ds-space-8); font-size: var(--ds-font-size-body-lg); font-weight: 600; color: var(--ds-color-text-primary); }
.doc-file { font-family: var(--ds-font-family-mono); font-size: var(--ds-font-size-label); }
.doc-p { white-space: pre-wrap; line-height: 1.65; margin: var(--ds-space-8) 0; color: var(--ds-color-text-primary); overflow-wrap: anywhere; }
.doc-code { margin: var(--ds-space-12) 0; padding: var(--ds-space-12) var(--ds-space-16); border-radius: var(--ds-radius-control); background: var(--ds-color-bg-sunken); overflow-x: auto; font-size: var(--ds-font-size-label); line-height: 1.55; }
@media (max-width: 1099px) {
  .knowledge { grid-template-columns: minmax(0, 1fr); }
  .knowledge-list { max-height: none; }
  .knowledge-detail { position: static; max-height: none; display: none; }
  .knowledge.has-detail .knowledge-list { display: none; }
  .knowledge.has-detail .knowledge-detail { display: block; }
  .knowledge-back { display: inline-block; }
}
.overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ds-space-16); align-items: stretch; }
.overview-slot { display: flex; min-width: 0; }
.overview-slot > .panel { flex: 1; min-width: 0; }
.overview-slot.wide { grid-column: span 2; }
.panel-loading { flex: 1; min-height: 96px; border-radius: var(--ds-radius-control); background: var(--ds-color-bg-sunken); color: var(--ds-color-text-tertiary); font-size: var(--ds-font-size-label); display: flex; align-items: center; justify-content: center; }
@media (max-width: 1299px) { .overview { grid-template-columns: repeat(2, minmax(0, 1fr)); } .overview-slot.wide { grid-column: span 1; } }
@media (max-width: 720px) { .overview { grid-template-columns: minmax(0, 1fr); } }
.panel { display: flex; flex-direction: column; gap: var(--ds-space-12); padding: var(--ds-space-20) var(--ds-space-24); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-12); }
.panel-title { text-decoration: none; color: var(--ds-color-text-primary); border-radius: var(--ds-radius-control); }
.panel-title h2 { margin: 0; font-size: var(--ds-font-size-input); font-weight: 600; transition: color var(--ds-motion-duration-base) var(--ds-motion-easing-out); }
.panel-title:hover h2 { color: var(--ds-color-text-link); }
.panel-title:focus-visible { outline: var(--ds-focus-width) solid var(--ds-focus-ring); outline-offset: 3px; }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: var(--ds-space-8); }
.figure { padding: var(--ds-space-12); border-radius: var(--ds-radius-control); background: var(--ds-color-bg-sunken); min-width: 0; }
.figure-value { font-size: var(--ds-font-size-title); font-weight: 600; color: var(--ds-color-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.figure-value.warn { color: var(--ds-color-status-warning-text); }
.figure-label { font-size: var(--ds-font-size-caption); color: var(--ds-color-text-secondary); margin-top: 2px; }
.panel-line { font-size: var(--ds-font-size-body); color: var(--ds-color-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-line.faint { color: var(--ds-color-text-secondary); }
.overview-foot { color: var(--ds-color-text-tertiary); font-size: var(--ds-font-size-label); }

.photo-pin { width: 14px; height: 14px; border-radius: 50%; background: var(--c-record, #2bbf9b); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); cursor: default; }
.photo-pin:not(.inline) { cursor: pointer; transition: transform var(--ds-motion-duration-base) var(--ds-motion-easing-out); }
.photo-pin:not(.inline):hover { transform: scale(1.15); }
.couple-entry.focused { outline: 3px solid var(--c-record, #2bbf9b); outline-offset: var(--ds-focus-offset); }
@media (prefers-reduced-motion: reduce) { .photo-pin:not(.inline) { transition: none; } }
.photo-pin.inline { display: inline-block; vertical-align: -2px; margin-right: 6px; }
.map-legend { padding: var(--ds-space-8) var(--ds-space-8) var(--ds-space-4); font-size: var(--ds-font-size-label); color: var(--c-sub); }

.search-open { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-8); margin: 0 var(--ds-space-4) var(--ds-space-16); padding: var(--ds-space-8) var(--ds-space-12); border: 0; border-radius: var(--ds-radius-control); background: var(--ds-color-bg-sunken); box-shadow: inset 0 0 0 1px var(--ds-color-border-subtle); color: var(--ds-color-text-secondary); font-size: var(--ds-font-size-body); font-weight: 500; cursor: pointer; text-align: left; transition: color var(--ds-motion-duration-base) var(--ds-motion-easing-out); }
.search-open:hover { color: var(--ds-color-text-primary); }
.search-key { font-size: var(--ds-font-size-caption); color: var(--ds-color-text-tertiary); }
.search-backdrop { position: fixed; inset: 0; z-index: var(--ds-z-modal); background: var(--ds-modal-backdrop); display: flex; justify-content: center; align-items: flex-start; padding: 12vh var(--ds-space-16) var(--ds-space-16); }
.search-dialog { width: 100%; max-width: var(--ds-command-palette-width); max-height: 70vh; display: flex; flex-direction: column; background: var(--ds-modal-bg); border-radius: var(--ds-command-palette-radius); box-shadow: var(--ds-command-palette-shadow); overflow: hidden; }
.search-input { margin: var(--ds-space-16); width: auto; }
.search-results { overflow-y: auto; padding: 0 var(--ds-space-8) var(--ds-space-12); display: flex; flex-direction: column; }
.search-group { font-size: var(--ds-font-size-caption); font-weight: 600; color: var(--ds-color-text-tertiary); padding: var(--ds-space-12) var(--ds-space-12) var(--ds-space-4); }
.search-hit { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; border: 0; border-radius: var(--ds-radius-control); padding: var(--ds-space-8) var(--ds-space-12); background: transparent; cursor: pointer; text-align: left; }
.search-hit.active { background: var(--ds-color-bg-sunken); box-shadow: inset 0 0 0 1px var(--ds-color-border-subtle); }
.search-hit-title { color: var(--ds-color-text-primary); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.search-hit-sub { color: var(--ds-color-text-tertiary); font-size: var(--ds-font-size-label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.search-hint { color: var(--ds-color-text-tertiary); font-size: var(--ds-font-size-body); padding: var(--ds-space-12); }

@media (max-width: 820px) {
  .search-key { display: none; }
  .search-backdrop { padding-top: 8vh; }
}

.commit-cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-space-12); margin-bottom: var(--ds-space-12); }
.commit-cal-head .empty { padding: 0; }
.commit-cal-wrap { overflow-x: auto; padding-bottom: var(--ds-space-4); }
.commit-cal { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 12px); grid-auto-columns: 12px; gap: 3px; width: max-content; }
.commit-cal-cell { border-radius: var(--ds-radius-tag); background: var(--ds-color-text-link); }
.commit-cal-cell.empty { background: var(--ds-color-bg-sunken); box-shadow: inset 0 0 0 1px var(--ds-color-border-subtle); }

.wiki-history { margin-top: var(--ds-space-24); padding-top: var(--ds-space-16); border-top: 1px solid var(--ds-color-border-subtle); display: flex; flex-direction: column; gap: var(--ds-space-12); align-items: flex-start; }
.wiki-history .link-button.active { color: var(--ds-color-text-primary); font-weight: 600; }
.wiki-diff { width: 100%; margin: 0; padding: var(--ds-space-12) 0; border-radius: var(--ds-radius-control); background: var(--ds-color-bg-sunken); overflow-x: auto; font-size: var(--ds-font-size-label); line-height: 1.6; }
.wiki-diff-line { padding: 0 var(--ds-space-12); white-space: pre; }
.wiki-diff-line.added { background: var(--ds-color-status-success-bg); color: var(--ds-color-text-primary); }
.wiki-diff-line.removed { background: var(--ds-color-status-danger-bg); color: var(--ds-color-text-primary); }
.wiki-diff-gap { padding: 0 var(--ds-space-12); color: var(--ds-color-text-tertiary); }

.couple-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--ds-space-16); }
.couple-stat { display: flex; flex-direction: column; gap: var(--ds-space-4); min-width: 0; }
.couple-stat-value { font-size: var(--ds-font-size-title-lg); font-weight: 700; color: var(--c-text); letter-spacing: -0.01em; }
.couple-note { margin-top: var(--ds-space-12); }
.tone-couple .usage-fill { background: var(--c-accent); }
.tone-couple .usage-date { color: var(--c-sub); }
.tone-couple .usage-count { color: var(--c-text); }
.usage-bars.wide .usage-row { grid-template-columns: minmax(72px, 140px) 1fr auto; }
.usage-bars.wide .usage-date { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.field-area { min-height: 420px; resize: vertical; line-height: 1.6; font-family: var(--ds-font-family-mono); font-size: var(--ds-font-size-body); }
.blog-columns { display: grid; gap: var(--ds-space-16); grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); align-items: start; }
.blog-list { display: flex; flex-direction: column; gap: var(--ds-space-4); max-height: 70vh; overflow-y: auto; }
.blog-item { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 0; border-radius: var(--ds-radius-control); padding: var(--ds-space-8) var(--ds-space-12); background: transparent; color: var(--ds-color-text-primary); cursor: pointer; }
.blog-item:hover, .blog-item.active { background: var(--ds-color-bg-hover); }
.blog-item-title { font-weight: 600; font-size: var(--ds-font-size-body); }
.blog-item-meta { color: var(--ds-color-text-tertiary); font-size: var(--ds-font-size-caption); }
.blog-check { flex-direction: row !important; align-items: center; gap: var(--ds-space-8) !important; }
.blog-actions { display: flex; flex-wrap: wrap; gap: var(--ds-space-8); }
.blog-preview { line-height: 1.75; overflow-wrap: anywhere; }
.blog-preview h1, .blog-preview h2, .blog-preview h3 { margin: var(--ds-space-24) 0 var(--ds-space-8); line-height: 1.4; }
.blog-preview > :first-child { margin-top: 0; }
.blog-preview p, .blog-preview ul, .blog-preview ol, .blog-preview pre, .blog-preview blockquote, .blog-preview table { margin: 0 0 var(--ds-space-16); }
.blog-preview code { background: var(--ds-color-bg-sunken); padding: 2px 6px; border-radius: var(--ds-radius-tag); font-size: 0.9em; }
.blog-preview pre { background: var(--ds-color-bg-sunken); padding: var(--ds-space-16); border-radius: var(--ds-radius-control); overflow-x: auto; }
.blog-preview pre code { background: none; padding: 0; }
.blog-preview blockquote { padding: var(--ds-space-8) var(--ds-space-16); border-left: 3px solid var(--ds-color-text-link); color: var(--ds-color-text-secondary); }
.blog-preview img { max-width: 100%; height: auto; border-radius: var(--ds-radius-control); }
.blog-preview table { border-collapse: collapse; display: block; overflow-x: auto; }
.blog-preview th, .blog-preview td { border-bottom: 1px solid var(--ds-color-border-subtle); padding: var(--ds-space-8) var(--ds-space-12); text-align: left; }
@media (max-width: 900px) { .blog-columns { grid-template-columns: minmax(0, 1fr); } .blog-list { max-height: 240px; } }

.wiki-tree-nested { margin-left: 14px; padding-left: 6px; border-left: 1px solid var(--ds-color-border-subtle); }
.wiki-node { display: flex; align-items: center; gap: 2px; }
.wiki-node .wiki-tree-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--ds-space-8); overflow-wrap: anywhere; }
.wiki-node-gap { width: 18px; flex: none; }
.wiki-node-toggle { width: 18px; height: 24px; flex: none; border: 0; padding: 0; background: transparent; color: var(--ds-color-text-tertiary); cursor: pointer; border-radius: var(--ds-radius-tag); }
.wiki-node-toggle::before { content: "›"; display: inline-block; font-size: var(--ds-font-size-body-lg); line-height: 1; transition: transform var(--ds-motion-duration-base) var(--ds-motion-easing-out); }
.wiki-node-toggle.open::before { transform: rotate(90deg); }
.wiki-node-toggle:hover { color: var(--ds-color-text-primary); background: var(--ds-color-bg-hover); }
.wiki-node-toggle:focus-visible { outline: var(--ds-focus-width) solid var(--ds-focus-ring); }
.wiki-node-count { margin-left: auto; padding: 0 6px; border-radius: var(--ds-radius-full); background: var(--ds-color-bg-sunken); color: var(--ds-color-text-tertiary); font-size: var(--ds-font-size-caption); font-weight: 500; }
.wiki-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wiki-crumb a:hover { color: var(--ds-color-text-link); }
.wiki-crumb-sep { color: var(--ds-color-text-tertiary); }
.wiki-crumb-here { color: var(--ds-color-text-primary); font-weight: 500; }
.wiki-kind-tag { background: var(--ds-color-brand-soft); color: var(--ds-color-text-link); }
.wiki-children-title { margin-top: var(--ds-space-16); }
.wiki-children { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--ds-space-8); margin: var(--ds-space-8) 0 var(--ds-space-16); }
.wiki-child { display: block; padding: var(--ds-space-12) var(--ds-space-16); border-radius: var(--ds-radius-control); background: var(--ds-color-bg-sunken); text-decoration: none; color: inherit; transition: background-color var(--ds-motion-duration-base) var(--ds-motion-easing-out); }
.wiki-child:hover { background: var(--ds-color-border-subtle); }
.wiki-child:focus-visible { outline: var(--ds-focus-width) solid var(--ds-focus-ring); }
.wiki-child-name { display: flex; align-items: center; gap: var(--ds-space-8); font-weight: 600; color: var(--ds-color-text-primary); overflow-wrap: anywhere; }
.wiki-child-text { margin-top: 2px; color: var(--ds-color-text-secondary); font-size: var(--ds-font-size-label); line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.wiki-pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ds-space-8); margin-top: var(--ds-space-32); padding-top: var(--ds-space-16); border-top: 1px solid var(--ds-color-border-subtle); }
.wiki-pager-link { display: flex; flex-direction: column; gap: 2px; padding: var(--ds-space-12) var(--ds-space-16); border-radius: var(--ds-radius-control); background: var(--ds-color-bg-sunken); text-decoration: none; color: var(--ds-color-text-primary); font-weight: 500; overflow-wrap: anywhere; }
.wiki-pager-link.next { text-align: right; }
.wiki-pager-link:hover { background: var(--ds-color-border-subtle); }
.wiki-pager-label { color: var(--ds-color-text-tertiary); font-size: var(--ds-font-size-caption); font-weight: 400; }
.blog-comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-8); margin-bottom: var(--ds-space-8); }
.blog-comment-head a { text-decoration: none; }
.blog-comment-head a:hover { color: var(--ds-color-text-link); }
.blog-comment-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; margin-bottom: var(--ds-space-12); }
.pc-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-8); }
.pc-timeline { position: relative; height: var(--ds-space-32); border-radius: var(--ds-radius-tag); background: var(--ds-color-bg-sunken); overflow: hidden; }
.pc-timeline span { position: absolute; top: 0; bottom: 0; min-width: 1px; }
.pc-timeline .active { background: var(--ds-color-chart-1); }
.pc-timeline .idle { background: var(--ds-color-chart-4); opacity: 0.45; }
.pc-timeline .locked { background: var(--ds-color-text-tertiary); opacity: 0.25; }
.pc-timeline-scale { display: flex; justify-content: space-between; margin-top: var(--ds-space-4); font-size: var(--ds-font-size-caption); color: var(--ds-color-text-tertiary); }
.pc-title { overflow-wrap: anywhere; }

.ds-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--ds-space-12); }
.ds-swatch { display: flex; flex-direction: column; gap: var(--ds-space-4); min-width: 0; }
.ds-swatch-chip { height: var(--ds-space-48); border-radius: var(--ds-radius-control); border: var(--ds-border-width) solid var(--ds-color-border-default); }
.ds-swatch-name { font-size: var(--ds-font-size-label); line-height: var(--ds-font-line-height-label); font-weight: var(--ds-font-weight-medium); color: var(--ds-color-text-primary); overflow-wrap: anywhere; }
.ds-swatch-value, .ds-row code, .ds-sample code, .ds-icon-cell code, .ds-tokens code { font-family: var(--ds-font-family-mono); font-size: var(--ds-font-size-caption); line-height: var(--ds-font-line-height-caption); color: var(--ds-color-text-tertiary); overflow-wrap: anywhere; }
.ds-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--ds-space-16); align-items: center; padding: var(--ds-space-8) 0; border-top: var(--ds-border-width) solid var(--ds-color-border-subtle); }
.ds-row:first-of-type { border-top: 0; }
.ds-row > span { min-width: 0; overflow-wrap: anywhere; color: var(--ds-color-text-primary); }
.ds-space-bar { height: var(--ds-space-16); min-width: var(--ds-border-width); border-radius: var(--ds-radius-tag); background: var(--ds-color-brand-solid); }
.ds-samples { display: flex; flex-wrap: wrap; gap: var(--ds-space-24); }
.ds-sample { display: flex; flex-direction: column; align-items: center; gap: var(--ds-space-8); }
.ds-radius-box { width: var(--ds-space-64); height: var(--ds-space-64); background: var(--ds-color-brand-soft); border: var(--ds-border-indicator-width) solid var(--ds-color-brand-solid); }
.ds-shadow-box { width: 160px; height: var(--ds-space-64); margin: var(--ds-space-16); border-radius: var(--ds-radius-card); background: var(--ds-color-bg-raised); }
.ds-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: var(--ds-space-8); }
.ds-icon-cell { display: flex; flex-direction: column; align-items: center; gap: var(--ds-space-4); padding: var(--ds-space-12) var(--ds-space-8); border-radius: var(--ds-radius-control); text-align: center; min-width: 0; }
.ds-icon-cell:hover { background: var(--ds-color-bg-hover); }
.ds-icon-slot { display: inline-flex; color: var(--ds-color-text-primary); }
.ds-icon-label { font-size: var(--ds-font-size-label); line-height: var(--ds-font-line-height-label); color: var(--ds-color-text-primary); }
@media (max-width: 720px) {
  .ds-row { grid-template-columns: minmax(0, 1fr); gap: var(--ds-space-4); }
}
.pc-proc-bar { width: 32%; min-width: var(--ds-space-64); }
.pc-note { margin-top: var(--ds-space-8); font-size: var(--ds-font-size-caption); color: var(--ds-color-text-tertiary); }

.ds-icon { display: inline-block; flex: none; width: var(--ds-density-icon); height: var(--ds-density-icon); vertical-align: middle; color: inherit; fill: none; stroke-width: 2; }
.ds-icon-sm { width: var(--ds-space-12); height: var(--ds-space-12); }
.ds-icon-lg { width: var(--ds-space-20); height: var(--ds-space-20); }
.ds-icon-xl { width: var(--ds-space-24); height: var(--ds-space-24); }
.nav { gap: var(--ds-space-12); }
.nav .ds-icon { opacity: 0.8; }
.nav.active .ds-icon { opacity: 1; }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav.nav-child { gap: var(--ds-space-8); }
.search-open-label, .link-button, .error { display: inline-flex; align-items: center; gap: var(--ds-space-8); }
.error { display: flex; }
.wiki-crumb-sep { display: inline-flex; align-items: center; }
.ds-button { font-weight: var(--ds-font-weight-semibold); }
.ds-primitives { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--ds-space-16); align-items: end; }
.ds-primitives-row { display: flex; flex-wrap: wrap; gap: var(--ds-space-12); align-items: center; }
.ds-density-note { margin: 0 0 var(--ds-space-16); color: var(--ds-color-text-secondary); }
.ds-primitives-wrap { display: flex; flex-direction: column; gap: var(--ds-card-gap); }
.ds-primitives-wrap .ds-tabs { margin-top: var(--ds-space-16); }

