:root {
  color-scheme: light;
  --ink: #172d31;
  --ink-soft: #486064;
  --navy: #16333b;
  --navy-deep: #10292f;
  --paper: #f3efe7;
  --sheet: #fffdf8;
  --line: #d8d2c6;
  --line-dark: #b7b0a3;
  --sage: #91a582;
  --sage-soft: #e3e9da;
  --lake: #4e7d89;
  --lake-text: #3f6974;
  --lake-soft: #dce8e9;
  --cinnabar: #bd5b40;
  --cinnabar-text: #a24932;
  --cinnabar-soft: #f3dfd6;
  --gold: #b58a44;
  --gold-soft: #eee3c9;
  --shadow: 0 18px 40px rgba(25, 43, 43, 0.08);
  --shadow-soft: 0 8px 20px rgba(25, 43, 43, 0.055);
  --radius: 18px;
  --font-body: "BIZ UDPGothic", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-display: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 86% 3%, rgba(145, 165, 130, 0.16), transparent 26rem),
    linear-gradient(135deg, #f4f1eb 0%, #ece8df 100%);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
  content: "";
  pointer-events: none;
}

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

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(189, 91, 64, 0.35);
  outline-offset: 2px;
}

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

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

h1,
h2,
h3 {
  line-height: 1.25;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;
  padding: 10px 16px;
  border-radius: 8px;
  color: white;
  background: var(--cinnabar-text);
  transform: translateY(-150%);
}

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

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 264px;
  padding: 28px 22px 22px;
  overflow-y: auto;
  color: #eff3ed;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 100% 38px,
    linear-gradient(150deg, var(--navy) 0%, var(--navy-deep) 74%);
  flex-direction: column;
  box-shadow: 12px 0 35px rgba(15, 34, 38, 0.12);
}

.sidebar::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.13);
  content: "";
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 43px;
  height: 43px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50% 50% 50% 12px;
  place-items: center;
  transform: rotate(-8deg);
}

.brand-mark span {
  position: absolute;
  width: 4px;
  border-radius: 99px;
  background: #cad6bd;
  transform-origin: bottom center;
}

.brand-mark span:nth-child(1) {
  height: 18px;
  transform: translate(-7px, 1px) rotate(-24deg);
}

.brand-mark span:nth-child(2) {
  height: 24px;
  transform: translateY(-2px);
}

.brand-mark span:nth-child(3) {
  height: 15px;
  transform: translate(7px, 2px) rotate(28deg);
}

.brand-name {
  margin-bottom: 1px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-subtitle {
  margin-bottom: 0;
  color: rgba(239, 243, 237, 0.6);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.demo-ribbon {
  display: flex;
  width: fit-content;
  margin: 24px 0 20px;
  padding: 5px 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  gap: 6px;
}

.demo-ribbon span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d3916e;
  box-shadow: 0 0 0 3px rgba(211, 145, 110, 0.13);
}

.main-nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  align-items: center;
  border: 0;
  border-radius: 10px;
  color: rgba(239, 243, 237, 0.7);
  background: transparent;
  font-size: 13px;
  text-align: left;
  grid-template-columns: 32px 1fr auto;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.055);
  transform: translateX(2px);
}

.nav-item.is-active {
  color: white;
  background: rgba(255, 255, 255, 0.105);
  box-shadow: inset 3px 0 0 #d69370;
}

.nav-index {
  color: rgba(255, 255, 255, 0.62);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.nav-item.is-active .nav-index {
  color: #d9ad94;
}

.nav-count {
  min-width: 23px;
  padding: 1px 7px;
  border-radius: 99px;
  color: #d5dfcb;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
  text-align: center;
}

.sidebar-spacer {
  min-height: 30px;
  flex: 1;
}

.child-mini-card {
  display: flex;
  padding: 15px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.052);
  gap: 12px;
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--navy);
  background: #d9e0cf;
  font-family: var(--font-display);
  font-weight: 700;
  place-items: center;
}

.eyebrow {
  margin-bottom: 3px;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.child-name {
  margin-bottom: 1px;
  font-size: 13px;
  font-weight: 700;
}

.child-name small,
.child-meta {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 400;
}

.child-meta {
  margin-bottom: 0;
}

.local-note {
  display: flex;
  margin: 13px 5px 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.55;
  gap: 8px;
}

.local-note span {
  color: #86b897;
  font-size: 12px;
}

.main-area {
  min-height: 100vh;
  margin-left: 264px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  min-height: 80px;
  padding: 18px 42px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(183, 176, 163, 0.55);
  background: rgba(244, 241, 235, 0.88);
  backdrop-filter: blur(16px);
}

.breadcrumb {
  margin-bottom: 2px;
  color: #59696b;
  font-size: 12px;
}

.breadcrumb .breadcrumb-sep {
  padding: 0 4px;
  color: #6b6761;
}

.page-title {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0.04em;
}

.topbar-actions,
.section-actions,
.plan-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.save-status {
  display: flex;
  align-items: center;
  color: #59696b;
  font-size: 12px;
  gap: 6px;
}

.save-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7e9c7a;
}

.save-status.is-saving i {
  background: var(--gold);
  animation: pulse 700ms ease infinite alternate;
}

.icon-button,
.text-button,
.primary-button,
.ghost-button,
.inline-link,
.segmented-control button {
  border: 0;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  place-items: center;
  transition: border-color 160ms ease, background 160ms ease;
}

.icon-button:hover {
  border-color: var(--line-dark);
  background: white;
}

.text-button {
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  font-size: 12px;
}

.text-button.subtle {
  color: #59696b;
}

.text-button:hover {
  background: rgba(23, 45, 49, 0.055);
}

.primary-button,
.ghost-button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 18px rgba(23, 45, 49, 0.16);
}

.primary-button:hover {
  background: #24484d;
  box-shadow: 0 10px 24px rgba(23, 45, 49, 0.22);
  transform: translateY(-1px);
}

.ghost-button {
  border: 1px solid var(--line-dark);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.32);
}

.ghost-button:hover {
  background: white;
  transform: translateY(-1px);
}

