/* One accent, one warning red; the verdict alone also uses amber and green. */
:root {
  --ink: #1f2933;
  --muted: #5b6672;
  --line: #e3e7ec;
  --surface: #ffffff;
  --canvas: #f6f5f1;
  --accent: #2f5d8a;
  --accent-soft: #e7eef6;
  --danger: #c62828;
  --danger-soft: #fdecec;
  --caution: #9a6a00;
  --caution-soft: #fdf4dc;
  --safe: #2e7d32;
  --safe-soft: #e8f4ea;
  --header-height: 60px;
  --toolbar-width: 88px;
  --panel-width: 360px;
  color-scheme: light;
  font-family: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; overflow: hidden; }

body { min-width: 1280px; }

h1, h2, h3, p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Icons are Lucide SVG files used as masks, so they take the text colour. */
.icon {
  display: inline-block;
  flex: none;
  width: 24px;
  height: 24px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

/* ---- Header ---- */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.app-header h1 { font-size: 22px; font-weight: 700; }

.app-subtitle { margin-left: 12px; color: var(--muted); font-size: 16px; font-weight: 400; }

.header-actions { display: flex; gap: 8px; }

.header-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

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

.header-button .icon { width: 20px; height: 20px; }

/* ---- Workspace: toolbar, canvas (about three quarters), results (a quarter) ---- */

.workspace {
  display: grid;
  height: calc(100vh - var(--header-height));
  grid-template-columns: var(--toolbar-width) minmax(0, 1fr) var(--panel-width);
}

#toolbar {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.tool {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 68px;
  min-height: 64px;
  padding: 6px 2px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.tool:hover { background: var(--accent-soft); }

.tool[aria-pressed="true"] { background: var(--accent); color: #fff; }

.tool:disabled { opacity: 0.4; cursor: default; }

.tool:disabled:hover { background: transparent; }

.tool-label { font-size: 14px; line-height: 1.3; white-space: nowrap; }

.tool[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
  transform: translateY(-50%);
  pointer-events: none;
}

.tool[aria-expanded="true"]::after { display: none; }

.tool-help[aria-pressed="true"]::after { display: none; }

.tool-group { position: relative; }

.speed-choice {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: var(--accent-soft);
}

.speed {
  width: 24px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.speed[aria-pressed="true"] { background: var(--accent); color: #fff; }

.tool-check { min-height: 56px; }

.tool-check input { width: 18px; height: 18px; margin: 0 0 2px; accent-color: var(--accent); }

.tool-help { margin-top: auto; min-height: 44px; }

.help-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
}

#furniture-menu {
  position: absolute;
  top: 0;
  left: calc(100% + 10px);
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 6px 20px rgb(0 0 0 / 12%);
}

#furniture-menu[hidden] { display: none; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.menu-item:hover, .menu-item[aria-checked="true"] { background: var(--accent-soft); }

/* ---- Canvas ---- */

#canvas-area { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--canvas); }

#stage-area { position: relative; flex: 1; min-height: 0; }

#stage { position: absolute; inset: 0; }

#stage canvas { display: block; width: 100%; height: 100%; }

.canvas-hint[hidden] { display: none; }

.canvas-hint {
  position: absolute;
  bottom: 16px;
  left: 16px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgb(255 255 255 / 90%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}

.event-log {
  display: grid;
  gap: 2px;
  max-height: 220px;
  margin: 0;
  padding-left: 0;
  overflow-y: auto;
  list-style: none;
  font-size: 13px;
  line-height: 1.45;
}

.event-time { display: inline-block; min-width: 3.2em; color: var(--muted); font-variant-numeric: tabular-nums; }

.canvas-message {
  position: absolute;
  top: 16px;
  left: 50%;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  transform: translateX(-50%);
  pointer-events: none;
}

.canvas-message[hidden] { display: none; }

/* The line over the 3D view that says what is being shown, with the help on or off. */
.help-caption {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  max-width: 62%;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  font-size: 13px;
  line-height: 1.5;
}
.help-caption-main { margin: 0; font-weight: 700; }
.help-caption-main .quiet { font-weight: 400; color: var(--muted); }
.help-caption-sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.help-caption-actions { display: flex; gap: 6px; margin-top: 6px; }
.help-caption-actions button { min-height: 30px; padding: 0 12px; border: 1px solid var(--accent); border-radius: 15px; background: #fff; color: var(--accent); font-size: 12px; cursor: pointer; }
.help-caption-actions button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.help-caption-actions .help-close { margin-left: auto; border-color: var(--line); color: var(--muted); }
.help-caption [hidden] { display: none; }

.delete-chip {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 2px 6px rgb(0 0 0 / 25%);
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.delete-chip[hidden] { display: none; }

.delete-chip .icon { width: 18px; height: 18px; }

/* ---- Results ---- */

#results {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px 14px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
}

.verdict-reasons { display: grid; gap: 8px; margin-top: 12px; }

.verdict-reasons li { padding-left: 1em; text-indent: -1em; }

.verdict-reasons li::before { content: "・"; }

.child-settings h2 { margin-bottom: 8px; font-size: 20px; }

.room-label { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.room-label select { min-height: 36px; padding: 0 8px; font-size: 14px; }
.months-label { display: block; }

#months-label { margin-left: 8px; font-size: 20px; font-weight: 700; }

#months { display: block; width: 100%; height: 32px; margin: 4px 0 0; accent-color: var(--accent); }

.months-range { color: var(--muted); }
/* The line that keeps the ages honest (KO 2026-11-06): an order to expect, not a timetable. */
.months-note { margin: 4px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }

.my-child { margin-top: 8px; }
.my-child > summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--accent); border-radius: 8px; color: var(--accent); list-style: none; }
.my-child > summary::-webkit-details-marker { display: none; }
.my-child > summary:hover { background: rgba(0, 0, 0, 0.04); }
.my-child-summary-icon { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 9px; border-color: transparent transparent transparent currentColor; transition: transform 0.15s; }
.my-child[open] > summary .my-child-summary-icon { transform: rotate(90deg); }
.my-child > summary > span:nth-child(2) { white-space: nowrap; }
.my-child-summary-hint { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.my-child[open] > summary .my-child-summary-hint { display: none; }
.my-child > :not(summary) { margin-left: 4px; }
.my-child legend { font-size: 12px; color: var(--muted); padding: 0; }
.measure-label { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.measure-label input { width: 88px; min-height: 36px; padding: 0 8px; font-size: 16px; }
.my-child-note:empty { display: none; }
.result-table.same-condition col:nth-child(2), .result-table.same-condition th:nth-child(2), .result-table.same-condition td:nth-child(2),
.result-table.same-condition col:nth-child(4), .result-table.same-condition th:nth-child(4), .result-table.same-condition td:nth-child(4) { display: none; }
.result-table.same-condition .col-name { width: 62%; }
.result-table.same-condition .col-count { width: 38%; }
.summary-line { margin: 0 0 6px; font-size: 13px; line-height: 1.5; }
.my-child-position { margin: 8px 0 0; padding: 8px 10px; background: var(--panel-soft, #f3f1ec); border-radius: 6px; font-size: 13px; line-height: 1.6; }
.my-child-position:empty { display: none; }
.my-child-position strong { font-weight: 700; }
.sex-choice { display: flex; gap: 24px; margin: 4px 0 0; padding: 0; border: 0; }

.sex-choice label { display: flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; }

.sex-choice input { width: 20px; height: 20px; accent-color: var(--accent); }

.more { border-top: 1px solid var(--line); padding-top: 16px; }

.more summary { min-height: 40px; font-size: 18px; font-weight: 600; cursor: pointer; }

.more h3 { margin: 16px 0 6px; font-size: 16px; }

.value-list { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; }

.value-list dt { color: var(--muted); }

.value-list dd { margin: 0; font-weight: 600; text-align: right; }

.seed-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }

.seed-label input { width: 6em; min-height: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; }

.hint { color: var(--muted); }

.secondary-button, .primary-button {
  min-height: 44px;
  margin-top: 8px;
  padding: 0 20px;
  border-radius: 8px;
  cursor: pointer;
}

.secondary-button { border: 1px solid var(--accent); background: var(--surface); color: var(--accent); }

.primary-button { border: 0; background: var(--accent); color: #fff; }

#countermeasure { margin-top: 8px; font-weight: 600; }

#error { color: var(--danger); font-weight: 600; }

/* ---- Dialogs ---- */

dialog { border: 0; padding: 0; color: var(--ink); }

dialog::backdrop { background: rgb(15 23 32 / 45%); }

.sheet { width: min(960px, 90vw); height: 86vh; border-radius: 16px; }

.sheet[open] { display: flex; flex-direction: column; }

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}

.sheet-header h2 { font-size: 22px; }

.close-button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }

.close-button:hover { background: var(--accent-soft); }

.sheet-body { flex: 1; padding: 8px 24px 24px; overflow-y: auto; }

.evidence-section { margin-top: 24px; }

.evidence-section h2 { margin-bottom: 12px; font-size: 20px; }

.evidence-section > p { margin-bottom: 8px; }

.evidence-note { color: var(--muted); }

.evidence-section > ul li { margin-bottom: 6px; }

.evidence-item { margin-bottom: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }

.evidence-item h3 { margin-bottom: 8px; font-size: 18px; }

.evidence-unit { color: var(--muted); font-size: 16px; font-weight: 400; }

.evidence-item dl, .evidence-section > dl { display: grid; grid-template-columns: 8em 1fr; gap: 4px 12px; margin: 0; }

.evidence-item dt, .evidence-section > dl dt { color: var(--muted); }

.evidence-item dd, .evidence-section > dl dd { margin: 0; overflow-wrap: anywhere; }

.evidence-item details { margin-top: 8px; }

pre { margin: 8px 0 0; padding: 12px; border-radius: 8px; background: #f4f6f8; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }

.evidence-sources { overflow-wrap: anywhere; }

.guide { width: 560px; padding: 32px; border-radius: 16px; }

.guide h2 { font-size: 24px; }

.guide-steps { display: grid; gap: 16px; margin: 24px 0; }

.guide-steps li { display: flex; align-items: center; gap: 16px; }

.guide-steps strong { display: block; font-size: 18px; }

.guide-steps .icon { width: 32px; height: 32px; color: var(--accent); }

.step-number {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.guide-actions { display: flex; align-items: center; justify-content: space-between; }

.guide-actions label { display: flex; align-items: center; gap: 8px; cursor: pointer; }

.guide-actions input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---- Moments, the second toolbar menu, and rows in words ---- */



.more-menu {
  position: absolute;
  top: 0;
  left: calc(100% + 10px);
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 92px;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 6px 20px rgb(0 0 0 / 12%);
}

.more-menu[hidden] { display: none; }

.more-menu .tool[data-tip]:hover::after { left: calc(100% + 14px); }

#retry[data-pending="true"] { background: var(--accent); color: #fff; animation: retry-call 1.4s ease-in-out infinite; }

@keyframes retry-call {
  50% { box-shadow: 0 0 0 5px rgb(47 93 138 / 25%); }
}

#results.stale #verdict, #results.stale .result-table { opacity: 0.55; }

/* ---- The adjustments of the age ---- */
.adjustments { padding: 10px 12px 6px; border-radius: 10px; background: var(--accent-soft); }
.adjustments-title { margin: 0; font-size: 15px; }
.adjust-lead { margin: 2px 0 8px; font-size: 12px; color: var(--muted); }
.adjust-rooms { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.adjust-rooms button { min-height: 30px; padding: 0 10px; border: 1px solid var(--accent); border-radius: 15px; background: #fff; color: var(--accent); font-size: 12px; cursor: pointer; }
.adjust-rooms button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.adjust-room-name { color: var(--muted); font-size: 11px; margin-right: 4px; }
.adjust-block { margin-top: 6px; }
.adjust-heading { margin: 0 0 2px; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.adjust-heading::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.adjust-heading.can::before { background: #2e8b57; }
.adjust-heading.help::before { background: #e0a000; }
.adjust-heading.notyet::before { background: #8a9299; }
.adjust-heading.adult::before { background: #d9779b; }
.adjust-heading.next::before { background: var(--accent); }
.adjust-heading.adults::before { background: var(--danger); }
.adjust-list { margin: 0 0 4px; padding-left: 18px; font-size: 13px; line-height: 1.55; }
.adjust-list li.quiet { color: var(--muted); }
.adjust-list li.showable {
  list-style: none;
  position: relative;
  margin: 4px 0 4px -18px;
  padding: 6px 64px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  min-height: 36px;
}
.adjust-list li.showable::after {
  content: '3Dで見る';
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  font-size: 11px;
  color: var(--accent);
  background: #fff;
}
.adjust-list li.showable:hover { border-color: var(--accent); background: #fff; }
.adjust-list li.showable[aria-pressed="true"] { border-color: var(--accent); background: #fff; box-shadow: inset 4px 0 0 var(--accent); }
.adjust-list li.showable[aria-pressed="true"]::after { content: '表示中'; background: var(--accent); color: #fff; }
/* The rows of 「この助けがあればできる」 are the heart of the screen: a full button each. */
#adjust-help li.showable { border-color: #e0a000; background: #fff; }
#adjust-help li.showable:hover, #adjust-help li.showable[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 4px 0 0 #e0a000; }
.adjust-list strong { font-weight: 700; }
.adjust-block:has(.adjust-list:empty) { display: none; }
.adjust-spans { margin-top: 6px; }
.adjust-spans > summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
.adjust-gap { color: var(--muted); font-size: 12px; }
.runs { margin-top: 10px; }
.runs > summary { cursor: pointer; font-weight: 700; font-size: 13px; min-height: 36px; display: flex; align-items: center; color: var(--muted); }

/* ---- The conclusion and the table of the two conditions ---- */

.conclusion { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); }

.conclusion[data-tone="up"] { background: var(--danger-soft); }

.conclusion[data-tone="down"], .conclusion[data-tone="same"] { background: var(--safe-soft); }

.conclusion-text { font-size: 15px; font-weight: 700; line-height: 1.5; }

.result-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }

.result-table .col-name { width: 36%; }

.result-table .col-count { width: 25%; }

.result-table .col-diff { width: 14%; }

.result-table thead th { padding: 0 4px 4px; color: var(--muted); font-size: 12px; font-weight: 600; text-align: right; border-bottom: 1px solid var(--line); }

.result-table thead th:first-child { text-align: left; }

.result-table .section-title th { padding: 8px 4px 2px; font-size: 13px; text-align: left; }

.result-table td { padding: 3px 4px; vertical-align: top; text-align: right; }

.result-table td:first-child { text-align: left; font-size: 13px; }

.result-row { border-left: 4px solid transparent; }

.result-row[data-level="danger"] { border-left-color: var(--danger); background: var(--danger-soft); }

.result-row[data-level="caution"] { border-left-color: var(--caution); background: var(--caution-soft); }

.row-play {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.row-play:disabled { cursor: default; }

.row-play:not(:disabled):hover { text-decoration: underline; }

.result-row[aria-current="true"] .row-play { color: var(--accent); text-decoration: underline; }

.count { display: block; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }

.climbed { display: block; color: var(--muted); font-size: 11px; line-height: 1.2; white-space: nowrap; }

.bar { display: block; height: 4px; margin-top: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }

.bar-fill { display: block; height: 100%; background: #6b7785; transition: width 0.4s ease-out; }

.result-row[data-level="danger"] .bar-fill { background: var(--danger); }

.result-row[data-level="caution"] .bar-fill { background: var(--caution); }

.diff { font-weight: 700; font-variant-numeric: tabular-nums; }

.diff[data-tone="up"] { color: var(--danger); }

.diff[data-tone="down"] { color: var(--safe); }

.diff[data-tone="same"] { color: #8a9299; }

.result-table tbody.small td { padding-top: 1px; padding-bottom: 1px; font-size: 12px; color: var(--muted); }

.result-table tbody.small .count { font-weight: 600; }

.result-table tbody.small .bar { height: 3px; }

.conditions { color: var(--muted); font-size: 12px; line-height: 1.5; }

.reach-list dd { font-size: 13px; }

/* Numbers that play their scenes when pressed. */
.playable { cursor: pointer; border-radius: 4px; }

.playable:hover, .playable:focus-visible { box-shadow: inset 0 0 0 1px var(--accent); outline: none; }

.playable[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); background: rgb(47 93 138 / 8%); }

.playable-name { cursor: pointer; font-weight: 700; }

/* ---- The strip under the 3D view ---- */

.playbar { padding: 8px 16px 10px; border-top: 1px solid var(--line); background: var(--surface); }

.playbar-row { display: flex; align-items: center; gap: 12px; }

.scene-play {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.scene-play .icon { width: 20px; height: 20px; }

.scene-progress { flex: 1; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }

.scene-progress-fill { display: block; width: 0; height: 100%; background: var(--accent); }

.watch-button {
  flex: none;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 18px;
  background: var(--surface);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.watch-button[aria-pressed="true"] { background: var(--accent); color: #fff; }

.watch-button:disabled { opacity: 0.5; cursor: default; }

.scene-info { margin: 6px 0 0; font-size: 14px; font-weight: 600; }

.moment-flash {
  position: absolute;
  left: 50%;
  bottom: 24px;
  max-width: 85%;
  margin: 0;
  padding: 10px 22px;
  border-radius: 12px;
  background: rgb(31 41 51 / 88%);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.moment-flash[hidden] { display: none; }

.moment-flash-in { animation: moment-in 0.25s ease-out; }

@keyframes moment-in {
  from { opacity: 0; transform: translateX(-50%) scale(0.85); }
  to { opacity: 1; transform: translateX(-50%) scale(1); }
}

/* 2026-11-05 画面を引き算した（KO）。要素とスクリプトは残し、表示だけ消している。
   戻すときは index.html の is-removed を外す（元の状態はブランチ before-simplify）。 */
.is-removed { display: none !important; }

/* KO's 「この年ごろの遊びと生活」 */
/* Below the tiles (KO 2026-11-06): the age's play and life, as a quiet note after the main tiles. */
.adjust-activities { margin: 10px 0 4px; padding: 8px 10px; border-radius: 8px; background: transparent; border: 1px dashed #e6d3ad; }
.adjust-activities-title { margin: 0 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.adjust-activities-source { margin-left: 4px; font-size: 10px; font-weight: 400; color: var(--muted); }
.adjust-activities-line { margin: 2px 0 0; font-size: 12px; line-height: 1.5; display: flex; gap: 6px; }
.adjust-activities-kind { flex: none; padding: 0 6px; border-radius: 8px; background: #f3e2bd; font-size: 11px; }
.adjust-empty { margin: 6px 0; font-size: 12px; color: var(--muted); }

/* The panel at a glance (2026-11-05): tiles with pictures; the old text lists are not shown. */
@media screen {
  .adjust-block, .adjust-lead { display: none !important; }
}
.adjust-activities { position: relative; padding-top: 10px; }
.adjust-activities-badge { position: absolute; top: -8px; right: 8px; padding: 1px 8px; border-radius: 9px; background: #d9779b; color: #fff; font-size: 10px; font-weight: 700; }
.activity-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.activity-chip, .next-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 4px; border-radius: 12px; background: #fff; border: 1px solid #f0d9a8; font-size: 12px; white-space: nowrap; }
.activity-icon { font-size: 16px; line-height: 1; }
.adjust-activities-line { align-items: flex-start; }
.adjust-activities-kind { margin-top: 3px; }
.goal-tiles { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.goal-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; border-radius: 10px; border: 2px solid var(--line); background: #fff; text-align: center; }
.goal-tile.showable { cursor: pointer; }
.goal-tile.showable:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.goal-tile[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 1px; }
.goal-tile-icon { font-size: 28px; line-height: 1.1; }
.goal-tile-name { font-size: 12px; font-weight: 700; line-height: 1.2; }
.goal-tile-badge { margin-top: 2px; padding: 1px 6px; border-radius: 9px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.goal-tile.help { border-color: #e0a000; background: #fffaeb; }
.goal-tile.help .goal-tile-badge { background: #e0a000; color: #fff; }
.goal-tile.adult { border-color: #d9779b; background: #fff3f7; }
.goal-tile.adult .goal-tile-badge { background: #d9779b; color: #fff; }
.goal-tile.can { border-color: #b9dcc6; background: #f3faf5; }
.goal-tile.can .goal-tile-badge { background: #2e8b57; color: #fff; }
.goal-tile.notyet { opacity: 0.6; }
.goal-tile.notyet .goal-tile-badge { background: #8a9299; color: #fff; }
.adjust-legend { display: flex; gap: 10px; font-size: 10px; color: var(--muted); }
.adjust-legend .lg::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 3px; border-radius: 50%; }
.adjust-legend .lg.help::before { background: #e0a000; }
.adjust-legend .lg.adult::before { background: #d9779b; }
.adjust-legend .lg.can::before { background: #2e8b57; }
.adjust-next-line { margin: 8px 0 0; display: flex; gap: 6px; align-items: center; font-size: 12px; }
.adjust-next-line:has(#adjust-next-icons:empty) { display: none; }
.next-chip { border-color: #c9d6e6; }
.next-age { font-size: 11px; color: var(--muted); margin-right: 2px; }
.adjust-warn { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px; }
.adjust-warn:empty { display: none; }
.warn-chip { padding: 2px 8px; border-radius: 12px; background: #fdecea; border: 1px solid #e5a29b; font-size: 12px; font-weight: 700; }
.adjust-activities-line[hidden] { display: none; }

/* 2026-11-05 (KO): the left toolbar is not used (it served the hundred runs); the 3D gets the room.
   The caption over the 3D shows only while a help scene is open. */
.workspace { grid-template-columns: minmax(0, 1fr) var(--panel-width); }
.help-caption[hidden] { display: none; }

/* The groups of goals under plain headings (2026-11-05, KO): no colour key needed. */
.adjust-activities-title { margin: 0 0 4px; font-size: 11px; font-weight: 700; color: #8a6d2f; }
.goal-groups { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.goal-group-head { margin: 0 0 4px; font-size: 12px; font-weight: 700; }
.goal-group.help .goal-group-head { color: #9a6b00; }
.goal-group.adult .goal-group-head { color: #b04f76; }
.goal-group.can .goal-group-head { color: #2e7a4f; }
.goal-group.notyet .goal-group-head { color: var(--muted); }
.goal-groups .goal-tiles { margin: 0; }
.goal-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.goal-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 4px; border-radius: 12px; background: #f3faf5; border: 1px solid #b9dcc6; font-size: 12px; white-space: nowrap; }
.adjust-next-kind { flex: none; padding: 0 6px; border-radius: 8px; background: #dde7f3; font-size: 11px; }
.next-chip { white-space: nowrap; }
.guide-emoji { font-size: 22px; line-height: 1; }
