: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;
}

/* 帳票そのものを編集するワークスペース。罫線・列幅はExcelと共通。 */
.app-dialog.sheet-editor-dialog {
  width: calc(100vw - 32px); max-width: 1760px; height: calc(100dvh - 32px);
  max-height: none; padding: 20px 24px 0; border-radius: 12px;
}
.sheet-editor-dialog > form { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.sheet-editor-dialog .dialog-heading { margin-bottom: 12px; }
.sheet-editor-dialog .dialog-heading h2 { margin: 0; font-size: 23px; }
.sheet-editor-dialog .dialog-heading .eyebrow { display: none; }
.sheet-editor-dialog .dialog-heading p { margin: 5px 0; font-size: 12px; }
.sheet-editor-dialog .dialog-actions { position: sticky; bottom: 0; z-index: 4; margin-top: auto; padding: 12px 0; background: var(--paper-bright); border-top: 1px solid var(--line); }
.sheet-editor-dialog .dialog-actions .button { min-height: 40px; padding: 8px 20px; font-size: 14px; }
.document-sheet-workspace { min-width: 0; min-height: 0; flex: 1; display: flex; flex-direction: column; margin-bottom: 16px; }
.sheet-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 12px; background: #e4ede7; border: 1px solid #c6d3cb; border-radius: 8px 8px 0 0; }
.sheet-namebox { min-width: 80px; padding: 7px 10px; background: white; border: 1px solid #becfc4; color: var(--forest); font-size: 12px; text-align: center; }
.sheet-toolbar-hint { flex: 1; margin: 0; font-size: 12px; }
.sheet-zoom { display: flex; flex-shrink: 0; gap: 5px; align-items: center; white-space: nowrap; font-size: 12px; }
.sheet-zoom select { width: 140px; min-width: 140px; max-width: none; padding: 6px 28px 6px 8px; font-size: 12px; }
.sheet-toolbar .button { min-height: 34px; padding: 6px 12px; font-size: 12px; border-radius: 5px; }
.sheet-tabs { display: flex; gap: 2px; overflow-x: auto; padding: 6px 8px 0; background: #eef2ee; border-inline: 1px solid #c6d3cb; }
.sheet-tabs button { flex-shrink: 0; padding: 9px 16px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #526767; font-size: 12px; cursor: pointer; }
.sheet-tabs button[aria-selected=true] { border-bottom-color: var(--forest); color: var(--forest); background: white; font-weight: 700; }
.sheet-workbench { display: grid; flex: 1; min-height: 0; grid-template-columns: minmax(0,1fr) 236px; grid-template-rows: minmax(0,1fr); border: 1px solid #c6d3cb; }
.sheet-canvas { min-width: 0; min-height: 0; height: 100%; overflow: auto; padding: 20px 20px 48px; scroll-padding-bottom: 48px; background: #dce3de; scrollbar-gutter: stable; }
.sheet-page { width: max-content; margin: 0 auto; padding: 22px; background: white; box-shadow: 0 4px 16px #18363815; }
.worksheet-table { table-layout: fixed; border-collapse: collapse; color: #1f2924; font-family: 'Yu Gothic','Meiryo',sans-serif; }
.worksheet-table td { padding: 3px 5px; white-space: pre-wrap; overflow-wrap: anywhere; vertical-align: middle; }
.worksheet-table th { padding: 4px; border: 1px solid #c6d3cb; background: #f0f3f0; font-size: 10px; color: #52675a; text-align: center; font-weight: 400; }
.worksheet-table thead { position: sticky; top: -20px; z-index: 2; }
.worksheet-table .sheet-row-number { width: 34px; position: sticky; left: -20px; z-index: 1; }
.worksheet-table td.sheet-editable { padding: 2px; background: #fffefb !important; transition: box-shadow .1s; }
.worksheet-table td.sheet-editable:hover { background: #f1f8f2 !important; }
.worksheet-table td.is-selected-cell { position: relative; outline: 2px solid #1e6752; outline-offset: -2px; background: #f5fbf5 !important; }
.worksheet-table .sheet-cell-input { display: block; width: 100%; min-width: 0; min-height: 36px; max-height: none; margin: 0; padding: 6px; border: 0; border-radius: 0; outline: 0; box-shadow: none; resize: vertical; font: inherit; font-weight: 400; line-height: 1.55; color: inherit; background: transparent; }
.worksheet-table select.sheet-cell-input { font-size: 13px; }
.worksheet-table .sheet-cell-input + .sheet-cell-input { border-top: 1px dashed #bccbc0; }
.sheet-inspector { min-width: 0; min-height: 0; max-height: 100%; overflow-y: auto; padding: 18px 14px; background: #fcfaf4; position: sticky; top: 0; }
.sheet-inspector h3 { margin: 0 0 20px; font-size: 15px; line-height: 1.7; }
.sheet-target { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.sheet-target input { width: 92px; min-width: 0; padding: 8px; font-size: 14px; border: 1px solid #becfc4; border-radius: 4px; }
.sheet-count { display: block; margin: 10px 0 16px; font-size: 12px; color: var(--ink-soft); }
.sheet-inspector > .button { width: 100%; min-height: 38px; margin: 4px 0; padding: 8px; font-size: 13px; border-radius: 5px; }
.sheet-assist-status { min-height: 2em; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.sheet-proposal label { font-size: 12px; }
.sheet-proposal textarea { width: 100%; margin: 8px 0; padding: 8px; border: 1px solid #becfc4; border-radius: 4px; font: inherit; font-size: 13px; line-height: 1.6; }
.sheet-proposal .button { width: 100%; min-height: 36px; font-size: 12px; }
@media(max-width:900px) {
  .sheet-workbench { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr) auto; }
  .sheet-canvas { padding: 10px 10px 40px; }
  .sheet-inspector { position: static; max-height: 28dvh; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid #c6d3cb; padding: 12px; }
  .sheet-inspector h3 { flex-basis: 100%; margin: 0; font-size: 13px; }
  .sheet-inspector > .button { width: auto; min-width: 110px; margin: 0; }
  .sheet-count { margin: 0; }
  .sheet-assist-status { flex-basis: 100%; margin: 0; }
  .sheet-proposal { width: 100%; }
  .app-dialog.sheet-editor-dialog { width: calc(100vw - 12px); height: calc(100dvh - 12px); padding: 12px 10px 0; }
  .sheet-toolbar-hint { display: 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; }

.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 {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .035em;
  line-height: 1.45;
  overflow-wrap: normal;
  word-break: keep-all;
}

.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%); }

.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-preview-actions { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; }
.contact-photo-remove { padding: 2px 5px; border: 1px solid #d79c93; border-radius: 5px; color: #842d26; background: #fff8f6; font: inherit; font-weight: 800; cursor: pointer; }
.contact-photo-remove:hover { background: #fbeae5; }
.contact-photo-remove:disabled { cursor: not-allowed; opacity: .55; }

.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; }

.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); }
.certificate-expiry-value { display: grid; gap: 6px; }
.certificate-expiry-date { display: block; font-variant-numeric: tabular-nums; white-space: nowrap; }
.certificate-expiry-status { width: fit-content; padding: 3px 7px; border-radius: 999px; color: currentColor; background: rgb(255 255 255 / 68%); font-size: 11px; font-weight: 800; line-height: 1.35; }

.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-activity-text { margin: 0; white-space: pre-wrap; font-size: 12px; line-height: 1.7; }
#contact-list .record-date { font-family: inherit; font-size: 12px; line-height: 1.7; }
#contact-list .record-time { margin: 6px 0 0; font: inherit; color: inherit; }
.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: 1180px;
  margin-inline: auto;
}

.document-lane {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  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 24px 16px 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: start; gap: 14px; min-width: 0; padding: 18px 24px 24px 0; border-top: 1px solid var(--line); border-left: 0; background: transparent; }
.document-lane-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 0; 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-lane.individual .readiness-copy { max-width: none; padding: 0; border: 0; border-radius: 0; background: transparent; }
.readiness-date-range { white-space: nowrap; }

.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-goal-editor .goal-draft-source { margin: 0 0 12px; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.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; }
.pdf-action-warning { align-self: center; color: #7a4d13; background: #fff3d7; border: 1px solid #d7ae63; border-radius: 6px; padding: 5px 7px; font-size: 10px; font-weight: 700; 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-shared-reference { max-width: 1180px; margin: 0 auto 12px; }
.document-reference-shared { margin: 0; }
.document-reference-shared summary { padding: 16px 20px; }
.document-reference-shared .document-reference-content { padding: 16px 20px 20px; }
.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; }
.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)); }
.assessment-editor-dialog {
  width: min(1260px, calc(100vw - 40px));
  max-height: min(94vh, 1080px);
  padding: 24px 28px;
}

.assessment-editor-dialog .dialog-heading h2 { font-size: 30px; }
.assessment-editor-dialog .dialog-heading h2 + p { max-width: 800px; font-size: 14px; }

.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; }

.plan-goal-group { display: grid; gap: 12px; }
.plan-goal-group + .plan-goal-group { margin-top: 20px; padding-top: 24px; border-top: 2px solid var(--line); }
.plan-goal-group > h4 { margin: 0; color: var(--forest); font-size: 17px; }
.plan-goal-group article h5 { margin: 0; color: var(--forest); font-size: 18px; }

.document-goal-editor article {
  padding: 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--forest);
  border-radius: 14px;
  background: var(--paper-bright);
}

.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-help { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }
.activity-type-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); font-size: 11px; font-weight: 800; }
.activity-type-manage-trigger { padding: 2px 0; border: 0; color: var(--forest); background: transparent; font: inherit; font-size: 10px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.activity-type-manage-trigger:hover { color: var(--vermillion); }
.activity-type-manage-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.app-dialog.activity-type-manager-dialog { width: min(550px, calc(100vw - 32px)); }
.activity-type-manager-dialog .dialog-heading { margin-bottom: 20px; }
.activity-type-add-row { display: flex; gap: 8px; align-items: center; }
.activity-type-add-row label { flex: 0 0 auto; color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.activity-type-add-row input { flex: 1 1 auto; min-width: 0; }
.activity-type-add-row .button { flex: 0 0 auto; min-height: 38px; padding: 8px 12px; font-size: 11px; }
.activity-type-option-section { display: grid; gap: 8px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.activity-type-option-section h3 { margin: 0; color: var(--ink); font-size: 13px; }
.activity-type-options-list { display: flex; flex-wrap: wrap; gap: 7px; }
.activity-type-option { display: inline-flex; align-items: center; gap: 5px; padding: 5px 6px 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: var(--paper-bright); font-size: 11px; }
.activity-type-option button { min-width: 25px; min-height: 25px; padding: 0; border: 0; border-radius: 50%; color: var(--error); background: transparent; font: inherit; font-size: 17px; line-height: 1; cursor: pointer; }
.activity-type-option button:hover { background: color-mix(in srgb, var(--error) 10%, transparent); }
.activity-type-option button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.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; }

.assessment-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; margin-top: 22px; }
.assessment-field-grid .form-section-label {
  margin: 22px 0 0;
  padding: 0 0 9px;
  border-bottom: 1px solid var(--line-strong);
  border-left: 0;
  color: var(--forest);
  background: transparent;
  font-size: 16px;
}
.assessment-field-grid .form-section-label::before { display: inline-block; width: 5px; height: 20px; margin: 0 9px -5px 0; border-radius: 4px; content: ""; background: var(--vermillion); }
.assessment-editor-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 15px 16px 13px;
  border: 1px solid #dce7da;
  border-radius: 14px;
  background: linear-gradient(145deg, rgb(248 252 248 / 94%), rgb(255 255 252 / 96%));
  box-shadow: 0 8px 20px rgb(31 74 65 / 4%);
}
.assessment-editor-field:focus-within { border-color: #7da89b; box-shadow: 0 0 0 3px rgb(70 121 107 / 10%), 0 10px 24px rgb(31 74 65 / 7%); }
.assessment-editor-field .field { gap: 8px; margin: 0; }
.assessment-editor-field .field > span { color: var(--forest-deep); font-size: 14px; }
.assessment-editor-field .field textarea { min-height: 112px; padding: 12px 13px; border-color: #c6d9cb; background: white; font-size: 15px; line-height: 1.75; }
.assessment-editor-field .field textarea.has-overflow { overflow-y: auto; }

.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;
}

.writing-tools-heading {
  flex-basis: 100%;
  margin: 0 0 2px;
  color: var(--forest-deep);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.journal-writing-tools label {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  word-break: keep-all;
}

.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 .button { min-height: 40px; padding-inline: 14px; font-size: 14px; }

.assessment-writing-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: 7px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--forest-pale) 36%, white);
}

.assessment-writing-tools label { grid-area: target; gap: 5px; min-width: 0; font-size: 12px; white-space: nowrap; }
.assessment-writing-tools select { min-height: 32px; padding: 0 25px 0 8px; font-size: 12px; }
.assessment-writing-tools .assessment-custom-target-length { width: 7.5ch; min-height: 32px; 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 .journal-character-count { grid-area: count; min-width: 0; justify-self: end; font-size: 12px; white-space: nowrap; }
.assessment-writing-tools .button { width: 100%; min-height: 32px; padding-inline: 10px; font-size: 12px; white-space: nowrap; }
.assessment-writing-tools .assessment-compose-button { grid-area: compose; }
.assessment-writing-tools .assessment-copy-button { grid-area: copy; }
.assessment-writing-tools .assessment-writing-note { grid-column: 1 / -1; margin: 0; }
.assessment-editor-field .assessment-writing-tools {
  margin-top: 12px;
  padding: 11px 0 0;
  border: 0;
  border-top: 1px solid #e1ebe3;
  border-radius: 0;
  background: transparent;
}
.assessment-editor-field .assessment-writing-tools label { font-size: 11px; }
.assessment-editor-field .assessment-writing-tools .assessment-custom-target-length { min-height: 30px; font-size: 11px; }
.assessment-editor-field .assessment-writing-tools .journal-character-count { font-size: 11px; }
.assessment-editor-field .assessment-writing-tools .button { min-height: 34px; padding-inline: 9px; font-size: 11px; }
#plan-editor-dialog .field-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 22px;
}
#plan-editor-dialog .field-grid > .field,
#plan-editor-dialog .field-grid > .plan-goal-field-block { grid-column: 1 / -1; }
#plan-editor-dialog .field-grid > .field textarea,
#plan-editor-dialog .plan-goal-field-block textarea { min-height: 132px; }
.plan-editor-field-label { display: inline-flex; align-items: center; gap: 7px; }
.plan-writing-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "target count"
    "compose copy";
  align-items: center;
  gap: 8px 12px;
  margin: 10px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
}
.plan-writing-tools label { grid-area: target; min-width: 0; }
.plan-writing-tools .plan-custom-target-length {
  width: 7.5ch;
  min-height: 38px;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper-bright);
  color: var(--ink);
  font: inherit;
}
.plan-writing-tools .journal-character-count { grid-area: count; justify-self: end; min-width: 0; white-space: nowrap; }
.plan-writing-tools .button { width: 100%; }
.plan-writing-tools .plan-compose-button { grid-area: compose; }
.plan-writing-tools .plan-copy-button { grid-area: copy; }
.plan-goal-field-block { min-width: 0; }
.plan-goal-field-block + .plan-goal-field-block { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.plan-goal-field-block .field { margin-top: 0; }
.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;
  list-style-position: inside;
}
.writing-disclosure > summary::marker { color: var(--terracotta); }
.writing-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.monitoring-meeting-fields > .field-grid { padding: 12px; }
.writing-disclosure .assessment-writing-tools,
.writing-disclosure .plan-writing-tools {
  grid-template-areas:
    "target count"
    "compose copy";
  margin: 0;
  padding: 12px;
  border: 0;
  background: transparent;
}
.assessment-editor-dialog .dialog-actions {
  position: sticky;
  bottom: -24px;
  z-index: 2;
  margin: 22px -4px -4px;
  padding: 14px 4px 4px;
  border-top: 1px solid var(--line);
  background: linear-gradient(to bottom, rgb(255 253 248 / 85%), var(--paper-bright) 34%);
}

.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;
}

.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; }

.picker-results {
  display: grid;
  max-height: 330px;
  margin-top: 10px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.picker-results > [role="listitem"] {
  border-bottom: 1px solid var(--line);
}

.picker-results > [role="listitem"]:last-child {
  border-bottom: 0;
}

.picker-option {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  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: 1120px) {
  :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 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid > .wide { grid-column: span 2; }
}

@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 .button { width: 100%; }
  .assessment-editor-field .assessment-writing-tools { display: flex; align-items: stretch; flex-direction: column; }
  .assessment-editor-field .assessment-writing-tools label,
  .assessment-editor-field .assessment-writing-tools .journal-character-count,
  .assessment-editor-field .assessment-writing-tools select,
  .assessment-editor-field .assessment-writing-tools .assessment-custom-target-length,
  .assessment-editor-field .assessment-writing-tools .button { width: 100%; }
  .plan-writing-tools { display: flex; align-items: stretch; flex-direction: column; }
  .plan-writing-tools label,
  .plan-writing-tools .journal-character-count,
  .plan-writing-tools select,
  .plan-writing-tools .plan-custom-target-length,
  .plan-writing-tools .button { width: 100%; }
  .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; }
  .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; }
  .document-reference-shared summary { padding: 15px 16px; }
  .document-reference-shared .document-reference-content { padding: 15px 16px 18px; }
  .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 { grid-template-columns: 1fr; align-items: 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; }
  .activity-type-add-row { align-items: stretch; flex-wrap: wrap; }
  .activity-type-add-row label { flex-basis: 100%; }
  .activity-type-add-row .button { flex: 0 0 auto; }
  .app-dialog { padding: 22px 18px; }
  .dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
  .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 .login-remember-email { display: flex; align-items: center; gap: 8px; margin: 5px 0 0; color: #5f736d; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.login-card .login-remember-email input { flex: 0 0 auto; width: 16px; min-height: 16px; height: 16px; margin: 0; padding: 0; accent-color: #17625d; }
.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; }
.password-setup-complete { margin-top: 24px; }
.password-setup-complete p { margin: 0 0 20px; color: #506762; font-size: 14px; line-height: 1.7; }
.login-completion-link { display: grid; min-height: 50px; border-radius: 9px; background: #164947; color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .08em; text-align: center; text-decoration: none; place-items: center; }
.login-completion-link:hover { background: #0d3c3b; }
.login-completion-link:focus-visible { outline: 3px solid rgb(224 121 75 / 45%); outline-offset: 3px; }
.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: keep the three decisions readable without manufacturing empty cards. */
.document-flow-columns { grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 1180px; margin-inline: auto; }
.document-lane { grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "index heading" ". record"; align-items: stretch; overflow: visible; box-shadow: none; }
.document-lane-index { position: relative; display: grid; grid-area: index; min-width: 0; place-items: start center; padding-top: 25px; 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: 32px; 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.monitoring .document-lane-index::before { background: #887153; }
.document-lane.monitoring .document-lane-index::after { content: "03"; }
.document-lane .document-lane-heading { grid-area: heading; min-height: 0; padding: 22px 24px 16px 0; border: 0; background: transparent; }
.document-lane-step { min-height: 0; margin: 0 0 7px; }
.document-lane h2 { margin: 0 0 6px; }
.document-lane-heading > p:not(.document-lane-step) { min-height: 0; margin: 0; }
.document-lane-record { display: grid; grid-area: record; align-content: start; gap: 14px; min-width: 0; padding: 18px 24px 24px 0; border-top: 1px solid var(--line); border-left: 0; background: transparent; }
.document-lane-controls { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 0; padding: 0; }
.document-lane-controls .button { width: 17em; min-width: 0; max-width: 100%; }
.document-lane-controls .readiness-copy { min-width: 0; width: min(36rem, 100%); overflow-wrap: anywhere; }
.document-lane-controls .button,
.document-actions .document-workflow-action {
  min-height: 50px;
  padding-inline: 20px;
  font-size: 15px;
}
.document-item--compact {
  grid-template-columns: max-content minmax(0, 1fr);
  grid-template-areas: "actions meta";
  align-items: center;
  gap: 10px 16px;
  padding: 0;
  border-bottom: 0;
}
.document-item--compact > .status-chip { grid-column: 1 / -1; justify-self: start; }
.document-item--compact .document-workflow-actions {
  grid-area: actions;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-inline: 0;
}
.document-item--compact .document-date-meta { grid-area: meta; margin: 0; justify-self: end; text-align: right; }
.document-item--compact .document-workflow-actions .button {
  width: 17em;
  min-width: 0;
  max-width: 100%;
  min-height: 50px;
  padding-inline: 20px;
  font-size: 15px;
}
.document-item--compact .document-workflow-actions .plan-assessment-sync {
  width: 30em;
  max-width: 100%;
  margin: 0 0 2px;
  white-space: nowrap;
}
.plan-assessment-sync,
.assessment-draft-status {
  margin: 0;
  padding: 9px 11px;
  border-left: 3px solid var(--forest);
  border-radius: 0 7px 7px 0;
  background: var(--forest-pale);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}
.plan-assessment-sync.is-stale {
  border-left-color: var(--terra);
  background: #fbf1ea;
  color: #8a432c;
}
.assessment-draft-status {
  width: min(46rem, 100%);
}
.readiness-copy { min-height: 0; margin: 0; }
.document-lane .document-list { min-height: 0; margin: 0; }
.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-inline .document-reference-content { padding: 14px 0 0; border-top: 0; }

@media (max-width: 820px) {
  .document-lane { grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "index heading" ". record"; }
  .document-lane-index { padding-top: 23px; }
  .document-lane .document-lane-heading { padding: 20px 18px 12px 0; }
  .document-lane-record { padding: 14px 18px 18px 0; border-top: 1px solid var(--line); border-left: 0; background: transparent; }
  .document-lane-controls { align-items: stretch; }
  .document-lane-controls .button,
  .document-item--compact .document-workflow-actions .button { width: 100%; }
  .document-item--compact .document-workflow-actions .plan-assessment-sync { white-space: normal; }
  .document-item--compact { grid-template-columns: 1fr; grid-template-areas: "actions" "meta" "sync"; align-items: start; }
  .document-item--compact .document-date-meta { justify-self: start; text-align: left; }
}
.activity-daily-print { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 20px; margin-bottom: 24px; border: 1px solid var(--line, #d9e2d5); border-radius: 12px; }
.activity-daily-print[hidden] { display: none; }
.activity-daily-print input { min-height: 44px; max-width: 100%; padding: 8px 12px; border: 1px solid #9bb5ac; border-radius: 8px; font: inherit; color: inherit; background: white; }
.activity-daily-print p { flex-basis: 100%; margin: 0; }
.activity-time-field>label{font-weight:700}
.activity-time-entry{display:flex;gap:.5rem;align-items:stretch;min-width:0}
.activity-time-entry input{flex:1;min-width:0;font:inherit}
.activity-time-entry input::-webkit-calendar-picker-indicator{display:none}
.activity-time-entry .button{flex:none;white-space:nowrap;padding-inline:1rem;font:inherit}
.activity-time-choices{display:flex;flex-wrap:wrap;align-items:end;gap:.75rem;padding:.75rem;background:var(--surface-muted,#e4ede7);border-radius:.5rem}
.activity-time-choices[hidden]{display:none}
.activity-time-choices label{display:grid;gap:.25rem;flex:1;min-width:4rem}
.activity-time-choices select{font:inherit;min-height:44px}
.activity-time-choices .button{min-height:44px;font:inherit}
