/* Purpose-based palettes; status colors remain consistent across demos. */
:root {
  --ink: #202c40;
  --muted: #526078;
  --line: #d9dfe8;
  --paper: #f7f8fb;
  --primary: #344a70;
  --accent: #eaf0f8;
  --control-border: #77859a;
  --focus: #8b3f00;
  --cream: #f3eadb;
  --red: #a43a31;
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
html[data-theme="booking"] {
  --ink: #202e42;
  --muted: #536078;
  --line: #d9dfe8;
  --paper: #fcfaf7;
  --primary: #2455a4;
  --accent: #edf3fc;
  --control-border: #77859a;
}
html[data-theme="rescue"] {
  --ink: #29283b;
  --muted: #615e76;
  --line: #e0ddea;
  --paper: #faf9fc;
  --primary: #6145a3;
  --accent: #f0ecf8;
  --control-border: #898098;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
form[data-busy="true"] button[type="submit"] {
  cursor: wait;
}
.notes-workspace {
  align-items: start;
}
.notes-workspace > .panel {
  min-width: 0;
}
.notes-list .record h3 {
  overflow-wrap: anywhere;
}
.note-content {
  border-top: 0;
  padding: 0 0 12px;
}
.note-content summary {
  font-size: 13px;
}
.notes-pagination {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
  font-size: 13px;
}
.probe-steps {
  padding-left: 1.5em;
  font-size: 14px;
}
.session-status {
  margin-bottom: 8px !important;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.5;
  font-weight: 650;
  letter-spacing: 0.01em;
}
h2 {
  font-size: clamp(23px, 3vw, 32px);
  line-height: 1.5;
}
h3 {
  font-size: 20px;
  line-height: 1.6;
}
button {
  border: 0;
}
button,
.button {
  min-height: 48px;
  line-height: 1.5;
}
main {
  max-width: 1120px;
  margin: auto;
  padding: 52px 32px 80px;
}
.site-header {
  max-width: 1440px;
  min-height: 86px;
  margin: auto;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.brand-mark {
  background: var(--primary);
  color: white;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 26px;
  border-radius: 11px;
  font-family: Georgia, serif;
}
.brand-caption {
  font-size: 10px;
  letter-spacing: 0.12em;
  margin-left: 10px;
  color: var(--muted);
  font-weight: 400;
}
.site-header nav {
  display: flex;
  gap: 26px;
  font-size: 13px;
}
.site-header nav a {
  text-decoration: none;
}
.site-header nav a[aria-current] {
  border-bottom: 2px solid var(--primary);
}
.demo-banner {
  text-align: center;
  padding: 9px 20px;
  background: var(--accent);
  font-size: 12px;
  color: var(--ink);
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  margin-right: 9px;
  vertical-align: middle;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 15px;
}
.hero {
  padding: 20px 0 36px;
  max-width: 850px;
}
.hero p:not(.eyebrow) {
  max-width: 650px;
  color: var(--muted);
}
.hero h1 {
  margin-bottom: 20px;
}
.tag {
  display: inline-block;
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 4px;
  color: var(--muted);
  background: #fff;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 38px 0 24px;
}
.section-head h2 {
  margin: 0;
}
.section-head p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px #202c4006;
}
.card-body {
  min-width: 0;
  padding: 24px;
  display: flex;
  flex: 1;
  flex-direction: column;
}
.card h3 {
  margin: 10px 0;
  min-block-size: 3.2em;
  overflow-wrap: anywhere;
}
.card > .art {
  flex-shrink: 0;
}
.card-body > p:first-of-type {
  /* Let descriptions absorb spare height so dates, prices and actions align. */
  flex: 1;
}
.card p {
  color: var(--muted);
  font-size: 13px;
}
.card .button,
.card-body > button {
  margin-top: auto;
  flex-shrink: 0;
}
.card-number {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.15em;
}
.button,
button.primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 11px 22px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}
.button.secondary,
button.secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--control-border);
  border-radius: 8px;
  padding: 10px 18px;
}
.text-button {
  background: transparent;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--primary);
  font-size: 13px;
  padding: 4px 0;
  min-height: 36px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.spread {
  justify-content: space-between;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin: 10px 0 20px;
  font-size: 13px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.panel {
  background: #fff;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 24px 0;
}
.tinted {
  background: var(--accent);
}
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.steps {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 28px 0;
  gap: 14px;
}
.steps li {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 15px;
  flex: 1;
  font-size: 12px;
}
.steps b {
  margin-right: 8px;
  color: var(--primary);
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 7px;
  border: 1px solid var(--control-border);
  background: #fff;
  padding: 11px 12px;
  color: var(--ink);
  border-radius: 7px;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
.field-hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
  display: block;
}
.login-panel {
  background: var(--accent);
  padding: 22px 26px;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: center;
}
.login-panel h2 {
  font-size: 18px;
  margin-bottom: 6px;
}
.login-panel p {
  font-size: 12px;
  margin: 0;
}
.login-form {
  display: flex;
  gap: 10px;
  align-items: center;
}
.login-form select {
  margin: 0;
  min-width: 0;
}
.login-form button {
  white-space: nowrap;
}
.session {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  background: var(--accent);
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 13px;
}
.badge {
  background: #e3eddf;
  color: #335e3e;
  display: inline-block;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
}
.badge.cancelled {
  background: #eeece8;
  color: #706c66;
}
.record {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.record:first-child {
  padding-top: 0;
}
.record:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.record h3 {
  font-size: 16px;
  margin: 6px 0;
}
.record p {
  font-size: 13px;
  margin-bottom: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  background: var(--paper);
  border-radius: 8px;
}
.checks {
  list-style: none;
  padding: 0;
  margin: 0;
}
.checks li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.checks li::before {
  content: "✓";
  color: #4d794f;
  font-weight: bold;
  margin-right: 12px;
}
.checks li:last-child {
  border: 0;
}
.tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  background: var(--accent);
  border-radius: 11px;
  max-width: 540px;
  margin: 24px 0;
}
.tabs button {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  font-size: 14px;
}
.tabs button[aria-selected="true"] {
  background: white;
  color: var(--primary);
  box-shadow: 0 2px 5px #202c4010;
}
.comparison {
  padding: 14px 18px;
  border-left: 3px solid #bc9d6e;
  background: #faf5e9;
  font-size: 13px;
  margin-bottom: 24px;
}
.comparison.fixed {
  border-color: #739c71;
  background: #ecf2e8;
}
.error {
  color: var(--red);
  background: #fff1eb;
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 13px;
}
.success {
  color: #315a36;
  background: #eaf1e5;
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 13px;
}
.form-message:empty {
  display: none;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 40px 0;
}
.back {
  font-size: 13px;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 24px;
}
details {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
details p,
details li {
  font-size: 13px;
  color: var(--muted);
}
details > div {
  margin-top: 18px;
}
code {
  background: var(--accent);
  padding: 2px 5px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
footer {
  max-width: 1120px;
  margin: auto;
  border-top: 1px solid var(--line);
  padding: 25px 32px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  gap: 12px;
}
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  background: white;
  padding: 10px;
  z-index: 20;
}
.skip:focus {
  top: 10px;
}
#notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: calc(100% - 48px);
  background: var(--primary);
  color: white;
  border-radius: 10px;
  padding: 0;
  font-size: 13px;
  box-shadow: 0 6px 24px #202c4020;
}
#notice:not(:empty) {
  padding: 14px 22px;
}
.art {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #ede4d4;
}
.art::before {
  content: "";
  width: 170px;
  height: 170px;
  border: 1px solid #c5bca86b;
  border-radius: 50%;
  position: absolute;
  transform: translate(56px, -32px);
}
.art::after {
  content: "";
  width: 130px;
  height: 130px;
  border: 1px solid #c5bca86b;
  border-radius: 50%;
  position: absolute;
  transform: translate(-90px, 65px);
}
.art.coffee {
  background: #e9e1d6;
}
.art.flowers {
  background: #ebe3de;
}
.pot {
  width: 100px;
  height: 90px;
  border-radius: 14px 14px 42px 42px;
  background: linear-gradient(95deg, #b27e53, #d7aa7b 60%, #bf8c60);
  position: relative;
  transform: translateY(12px);
  box-shadow: 0 18px 20px #76502c20;
}
.pot::before {
  content: "";
  position: absolute;
  width: 100px;
  height: 26px;
  border-radius: 50%;
  top: -10px;
  background: #a87651;
  border: 8px solid #dbb18a;
}
.cup {
  width: 80px;
  height: 76px;
  border-radius: 4px 4px 24px 24px;
  background: #faf9f0;
  position: relative;
  box-shadow: 0 18px 20px #32462e15;
}
.cup::after {
  content: "";
  width: 30px;
  height: 35px;
  border: 9px solid #faf9f0;
  border-radius: 50%;
  position: absolute;
  right: -26px;
  top: 10px;
}
.cup::before {
  content: "";
  height: 13px;
  border-radius: 50%;
  position: absolute;
  left: 5px;
  right: 5px;
  top: 4px;
  background: #7a573e;
}
.flower {
  width: 65px;
  height: 65px;
  background: #b87b70;
  border-radius: 50%;
  position: relative;
  box-shadow:
    28px -12px 0 -5px #d6b3a6,
    -26px -15px 0 -4px #ce9c8b,
    14px 22px 0 -6px #e1c6b5;
  transform: translateY(-22px);
}
.flower::after {
  content: "";
  width: 6px;
  height: 85px;
  position: absolute;
  background: #76846a;
  left: 30px;
  top: 60px;
}
.hero-card {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  background: var(--accent);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  margin: 30px 0;
}
.hero-card > div {
  padding: 36px;
}
.hero-card .art {
  height: auto;
  min-height: 200px;
  background: var(--accent);
}
.hero-card h2 {
  margin-bottom: 14px;
}
.hero-card p {
  font-size: 14px;
  color: var(--muted);
}
.stamp {
  font-size: 80px;
  letter-spacing: -0.08em;
  font-family: Georgia, serif;
  color: var(--primary);
}
.consent {
  display: flex;
  gap: 10px;
  align-items: start;
  font-weight: 400;
}
.consent input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 5px;
}
.loading {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 820px) {
  .split {
    grid-template-columns: 1fr;
  }
  .login-panel {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .brand-caption {
    display: none;
  }
  .steps {
    flex-wrap: wrap;
  }
  .steps li {
    flex: 1 1 40%;
  }
}
@media (max-width: 640px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .card h3 {
    min-block-size: 0;
  }
}
@media (max-width: 520px) {
  body {
    font-size: 14px;
  }
  .site-header {
    padding: 15px 18px;
    min-height: 72px;
    gap: 10px;
  }
  .brand {
    gap: 8px;
    font-size: 13px;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 22px;
  }
  .site-header nav {
    font-size: 11px;
    gap: 14px;
  }
  .demo-banner {
    font-size: 10px;
    padding: 8px 18px;
  }
  main {
    padding: 32px 18px 50px;
  }
  .hero {
    padding: 8px 0 16px;
  }
  .hero-card {
    grid-template-columns: 1fr;
  }
  .hero-card > div {
    padding: 24px;
  }
  .hero-card .art {
    min-height: 130px;
  }
  .section-head {
    display: block;
  }
  .section-head p {
    margin-top: 10px;
  }
  .panel {
    padding: 21px 18px;
  }
  .session {
    align-items: start;
    gap: 8px;
    flex-direction: column;
  }
  .login-panel {
    padding: 20px 18px;
  }
  .login-form {
    flex-direction: column;
    align-items: stretch;
  }
  .card-body {
    padding: 22px;
  }
  .steps {
    gap: 8px;
  }
  .steps li {
    padding: 9px 10px;
    font-size: 11px;
  }
  .meta {
    font-size: 12px;
  }
  footer {
    padding: 20px 18px;
    flex-direction: column;
  }
  .row.spread {
    align-items: start;
  }
  .tabs button {
    font-size: 12px;
    padding: 10px;
  }
  .back {
    margin-bottom: 18px;
  }
}

/* Align independent rows, rather than stacking unequal text columns. */
.change-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
  margin-top: 24px;
}
.change-grid article {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.change-grid h3 { margin: 0 0 12px; font-size: 18px; }
.change-grid p { margin: 0; }
.row.spread > :is(h2, h3) { margin: 0; }
.section-head { flex-wrap: wrap; }
.panel, .card-body, .split > *, .hero-card > * { min-width: 0; }
input:not([type="checkbox"]):not([type="radio"]), select { min-height: 48px; line-height: 1.5; }
input[type="checkbox"] { accent-color: var(--primary); }
.hero-card { text-decoration: none; }
.hero-card .art { display: grid; place-items: center; }
.site-header nav { flex-wrap: wrap; }
@media (max-width: 640px) {
  .change-grid { grid-template-columns: 1fr; gap: 20px; }
  .site-header { flex-wrap: wrap; }
  .site-header nav { margin-left: auto; }
  .meta { gap: 12px; flex-wrap: wrap; }
}

/* Shared parts inherit the current demo palette. */
.ui-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  padding: 32px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 80px #10182840;
}
.ui-dialog::backdrop { background: #18203280; }
body:has(.ui-dialog[open]) { overflow: hidden; }
.ui-dialog h2 { font-size: 24px; margin-bottom: 16px; }
.ui-dialog p { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }
.ui-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
button.primary.danger { background: var(--red); }
.ui-dropdown { position: relative; padding: 0; border: 0; }
.ui-dropdown > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 48px; padding: 10px 16px; list-style: none;
  border: 1px solid var(--control-border); border-radius: 8px; background: #fff;
  color: var(--primary); font-size: 14px;
}
.ui-dropdown > summary::-webkit-details-marker { display: none; }
.ui-dropdown > summary::after { content: "⌄"; }
.ui-dropdown[open] > summary::after { content: "⌃"; }
.ui-dropdown > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.ui-dropdown > .ui-dropdown-panel {
  position: absolute; z-index: 10; right: 0; margin-top: 8px;
  width: max-content; min-width: 200px; max-width: min(320px, calc(100vw - 36px));
  padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 32px #202c401a;
}
.ui-dropdown-panel :is(a, button) {
  display: block; width: 100%; padding: 10px 14px; text-align: left;
  background: transparent; color: var(--ink); text-decoration: none; border-radius: 6px; font-size: 14px;
}
.ui-dropdown-panel :is(a, button):hover { background: var(--accent); }
.parts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.parts-grid > .panel { margin: 0; }
.ui-skeleton { height: 16px; background: var(--line); border-radius: 4px; margin: 14px 0; }
.ui-skeleton.short { width: 65%; }
.ui-loading { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.ui-spinner { width: 20px; height: 20px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: ui-spin 1s linear infinite; flex-shrink: 0; }
@keyframes ui-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ui-spinner { animation: none; } }
@media (max-width: 640px) {
  .parts-grid { grid-template-columns: 1fr; }
  .ui-dialog { padding: 24px 20px; }
  .ui-dialog-actions > button { flex: 1 1 auto; }
}

