:root {
  --ink: #183638;
  --ink-soft: #526767;
  --forest: #123b3d;
  --forest-deep: #0c2e31;
  --forest-pale: #dce8e2;
  --paper: #f4f0e6;
  --paper-bright: #fcfaf4;
  --paper-deep: #e8e1d3;
  --line: #d6cebd;
  --line-strong: #b8ae9a;
  --terra: #a86543;
  --vermillion: #a8432d;
  --vermillion-soft: #f3dfd6;
  --sage: #76957b;
  --warning: #8a531c;
  --error: #9d2d2d;
  --shadow: 0 16px 45px rgb(20 47 45 / 10%);
  --radius: 18px;
  --sidebar-width: 272px;
  font-family: "BIZ UDPGothic", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(90deg, transparent 0 49px, rgb(168 67 45 / 5%) 50px, transparent 51px),
    repeating-linear-gradient(0deg, transparent 0 39px, rgb(18 59 61 / 2.4%) 40px),
    var(--paper);
}

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

button,
select {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #d36b47;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  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;
  z-index: 1000;
  top: 12px;
  left: 12px;
  transform: translateY(-150%);
  padding: 10px 16px;
  border-radius: 8px;
  color: white;
  background: var(--forest-deep);
}

.skip-link:focus {
  transform: none;
}

.session-gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgb(118 149 123 / 16%), transparent 32%),
    var(--paper);
}

.session-gate h1,
.session-gate p {
  margin: 0;
}

.session-gate p {
  color: var(--ink-soft);
}

.gate-mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--paper-bright);
  background: var(--forest);
  box-shadow: 0 0 0 10px rgb(18 59 61 / 7%);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 27px;
}

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

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  gap: 24px;
  padding: 28px 18px 20px;
  overflow-y: auto;
  color: #f5f1e7;
  background:
    radial-gradient(circle at 20% 4%, rgb(255 255 255 / 7%), transparent 24%),
    linear-gradient(165deg, var(--forest) 0%, var(--forest-deep) 100%);
  box-shadow: 10px 0 32px rgb(16 44 46 / 12%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 2px 9px;
}

.brand > div {
  min-width: 0;
}

.brand strong {
  display: block;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .08em;
}

.brand span:last-child {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: rgb(245 241 231 / 66%);
  font-size: 11px;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  display: block;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  border: 1px solid rgb(245 241 231 / 27%);
  border-radius: 50%;
}

.brand-mark i {
  position: absolute;
  bottom: 10px;
  left: 50%;
  width: 3px;
  height: 20px;
  border-radius: 2px;
  background: #c7d8bc;
  transform-origin: bottom;
}

.brand-mark i:nth-child(1) { transform: translateX(-50%) rotate(-25deg); }
.brand-mark i:nth-child(2) { transform: translateX(-50%); }
.brand-mark i:nth-child(3) { transform: translateX(-50%) rotate(25deg); }