.inline-link {
  padding: 4px 0;
  color: var(--lake-text);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.inline-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.view {
  max-width: 1600px;
  padding: 38px 42px 64px;
  margin: 0 auto;
}

.view[hidden] {
  display: none !important;
}

.view.is-active {
  animation: viewIn 380ms cubic-bezier(0.2, 0.75, 0.3, 1) both;
}

.section-kicker {
  margin-bottom: 10px;
  color: var(--cinnabar-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.hero-panel {
  position: relative;
  display: grid;
  min-height: 380px;
  padding: 50px 56px;
  overflow: hidden;
  border-radius: 28px;
  color: #f5f3eb;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(circle at 75% 40%, rgba(132, 167, 143, 0.25), transparent 18rem),
    linear-gradient(128deg, #18383f 0%, #122d34 72%);
  box-shadow: 0 22px 55px rgba(17, 45, 51, 0.17);
  grid-template-columns: minmax(440px, 1.1fr) 0.9fr;
}

.hero-panel::before {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  content: "";
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
}

.hero-copy h2,
.section-intro h2 {
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.1vw, 58px);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero-copy h2 em {
  position: relative;
  color: #d9e5cf;
  font-style: normal;
}

.hero-copy h2 em::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 1px;
  background: #c77a59;
  content: "";
  transform: rotate(-1deg);
}

.hero-lead {
  margin-bottom: 27px;
  color: rgba(245, 243, 235, 0.68);
  font-size: 14px;
  line-height: 1.9;
}

.hero-panel .primary-button {
  color: var(--ink);
  background: #e2e7d8;
}

.hero-panel .ghost-button {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.04);
}

.hero-panel .ghost-button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.child-switcher {
  padding: 13px 12px;
  margin: 8px 0 12px;
  border: 1px solid rgba(209, 225, 215, 0.16);
  border-radius: 14px;
  background: rgba(11, 39, 45, 0.35);
}

.child-switcher-heading {
  display: flex;
  margin-bottom: 9px;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.child-switcher-heading .eyebrow { margin: 0; color: #c2d7c9; font-size: 12px; }
.child-switcher-heading small { color: #9fb4ac; font-size: 12px; }

.child-switcher-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.child-switch-option {
  display: grid;
  padding: 7px 6px;
  align-items: center;
  border: 1px solid rgba(211, 226, 216, 0.15);
  border-radius: 9px;
  color: #c7d8d1;
  background: rgba(255, 255, 255, 0.035);
  grid-template-columns: 22px 1fr;
  text-align: left;
  transition: 160ms ease;
}

.child-switch-option:hover { border-color: rgba(211, 226, 216, 0.42); background: rgba(255, 255, 255, 0.09); }
.child-switch-option.is-active { border-color: #d8b073; color: #fff4df; background: rgba(216, 176, 115, 0.15); box-shadow: inset 3px 0 #e2875c; }
.child-switch-option > span { display: grid; width: 20px; height: 20px; border-radius: 50%; color: #1d3c3e; background: #dce8dc; font-size: 12px; font-weight: 700; place-items: center; }
.child-switch-option strong { font-size: 12px; line-height: 1.2; }
.child-switch-option small { grid-column: 2; color: #9fb4ac; font-size: 12px; line-height: 1.2; }

.add-child-button {
  width: 100%;
  padding: 8px 9px;
  margin-top: 8px;
  border: 1px dashed rgba(211, 226, 216, 0.42);
  border-radius: 9px;
  color: #d8e8dd;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  transition: 160ms ease;
}

.add-child-button:hover { border-style: solid; border-color: #e2b07b; color: #fff3e0; background: rgba(226, 176, 123, 0.12); }

.child-profile-intro .section-kicker { color: #496f83; }

.child-profile-summary {
  display: grid;
  padding: 22px 25px;
  margin-bottom: 16px;
  align-items: center;
  border-color: #cbdce2;
  background: linear-gradient(110deg, #eff6f7 0%, #fdfcf8 68%);
  grid-template-columns: minmax(250px, 0.7fr) minmax(0, 1.3fr);
  gap: 26px;
}

.profile-identity { display: flex; align-items: center; gap: 14px; }
.profile-avatar { display: grid; width: 54px; height: 54px; border: 3px solid #d6e5df; border-radius: 50%; color: #294951; background: #fcfaf4; font-family: var(--font-display); font-size: 24px; place-items: center; }
.profile-identity .eyebrow { margin-bottom: 3px; color: #577787; }
.profile-identity h3 { margin: 0 0 2px; color: #263f45; font-family: var(--font-display); font-size: 23px; }
.profile-identity p:last-child { margin: 0; color: #65736e; font-size: 12px; }

.profile-overview-list { display: grid; padding: 0; margin: 0; border-top: 1px solid #d6e2df; border-left: 1px solid #d6e2df; grid-template-columns: repeat(3, 1fr); }
.profile-overview-list div { min-height: 70px; padding: 10px 12px; border-right: 1px solid #d6e2df; border-bottom: 1px solid #d6e2df; background: rgba(255,255,255,0.52); }
.profile-overview-list dt { margin-bottom: 4px; color: #657a7b; font-size: 11px; font-weight: 700; }
.profile-overview-list dd { margin: 0; color: #334a4b; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }

.child-profile-form-card { padding: 24px 26px; margin-bottom: 18px; border-color: #d4e0dd; }
.child-profile-caution { padding: 11px 13px; margin: 0 0 17px; border-left: 3px solid #b47e48; color: #675f50; background: #fbf3e3; font-size: 12px; line-height: 1.65; }
.child-profile-fields { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.child-profile-fields > label { display: grid; gap: 5px; }
.child-profile-fields > label > span { color: #456066; font-size: 12px; font-weight: 700; }
.child-profile-fields input,
.child-profile-fields textarea { width: 100%; padding: 9px 10px; border: 1px solid #cbd8d4; border-radius: 8px; color: #283d3e; background: #fffefa; font: inherit; line-height: 1.55; }
.child-profile-fields input:focus,
.child-profile-fields textarea:focus { border-color: #547d82; outline: 3px solid rgba(84, 125, 130, 0.14); }
.child-profile-fields .full-width { grid-column: 1 / -1; }

.child-dialog { width: min(760px, calc(100vw - 30px)); }
.child-dialog form { padding: 27px 30px; }

.workflow-guide {
  padding: 21px 24px 18px;
  margin: 18px 0;
  border: 1px solid #d7dfd3;
  border-radius: 16px;
  background: linear-gradient(112deg, #f2f6ee 0%, #fcfaf5 62%);
}

.workflow-guide-heading {
  display: flex;
  margin-bottom: 17px;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.workflow-guide-heading .eyebrow {
  margin-bottom: 5px;
  color: #526b4d;
}

.workflow-guide-heading h3 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: 20px;
}

.workflow-guide-heading > p {
  max-width: 370px;
  margin: 0;
  color: #59696b;
  font-size: 12px;
  line-height: 1.7;
}

.consultation-dashboard-note {
  display: flex;
  padding: 18px 22px;
  margin: 0 0 18px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e0c4ad;
  border-radius: 14px;
  background: linear-gradient(100deg, #fff3e7, #fbfaf5 68%);
  gap: 24px;
}

.consultation-dashboard-note .eyebrow { margin-bottom: 4px; color: #a3613b; }
.consultation-dashboard-note strong { display: block; margin-bottom: 5px; color: #603d2d; font-family: var(--font-display); font-size: 18px; }
.consultation-dashboard-note span { display: block; max-width: 820px; color: #6d6259; font-size: 12px; line-height: 1.65; }
.consultation-dashboard-note .primary-button { flex: none; white-space: nowrap; }

.service-flow-board {
  padding: 21px 24px;
  margin: 0 0 18px;
  border: 1px solid #cbd7d1;
  border-radius: 16px;
  background: linear-gradient(118deg, #eef4f0 0%, #fcfaf5 64%);
}

.service-flow-heading { display: flex; margin-bottom: 16px; align-items: end; justify-content: space-between; gap: 20px; }
.service-flow-heading .eyebrow { margin-bottom: 4px; color: #4d786d; }
.service-flow-heading h3 { margin: 0; color: #263f3b; font-family: var(--font-display); font-size: 21px; }
.service-flow-heading > p { max-width: 440px; margin: 0; color: #61716d; font-size: 12px; line-height: 1.6; }

.service-flow-steps { display: grid; padding: 0; margin: 0; list-style: none; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.service-flow-steps li { position: relative; padding: 12px 11px; border: 1px solid #d6e0da; border-radius: 10px; background: rgba(255, 255, 255, 0.72); }
.service-flow-steps > li > span { display: grid; width: 22px; height: 22px; margin-bottom: 7px; border-radius: 50%; color: #fffdf8; background: #507c71; font-size: 11px; font-weight: 800; place-items: center; }
.service-flow-steps strong { display: block; margin-bottom: 4px; color: #29463f; font-size: 12px; line-height: 1.35; }
.service-flow-steps p { margin: 0 0 8px; color: #60706b; font-size: 11px; line-height: 1.55; }
.service-flow-steps .workflow-link { font-size: 11px; }
.service-flow-links { display: flex; gap: 8px; }

.workflow-steps {
  display: grid;
  padding: 0;
  margin: 0;
  list-style: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.workflow-steps li {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 14px 13px 12px;
  border: 1px solid rgba(113, 139, 108, 0.25);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.7);
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 9px;
}

.workflow-steps li::after {
  position: absolute;
  top: 29px;
  right: -9px;
  z-index: 1;
  color: #a3b3a0;
  font-size: 14px;
  content: "→";
}

.workflow-steps li:last-child::after {
  display: none;
}

.workflow-number {
  color: #547156;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
}

.workflow-steps strong {
  display: block;
  margin-bottom: 5px;
  color: #253e40;
  font-size: 13px;
}

.workflow-steps p {
  min-height: 54px;
  margin: 0 0 8px;
  color: #59696b;
  font-size: 12px;
  line-height: 1.65;
}

.workflow-link {
  padding: 0;
  border: 0;
  color: #396a6d;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.workflow-link:hover {
  color: #9d4e37;
}

.hero-visual {
  position: relative;
  min-height: 280px;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 52%;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-one {
  width: 270px;
  height: 270px;
}

.orbit-two {
  width: 185px;
  height: 185px;
  border-color: rgba(213, 226, 202, 0.16);
}

.hero-stamp {
  position: absolute;
  top: 50%;
  left: 52%;
  display: grid;
  width: 126px;
  height: 126px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
  text-align: center;
  place-content: center;
  transform: translate(-50%, -50%) rotate(-4deg);
  backdrop-filter: blur(5px);
}

.hero-stamp::before,
.hero-stamp::after {
  position: absolute;
  border: 1px solid rgba(196, 111, 81, 0.55);
  border-radius: 50%;
  content: "";
}

.hero-stamp::before {
  inset: 7px;
}

.hero-stamp::after {
  inset: 12px;
  border-style: dashed;
}

.hero-stamp span {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
}

.hero-stamp small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  letter-spacing: 0.15em;
}

.floating-note {
  position: absolute;
  display: flex;
  padding: 7px 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(11, 35, 39, 0.65);
  font-size: 12px;
  gap: 6px;
  backdrop-filter: blur(8px);
}

.floating-note i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b6c7a7;
}

.note-one {
  top: 17%;
  left: 2%;
}

.note-two {
  top: 38%;
  right: 0;
}

.note-three {
  bottom: 9%;
  left: 16%;
}

.metric-grid {
  display: grid;
  margin-top: 18px;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}

.metric-card {
  position: relative;
  min-height: 130px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(216, 210, 198, 0.82);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.72);
  box-shadow: var(--shadow-soft);
}

.metric-card::after {
  position: absolute;
  right: -13px;
  bottom: -22px;
  width: 84px;
  height: 84px;
  border: 1px solid rgba(23, 45, 49, 0.06);
  border-radius: 50%;
  content: "";
}

.metric-label {
  display: flex;
  margin-bottom: 13px;
  align-items: center;
  color: #59696b;
  font-size: 12px;
  gap: 7px;
}

.metric-label i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--lake);
}

.metric-value {
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.metric-value small {
  margin-left: 3px;
  color: #59696b;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
}

.metric-caption {
  margin-bottom: 0;
  color: #59696b;
  font-size: 12px;
}

.paper-card {
  border: 1px solid rgba(216, 210, 198, 0.9);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(23, 45, 49, 0.018) 1px, transparent 1px) 0 0 / 100% 32px,
    var(--sheet);
  box-shadow: var(--shadow-soft);
}

.dashboard-grid {
  display: grid;
  margin-top: 18px;
  gap: 18px;
  grid-template-columns: 1.15fr 0.85fr;
}

.journey-card,
.latest-card,
.domain-overview,
.progress-card,
.pattern-card,
.evidence-board,
.domain-analysis {
  padding: 26px;
}

.card-heading-row {
  display: flex;
  margin-bottom: 20px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.card-heading-row h3,
.plan-audit h3 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.03em;
}

.card-tag {
  padding: 4px 9px;
  border-radius: 99px;
  color: #526b4d;
  background: var(--sage-soft);
  font-size: 12px;
}

.card-caption {
  margin-bottom: 0;
  color: #59696b;
  font-size: 12px;
}

.journey-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.journey-list li {
  position: relative;
  display: grid;
  min-height: 60px;
  padding: 11px 0;
  align-items: center;
  border-bottom: 1px solid rgba(216, 210, 198, 0.66);
  grid-template-columns: 48px 1fr auto;
}

.journey-list li:last-child {
  border-bottom: 0;
}

.journey-number {
  color: #59696b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.journey-list strong {
  display: block;
  margin-bottom: 1px;
  font-size: 12px;
}

.journey-list small {
  color: #59696b;
  font-size: 12px;
}

.journey-status {
  padding: 4px 8px;
  border-radius: 99px;
  color: #526b4d;
  background: var(--sage-soft);
  font-size: 12px;
}

.journey-list .is-current .journey-status {
  color: #98452f;
  background: var(--cinnabar-soft);
}

.latest-item {
  display: grid;
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid rgba(216, 210, 198, 0.66);
  background: transparent;
  text-align: left;
  grid-template-columns: 48px 1fr 20px;
  gap: 10px;
}

.latest-item:last-child {
  border-bottom: 0;
}

.latest-item:hover strong {
  color: var(--lake-text);
}

.latest-date {
  display: grid;
  width: 40px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #59696b;
  background: #f7f4ed;
  font-family: var(--font-display);
  line-height: 1.1;
  text-align: center;
  place-content: center;
}

.latest-date strong {
  font-size: 16px !important;
}

.latest-date small {
  font-size: 12px !important;
}

.latest-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  transition: color 160ms ease;
}

.latest-item p {
  display: -webkit-box;
  margin-bottom: 0;
  overflow: hidden;
  color: #59696b;
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.latest-arrow {
  align-self: center;
  color: #59696b;
}

.domain-overview {
  margin-top: 18px;
}

.domain-primer {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1.38fr);
  gap: 20px;
  padding: 18px 20px;
  margin: 18px 0;
  border: 1px solid #d4dfcd;
  border-left: 4px solid var(--sage);
  border-radius: 12px;
  background: linear-gradient(105deg, #f2f6ed 0%, #fbfaf5 68%);
}

.domain-primer .eyebrow {
  margin-bottom: 6px;
  color: #526b4d;
}

.domain-primer h4 {
  margin-bottom: 7px;
  font-family: var(--font-display);
  font-size: 19px;
}

.domain-primer-intro > p:last-child {
  margin: 0;
  color: #465759;
  font-size: 13px;
  line-height: 1.75;
}

.domain-definition-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.domain-definition-list > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(121, 145, 116, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.domain-definition-list dt {
  margin-bottom: 5px;
  color: #37563b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.domain-definition-list dd {
  margin: 0;
  color: #59696b;
  font-size: 10px;
  line-height: 1.6;
}

.domain-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, 1fr);
}

.domain-mini {
  position: relative;
  min-height: 128px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbf9f3;
}

.domain-mini::after {
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--domain-color, var(--sage-soft));
  content: "";
  opacity: 0.52;
}

.domain-mini-number {
  position: relative;
  z-index: 1;
  display: flex;
  margin-bottom: 17px;
  align-items: baseline;
  gap: 3px;
}

.domain-mini-number strong {
  font-family: var(--font-display);
  font-size: 25px;
}

.domain-mini-number small {
  color: #59696b;
  font-size: 12px;
}

.domain-mini-name {
  position: relative;
  z-index: 1;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
}

.domain-mini-bar {
  position: relative;
  z-index: 1;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: #e5e1d8;
}

.domain-mini-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--domain-accent, var(--lake));
}

.section-intro {
  display: flex;
  margin-bottom: 30px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.section-intro.plan-intro {
  align-items: flex-start;
  flex-direction: column;
  gap: 18px;
}

.plan-intro .plan-actions {
  width: 100%;
  justify-content: flex-end;
}

.section-intro h2 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(31px, 3.4vw, 48px);
}

.section-intro > div:first-child > p:last-child {
  max-width: 650px;
  margin-bottom: 0;
  color: #59696b;
  font-size: 12px;
}

.filter-bar {
  display: flex;
  min-height: 62px;
  padding: 10px 14px;
  margin-bottom: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.75);
  box-shadow: var(--shadow-soft);
  gap: 9px;
}

.filter-bar select,
.search-field {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffdf8;
}

.filter-bar select {
  min-width: 148px;
  padding: 0 34px 0 12px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #738083 50%), linear-gradient(135deg, #738083 50%, transparent 50%);
  background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  font-size: 12px;
}

.search-field {
  display: flex;
  min-width: 260px;
  padding: 0 12px;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.search-field span {
  color: #59696b;
  font-size: 18px;
}

.search-field input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}

.result-count {
  min-width: 54px;
  padding-right: 4px;
  color: #59696b;
  font-size: 12px;
  text-align: right;
}

.journal-workspace {
  display: grid;
  min-height: 670px;
  gap: 16px;
  grid-template-columns: minmax(390px, 0.82fr) minmax(460px, 1.18fr);
}

.journal-list {
  display: grid;
  align-content: start;
  gap: 9px;
}

.journal-card {
  display: grid;
  width: 100%;
  min-height: 112px;
  padding: 15px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.74);
  box-shadow: 0 3px 10px rgba(23, 45, 49, 0.025);
  text-align: left;
  grid-template-columns: 52px 1fr;
  gap: 13px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.journal-card:hover {
  border-color: #b5b7ac;
  background: var(--sheet);
  transform: translateY(-1px);
}

.journal-card.is-selected {
  border-color: rgba(78, 125, 137, 0.65);
  background: var(--sheet);
  box-shadow: inset 3px 0 0 var(--lake), var(--shadow-soft);
}

.journal-card-date {
  display: grid;
  width: 50px;
  height: 55px;
  border-right: 1px solid var(--line);
  color: #506467;
  line-height: 1.05;
  place-content: center;
}

.journal-card-date small {
  font-size: 12px;
}

.journal-card-date strong {
  font-family: var(--font-display);
  font-size: 24px;
}

.journal-card-top {
  display: flex;
  margin-bottom: 5px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.journal-card-top strong {
  font-size: 14px;
}

.mood-chip {
  padding: 2px 7px;
  border-radius: 99px;
  color: #526b4d;
  background: var(--sage-soft);
  font-size: 12px;
  white-space: nowrap;
}

.journal-card p {
  display: -webkit-box;
  margin-bottom: 8px;
  overflow: hidden;
  color: #59696b;
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.domain-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.domain-chip {
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--chip-color) 45%, white);
  border-radius: 99px;
  color: color-mix(in srgb, var(--chip-color) 85%, #263335);
  background: color-mix(in srgb, var(--chip-color) 13%, white);
  font-size: 12px;
  white-space: nowrap;
}

.journal-detail {
  position: sticky;
  top: 98px;
  min-height: 620px;
  max-height: calc(100vh - 118px);
  padding: 28px 30px;
  overflow: auto;
}

.journal-detail-empty,
.empty-state {
  display: grid;
  min-height: 300px;
  color: #59696b;
  text-align: center;
  place-content: center;
}

.empty-state {
  padding: 40px 25px;
  border: 1px dashed var(--line-dark);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.35);
}

.empty-state strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
}

.empty-state p {
  margin-bottom: 13px;
  font-size: 12px;
}

.detail-heading {
  display: flex;
  padding-bottom: 18px;
  margin-bottom: 20px;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}

.detail-heading h3 {
  margin: 4px 0 5px;
  font-family: var(--font-display);
  font-size: 25px;
}

.detail-heading p {
  margin-bottom: 0;
  color: #59696b;
  font-size: 12px;
}

.detail-actions {
  display: flex;
  gap: 6px;
}

.mini-button {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #59696b;
  background: white;
  font-size: 12px;
}

.mini-button.danger:hover {
  border-color: #d3a08e;
  color: #a24932;
  background: #fff6f2;
}

.detail-meta-strip {
  display: grid;
  padding: 12px 14px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f4ed;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.detail-meta-strip span {
  color: #59696b;
  font-size: 12px;
}

.detail-meta-strip strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.detail-flow {
  display: grid;
  gap: 14px;
}

.detail-step {
  position: relative;
  padding: 0 0 0 36px;
}

.detail-step:not(:last-child)::after {
  position: absolute;
  top: 28px;
  bottom: -15px;
  left: 13px;
  width: 1px;
  background: var(--line);
  content: "";
}

.detail-step-number {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #59696b;
  background: var(--sheet);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  place-items: center;
}

.detail-step strong {
  display: block;
  margin-bottom: 4px;
  color: #59696b;
  font-size: 13px;
}

.detail-step p {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.8;
}

.detail-indicators {
  display: grid;
  padding-top: 20px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  gap: 9px;
  grid-template-columns: repeat(2, 1fr);
}

.mini-indicator {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
}

.mini-indicator span {
  color: #59696b;
  font-size: 12px;
}

.mini-indicator strong {
  color: var(--lake-text);
  font-size: 12px;
}

.mini-indicator-bar {
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: #e7e2d8;
  grid-column: 1 / -1;
}

.mini-indicator-bar i {
  display: block;
  height: 100%;
  background: var(--lake);
}

.analysis-notice {
  display: flex;
  padding: 15px 18px;
  margin-bottom: 16px;
  align-items: flex-start;
  border: 1px solid #d8cdb3;
  border-radius: 12px;
  color: #665e4d;
  background: #f5eddb;
  gap: 12px;
}

.analysis-notice > span {
  display: grid;
  width: 21px;
  height: 21px;
  border: 1px solid #baa77f;
  border-radius: 50%;
  font-family: var(--font-display);
  place-items: center;
  flex: none;
}

.analysis-notice p {
  margin-bottom: 0;
  font-size: 13px;
}

.analysis-guide {
  display: grid;
  padding: 20px 22px;
  margin-bottom: 16px;
  border: 1px solid #cddbd7;
  border-radius: 14px;
  background: linear-gradient(110deg, #edf4f1 0%, #fbfaf5 72%);
  grid-template-columns: minmax(270px, 0.78fr) minmax(0, 1.22fr);
  gap: 26px;
}

.draft-workspace {
  padding: 24px 26px;
  margin-bottom: 18px;
  border-color: #bed1c8;
  background: linear-gradient(135deg, #f4f8f4 0%, #fffdf8 68%);
}

.draft-workspace-heading {
  display: flex;
  padding-bottom: 13px;
  margin-bottom: 12px;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid #d5e0d9;
  gap: 20px;
}

.draft-workspace-heading h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 23px;
}

.draft-workspace-heading .eyebrow { margin-bottom: 5px; color: #4d786d; }

.draft-source {
  padding: 7px 10px;
  border: 1px solid #cbdad1;
  border-radius: 99px;
  color: #4c665e;
  background: #fafdF9;
  font-size: 11px;
  line-height: 1.4;
}

.draft-caution {
  padding: 10px 12px;
  margin: 0 0 16px;
  border-left: 3px solid #b28b4b;
  color: #665e4d;
  background: #f8f1df;
  font-size: 12px;
  line-height: 1.65;
}

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

.draft-field {
  display: flex;
  padding: 14px;
  border: 1px solid #d5ded8;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  flex-direction: column;
  gap: 5px;
}

.draft-field:nth-child(1),
.draft-field:nth-child(4),
.draft-field:nth-child(5),
.draft-field:nth-child(6) { grid-column: 1 / -1; }

.draft-field > span {
  color: #345449;
  font-size: 13px;
  font-weight: 700;
}

.draft-field > small { color: #66726d; font-size: 11px; }

.draft-field textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #ccd8d1;
  border-radius: 8px;
  color: #253634;
  background: #fffefa;
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}

.draft-field textarea:focus {
  border-color: #4f7f71;
  outline: 3px solid rgba(79, 127, 113, 0.15);
}

.writing-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px 9px;
  align-items: center;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid #d7e4dc;
  border-radius: 9px;
  background: #f5faf6;
}

.writing-target-label { display: flex; align-items: center; gap: 6px; min-width: 0; color: #516a65; font-size: 11px; font-weight: 700; }
.writing-tools select,
.writing-tools input { width: auto; min-width: 74px; height: 31px; padding: 0 7px; border: 1px solid #bccfc3; border-radius: 7px; background: #fffefa; font: inherit; font-size: 12px; }
.writing-tools input { min-width: 78px; }
.writing-character-count { justify-self: end; color: #62736d; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.writing-character-count[data-state="short"] { color: #9c5d42; }
.writing-character-count[data-state="over"] { color: #9c5d42; }
.writing-tools .mini-button { min-height: 31px; padding: 5px 9px; font-size: 11px; }
.writing-tools .mini-button.is-complete { color: #245844; border-color: #75a18b; background: #e7f2eb; }
.writing-tools .mini-button:disabled { cursor: wait; color: #73817c; border-color: #ccd8d1; background: #edf1ee; }
.writing-action-feedback {
  grid-column: 1 / -1;
  min-height: 0;
  color: #45615a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}
.writing-action-feedback:empty { display: none; }
.writing-action-feedback[data-state="unchanged"] { color: #6d675a; }
.writing-action-feedback[data-state="progress"] { color: #467063; }
.writing-action-feedback[data-state="error"] { color: #a24932; }
.writing-tools small { grid-column: 1 / -1; color: #718078; font-size: 10px; line-height: 1.45; }

.draft-actions {
  display: flex;
  padding-top: 16px;
  margin-top: 16px;
  justify-content: flex-end;
  border-top: 1px solid #d7e1da;
  gap: 10px;
}

.assessment-flow-note {
  display: flex;
  padding: 13px 17px;
  margin-bottom: 18px;
  align-items: center;
  border: 1px solid #d5ded8;
  border-radius: 12px;
  color: #5e6c66;
  background: #fcfbf6;
  font-size: 12px;
  gap: 10px;
}

.assessment-flow-note span,
.assessment-flow-note strong {
  padding: 5px 9px;
  border-radius: 99px;
  background: #edf2eb;
}

.assessment-flow-note strong { color: #24483e; background: #dcebe3; }
.assessment-flow-note i { color: #81948c; font-style: normal; }

.assessment-profile-strip {
  display: grid;
  padding: 0;
  margin-bottom: 16px;
  border: 1px solid #d7e1da;
  grid-template-columns: repeat(3, 1fr);
}

.assessment-profile-strip article { padding: 11px 13px; border-right: 1px solid #d7e1da; }
.assessment-profile-strip article:last-child { border-right: 0; }
.assessment-profile-strip span, .assessment-profile-strip small { display: block; color: #65746e; font-size: 11px; }
.assessment-profile-strip strong { display: block; margin: 3px 0; color: #29483f; font-size: 13px; }

.consultation-intro .section-kicker { color: #a65f36; }

.consultation-loop {
  display: flex;
  padding: 13px 17px;
  margin-bottom: 18px;
  align-items: center;
  overflow-x: auto;
  border: 1px solid #e1c7b0;
  border-radius: 12px;
  color: #765d4d;
  background: linear-gradient(100deg, #fbefe3, #fcfaf5 70%);
  font-size: 12px;
  gap: 9px;
  white-space: nowrap;
}

.consultation-loop span,
.consultation-loop strong {
  padding: 5px 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.76);
}

.consultation-loop .is-source { color: #8e4d2b; background: #f4d3bb; font-weight: 700; }
.consultation-loop strong { color: #24483e; background: #dcebe3; }
.consultation-loop i { color: #b27d5b; font-style: normal; }

.consultation-workspace {
  padding: 24px 26px;
  margin-bottom: 18px;
  border-color: #e0c4ad;
  background: linear-gradient(135deg, #fff7ef 0%, #fffdf8 64%);
}

.consultation-workspace .draft-workspace-heading { border-bottom-color: #ead5c3; }
.consultation-workspace .draft-workspace-heading .eyebrow { color: #9a5a36; }

.consultation-meta {
  display: grid;
  padding: 11px 13px;
  margin: 0 0 16px;
  border: 1px solid #ead8c8;
  border-radius: 10px;
  color: #6d6259;
  background: rgba(255, 255, 255, 0.63);
  font-size: 12px;
  grid-template-columns: auto auto 1fr;
  gap: 8px 12px;
}

.consultation-meta strong { color: #6e472f; }
.consultation-meta > span:last-child { padding-left: 12px; border-left: 1px solid #e2d4c7; line-height: 1.55; }

.consultation-profile-strip {
  display: grid;
  margin: 0 0 16px;
  border: 1px solid #ead8c8;
  grid-template-columns: 0.7fr 1.5fr 1fr;
}

.consultation-profile-strip article { padding: 11px 13px; border-right: 1px solid #ead8c8; }
.consultation-profile-strip article:last-child { border-right: 0; }
.consultation-profile-strip span,
.consultation-profile-strip small { display: block; color: #796a60; font-size: 11px; }
.consultation-profile-strip strong { display: block; margin: 3px 0; color: #6e472f; font-size: 13px; }

.consultation-section {
  padding: 18px 0;
  border-top: 1px solid #ead8c8;
}

.consultation-section:first-child { padding-top: 0; border-top: 0; }

.consultation-section-heading {
  display: grid;
  margin-bottom: 12px;
  align-items: start;
  grid-template-columns: 28px 1fr;
  gap: 9px;
}

.consultation-section-heading > span {
  display: grid;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: #fffaf5;
  background: #b66942;
  font-size: 11px;
  font-weight: 800;
  place-items: center;
}

.consultation-section-heading h4 { margin: 0 0 2px; color: #6e472f; font-family: var(--font-display); font-size: 18px; }
.consultation-section-heading p { margin: 0; color: #74675d; font-size: 12px; line-height: 1.55; }
.consultation-fields .draft-field:nth-child(1),
.consultation-fields .draft-field:nth-child(4),
.consultation-fields .draft-field:nth-child(5),
.consultation-fields .draft-field:nth-child(6) { grid-column: auto; }
.consultation-fields .draft-field:has([data-draft-path="overallGoal"]),
.consultation-fields .draft-field:has([data-draft-path="oneYearVision"]),
.consultation-fields .draft-field:has([data-draft-path="currentSituation"]),
.consultation-fields .draft-field:has([data-draft-path="serviceNeed"]),
.consultation-fields .draft-field:has([data-draft-path="dayServiceRole"]),
.consultation-fields .draft-field:has([data-draft-path="considerations"]) { grid-column: 1 / -1; }

.assessment-consultation-link,
.plan-origin-note {
  display: grid;
  padding: 11px 13px;
  margin: 0 0 16px;
  border-left: 3px solid #c67b4e;
  color: #665d52;
  background: #fff7ee;
  font-size: 12px;
  line-height: 1.6;
  grid-template-columns: 1fr;
  gap: 4px;
}

.assessment-consultation-link strong,
.plan-origin-note strong { color: #814a2d; }
.assessment-consultation-link span,
.plan-origin-note span { min-width: 0; overflow-wrap: anywhere; }
.assessment-consultation-link .inline-link,
.plan-origin-note .inline-link { margin-left: 0; justify-self: start; white-space: nowrap; }

.contact-book-intro .section-kicker { color: #93616c; }

.contact-book-flow {
  display: flex;
  padding: 13px 17px;
  margin-bottom: 18px;
  align-items: center;
  overflow-x: auto;
  border: 1px solid #dfcbd0;
  border-radius: 12px;
  color: #735f64;
  background: linear-gradient(100deg, #fbf0f2, #fcfaf5 70%);
  font-size: 12px;
  gap: 9px;
  white-space: nowrap;
}

.contact-book-flow span,
.contact-book-flow strong { padding: 5px 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.74); }
.contact-book-flow strong { color: #744957; background: #f1dfe4; }
.contact-book-flow i { color: #ad7b87; font-style: normal; }

.contact-book-board { padding: 24px 26px; margin-bottom: 18px; border-color: #dfcbd0; background: linear-gradient(135deg, #fff8f8 0%, #fffdf9 65%); }
.contact-book-list { display: grid; gap: 11px; }

.contact-book-entry {
  display: grid;
  padding: 16px;
  border: 1px solid #e3d5d8;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.73);
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 18px;
}

.contact-book-entry.is-reflected { border-color: #c7d8c8; background: #f8fbf7; }
.contact-book-date { padding-right: 13px; border-right: 1px solid #eadde0; }
.contact-book-date strong { display: block; color: #704752; font-family: var(--font-display); font-size: 16px; }
.contact-book-date span { display: inline-block; padding: 3px 7px; margin-top: 6px; border-radius: 99px; color: #865560; background: #f5e5e8; font-size: 11px; }
.contact-book-entry.is-reflected .contact-book-date span { color: #4b7250; background: #dfebdc; }
.contact-book-message span,
.contact-book-reply span { display: block; margin-bottom: 4px; color: #8c6069; font-size: 11px; font-weight: 700; }
.contact-book-reply span { color: #4c706e; }
.contact-book-message p,
.contact-book-reply p,
.contact-book-request p { margin: 0; color: #594f4e; font-size: 13px; line-height: 1.7; }
.contact-book-request { padding-top: 11px; border-top: 1px solid #eadde0; grid-column: 2 / -1; }
.contact-book-request strong { color: #6d4750; font-size: 12px; }
.contact-book-request p { margin: 3px 0 7px; }
.contact-book-request .inline-link[disabled] { color: #7e9180; text-decoration: none; cursor: default; }

.analysis-guide .eyebrow {
  margin-bottom: 6px;
  color: #47767b;
}

.analysis-guide h3 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.35;
}

.analysis-guide-intro > p:last-child {
  margin: 0;
  color: #526467;
  font-size: 13px;
  line-height: 1.75;
}

.analysis-steps {
  display: grid;
  padding: 0;
  margin: 0;
  list-style: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.analysis-steps li {
  display: grid;
  padding: 11px 10px;
  border: 1px solid rgba(77, 128, 132, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.64);
  grid-template-columns: 24px 1fr;
  gap: 8px;
}

.analysis-steps > li > span {
  display: grid;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fffdf7;
  background: var(--lake);
  font-size: 11px;
  font-weight: 800;
  place-items: center;
}

.analysis-steps strong {
  display: block;
  margin-bottom: 3px;
  color: #29464a;
  font-size: 12px;
}

.analysis-steps p {
  margin: 0;
  color: #59696b;
  font-size: 11px;
  line-height: 1.55;
}

.analysis-range-card {
  display: grid;
  padding: 18px 20px;
  margin-bottom: 16px;
  align-items: end;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 22px;
}

.analysis-range-card h3 {
  margin-bottom: 3px;
  font-family: var(--font-display);
  font-size: 17px;
}

.analysis-range-card p:last-child {
  margin-bottom: 0;
  color: #59696b;
  font-size: 12px;
}

.analysis-range-fields {
  display: flex;
  align-items: flex-end;
  justify-self: end;
  gap: 8px;
}

.analysis-range-fields button {
  min-width: max-content;
  white-space: nowrap;
}

.analysis-range-fields label {
  display: grid;
  gap: 4px;
}

.analysis-range-fields label span {
  color: #59696b;
  font-size: 12px;
  font-weight: 700;
}

.analysis-range-fields input {
  height: 40px;
  padding: 0 9px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfaf6;
}

.analysis-grid {
  display: grid;
  margin-bottom: 16px;
  gap: 16px;
  grid-template-columns: 1.05fr 0.95fr;
}

.legend {
  display: flex;
  align-items: center;
  color: #59696b;
  font-size: 12px;
  gap: 5px;
}

.comparison-key {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: #59696b;
  font-size: 11px;
  gap: 12px;
}

.comparison-key > span {
  display: grid;
  align-items: center;
  grid-template-columns: 9px auto;
  column-gap: 4px;
}

.comparison-key i {
  width: 9px;
  height: 4px;
  border-radius: 99px;
  background: #bbc6c3;
}

.comparison-key > span:nth-child(2) i {
  background: var(--lake);
}

.comparison-key strong {
  color: #445557;
  font-size: 11px;
}

.comparison-key small {
  grid-column: 2;
  font-size: 10px;
  white-space: nowrap;
}

.legend i {
  width: 10px;
  height: 4px;
  border-radius: 99px;
  background: #bbc6c3;
}

.legend i:nth-of-type(2) {
  margin-left: 6px;
  background: var(--lake);
}

.indicator-chart {
  display: grid;
  gap: 20px;
}

.indicator-scale-note {
  padding: 10px 11px;
  margin: 4px 0 16px;
  border-left: 3px solid #9eb5b1;
  color: #59696b;
  background: #f2f6f4;
  font-size: 11px;
  line-height: 1.7;
}

.indicator-scale-note strong {
  color: #3f5d60;
}

.indicator-row {
  display: grid;
  align-items: center;
  grid-template-columns: 120px minmax(0, 1fr) 96px;
  gap: 12px;
}

.indicator-row-label strong {
  display: block;
  margin-bottom: 1px;
  font-size: 12px;
}

.indicator-row-label small {
  display: block;
  color: #59696b;
  font-size: 12px;
}

.indicator-row-label em {
  display: block;
  margin-top: 2px;
  color: #708082;
  font-size: 10px;
  font-style: normal;
}

.dual-bars {
  display: grid;
  gap: 4px;
}

.bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #eeeae2;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #bac5c1;
  transition: width 600ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.bar-track:last-child span {
  background: var(--lake);
}

.indicator-delta {
  display: grid;
  padding: 6px 7px;
  border-radius: 8px;
  color: #526b4d;
  background: var(--sage-soft);
  gap: 2px;
  text-align: center;
}

.indicator-delta small {
  color: #617660;
  font-size: 9px;
}

.indicator-delta strong {
  color: #4c684b;
  font-size: 11px;
  line-height: 1.3;
}

.indicator-delta.is-flat {
  color: #59696b;
  background: #ece9e2;
}

.indicator-row.is-unrated .bar-track {
  background: repeating-linear-gradient(135deg, #ebe7de 0 5px, #f7f4ee 5px 10px);
}

.pattern-list {
  display: grid;
  gap: 9px;
}

.pattern-caption {
  margin: -2px 0 12px;
  color: #59696b;
  font-size: 12px;
  line-height: 1.65;
}

.pattern-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbf9f4;
  grid-template-columns: 30px 1fr;
  gap: 10px;
}

.pattern-icon {
  display: grid;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--lake-text);
  background: var(--lake-soft);
  font-family: var(--font-display);
  font-size: 12px;
  place-items: center;
}

.pattern-item strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}

.pattern-item p {
  margin-bottom: 0;
  color: #59696b;
  font-size: 12px;
  line-height: 1.65;
}

.pattern-item-body {
  min-width: 0;
}

.pattern-plan-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0;
  margin-top: 9px;
  border: 0;
  border-bottom: 1px solid #769b9e;
  color: #244d54;
  background: transparent;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
}

.pattern-plan-link:hover {
  color: var(--lake);
  border-bottom-color: var(--lake);
}

.pattern-item.is-unconfirmed {
  border-style: dashed;
  background: #f6f3ec;
}

.pattern-item.is-unconfirmed .pattern-icon {
  color: #53615f;
  background: #e8e4da;
}

.evidence-board,
.domain-analysis {
  margin-top: 16px;
}

.evidence-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, 1fr);
}

.evidence-card {
  position: relative;
  min-height: 168px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbf9f3;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease;
}

.evidence-card:hover {
  border-color: #aab6b3;
  transform: translateY(-2px);
}

.evidence-card-date {
  display: block;
  margin-bottom: 9px;
  color: var(--cinnabar-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.evidence-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
}

.evidence-card p {
  display: -webkit-box;
  margin-bottom: 10px;
  overflow: hidden;
  color: #59696b;
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.evidence-card small {
  color: #59696b;
  font-size: 12px;
}

.domain-analysis-list {
  display: grid;
  gap: 0;
}

.domain-analysis-row {
  display: grid;
  padding: 15px 0;
  align-items: start;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 168px 90px 1fr;
  gap: 20px;
}

.domain-analysis-row:last-child {
  border-bottom: 0;
}

.domain-analysis-name {
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
}

.domain-analysis-name i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--row-color);
}

.domain-analysis-count {
  color: #59696b;
  font-size: 12px;
}

.domain-analysis-summary {
  margin-bottom: 0;
  color: #59696b;
  font-size: 12px;
}

.title-with-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-with-badge p {
  margin-bottom: 0;
}

.title-with-badge span {
  padding: 3px 8px;
  border-radius: 99px;
  color: #a04d36;
  background: var(--cinnabar-soft);
  font-size: 12px;
}

.segmented-control {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.42);
}

.segmented-control button {
  min-width: 53px;
  height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  color: #59696b;
  background: transparent;
  font-size: 12px;
  /* iOS Safari: タップ後に残る hover/focus 状態や UA の既定描画で、選んでいないタブが濃く塗られないようにする */
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
}

.segmented-control button:not(.is-active):hover,
.segmented-control button:not(.is-active):focus,
.segmented-control button:not(.is-active):active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: none;
}

.segmented-control button.is-active {
  color: white;
  background: var(--ink);
  box-shadow: 0 4px 10px rgba(23, 45, 49, 0.14);
}

.plan-layout {
  display: grid;
  align-items: start;
  gap: 16px;
  grid-template-columns: 270px minmax(0, 1fr);
}

.plan-source-guide {
  display: grid;
  padding: 20px 22px;
  margin-bottom: 16px;
  border: 1px solid #d4e0dd;
  border-radius: 14px;
  background: linear-gradient(105deg, #f0f6f4 0%, #fcfbf7 72%);
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
}

.plan-source-guide .eyebrow {
  margin-bottom: 6px;
  color: #47767b;
}

.plan-source-guide h3 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.4;
}

.plan-source-guide-intro > p:last-child {
  margin: 0;
  color: #536568;
  font-size: 13px;
  line-height: 1.7;
}

.plan-source-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.plan-source-card {
  padding: 13px 15px;
  border: 1px solid rgba(73, 116, 113, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
}

.plan-source-card.is-human {
  border-color: #dfd2bb;
  background: #fdf9f0;
}

.plan-source-label {
  margin-bottom: 8px;
  color: #31575a;
  font-size: 12px;
  font-weight: 800;
}

.plan-source-card.is-human .plan-source-label {
  color: #796343;
}

.plan-source-card ul {
  display: grid;
  padding: 0;
  margin: 0;
  list-style: none;
  color: #5b696a;
  font-size: 12px;
  gap: 5px;
}

.plan-source-card li::before {
  margin-right: 6px;
  color: #4e8683;
  content: "✓";
}

.plan-source-card.is-human li::before {
  color: #a07849;
  content: "○";
}

.plan-source-caution {
  grid-column: 1 / -1;
  padding-top: 10px;
  margin: -4px 0 0;
  border-top: 1px solid rgba(105, 128, 125, 0.18);
  color: #635c4f;
  font-size: 12px;
  line-height: 1.65;
}

.journal-candidate-badge {
  display: inline-block;
  padding: 2px 6px;
  margin-left: 5px;
  border-radius: 99px;
  color: #47706c;
  background: #e4efec;
  font-size: 12px;
  font-weight: 700;
  vertical-align: 1px;
}

.plan-audit {
  position: sticky;
  top: 98px;
  padding: 22px;
}

.audit-score-wrap {
  display: flex;
  margin-bottom: 18px;
  align-items: center;
  gap: 12px;
}

.audit-ring {
  --score: 0deg;
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: conic-gradient(var(--sage) var(--score), #e8e3da 0);
  place-content: center;
}

.audit-ring::after {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--sheet);
  content: "";
}

.audit-ring strong,
.audit-ring small {
  position: relative;
  z-index: 1;
}

.audit-ring strong {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1;
}

.audit-ring small {
  font-size: 12px;
}

.plan-audit h3 {
  font-size: 15px;
}

.checklist {
  display: grid;
  gap: 7px;
}

.check-item {
  display: grid;
  padding: 8px 0;
  align-items: start;
  border-bottom: 1px solid rgba(216, 210, 198, 0.65);
  grid-template-columns: 19px 1fr;
  gap: 7px;
}

.check-item:last-child {
  border-bottom: 0;
}

.check-icon {
  display: grid;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  color: white;
  background: #839f80;
  font-size: 12px;
  place-items: center;
}

.check-item.is-warning .check-icon {
  color: #8b5737;
  background: var(--gold-soft);
}

.check-item.is-error .check-icon {
  color: #98452f;
  background: var(--cinnabar-soft);
}

.check-item strong {
  display: block;
  font-size: 12px;
}

.check-item small {
  display: block;
  color: #59696b;
  font-size: 12px;
  line-height: 1.5;
}

.human-review-note {
  display: flex;
  padding: 11px;
  margin-top: 17px;
  border: 1px solid #dccbb0;
  border-radius: 9px;
  color: #6e614d;
  background: #f7efdf;
  gap: 8px;
}

.human-review-note > span {
  display: grid;
  width: 17px;
  height: 17px;
  border: 1px solid #c0a779;
  border-radius: 50%;
  font-size: 12px;
  place-items: center;
  flex: none;
}

.human-review-note p {
  margin-bottom: 0;
  font-size: 12px;
  line-height: 1.6;
}

.human-review-note strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}

.plan-editor {
  display: grid;
  gap: 14px;
}

.plan-preview-notice {
  display: flex;
  padding: 17px 20px;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #b9d0c6;
  border-radius: 14px;
  background: linear-gradient(110deg, #edf5ef 0%, #fbfaf5 72%);
  gap: 20px;
}

.plan-preview-notice .eyebrow {
  margin-bottom: 5px;
  color: #477067;
}

.plan-preview-notice h3 {
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-size: 20px;
}

.plan-preview-notice p:last-child {
  margin: 0;
  color: #586a63;
  font-size: 13px;
}

.plan-layout.is-preview {
  grid-template-columns: minmax(0, 1fr);
}

.editor-section {
  padding: 25px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--sheet);
  box-shadow: var(--shadow-soft);
}

.editor-section-heading {
  display: flex;
  margin-bottom: 19px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.editor-section-heading h3 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: 18px;
}

.editor-section-index {
  color: #59696b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.editor-section-note {
  color: #59696b;
  font-size: 12px;
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}

.form-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-stack {
  display: grid;
  margin-top: 14px;
  gap: 14px;
}

.form-grid label,
.form-stack label,
.goal-fields label,
.indicator-fields label {
  display: grid;
  gap: 6px;
}

.form-grid label > span,
.form-stack label > span,
.goal-fields label > span,
.indicator-fields label > span,
.domain-fieldset legend,
.indicator-fieldset legend,
.support-domain-fieldset legend {
  color: #59696b;
  font-size: 12px;
  font-weight: 700;
}

label b,
legend b {
  color: var(--cinnabar-text);
  font-size: 12px;
}

.editor-section input,
.editor-section textarea,
.editor-section select,
.journal-dialog input,
.journal-dialog textarea,
.journal-dialog select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfaf6;
  font-size: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.editor-section input,
.editor-section select,
.journal-dialog input,
.journal-dialog select {
  height: 41px;
  padding: 0 11px;
}

.editor-section textarea,
.journal-dialog textarea {
  min-height: 78px;
  padding: 10px 11px;
  line-height: 1.7;
  resize: vertical;
}

.editor-section input:focus,
.editor-section textarea:focus,
.editor-section select:focus,
.journal-dialog input:focus,
.journal-dialog textarea:focus,
.journal-dialog select:focus {
  border-color: var(--lake);
  background: white;
  box-shadow: 0 0 0 3px rgba(78, 125, 137, 0.11);
  outline: 0;
}

.support-goal-card {
  position: relative;
  padding: 20px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf8f2;
}

.support-goal-card:last-child {
  margin-bottom: 0;
}

.support-goal-heading {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.support-goal-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.priority-badge {
  display: grid;
  width: 29px;
  height: 29px;
  border-radius: 9px;
  color: white;
  background: var(--ink);
  font-family: var(--font-display);
  place-items: center;
}

.support-goal-title strong {
  display: block;
  font-size: 12px;
}

.support-goal-title small {
  color: #59696b;
  font-size: 12px;
}

.goal-fields {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}

.goal-fields .full-width {
  grid-column: 1 / -1;
}

.domain-toggle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.support-domain-fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

.domain-toggle {
  position: relative;
}

.domain-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.domain-toggle span {
  display: inline-flex;
  min-height: 29px;
  padding: 0 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: #59696b;
  background: white;
  font-size: 12px;
  transition: all 150ms ease;
}

.domain-toggle input:checked + span {
  border-color: var(--toggle-color);
  color: color-mix(in srgb, var(--toggle-color) 70%, var(--ink));
  background: color-mix(in srgb, var(--toggle-color) 13%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--toggle-color) 22%, transparent);
}

.domain-toggle input:focus-visible + span {
  outline: 3px solid rgba(189, 91, 64, 0.3);
  outline-offset: 2px;
}

.evidence-links {
  display: flex;
  margin-top: 14px;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.evidence-links > span {
  margin-right: 3px;
  color: #59696b;
  font-size: 12px;
}

.evidence-link {
  padding: 3px 7px;
  border: 1px solid #c8d5d6;
  border-radius: 99px;
  color: #41666e;
  background: #eef4f3;
  font-size: 12px;
}

.evidence-link:hover {
  background: #e2edec;
}

.evidence-picker {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.evidence-picker summary {
  display: flex;
  padding: 11px 2px 5px;
  align-items: center;
  justify-content: space-between;
  color: #435d61;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.evidence-picker summary span {
  padding: 2px 8px;
  border-radius: 99px;
  color: #365f67;
  background: var(--lake-soft);
  font-size: 12px;
}

.evidence-option-list {
  display: grid;
  max-height: 280px;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  gap: 3px;
}

.evidence-option {
  display: grid;
  padding: 8px;
  align-items: start;
  border-radius: 7px;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  cursor: pointer;
}

.evidence-option:hover {
  background: #f1f5f2;
}

.evidence-option input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
}

.evidence-option strong,
.evidence-option small {
  display: block;
}

.evidence-option strong {
  margin-bottom: 2px;
  font-size: 12px;
}

.evidence-option small {
  color: #59696b;
  font-size: 12px;
  line-height: 1.5;
}

.add-goal-button {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  border: 1px dashed var(--line-dark);
  border-radius: 10px;
  color: #59696b;
  background: transparent;
  font-size: 12px;
}

.add-goal-button:hover {
  color: var(--ink);
  background: #f7f4ed;
}

.plan-document {
  max-width: 1120px;
  min-height: 790px;
  padding: 42px;
  margin: 0 auto;
  border: 1px solid #cbc4b7;
  color: #192426;
  background: #fff;
  box-shadow: 0 22px 55px rgba(23, 45, 49, 0.13);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 12px;
  line-height: 1.55;
}

.plan-summary-document {
  display: grid;
  max-width: 1120px;
  min-height: 0;
  gap: 17px;
  background: linear-gradient(135deg, #fff 0%, #fbfcf8 100%);
}

.summary-document-header {
  display: grid;
  padding-bottom: 14px;
  border-bottom: 2px solid #1d2a2c;
  gap: 20px;
  grid-template-columns: 1fr auto;
}

.summary-kicker {
  margin: 0 0 4px;
  color: #668076;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.summary-document-header h2,
.summary-section-heading h3,
.summary-linked-support h3 {
  margin: 0;
  color: #172d31;
  font-family: var(--font-display);
}

.summary-document-header h2 {
  font-size: 28px;
  letter-spacing: 0.08em;
}

.summary-document-header > div > p:last-child {
  margin: 4px 0 0;
  color: #586a63;
}

.summary-document-meta {
  display: grid;
  min-width: 285px;
  padding: 10px 13px;
  border: 1px solid #d5ddd2;
  background: #f4f7f1;
  gap: 2px 12px;
  grid-template-columns: auto 1fr;
}

.summary-document-meta span {
  color: #647168;
  font-size: 10px;
}

.summary-document-meta strong {
  color: #273c3a;
  font-size: 11px;
}

.summary-intentions {
  display: grid;
  border: 1px solid #d8ded4;
  grid-template-columns: 1fr 1fr;
}

.summary-intentions article {
  padding: 11px 13px;
  border-right: 1px solid #d8ded4;
}

.summary-intentions article:nth-child(2) { border-right: 0; }

.summary-intentions .summary-policy {
  border-top: 1px solid #d8ded4;
  border-right: 0;
  background: #f7f8f3;
  grid-column: 1 / -1;
}

.summary-intentions span,
.summary-linked-cards span {
  color: #65766c;
  font-size: 10px;
  font-weight: 700;
}

.summary-intentions p,
.summary-linked-cards p {
  margin: 3px 0 0;
  color: #263634;
}

.summary-support-section {
  padding: 0;
}

.summary-section-heading,
.summary-linked-support {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.summary-section-heading { margin-bottom: 8px; }

.summary-section-heading h3,
.summary-linked-support h3 { font-size: 18px; }

.summary-section-heading > p {
  margin: 0 0 2px;
  color: #62736d;
  font-size: 10px;
}

.summary-support-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.summary-support-table th,
.summary-support-table td {
  padding: 7px 8px;
  border: 1px solid #77817e;
  vertical-align: top;
}

.summary-support-table th {
  color: #314743;
  background: #eaf0eb;
  font-size: 10px;
  text-align: left;
}

.summary-support-table th:nth-child(1) { width: 6%; text-align: center; }
.summary-support-table th:nth-child(2) { width: 20%; }
.summary-support-table th:nth-child(3) { width: 29%; }
.summary-support-table th:nth-child(4) { width: 35%; }
.summary-support-table th:nth-child(5) { width: 10%; text-align: center; }

.summary-support-table td { font-size: 11px; line-height: 1.45; }
.summary-support-table td strong { display: block; color: #233937; font-size: 11px; }
.summary-support-table td small { display: block; margin-top: 2px; color: #60716a; font-size: 9px; }
.summary-support-table .summary-priority { color: #45685f; font-weight: 700; text-align: center; }
.summary-support-table td:last-child { text-align: center; }

.summary-more-items { margin: 6px 0 0; color: #5d6d68; font-size: 10px; }

.summary-linked-support {
  padding-top: 11px;
  border-top: 1px solid #d8ded4;
  align-items: center;
}

.summary-linked-cards {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(3, 1fr);
}

.summary-linked-cards article {
  min-height: 58px;
  padding: 7px 10px;
  border-left: 1px solid #d8ded4;
}

.summary-linked-cards p { font-size: 10px; line-height: 1.45; }

.summary-document-footer {
  display: flex;
  padding-top: 8px;
  border-top: 1px solid #aebbb2;
  color: #56645f;
  font-size: 9px;
  line-height: 1.45;
  justify-content: space-between;
  gap: 20px;
}

.summary-document-footer p { margin: 0; }
.summary-document-footer strong { color: #2a5147; }
.summary-document-footer span { white-space: nowrap; }

.document-header {
  position: relative;
  display: grid;
  padding-bottom: 14px;
  margin-bottom: 10px;
  align-items: end;
  border-bottom: 2px solid #1d2a2c;
  grid-template-columns: 1fr auto;
}

.document-header h2 {
  margin-bottom: 3px;
  font-family: var(--font-display);
  font-size: 25px;
  letter-spacing: 0.12em;
}

.document-header p {
  margin-bottom: 0;
  color: #5e696a;
  font-size: 12px;
}

.draft-stamp {
  position: absolute;
  top: -12px;
  left: 48%;
  padding: 4px 12px;
  border: 2px solid rgba(174, 74, 49, 0.58);
  color: rgba(174, 74, 49, 0.68);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.17em;
  transform: rotate(-7deg);
}

.document-meta {
  text-align: right;
}

.document-meta strong {
  display: block;
  font-size: 12px;
}

.document-table {
  width: 100%;
  margin-bottom: 9px;
  border-collapse: collapse;
  table-layout: fixed;
}

.document-table th,
.document-table td {
  padding: 6px 7px;
  border: 1px solid #475254;
  vertical-align: top;
}

.document-table th {
  width: 110px;
  background: #eef0ec;
  font-weight: 700;
  text-align: left;
}

.document-table.support-table {
  font-size: 12px;
}

.document-table.support-table th {
  width: auto;
  text-align: center;
}

.document-table.support-table td {
  padding: 5px;
}

.document-table.support-table .document-continuation-identity th {
  padding: 4px 6px;
  color: #39484a;
  background: #f7f5ef;
  font-weight: 600;
  text-align: left;
}

.document-continuation-identity span:last-child {
  float: right;
}

.document-section-label {
  margin: 12px 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.document-domain-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.document-domain-list span {
  padding: 1px 3px;
  border: 1px solid #aab0ad;
  background: #f4f4f1;
  white-space: nowrap;
}

.document-signatures {
  display: grid;
  margin-top: 12px;
  border: 1px solid #475254;
  grid-template-columns: repeat(4, 1fr);
}

.document-signatures div {
  min-height: 54px;
  padding: 5px;
  border-right: 1px solid #475254;
}

.document-signatures div:last-child {
  border-right: 0;
}

.document-signatures span {
  display: block;
  margin-bottom: 13px;
  font-size: 12px;
}

.document-footer-note {
  margin: 8px 0 0;
  color: #555f60;
  font-size: 12px;
}

.document-evidence {
  display: block;
  margin-top: 5px;
  color: #555f60;
  font-size: 12px;
  line-height: 1.45;
}

.document-stale-banner {
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 2px solid #98452f;
  color: #7f3828;
  background: #f8e5df;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.print-page-identity {
  display: none;
}

.support-na-toggle {
  display: inline-block;
  margin: 12px 0 2px;
}

dialog {
  width: min(780px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-dark);
  border-radius: 18px;
  color: var(--ink);
  background: var(--sheet);
  box-shadow: 0 28px 80px rgba(15, 39, 45, 0.3);
}

dialog::backdrop {
  background: rgba(12, 31, 36, 0.56);
  backdrop-filter: blur(4px);
}

.journal-dialog form,
.pattern-plan-dialog form,
.guide-dialog {
  padding: 28px;
}

.pattern-plan-dialog {
  width: min(720px, calc(100vw - 30px));
}

.pattern-source-summary {
  padding: 17px 18px;
  border: 1px solid #d2e0dc;
  border-radius: 10px;
  background: #f3f7f3;
}

.pattern-source-summary .eyebrow {
  margin-bottom: 5px;
  color: #47767b;
}

.pattern-source-summary h3 {
  margin-bottom: 7px;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.4;
}

.pattern-source-summary p,
.dialog-guidance {
  margin: 0;
  color: #536568;
  font-size: 13px;
  line-height: 1.75;
}

.pattern-source-summary .pattern-source-evidence {
  margin-top: 9px;
  color: #35636a;
  font-weight: 700;
}

.dialog-guidance {
  margin: 16px 0;
}

.pattern-plan-fields {
  gap: 15px;
}

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

.dialog-heading h2 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: 24px;
}

.domain-fieldset,
.indicator-fieldset {
  padding: 15px;
  margin: 16px 0 0;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.domain-fieldset legend,
.indicator-fieldset legend {
  padding: 0 6px;
}

.indicator-fieldset legend small {
  color: #59696b;
  font-weight: 400;
}

#journal-domain-options,
.indicator-fields {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(5, 1fr);
}

#journal-domain-options .domain-toggle span {
  width: 100%;
  min-height: 38px;
  padding: 4px 6px;
  justify-content: center;
  border-radius: 8px;
  text-align: center;
  white-space: normal;
}

.indicator-fields {
  grid-template-columns: repeat(4, 1fr);
}

.indicator-fields label > span {
  min-height: 28px;
}

.dialog-actions {
  display: flex;
  padding-top: 20px;
  margin-top: 22px;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  gap: 9px;
}

.guide-dialog {
  width: min(610px, calc(100vw - 30px));
}

.guide-steps {
  display: grid;
  padding: 0;
  margin: 0;
  gap: 10px;
  list-style: none;
}

.guide-steps li {
  display: grid;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #faf8f2;
  grid-template-columns: 30px 1fr;
  gap: 10px;
}

.guide-steps li > span {
  display: grid;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  color: white;
  background: var(--ink);
  font-family: var(--font-display);
  place-items: center;
}

.guide-steps strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}

.guide-steps p {
  margin-bottom: 0;
  color: #59696b;
  font-size: 12px;
}

.guide-caution {
  padding: 11px 13px;
  margin-top: 14px;
  border: 1px solid #d9c7a7;
  border-radius: 9px;
  color: #6b5d48;
  background: #f5ecd9;
  font-size: 12px;
}

.guide-caution strong {
  margin-right: 7px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: 340px;
  padding: 12px 16px;
  border-radius: 10px;
  color: white;
  background: var(--ink);
  box-shadow: 0 12px 35px rgba(15, 39, 45, 0.28);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes revealIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

.reveal {
  animation: revealIn 560ms cubic-bezier(0.2, 0.75, 0.3, 1) both;
}

.delay-1 { animation-delay: 70ms; }
.delay-2 { animation-delay: 140ms; }
.delay-3 { animation-delay: 210ms; }

@media (max-width: 1180px) {
  .sidebar { width: 232px; padding-right: 17px; padding-left: 17px; }
  .main-area { margin-left: 232px; }
  .view, .topbar { padding-right: 28px; padding-left: 28px; }
  .hero-panel { padding: 44px 40px; grid-template-columns: 1.2fr 0.8fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .evidence-grid { grid-template-columns: repeat(2, 1fr); }
  .plan-layout { grid-template-columns: 235px minmax(0, 1fr); }
  .goal-fields { grid-template-columns: 1fr; }
  .goal-fields .full-width { grid-column: auto; }
}

@media (max-width: 930px) {
  .sidebar {
    position: sticky;
    top: 0;
    display: grid;
    width: 100%;
    height: auto;
    padding: 12px 18px;
    overflow: visible;
    align-items: center;
    grid-template-columns: 1fr auto;
  }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 17px; }
  .brand-subtitle, .demo-ribbon, .child-mini-card, .local-note, .sidebar-spacer { display: none; }
  /* ブランドの右隣に置くので、利用児のボタンと「＋」を1行に収める */
  .child-switcher { display: flex; padding: 0; margin: 0; border: 0; background: transparent; align-items: center; gap: 4px; }
  .child-switcher-heading { display: none; }
  .child-switcher-options { display: flex; gap: 4px; }
  .child-switch-option { min-width: 30px; min-height: 30px; padding: 4px; grid-template-columns: 1fr; place-items: center; }
  .child-switch-option > span { width: 19px; height: 19px; font-size: 12px; }
  .child-switch-option strong, .child-switch-option small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .add-child-button { width: 30px; min-height: 30px; padding: 0; margin: 0; overflow: hidden; color: transparent; font-size: 0; }
  .add-child-button::before { color: #d8e8dd; content: "+"; font-size: 18px; }
  .main-nav { display: flex; grid-column: 1 / -1; margin-top: 9px; gap: 4px; }
  .nav-item { min-height: 35px; padding: 0 9px; justify-content: center; grid-template-columns: auto auto; gap: 5px; }
  .nav-index, .nav-count { display: none; }
  .main-area { margin-left: 0; }
  .topbar { top: 87px; min-height: 66px; padding-top: 12px; padding-bottom: 12px; }
  .journal-detail, .plan-audit { top: 169px; }
  .hero-panel { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .dashboard-grid, .analysis-grid, .journal-workspace { grid-template-columns: 1fr; }
  .workflow-steps { grid-template-columns: repeat(2, 1fr); }
  .workflow-steps li:nth-child(2)::after { display: none; }
  .plan-source-guide { grid-template-columns: 1fr; }
  .analysis-guide { grid-template-columns: 1fr; }
  .comparison-key { justify-content: flex-start; }
  .domain-primer { grid-template-columns: 1fr; }
  .domain-definition-list { grid-template-columns: repeat(3, 1fr); }
  .analysis-range-card { grid-template-columns: 1fr; align-items: flex-start; }
  .analysis-range-fields { justify-self: start; flex-wrap: wrap; }
  .journal-detail { position: static; max-height: none; }
  .domain-strip { grid-template-columns: repeat(3, 1fr); }
  .plan-layout { grid-template-columns: 1fr; }
  .plan-audit { position: static; }
  .checklist { grid-template-columns: repeat(2, 1fr); }
  .plan-preview-notice { align-items: flex-start; flex-direction: column; }
  .consultation-dashboard-note { align-items: flex-start; flex-direction: column; }
  .service-flow-steps { grid-template-columns: repeat(3, 1fr); }
  .child-profile-summary { grid-template-columns: 1fr; }
  .profile-overview-list { grid-template-columns: repeat(3, 1fr); }
  .consultation-meta { grid-template-columns: auto 1fr; }
  .consultation-meta > span:last-child { padding-top: 8px; padding-left: 0; border-top: 1px solid #e2d4c7; border-left: 0; grid-column: 1 / -1; }
  .consultation-profile-strip { grid-template-columns: 1fr; }
  .consultation-profile-strip article { border-right: 0; border-bottom: 1px solid #ead8c8; }
  .consultation-profile-strip article:last-child { border-bottom: 0; }
  .contact-book-entry { grid-template-columns: 1fr 1fr; }
  .contact-book-date { padding: 0 0 10px; border-right: 0; border-bottom: 1px solid #eadde0; grid-column: 1 / -1; }
  .contact-book-request { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  body { font-size: 13px; }
  .sidebar { padding: 10px 12px; }
  .main-nav { overflow-x: auto; }
  .nav-item { min-width: max-content; padding: 0 12px; font-size: 12px; }
  .topbar { top: 81px; padding: 10px 16px; }
  .assessment-consultation-link, .plan-origin-note { align-items: flex-start; flex-direction: column; }
  .assessment-consultation-link .inline-link, .plan-origin-note .inline-link { margin-left: 0; }
  .contact-book-entry { grid-template-columns: 1fr; }
  .service-flow-heading { align-items: flex-start; flex-direction: column; }
  .service-flow-steps { grid-template-columns: 1fr; }
  .profile-overview-list { grid-template-columns: 1fr; }
  .child-profile-fields { grid-template-columns: 1fr; }
  .child-dialog form { padding: 22px 18px; }
  .breadcrumb, .text-button#reset-demo { display: none; }
  .page-title { font-size: 17px; }
  .save-status { display: none; }
  .view { padding: 23px 16px 45px; }
  .hero-panel { min-height: 350px; padding: 36px 25px; border-radius: 20px; }
  .hero-copy h2 { font-size: 38px; }
  .hero-lead br { display: none; }
  .hero-actions, .section-actions, .plan-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .workflow-guide { padding: 19px 18px; }
  .workflow-guide-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .workflow-steps { grid-template-columns: 1fr; }
  .workflow-steps li::after { display: none; }
  .hero-actions button, .section-actions button, .plan-actions > button, .segmented-control { width: 100%; }
  .metric-grid, .domain-strip, .evidence-grid { grid-template-columns: 1fr; }
  .domain-definition-list { grid-template-columns: 1fr; }
  .metric-card { min-height: 105px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .journey-card, .latest-card, .domain-overview, .progress-card, .pattern-card, .evidence-board, .domain-analysis { padding: 20px; }
  .section-intro { align-items: flex-start; flex-direction: column; }
  .section-intro h2 { font-size: 34px; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .search-field, .filter-bar select { width: 100%; min-width: 0; }
  .result-count { width: 100%; text-align: left; }
  .journal-workspace { min-height: auto; }
  .journal-detail { padding: 22px 18px; }
  .detail-heading { flex-direction: column; }
  .detail-meta-strip { grid-template-columns: 1fr; }
  .indicator-row { grid-template-columns: 1fr 96px; }
  .indicator-row .dual-bars { grid-column: 1 / -1; grid-row: 2; }
  .domain-analysis-row { grid-template-columns: 1fr; gap: 5px; }
  .analysis-range-fields { width: 100%; align-items: stretch; justify-self: stretch; flex-direction: column; }
  .analysis-steps { grid-template-columns: 1fr; }
  .plan-source-columns { grid-template-columns: 1fr; }
  .analysis-range-fields > span { display: none; }
  .analysis-range-fields input, .analysis-range-fields button { width: 100%; }
  .writing-tools { grid-template-columns: 1fr 1fr; }
  .writing-target-label, .writing-character-count { grid-column: 1 / -1; }
  .writing-target-label { align-items: stretch; flex-direction: column; }
  .writing-tools select, .writing-tools input { width: 100%; }
  .writing-tools .mini-button { width: 100%; }
  .writing-character-count { justify-self: start; }
  .plan-intro { align-items: stretch; }
  .segmented-control button { flex: 1; }
  .checklist { grid-template-columns: 1fr; }
  .editor-section { padding: 21px 18px; }
  .form-grid, .form-grid.compact { grid-template-columns: 1fr; }
  .support-goal-card { padding: 15px; }
  .goal-fields { grid-template-columns: 1fr; }
  .plan-document { padding: 18px; overflow-x: auto; font-size: 12px; }
  .document-header { grid-template-columns: 1fr; }
  .document-meta { margin-top: 7px; text-align: left; }
  .document-table { min-width: 690px; }
  .document-table:not(.support-table) { min-width: 560px; }
  .document-signatures { min-width: 650px; }
  .journal-dialog form, .pattern-plan-dialog form, .guide-dialog { padding: 21px 17px; }
  #journal-domain-options { grid-template-columns: repeat(2, 1fr); }
  .indicator-fields { grid-template-columns: repeat(2, 1fr); }
  .card-heading-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-delay: 0ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 8mm 8mm 12mm;

    @bottom-right {
      content: "ページ " counter(page) " / " counter(pages);
      color: #39484a;
      font-size: 6.5pt;
    }
  }

  html,
  body {
    min-width: 0;
    background: white !important;
  }

  body::before,
  .skip-link,
  .sidebar,
  .topbar,
  .view:not(#view-plan),
  .plan-intro,
  .plan-source-guide,
  .plan-preview-notice,
  .plan-audit,
  #plan-editor,
  .toast {
    display: none !important;
  }

  .main-area {
    margin: 0 !important;
  }

  #view-plan {
    display: block !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .plan-layout,
  .plan-main {
    display: block !important;
  }

  #plan-preview,
  #plan-detail-preview,
  .plan-document {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    font-size: 7.5pt !important;
  }

  #plan-detail-preview {
    display: none !important;
  }

  body.print-detail-plan #plan-preview {
    display: none !important;
  }

  body.print-detail-plan #plan-detail-preview {
    display: block !important;
  }

  .plan-summary-document {
    padding: 0 !important;
    font-size: 8pt !important;
    line-height: 1.35 !important;
  }

  .summary-document-header { padding-bottom: 8px; gap: 14px; }
  .summary-kicker { margin-bottom: 2px; font-size: 7pt; }
  .summary-document-header h2 { font-size: 20pt; }
  .summary-document-header > div > p:last-child { margin-top: 2px; font-size: 8pt; }
  .summary-document-meta { min-width: 235px; padding: 6px 8px; gap: 1px 8px; }
  .summary-document-meta span { font-size: 7pt; }
  .summary-document-meta strong { font-size: 8pt; }
  .summary-intentions article { padding: 6px 8px; }
  .summary-intentions span, .summary-linked-cards span { font-size: 7pt; }
  .summary-intentions p, .summary-linked-cards p { margin-top: 2px; font-size: 8pt; line-height: 1.35; }
  .summary-section-heading { margin-bottom: 5px; }
  .summary-section-heading h3, .summary-linked-support h3 { font-size: 13pt; }
  .summary-section-heading > p { margin-bottom: 1px; font-size: 7pt; }
  .summary-support-table th, .summary-support-table td { padding: 4px 5px; }
  .summary-support-table th { font-size: 7pt; }
  .summary-support-table td, .summary-support-table td strong { font-size: 8pt; line-height: 1.3; }
  .summary-support-table td small { margin-top: 1px; font-size: 6.5pt; }
  .summary-more-items { margin-top: 4px; font-size: 7pt; }
  .summary-linked-support { padding-top: 7px; }
  .summary-linked-cards article { min-height: 0; padding: 5px 7px; }
  .summary-document-footer { padding-top: 5px; font-size: 6.5pt; gap: 10px; }

  .document-table:not(.support-table),
  .document-signatures {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .support-table {
    page-break-inside: auto;
    break-inside: auto;
  }

  .support-table thead {
    display: table-header-group;
  }

  .support-table tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .document-table th,
  .document-table td {
    padding: 4px 5px !important;
  }

  .support-table th,
  .support-table td {
    padding: 3px 4px !important;
  }

  .document-signatures div {
    min-height: 42px;
    padding: 4px;
  }

  .document-signatures span {
    margin-bottom: 6px;
  }

  .document-footer-note {
    font-size: 6.5pt !important;
    line-height: 1.35;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .print-page-identity {
    position: fixed;
    right: 0;
    bottom: -8mm;
    left: 0;
    display: flex !important;
    padding-top: 1.5mm;
    border-top: 0.25mm solid #687274;
    color: #39484a;
    font-size: 6.5pt;
    font-style: normal;
    line-height: 1.2;
    justify-content: space-between;
  }

  .print-page-number {
    font-style: normal;
  }

  .print-page-number::after {
    content: "文書識別情報";
  }

  .document-section-label {
    page-break-after: avoid;
    break-after: avoid;
  }

  .draft-stamp {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}


/* ==========================================================================
   そだちノート由来の画面部品(利用児一覧・実績・請求・加算チェック・設定・AI下書き)
   ========================================================================== */
.today-board { padding: 22px 26px; margin-bottom: 18px; }
.kpi-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.kpi-tile { display: grid; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.55); text-align: left; gap: 4px; cursor: pointer; transition: border-color 160ms ease, transform 160ms ease; }
.kpi-tile:hover { border-color: var(--lake); transform: translateY(-1px); }
.kpi-label { color: var(--ink-soft); font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; }
.kpi-value { font-family: var(--font-display); font-size: 26px; line-height: 1.1; color: var(--navy); }
.kpi-value small { margin-left: 4px; font-family: var(--font-body); font-size: 11px; color: var(--ink-soft); }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-actions .primary-button, .quick-actions .ghost-button { min-height: 38px; padding: 0 14px; font-size: 12.5px; }
.primary-button.full { width: 100%; justify-content: center; }
.ghost-button.danger { color: var(--cinnabar-text); border-color: #d3a08e; }
.ghost-button.danger:hover { background: #fff6f2; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th, .data-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: middle; }
.data-table th { color: var(--ink-soft); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; }
.data-table th small { display: block; font-weight: 400; color: #7c8a88; }
.data-table th.num, .data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td.left, .data-table th.left { text-align: left; }
.data-table td.actions { text-align: right; }
.data-table td.actions .mini-button { margin-left: 4px; }
.data-table tr.is-active td { background: rgba(78, 125, 137, 0.08); }
.data-table tr.total td { border-top: 2px solid var(--line-dark); }
.data-table td.plus { color: #2f7a5d; } .data-table td.minus { color: var(--cinnabar-text); }
.num-input { width: 78px; padding: 5px 7px; border: 1px solid #ccd8d1; border-radius: 7px; background: #fffefa; text-align: right; }
.code-input { width: 90px; padding: 5px 7px; border: 1px solid #ccd8d1; border-radius: 7px; background: #fffefa; }
.name-input { min-width: 200px; padding: 5px 7px; border: 1px solid #ccd8d1; border-radius: 7px; background: #fffefa; }
.master-table select { padding: 4px 6px; border: 1px solid #ccd8d1; border-radius: 7px; background: #fffefa; font-size: 12px; }

.status-tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.status-tag.ok { color: #526b4d; background: var(--sage-soft); }
.status-tag.warn { color: #7a5a22; background: var(--gold-soft); }
.status-tag.error { color: var(--cinnabar-text); background: var(--cinnabar-soft); }
.status-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.status-row:last-child { border-bottom: 0; }
.status-row .status-icon { display: grid; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; color: white; background: #839f80; font-size: 12px; font-weight: 700; line-height: 1; place-items: center; }
.status-row .status-icon.warn { color: #8b5737; background: var(--gold-soft); }
.status-row .status-icon.error { color: #98452f; background: var(--cinnabar-soft); }
.status-row .status-icon.info { color: var(--navy); background: var(--sage-soft); }
.status-row strong { display: block; font-size: 13.5px; }
.status-row p { margin: 3px 0 0; color: #59696b; font-size: 12.5px; line-height: 1.6; }
.check-summary { margin: 0 0 8px; font-size: 13.5px; }
.sub-heading { margin: 16px 0 8px; font-family: var(--font-display); font-size: 15px; letter-spacing: 0.03em; }
.hint-text { color: #59696b; font-size: 12px; line-height: 1.6; }
.status-line { margin: 10px 0 0; padding: 9px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.6; background: #f2f5f4; color: #3f4f51; overflow-wrap: anywhere; }
.status-line.ok { background: #eef8f1; color: #24593a; }
.status-line.warn { background: #fff6f2; color: var(--cinnabar-text); }
.caution-note { margin: 10px 0; padding: 10px 13px; border-left: 3px solid #b47e48; color: #675f50; background: #fbf3e3; font-size: 12px; line-height: 1.65; border-radius: 0 8px 8px 0; }
.month-field { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.month-field > span { white-space: nowrap; }
.section-actions .month-field { flex: none; }
.section-actions button { white-space: nowrap; }
.bill-nav { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 18px; width: fit-content; max-width: 100%; }
.bill-nav button { flex: 1 1 auto; min-width: 0; padding: 0 12px; white-space: nowrap; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip-button { padding: 6px 12px; border: 1px solid var(--line-dark); border-radius: 9px; background: rgba(255, 255, 255, 0.42); font-size: 12.5px; font-weight: 600; }
.chip-button:hover { border-color: var(--lake); color: var(--lake-text); background: white; }

.record-intake, .family-report, .plan-ai, .share-board { padding: 22px 26px; margin-bottom: 22px; }
.intake-grid, .plan-ai-grid { display: grid; gap: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.intake-label { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.intake-label > span { color: #345449; font-size: 12.5px; font-weight: 700; }
.intake-label input, .intake-label select, .intake-label textarea { width: 100%; padding: 9px 10px; border: 1px solid #ccd8d1; border-radius: 8px; background: #fffefa; font: inherit; line-height: 1.6; }
.memo-log { display: flex; flex-direction: column; gap: 6px; min-height: 120px; max-height: 260px; padding: 12px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: rgba(23, 45, 49, 0.03); }
.memo-log.tall { min-height: 160px; max-height: 320px; }
.memo-bubble { max-width: 86%; padding: 9px 13px; border-radius: 13px; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
.memo-bubble small { display: block; margin-top: 3px; color: #7c8a88; font-size: 10.5px; text-align: right; }
.memo-bubble.me { align-self: flex-end; background: var(--lake-soft); border-bottom-right-radius: 4px; }
.memo-bubble.bot { align-self: flex-start; background: white; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.memo-input-row { display: flex; gap: 8px; margin-top: 10px; }
.memo-input-row input { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid #ccd8d1; border-radius: 8px; background: #fffefa; font: inherit; }
.memo-input-row .primary-button { min-height: 40px; padding: 0 16px; }
.memo-tools { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.mic-wrap { text-align: center; padding: 6px 0 4px; }
.mic-button { width: 74px; height: 74px; border: 0; border-radius: 50%; color: white; background: var(--navy); font: inherit; font-size: 15px; font-weight: 700; letter-spacing: 0.08em; cursor: pointer; box-shadow: 0 8px 24px rgba(22, 51, 59, 0.28); transition: transform 160ms ease; }
.mic-button:hover { transform: translateY(-1px); }
.mic-button.is-recording { background: var(--cinnabar); animation: micPulse 1.3s infinite; }
.mic-button:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
@keyframes micPulse { 0% { box-shadow: 0 0 0 0 rgba(189, 91, 64, 0.45); } 70% { box-shadow: 0 0 0 16px rgba(189, 91, 64, 0); } 100% { box-shadow: 0 0 0 0 rgba(189, 91, 64, 0); } }
.ai-output { margin-top: 12px; padding: 14px 16px; border: 1px solid #cfdad2; border-radius: 12px; background: #f4f7f1; }
.ai-output pre { margin: 0; white-space: pre-wrap; font: inherit; font-size: 13px; line-height: 1.75; }
.ai-output textarea { width: 100%; padding: 9px 10px; border: 1px solid #ccd8d1; border-radius: 8px; background: #fffefa; font: inherit; font-size: 13px; line-height: 1.7; resize: vertical; }

.attendance-list { display: grid; gap: 10px; }
.attendance-row { padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--line-dark); border-radius: 10px; background: rgba(255, 255, 255, 0.55); }
.attendance-row.is-present { border-left-color: var(--sage); }
.attendance-row.is-absent { border-left-color: var(--cinnabar); }
.attendance-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.attendance-head strong { font-size: 14px; }
.attendance-head small { color: var(--ink-soft); }
.attendance-head .segmented-control { margin-left: auto; }
.attendance-detail { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin-top: 10px; }
.attendance-detail label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--ink-soft); font-weight: 700; }
.attendance-detail input[type="time"] { padding: 7px 8px; border: 1px solid #ccd8d1; border-radius: 8px; background: #fffefa; min-width: 108px; }
.check-pill { flex-direction: row !important; align-items: center !important; gap: 7px !important; min-height: 38px; padding: 0 12px; border: 1px solid var(--line-dark); border-radius: 9px; background: rgba(255, 255, 255, 0.42); color: var(--ink) !important; cursor: pointer; }
.check-pill:has(input:checked) { background: var(--lake-soft); border-color: var(--lake); }
.check-pill input { width: 18px; height: 18px; accent-color: var(--lake); }

.sheet { font-size: 12px; }
.sheet-title { margin: 0 0 10px; font-family: var(--font-display); font-size: 16px; text-align: center; letter-spacing: 0.04em; }
.sheet-head { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; margin: 0 0 12px; padding: 0; }
.sheet-head div { display: flex; gap: 8px; padding: 4px 2px; border-bottom: 1px solid var(--line); }
.sheet-head dt { margin: 0; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.sheet-head dd { margin: 0; }
.sheet-table th, .sheet-table td { padding: 4px 6px; text-align: center; }
.sheet-table tr.sun td { color: #b3362b; } .sheet-table tr.sat td { color: #2b62b3; }
.sheet-foot { display: flex; flex-wrap: wrap; gap: 18px; margin: 10px 0 0; font-weight: 700; }

.profile-subheading { margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line-dark); }
.profile-subheading h4 { margin: 0 0 2px; font-family: var(--font-display); font-size: 14.5px; letter-spacing: 0.03em; }
.profile-subheading p { margin: 0; color: #59696b; font-size: 11.5px; }
.child-profile-fields select { padding: 9px 10px; border: 1px solid #ccd8d1; border-radius: 8px; background: #fffefa; font: inherit; }
.dialog-details { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: rgba(23, 45, 49, 0.02); }
.dialog-details summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: #345449; }
.dialog-details .form-grid { margin-top: 10px; }

.netbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; padding: 9px 14px; font-size: 12.5px; font-weight: 700; text-align: center; line-height: 1.5; color: white; background: #8a6410; }
.netbar.update { border: 0; width: 100%; cursor: pointer; background: var(--navy); font: inherit; font-weight: 700; }

@media (max-width: 930px) {
  .intake-grid, .plan-ai-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .section-intro .section-actions { flex-wrap: wrap; }
  .today-board, .record-intake, .family-report, .plan-ai, .share-board { padding: 16px 16px; }
  .quick-actions .primary-button, .quick-actions .ghost-button { flex: 1 1 calc(50% - 8px); }
  .attendance-head .segmented-control { margin-left: 0; width: 100%; }
  .attendance-head .segmented-control button { flex: 1; }
}
@media print {
  .record-intake, .family-report, .plan-ai, .netbar { display: none !important; }
}

/* ===== 元プロトタイプ(みちのーと)の見た目を保つための調整 ===== */
/* サイドバー: 元の8項目はそのまま。追加した5画面は「対象児童」の下に補助ナビとして置く。
   モバイル(930px以下)では元と同じ1本の横スクロール帯に合流させる */
.nav-strip { display: contents; }
/* 09〜15 は 01〜08 の直後に続ける(デモ用の利用児切り替えはサイドバー上部へ移した) */
.sub-nav { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.sub-nav-title { margin: 0 0 6px 12px; color: rgba(255, 255, 255, 0.55); font-size: 10.5px; letter-spacing: 0.16em; }
.sidebar .sub-nav-title { color: rgba(255, 255, 255, 0.55); }
@media (max-width: 930px) {
  .nav-strip { display: flex; grid-column: 1 / -1; margin-top: 9px; gap: 4px; }
  .nav-strip .main-nav { display: contents; }
  .sub-nav-title { display: none; }
}
@media (max-width: 680px) {
  .nav-strip { overflow-x: auto; }
}

/* 日誌: メモ・音声の下書きカードはヒーローの「メモ・音声から下書き」で開く */
#toggle-intake.is-active { border-color: var(--lake); color: var(--lake); background: rgba(78, 125, 137, 0.08); }
.record-intake { margin-top: 0; }

/* 追加画面の入力欄は、元の入力欄(editor-section / journal-dialog)と同じ見た目にそろえる */
:is(#view-attendance, #view-billing, #view-addonCheck, #view-children, #view-settings, #view-forms, #view-schedule, #view-reservation, .record-intake, .family-report, .contact-daily, .plan-ai, .share-board)
  :is(select, textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"])) {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfaf6;
  font-size: 14px;
  font-weight: 400;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
:is(#view-attendance, #view-billing, #view-addonCheck, #view-children, #view-settings, #view-forms, #view-schedule, #view-reservation, .record-intake, .family-report, .contact-daily, .plan-ai, .share-board)
  :is(select, input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"])) {
  height: 41px;
  padding: 0 11px;
}
:is(#view-attendance, #view-billing, #view-addonCheck, #view-children, #view-settings, #view-forms, #view-schedule, #view-reservation, .record-intake, .family-report, .contact-daily, .plan-ai, .share-board) textarea {
  padding: 10px 11px;
  line-height: 1.7;
  resize: vertical;
}
:is(#view-attendance, #view-billing, #view-addonCheck, #view-children, #view-settings, #view-forms, #view-schedule, #view-reservation, .record-intake, .family-report, .contact-daily, .plan-ai, .share-board) select {
  padding-right: 34px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #738083 50%), linear-gradient(135deg, #738083 50%, transparent 50%);
  background-position: calc(100% - 15px) 18px, calc(100% - 10px) 18px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}
:is(#view-attendance, #view-billing, #view-addonCheck, #view-children, #view-settings, #view-forms, #view-schedule, #view-reservation, .record-intake, .family-report, .contact-daily, .plan-ai, .share-board)
  :is(select, textarea, input):focus {
  border-color: var(--lake);
  background: white;
  box-shadow: 0 0 0 3px rgba(78, 125, 137, 0.11);
  outline: 0;
}
/* マスタの表と出欠の時刻欄は行の高さに合わせて小さめに */
#view-settings .master-table :is(select, input) { height: 32px; padding: 0 7px; font-size: 12px; }
#view-settings .master-table select { padding-right: 24px; background-position: calc(100% - 12px) 13px, calc(100% - 7px) 13px; }
#view-attendance .attendance-row input[type="time"] { height: 36px; }
@media (max-width: 680px) {
  .section-actions .month-field { width: 100%; display: flex; }
  .section-actions .month-field :is(input, select) { flex: 1; min-width: 0; }
}
/* 追加画面: 縦に並ぶカードの間隔(元の画面はグリッドの gap で空いている) */
:is(#view-children, #view-attendance, #view-billing, #view-addonCheck, #view-settings, #view-forms, #view-schedule) > .paper-card { margin-bottom: 18px; }
:is(#view-children, #view-attendance, #view-billing, #view-addonCheck, #view-settings, #view-forms, #view-schedule) .paper-card > .section-actions { margin-top: 16px; }

/* スマートフォン: 横一列の流れ図は折り返し、文字数表示も枠内に収める */
@media (max-width: 680px) {
  .consultation-loop, .contact-book-flow { flex-wrap: wrap; overflow: visible; white-space: normal; row-gap: 6px; }
  .consultation-loop > *, .contact-book-flow > * { flex: none; }
  .writing-character-count { justify-self: start; max-width: 100%; white-space: normal; }
  /* iOS Safari では横スクロールする segmented-control の中で、選んでいないタブに濃い塗りが残る描画不良が出るため、
     スクロールさせず折り返す(全タブが常に見えるので操作もしやすい)。影も外して合成レイヤーを増やさない */
  .segmented-control.bill-nav { display: flex; flex-wrap: wrap; gap: 3px; overflow: visible; width: 100%; }
  .segmented-control.bill-nav button { flex: 1 1 auto; white-space: nowrap; transition: none; }
  .segmented-control.bill-nav button.is-active { box-shadow: none; }
}

/* スマートフォン: 相談支援案・アセスメント・モニタリングの下書き欄は1列にする(2列では入力欄が潰れて縦書きになる) */
@media (max-width: 680px) {
  .draft-fields { grid-template-columns: 1fr; }
  .draft-field:nth-child(n) { grid-column: auto; }
  .assessment-profile-strip { grid-template-columns: 1fr; }
  .assessment-profile-strip article { border-right: 0; border-bottom: 1px solid #d7e1da; }
  .assessment-profile-strip article:last-child { border-bottom: 0; }
}

/* ===== 帳票出力(forms-view) ===== */
.form-sheet-wrap { overflow-x: auto; }
.form-sheet { min-width: 760px; padding: 18px 20px; border: 1px solid #c9cfcb; background: white; color: #172d31; font-size: 11.5px; line-height: 1.55; }
.form-sheet .fs-title { margin: 0 0 10px; font-size: 16px; font-weight: 700; text-align: center; letter-spacing: 0.08em; }
.form-sheet .fs-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; margin: 0 0 8px; font-size: 11px; }
.form-sheet .fs-h { margin: 8px 0 3px; font-size: 11px; font-weight: 700; }
.form-sheet .fs-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.form-sheet .fs-table th, .form-sheet .fs-table td { padding: 3px 5px; border: 1px solid #333; font-size: 10px; text-align: left; vertical-align: top; white-space: pre-wrap; overflow-wrap: anywhere; }
.form-sheet .fs-table th { background: #f3f3f3; font-weight: 700; text-align: center; }
.form-sheet .fs-table td.c { text-align: center; }
.form-sheet .fs-table td.lbl { background: #f7f7f7; font-weight: 700; }
.form-sheet .fs-box { min-height: 62px; padding: 4px 6px; border: 1px solid #333; font-size: 10.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.form-sheet .fs-box.tall { min-height: 120px; }
.form-sheet .fs-ck { display: inline-block; margin-right: 6px; white-space: nowrap; }
.form-sheet .fs-ck i { margin-right: 2px; font-size: 12px; font-style: normal; }
.form-sheet .fs-cards { display: grid; grid-template-columns: repeat(3, 1fr); }
.form-sheet .fs-card { min-height: 520px; border: 1px solid #333; border-left: 0; }
.form-sheet .fs-card:first-child { border-left: 1px solid #333; }
.form-sheet .fs-card table { width: 100%; border-collapse: collapse; }
.form-sheet .fs-card td { padding: 2px 4px; border-bottom: 1px solid #999; font-size: 9.5px; vertical-align: top; overflow-wrap: anywhere; }
.form-sheet .fs-card td.lbl { width: 4.6em; border-right: 1px solid #999; background: #f3f3f3; font-weight: 700; text-align: center; }
.form-sheet .fs-card .fs-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 4px; }
.form-sheet .fs-lines div { min-height: 15px; padding: 1px 4px; border-bottom: 1px dashed #999; font-size: 9.5px; overflow-wrap: anywhere; }
.form-sheet .fs-page + .fs-page { margin-top: 18px; padding-top: 18px; border-top: 2px dashed #c9cfcb; }
.form-sheet .fs-small { color: #333; font-size: 9px; }
.form-sheet .fs-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-sheet .fs-cal td { height: 58px; font-size: 9.5px; }
.form-sheet .fs-cal .d { font-size: 11px; font-weight: 700; }
.form-sheet .fs-cal .sun, .form-sheet .fs-cal td.sun .d { color: #b3362b; }
.form-sheet .fs-cal .sat, .form-sheet .fs-cal td.sat .d { color: #2b62b3; }
.form-sheet .fs-sign { display: flex; justify-content: flex-end; gap: 24px; margin-top: 10px; font-size: 10.5px; }
.form-sheet .c { text-align: center; }

/* 帳票にだけ必要な入力 */
.forms-block { margin-top: 16px; }
.forms-block-title { margin: 0 0 8px; color: #345449; font-size: 12.5px; font-weight: 700; }
.forms-mini-table th, .forms-mini-table td { padding: 5px 6px; }
.forms-mini-table td.left, .forms-mini-table th.left { text-align: left; }
.forms-mini-table input[type="text"], .forms-mini-table select, .forms-mini-table textarea { width: 100%; min-width: 7em; }
.forms-mini-table input[type="time"] { width: 7.2em; min-width: 0; padding: 0 6px; height: 34px; font-size: 12px; }
.forms-mini-table textarea { min-height: 52px; }
.forms-schedule td { white-space: nowrap; }
.forms-specialist textarea { min-width: 12em; }
.forms-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.forms-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.forms-inline input[type="time"] { width: 8em; }
.forms-radio { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
#view-forms .form-grid label.full-width { grid-column: 1 / -1; }
#view-forms .mini-button { margin-top: 8px; }
#view-forms .quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
#view-forms .section-actions { flex-wrap: wrap; }
#view-forms .section-intro .section-actions { max-width: 560px; justify-content: flex-end; }
@media (max-width: 680px) {
  .form-sheet { min-width: 700px; padding: 12px; }
  .forms-inline input[type="time"], .forms-mini-table input[type="time"] { width: 100%; }
  #view-forms .section-intro .section-actions { max-width: none; }
  #view-forms .section-actions .month-field { width: 100%; }
}

/* スマートフォン: 横方向の安全網(内側のスクロール枠は影響を受けない) */
@media (max-width: 930px) {
  body { overflow-x: clip; }
  .progress-card, .pattern-card, .dashboard-grid > *, .analysis-grid > * { min-width: 0; }
  .indicator-row > * { min-width: 0; }
}
#view-forms .forms-mini-table :is(select, input[type="text"]) { height: 36px; padding: 0 8px; font-size: 13px; }
#view-forms .forms-mini-table select { padding-right: 26px; background-position: calc(100% - 12px) 15px, calc(100% - 7px) 15px; }

/* 帳票カタログ: どの画面の入力から作られるかを一覧で示す */
.forms-catalog-group + .forms-catalog-group { margin-top: 16px; }
.forms-catalog-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.forms-catalog-item { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.7); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease; }
.forms-catalog-item:hover { border-color: var(--lake); background: white; }
.forms-catalog-item.is-active { border-color: var(--lake); background: white; box-shadow: 0 0 0 3px rgba(78, 125, 137, 0.11); }
.forms-catalog-item strong { font-size: 13.5px; }
.forms-catalog-note { color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.forms-catalog-sources { color: #345449; font-size: 11.5px; line-height: 1.6; }
.forms-catalog-sources em { display: inline-block; margin: 2px 4px 0 0; padding: 1px 7px; border-radius: 99px; background: var(--lake-soft); font-style: normal; font-weight: 700; }
.forms-catalog-extra { color: #7c6a3a; font-size: 11.5px; }
.forms-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 12px; border: 1px dashed var(--line-dark); border-radius: 10px; }
.forms-sources-label { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.forms-sources .ghost-button { min-height: 34px; padding: 0 12px; font-size: 12.5px; }
@media (max-width: 930px) { .forms-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .forms-catalog-grid { grid-template-columns: 1fr; } .forms-sources .ghost-button { width: auto; } }
#view-forms .section-intro .section-actions { max-width: 620px; }

/* タブレット横〜小さめのノートPC: 見出し横の操作列は折り返す(ボタンが増えても横にはみ出さない) */
@media (max-width: 1366px) {
  .section-intro .section-actions, .plan-actions { flex-wrap: wrap; justify-content: flex-end; }
  .section-intro > .section-actions { max-width: 60%; }
}
@media (max-width: 930px) {
  .section-intro > .section-actions { max-width: none; }
}

/* タブレット(931〜1180px): 元の2カラム構成を保ちつつ、固定幅の詳細パネルや操作列が横にはみ出さないようにする */
@media (min-width: 931px) and (max-width: 1180px) {
  .journal-workspace { grid-template-columns: minmax(0, 1fr) minmax(280px, 42%); }
  .journal-detail { min-width: 0; }
  .detail-heading { flex-wrap: wrap; }
  .filter-bar { flex-wrap: wrap; }
  .analysis-range-fields { flex-wrap: wrap; }
  .writing-tools { grid-template-columns: 1fr 1fr; }
  .writing-target-label, .writing-character-count { grid-column: 1 / -1; }
  .writing-character-count { justify-self: start; }
  #view-settings .section-actions { flex-wrap: wrap; }
}
@media (min-width: 931px) { .section-intro > .primary-button { white-space: nowrap; } }

/* ===== 15 予定・勤務 ===== */
.sched-plan-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 18px; margin-bottom: 14px; }
.sched-plan-head .eyebrow { margin-bottom: 4px; }
.sched-counts { display: flex; flex-wrap: wrap; gap: 8px; }
.sched-counts span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255, 255, 255, 0.7); font-size: 12.5px; }
.sched-counts b { font-size: 15px; }
.sched-grid { display: grid; gap: 4px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.sched-head { padding: 4px 0; color: var(--ink-soft); font-size: 12px; font-weight: 700; text-align: center; }
.sched-head.is-holiday { color: var(--cinnabar-text); } .sched-head.is-sat { color: #2b62b3; }
.sched-cell { position: relative; display: grid; min-height: 58px; padding: 6px 6px 4px; align-content: start; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.72); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color 150ms ease, background 150ms ease; }
.sched-cell:hover { border-color: var(--lake); background: white; }
.sched-cell.is-empty { border-color: transparent; background: transparent; cursor: default; }
.sched-cell.is-contract { background: rgba(126, 156, 122, 0.14); }
.sched-cell.is-holiday .sched-day { color: var(--cinnabar-text); } .sched-cell.is-sat .sched-day { color: #2b62b3; }
.sched-cell.is-use { border-color: var(--lake); background: rgba(78, 125, 137, 0.14); }
.sched-cell.is-absent { border-color: #d3a08e; background: #fff1eb; }
.sched-day { font-size: 12px; font-weight: 700; }
.sched-mark { font-family: var(--font-display); font-size: 22px; line-height: 1.1; text-align: center; }
.sched-cell.is-absent .sched-mark { color: var(--cinnabar-text); }
.sched-event { position: absolute; top: 4px; right: 6px; color: #b8860b; font-size: 12px; }
.sched-dot { position: absolute; right: 7px; bottom: 3px; color: var(--lake); font-size: 8px; }
.sched-cell.big { min-height: 72px; } .sched-cell.big .sched-mark { font-size: 28px; }
.sched-detail { margin-top: 14px; padding: 14px 16px; border: 1px dashed var(--line-dark); border-radius: 12px; }
.sched-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.sched-detail-mark { color: var(--ink-soft); font-size: 13px; }
.sched-contract { margin-top: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.5); }
.sched-contract summary { cursor: pointer; font-weight: 700; }
.sched-contract-days { margin: 10px 0; }
.sched-month-note { margin-top: 14px; }
.sched-list-table th, .sched-list-table td { padding: 4px 3px; font-size: 12px; }
.sched-list-table th.is-holiday, .sched-list-table td.is-holiday { color: var(--cinnabar-text); background: rgba(189, 91, 64, 0.05); }
.sched-list-table th.is-sat { color: #2b62b3; }
.sched-list-table .sched-total td { border-top: 2px solid var(--line-dark); font-weight: 700; }
.sched-shift-table th, .sched-shift-table td { padding: 3px 2px; font-size: 12px; }
.sched-shift-table th.is-holiday { color: var(--cinnabar-text); } .sched-shift-table th.is-sat { color: #2b62b3; } .sched-shift-table th.is-selected { background: var(--lake-soft); }
.sched-shift-table td.is-holiday { background: rgba(189, 91, 64, 0.05); }
.sched-daybtn { padding: 2px 4px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.sched-daybtn:hover { background: var(--lake-soft); }
.sched-role { display: inline-block; margin-right: 3px; color: var(--ink-soft); }
.sched-code { min-width: 34px; height: 30px; padding: 0 4px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.sched-code:hover { border-color: var(--lake); }
.sched-code-none { color: #b9c4c1; font-weight: 400; }
.sched-code-出 { background: rgba(78, 125, 137, 0.16); border-color: var(--lake); }
.sched-code-半 { background: rgba(78, 125, 137, 0.08); }
.sched-code-休 { background: #f2f2ef; color: #6a7472; }
.sched-code-有休 { background: #fff1eb; color: var(--cinnabar-text); }
.sched-code-研修 { background: #fff7dc; color: #7c6a3a; }
.sched-code-他 { background: #eef3ff; color: #2b62b3; }
.sched-daily-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.sched-plain-list { margin: 0 0 8px; padding-left: 18px; font-size: 13.5px; line-height: 1.7; }
.sched-plain-list small { color: var(--ink-soft); }
/* 利用予定一覧の「ここから1週間」(スマホで横スクロールせずに読む) */
.sched-week-list { display: grid; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.sched-week-list li { display: grid; gap: 2px 12px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 253, 248, 0.72); grid-template-columns: 6.5em minmax(0, 1fr); font-size: 13.5px; }
.sched-week-list li.is-holiday { background: #fbf5f2; }
.sched-week-list li.is-today { border-color: var(--lake); box-shadow: inset 3px 0 0 var(--lake); }
.sched-week-day { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; color: var(--ink-soft); }
.sched-week-day b { color: var(--ink); font-size: 15px; }
.sched-week-day .card-tag { padding: 1px 7px; font-size: 11px; }
.sched-week-body { min-width: 0; display: grid; gap: 2px; overflow-wrap: anywhere; }
.sched-week-body .hint-text { margin: 0; }
.sched-week-lbl { display: inline-block; min-width: 4.6em; margin-right: 6px; padding: 1px 6px; border-radius: 99px; background: var(--sage-soft); color: #526b4d; font-size: 11px; font-weight: 700; text-align: center; }
.sched-week-lbl.warn { background: var(--cinnabar-soft); color: var(--cinnabar-text); }
@media (max-width: 560px) { .sched-week-list li { grid-template-columns: minmax(0, 1fr); } }

/* LINEグループからの予定変更(15 予定・勤務) */
.sched-line-table { min-width: 720px; }
.sched-line-table tr.is-needs td { background: #fdf7f2; }
.sched-line-read { display: grid; gap: 5px; min-width: 240px; }
.sched-line-read label { display: grid; gap: 2px; }
.sched-line-read label > span { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.sched-line-read .sched-tr-warn, .sched-line-read .hint-text { margin: 2px 0 0; }

/* 配車の確定(D5)と実績への反映(D6) */
.sched-tr-warn { margin: 6px 0; padding: 8px 11px; border-left: 3px solid var(--cinnabar); border-radius: 0 8px 8px 0; background: #fdf2ee; color: #7a4436; font-size: 12.5px; line-height: 1.6; }
.sched-tr-riders { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 8px; }
.sched-tr-riders label { display: grid; gap: 3px; min-width: 0; flex: 0 1 150px; }
.sched-tr-riders label > span { color: var(--ink-soft); font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-reflect { margin: 10px 0 4px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 253, 248, 0.7); }
.sched-reflect .forms-block-title { margin-top: 0; }
.sched-reflect tr.is-removing td { background: #fdf2ee; }
/* 確定した配車の表は列が多い。狭いところでは縦積みにせず横スクロールさせる */
.sched-tr-table { min-width: 520px; }

/* ヒヤリハット・事故の入力(管理日案の中。開閉式) */
.sched-incident-form { margin: 8px 0 4px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 253, 248, 0.7); }
.sched-incident-form > label { display: grid; gap: 4px; margin-bottom: 9px; }
.sched-incident-form > label > span, .sched-incident-row label > span { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.sched-incident-form span small { font-weight: 400; }
.sched-incident-row { display: flex; flex-wrap: wrap; gap: 9px 12px; margin-bottom: 9px; }
.sched-incident-row > label { display: grid; gap: 4px; min-width: 0; flex: 1 1 165px; }
.sched-incident-row > label > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-incident-row > label.forms-radio { display: inline-flex; flex: 0 0 auto; }
.card-tag.warn { background: #fff1eb; color: var(--cinnabar-text); }
.guardian-dialog { width: min(720px, 96vw); max-height: 96vh; padding: 0; border: 0; border-radius: 18px; }
.guardian-dialog::backdrop { background: rgba(23, 45, 49, 0.55); }
.guardian-dialog .dialog-heading { padding: 18px 20px 6px; }
#guardian-body { padding: 0 20px 20px; }
.guardian-lead { margin: 0 0 12px; font-size: 15px; line-height: 1.7; }
.guardian-grid .sched-cell { min-height: 72px; }
.guardian-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0; font-size: 14px; }
.guardian-notice { margin: 10px 0; padding: 10px 12px; border-left: 3px solid var(--gold); background: #fff9ec; font-size: 13px; white-space: pre-wrap; }
.guardian-send textarea { width: 100%; margin-top: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
@media (max-width: 930px) { .sched-daily-grid { grid-template-columns: minmax(0, 1fr); } }
.sched-daily-grid > * { min-width: 0; }
.sched-plan-head > div { min-width: 0; flex: 1 1 260px; }
.sched-plain-list li { overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .sched-cell { min-height: 50px; padding: 4px 4px 2px; } .sched-mark { font-size: 18px; } .sched-grid { gap: 3px; }
  .sched-cell.big, .guardian-grid .sched-cell { min-height: 60px; }
  .guardian-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; border-radius: 0; }
  .sched-counts span { font-size: 12px; padding: 4px 9px; }
}
@media (max-width: 680px) {
  #view-schedule .section-actions button, #view-forms .section-actions button, .guardian-dialog .section-actions button { white-space: normal; line-height: 1.4; }
}

/* 管理日案: 送迎の要否と当日の支援記録 */
.sched-need { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; color: #59696b; background: #eef0ea; white-space: nowrap; }
.sched-need.is-need { color: white; background: var(--navy); }
.sched-needs-table td small { display: inline-block; color: var(--ink-soft); font-size: 11.5px; line-height: 1.4; }
.sched-needs-table input[type="text"] { min-width: 12em; width: 100%; }
.sched-needs-table select { min-width: 6em; }
#view-schedule #sched-day-note { width: 100%; }

/* 日誌: カレンダーで日を選び、前後1日の日誌だけを一覧に出す */
.journal-list-column { display: grid; align-content: start; gap: 12px; min-width: 0; }
.journal-calendar { padding: 12px 12px 10px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 253, 248, 0.74); }
.journal-cal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.journal-cal-head strong { font-family: var(--font-display); font-size: 16px; letter-spacing: 0.04em; }
.journal-cal-head .icon-button { width: 30px; height: 30px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.7); font-size: 15px; }
.journal-cal-head .journal-cal-range { margin-left: auto; }
.journal-calendar .sched-grid { gap: 3px; }
.journal-calendar .sched-head { padding: 2px 0; font-size: 11px; }
.journal-cal-cell { min-height: 44px; padding: 4px 5px 3px; border-radius: 8px; }
.journal-cal-cell .sched-day { font-size: 12px; }
.journal-cal-cell.is-range { background: rgba(126, 156, 122, 0.14); }
.journal-cal-cell.is-selected { border-color: var(--lake); background: white; box-shadow: inset 0 0 0 1px var(--lake); }
.journal-cal-cell.has-journals .sched-day { font-weight: 700; color: var(--ink); }
.journal-cal-count { display: inline-block; margin-top: 2px; padding: 0 5px; border-radius: 99px; background: var(--navy); color: white; font-size: 10px; font-weight: 700; line-height: 1.5; justify-self: start; }
.journal-cal-note { margin: 8px 0 0; color: var(--ink-soft); font-size: 12px; }
@media (max-width: 680px) { .journal-cal-cell { min-height: 40px; } }

/* 帳票プレビュー: 画面幅に収まらないときは縮小して1画面で見る(印刷は等倍のまま) */
.form-sheet-wrap.is-fitted { overflow: hidden; }
.form-sheet-wrap.is-fitted .form-sheet { transform: scale(var(--fit, 1)); transform-origin: top left; }

/* 縦長のページ用: 右下の「ページの先頭へ」 */
.to-top { position: fixed; right: 16px; bottom: 18px; z-index: 890; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--navy); color: white; font-size: 20px; line-height: 1; box-shadow: 0 8px 22px rgba(22, 51, 59, 0.28); cursor: pointer; transition: transform 160ms ease, opacity 160ms ease; }
.to-top:hover { transform: translateY(-2px); }
.to-top[hidden] { display: none; }
body:has(.netbar:not([hidden])) .to-top { bottom: 64px; }
@media (min-width: 931px) { .to-top { right: 24px; bottom: 24px; } }
@media print { .to-top { display: none !important; } }

/* 管理日案: 配車案・要否表の長い文字列は折り返し、列の中で切れないようにする */
.sched-daily-grid .data-table td.left, .sched-needs-table td.left { white-space: normal; overflow-wrap: anywhere; }
.sched-daily-grid .data-table th, .sched-daily-grid .data-table td { vertical-align: top; }
@media (max-width: 680px) {
  .sched-plan-head .hint-text { font-size: 12.5px; }
  .sched-counts span { padding: 5px 10px; font-size: 12px; }
}

/* 支援サマリー: ヒーロー直下の「今日」の1行(詳細は下の「今日の状況」に残す) */
.today-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 22px; }
.today-strip:empty { display: none; }
.today-strip-label { margin-right: 4px; color: var(--ink-soft); font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; }
.today-chip { padding: 7px 13px; border: 1px solid var(--line-dark); border-radius: 99px; background: rgba(255, 255, 255, 0.72); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.today-chip b { font-size: 15px; }
.today-chip small { color: var(--cinnabar-text); font-weight: 700; }
.today-chip:hover { border-color: var(--lake); background: white; }
.today-chip.is-primary { border-color: var(--navy); background: var(--navy); color: white; }
@media (max-width: 680px) { .today-strip { margin-top: 0; } .today-chip { padding: 8px 12px; font-size: 12.5px; } }

/* 出欠: 欠席の理由・連絡内容、配慮点の当日確認 */
.attendance-absent { display: grid; gap: 8px; margin-top: 10px; }
.attendance-absent label { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-soft); }
.attendance-absent .attendance-support { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.attendance-care { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: #7a5a22; }
.attendance-care .check-pill { border-color: var(--gold-soft); background: var(--gold-soft); }
.attendance-care small { flex: 1 1 100%; color: var(--ink-soft); }
#view-attendance .attendance-list .check-pill input { margin-right: 4px; }

/* 予定・勤務: 保護者の予定テキストの貼り付け欄 */
.sched-import { margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--line-dark); border-radius: 12px; }
.sched-import label { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-soft); }
.sched-import textarea { width: 100%; font-family: inherit; }

/* 利用児一覧: 期限一覧 */
.deadline-counts { margin-bottom: 10px; }
.deadline-table tr.is-overdue td:first-child { color: var(--cinnabar-text); font-weight: 700; }
.deadline-table tr.is-soon td:first-child { color: #7a5a22; font-weight: 700; }
.deadline-table td small { color: var(--ink-soft); }
.today-chip.is-alert { border-color: var(--cinnabar); }

/* 連絡帳: 日々の連絡帳(当日入力) */
.contact-daily .form-grid.compact textarea { min-height: 58px; }
.contact-daily-preview { margin: 12px 0 0; padding: 12px 14px; border: 1px dashed var(--line-dark); border-radius: 12px; background: rgba(255, 255, 255, 0.6); font: inherit; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.contact-daily-list { display: grid; gap: 6px; }
.contact-daily-item { display: grid; grid-template-columns: 6.5em 1fr; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.6); color: var(--ink); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.contact-daily-item strong { font-variant-numeric: tabular-nums; }
.contact-daily-item span { color: var(--ink-soft); overflow-wrap: anywhere; }
.contact-daily-item.is-selected { border-color: var(--lake); background: white; }
.contact-daily-item:hover { border-color: var(--lake); }
@media (max-width: 680px) { .contact-daily-item { grid-template-columns: 1fr; gap: 2px; } }

/* 日誌の一括入力: 利用児ごとの反応欄 */
.bulk-children-fieldset { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.bulk-children-fieldset legend { padding: 0 6px; font-size: 13px; font-weight: 700; }
.bulk-children-fieldset legend small { margin-left: 6px; color: var(--ink-soft); font-weight: 400; }
.bulk-child { display: grid; gap: 6px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.55); }
.bulk-child-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }
.bulk-child-head small { color: var(--ink-soft); }
.bulk-child textarea, .bulk-child input[type="text"] { width: 100%; font: inherit; font-size: 13px; }
.bulk-child.is-off textarea, .bulk-child.is-off input { opacity: 0.5; }

/* 予約管理(16): 枠のカレンダー・当日の予約・公式LINEの通知 */
.resv-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 18px; margin-bottom: 14px; }
.resv-head .eyebrow { margin-bottom: 4px; }
.resv-counts { display: flex; flex-wrap: wrap; gap: 8px; }
.resv-counts span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255, 255, 255, 0.7); font-size: 12.5px; }
.resv-counts b { font-size: 15px; }
.resv-month-nav { margin-bottom: 10px; }
.resv-grid { display: grid; gap: 4px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.resv-cell { position: relative; display: grid; gap: 1px; min-height: 66px; padding: 6px 6px 4px; align-content: start; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.72); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color 150ms ease, background 150ms ease; }
.resv-cell:hover { border-color: var(--lake); background: white; }
.resv-cell.is-empty { border-color: transparent; background: transparent; cursor: default; }
.resv-cell.is-some { border-color: var(--lake); background: rgba(78, 125, 137, 0.12); }
.resv-cell.is-full { border-color: #d3a08e; background: #fff1eb; }
.resv-cell.is-closed { background: #f2f2ef; color: #6a7472; }
.resv-cell.is-selected { border-color: var(--lake); border-width: 2px; background: white; }
.resv-cell.is-holiday .resv-day { color: var(--cinnabar-text); } .resv-cell.is-sat .resv-day { color: #2b62b3; }
.resv-day { font-size: 12px; font-weight: 700; }
.resv-state { font-family: var(--font-display); font-size: 17px; line-height: 1.2; }
.resv-cell.is-full .resv-state { color: var(--cinnabar-text); font-size: 14px; }
.resv-count { color: var(--ink-soft); font-size: 11px; font-variant-numeric: tabular-nums; }
.resv-wait { position: absolute; top: 4px; right: 6px; color: #7c6a3a; font-size: 11px; font-weight: 700; }
.resv-settings { margin-top: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.5); }
.resv-settings summary { cursor: pointer; font-weight: 700; }
.resv-settings .form-grid { margin-top: 10px; }
.resv-status { display: inline-block; padding: 2px 9px; border: 1px solid var(--line); border-radius: 99px; font-size: 11.5px; white-space: nowrap; }
.resv-status.is-booked { border-color: var(--lake); background: rgba(78, 125, 137, 0.14); }
.resv-status.is-waitlist { border-color: #d8c48a; background: #fff7dc; color: #7c6a3a; }
.resv-status.is-cancelled, .resv-status.is-skipped { background: #f2f2ef; color: #6a7472; }
.resv-status.is-sent { border-color: var(--lake); background: rgba(78, 125, 137, 0.14); }
.resv-status.is-failed { border-color: #d3a08e; background: #fff1eb; color: var(--cinnabar-text); }
.resv-table tr.is-cancelled td { color: var(--ink-soft); text-decoration-color: var(--line-dark); }
.resv-count-input { width: 4.5em; text-align: center; }
.resv-nolink { color: #7c6a3a; }
.resv-notice-text { margin: 0; max-width: 34em; font: inherit; font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.resv-notice-table td, .resv-inbox-table td, .resv-customer-table td { vertical-align: top; }
.resv-import { margin: 10px 0 4px; padding: 12px 14px; border: 1px dashed var(--line-dark); border-radius: 12px; }
.resv-import textarea { width: 100%; font-family: inherit; }
.resv-history { margin-top: 14px; }
.resv-history summary { cursor: pointer; font-weight: 700; }
@media (max-width: 680px) { .resv-cell { min-height: 58px; padding: 4px; } .resv-state { font-size: 14px; } .resv-count { font-size: 10px; } }

/* 体裁の微調整(2026-09-10): ボタンの行の直後に来る見出し・注記には間を空ける。通知の設定は1行ずつ縦に並べる。配車の表は狭い幅で潰さず横スクロールにする */
.section-actions + .forms-block-title, .section-actions + .hint-text, .forms-inline + .forms-block-title { margin-top: 14px; }
.resv-options { flex-direction: column; align-items: flex-start; gap: 6px; }
.resv-options + .forms-block-title { margin-top: 14px; }
.sched-tr-table th, .sched-tr-table td { white-space: nowrap; }