html[data-theme="improvement"] { --primary: #334767; --accent: #ecf0f6; --ink: #242e3f; --muted: #536078; --paper: #f8f9fc; }
html[data-theme="operations"] { --primary: #315d72; --accent: #eaf1f5; --ink: #24343e; --muted: #506471; --paper: #f8fafb; }
html[data-theme="ai"] { --primary: #4c4f9c; --accent: #eeeffa; --ink: #292c42; --muted: #5d617a; --paper: #fafaff; }
.workflow-inline { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end; }
.workflow-inline label { margin: 0; }
.workflow-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.table-scroll { overflow-x: auto; margin: 20px 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
caption { text-align: left; color: var(--muted); margin-bottom: 10px; }
th, td { border-bottom: 1px solid var(--line); padding: 12px; overflow-wrap: anywhere; min-width: 100px; }
th { background: var(--accent); }
#workflow-message:empty { display: none; }
.workflow-preview { margin-top: 24px; }
@media (max-width: 640px) { .workflow-inline, .workflow-columns { grid-template-columns: 1fr; } }

/* Readable controls and a dedicated navigation drawer. */
button:disabled { opacity: 1; background: #e6e9ef; color: #526078; border: 1px solid #b9c2d0; }
button.primary:disabled { background: #e6e9ef; color: #526078; }
.action-hint { margin: 10px 0 16px; padding: 10px 12px; background: var(--accent); border-radius: 8px; color: var(--ink); font-weight: 400; }
.action-hint[data-state="ready"] { background: var(--paper); }
.theme-picker { flex: 0 1 27rem; width: 27rem; max-width: 100%; margin: 0; }
.theme-picker select { width: 100%; }
select { padding-right: 38px; min-width: 0; text-overflow: clip; }
select:focus-visible, input:focus-visible, textarea:focus-visible { outline-width: 2px; outline-offset: 2px; }
.people-field { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
.people-field legend { padding: 0; font-size: 13px; font-weight: 600; }
.people-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.people-choice { margin: 0; padding: 12px 8px; min-height: 52px; border: 1px solid var(--control-border); border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.people-choice input[type="radio"] { width: 18px; height: 18px; min-height: 0; flex: 0 0 18px; margin: 0; padding: 0; accent-color: var(--primary); }
.people-choice:has(:checked) { background: var(--accent); border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.people-choice:has(:disabled) { background: #f0f1f4; color: #596276; cursor: not-allowed; border-color: var(--line); }
.people-choice small { display: block; font-size: 10px; font-weight: 400; }
.drawer-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 10px; flex-shrink: 0; }
.site-drawer { width: min(440px, calc(100% - 24px)); height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; padding: 28px; border: 0; border-left: 1px solid var(--line); color: var(--ink); background: var(--paper); overflow-y: auto; box-shadow: -12px 0 48px #202c4026; }
.site-drawer::backdrop { background: #18203280; }
body:has(.site-drawer[open]) { overflow: hidden; }
.site-drawer[open] { animation: drawer-enter 180ms ease-out; }
.drawer-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.drawer-head h2 { margin: 0; font-size: 26px; }
.drawer-head .eyebrow { font-size: 10px; margin-bottom: 8px; }
.drawer-head button { flex-shrink: 0; }
.drawer-intro { color: var(--muted); font-size: 14px; margin: 22px 0; }
.drawer-links { display: grid; gap: 8px; }
.drawer-links a { display: block; padding: 14px 16px; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.drawer-links a[aria-current="page"] { border: 2px solid var(--primary); padding: 13px 15px; background: var(--accent); }
.drawer-links a:hover { border-color: var(--primary); }
.drawer-links span { display: block; font-weight: 600; font-size: 15px; }
.drawer-links small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.drawer-parts { display: inline-block; padding: 18px 0; font-size: 14px; color: var(--primary); }
@keyframes drawer-enter { from { transform: translateX(100%); } to { transform: translateX(0); } }
@media (max-width: 820px) {
  .notes-workspace { grid-template-columns: minmax(0, 1fr); }
  .workflow-inline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-inline > button { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 640px) {
  .theme-picker { width: 100%; }
  .people-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-drawer { padding: 22px 18px; }
  .drawer-head h2 { font-size: 23px; }
  .drawer-head button { padding: 10px 14px; }
  .site-header { flex-wrap: nowrap; }
  .workflow-inline { grid-template-columns: minmax(0, 1fr); }
  .workflow-inline > button { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) { .site-drawer[open] { animation: none; } }
:root { --focus: var(--primary); }
.workflow-inline .action-hint { grid-column: 1 / -1; margin: 0; }
@media (max-width: 640px) { .section-head .theme-picker { margin-top: 20px; } }
.drawer-links a[aria-current="page"] span::after { content: "表示中"; display: inline-block; margin-left: 10px; font-size: 10px; font-weight: 400; color: var(--primary); }

/* Keep short Japanese phrases intact without preventing small-screen reflow. */
.workflow-hero { max-width: 1040px; }
.workflow-hero h1 { font-size: clamp(28px, 4.5vw, 56px); line-height: 1.5; }
.title-unit { display: inline-block; max-width: 100%; word-break: normal; overflow-wrap: anywhere; }
.status-field { padding: 0; border: 0; margin: 0; min-width: 0; }
.status-field legend { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 7px; }
.status-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.status-choice { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 8px; border: 1px solid var(--control-border); border-radius: 8px; cursor: pointer; white-space: nowrap; }
.status-choice input[type="radio"] { width: 16px; height: 16px; min-height: 0; flex: 0 0 16px; margin: 0; padding: 0; accent-color: var(--primary); }
.status-choice:has(:checked) { border-color: var(--primary); background: var(--accent); box-shadow: inset 0 0 0 1px var(--primary); }
.workflow-inline { grid-template-columns: minmax(280px, 1.2fr) minmax(180px, 1fr) auto; }
.inquiry-filters { grid-template-columns: minmax(0, 1fr) minmax(160px, 220px); }
@media (max-width: 900px) {
  .workflow-inline { grid-template-columns: minmax(0, 1fr); }
  .workflow-inline > button { justify-self: start; }
}
@media (max-width: 640px) {
  .inquiry-filters { grid-template-columns: minmax(0, 1fr); }
  .workflow-inline > button { justify-self: stretch; }
}

/* Show the few demo accounts and their permissions without hiding them in a menu. */
.account-panel { grid-template-columns: minmax(0, 1fr); gap: 24px; }
.account-summary { display: flex; justify-content: space-between; align-items: start; gap: 24px; flex-wrap: wrap; }
.account-summary > .row { gap: 18px; }
.account-field { min-width: 0; border: 0; padding: 0; margin: 0 0 16px; }
.account-field legend { font-size: 13px; font-weight: 600; margin-bottom: 10px; padding: 0; }
.account-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.account-choice { display: flex; align-items: start; gap: 10px; padding: 16px; margin: 0; border: 1px solid var(--control-border); border-radius: 10px; background: #fff; cursor: pointer; }
.account-choice input[type="radio"] { width: 18px; height: 18px; min-height: 0; flex: 0 0 18px; padding: 0; margin: 4px 0 0; accent-color: var(--primary); }
.account-choice:has(:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--paper); }
.account-copy { min-width: 0; }
.account-name { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-size: 15px; font-weight: 600; }
.account-description { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 5px; }
.account-current { font-size: 10px; font-weight: 400; color: var(--primary); border: 1px solid var(--primary); border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
.account-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.account-actions .action-hint { flex: 1 1 250px; margin: 0; background: transparent; padding: 0; }
.account-panel form > .small { margin-top: 12px; }
.permission-explanation { font-size: 14px; color: var(--muted); }
.permission-placeholder { padding: 20px; background: var(--accent); border-radius: 10px; }
.permission-placeholder p { font-size: 14px; }
@media (max-width: 760px) {
  .account-options { grid-template-columns: minmax(0, 1fr); }
  .account-choice { padding: 14px 16px; }
  .account-actions { align-items: stretch; flex-direction: column; }
  .account-actions .action-hint { flex: none; }
}

.account-panel .badge { background: #fff; color: var(--primary); border: 1px solid var(--line); }

.demo-guide { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; margin: 0 0 28px; }
.demo-guide h2 { font-size: 20px; margin-bottom: 10px; }
.demo-guide p { font-size: 14px; color: var(--muted); }
.demo-guide ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 18px 0 0; padding: 0; gap: 14px; }
.demo-guide li { display: flex; gap: 10px; font-size: 13px; align-items: start; }
.demo-guide li span { flex-shrink: 0; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--primary); font-weight: 700; }
.sample-instruction, .notice-info { background: var(--accent); color: var(--ink); padding: 14px 16px; border-radius: 8px; font-size: 14px; }
.csv-options { margin: 16px 0 20px; }
.csv-options > summary { margin-bottom: 12px; }
.question-text { margin: 14px 0 24px; padding: 14px 18px; border-left: 3px solid var(--primary); background: var(--accent); overflow-wrap: anywhere; }
.consult-next { margin-top: 40px; }
.consult-next p { color: var(--muted); font-size: 14px; }
.text-link { color: var(--primary); font-size: 14px; }
.demo-card-visual { padding: 24px; background: #edf1f8; }
.demo-card-operations .demo-card-visual { background: #eaf1f5; }
.demo-card-ai .demo-card-visual { background: #eeeffa; }
.demo-card-visual ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.demo-card-visual li { padding: 5px 8px; font-size: 11px; background: #fff; border-radius: 4px; }
.demo-card .demo-persona { font-weight: 600; color: var(--ink); }
.demo-card h2 { font-size: 23px; line-height: 1.5; margin-bottom: 14px; }
.demo-card .button { font-size: 13px; }
.demo-card .card-body > p:first-of-type { flex: none; }
.demo-card .card-body > p:last-of-type { flex: 1; }
[aria-pressed="true"][data-workflow^="customer:"] { background: var(--accent); box-shadow: inset 0 0 0 1px var(--primary); }
@media (max-width: 640px) { .demo-guide { padding: 20px 18px; } .demo-guide ol { grid-template-columns: minmax(0, 1fr); } }