.current-child {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgb(245 241 231 / 18%);
  border-radius: 14px;
  color: inherit;
  text-align: left;
  background: rgb(255 255 255 / 7%);
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.current-child:hover {
  border-color: rgb(245 241 231 / 34%);
  background: rgb(255 255 255 / 11%);
  transform: translateY(-1px);
}

.current-child .eyebrow {
  color: #b9cbb4;
}

.current-child strong,
.current-child span:last-child {
  display: block;
}

.current-child strong {
  margin: 5px 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 17px;
}

.current-child span:last-child {
  color: rgb(245 241 231 / 65%);
  font-size: 11px;
}

.primary-nav {
  display: grid;
  gap: 4px;
}

.primary-nav button {
  position: relative;
  display: grid;
  grid-template-columns: 27px 1fr;
  align-items: center;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-radius: 11px;
  color: rgb(245 241 231 / 73%);
  text-align: left;
  background: transparent;
  font-weight: 700;
  transition: color .18s ease, background .18s ease;
}

.primary-nav button span {
  color: #97b29b;
  font-family: Georgia, serif;
  font-size: 11px;
  letter-spacing: .1em;
}

.primary-nav button:hover {
  color: white;
  background: rgb(255 255 255 / 6%);
}

.primary-nav button[aria-current="page"] {
  color: white;
  background: rgb(255 255 255 / 13%);
  box-shadow: inset 3px 0 0 #d36b47;
}

.admin-nav {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgb(245 241 231 / 18%);
  border-radius: 11px;
  color: #edf0e7;
  text-align: left;
  background: rgb(255 255 255 / 5%);
}

.admin-nav[aria-current="page"] { border-color: #d36b47; background: rgb(255 255 255 / 12%); }
.admin-nav > span:first-child { display: grid; width: 28px; height: 28px; place-content: center; border-radius: 50%; background: rgb(255 255 255 / 10%); }
.admin-nav strong,
.admin-nav small { display: block; }
.admin-nav strong { font-size: 11px; }
.admin-nav small { margin-top: 2px; color: rgb(245 241 231 / 58%); font-size: 9px; }

.sidebar-note {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding: 15px 16px;
  border: 1px solid rgb(245 241 231 / 13%);
  border-radius: 14px;
  color: rgb(245 241 231 / 66%);
  font-size: 11px;
  line-height: 1.65;
}

.sidebar-note strong {
  color: #e7eadd;
  font-size: 12px;
}

.workspace {
  min-width: 0;
}

@media (min-width: 861px) {
  .workspace { margin-left: var(--sidebar-width); }
}

.topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px clamp(20px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgb(244 240 230 / 92%);
  backdrop-filter: blur(14px);
}

.topbar:has(.workspace-context[hidden]) {
  justify-content: flex-end;
  min-height: 58px;
}

.workspace-context,
.session-context {
  display: flex;
  align-items: center;
  gap: 14px;
}

.workspace-context > span {
  max-width: 250px;
  overflow: hidden;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-context label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.workspace-context select {
  min-width: 180px;
  max-width: 300px;
  padding: 9px 34px 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  background: var(--paper-bright);
}

.save-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 92px;
  color: var(--ink-soft);
  font-size: 11px;
}

.save-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 3px rgb(118 149 123 / 12%);
}

.save-status[data-state="saving"] span { background: #aa7528; animation: pulse 1s infinite; }
.save-status[data-state="error"] span,
.save-status[data-state="conflict"] span { background: var(--error); }
.save-status[data-state="offline"] span { background: #6e7370; }

.save-undo-notice {
  position: fixed;
  z-index: 40;
  right: 28px;
  bottom: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  width: min(560px, calc(100vw - 56px));
  gap: 12px;
  padding: 13px 14px 13px 18px;
  border: 1px solid #9db7a7;
  border-left: 5px solid var(--terra);
  border-radius: 12px;
  color: var(--ink);
  background: #fffdf8;
  box-shadow: 0 16px 38px rgb(12 46 49 / 22%);
}

.save-undo-notice p { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.5; }
.save-undo-notice .button { min-height: 40px; padding-inline: 15px; white-space: nowrap; }
.save-undo-dismiss { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; color: var(--ink-soft); background: transparent; font-size: 24px; line-height: 1; }
.save-undo-dismiss:hover { color: var(--forest); background: var(--forest-pale); }

.staff-context {
  display: grid;
  min-width: 0;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.staff-context strong,
.staff-context span {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-context strong { font-size: 12px; }
.staff-context span { color: var(--ink-soft); font-size: 10px; }

.logout-button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink-soft);
  background: var(--paper-bright);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.logout-button:hover { border-color: var(--petrol); color: var(--petrol); }
.logout-button:disabled { cursor: wait; opacity: .62; }

/* Studio refresh: a calmer, more editorial workspace without sacrificing the
   density required for day-to-day support records. */
:root {
  --paper: #fbfaf5;
  --paper-bright: #fffefb;
  --paper-deep: #eef1e8;
  --line: #dce3d7;
  --line-strong: #becdc0;
  --forest: #1b5b59;
  --forest-deep: #124847;
  --forest-pale: #e4f1e9;
  --ink: #174143;
  --ink-soft: #627d78;
  --terra: #cc7255;
  --shadow: 0 18px 50px rgb(29 83 76 / 6%);
  --radius: 20px;
  --sidebar-width: 264px;
  font-size: 16px;
}

body {
  background:
    radial-gradient(circle at 78% -12%, rgb(196 229 211 / 48%), transparent 29rem),
    radial-gradient(circle at 33% 115%, rgb(250 218 192 / 27%), transparent 33rem),
    var(--paper);
}

.sidebar {
  gap: 21px;
  padding: 25px 16px 20px;
  border-right: 1px solid rgb(255 255 255 / 11%);
  background:
    radial-gradient(circle at 88% 7%, rgb(214 244 220 / 24%), transparent 16rem),
    linear-gradient(158deg, #2a716a 0%, #1d5b59 48%, #164c4d 100%);
  box-shadow: 16px 0 42px rgb(10 37 38 / 10%);
}

.brand { gap: 12px; padding: 3px 9px 7px; }
.brand-mark { width: 42px; height: 42px; flex-basis: 42px; border-color: rgb(238 244 233 / 32%); }
.brand strong { font-size: 21px; letter-spacing: .1em; }
.brand span:last-child { margin-top: 4px; color: rgb(240 244 235 / 66%); font-size: 10px; }

.facility-identity {
  display: grid;
  gap: 3px;
  margin: -12px 9px 2px;
  padding: 8px 10px 8px 12px;
  border-left: 2px solid rgb(234 190 145 / 82%);
  color: #f7f7f0;
}

.facility-identity span {
  color: rgb(232 244 231 / 65%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
}

.facility-identity strong {
  overflow: hidden;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .035em;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-child {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-color: rgb(235 250 237 / 29%);
  border-radius: 17px;
  background: linear-gradient(145deg, rgb(255 255 255 / 20%), rgb(255 255 255 / 8%));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 9%);
}

.current-child::after {
  position: absolute;
  right: -20px;
  bottom: -36px;
  width: 92px;
  height: 92px;
  border: 1px solid rgb(228 240 230 / 14%);
  border-radius: 50%;
  content: "";
}

.current-child:hover { border-color: rgb(235 250 237 / 48%); background: linear-gradient(145deg, rgb(255 255 255 / 25%), rgb(255 255 255 / 11%)); }
.current-child strong { position: relative; z-index: 1; font-size: 16px; }
.current-child .eyebrow { color: #d6eed6; }

.primary-nav { gap: 6px; padding-top: 2px; }
.primary-nav button {
  grid-template-columns: 30px 1fr;
  min-height: 44px;
  padding: 10px 11px;
  border-radius: 10px;
  color: rgb(240 244 235 / 74%);
}

.primary-nav button span { color: #b8d7bd; font-size: 10px; }
.primary-nav button:hover { color: #fff; background: rgb(255 255 255 / 8%); }
.primary-nav button[aria-current="page"] {
  color: #fff;
  background: linear-gradient(90deg, rgb(205 240 214 / 25%), rgb(255 255 255 / 14%));
  box-shadow: inset 3px 0 0 #e07854, inset 0 1px 0 rgb(255 255 255 / 8%);
}

.topbar {
  min-height: 64px;
  padding: 10px clamp(22px, 4vw, 54px);
  border-color: rgb(200 193 176 / 76%);
  background: rgb(251 250 245 / 86%);
  box-shadow: 0 7px 20px rgb(34 52 48 / 2%);
}

.topbar:has(.workspace-context[hidden]) { min-height: 64px; }
.logout-button { min-height: 40px; border-radius: 11px; color: var(--forest); background: rgb(255 253 250 / 78%); font-size: 12px; }
.logout-button:hover { border-color: var(--terra); color: var(--terra); }

main { max-width: 1460px; padding: clamp(30px, 4vw, 54px) clamp(22px, 4vw, 54px) 88px; }
.page-heading { align-items: center; gap: 24px; margin-bottom: 24px; }
.child-heading-content { gap: 15px; }
.child-profile-photo {
  width: 82px;
  height: 82px;
  flex-basis: 82px;
  border: 1px solid #cad4cb;
  border-radius: 28px;
  background: linear-gradient(145deg, #e7f4e8, #fffdf7);
  box-shadow: 0 8px 20px rgb(34 67 62 / 6%);
  font-size: 29px;
}

.page-heading h1 { margin-top: 4px; font-size: clamp(30px, 3.25vw, 45px); letter-spacing: .06em; }
.eyebrow { color: var(--terra); font-size: 10px; letter-spacing: .18em; }
.child-heading-actions { gap: 9px; }

.button { min-height: 42px; padding: 8px 15px; border-radius: 11px; font-size: 13px; }
.button-primary { box-shadow: 0 8px 18px rgb(18 63 64 / 14%); }
.button-primary:hover { box-shadow: 0 12px 24px rgb(18 63 64 / 20%); }
.button-secondary { border-color: #6d9c93; color: var(--forest); background: rgb(255 255 255 / 88%); }

.section-tabs {
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border-color: rgb(205 198 181 / 80%);
  border-radius: 13px;
  background: rgb(255 255 255 / 78%);
  box-shadow: 0 7px 16px rgb(38 57 52 / 3%);
}

.section-tabs button { min-height: 40px; padding: 7px 15px; border-radius: 9px; font-size: 13px; }
.section-tabs button[aria-selected="true"] { background: var(--forest); box-shadow: 0 4px 10px rgb(18 63 64 / 18%); }

.detail-sheet {
  padding: clamp(16px, 2.2vw, 25px);
  border-color: rgb(210 202 185 / 88%);
  border-radius: 22px;
  background: rgb(255 255 255 / 86%);
  box-shadow: 0 18px 42px rgb(35 57 50 / 6%);
}

.detail-grid {
  gap: 11px;
  border: 0;
  background: transparent;
}

.detail-grid > div {
  min-height: 94px;
  padding: 16px 17px;
  border: 1px solid #dce7da;
  border-radius: 13px;
  background: linear-gradient(145deg, rgb(240 249 242 / 86%), rgb(255 255 252 / 94%) 68%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 80%);
}

.detail-grid > div:hover { border-color: #b8d9c2; }
.detail-grid dt { padding: 3px 7px; border-radius: 999px; color: #42746a; font-size: 10px; background: #e3f2e8; }
.detail-grid dd { margin-top: 12px; font-size: 16px; line-height: 1.55; }
.detail-grid dd.is-empty { font-size: 13px; }
.detail-grid > .certificate-expiry-soon { border-color: #e8d5a7; background: linear-gradient(145deg, #fff7e4, #fffdfa 72%); }
.detail-grid.is-reordering > div { position: relative; cursor: grab; user-select: none; border-style: dashed; border-color: #8eb7a4; box-shadow: 0 0 0 3px rgb(118 149 123 / 10%); }
.detail-grid.is-reordering > div::after { position: absolute; top: 11px; right: 12px; color: #6d8e7e; content: "⠿"; font-size: 18px; font-weight: 800; line-height: 1; }
.detail-grid.is-reordering > div:active { cursor: grabbing; }
.detail-grid.is-reordering > div.is-dragging { opacity: .38; transform: scale(.98); }
.detail-grid.is-reordering > div:not(.is-dragging):hover { border-color: var(--forest); background: #f2f8f1; }

.record-list,
.document-lane,
.overview-card,
.workflow-panel { border-color: rgb(207 223 208 / 92%); background: rgb(255 255 255 / 86%); box-shadow: 0 18px 42px rgb(35 82 70 / 6%); }

.contact-photo-field {
  padding: 16px;
  border: 1px solid #dce7da;
  border-radius: 14px;
  background: linear-gradient(145deg, rgb(240 249 242 / 86%), rgb(255 255 252 / 94%));
}

.contact-photo-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.contact-photo-heading strong { display: block; font-size: 15px; }
.contact-photo-heading p { margin: 4px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.contact-photo-heading output { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; color: #42746a; background: #e3f2e8; font-size: 12px; font-weight: 800; }

.contact-photo-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 13px;
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
}

.contact-photo-picker input { max-width: min(100%, 420px); color: var(--ink-soft); font-size: 12px; font-weight: 500; }

.contact-photo-preview,
.contact-photo-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.contact-photo-preview { margin-top: 14px; }
.contact-photo-preview > p { width: 100%; margin: 0; color: var(--ink-soft); font-size: 12px; }
.contact-photo-preview-item { display: grid; gap: 4px; width: 94px; color: var(--ink-soft); font-size: 10px; }
.contact-photo-preview-item img,
.contact-photo-thumbnail img { display: block; width: 100%; height: 72px; object-fit: cover; border: 1px solid #d4e2d6; border-radius: 9px; background: #edf3ed; }
.contact-photo-preview-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-photo-remove { justify-self: start; padding: 2px 0; border: 0; color: #9a443c; background: transparent; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.contact-photo-remove:hover { color: #742f29; }
.contact-photo-remove:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 2px; }
.contact-photo-remove:disabled { color: #9fa9a2; cursor: wait; }

.contact-photo-gallery { margin-top: 16px; }
.contact-photo-thumbnail { display: block; width: 118px; border-radius: 11px; outline-offset: 3px; }
.contact-photo-thumbnail img { height: 88px; transition: transform .16s ease, box-shadow .16s ease; }
.contact-photo-thumbnail:hover img { box-shadow: 0 7px 14px rgb(25 85 76 / 13%); transform: translateY(-2px); }

@media (max-width: 600px) {
  .contact-photo-heading { align-items: stretch; flex-direction: column; }
  .contact-photo-heading output { width: fit-content; }
  .contact-photo-picker { align-items: stretch; flex-direction: column; }
  .contact-photo-thumbnail { width: calc(50% - 5px); }
  .contact-photo-thumbnail img { height: 112px; }
}

@media (max-width: 860px) {
  .sidebar { padding: 17px 15px 12px; }
  .primary-nav { gap: 4px; }
  .primary-nav button { min-height: 0; border-radius: 8px; }
  .detail-grid { gap: 9px; }
}

@media (max-width: 600px) {
  :root { font-size: 16px; }
  main { padding: 28px 16px 54px; }
  .page-heading h1 { font-size: 30px; }
  .child-profile-photo { width: 66px; height: 66px; flex-basis: 66px; border-radius: 22px; font-size: 24px; }
  .child-heading-actions .button { flex: 1 1 auto; }
  .detail-sheet { padding: 12px; border-radius: 17px; }
  .detail-grid > div { min-height: 82px; padding: 14px; }
  .section-tabs button { min-height: 42px; padding-inline: 6px; font-size: 12px; }
}

main {
  max-width: 1560px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 58px) clamp(18px, 4vw, 58px) 80px;
}

.page-view {
  animation: page-in .32s ease both;
}

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

.page-heading > div:first-child {
  max-width: 780px;
}

.child-heading-content {
  display: flex;
  align-items: center;
  gap: 18px;
}

.child-profile-photo {
  display: grid;
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  place-content: center;
  overflow: hidden;
  border: 2px solid #d4d0c4;
  border-radius: 50%;
  color: var(--petrol);
  background: #e9efe8;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 32px;
  font-weight: 700;
}

.child-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.child-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.page-heading h1,
.page-heading p {
  margin: 0;
}

.page-heading h1,
.section-heading h2,
.overview-card h2,
.document-lane h2,
.dialog-heading h2 {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-weight: 700;
  letter-spacing: .04em;
}

.page-heading h1 {
  margin-top: 7px;
  font-size: clamp(28px, 4vw, 50px);
  line-height: 1.28;
}

.page-heading h1 + p {
  margin-top: 11px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

.eyebrow {
  color: var(--vermillion);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.overview-heading {
  display: none;
}

.overview-heading > div:first-child {
  position: relative;
}

.overview-heading > div:first-child::before {
  position: absolute;
  top: 39px;
  left: -28px;
  width: 3px;
  height: 63px;
  content: "";
  background: var(--vermillion);
}

.date-stamp {
  display: grid;
  width: 108px;
  height: 108px;
  flex: 0 0 108px;
  place-content: center;
  justify-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgb(252 250 244 / 60%);
}

.date-stamp span,
.date-stamp small {
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: .12em;
}

.date-stamp strong {
  font-family: Georgia, serif;
  font-size: 35px;
  line-height: 1;
}

.workflow-panel,
.overview-card,
.detail-sheet,
.record-list,
.document-lane {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(252 250 244 / 88%);
  box-shadow: var(--shadow);
}

.workflow-panel {
  padding: clamp(22px, 3vw, 36px);
}

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

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

.section-heading h2 {
  margin-top: 5px;
  font-size: clamp(20px, 3vw, 30px);
}

.section-heading > p {
  max-width: 480px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.workflow-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.workflow-list li {
  position: relative;
  display: flex;
  min-height: 222px;
  flex-direction: column;
  padding: 58px 24px 20px 0;
  border-top: 1px solid var(--line-strong);
  counter-increment: step;
}

.workflow-list li:not(:last-child)::after {
  position: absolute;
  top: -6px;
  right: 9px;
  width: 11px;
  height: 11px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  content: "";
  background: var(--paper-bright);
  transform: rotate(45deg);
}

.workflow-list li::before {
  position: absolute;
  top: 16px;
  left: 0;
  content: "0" counter(step);
  color: var(--vermillion);
  font-family: Georgia, serif;
  font-size: 12px;
}

.workflow-list li > span {
  position: absolute;
  top: 15px;
  left: 30px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: .08em;
}

.workflow-list strong {
  display: block;
  min-height: 46px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 16px;
  line-height: 1.55;
}

.workflow-list p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.75;
}

.usage-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: auto;
}

.usage-action {
  width: fit-content;
  margin-top: auto;
  padding: 0;
  border: 0;
  color: #1d6264;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: transparent;
  cursor: pointer;
}

.usage-action:hover,
.usage-action:focus-visible {
  color: var(--vermillion);
}

.usage-action span { margin-left: 3px; }
.usage-actions .usage-action { margin-top: 0; }

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.overview-card {
  padding: 27px 30px;
}

.overview-card h2,
.overview-card p { margin: 0; }
.overview-card h2 { margin-top: 6px; font-size: 21px; }
.overview-card > p:last-child { margin-top: 14px; color: var(--ink-soft); font-size: 12px; line-height: 1.8; }

.overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.accent-card {
  border-color: #d8b8a7;
  background:
    linear-gradient(120deg, rgb(168 67 45 / 6%), transparent 55%),
    var(--paper-bright);
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }

.button-primary {
  color: white;
  background: var(--forest);
  box-shadow: 0 8px 18px rgb(18 59 61 / 16%);
}

.button-primary:hover { background: var(--forest-deep); }

.button-secondary {
  border-color: var(--forest);
  color: var(--forest);
  background: var(--paper-bright);
}

.button-secondary:hover { background: var(--forest-pale); }

.button-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}

.button-danger { border-color: #b75f53; color: #842d26; background: #fbeae5; }

.section-tabs {
  display: inline-flex;
  gap: 3px;
  margin-bottom: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(252 250 244 / 70%);
}

.section-tabs button {
  min-height: 40px;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.section-tabs button[aria-selected="true"] { color: white; background: var(--forest); }

.subsection-card,
.admin-section,
.support-cycle,
.generation-evidence,
.schedule-lane {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(252 250 244 / 88%);
  box-shadow: var(--shadow);
}

.subsection-card,
.admin-section { padding: clamp(20px, 3vw, 30px); }

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

.subsection-heading h2,
.subsection-heading p { margin: 0; }
.subsection-heading h2 { margin: 5px 0 6px; font-size: 23px; }
.subsection-heading p:last-child { color: var(--ink-soft); font-size: 11px; line-height: 1.7; }

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

.guardian-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.guardian-card.is-primary { border-color: #91ac8e; box-shadow: inset 4px 0 0 var(--sage); }
.guardian-heading { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.guardian-heading h3 { margin: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 17px; }
.guardian-heading > span { color: var(--ink-soft); font-size: 10px; }
.primary-contact-chip { padding: 4px 7px; border-radius: 999px; color: var(--forest); background: var(--forest-pale); font-size: 9px; }
.guardian-card dl { display: grid; grid-template-columns: 55px 1fr; gap: 5px 8px; margin: 0; font-size: 11px; }
.guardian-card dt { color: var(--ink-soft); }
.guardian-card dd { margin: 0; overflow-wrap: anywhere; }
.guardian-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.guardian-actions .button { min-height: 38px; padding: 7px 12px; }

.attendance-history-month { width: 180px; }
.attendance-history-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.attendance-history-summary-item {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-bright);
}
.attendance-history-summary-item strong { color: var(--forest-deep); font-family: var(--font-display); font-size: 26px; }
.attendance-history-summary-item span { color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.attendance-history-summary-item.status-arrived { border-color: #9dbda7; background: #f0f7f0; }
.attendance-history-summary-item.status-absent { border-color: #e6c8b4; background: #fff6ee; }

.attendance-history-list { display: grid; border-top: 1px solid var(--line); }
.attendance-history-row {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(130px, .55fr) minmax(220px, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 60px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 58%);
}
.attendance-history-row time { color: var(--forest-deep); font-weight: 800; }
.attendance-history-row > span { color: var(--ink-soft); font-size: 10px; text-align: right; }
.attendance-history-status { width: fit-content; padding: 5px 9px; border-radius: 999px; color: var(--forest); background: var(--forest-pale); font-size: 11px; }
.attendance-history-status.status-arrived { color: #35654d; background: #dcecdf; }
.attendance-history-status.status-absent { color: #8e5130; background: #fae6d5; }

.schedule-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.schedule-lane { min-width: 0; overflow: hidden; }
.schedule-lane > header { padding: 22px 24px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, rgb(118 149 123 / 15%), transparent 68%); }
.schedule-lane.planned > header { background: linear-gradient(135deg, rgb(168 67 45 / 12%), transparent 68%); }
.schedule-lane > header span { color: var(--vermillion); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.schedule-lane h2 { margin: 5px 0; font-size: 23px; }
.schedule-lane > header p { margin: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.65; }
.schedule-content { min-height: 230px; padding: 20px; }
.schedule-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--ink-soft); font-size: 10px; }
.schedule-summary { margin: 14px 0; padding: 11px 13px; border-radius: 9px; background: var(--paper); font-size: 11px; line-height: 1.7; white-space: pre-wrap; }
.schedule-item-list { display: grid; gap: 1px; margin: 14px 0 0; padding: 0; list-style: none; }
.schedule-item-list li { display: grid; grid-template-columns: 45px 120px 1fr; gap: 8px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line); font-size: 10px; }
.schedule-item-list li > span:last-child { grid-column: 3; color: var(--ink-soft); font-size: 9px; }
.schedule-day { color: var(--vermillion); font-weight: 800; }
.schedule-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.muted-copy { color: var(--ink-soft); font-size: 10px; }

.support-cycle { margin-bottom: 20px; padding: clamp(20px, 3vw, 30px); }
.support-cycle-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.support-cycle-list li { position: relative; min-width: 0; padding: 18px 18px 15px; border-top: 1px solid var(--line-strong); }
.support-cycle-list li:not(:last-child)::after { position: absolute; top: -5px; right: -1px; width: 9px; height: 9px; border-top: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong); content: ""; background: var(--paper-bright); transform: rotate(45deg); }
.support-cycle-list li > span { display: block; color: var(--vermillion); font-family: Georgia, serif; font-size: 10px; }
.support-cycle-list strong,
.support-cycle-list small { display: block; }
.support-cycle-list strong { margin-top: 8px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 13px; }
.support-cycle-list small { min-height: 30px; margin-top: 5px; color: var(--ink-soft); font-size: 9px; line-height: 1.5; }
.support-cycle-list li.is-complete { background: rgb(118 149 123 / 8%); }
.support-cycle-list li.is-current { border-top: 3px solid var(--vermillion); padding-top: 16px; }
.support-cycle-list li > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.support-cycle-list button { padding: 0; border: 0; color: var(--forest); background: transparent; font-size: 9px; font-weight: 800; text-decoration: underline; }

.detail-sheet {
  padding: clamp(20px, 3vw, 34px);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.detail-grid > div {
  display: flex;
  min-height: 106px;
  flex-direction: column;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgb(220 232 226 / 28%), transparent 42%);
}

.detail-grid > .wide { grid-column: span 3; }
.detail-grid dt {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 4px;
  color: #476866;
  font-family: "BIZ UDPGothic", "Yu Gothic", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1.35;
  background: rgb(220 232 226 / 68%);
}

.detail-grid dd {
  margin: 13px 0 0;
  color: var(--forest-deep);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .015em;
  line-height: 1.65;
  white-space: pre-wrap;
}

.detail-grid dd.is-empty {
  color: #7e8d8b;
  font-size: 12px;
  font-weight: 500;
}

.detail-grid > .certificate-expiry-soon { background: #fff8e9; }
.detail-grid > .certificate-expiry-soon dd { color: var(--warning); }
.detail-grid > .certificate-expiry-expired { background: #fff0ec; }
.detail-grid > .certificate-expiry-expired dd { color: var(--error); }
.detail-grid > .certificate-expiry-valid dd { color: var(--forest); }

.empty-state {
  display: grid;
  min-height: 220px;
  place-content: center;
  justify-items: center;
  padding: 28px;
  color: var(--ink-soft);
  text-align: center;
}

.empty-state.compact {
  min-height: 100px;
  justify-items: start;
  padding: 22px 0 0;
  text-align: left;
}

.empty-state strong { color: var(--ink); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 17px; }
.empty-state p { max-width: 460px; margin: 8px 0 0; font-size: 12px; line-height: 1.7; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  margin-top: 18px;
}

.summary-grid div {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-bright);
}

.summary-grid small,
.summary-grid strong { display: block; }
.summary-grid small { color: var(--ink-soft); font-size: 9px; }
.summary-grid strong { margin-top: 4px; font-family: inherit; font-size: 12px; }

.record-list {
  display: grid;
  min-height: 220px;
  overflow: hidden;
}

.record-list:not(.empty-state) { align-content: start; }

.record-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 26px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
}

.record-item:last-child { border-bottom: 0; }
.record-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.record-actions .button { min-height: 38px; padding-inline: 15px; }
.record-date { color: var(--ink-soft); font-family: Georgia, serif; font-size: 12px; }
.record-date strong { display: block; margin-top: 5px; color: var(--ink); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 16px; }
.record-body h2 { margin: 0 0 12px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 18px; }
.record-body dl { display: grid; grid-template-columns: 112px 1fr; gap: 7px 18px; margin: 0; font-size: 12px; line-height: 1.7; }
.record-body dt { color: var(--ink-soft); font-weight: 700; }
.record-body dd { margin: 0; white-space: pre-wrap; }
.record-draft-note { margin: -4px 0 13px; color: var(--terra); font-size: 14px; font-weight: 700; }

.tag-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; padding: 0; list-style: none; }
.tag-list li { padding: 4px 8px; border-radius: 999px; color: var(--forest); background: var(--forest-pale); font-size: 9px; font-weight: 700; }

.document-workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin: 2px 0 20px;
  padding: 0 2px 18px;
  border-bottom: 2px solid var(--forest);
}

.document-workspace-header h1 { margin: 5px 0 0; }

.document-process {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.document-process li { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.document-process span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: white; background: var(--forest); font-family: Georgia, serif; font-size: 12px; }

.document-flow-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  max-width: 960px;
  margin-inline: auto;
}

.document-lane {
  display: grid;
  grid-template-columns: 64px minmax(260px, 1fr) minmax(310px, .92fr);
  grid-template-areas: "index heading record";
  align-items: stretch;
  min-width: 0;
  overflow: visible;
  box-shadow: none;
}
.document-lane-index { display: grid; grid-area: index; min-width: 0; place-items: start center; padding-top: 25px; color: var(--forest); font-family: Georgia, serif; font-size: 13px; font-weight: 700; }
.document-lane-index::before { display: block; width: 30px; height: 30px; border-radius: 50%; content: ""; background: var(--forest); box-shadow: 0 0 0 5px var(--paper); }
.document-lane-index { position: relative; }
.document-lane-index { color: transparent; }
.document-lane-index::after { position: absolute; top: 32px; color: white; content: attr(aria-label); font-size: 10px; }
.document-lane-index { --step-number: ""; }
.document-lane.assessment .document-lane-index::after { content: "01"; }
.document-lane.individual .document-lane-index::before { background: var(--terra); }
.document-lane.individual .document-lane-index::after { content: "02"; }
.document-lane.monitoring .document-lane-index::before { background: #887153; }
.document-lane.monitoring .document-lane-index::after { content: "03"; }
.document-lane-heading {
  grid-area: heading;
  min-height: 0;
  padding: 22px 20px 20px 0;
  border: 0;
}

.document-lane-step { min-height: 0; margin: 0 0 7px; color: var(--ink-soft); font-size: 11px; font-weight: 800; letter-spacing: .08em; }

.document-lane h2 { margin: 0 0 6px; font-size: 24px; }
.document-lane h2:last-child { margin-bottom: 0; }
.document-lane-heading > p:not(.document-lane-step) { min-height: 0; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.document-lane-record { display: grid; grid-area: record; align-content: center; gap: 12px; min-width: 0; padding: 18px 20px; border-left: 1px solid var(--line); background: rgb(252 250 244 / 58%); }
.document-lane-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0; }
.document-lane-controls .button { width: max-content; }
.readiness-copy { display: block; min-height: 0; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }

.document-list {
  min-height: 0;
  margin: 0;
}

.document-list.empty-state { box-shadow: none; border: 0; border-radius: 0; background: transparent; }

.document-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.document-item:last-child { border-bottom: 0; }
.document-item strong { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 15px; }
.document-item--compact .document-actions { order: 1; }
.document-item--compact .document-date-meta { order: 2; }
.document-date-meta {
  display: grid;
  grid-column: 1 / -1;
  gap: 3px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.4;
}

.document-date-meta span { display: block; }
.status-chip { align-self: start; padding: 4px 8px; border-radius: 999px; color: var(--forest); background: var(--forest-pale); font-size: 9px; font-weight: 800; }
.status-chip.status-inactive,
.status-chip.status-suspended,
.status-chip.status-ended { color: #6f3930; background: var(--vermillion-soft); }
.document-actions { display: flex; grid-column: 1 / -1; flex-wrap: wrap; gap: 7px; }
.document-actions .button { min-height: 34px; padding: 6px 10px; font-size: 9px; }
.pdf-action-error { align-self: center; color: #762f2a; font-size: 10px; line-height: 1.5; }

.reference-material-view {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.reference-material-field {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgb(252 250 244 / 80%);
}

.reference-material-field strong { display: block; font-size: 13px; }
.reference-material-field p { margin: 7px 0 0; white-space: pre-wrap; font-size: 14px; line-height: 1.65; }
.reference-material-field p.is-empty { color: var(--ink-soft); }

.document-reference-panel,
.generation-evidence {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(252 250 244 / 88%);
}

.document-reference-panel { width: 100%; }
.document-reference-inline { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.document-reference-inline summary { min-height: 0; padding: 12px 0 0; }
.document-reference-inline summary strong { font-size: 14px; }
.document-reference-inline summary small { font-size: 11px; }
.document-reference-inline summary::after { font-size: 17px; }

.document-reference-panel summary,
.generation-evidence summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-height: 70px;
  padding: 15px 22px;
  cursor: pointer;
  list-style: none;
}

.document-reference-panel summary::-webkit-details-marker,
.generation-evidence summary::-webkit-details-marker { display: none; }
.document-reference-panel summary::after,
.generation-evidence summary::after { color: var(--forest); content: "＋"; font-size: 22px; line-height: 1; }
.document-reference-panel[open] summary::after,
.generation-evidence[open] summary::after { content: "−"; }
.document-reference-panel summary strong { display: block; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 18px; }
.document-reference-panel summary small { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 12px; }
.document-reference-panel summary em { padding: 4px 8px; border-radius: 999px; color: var(--terra); background: var(--vermillion-soft); font-size: 11px; font-style: normal; font-weight: 800; }
.document-reference-content { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; padding: 16px 18px 18px; border-top: 1px solid var(--line); }
.document-reference-inline .document-reference-content { padding: 14px 0 0; border-top: 0; }
.document-reference-content p { margin: 0 0 14px; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.document-reference-content .document-list { min-height: 0; border: 1px solid var(--line); border-radius: 10px; background: white; }
.document-reference-content .document-list.empty-state { padding: 18px; border: 1px solid var(--line); border-radius: 10px; }

.generation-evidence summary { color: var(--forest); font-size: 14px; font-weight: 800; }
.generation-evidence-content { display: grid; grid-template-columns: minmax(180px, .65fr) 1.35fr; gap: 24px; align-items: start; padding: 22px 26px 24px; border-top: 1px solid var(--line); }

.form-section-label {
  margin: 8px 0 -2px;
  padding: 10px 12px;
  border-left: 3px solid var(--vermillion);
  color: var(--forest);
  background: var(--forest-pale);
  font-size: 13px;
  font-weight: 800;
}

.pdf-panel {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 18px;
  align-items: center;
  margin: 5px -4px -2px;
  padding: 15px 16px;
  border: 1px solid #d7dfd7;
  border-radius: 11px;
  background: linear-gradient(135deg, #f1f5ef, #fff 72%);
}

.pdf-panel-heading h3,
.pdf-panel-heading p { margin: 0; }
.pdf-panel-heading h3 { color: var(--forest); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 15px; }
.pdf-panel-heading p { margin-top: 4px; color: var(--ink-soft); font-size: 10px; line-height: 1.6; }
.pdf-create-button { min-height: 38px; padding: 8px 12px; font-size: 10px; }
.pdf-error,
.pdf-success,
.pdf-empty { grid-column: 1 / -1; margin: 0; font-size: 10px; line-height: 1.6; }
.pdf-error { padding: 9px 11px; border-left: 3px solid var(--error); color: #762f2a; background: #fbeae5; }
.pdf-success { padding: 9px 11px; border-left: 3px solid var(--green); color: var(--forest); background: #eef5ef; }
.pdf-empty { color: var(--ink-soft); }

.pdf-snapshot-list {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pdf-snapshot-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-top: 1px solid var(--line);
}

.pdf-snapshot-list strong,
.pdf-snapshot-list span { display: block; }
.pdf-snapshot-list strong { font-family: inherit; font-size: 10px; }
.pdf-snapshot-list div > span { margin-top: 2px; color: var(--ink-soft); font-size: 9px; }
.pdf-snapshot-list a { display: inline-flex; min-height: 34px; gap: 5px; align-items: center; padding: 5px 7px; color: var(--forest); font-size: 10px; font-weight: 800; text-underline-offset: 3px; }
.pdf-snapshot-list a span { font-size: 11px; }
.monitoring-result-list { display: grid; grid-column: 1 / -1; gap: 7px; margin: 3px 0 0; padding: 0; list-style: none; }
.monitoring-result-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 7px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.monitoring-result-list strong { font-family: inherit; font-size: 10px; }
.monitoring-result-list .button { min-height: 32px; padding: 5px 8px; font-size: 9px; }
.evaluation-chip { padding: 4px 7px; border-radius: 999px; color: var(--forest); background: var(--forest-pale); font-size: 8px; font-weight: 800; }
.evaluation-chip.status-needs_review { color: #7b4519; background: #f6e5c7; }
.evaluation-chip.status-not_evaluated { color: #5b6261; background: #e7e9e8; }

.generation-evidence h2,
.generation-evidence p { margin: 0; }
.generation-evidence h2 { margin-top: 5px; font-size: 21px; }
.generation-evidence-content > p { color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.review-warning { padding: 12px 14px; border-left: 3px solid var(--vermillion); color: var(--ink); background: var(--vermillion-soft); font-size: 11px; line-height: 1.7; }
.evidence-counts { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.evidence-counts div { padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.evidence-counts dt { color: var(--ink-soft); font-size: 8px; }
.evidence-counts dd { margin: 3px 0 0; font-family: Georgia, serif; font-size: 16px; }
.evidence-source { grid-column: 1 / -1; color: var(--ink-soft); font-size: 10px; }

.admin-principle { display: grid; grid-template-columns: 150px 1fr; gap: 20px; margin-bottom: 18px; padding: 16px 20px; border-left: 4px solid var(--vermillion); background: var(--vermillion-soft); }
.admin-principle p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.7; }
.attendance-toolbar { display: grid; grid-template-columns: minmax(0, .4fr) minmax(0, .6fr); gap: 14px; align-items: end; margin: 22px 0 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.attendance-toolbar .field { min-width: 0; margin: 0; }
.attendance-toolbar .field input { min-width: 0; }
.attendance-summary { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: 10px; align-self: center; }
.attendance-results-bar { display: flex; flex-wrap: wrap; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 8px; }
.attendance-results-bar p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.attendance-links { display: grid; justify-items: start; gap: 6px; }
.attendance-links .button { white-space: normal; }
#view-today .page-heading h1 { font-family: inherit; font-size: 28px; letter-spacing: .02em; }
.attendance-summary-item { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid transparent; border-radius: 999px; color: var(--ink-soft); background: var(--paper); font: inherit; font-size: 12px; font-weight: 800; white-space: nowrap; }
.attendance-bulk-controls { display: flex; flex-wrap: wrap; align-items: center; grid-column: 1 / -1; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.attendance-bulk-controls > span { color: var(--ink-soft); font-size: 11px; }
.attendance-bulk-controls > strong { min-width: 88px; color: var(--forest-deep); font-size: 12px; }
.attendance-bulk-controls .button { min-height: 36px; padding: 6px 11px; font-size: 11px; }
.attendance-filter { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.attendance-filter:hover { transform: translateY(-1px); }
.attendance-filter:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.attendance-filter.is-active { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.attendance-summary-item.status-scheduled { color: #385d82; background: #e9f0f6; }
.attendance-summary-item.status-arrived { color: var(--forest); background: var(--forest-pale); }
.attendance-summary-item.status-absent { color: #7b4519; background: #f6e5c7; }
.attendance-list { display: grid; gap: 8px; }
.attendance-row { display: grid; grid-template-columns: 28px minmax(180px, 1fr) auto auto; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.attendance-selection { display: grid; width: 28px; height: 36px; cursor: pointer; place-items: center; }
.attendance-selection input { width: 18px; height: 18px; margin: 0; accent-color: var(--forest); cursor: pointer; }
.attendance-selection input:disabled { cursor: not-allowed; }
.attendance-identity strong,
.attendance-identity span { display: block; }
.attendance-identity strong { font-family: inherit; font-size: 16px; overflow-wrap: anywhere; }
.attendance-identity span { margin-top: 3px; color: var(--ink-soft); font-size: 12px; overflow-wrap: anywhere; }
.attendance-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.attendance-status-button { min-height: 44px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink-soft); background: white; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.attendance-status-button:hover:not(:disabled),
.attendance-status-button:focus-visible { border-color: var(--forest); color: var(--forest); }
.attendance-status-button.status-scheduled.is-selected { border-color: #6686a2; color: #385d82; background: #e9f0f6; }
.attendance-status-button.status-arrived.is-selected { border-color: var(--forest); color: var(--forest); background: var(--forest-pale); }
.attendance-status-button.status-absent.is-selected { border-color: #c07a41; color: #7b4519; background: #f6e5c7; }
.attendance-status-button:disabled { cursor: not-allowed; opacity: .62; }
.attendance-open-child { min-height: 36px; padding: 4px; border: 0; color: var(--forest); background: transparent; font: inherit; font-size: 12px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.transport-toolbar { display: grid; grid-template-columns: minmax(160px, .3fr) 1fr; gap: 16px; align-items: end; margin: 22px 0 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.transport-toolbar .field { margin: 0; }
.transport-toolbar p { max-width: 640px; margin: 0 0 3px; color: var(--ink-soft); font-size: 10px; line-height: 1.7; }
.transport-route-list { display: grid; gap: 18px; }
.transport-direction > h2 { margin: 0 0 8px; color: var(--forest); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 20px; }
.transport-direction { display: grid; gap: 8px; }
.transport-route-card { position: relative; padding: 17px 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; }
.transport-route-card::before { position: absolute; top: 0; bottom: 0; left: 0; width: 4px; content: ""; background: var(--forest); }
.transport-route-heading { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.transport-route-heading h3,
.transport-route-heading p { margin: 0; }
.transport-route-heading h3 { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 17px; }
.transport-route-heading p { margin-top: 4px; color: var(--ink-soft); font-size: 9px; }
.transport-direction-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 8px; border-radius: 999px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.transport-direction-chip.pickup { color: #385d82; background: #e9f0f6; }
.transport-direction-chip.dropoff { color: var(--forest); background: var(--forest-pale); }
.transport-stop-list { display: grid; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; counter-reset: transport-stop; }
.transport-stop-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 8px; align-items: start; padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.transport-stop-list li::before { align-self: center; width: 22px; height: 22px; border-radius: 50%; color: white; content: counter(transport-stop); counter-increment: transport-stop; background: var(--forest); font-size: 9px; font-weight: 800; line-height: 22px; text-align: center; }
.transport-stop-list strong,
.transport-stop-list span { display: block; }
.transport-stop-list strong { font-size: 11px; }
.transport-stop-list span { margin-top: 2px; color: var(--ink-soft); font-size: 9px; line-height: 1.5; }
.transport-route-notes { margin: 11px 0 0; padding: 8px 10px; border-left: 3px solid var(--vermillion); color: var(--ink-soft); background: var(--vermillion-soft); font-size: 10px; line-height: 1.6; }
.transport-map-link { display: inline-flex; margin-top: 12px; color: var(--forest); font-size: 10px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.transport-map-note { margin: 12px 0 0; color: var(--ink-soft); font-size: 9px; }
.transport-child-picker { margin-top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 11px; }
.transport-child-picker .subsection-heading { margin-bottom: 12px; }
.transport-child-picker .field { margin: 0; }
.transport-child-options { display: grid; max-height: 330px; gap: 7px; overflow: auto; padding-right: 3px; }
.transport-child-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; cursor: pointer; }
.transport-child-option.is-selected { border-color: var(--forest); background: var(--forest-pale); }
.transport-child-option input { width: 17px; height: 17px; accent-color: var(--forest); }
.transport-child-option strong,
.transport-child-option small { display: block; }
.transport-child-option strong { font-size: 10px; }
.transport-child-option small { margin-top: 2px; color: var(--ink-soft); font-size: 8px; overflow-wrap: anywhere; }
.transport-child-option em { color: var(--forest); font-size: 9px; font-style: normal; font-weight: 800; }
.transport-empty { margin: 0; padding: 14px; color: var(--ink-soft); font-size: 10px; text-align: center; }
.admin-section { margin-top: 18px; }
.facility-admin-list,
.staff-list { display: grid; gap: 9px; }
.facility-admin-card,
.staff-card { display: grid; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.facility-admin-card { grid-template-columns: minmax(180px, 1fr) auto auto; }
.staff-card { grid-template-columns: minmax(180px, 1fr) auto minmax(140px, .55fr) auto; }
.facility-admin-card h3,
.facility-admin-card p,
.staff-card h2,
.staff-card p { margin: 0; }
.facility-admin-card h3,
.staff-card h2 { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 16px; }
.facility-admin-card p,
.staff-card p { margin-top: 4px; color: var(--ink-soft); font-size: 9px; }
.staff-identity a { display: block; margin-top: 3px; color: var(--forest); font-size: 9px; overflow-wrap: anywhere; }
.staff-role { display: flex; gap: 7px; align-items: center; }
.staff-role > strong { font-size: 10px; }
.staff-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.staff-card .invitation-warning { grid-column: 1 / -1; margin-top: 0; padding: 8px 10px; border-left: 3px solid var(--error); color: var(--error); background: #fff7f3; font-size: 10px; }

.audit-list { max-width: 100%; overflow-x: auto; }
.audit-list table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 9px; }
.audit-list th,
.audit-list td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; overflow-wrap: anywhere; }
.audit-list th { color: var(--ink-soft); background: var(--paper); }
.audit-list td:nth-child(2),
.audit-list td:nth-child(4) { max-width: 180px; font-family: ui-monospace, "Cascadia Mono", monospace; }

.workflow-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); }
.workflow-dialog h3 { font-size: 15px; }
.workflow-events { display: grid; gap: 0; margin: 0; padding: 0 0 0 20px; list-style: none; }
.workflow-events li { position: relative; display: grid; grid-template-columns: minmax(120px, .8fr) 1fr 1fr; gap: 9px; padding: 13px 0 13px 20px; border-left: 1px solid var(--line-strong); font-size: 9px; }
.workflow-events li::before { position: absolute; top: 16px; left: -5px; width: 9px; height: 9px; border-radius: 50%; content: ""; background: var(--vermillion); }
.workflow-events li p { grid-column: 1 / -1; margin: 0; color: var(--ink-soft); }

.app-dialog.schedule-dialog { width: min(1020px, calc(100vw - 32px)); }
.schedule-items-fieldset,
.facility-checks { margin: 22px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 11px; }
.schedule-items-fieldset legend,
.facility-checks legend { padding: 0 7px; font-size: 11px; font-weight: 800; }
.schedule-item-row { position: relative; display: grid; grid-template-columns: 80px 110px 180px minmax(160px, 1fr) minmax(130px, .8fr) 104px; gap: 8px; align-items: end; padding: 4px 0 14px; border-bottom: 1px solid var(--line); }
.schedule-item-row .field { margin-top: 8px; }
.schedule-row-actions { display: flex; align-items: end; gap: 6px; padding-bottom: 2px; }
.schedule-row-actions .button { min-height: 42px; padding: 0 11px; }
.schedule-row-actions .icon-button { flex: 0 0 38px; }
.time-pair { display: grid; grid-template-columns: 70px 1fr; gap: 5px; }
.facility-checks > div { display: flex; flex-wrap: wrap; gap: 8px; }
.facility-checks label { display: flex; gap: 7px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: 10px; }
.facility-checks input { width: 17px; height: 17px; accent-color: var(--forest); }
.currency-input { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }

.app-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(88vh, 900px);
  padding: 28px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  color: var(--ink);
  background: var(--paper-bright);
  box-shadow: 0 28px 80px rgb(12 46 49 / 28%);
}

.app-dialog::backdrop {
  background: rgb(10 37 39 / 63%);
  backdrop-filter: blur(3px);
}

.app-dialog[open] { animation: dialog-in .22s ease both; }
.form-dialog { width: min(790px, calc(100vw - 32px)); padding: 0; overflow: hidden; }
.form-dialog > form { max-height: min(88vh, 900px); overflow-y: auto; padding: 28px; scrollbar-gutter: stable; }

/* 帳票の編集はPC操作を基本に、一覧性を優先した作業幅にする。 */
@media (min-width: 1121px) {
  #assessment-editor-dialog,
  #plan-editor-dialog,
  #monitoring-editor-dialog,
  #support-record-editor-dialog,
  #reference-plan-editor-dialog {
    width: min(1240px, calc(100vw - 96px));
  }

  #assessment-editor-dialog > form,
  #plan-editor-dialog > form,
  #monitoring-editor-dialog > form,
  #support-record-editor-dialog > form,
  #reference-plan-editor-dialog > form {
    max-height: min(92vh, 1040px);
    padding: 34px 40px 38px;
  }

  #child-register-dialog,
  #child-edit-dialog {
    width: min(1040px, calc(100vw - 72px));
  }
}

.daily-summary-dialog { width: min(860px, calc(100vw - 32px)); padding: 0; overflow: hidden; background: var(--paper-bright); }
.daily-summary-card { padding: clamp(24px, 4vw, 42px); background: linear-gradient(135deg, #fbfaf3 0 68%, #e5f0e9 68% 100%); }
.daily-summary-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.daily-summary-header h2 { margin: 4px 0 7px; color: var(--forest); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(25px, 4vw, 34px); letter-spacing: .08em; }
.daily-summary-meta { margin: 0; color: var(--ink-soft); font-size: 13px; }
.daily-summary-story { display: grid; grid-template-columns: minmax(148px, .5fr) 1.5fr; gap: 24px; align-items: center; margin: 22px 0 20px; padding: 14px 22px 14px 12px; overflow: hidden; border: 1px solid #d8e6df; border-radius: 18px; background: linear-gradient(112deg, #eff7f1 0%, #fbfaf3 57%, #fdf5eb 100%); }
.daily-summary-illustration { display: grid; height: 172px; margin: 0; place-items: end center; }
.daily-summary-illustration img { display: block; width: min(100%, 148px); height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 8px 7px rgb(31 77 66 / 14%)); }
.daily-summary-story-copy { display: grid; gap: 7px; min-width: 0; }
.daily-summary-story-kicker { color: var(--terra); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.daily-summary-story-copy strong { color: var(--forest); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(21px, 3vw, 28px); line-height: 1.35; }
.daily-summary-story-copy p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.daily-summary-parent-map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin: 0; }
.daily-summary-parent-card { position: relative; display: grid; justify-items: start; align-content: start; gap: 9px; min-height: 188px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; color: var(--forest); background: rgb(255 254 250 / 92%); }
.daily-summary-parent-card:not(.is-response)::after { position: absolute; z-index: 1; top: 40px; right: -22px; display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #d8e3d7; border-radius: 50%; color: var(--sage); content: "→"; background: var(--paper-bright); font-size: 16px; }
.daily-summary-parent-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; color: white; background: var(--forest); font-family: Georgia, serif; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.daily-summary-parent-card.is-activity .daily-summary-parent-icon { background: var(--terra); }
.daily-summary-parent-card.is-response .daily-summary-parent-icon { background: #8a7354; }
.daily-summary-parent-card strong { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 16px; }
.daily-summary-parent-card p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.daily-summary-parent-health { display: grid; grid-column: 1 / -1; grid-template-columns: 26px 1fr; column-gap: 9px; margin: 1px 0 0; padding: 14px 16px; border: 1px solid #e8c9ad; border-radius: 13px; background: #fff7ed; }
.daily-summary-parent-health > span { display: grid; grid-row: span 2; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: white; background: #b86a42; font-weight: 800; }
.daily-summary-parent-health strong { color: #8b5731; font-size: 13px; }
.daily-summary-parent-health p { margin: 3px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.daily-summary-actions { margin: 0; padding: 16px 22px; border-top: 1px solid var(--line); background: #fffdf8; }

.document-goal-editor {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.document-goal-editor h3 { margin: 0 0 14px; font-size: 1.1rem; }

.document-goal-editor > div { display: grid; gap: 14px; }

.document-goal-editor article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-subtle);
}

.dialog-close-form {
  position: sticky;
  z-index: 2;
  top: 0;
  float: right;
  margin: -10px -10px 0 12px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--paper-bright);
  font-size: 22px;
}

.dialog-heading h2,
.dialog-heading p { margin: 0; }
.dialog-heading h2 { margin: 6px 0 8px; font-size: 26px; }
.dialog-heading h2 + p { color: var(--ink-soft); font-size: 12px; line-height: 1.7; }

.field {
  display: grid;
  gap: 7px;
  margin-top: 20px;
}

.field > span,
.checkbox-field legend {
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.field em { color: var(--error); font-size: 9px; font-style: normal; }
.field small { color: var(--ink-soft); font-size: 9px; }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  background: white;
}

.field textarea { resize: vertical; line-height: 1.7; }
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 3px rgb(157 45 45 / 10%); }

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

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

.custom-fields-editor {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-subtle);
}

.custom-fields-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.custom-fields-editor-heading strong { color: var(--forest); font-size: 15px; }
.custom-fields-editor-heading p { margin: 4px 0 0; color: var(--ink-soft); font-size: 12px; }
.custom-fields-editor-heading .button { min-height: 38px; padding-inline: 13px; font-size: 12px; }
.custom-field-rows { display: grid; gap: 10px; margin-top: 14px; }
.custom-field-row { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(280px, 1.45fr) auto; gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-bright); }
.custom-field-row .field { margin-top: 0; }
.custom-field-row textarea { height: 50px; min-height: 50px; }
.custom-field-remove { align-self: end; min-height: 42px; padding-inline: 12px; color: var(--error); }

.profile-field-visibility { margin-top: 22px; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 12px; background: #f7faf5; }
.profile-field-visibility summary { cursor: pointer; color: var(--forest); font-size: 14px; font-weight: 800; }
.profile-field-visibility p { margin: 9px 0 13px; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.profile-field-checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; }
.profile-field-checks label { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--ink); font-size: 12px; }
.profile-field-checks input { width: 16px; height: 16px; margin: 0; accent-color: var(--forest); }
.basic-updated-at { margin: 14px 2px 0; color: var(--ink-soft); font-size: 11px; text-align: right; }

#journal-form > .field-grid { align-items: start; }
.activity-preset-field { align-content: start; }
.activity-preset-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.activity-preset-actions .button { min-height: 36px; padding-inline: 12px; font-size: 12px; }
.activity-preset-field small { line-height: 1.55; }
.activity-preset-dialog { width: min(620px, calc(100vw - 32px)); }
.activity-preset-add-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.activity-preset-manager { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.activity-preset-manager .subsection-heading { margin-bottom: 10px; }
.activity-preset-list { display: grid; max-height: min(42vh, 340px); gap: 7px; overflow: auto; padding-right: 3px; }
.activity-preset-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper-bright); }
.activity-preset-item strong { min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.activity-preset-item .button { flex: 0 0 auto; min-height: 34px; padding-inline: 10px; font-size: 11px; }
.activity-preset-empty { margin: 0; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 9px; color: var(--ink-soft); text-align: center; font-size: 13px; }

.journal-writing-field > label > span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.journal-writing-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
}

.journal-writing-tools label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.journal-character-count {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.journal-character-count[data-state="short"] { color: var(--vermillion); }

.journal-writing-tools select {
  min-height: 38px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper-bright);
  font: inherit;
}

.journal-writing-tools .writing-custom-target-length {
  width: 8ch;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper-bright);
  font: inherit;
}

.journal-writing-tools .button { min-height: 40px; padding-inline: 14px; font-size: 14px; }

.journal-writing-note {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.assessment-writing-note {
  flex-basis: 100%;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.assessment-writing-tools,
.plan-writing-tools,
.journal-disclosure-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "target count"
    "compose copy";
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--forest-pale) 42%, white);
}

.assessment-writing-tools label,
.plan-writing-tools label,
.journal-disclosure-tools label { grid-area: target; min-width: 0; font-size: 12px; }
.assessment-writing-tools .journal-character-count,
.plan-writing-tools .journal-character-count,
.journal-disclosure-tools .journal-character-count { grid-area: count; justify-self: end; font-size: 12px; white-space: nowrap; }
.assessment-writing-tools .button,
.plan-writing-tools .button,
.journal-disclosure-tools .button { width: 100%; min-height: 34px; padding-inline: 9px; font-size: 12px; }
.assessment-writing-tools .button:nth-of-type(1),
.plan-writing-tools .button:nth-of-type(1),
.journal-disclosure-tools .button:nth-of-type(1) { grid-area: compose; }
.assessment-writing-tools .button:nth-of-type(2),
.plan-writing-tools .button:nth-of-type(2),
.journal-disclosure-tools .button:nth-of-type(2) { grid-area: copy; }
.assessment-writing-tools .writing-custom-target-length,
.plan-writing-tools .writing-custom-target-length,
.journal-disclosure-tools .writing-custom-target-length { width: 7.5ch; min-height: 32px; margin-left: 5px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--paper-bright); color: var(--ink); font: inherit; font-size: 12px; }
.assessment-writing-tools .assessment-writing-note { grid-column: 1 / -1; }

.writing-assist-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 10px;
  border-left: 3px solid var(--vermillion);
  color: #792424;
  background: #fae7e2;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.writing-disclosure {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--forest-pale);
}

.writing-disclosure > summary { cursor: pointer; padding: 11px 12px; color: var(--forest); font-size: 13px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; list-style-position: inside; }
.writing-disclosure > summary::marker { color: var(--terracotta); }
.writing-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.writing-disclosure .assessment-writing-tools,
.writing-disclosure .plan-writing-tools,
.writing-disclosure .journal-disclosure-tools { margin: 0; border: 0; border-radius: 0; background: transparent; }

.assessment-template-fields {
  margin-top: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: color-mix(in srgb, var(--forest-pale) 32%, white);
}

.support-record-actions { display: flex; justify-content: flex-end; margin: -55px 0 18px; }

@media (max-width: 640px) {
  .support-record-actions { justify-content: flex-start; margin: 0 0 16px; }
}

@media (max-width: 700px) {
  .daily-summary-card { padding: 22px 18px; }
  .daily-summary-story { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 12px 14px 12px 8px; }
  .daily-summary-illustration { height: 142px; }
  .daily-summary-parent-map { grid-template-columns: 1fr; }
  .daily-summary-parent-card { min-height: 0; padding: 20px 18px; }
  .daily-summary-parent-card:not(.is-response)::after { top: auto; right: auto; bottom: -23px; left: 30px; content: "↓"; }
}

@media print {
  body.daily-summary-printing { background: white; }
  body.daily-summary-printing #app-shell,
  body.daily-summary-printing .app-dialog:not(#daily-summary-dialog) { display: none !important; }
  body.daily-summary-printing #daily-summary-dialog { position: static; display: block; width: 100%; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  body.daily-summary-printing #daily-summary-dialog::backdrop,
  body.daily-summary-printing .daily-summary-actions { display: none; }
  body.daily-summary-printing .daily-summary-card { min-height: 100vh; padding: 14mm; background: white; }
}

.assessment-template-fields > summary {
  cursor: pointer;
  padding: 13px 15px;
  color: var(--forest);
  font-weight: 800;
  line-height: 1.5;
}

.assessment-template-fields > p { margin: 0; padding: 0 15px 13px; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.assessment-template-fields > .field-grid { padding: 14px; border-top: 1px solid var(--line); }

.assessment-step-nav {
  position: sticky;
  z-index: 6;
  top: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 22px 0 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(var(--paper-bright) 78%, rgb(251 250 245 / 0%));
}
.assessment-view-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.assessment-view-controls p { flex: 1 1 240px; margin: 0; color: var(--ink-soft); font-size: 13px; }
.assessment-page-controls { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; }
.assessment-page-controls p { margin: 0; color: var(--ink-soft); font-size: 13px; white-space: nowrap; }
.assessment-review-control { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--forest); font-size: 14px; }
.assessment-review-toggle { flex: 0 0 auto; width: 20px; height: 20px; accent-color: var(--forest); }
.assessment-review-help { margin: 6px 0 0 30px; color: var(--ink-soft); font-size: 12px; }
#assessment-editor-form .dialog-heading h2 { font-family: inherit; font-size: 26px; }
#assessment-editor-form > .dialog-actions { position: sticky; z-index: 7; bottom: 0; padding: 12px 0; background: var(--paper-bright); box-shadow: 0 -8px 16px var(--paper-bright); }
#assessment-editor-form .assessment-category .field { margin-top: 14px; }
#assessment-editor-form .assessment-writing-toggle { min-height: 32px; padding: 5px 9px; font-size: 12px; }

.assessment-step-nav button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  grid-template-areas: "number name" "number count";
  gap: 1px 8px;
  min-width: 0;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-soft);
  background: rgb(255 255 255 / 78%);
  font: inherit;
  text-align: left;
}

.assessment-step-nav button > span {
  display: grid;
  grid-area: number;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: var(--forest);
  background: var(--forest-pale);
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 700;
}

.assessment-step-nav button > strong { grid-area: name; overflow: hidden; color: var(--ink); font-size: 13px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.assessment-step-nav button > small { grid-area: count; color: var(--ink-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.assessment-step-nav button:hover { border-color: #9ec2af; background: #f5faf4; }
.assessment-step-nav button[aria-current="step"] { border-color: var(--forest); color: white; background: var(--forest); box-shadow: 0 5px 12px rgb(18 63 64 / 14%); }
.assessment-step-nav button[aria-current="step"] > span { color: var(--forest); background: #fffdf8; }
.assessment-step-nav button[aria-current="step"] > strong,
.assessment-step-nav button[aria-current="step"] > small { color: white; }
.assessment-step-nav button[data-complete="true"]:not([aria-current="step"]) > span { color: white; background: #507e63; }
.assessment-step-nav button[data-complete="true"]:not([aria-current="step"]) > span::after { content: "✓"; font-family: inherit; font-size: 10px; }
.assessment-step-nav button[data-complete="true"]:not([aria-current="step"]) > span { font-size: 0; }

.assessment-step-panels { display: grid; gap: 18px; }
.assessment-step { scroll-margin-top: 86px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: rgb(255 255 255 / 72%); }
.assessment-step > header { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; margin-bottom: 13px; }
.assessment-step > header p { margin: 0; color: var(--terracotta); font-family: Georgia, serif; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.assessment-step > header h3 { margin: 0; color: var(--forest); font-family: inherit; font-size: 22px; }
.assessment-step > header span { grid-column: 1 / -1; margin-top: 2px; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.assessment-category { margin-top: 10px; overflow: hidden; border: 1px solid #d6e2d7; border-radius: 11px; background: #fffefa; }
.assessment-category > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; color: var(--forest); cursor: pointer; font-size: 14px; font-weight: 800; }
.assessment-category > summary::marker { color: var(--terracotta); }
.assessment-category > summary small { flex: 0 0 auto; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.assessment-category[open] > summary { border-bottom: 1px solid var(--line); background: #f4f8f2; }
.assessment-category > .field-grid { padding: 4px 16px 18px; }
.assessment-category .field > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.assessment-writing-toggle { flex: 0 0 auto; padding: 2px 7px; border: 1px solid #c6d7ca; border-radius: 999px; color: #356857; background: #f4f8f2; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.assessment-writing-toggle:hover { border-color: var(--forest); color: white; background: var(--forest); }
.assessment-writing-toggle:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }
.assessment-writing-disclosure { margin-top: 8px; }
.assessment-writing-disclosure > summary { display: none; }
.assessment-writing-disclosure[open] { border-color: #bfd7c5; }

@media (max-width: 700px) {
  .assessment-step-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-inline: -2px; padding-inline: 2px; }
  .assessment-step { padding: 16px 13px; }
  .assessment-step > header h3 { font-size: 20px; }
  .assessment-category > .field-grid { padding-inline: 12px; }
}

.draft-assist {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 18px;
  align-items: center;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid #b9cbc1;
  border-radius: 12px;
  background: linear-gradient(135deg, rgb(220 232 226 / 64%), rgb(252 250 244 / 92%));
}

.draft-assist strong,
.draft-assist p,
.draft-assist small { margin: 0; }
.draft-assist strong { color: var(--forest); font-size: 15px; }
.draft-assist p { margin-top: 4px; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.draft-assist small { grid-column: 1 / -1; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }

.checkbox-field {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.checkbox-field > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.checkbox-field label,
.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 10px;
  background: #fff;
}

.checkbox-field input,
.check-line input { width: 17px; height: 17px; accent-color: var(--forest); }

.check-line { margin-top: 20px; }

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

.form-error {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #d99b94;
  border-radius: 9px;
  color: #792424;
  background: #fae7e2;
  font-size: 11px;
  line-height: 1.65;
}

.picker-section { margin-top: 22px; }
.picker-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.picker-section-heading .eyebrow { margin: 0 0 3px; color: var(--vermillion); font-size: 9px; letter-spacing: .11em; }
.picker-section-heading h3 { margin: 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 17px; letter-spacing: .035em; }
.picker-section-heading > span { padding-bottom: 2px; color: var(--ink-soft); font-size: 10px; font-weight: 700; }

.picker-recent-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.picker-recent-list > [role="listitem"] { min-width: 0; }

.child-picker-dialog { width: min(900px, calc(100vw - 32px)); }
.picker-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  max-height: min(54vh, 480px);
  margin-top: 10px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.picker-results > [role="listitem"] {
  min-width: 0;
}

.picker-option {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 70px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 0;
  color: var(--ink);
  text-align: left;
  background: white;
}

.picker-option:hover { background: #edf3ed; }
.picker-option.is-current { background: #e3eee8; box-shadow: inset 3px 0 0 var(--vermillion); }
.picker-recent-list .picker-option { min-height: 68px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.picker-recent-list .picker-option:hover { border-color: var(--sage); background: #edf3ed; }
.picker-recent-list .picker-option.is-current { border-color: var(--sage); background: #e3eee8; }
.picker-avatar,
.picker-avatar.child-profile-photo { display: grid; width: 40px; height: 40px; flex-basis: 40px; place-content: center; border: 0; border-radius: 50%; color: white; background: var(--forest); font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 16px; }
.picker-option-copy { min-width: 0; }
.picker-option-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.picker-option strong,
.picker-option small { display: block; }
.picker-option strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-option small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; }
.picker-current-badge { flex: 0 0 auto; padding: 2px 6px; border-radius: 999px; color: var(--forest-deep); background: var(--forest-pale); font-size: 8px; font-style: normal; font-weight: 800; }
.picker-empty { padding: 28px; color: var(--ink-soft); text-align: center; font-size: 11px; }

.conflict-dialog { width: min(520px, calc(100vw - 32px)); text-align: center; }
.conflict-symbol { display: grid; width: 54px; height: 54px; margin: 0 auto 14px; place-content: center; border-radius: 50%; color: white; background: var(--error); font-size: 25px; }
.conflict-detail { display: grid; grid-template-columns: 110px 1fr; gap: 5px 10px; margin: 20px 0 0; padding: 13px; text-align: left; background: var(--paper); font-size: 10px; }
.conflict-detail dt { color: var(--ink-soft); }
.conflict-detail dd { margin: 0; }

.noscript {
  position: fixed;
  z-index: 1100;
  right: 10px;
  bottom: 10px;
  left: 10px;
  margin: 0;
  padding: 12px;
  color: white;
  text-align: center;
  background: var(--error);
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: none; }
}

@keyframes pulse {
  50% { opacity: .35; }
}

@media (max-width: 1560px) {
  .attendance-toolbar { grid-template-columns: minmax(0, .45fr) minmax(0, .55fr); }
  .attendance-summary { grid-column: 1 / -1; }
}

@media (max-width: 1120px) {
  .attendance-row { grid-template-columns: 28px minmax(0, 1fr); }
  .attendance-actions, .attendance-links { grid-column: 2; }
  .attendance-links { display: flex; flex-wrap: wrap; align-items: center; }
  :root { --sidebar-width: 232px; }
  .workflow-list { grid-template-columns: 1fr; }
  .workflow-list li { min-height: 0; padding: 18px 12px 18px 73px; border-top: 0; border-left: 1px solid var(--line-strong); }
  .workflow-list li:not(:last-child)::after { top: auto; right: auto; bottom: 3px; left: -6px; transform: rotate(135deg); }
  .workflow-list li::before { top: 19px; left: 18px; }
  .workflow-list li > span { top: 20px; left: 43px; }
  .workflow-list strong { min-height: auto; }
  .support-cycle-list { grid-template-columns: 1fr; }
  .support-cycle-list li { padding: 12px 14px 12px 54px; border-top: 0; border-left: 1px solid var(--line-strong); }
  .support-cycle-list li:not(:last-child)::after { top: auto; right: auto; bottom: 0; left: -5px; transform: rotate(135deg); }
  .support-cycle-list li > span { position: absolute; top: 14px; left: 15px; }
  .support-cycle-list li.is-current { padding-top: 12px; border-top: 0; border-left: 3px solid var(--vermillion); }
  .support-cycle-list small { min-height: 0; }
  .schedule-item-row { grid-template-columns: 70px 100px 170px 1fr 104px; }
  .schedule-item-row .schedule-location { grid-column: 4; }
  .schedule-row-actions { grid-column: 5; grid-row: 1; }
}

@media (max-width: 860px) {
  .app-shell { --sidebar-width: 0px; display: block; }
  .sidebar {
    position: relative;
    inset: auto;
    width: auto;
    max-height: none;
    padding: 16px;
    overflow: visible;
  }
  .brand { padding: 0 4px; }
  .brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
  .brand strong { font-size: 18px; }
  .current-child { padding: 11px 13px; }
  .primary-nav { grid-template-columns: repeat(5, minmax(88px, 1fr)); overflow-x: auto; padding-bottom: 3px; }
  .primary-nav button { display: flex; min-width: 88px; flex-direction: column; gap: 3px; padding: 10px 8px; text-align: center; }
  .primary-nav button[aria-current="page"] { box-shadow: inset 0 -3px 0 #d36b47; }
  .admin-nav { grid-template-columns: 28px 1fr; }
  .sidebar-note { display: none; }
  .topbar { position: relative; align-items: flex-start; }
  .workspace-context { align-items: flex-start; flex-direction: column; gap: 5px; }
  .workspace-context select { max-width: 45vw; min-width: 160px; }
  .overview-grid,
  .document-flow-columns,
  .schedule-columns,
  .attendance-toolbar,
  .transport-toolbar { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid > .wide { grid-column: span 2; }
  .attendance-history-row { grid-template-columns: minmax(130px, .7fr) minmax(110px, .55fr) 1fr; }
}

@media (max-width: 600px) {
  .topbar { gap: 9px; padding: 10px 14px; }
  .workspace-context > span,
  .workspace-context label { display: none; }
  .workspace-context select { width: min(44vw, 190px); min-width: 0; }
  .session-context { gap: 7px; }
  .save-status { min-width: 0; }
  .save-status b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .staff-context { padding-left: 8px; }
  .staff-context strong,
  .staff-context span { max-width: 72px; }
  .logout-button { padding-inline: 9px; }
  main { padding-top: 28px; }
  .page-heading { align-items: stretch; flex-direction: column; gap: 16px; }
  .page-heading h1 { font-size: 30px; }
  .child-heading-content { align-items: flex-start; }
  .child-profile-photo { width: 68px; height: 68px; flex-basis: 68px; font-size: 25px; }
  .child-heading-actions { justify-content: flex-start; }
  .journal-writing-tools { align-items: stretch; flex-direction: column; }
  .journal-writing-tools label,
  .journal-character-count,
  .journal-writing-tools select,
  .journal-writing-tools .writing-custom-target-length,
  .journal-writing-tools .button { width: 100%; }
  .assessment-writing-tools,
  .plan-writing-tools,
  .journal-disclosure-tools { display: flex; align-items: stretch; flex-direction: column; }
  .assessment-writing-tools .journal-character-count,
  .plan-writing-tools .journal-character-count,
  .journal-disclosure-tools .journal-character-count { align-self: flex-start; }
  .overview-heading { display: grid; grid-template-columns: 1fr auto; }
  .overview-heading > div:first-child::before { display: none; }
  .date-stamp { width: 76px; height: 76px; flex-basis: 76px; }
  .date-stamp strong { font-size: 26px; }
  .section-heading { align-items: start; flex-direction: column; gap: 9px; }
  .subsection-heading { align-items: stretch; flex-direction: column; }
  .section-tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .section-tabs button { padding-inline: 7px; }
  .attendance-history-month { width: 100%; }
  .attendance-history-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .attendance-history-summary-item { min-height: 66px; padding: 10px; flex-direction: column; align-items: flex-start; gap: 2px; }
  .attendance-history-row { grid-template-columns: 1fr auto; gap: 8px; }
  .attendance-history-row > span { grid-column: 1 / -1; text-align: left; }
  .workflow-panel { padding: 20px; }
  .summary-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid > .wide { grid-column: span 1; }
  .record-item { grid-template-columns: 1fr; gap: 10px; padding: 20px; }
  .record-body dl { grid-template-columns: 1fr; gap: 3px; }
  .record-body dd { margin-bottom: 9px; }
  .document-lane-heading { min-height: 0; padding: 24px; }
  .document-lane-heading p { min-height: 0; }
  .pdf-panel { grid-template-columns: 1fr; }
  .pdf-create-button { width: 100%; }
  .pdf-snapshot-list li { grid-template-columns: 1fr; }
  .pdf-snapshot-list a { min-height: 32px; }
  .guardian-list { grid-template-columns: 1fr; }
  .schedule-item-list li { grid-template-columns: 40px 1fr; }
  .schedule-item-list li strong,
  .schedule-item-list li > span:last-child { grid-column: 1 / -1; }
  .document-workspace-header { align-items: flex-start; flex-direction: column; gap: 14px; }
  .document-process { gap: 9px 16px; font-size: 12px; }
  .document-reference-content,
  .generation-evidence-content { grid-template-columns: 1fr; }
  .generation-evidence-content { padding: 20px; }
  .evidence-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-principle { grid-template-columns: 1fr; gap: 5px; }
  .facility-admin-card,
  .staff-card,
  .attendance-row { grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 10px; }
  .attendance-actions { width: 100%; }
  .attendance-status-button { flex: 1 1 0; }
  .attendance-open-child { justify-self: start; }
  .transport-route-heading { align-items: stretch; flex-direction: column; }
  .transport-direction-chip { align-self: start; }
  .workflow-events li { grid-template-columns: 1fr; }
  .workflow-events li p { grid-column: 1; }
  .monitoring-result-list li { grid-template-columns: 1fr auto; }
  .monitoring-result-list li .button { grid-column: 1 / -1; }
  .schedule-item-row { grid-template-columns: 1fr 1fr; padding-right: 0; }
  .schedule-item-row .schedule-activity,
  .schedule-item-row .schedule-location { grid-column: 1 / -1; }
  .schedule-row-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .time-pair { grid-template-columns: 68px 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: 1; }
  .custom-fields-editor { padding: 14px; }
  .custom-fields-editor-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .custom-field-row { grid-template-columns: 1fr; gap: 8px; }
  .custom-field-remove { justify-self: end; }
  .profile-field-checks { grid-template-columns: 1fr; }
  .app-dialog { padding: 22px 18px; }
  .form-dialog { padding: 0; }
  .form-dialog > form { padding: 22px 18px; }
  .picker-results { grid-template-columns: 1fr; max-height: min(52vh, 420px); }
  .dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
  #assessment-editor-form > .dialog-actions { flex-direction: row; }
  #assessment-editor-form > .dialog-actions .button { width: auto; }
  .conflict-detail { grid-template-columns: 1fr; }
  .conflict-detail dd { margin-bottom: 6px; }
}

@media (max-width: 370px) {
  .brand span:last-child { display: none; }
  .current-child strong { font-size: 15px; }
  .primary-nav { margin-inline: -16px; padding-inline: 16px; }
  .topbar { padding-inline: 10px; }
  .workspace-context select { width: 108px; font-size: 11px; }
  .staff-context strong,
  .staff-context span { max-width: 55px; }
  .logout-button { padding-inline: 7px; font-size: 10px; }
  main { padding-inline: 12px; }
  .overview-heading { grid-template-columns: 1fr; }
  .date-stamp { display: none; }
}

/* Readability is a functional requirement: this service is used by staff of all ages. */
:root { font-size: 18px; }

.eyebrow,
.brand span:last-child,
.current-child span:last-child,
.workspace-context label,
.staff-context span,
.save-status,
.logout-button,
.sidebar-note,
.primary-nav button span,
.admin-nav strong,
.admin-nav small { font-size: 14px; }

.button,
.section-tabs button,
.usage-action,
.primary-nav button,
.admin-nav { font-size: 15px; }

.button { min-height: 50px; padding-inline: 20px; }
.section-tabs button { min-height: 48px; padding-inline: 20px; }
.logout-button { min-height: 48px; padding-inline: 17px; }

.section-heading > p,
.subsection-heading p:last-child,
.workflow-list p,
.overview-card > p:last-child,
.page-heading h1 + p,
.schedule-lane > header p,
.schedule-summary,
.muted-copy,
.empty-state p,
.document-lane-heading p,
.readiness-copy,
.document-item p,
.pdf-panel-heading p,
.pdf-error,
.pdf-success,
.pdf-empty,
.generation-evidence > p,
.review-warning,
.admin-principle p,
.dialog-heading h2 + p,
.form-error { font-size: 15px; }

.workflow-list li { min-height: 242px; }
.workflow-list li > span,
.schedule-lane > header span,
.schedule-meta,
.schedule-item-list li,
.schedule-item-list li > span:last-child,
.summary-grid small,
.document-lane-heading > span,
.status-chip,
.evaluation-chip,
.evidence-counts dt,
.evidence-source { font-size: 12px; }

.usage-action { font-size: 15px; }
.subsection-heading h2,
.schedule-lane h2 { font-size: 26px; }
.guardian-heading h3 { font-size: 19px; }
.guardian-heading > span,
.primary-contact-chip,
.guardian-card dl { font-size: 15px; }
.primary-contact-chip { padding: 5px 9px; }

.detail-grid dt { font-size: 12px; }
.detail-grid dd { font-size: 18px; }
.detail-grid dd.is-empty { font-size: 15px; }

.summary-grid strong { font-size: 15px; }
.record-date { font-size: 14px; }
.record-date strong { font-size: 18px; }
.record-body h2 { font-size: 21px; }
.record-body dl { font-size: 16px; }
.tag-list li { padding: 5px 9px; font-size: 12px; }

.document-lane-heading { min-height: 0; }
.document-lane h2 { font-size: 28px; }
.document-item strong,
.pdf-panel-heading h3 { font-size: 17px; }
.document-actions .button,
.pdf-create-button { min-height: 42px; font-size: 13px; }
.pdf-snapshot-list strong,
.pdf-snapshot-list div > span,
.pdf-snapshot-list a,
.monitoring-result-list strong,
.monitoring-result-list .button { font-size: 13px; }
.monitoring-result-list .button { min-height: 40px; }

.field > span,
.checkbox-field legend,
.schedule-items-fieldset legend,
.facility-checks legend { font-size: 14px; }
.field em,
.field small,
.schedule-items-fieldset > p,
.facility-checks label,
.checkbox-field label,
.check-line,
.picker-option small,
.picker-empty,
.conflict-detail { font-size: 13px; }
.field input,
.field select,
.field textarea { min-height: 50px; font-size: 17px; }
.draft-assist strong { font-size: 16px; }
.draft-assist p,
.draft-assist small { font-size: 14px; }

.staff-card p,
.staff-identity a,
.staff-role > strong,
.staff-card .invitation-warning,
.audit-list table,
.workflow-events li { font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body.login-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; background: radial-gradient(circle at 16% 14%, rgb(213 231 220 / 68%), transparent 31rem), linear-gradient(135deg, #f6f3eb 0%, #eee9dc 100%); font-family: "Hiragino Sans", "Yu Gothic UI", "BIZ UDPGothic", sans-serif; }
.login-card { position: relative; width: min(100%, 410px); padding: 32px; border: 1px solid rgb(20 65 62 / 15%); border-radius: 16px; background: rgb(255 254 249 / 94%); box-shadow: 0 22px 54px rgb(22 58 55 / 13%); }
.login-header { padding-bottom: 24px; border-bottom: 1px solid #e5e0d4; }
.login-brand { display: flex; align-items: center; gap: 10px; color: #274746; }
.login-brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px 10px 10px 3px; background: #164947; color: #fffdf7; font-family: "Yu Mincho", serif; font-weight: 700; font-size: 17px; }
.login-brand small, .login-brand strong { display: block; line-height: 1.2; }
.login-brand small { color: #71827d; font-size: 10px; letter-spacing: .08em; }
.login-brand strong { margin-top: 2px; font-size: 14px; letter-spacing: .08em; }
.login-kicker { margin: 26px 0 5px; color: #bb5c40; font-size: 11px; font-weight: 700; letter-spacing: .13em; }
.login-card h1 { margin: 0; color: #143f3f; font-family: "Hiragino Sans", "Yu Gothic UI", sans-serif; font-size: 29px; letter-spacing: .04em; }
.login-intro { margin: 10px 0 0; color: #667875; font-size: 14px; line-height: 1.7; }
.login-card form { display: grid; gap: 8px; margin-top: 24px; }
.login-card label { display: grid; gap: 8px; margin-top: 8px; color: #345553; font-size: 13px; font-weight: 700; letter-spacing: .03em; }
.login-card input { min-height: 48px; border: 1px solid #bdc9c4; border-radius: 9px; padding: 0 13px; background: #fffefa; color: #173f3f; font: inherit; font-size: 16px; transition: border-color .15s ease, box-shadow .15s ease; }
.login-card input:focus { outline: 0; border-color: #17625d; box-shadow: 0 0 0 3px rgb(38 119 111 / 17%); }
.login-card input[aria-invalid="true"] { border-color: #b8543b; }
.login-card form button { min-height: 50px; margin-top: 16px; border: 0; border-radius: 9px; background: #164947; color: #fff; font: inherit; font-size: 15px; font-weight: 700; letter-spacing: .08em; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.login-card form button:hover { background: #0d3c3b; transform: translateY(-1px); }
.login-card form button:focus-visible, .login-actions a:focus-visible { outline: 3px solid rgb(224 121 75 / 45%); outline-offset: 3px; }
.login-card form button:disabled { cursor: wait; opacity: .65; transform: none; }
.login-card [role="alert"] { margin: 8px 0 0; color: #a33725; font-size: 13px; line-height: 1.45; }
.login-actions { display: grid; gap: 18px; margin-top: 25px; padding-top: 22px; border-top: 1px solid #e5e0d4; }
.login-actions a { color: #17625d; font-size: 13px; font-weight: 700; text-decoration-color: rgb(23 98 93 / 38%); text-underline-offset: 3px; }
.login-actions > a { justify-self: start; }
.login-actions p { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; color: #6b7d78; font-size: 13px; }
@media (max-width: 480px) { body.login-page { padding: 18px; } .login-card { padding: 25px 22px; } }

.reference-file-section {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #cfdad5;
  border-radius: 12px;
  background: #f8fbf8;
  color: #193e40;
}

.reference-attachment-list { display: grid; gap: 8px; }
.reference-attachment-empty { margin: 0; color: #637b7c; font-size: 14px; }
.reference-attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #dce5e0;
}
.reference-attachment-item:first-child { border-top: 0; padding-top: 0; }
.reference-attachment-item > div { min-width: 0; display: grid; gap: 3px; }
.reference-attachment-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.reference-attachment-item small { color: #637b7c; font-size: 13px; }
.reference-attachment-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.reference-attachment-actions .button { min-height: 38px; font-size: 13px; }

@media (max-width: 640px) {
  .reference-attachment-item { align-items: stretch; flex-direction: column; }
  .reference-attachment-actions { justify-content: flex-end; }
}

/* Document workflow: one paper-like step at a time, in service order. */
.document-flow-columns { grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 960px; margin-inline: auto; }
.document-reference-shared { margin: 0; border-radius: 18px; background: rgb(252 250 244 / 88%); }
.document-reference-shared summary { padding: 16px 20px; }
.document-reference-shared .document-reference-content { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 18px 20px 20px; }
.document-reference-shared .document-reference-content .document-list { margin: 0; }
.document-lane {
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-areas: "index heading" ". record";
  align-items: stretch;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: none;
}
.document-lane-index { position: relative; display: grid; grid-area: index; min-width: 0; place-items: start center; padding-top: 27px; color: transparent; font-size: 0; }
.document-lane-index::before { display: block; width: 30px; height: 30px; border-radius: 50%; content: ""; background: var(--forest); box-shadow: 0 0 0 5px var(--paper); }
.document-lane-index::after { position: absolute; top: 34px; color: white; font-family: Georgia, serif; font-size: 10px; font-weight: 700; }
.document-lane.assessment .document-lane-index::after { content: "01"; }
.document-lane.individual .document-lane-index::before { background: var(--terra); }
.document-lane.individual .document-lane-index::after { content: "02"; }
.document-lane.specialized .document-lane-index::before { background: #b78653; }
.document-lane.specialized .document-lane-index::after { content: "03"; }
.document-lane.monitoring .document-lane-index::before { background: #887153; }
.document-lane.monitoring .document-lane-index::after { content: "04"; }
.document-lane.supplemental .document-lane-index::before { background: #4f7a76; }
.document-lane.supplemental .document-lane-index::after { content: "05"; }
.document-lane .document-lane-heading { grid-area: heading; min-height: 0; padding: 24px 30px 19px 0; border-bottom: 1px solid var(--line); background: transparent; }
.document-lane-step { min-height: 0; margin: 0 0 7px; }
.document-lane h2 { margin: 0 0 6px; font-size: 28px; }
.document-lane-heading > p:not(.document-lane-step) { min-height: 0; margin: 0; max-width: 720px; }
.document-lane-record { --document-action-width: min(648px, 100%); display: grid; grid-area: record; align-content: start; gap: 8px; min-width: 0; padding: 17px 30px 26px 0; border-left: 0; background: transparent; }
.document-lane-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: var(--document-action-width); padding: 0; }
.document-lane-controls .button { width: 100%; min-height: 50px; }
.readiness-copy, .document-workflow-copy, .document-item .document-workflow-copy { box-sizing: border-box; display: block; width: 100%; min-height: 0; margin: 0; padding: 10px 13px; border-left: 3px solid var(--forest); color: var(--ink-soft); background: #e5f1eb; font-size: 13px; line-height: 1.55; }
.document-lane.individual .readiness-copy, .document-lane.individual .document-workflow-copy { border-left-color: var(--terra); background: #f7e9e1; }
.document-lane.specialized .readiness-copy, .document-lane.specialized .document-workflow-copy { border-left-color: #b78653; background: #f8eee2; }
.document-lane.monitoring .readiness-copy, .document-lane.monitoring .document-workflow-copy { border-left-color: #887153; background: #f0ece3; }
.document-lane .document-list { min-height: 0; margin: 0; }
.document-lane-record > .document-list.empty-state {
  width: var(--document-action-width);
  min-height: 54px;
  padding: 4px 0 0;
  place-content: center;
}
.document-lane-record > .document-list.empty-state strong { font-size: 15px; }
.document-item { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 0; border-bottom: 0; }
.document-lane.assessment .document-item { gap: 0; }
.document-lane.assessment .document-date-meta { display: none; }
.document-item .status-chip { width: max-content; }
.document-item .document-workflow-copy { grid-column: auto; }
.document-item--compact .document-actions, .document-item--compact .document-date-meta { order: initial; }
.document-date-meta { grid-column: auto; gap: 3px; margin: 0; padding-left: 2px; }
.document-actions { display: flex; grid-column: auto; flex-direction: column; align-items: stretch; width: var(--document-action-width); gap: 8px; }
.document-actions .button { width: 100%; min-height: 50px; padding: 10px 15px; font-size: 14px; }
.document-actions .button-secondary { background: transparent; }
.pdf-action-error { align-self: stretch; }
.document-reference-inline { margin: 5px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.document-reference-inline summary { min-height: 0; padding: 15px 0 0; }
.document-reference-inline summary strong { font-size: 14px; }
.document-reference-inline summary small { font-size: 11px; }
.document-reference-inline summary::after { font-size: 17px; }
.document-reference-inline .document-reference-content { padding: 14px 0 0; border-top: 0; }

@media (max-width: 820px) {
  .document-reference-shared .document-reference-content { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .document-lane { grid-template-columns: 48px minmax(0, 1fr); }
  .document-lane-index { padding-top: 24px; }
  .document-lane-index::after { top: 31px; }
  .document-lane .document-lane-heading { padding: 20px 18px 14px 0; }
  .document-lane h2 { font-size: 24px; }
  .document-lane-record { padding: 14px 18px 21px 0; }
  .readiness-copy, .document-workflow-copy, .document-item .document-workflow-copy { font-size: 12px; }
}
