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

* {
  box-sizing: border-box;
}

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

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

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

button,
select {
  cursor: pointer;
}

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

[hidden] {
  display: none !important;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.workspace {
  min-width: 0;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.facility-switcher-label {
  margin-top: 8px;
  color: rgb(232 244 231 / 65%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
}

.facility-identity select {
  width: 100%;
  min-height: 34px;
  padding: 7px 28px 7px 9px;
  border: 1px solid rgb(238 244 233 / 32%);
  border-radius: 7px;
  color: #f7f7f0;
  background: rgb(16 62 57 / 42%);
  font: inherit;
  font-size: 12px;
}

.facility-identity select:focus-visible {
  outline: 2px solid #eabe91;
  outline-offset: 2px;
}

.facility-identity select option {
  color: var(--ink);
  background: #fffdf8;
}

.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-remove { justify-self: start; padding: 2px 0; border: 0; color: #9a443c; background: transparent; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.contact-photo-remove:hover { color: #742f29; }
.contact-photo-remove:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 2px; }
.contact-photo-remove:disabled { color: #9fa9a2; cursor: wait; }

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

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

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

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

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

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

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

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

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

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

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

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

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

/* 見出しの説明文はふだん畳む(2026-10-14 の要望。saas-app.js の initPageLeads) */
.page-lead-toggle {
  display: inline-flex;
  align-items: center;
  margin: 6px 0 0;
  padding: 2px 10px;
  min-height: 28px;
  border: 1px solid rgb(23 45 49 / 16%);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
}
.page-lead-toggle:hover { background: rgb(78 125 137 / 8%); }
.page-lead { margin-top: 8px !important; }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.admin-principle { display: grid; grid-template-columns: 150px 1fr; gap: 20px; margin-bottom: 18px; padding: 16px 20px; border-left: 4px solid var(--vermillion); background: var(--vermillion-soft); }
.admin-principle p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.7; }
.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)); }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.writing-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); }
.writing-disclosure .assessment-writing-tools,
.writing-disclosure .plan-writing-tools { margin: 0; border: 0; border-radius: 0; background: transparent; }

.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(auto-fit, minmax(56px, 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 .writing-custom-target-length,
  .journal-writing-tools .button { width: 100%; }
  .assessment-writing-tools,
  .plan-writing-tools { display: flex; align-items: stretch; flex-direction: column; }
  .assessment-writing-tools .journal-character-count,
  .plan-writing-tools .journal-character-count { align-self: flex-start; }
  .overview-heading { display: grid; grid-template-columns: 1fr auto; }
  .overview-heading > div:first-child::before { display: none; }
  .date-stamp { width: 76px; height: 76px; flex-basis: 76px; }
  .date-stamp strong { font-size: 26px; }
  .section-heading { align-items: start; flex-direction: column; gap: 9px; }
  .subsection-heading { align-items: stretch; flex-direction: column; }
  .section-tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .section-tabs button { padding-inline: 7px; }
  .workflow-panel { padding: 20px; }
  .summary-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid > .wide { grid-column: span 1; }
  .record-item { grid-template-columns: 1fr; gap: 10px; padding: 20px; }
  .record-body dl { grid-template-columns: 1fr; gap: 3px; }
  .record-body dd { margin-bottom: 9px; }
  .document-lane-heading { min-height: 0; padding: 24px; }
  .document-lane-heading p { min-height: 0; }
  .pdf-panel { grid-template-columns: 1fr; }
  .pdf-create-button { width: 100%; }
  .pdf-snapshot-list li { grid-template-columns: 1fr; }
  .pdf-snapshot-list a { min-height: 32px; }
  .guardian-list { grid-template-columns: 1fr; }
  .schedule-item-list li { grid-template-columns: 40px 1fr; }
  .schedule-item-list li strong,
  .schedule-item-list li > span:last-child { grid-column: 1 / -1; }
  .document-workspace-header { align-items: flex-start; flex-direction: column; gap: 14px; }
  .document-process { gap: 9px 16px; font-size: 12px; }
  .document-reference-content,
  .generation-evidence-content { grid-template-columns: 1fr; }
  .generation-evidence-content { padding: 20px; }
  .evidence-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-principle { grid-template-columns: 1fr; gap: 5px; }
  .facility-admin-card,
  .staff-card { 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; }
  .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 form button { min-height: 50px; margin-top: 16px; border: 0; border-radius: 9px; background: #164947; color: #fff; font: inherit; font-size: 15px; font-weight: 700; letter-spacing: .08em; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.login-card form button:hover { background: #0d3c3b; transform: translateY(-1px); }
.login-card form button:focus-visible, .login-actions a:focus-visible { outline: 3px solid rgb(224 121 75 / 45%); outline-offset: 3px; }
.login-card form button:disabled { cursor: wait; opacity: .65; transform: none; }
.login-card [role="alert"] { margin: 8px 0 0; color: #a33725; font-size: 13px; line-height: 1.45; }
.login-actions { display: grid; gap: 18px; margin-top: 25px; padding-top: 22px; border-top: 1px solid #e5e0d4; }
.login-actions a { color: #17625d; font-size: 13px; font-weight: 700; text-decoration-color: rgb(23 98 93 / 38%); text-underline-offset: 3px; }
.login-actions > a { justify-self: start; }
.login-actions p { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; color: #6b7d78; font-size: 13px; }
@media (max-width: 480px) { body.login-page { padding: 18px; } .login-card { padding: 25px 22px; } }

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

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

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

/* Document workflow: 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(260px, 1fr) minmax(310px, .92fr); 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 20px 20px 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: center; gap: 12px; min-width: 0; padding: 18px 20px; border-left: 1px solid var(--line); background: rgb(252 250 244 / 58%); }
.document-lane-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0; }
.document-lane-controls .button { width: max-content; }
.readiness-copy { 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; }
}


/* ---------- 実績(出欠・送迎)。段階5 スライス1 ---------- */
.attendance-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.attendance-controls .inline-field { display: grid; gap: 4px; font-size: 12px; }
.attendance-controls .inline-field input, .attendance-controls .inline-field select { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--paper, #fff); }
.attendance-rows { display: grid; gap: 10px; }
.attendance-row { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper, #fff); }
.attendance-row.is-present { border-color: var(--forest, #3a6b4f); }
.attendance-row.is-absent { border-color: #c98a5a; }
.attendance-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.attendance-row-head strong { font-size: 15px; }
.attendance-row-head small { color: var(--ink-soft, #667); }
.attendance-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.attendance-toggle > button:not(.button) { min-height: 36px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.attendance-toggle > button:not(.button).is-active { color: #fff; background: var(--forest, #3a6b4f); border-color: var(--forest, #3a6b4f); }
.attendance-toggle > button:not(.button):disabled { cursor: default; opacity: 0.7; }
.attendance-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-top: 10px; }
.attendance-fields .inline-field { display: grid; gap: 4px; font-size: 12px; }
.attendance-fields .inline-field.wide { flex: 1 1 100%; }
.attendance-fields .inline-field input { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; width: 7.5em; }
.attendance-fields .inline-field.wide input, .attendance-fields.absent .inline-field input { width: 100%; min-width: 14em; }
.attendance-fields input[aria-invalid="true"] { border-color: #b5503a; box-shadow: 0 0 0 3px rgba(181, 80, 58, 0.15); }
.attendance-fields .check-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; }
.attendance-month .table-wrap { overflow-x: auto; }
.attendance-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 12px; }
.attendance-table th, .attendance-table td { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.attendance-table th.left, .attendance-table td.left { text-align: left; }
.attendance-table th.num, .attendance-table td.num { text-align: right; padding-right: 8px; }
.attendance-table .is-sun { color: #b5503a; background: rgba(181, 80, 58, 0.05); }
.attendance-table .is-sat { color: #2b62b3; }
.attendance-table td.is-present { color: var(--forest, #3a6b4f); font-weight: 700; }
.attendance-table td.is-absent { color: #c98a5a; font-weight: 700; }
.attendance-table td.is-clickable { cursor: pointer; }
.attendance-table td.is-clickable:hover { background: rgba(58, 107, 79, 0.08); }
.attendance-table .attendance-total td { border-top: 2px solid var(--ink, #223); font-weight: 700; }
.attendance-note { margin: 10px 0 0; color: var(--ink-soft, #667); font-size: 12px; line-height: 1.7; }


/* ---------- 事業所設定(段階5 スライス2) ---------- */
.facility-settings { display: grid; gap: 18px; }
.settings-card { padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-radius: 16px; background: var(--paper, #fff); }
.settings-card .subsection-heading { margin-bottom: 14px; }
.settings-form { display: grid; gap: 14px; }
.settings-subtitle { margin: 0; font-size: 14px; }
.settings-form .field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 14px; }
.settings-form .field { display: grid; gap: 5px; font-size: 12px; }
.settings-form .field-wide { grid-column: 1 / -1; }
.settings-form .field input, .settings-form .field select, .settings-form .field textarea { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.settings-form .field textarea { min-height: 0; resize: vertical; line-height: 1.7; }
.settings-form .table-wrap { overflow-x: auto; }
.settings-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 12px; }
.settings-table th, .settings-table td { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.settings-table th.left, .settings-table td.left { text-align: left; }
.settings-table th.num, .settings-table td.num { text-align: right; }
.settings-table input:not([type="checkbox"]), .settings-table select { width: 100%; min-width: 5em; min-height: 34px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12px; }
.settings-table .code-input { max-width: 7em; }
.settings-table .num-input { max-width: 6.5em; text-align: right; }
.settings-table td.c { white-space: nowrap; }
.settings-version-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.settings-version-bar .inline-field { display: grid; gap: 4px; font-size: 12px; }
.settings-version-bar select, .settings-version-bar input { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.settings-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.settings-actions .hint { color: var(--ink-soft, #667); font-size: 12px; }


/* ---------- 請求(段階5 スライス3) ---------- */
.billing-body { display: grid; gap: 18px; }
.billing-check { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.billing-check li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.billing-check li.is-error { border-color: #b75f53; background: #fbeae5; }
.billing-check li.is-warn { border-color: #d9a441; background: #fdf5e3; }
.billing-check li.is-ok { background: rgba(58, 107, 79, 0.05); }
.billing-check .check-icon { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1px solid var(--line); font-weight: 800; font-size: 12px; }
.billing-check strong { font-size: 13px; }
.billing-check p { margin: 3px 0 0; color: var(--ink-soft, #667); font-size: 12px; line-height: 1.6; }
.status-chip.status-error { color: #842d26; background: #fbeae5; }
.status-chip.status-warn { color: #6f4b12; background: #fdf5e3; }
.billing-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 12.5px; }
.billing-table th, .billing-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.billing-table th.left, .billing-table td.left { text-align: left; white-space: normal; }
.billing-table th.num, .billing-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.billing-table tr.is-clickable { cursor: pointer; }
.billing-table tr.is-clickable:hover { background: rgba(58, 107, 79, 0.06); }
.billing-table tr.is-selected { background: rgba(58, 107, 79, 0.1); }
.billing-table .billing-total td { border-top: 2px solid var(--ink, #223); font-weight: 700; }
.billing-table input { width: 5.5em; min-height: 32px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; text-align: right; }
.billing-sheet { display: grid; gap: 12px; margin-top: 14px; }
.billing-sheet:empty { display: none; }
.billing-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 14px; margin: 0; }
.billing-meta dt { color: var(--ink-soft, #667); font-size: 11px; }
.billing-meta dd { margin: 2px 0 0; font-weight: 700; }
.billing-kanri { display: grid; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.billing-kanri-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.billing-kanri-add .inline-field { display: grid; gap: 4px; font-size: 12px; }
.billing-kanri-add input { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; width: 9em; }


/* ---------- 編集ロック(同時編集の保護) ---------- */
.edit-lock-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 14px; padding: 10px 14px; border: 1px solid #d9a441; border-radius: 12px; background: #fdf5e3; font-size: 13px; line-height: 1.6; }
.edit-lock-banner.is-mine { border-color: #6d9c93; background: var(--forest-pale, #e7f2eb); }
.edit-lock-banner strong { font-size: 13.5px; }
.edit-lock-banner span { flex: 1 1 240px; color: var(--ink-soft, #667); font-size: 12px; }
.edit-lock-banner .button { margin-left: auto; }
.record-lock-note { margin: -4px 0 10px; color: #8a5a12; font-size: 12.5px; font-weight: 700; }


/* ---------- リアルタイム同時編集 ---------- */
.live-presence { padding: 4px 10px; border-radius: 999px; background: var(--forest-pale, #e7f2eb); color: var(--forest, #3a6b4f); font-size: 11.5px; font-weight: 700; }
.co-editors { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 12px; padding: 8px 12px; border: 1px solid #6d9c93; border-radius: 10px; background: var(--forest-pale, #e7f2eb); font-size: 12.5px; }
.co-editors small { flex: 1 1 100%; color: var(--ink-soft, #667); font-size: 11px; }
.field.is-remote-editing, .journal-writing-field.is-remote-editing { position: relative; }
.field.is-remote-editing input, .field.is-remote-editing textarea, .field.is-remote-editing select,
.journal-writing-field.is-remote-editing textarea { background: #fdf5e3; border-color: #d9a441; box-shadow: inset 0 0 0 1px #d9a441; }
.remote-editor-tag { position: absolute; top: 0; right: 0; padding: 2px 8px; border-radius: 999px; background: #d9a441; color: #fff; font-size: 10.5px; font-weight: 700; }

/* ---- メモ帳(どの画面でも開ける引き出し) ---- */
.memo-fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--forest); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; box-shadow: 0 10px 24px rgb(12 46 49 / 28%); cursor: pointer; transition: transform .15s ease, background .15s ease; }
.memo-fab:hover { transform: translateY(-2px); }
.memo-fab[aria-expanded="true"] { background: var(--forest-deep); }
.memo-fab[hidden] { display: none; }
.memo-drawer { position: fixed; right: 18px; bottom: 76px; z-index: 59; width: min(400px, calc(100vw - 36px)); max-height: min(72vh, 660px); display: grid; grid-template-rows: auto auto auto auto minmax(0, 1fr); gap: 10px; padding: 18px 18px 14px; border: 1px solid var(--line-strong); border-radius: 18px; color: var(--ink); background: var(--paper-bright); box-shadow: 0 22px 60px rgb(12 46 49 / 26%); }
.memo-drawer[hidden] { display: none; }
dialog > .memo-fab, dialog > .memo-drawer { z-index: 5; }
.memo-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.memo-drawer-head h2 { margin: 2px 0 0; font-size: 18px; }
/* 丸い閉じるボタン: 見出しは flex で、長い説明文の横に置くと縮んで楕円になった(2026-09-30)。縮ませず、幅と高さを同じにする */
.memo-drawer-head .memo-close { flex: 0 0 auto; width: 36px; height: 36px; min-width: 36px; min-height: 36px; padding: 0; border-radius: 50%; font-size: 16px; line-height: 1; }
.memo-hint { margin: 4px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.memo-drawer-compose { display: grid; gap: 8px; }
.memo-drawer-compose textarea { width: 100%; min-height: 76px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; resize: vertical; }
.memo-drawer-compose textarea:focus { outline: 2px solid var(--forest); outline-offset: -1px; }
.memo-drawer-options { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.memo-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.memo-check input:disabled + span, .memo-check:has(input:disabled) { color: var(--ink-soft); }
.memo-drawer-compose-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.memo-drawer-compose-actions .memo-hint { margin: 0; }
.memo-drawer-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.memo-drawer-filter button { min-height: 30px; padding: 4px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-soft); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.memo-drawer-filter button.is-active { background: var(--forest); color: #fff; }
.memo-drawer-count { margin-left: auto; padding: 0 6px; font-size: 12px; color: var(--ink-soft); }
.memo-drawer-target { margin: 0; }
.memo-drawer-list { list-style: none; margin: 0; padding: 2px; overflow-y: auto; display: grid; gap: 8px; align-content: start; }
.memo-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.memo-item.is-pinned { border-color: var(--terra); background: #fdf7f1; }
.memo-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 11px; color: var(--ink-soft); }
.memo-item-pill { padding: 0 8px; border-radius: 999px; background: var(--forest-pale); color: var(--forest); font-weight: 800; }
.memo-item-pill.is-private { background: #f3e9da; color: var(--warning); }
.memo-item-pill.is-pin { background: #f6e3d7; color: var(--terra); }
.memo-item-text { margin: 4px 0 8px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.memo-item-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.memo-item-actions .button { min-height: 30px; padding: 4px 10px; font-size: 11.5px; border-radius: 8px; }
.memo-empty { padding: 8px 4px; color: var(--ink-soft); font-size: 12.5px; }
@media (max-width: 640px) {
  .memo-fab { right: 12px; bottom: 14px; }
  .memo-drawer { right: 8px; left: 8px; bottom: 70px; width: auto; max-height: min(62vh, 540px); padding: 14px 12px 10px; }
  /* 16px 未満の入力欄にフォーカスすると iOS が画面を拡大する */
  .memo-drawer-compose textarea, .memo-page-compose textarea, .memo-item-editor textarea { font-size: 16px; }
}
@media print { .memo-fab, .memo-drawer { display: none !important; } }

/* ---- メモ帳の単独ページ(/memo) ---- */
.memo-open-page { margin-left: 8px; font-size: 11.5px; font-weight: 700; color: var(--forest); text-decoration: underline; text-underline-offset: 2px; }
body.memo-page { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
.memo-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; padding: 22px clamp(16px, 4vw, 40px) 18px; background: var(--paper-bright); border-bottom: 1px solid var(--line); }
.memo-page-brand h1 { margin: 2px 0 6px; font-size: 24px; }
.memo-page-brand .memo-hint { max-width: 62ch; }
.memo-page-session { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.memo-page-facility, .memo-page-select { display: inline-flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--ink-soft); font-weight: 700; }
.memo-page-facility select, .memo-page-select select, #memo-child-filter { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; }
.memo-page-user { font-size: 13px; font-weight: 700; }
.memo-page-main { max-width: 880px; margin: 0 auto; padding: 22px clamp(12px, 3vw, 28px) 60px; display: grid; gap: 16px; }
.memo-page-compose { display: grid; gap: 10px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper-bright); box-shadow: var(--shadow); }
.memo-page-compose textarea { width: 100%; min-height: 96px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; line-height: 1.6; resize: vertical; }
.memo-page-compose textarea:focus { outline: 2px solid var(--forest); outline-offset: -1px; }
.memo-page-compose-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; }
.memo-page-compose-row .button-primary { margin-left: auto; }
.memo-page-compose .memo-hint { margin: 0; }
.memo-page-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.memo-page-toolbar .memo-drawer-filter { background: var(--paper-bright); }
#memo-search { flex: 1 1 200px; min-height: 38px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; }
.memo-page-toolbar .memo-drawer-count { margin-left: auto; }
.memo-page-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.memo-page-list .memo-item { padding: 14px 16px; border-radius: 14px; }
.memo-page-list .memo-item-text { font-size: 15px; }
.memo-item-edited { color: var(--ink-soft); }
.memo-item-editor { display: grid; gap: 8px; margin-top: 6px; }
.memo-item-editor textarea { width: 100%; min-height: 96px; padding: 10px 12px; border: 1px solid var(--forest); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; line-height: 1.55; resize: vertical; }
.memo-item-editor-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.memo-item-editor-row select { min-height: 34px; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; font: inherit; font-size: 12.5px; }
.memo-page-status { position: fixed; left: 50%; bottom: 18px; z-index: 20; transform: translateX(-50%); max-width: calc(100vw - 32px); margin: 0; padding: 10px 16px; border-radius: 999px; background: var(--forest); color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 10px 24px rgb(12 46 49 / 28%); }
.memo-page-status[hidden] { display: none; }
.memo-page-gate { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: var(--paper); color: var(--ink-soft); font-size: 14px; font-weight: 700; text-align: center; }
.memo-page-gate[hidden] { display: none; }
@media (max-width: 640px) {
  .memo-page-head { padding: 16px 14px 14px; }
  .memo-page-brand h1 { font-size: 20px; }
  .memo-page-session { width: 100%; }
  .memo-page-facility { flex: 1 1 100%; }
  .memo-page-facility select { width: 100%; }
  .memo-page-compose { padding: 14px 12px; }
  .memo-page-compose-row .button-primary { flex: 1 1 100%; margin-left: 0; }
  .memo-page-toolbar .memo-drawer-count { flex: 1 1 100%; margin-left: 0; text-align: right; }
}

/* ---- メモ帳を別ウィンドウで開く ---- */
.memo-open-page { margin-left: 8px; padding: 0; border: 0; background: transparent; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--forest); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.memo-page-linked { padding: 4px 10px; border-radius: 999px; background: var(--forest-pale); color: var(--forest); font-size: 11.5px; font-weight: 800; }
.memo-page-linked[hidden] { display: none; }
body.memo-page.is-window .memo-page-head { padding: 12px 14px 10px; }
body.memo-page.is-window .memo-page-brand .eyebrow, body.memo-page.is-window .memo-page-brand .memo-hint, body.memo-page.is-window .memo-page-back { display: none; }
body.memo-page.is-window .memo-page-brand h1 { margin: 0; font-size: 18px; }
body.memo-page.is-window .memo-page-main { padding: 12px 12px 40px; gap: 10px; }
body.memo-page.is-window .memo-page-compose { padding: 12px; }
body.memo-page.is-window .memo-page-compose textarea { min-height: 72px; font-size: 14px; }
body.memo-page.is-window .memo-page-list .memo-item { padding: 10px 12px; }
body.memo-page.is-window .memo-page-list .memo-item-text { font-size: 14px; }
.memo-item-actions .button-primary { color: #fff; }

/* ---- 08 加算マスタ ---- */
.master-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 18px; margin: 0; }
.master-summary div { display: grid; gap: 3px; }
.master-summary dt { color: var(--ink-soft); font-size: 11.5px; font-weight: 700; }
.master-summary dd { margin: 0; font-size: 13.5px; line-height: 1.5; }

/* ================= 画面の見た目(スキン)。定義は /src/skins.js(ローカルデモと共通) ================= */
.skin-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 8px; }
.skin-option { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-bright); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.skin-option:hover { border-color: var(--sage); }
.skin-option.is-active { border-color: var(--terra); box-shadow: inset 0 0 0 1px var(--terra); background: #fdf7ea; }
.skin-option strong { font-size: 14px; }
.skin-option em { color: var(--vermillion); font-size: 11px; font-style: normal; font-weight: 700; }
.skin-option small { color: var(--ink-soft); font-size: 11.5px; line-height: 1.5; }
.skin-swatch { display: grid; grid-template-columns: 26px 1fr; gap: 4px; height: 44px; padding: 5px; margin-bottom: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.skin-swatch i { display: block; border-radius: 3px; background: var(--paper-deep); }
.skin-swatch i:first-child { grid-row: 1 / 3; background: var(--forest); }
.skin-swatch-large { grid-template-columns: 1fr; }
.skin-swatch-large i:first-child { display: none; }
.skin-swatch-large i { background: var(--ink); height: 10px; margin: 2px 0; }
.skin-swatch-stylish { background: #10201f; border-color: #10201f; }
.skin-swatch-stylish i { background: #2a3f3e; }
.skin-swatch-stylish i:first-child { background: #6aa8b4; }
.skin-swatch-simple { grid-template-columns: 1fr; background: #fdf4e6; border-color: #e2b07b; }
.skin-swatch-simple i:first-child { display: none; }
.skin-swatch-simple i { height: 10px; margin: 2px 0; border: 1px solid #c98a4b; background: #fff; }
.skin-card code { padding: 1px 6px; border-radius: 6px; background: var(--paper); font-size: 12px; }

/* かんたん3ステップの案内板(02 日誌) */
.simple-steps { margin-bottom: 18px; border-color: #e2b07b; background: #fdf7ea; }
.simple-steps[hidden] { display: none; }
.simple-steps-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.simple-steps-head h2 { margin: 2px 0 4px; font-size: 22px; letter-spacing: .08em; }
.simple-steps-head p { margin: 0; color: var(--ink-soft); font-size: 12.5px; }
.simple-steps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.simple-step { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 12px 14px; border: 2px solid #c98a4b; border-radius: 14px; background: #fff; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.simple-step.is-primary { background: #c98a4b; border-color: #c98a4b; color: #fff; }
.simple-step.is-primary small { color: rgba(255, 255, 255, .85); }
.simple-step.is-static { cursor: default; border-style: dashed; }
.simple-step-no { flex: 0 0 auto; font-size: 24px; font-weight: 700; }
.simple-step strong { display: block; font-size: 17px; }
.simple-step small { display: block; color: var(--ink-soft); font-size: 12px; }

/* large: 文字とボタンを大きく、コントラストを上げ、装飾を減らす */
html[data-skin="large"] { --ink: #0f1d20; --ink-soft: #2f4448; --line: #b9b1a3; --line-strong: #8f8778; }
html[data-skin="large"] body { zoom: 1.3; }
html[data-skin="large"] .app-dialog[open] { animation: none; }
html[data-skin="large"] .button, html[data-skin="large"] .primary-nav button, html[data-skin="large"] .memo-item-actions .button { min-height: 44px; }
html[data-skin="large"] .memo-drawer-head .memo-close { width: 44px; height: 44px; min-width: 44px; }
html[data-skin="large"] :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]) { min-height: 44px; font-size: 15px; }
html[data-skin="large"] .eyebrow { display: none; }
html[data-skin="large"] :focus-visible { outline: 3px solid var(--vermillion); outline-offset: 2px; }

/* stylish: 濃色の背景で装飾を抑える */
html[data-skin="stylish"] { color-scheme: dark; --ink: #e6ede9; --ink-soft: #a9bab5; --forest: #6aa8b4; --forest-deep: #4f8d99; --forest-pale: #1a3438; --paper: #0f1d1d; --paper-bright: #172a2b; --paper-deep: #1f3231; --line: #2b4140; --line-strong: #3f5a58; --vermillion-soft: #3a2a25; --shadow: none; }
html[data-skin="stylish"] body, html[data-skin="stylish"] :root { background: #0f1d1d; }
html[data-skin="stylish"] .sidebar { background: #0a1617; }
html[data-skin="stylish"] .app-dialog[open] { animation: none; }
html[data-skin="stylish"] .button-primary { color: #0a1a1c; }
html[data-skin="stylish"] :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]) { background: #0f1d1d !important; color: var(--ink) !important; border-color: var(--line-strong) !important; }
html[data-skin="stylish"] .app-dialog::backdrop { background: rgba(0, 0, 0, .7); }
html[data-skin="stylish"] th { background: var(--paper-deep); color: var(--ink); }
/* stylish: 本体で明るい面に決めているセレクタ(生成)を暗い面へ */
html[data-skin="stylish"] .workspace-context select,
html[data-skin="stylish"] .guardian-card,
html[data-skin="stylish"] .schedule-summary,
html[data-skin="stylish"] .summary-grid div,
html[data-skin="stylish"] .document-reference-content .document-list,
html[data-skin="stylish"] .monitoring-result-list li,
html[data-skin="stylish"] .evidence-counts div,
html[data-skin="stylish"] .facility-admin-card,
html[data-skin="stylish"] .staff-card,
html[data-skin="stylish"] .audit-list th,
html[data-skin="stylish"] .workflow-actions,
html[data-skin="stylish"] .facility-checks label,
html[data-skin="stylish"] .app-dialog,
html[data-skin="stylish"] .icon-button,
html[data-skin="stylish"] .field input,
html[data-skin="stylish"] .field select,
html[data-skin="stylish"] .field textarea,
html[data-skin="stylish"] .journal-writing-tools select,
html[data-skin="stylish"] .journal-writing-tools .writing-custom-target-length,
html[data-skin="stylish"] .assessment-writing-tools .writing-custom-target-length,
html[data-skin="stylish"] .plan-writing-tools .writing-custom-target-length,
html[data-skin="stylish"] .checkbox-field label,
html[data-skin="stylish"] .check-line,
html[data-skin="stylish"] .picker-option,
html[data-skin="stylish"] .picker-option.is-current,
html[data-skin="stylish"] .picker-recent-list .picker-option,
html[data-skin="stylish"] .picker-recent-list .picker-option.is-current,
html[data-skin="stylish"] .conflict-detail,
html[data-skin="stylish"] .attendance-toggle > button:not(.button),
html[data-skin="stylish"] .billing-check .check-icon,
html[data-skin="stylish"] .memo-drawer,
html[data-skin="stylish"] .memo-drawer-compose textarea,
html[data-skin="stylish"] .memo-drawer-filter,
html[data-skin="stylish"] .memo-item,
html[data-skin="stylish"] .memo-item.is-pinned,
html[data-skin="stylish"] body.memo-page,
html[data-skin="stylish"] .memo-page-head,
html[data-skin="stylish"] .memo-page-facility select,
html[data-skin="stylish"] .memo-page-select select,
html[data-skin="stylish"] #memo-child-filter,
html[data-skin="stylish"] .memo-page-compose,
html[data-skin="stylish"] .memo-page-compose textarea,
html[data-skin="stylish"] .memo-page-toolbar .memo-drawer-filter,
html[data-skin="stylish"] #memo-search,
html[data-skin="stylish"] .memo-item-editor textarea,
html[data-skin="stylish"] .memo-item-editor-row select,
html[data-skin="stylish"] .memo-page-gate { background: var(--paper-bright); background-image: none; color: var(--ink); border-color: var(--line); }
html[data-skin="stylish"] .simple-step.is-primary, html[data-skin="stylish"] .button-primary, html[data-skin="stylish"] .memo-fab, html[data-skin="stylish"] .memo-drawer-filter button.is-active, html[data-skin="stylish"] .primary-nav button[aria-current="page"] { background: #6aa8b4; color: #0a1a1c; }
html[data-skin="stylish"] .skin-option.is-active { background: #24382f; }

/* simple: メニューを隠し、日誌画面の 3 ステップだけ */
html[data-skin="simple"] .primary-nav, html[data-skin="simple"] #view-journals .page-heading p, html[data-skin="simple"] #view-journals .page-lead-toggle, html[data-skin="simple"] #logout-button { display: none !important; }
html[data-skin="simple"] body { zoom: 1.15; }
@media (max-width: 640px) {
  html[data-skin="large"] body, html[data-skin="simple"] body { zoom: 1; }
  html[data-skin="large"] :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]) { font-size: 17px; }
}
/* stylish: 監査で残った明るい面(ヘッダー帯・空の一覧・書類レーン・定義リスト・タブ) */
html[data-skin="stylish"] :is(.topbar, .record-list, .empty-state, .document-lane, .document-lane-record, .subsection-card, .section-tabs, .detail-sheet, .child-profile-photo, .save-status, .staff-context) { background: var(--paper-bright); background-image: none; color: var(--ink); border-color: var(--line); }
html[data-skin="stylish"] .topbar { background: #0f1d1d; }
html[data-skin="stylish"] .empty-state :is(strong, p, span) { color: var(--ink-soft); }
html[data-skin="stylish"] dt { background: transparent; color: var(--ink-soft); }
html[data-skin="stylish"] .logout-button { background: transparent; color: var(--ink); border-color: var(--line-strong); }
html[data-skin="stylish"] .section-tabs button { color: var(--ink-soft); }
html[data-skin="stylish"] .section-tabs button[aria-selected="true"], html[data-skin="stylish"] .section-tabs button.is-active { background: #6aa8b4; color: #0a1a1c; }


/* ---------- 予定・勤務・管理日案(段階5 スライス4)。ローカルデモの .sched-* と同じ並び ---------- */
.sched-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.sched-tab { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper, #fff); font: inherit; font-weight: 700; cursor: pointer; }
.sched-tab.is-active { color: #fff; background: var(--forest, #3a6b4f); border-color: var(--forest, #3a6b4f); }
.scheduling-body { display: block; }
.scheduling-body.empty-state { display: grid; }
.sched-plan-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 18px; margin-bottom: 12px; }
.sched-plan-head .eyebrow { margin: 0 0 4px; }
.sched-hint { margin: 4px 0 0; color: var(--ink-soft, #667); font-size: 12px; line-height: 1.7; }
.sched-counts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-soft, #667); white-space: nowrap; }
.sched-counts b { font-size: 16px; color: var(--ink, #223); margin: 0 2px; }
.sched-block-title { margin: 16px 0 6px; font-size: 13px; font-weight: 700; }
.sched-block-title small { margin-left: 8px; font-weight: 400; color: var(--ink-soft, #667); }
.sched-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sched-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 14px; }
.sched-form-grid label { display: grid; gap: 4px; font-size: 12px; }
.sched-form-grid label.full-width { grid-column: 1 / -1; }
.sched-form-grid input, .sched-form-grid select, .sched-form-grid textarea, .sched-detail input, .sched-detail select, .sched-month-note textarea, #sched-day-note { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; width: 100%; box-sizing: border-box; }
.sched-form-grid textarea, .sched-month-note textarea, #sched-day-note { min-height: 0; resize: vertical; line-height: 1.7; }
.place-field { display: grid; gap: 4px; }
.sched-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 8px 0 12px; }
.sched-head { padding: 4px 0; text-align: center; font-size: 11px; color: var(--ink-soft, #667); }
.sched-head.is-holiday, .sched-cell.is-holiday .sched-day { color: #b5503a; }
.sched-head.is-sat, .sched-cell.is-sat .sched-day { color: #2b62b3; }
.sched-cell { position: relative; display: grid; grid-template-rows: auto 1fr; align-items: center; min-height: 58px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper, #fff); font: inherit; cursor: pointer; text-align: left; }
.sched-cell.is-empty { border-color: transparent; background: transparent; cursor: default; }
/* 利用期間(04 の利用開始日・利用終了日)の外の日: 押せない・薄く(2026-09-30) */
.sched-cell.is-outside { border-style: dashed; background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0, 0, 0, 0.04) 6px 12px); color: #9a9a9a; cursor: not-allowed; }
.sched-table td.is-outside { color: #b0b0b0; background: rgba(0, 0, 0, 0.03); }
.sched-cell.is-contract { background: rgba(58, 107, 79, 0.08); }
.sched-cell.is-use { border-color: var(--forest, #3a6b4f); }
.sched-cell.is-absent { border-color: #c98a5a; }
.sched-cell.is-selected { outline: 2px solid var(--forest, #3a6b4f); outline-offset: 1px; }
.sched-cell:disabled { cursor: default; }
/* 一マス表記(2026-10-08): 利用の ○ の下に 送迎の ○×(行 / 帰) */
.sched-cell.is-use { min-height: 70px; padding-bottom: 18px; }
.sched-tr { position: absolute; left: 4px; right: 4px; bottom: 2px; display: flex; justify-content: center; gap: 4px; font-size: 10px; line-height: 1.4; }
.sched-tr-item { padding: 0 4px; border-radius: 6px; background: rgba(255, 255, 255, 0.85); color: var(--ink-soft, #667); cursor: pointer; }
.sched-tr-item b { margin-left: 1px; font-size: 11px; }
.sched-tr-item.is-on b { color: var(--forest, #3a6b4f); } .sched-tr-item.is-off b { color: #b5503a; }
.sched-tr-item:hover { outline: 1px solid var(--forest, #3a6b4f); }
.sched-cell.is-use .sched-dot, .sched-cell.is-use .sched-wait, .sched-cell.is-use .sched-full { bottom: 20px; }
.sched-batch { margin: 0 0 12px; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 12px; font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.sched-batch.is-on { display: block; border-style: solid; border-color: #d9a441; background: #fff7dc; }
.sched-batch.is-on .sched-actions { margin-top: 8px; }
.sched-confirm.is-changed { border-style: solid; border-color: #b5503a; background: #fff1eb; }
.sched-diff-list li.is-added { color: var(--forest, #3a6b4f); } .sched-diff-list li.is-removed, .sched-diff-list li.is-changed { color: #b5503a; }
.sched-confirm-mark { min-width: 26px; min-height: 24px; padding: 0 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper, #fff); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.sched-confirm-mark.is-none { color: var(--ink-soft, #667); } .sched-confirm-mark.is-saved { color: var(--forest, #3a6b4f); border-color: var(--forest, #3a6b4f); } .sched-confirm-mark.is-changed { color: #fff; background: #b5503a; border-color: #b5503a; }
.sched-day { font-size: 12px; }
.sched-mark { justify-self: center; font-size: 22px; font-weight: 700; line-height: 1; }
.sched-cell.is-absent .sched-mark { color: #c98a5a; }
.sched-event { position: absolute; top: 4px; right: 6px; font-size: 11px; color: #c98a5a; }
.sched-dot { position: absolute; bottom: 4px; right: 6px; font-size: 8px; color: var(--ink-soft, #667); }
.sched-detail { padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; margin-bottom: 12px; }
.sched-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.sched-detail-mark { font-weight: 700; }
/* 利用予定表の選んだ日の ○ 利用 / × 欠席 / ― なし(2026-10-15。マスは選ぶだけ) */
.sched-mark-set { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.sched-mark-btn { min-height: 32px; padding: 2px 12px; border: 1px solid #cbd8d4; border-radius: 999px; background: #fff; color: inherit; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.sched-mark-btn.is-active { border-color: #1f5a52; background: #1f5a52; color: #fff; }
.sched-mark-btn:disabled { opacity: .5; cursor: default; }

.sched-contract, .sched-month-note { margin-top: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; }
.sched-contract summary { cursor: pointer; font-weight: 700; font-size: 13px; }
.sched-contract > .sched-form-grid { margin-top: 10px; }
.sched-import { margin-top: 10px; }
.sched-import label { display: grid; gap: 4px; font-size: 12px; }
.sched-import textarea { min-height: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; line-height: 1.7; resize: vertical; }
.sched-week-list { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; }
.sched-week-list li { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.sched-week-list li.is-today { border-color: var(--forest, #3a6b4f); }
.sched-week-list li.is-holiday .sched-week-date { color: #b5503a; }
.sched-week-list li.is-sat .sched-week-date { color: #2b62b3; }
.sched-week-date { display: grid; justify-items: center; align-content: start; }
.sched-week-date b { font-size: 18px; line-height: 1; }
.sched-week-date small { font-size: 11px; }
.sched-week-today { font-size: 10px; padding: 1px 6px; border-radius: 999px; background: var(--forest, #3a6b4f); color: #fff; }
.sched-week-body { display: grid; gap: 4px; font-size: 12px; }
.sched-week-label { display: inline-block; margin-right: 8px; font-weight: 700; }
.sched-week-name { display: inline-block; margin: 0 8px 2px 0; }
.sched-week-name small { display: block; color: var(--ink-soft, #667); }
.scheduling-body .table-wrap { overflow-x: auto; max-width: 100%; }
.sched-table { min-width: 0; }
.sched-needs-table td.left b, .sched-rider, .sched-runs td:first-child, .sched-shift-table td.left { white-space: nowrap; }
.sched-riders { min-width: 14em; }
.sched-table th.is-selected { background: rgba(58, 107, 79, 0.12); }
.sched-daybtn { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.sched-role { display: inline-block; width: 1.4em; }
.sched-code { min-width: 30px; min-height: 30px; padding: 0 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper, #fff); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.sched-code-none { color: var(--ink-soft, #aab); font-weight: 400; }
.sched-code-出 { background: rgba(58, 107, 79, 0.12); border-color: var(--forest, #3a6b4f); }
.sched-code-半 { background: rgba(58, 107, 79, 0.06); }
.sched-code-休, .sched-code-有休 { color: #b5503a; }
.sched-code-研修, .sched-code-他 { color: #2b62b3; }
.sched-code:disabled { cursor: default; }
/* 勤務パターンの記号(2026-10-08): 種類ごとの色 */
.sched-kind-duty { background: rgba(58, 107, 79, 0.12); border-color: var(--forest, #3a6b4f); }
.sched-kind-support { background: #eef3ff; color: #2b62b3; border-color: #9fb6dc; }
.sched-kind-off { color: #6a7472; background: #f2f2ef; }
.sched-kind-leave { color: #b5503a; background: #fff1eb; }
.sched-kind-other { color: #7c6a3a; background: #fff7dc; }
.sched-code-unknown { color: #b5503a; border-style: dashed; }
.sched-stamps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.sched-stamp { min-width: 40px; min-height: 36px; font-size: 14px; }
.sched-stamp.is-active { outline: 3px solid var(--forest, #3a6b4f); outline-offset: 1px; }
.sched-site-total td { background: rgba(58, 107, 79, 0.08); font-weight: 700; }
.sched-confirm { margin: 0 0 12px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; font-size: 13.5px; line-height: 1.6; }
/* J4 / J5: 勤務表の「確認が要る日」(必要人数の不足・同じ職員の 2 か所同日)。目安なので赤ではなく注意色 */
.sched-alert { margin: 0 0 12px; padding: 10px 14px; border: 1px solid rgba(181, 80, 58, 0.45); border-radius: 12px; background: rgba(181, 80, 58, 0.06); font-size: 13.5px; line-height: 1.6; }
.sched-alert ul { margin: 6px 0 0; padding-left: 18px; }
.sched-shift-table th.is-alert { box-shadow: inset 0 -3px 0 #b5503a; }
.sched-rules-table select { min-height: 32px; font: inherit; padding: 2px 6px; border: 1px solid var(--line); border-radius: 8px; }
.sched-rules-table input[type="text"] { width: 100%; min-width: 10em; }
.sched-rules-table input[type="number"] { width: 5em; }
.sched-confirm.is-confirmed { border-style: solid; border-color: var(--forest, #3a6b4f); background: rgba(58, 107, 79, 0.08); }
.sched-confirm .sched-actions { margin-top: 8px; }
.sched-code { position: relative; }
.sched-code.is-diff { outline: 2px solid #b5503a; outline-offset: -1px; }
.sched-plan-mark { position: absolute; top: -6px; right: -4px; min-width: 14px; padding: 0 3px; border-radius: 8px; background: #b5503a; color: #fff; font-size: 9px; font-weight: 700; line-height: 14px; }
.sched-pattern-table select { min-width: 58px; min-height: 32px; font: inherit; }
.sched-pattern-table tr.is-off-roster td { color: var(--ink-soft, #667); background: rgba(0, 0, 0, 0.02); }
/* 勤務パターン表: 事業所ごとのブロックを上下に(2026-10-08 のスプレッドシートの並び。デモと同じ) */
.sched-pattern-site { margin: 12px 0 18px; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper, #fff); }
.sched-pattern-site-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 8px; }
.sched-pattern-site-head strong { font-size: 16px; }
.sched-pattern-site-head .sched-pattern-ym { font-weight: 700; color: var(--ink-soft, #667); }
.sched-pattern-site-head button { margin-left: auto; }
.sched-pattern-table .sched-service-row th { font-weight: 700; background: rgba(0, 0, 0, 0.03); }
.sched-pattern-table .sched-service-row input[type="text"] { width: 3.2em; min-width: 0; min-height: 32px; padding: 4px 2px; text-align: center; font: inherit; border: 1px solid var(--line); border-radius: 8px; }
/* J1: 印刷物から読み取った利用者の候補(1 人 1 枚のカード。チェックで取り込む) */
.child-import-dialog { width: min(980px, calc(100vw - 30px)); }
.child-import-list { display: grid; gap: 12px; max-height: min(60vh, 640px); overflow: auto; padding: 2px; }
.child-import-row { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper, #fff); }
.child-import-row.is-duplicate { border-style: dashed; background: rgba(0, 0, 0, 0.02); }
.child-import-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 8px; }
.child-import-row-head .sched-hint { margin: 0; }
.child-import-dialog .child-import-row .field-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 10px; }
.child-import-row .field-grid .field span { font-size: 11.5px; }
.child-import-row .field-grid input { min-height: 34px; font-size: 14px; }
.sched-pattern-master { margin-top: 14px; }
.sched-pattern-master summary { cursor: pointer; font-weight: 700; }
.sched-pattern-master-table input, .sched-pattern-master-table select { font: inherit; min-height: 32px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 8px; }
.sched-pattern-master-table input[type="time"] { width: 7.5em; }
.sched-pattern-master-table input[type="number"] { width: 5em; }
.sched-pattern-master-table input[type="text"] { width: 100%; min-width: 3.5em; }
.sched-needs-table td, .sched-runs td { white-space: normal; vertical-align: middle; }
.sched-needs-table input[type="text"] { min-width: 14em; width: 100%; min-height: 34px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.sched-needs-table select, .sched-runs select, .sched-runs input[type="text"] { min-height: 34px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.sched-runs input[type="text"] { width: 6em; }
.sched-need { display: inline-block; min-width: 2.6em; padding: 1px 6px; border-radius: 999px; font-size: 11px; background: rgba(0, 0, 0, 0.05); }
.sched-need.is-need { background: rgba(58, 107, 79, 0.15); color: var(--forest, #3a6b4f); font-weight: 700; }
.sched-rider { display: inline-flex; align-items: center; gap: 4px; margin: 2px 8px 2px 0; }
.sched-runs tr.is-pending td { background: rgba(201, 138, 90, 0.08); }
.sched-run-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; }
.sched-daily-grid { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: 14px 22px; margin-top: 12px; }
.sched-plain-list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.8; }
.sched-reflect { margin-top: 12px; padding: 10px 14px; border: 1px solid #c98a5a; border-radius: 12px; }
.sched-reflect-panel { margin-top: 6px; }
.status-pill.is-warn { background: rgba(201, 138, 90, 0.18); color: #8a4a1f; }
@media (max-width: 800px) {
  .sched-daily-grid { grid-template-columns: 1fr; }
  .sched-cell { min-height: 50px; }
  .sched-mark { font-size: 18px; }
}


/* ---------- 加算・書類チェック / 帳票出力(段階5 スライス5) ---------- */
.checks-body, .forms-body { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.checks-body.empty-state, .forms-body.empty-state { display: grid; }
.status-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(58, 107, 79, 0.12); color: var(--forest, #3a6b4f); white-space: nowrap; }
.status-pill.is-error, .status-pill.is-overdue { background: rgba(181, 80, 58, 0.15); color: #8a2f1f; }
.status-pill.is-warn, .status-pill.is-soon, .status-pill.is-missing { background: rgba(201, 138, 90, 0.18); color: #8a4a1f; }
.status-pill.is-ok, .status-pill.is-upcoming { background: rgba(58, 107, 79, 0.12); color: var(--forest, #3a6b4f); }
.checks-body .table-wrap, .forms-body .table-wrap { overflow-x: auto; max-width: 100%; }
.checks-table { min-width: 0; }
.checks-table td { white-space: normal; }
.checks-table td .status-pill { white-space: nowrap; }
.checks-table td:first-child { white-space: nowrap; }
.checks-table tr.is-overdue td { background: rgba(181, 80, 58, 0.05); }
.checks-table td .button-quiet { margin-left: 6px; }
.check-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.check-card { padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--forest, #3a6b4f); border-radius: 12px; background: var(--paper, #fff); }
.check-card.is-warn { border-left-color: #c98a5a; }
.check-card.is-error { border-left-color: #b5503a; }
.check-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.check-card header strong { font-size: 15px; }
.status-row { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.status-row strong { display: block; font-size: 12.5px; }
.status-row p { margin: 2px 0 0; color: var(--ink-soft, #667); font-size: 12px; line-height: 1.6; }
.status-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; color: #fff; background: #9aa; }
.status-icon.ok { background: var(--forest, #3a6b4f); }
.status-icon.warn { background: #c98a5a; }
.status-icon.error { background: #b5503a; }
.status-icon.info { background: #6b8aa8; }
.forms-catalog { display: grid; gap: 10px; }
.forms-catalog-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }
.forms-catalog-item { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper, #fff); font: inherit; text-align: left; cursor: pointer; }
.forms-catalog-item small { color: var(--ink-soft, #667); font-size: 11.5px; line-height: 1.5; }
.forms-catalog-item.is-active { border-color: var(--forest, #3a6b4f); box-shadow: inset 0 0 0 1px var(--forest, #3a6b4f); }
.forms-toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 18px; }
.forms-toolbar .eyebrow { margin: 0 0 4px; }
.forms-title { margin: 0; font-size: 18px; }
.forms-title small { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--ink-soft, #667); }
.forms-toolbar-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.forms-toolbar-actions .inline-field { display: grid; gap: 4px; font-size: 12px; }
.forms-toolbar-actions select { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--paper, #fff); }
.forms-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.forms-sources-label { margin-right: 4px; font-size: 12px; color: var(--ink-soft, #667); }
.form-sheet-wrap { overflow-x: auto; max-width: 100%; }
.form-sheet { min-width: 760px; padding: 18px 20px; border: 1px solid #c9cfcb; background: #fff; color: #172d31; font-size: 11.5px; line-height: 1.55; font-family: "BIZ UDPGothic", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif; }
.form-sheet .fs-input { color: inherit; background: rgba(120, 160, 180, 0.07); border-radius: 0; }
.form-sheet .fs-input:focus { outline: 2px solid var(--forest, #3a6b4f); outline-offset: -2px; background: #fff; }
.form-sheet textarea.fs-input { min-height: 34px; line-height: 1.45; resize: vertical; }
.form-sheet select.fs-input { padding: 0; }
.form-sheet .fs-input.w4 { width: 4em; } .form-sheet .fs-input.w7 { width: 7em; } .form-sheet .fs-input.w10 { width: 10em; }
.form-sheet .fs-input.fs-date { width: 9.5em; } .form-sheet .fs-input.fs-time { width: 5.6em; }
.form-sheet .fs-timepair { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.form-sheet .fs-radio { display: inline-flex; align-items: center; gap: 2px; margin-right: 4px; white-space: nowrap; }
.form-sheet .fs-participants { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; margin-top: 4px; }
.form-sheet .fs-participant { display: flex; align-items: center; gap: 3px; }
.form-sheet .fs-participant .fs-input { flex: 1 1 auto; min-width: 0; }
.form-sheet .fs-page + .fs-page { margin-top: 18px; padding-top: 18px; border-top: 2px dashed #c9cfcb; }

/* 日誌ダイアログ「まとめから作る」。1つの欄に書いた総括を各項目の下書きへ振り分ける */
.journal-summary {
  padding: 14px 16px;
  margin: 0 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper-soft, #f7f5ef);
}

.journal-summary-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.journal-summary-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.journal-summary-head h3 {
  margin: 2px 0 0;
  font-size: 15px;
}

.journal-summary textarea {
  width: 100%;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper-bright);
  font: inherit;
  line-height: 1.7;
  resize: vertical;
}

.journal-summary-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 10px;
}

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

.journal-summary-foot .journal-writing-note {
  flex: 1 1 260px;
  margin: 0;
  text-align: right;
}

@media (max-width: 680px) {
  .journal-summary-foot .journal-writing-note { text-align: left; }
}

/* 日誌ダイアログのテンプレート(事業所で共有する言い回しの引き出し) */
.journal-template {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px dashed var(--line-strong);
}

.journal-template-pick {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.journal-template select,
.journal-template input[type="text"] {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper-bright);
  font: inherit;
}

.journal-template select { min-width: 160px; max-width: 240px; }
.journal-template input[type="text"] { flex: 1 1 180px; }
.journal-template .journal-writing-note { flex: 1 1 100%; margin: 0; }

@media (max-width: 680px) {
  .journal-template { align-items: stretch; }
  .journal-template-pick { flex-direction: column; align-items: stretch; }
  .journal-template select { max-width: none; width: 100%; }
}

/* ログイン・新規登録の入力欄の下の補足(ユーザー ID の例など)。本文と同じ大きさで出ていた(2026-09-30) */
.login-card .login-hint { margin: -4px 0 10px; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }

/* ---------- 業務管理の 11 画面(ローカルデモと同じ並び)と「その他の画面」(2026-09-30) ---------- */
.nav-group-title { margin: 4px 11px 2px; color: #b8d7bd; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; }
.primary-nav button.is-placeholder { cursor: not-allowed; opacity: 0.45; }
.primary-nav button.is-placeholder:hover { background: none; color: rgb(240 244 235 / 74%); }
.nav-more { margin-top: 10px; border-top: 1px solid rgb(255 255 255 / 12%); padding-top: 8px; }
.nav-more > summary { cursor: pointer; padding: 6px 11px; color: rgb(240 244 235 / 70%); font-size: 13px; list-style: none; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::before { content: "▸ "; }
.nav-more[open] > summary::before { content: "▾ "; }
.primary-nav.sub-nav button { grid-template-columns: 1fr; min-height: 40px; font-size: 14px; }

/* マスタ画面(src/saas-masters.js)。操作列 → 「○○:」の選択 → 選んだ 1 件のフォーム → 一覧 */
.masters-body .master-card { display: grid; gap: 14px; }
.master-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.master-bar-group { display: flex; flex-wrap: wrap; gap: 8px; }
.master-pick { display: flex; align-items: center; gap: 8px; max-width: 520px; }
.master-pick span { flex: 0 0 auto; font-weight: 700; }
.master-pick select { flex: 1 1 auto; min-width: 0; }
.master-check { display: flex; align-items: center; gap: 8px; }
.master-check input { width: 20px; height: 20px; }
.master-pattern { display: grid; grid-template-columns: repeat(7, minmax(64px, 1fr)); gap: 8px; }
.master-quals input[type="text"] { width: 100%; }
/* 02 学校: 学年 × 曜日の下校時刻(2026-10-14) */
.master-grade-times input[type="text"] { width: 100%; min-width: 64px; text-align: center; }
.master-grade-times th[scope="row"] { white-space: nowrap; }
.master-grade-times td:last-child { width: 1%; white-space: nowrap; }
.master-grade-times .button { min-height: 32px; padding: 0 10px; font-size: 12px; }
.master-list tbody tr { cursor: pointer; }
.master-list tbody tr:hover, .master-list tbody tr.is-current { background: rgb(78 125 137 / 10%); }
.master-notices { margin: 0; padding: 10px 14px; border-radius: 10px; background: #fff7e3; list-style: none; }
.master-notices li.is-error { color: #a33725; font-weight: 700; }
.master-empty, .master-hint, .master-meta { margin: 0; color: var(--ink-soft); font-size: 13px; }
.master-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.master-tabs button { min-height: 40px; padding: 0 14px; border: 1px solid rgb(23 45 49 / 18%); border-radius: 999px; background: transparent; cursor: pointer; }
.master-tabs button.is-active { background: #173d3f; color: #fff; border-color: #173d3f; }
.settings-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.settings-links p { flex: 1 1 100%; margin: 0; color: var(--ink-soft); }

/* サイドバーの項目が増えても「現在の利用者」のカードなどを縮めない(縮めずにサイドバーの中でスクロール) */
.sidebar > * { flex-shrink: 0; }
@media (max-width: 860px) {
  .nav-group-title { grid-column: 1 / -1; margin: 0; }
  /* 「市町村管理」のような 5 文字の名前が途中で折れないよう、列の幅を広げる */
  .primary-nav { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .primary-nav button { min-width: 0; }
  .primary-nav button.is-placeholder { display: none; }
  .nav-more { margin-top: 6px; }
}
@media (max-width: 680px) {
  .master-pattern { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .master-bar, .master-bar-group { width: 100%; }
  .master-bar-group .button { flex: 1 1 30%; }
  .master-pick { max-width: none; }
}

/* ---------- スマホ・タブレットのメニュー(2026-09-30)。860px 以下は 業務管理 と その他の画面 を
   「メニュー」ボタン → 全画面のシートに畳み、事業所と利用者の欄を 1 行ずつに詰める。広い画面は従来どおり ---------- */
.nav-panel { display: contents; }
.nav-panel-head, .saas-menu-toggle { display: none; }
@media (max-width: 860px) {
  .sidebar { gap: 10px; padding: 12px 14px; }
  .brand { padding: 0 2px; }
  .brand > div > span:last-child { display: none; }
  .saas-menu-toggle {
    display: inline-flex; align-items: center; margin-left: auto; min-height: 44px; padding: 0 18px;
    border: 1px solid rgb(255 255 255 / 38%); border-radius: 999px; background: rgb(255 255 255 / 10%);
    color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
  }
  .facility-identity { margin: 0; padding: 0; border-left: 0; }
  .facility-identity > span, .facility-identity > strong, .facility-identity > label { display: none; }
  .facility-identity select { min-height: 40px; }
  .current-child { display: flex; align-items: center; gap: 8px; padding: 8px 12px; }
  .current-child .eyebrow, #current-child-meta { display: none; }
  .current-child strong { font-size: 15px; }
  .current-child::after { display: none; }
  .nav-panel { display: none; }
  .sidebar.is-menu-open .nav-panel {
    position: fixed; inset: 0; z-index: 100; display: block; overflow-y: auto;
    padding: 14px 16px calc(28px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(158deg, #2a716a 0%, #1d5b59 48%, #164c4d 100%);
  }
  .nav-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; color: #fff; font-size: 18px; }
  .nav-panel-close { min-height: 44px; padding: 0 18px; border: 1px solid rgb(255 255 255 / 38%); border-radius: 999px; background: transparent; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
  .nav-panel .primary-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; overflow: visible; }
  .nav-panel .primary-nav button { flex-direction: row; justify-content: flex-start; gap: 8px; min-height: 48px; padding: 10px 12px; text-align: left; }
  .nav-panel .primary-nav button.is-placeholder { display: flex; }
  .nav-panel .primary-nav button[aria-current="page"] { box-shadow: inset 3px 0 0 #e07854; }
  .nav-panel .nav-group-title { margin: 4px 2px 2px; }
  html.nav-menu-open, html.nav-menu-open body { overflow: hidden; }
  html.nav-menu-open .memo-fab { display: none; }
}

/* 04 利用者管理: 受給者証・契約・利用・支援・配慮点のタブ(src/saas-child-profile.js。デモの 04 とそろえた欄) */
.child-cert-form { margin-top: 12px; }
/* 利用実績タブ(2026-10-08。読むだけ) */
.usage-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin: 14px 0 12px; }
.usage-nav { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.usage-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 8px 0 14px; }
.usage-stats > div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-bright, #fafaf7); }
.usage-stats small { display: block; color: var(--ink-soft, #667); font-size: 11px; }
.usage-stats strong { display: block; margin: 2px 0; font-size: 18px; font-variant-numeric: tabular-nums; }
.usage-table th, .usage-table td { white-space: nowrap; }
.usage-table td.c { text-align: center; }
.usage-table .usage-note { white-space: normal; }
.usage-table tr.is-absent td { color: #8a4a1f; }
.usage-table tr.is-sun .usage-date { color: #b5503a; }
.usage-table tr.is-sat .usage-date { color: #2b62b3; }
#child-usage { min-width: 0; }
#child-usage .table-wrap { overflow-x: auto; }
@media (max-width: 860px) { .usage-table { min-width: 560px; } }
.cert-current-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 14px; border: 1px solid var(--line); border-left: 4px solid var(--forest, #3a6b4f); border-radius: 10px; background: #f6faf4; font-size: 13px; }
.cert-current-line.is-warn { border-left-color: #c9a24a; background: #fffaf0; }
.cert-current-line .eyebrow { margin: 0; }
.cert-status-note.is-future { color: #2f4f66; background: #eef5f9; border: 1px solid #bcd3e3; border-radius: 10px; padding: 8px 12px; }
.cert-past { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper, #fff); }
.cert-past > summary { padding: 10px 14px; font-weight: 700; cursor: pointer; }
.cert-past .cert-table { margin: 0; font-size: 13px; }
.cert-past .cert-table th, .cert-past .cert-table td { white-space: nowrap; }
.cert-past .cert-hist-row.is-selected td { background: #fffdf5; }
.cert-past .cert-hist-row.is-past td { color: var(--ink-soft, #667); }
@media (max-width: 860px) { .cert-past { overflow-x: auto; } .cert-past .cert-table { min-width: 560px; } }
.child-check { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-weight: 600; }
.child-check input { width: 18px; height: 18px; margin: 0; }
.field.child-check { flex-direction: row; align-self: end; }
.child-days { display: flex; flex-wrap: wrap; gap: 6px 14px; border: 1px solid var(--line, #d9d2c3); border-radius: 12px; padding: 10px 14px; margin: 0; }
.child-days legend { padding: 0 6px; font-weight: 700; font-size: 13px; }
.master-hint.is-warn { color: #8a4a1f; background: #fdf5e3; border: 1px solid #e6c98f; border-radius: 10px; padding: 8px 12px; }
.guardian-copy-address { display: flex; align-items: flex-end; }
.subsection-heading .card-tag { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 680px) {
  .child-days { gap: 4px 10px; }
  .child-check { min-height: 44px; }
  .guardian-copy-address .button { width: 100%; }
  /* 04 のタブは 6 つ(3 列 × 2 段)。「保護者情報」「支援・配慮点」が 2 行に折れないよう、横の余白を詰めて 1 行にする */
  .section-tabs button { padding-inline: 4px; white-space: nowrap; font-size: 13px; }
}

/* ホーム(ログインしたあとの最初の画面。src/saas-home.js) */
.home-nav { margin-bottom: 8px; }
.home-greeting { margin: 4px 0 0; color: var(--ink-soft); font-size: 14px; }
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.home-today { grid-row: span 2; }
.home-card .subsection-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.home-card h2 { margin: 2px 0 0; font-size: 20px; }
.home-sub { margin: 16px 0 6px; color: var(--ink-soft); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.home-dl { display: grid; gap: 0; margin: 0; }
.home-dl > div { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.home-dl > div:last-child { border-bottom: 0; }
.home-dl dt { color: var(--ink-soft); font-size: 12px; }
.home-dl dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.home-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.home-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-bright, #fff); }
.home-list li small { flex-basis: 100%; color: var(--ink-soft); font-size: 12px; }
.home-list li span { font-size: 13px; }
.home-list.is-muted li { background: transparent; }
.home-list li.is-overdue { border-color: #d9a39a; background: #fbeeea; }
.home-list li.is-soon, .home-list li.is-missing { border-color: #e6c98f; background: #fdf5e3; }
.home-memo-text { flex: 1 1 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.home-my-shift { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: rgba(58, 107, 79, 0.1); font-size: 14px; }
.home-events { margin: 0 0 4px; font-size: 14px; }
.home-duty { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.home-duty span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.home-duty small { color: var(--ink-soft); }
.home-note { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.home-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.home-week-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.home-week-list li { display: grid; grid-template-columns: 4.2em 4em minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; }
.home-week-list li.is-today { background: rgba(58, 107, 79, 0.1); font-weight: 700; }
.home-week-list li.is-holiday .home-week-date { color: #a8432d; }
.home-week-date { font-size: 16px; font-weight: 800; }
.home-week-date small { margin-left: 2px; font-size: 11px; font-weight: 600; }
.home-week-count { justify-self: start; padding: 2px 8px; border-radius: 999px; background: rgba(58, 107, 79, 0.12); font-size: 12px; font-weight: 700; }
.home-week-count.is-full, .home-week-count.is-over { background: rgba(201, 138, 90, 0.2); color: #8a4a1f; }
.home-week-text { color: var(--ink-soft); font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 980px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-today { grid-row: auto; }
}
@media (max-width: 680px) {
  .home-dl > div { grid-template-columns: 7.5em minmax(0, 1fr); }
  .home-actions .button { flex: 1 1 auto; min-height: 44px; }
}
.home-deadlines .master-hint { margin-top: 10px; }

/* 04 利用者管理の操作列(新規登録 / 削除 / 複写 | 一覧 / 緊急連絡一覧 / CSV出力) */
.child-profile-bar { margin: 0 0 14px; }
/* 04 の「利用者：」の選択(操作列とタブのあいだ) */
.child-inline-pick { margin: 0 0 14px; }

/* 帳票印刷(2026-10-28): 印刷のときだけ #form-print-host(帳票の HTML)を見せ、ほかは隠す。向きは中の <style> の @page */
.form-print-host { display: none; }
@media print {
  html.is-printing-form body > *:not(#form-print-host) { display: none !important; }
  html.is-printing-form #form-print-host { display: block !important; color: #000; background: #fff; }
}

/* 04 の「緊急連絡一覧」の印刷(A4 横)。印刷のときだけ #roster-print-sheet を見せ、ほかは隠す */
.roster-print-sheet { display: none; }
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  html.is-printing-roster body > *:not(#roster-print-sheet) { display: none !important; }
  html.is-printing-roster #roster-print-sheet { display: block !important; color: #000; background: #fff; font-size: 11pt; }
  .roster-print-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6mm; }
  .roster-print-head h1 { margin: 0; font-size: 16pt; }
  .roster-print-head p { margin: 0; font-size: 9pt; }
  .roster-print-table { width: 100%; border-collapse: collapse; }
  .roster-print-table th, .roster-print-table td { padding: 2mm 3mm; border: 1px solid #555; text-align: left; vertical-align: top; }
  .roster-print-table th { background: #eee; }
}

/* 職員・権限: 検証環境のデータの取り込み(src/saas-demo-import.js)と、ユーザー ID の職員の表示 */
.demo-import { display: grid; gap: 12px; }
.import-group { display: grid; gap: 6px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.import-group legend { padding: 0 6px; font-weight: 800; font-size: 13px; }
.import-row { display: flex; align-items: flex-start; gap: 10px; padding: 6px 4px; border-radius: 8px; cursor: pointer; }
.import-row input { width: 18px; height: 18px; margin-top: 3px; flex: 0 0 auto; }
.import-row span { display: grid; gap: 2px; }
.import-row small { color: var(--ink-soft); font-size: 12px; }
.import-row.is-done { opacity: .6; cursor: default; }
.import-tag { justify-self: start; display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(201, 138, 90, 0.18); color: #8a4a1f; font-size: 11px; font-weight: 700; }
.import-result { padding: 12px 14px; border-radius: 12px; background: rgba(58, 107, 79, 0.1); }
.import-result p, .import-result ul { margin: 6px 0 0; font-size: 13px; }
.staff-login-id { color: var(--ink-soft); font-size: 13px; }
@media (max-width: 680px) { .import-row { min-height: 44px; } }

/* 11 設定の休業日・開所日(今月の休日あつかいの日) */
.calendar-preview { margin-top: 12px; }
.calendar-preview-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }

/* 09 予定・勤務: 定員とキャンセル待ち・支給量・曜日まとめて ○・契約曜日(デモの styles.css と同じ見た目。2026-09-30) */
.sched-cell.is-waiting { border-color: #d9a441; background: #fff7e3; }
.sched-cell.is-waiting .sched-mark { color: #8a5a00; }
.sched-wait, .sched-full { position: absolute; left: 6px; bottom: 3px; padding: 0 5px; border-radius: 99px; font-size: 10px; font-weight: 700; line-height: 1.5; }
.sched-wait { background: #d9a441; color: #fff; }
.sched-full { background: rgba(189, 91, 64, 0.12); color: #9a3f2a; }
.sched-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.5); }
.sched-bulk-label { color: var(--ink-soft); font-size: 12.5px; font-weight: 700; }
.sched-check { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.sched-contract-days { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 10px 0; }
.sched-list-table td.is-over, .sched-list-table th.is-over { background: rgba(189, 91, 64, 0.16); color: #9a3f2a; }
.sched-list-table td.is-full, .sched-list-table th.is-full { background: rgba(217, 164, 65, 0.22); }
.sched-list-table td.is-quota-over { color: #9a3f2a; }
.sched-wait-mark { display: inline-block; padding: 0 4px; border-radius: 99px; background: #d9a441; color: #fff; font-size: 10px; font-weight: 700; }
.sched-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 10px; color: var(--ink-soft); font-size: 12px; }
.sched-legend i { display: inline-block; width: 14px; height: 14px; margin-right: 4px; border-radius: 3px; vertical-align: -2px; }
.sched-legend i.is-over { background: rgba(189, 91, 64, 0.16); }
.sched-legend i.is-full { background: rgba(217, 164, 65, 0.22); }
.sched-counts .is-warn, .sched-counts .is-warn b { color: #9a3f2a; }
.sched-hint.is-warn { color: #8a4a1f; background: #fdf5e3; border: 1px solid #e6c98f; border-radius: 10px; padding: 8px 12px; }

/* 日々の記録の順番(出欠 → 日誌 → 連絡帳)の案内・ホームの進み具合・保護者への報告文・音声入力(2026-09-30) */
.flow-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid #e6c98f; border-radius: 10px; background: #fdf5e3; color: #6b3f14; font-size: 13px; line-height: 1.7; }
.flow-note.is-blocking { border-color: #d49a8a; background: #fbebe6; color: #7a2e1c; }
.flow-note > span { flex: 1 1 260px; }
.home-progress-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.home-progress-list li { display: grid; grid-template-columns: minmax(6em, 1fr) auto auto; align-items: center; gap: 6px 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.6); }
.home-progress-list li.is-done { background: rgba(58, 107, 79, 0.07); }
.home-steps { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.home-step { display: inline-block; padding: 1px 8px; border-radius: 99px; background: rgba(0, 0, 0, 0.05); color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
.home-step.is-done { background: rgba(58, 107, 79, 0.15); color: #2f5a41; font-weight: 700; }
.home-step.is-skip { opacity: 0.6; }
.home-step-next { justify-self: end; white-space: nowrap; }
.home-step-next.is-done { color: #2f5a41; font-size: 12px; font-weight: 700; }
@media (max-width: 560px) {
  .home-progress-list li { grid-template-columns: 1fr; }
  .home-step-next { justify-self: start; }
}
.contact-family-report { display: grid; gap: 6px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.contact-family-report-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.dictate-button.is-recording { border-color: #c0392b; color: #c0392b; font-weight: 700; }
.contact-family-report-row label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.contact-family-report-row select { width: auto; min-width: 9em; }

/* 点検まわり: 運営基準の点検・加算の取りこぼし/根拠・加算マスタの補助(2026-09-30) */
.compliance-table td, .compliance-table th { vertical-align: middle; }
.compliance-table input[type="text"] { min-width: 12em; width: 100%; }
.compliance-table .status-pill { white-space: normal; line-height: 1.5; }
.check-hints { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.check-hints summary { cursor: pointer; font-weight: 700; font-size: 13px; }
.check-hint-list { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.check-hint-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 4px 10px; font-size: 13px; }
.check-hint-list li > button { grid-column: 2; justify-self: start; min-height: 32px; padding: 4px 12px; font-size: 12.5px; }
.check-hint-list li p { margin: 2px 0 0; color: var(--ink-soft); }
.check-hint-list li.is-ok { opacity: 0.75; }
@media (max-width: 560px) { .check-hint-list li { grid-template-columns: 1fr; } .check-hint-list li > button { grid-column: 1; } }
.master-records summary { cursor: pointer; font-weight: 700; margin-top: 10px; }
.master-records .table-scroll { overflow-x: auto; margin-top: 8px; }
.master-records-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.master-records-table th, .master-records-table td { border-bottom: 1px solid var(--line, #e3ded3); padding: 6px 8px; text-align: left; vertical-align: top; }
.master-records-table th { white-space: nowrap; }
.master-records-table td:nth-child(2) { min-width: 10em; }
.master-records-table .is-center { text-align: center; }
#master-catalog .button { margin: 6px 8px 0 0; }

/* 08 利用予定表の「保護者入力モード(リンク)」(段階5 スライス6) */
.sched-guardian { display: grid; gap: 8px; }
.sched-guardian input[type="text"] { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 13px; background: var(--paper-bright); }
.sched-import .sched-inline, .sched-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.sched-inline select { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font: inherit; background: var(--paper-bright); }

/* ---------- J10: 使い方(業務の流れ・用語)と、はじめて開いたときの案内。ローカルデモと同じ見え方 ---------- */
.brand .guide-button { margin-left: auto; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; }
.first-run-note {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 12px 16px; margin: 0 0 14px; border: 1px solid #d9c7a7; border-radius: 12px; background: #f5ecd9; color: #4a4034; font-size: 13px;
}
.first-run-note p { margin: 0; flex: 1 1 320px; }
.first-run-note strong { margin-right: 4px; }
.first-run-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.guide-dialog { width: min(640px, calc(100vw - 30px)); max-height: calc(100vh - 40px); overflow: auto; }
.guide-lead { margin: 0 0 12px; color: #59696b; font-size: 13px; }
.guide-steps { display: grid; padding: 0; margin: 0; gap: 10px; list-style: none; }
.guide-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 13px; border: 1px solid #e3ddd0; border-radius: 10px; background: #faf8f2; }
.guide-steps li > span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; color: #fff; background: #2b3a3c; }
.guide-steps strong { display: block; margin-bottom: 2px; font-size: 13px; }
.guide-steps p { margin: 0; color: #59696b; font-size: 12.5px; }
.guide-screens { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.guide-screen { padding: 4px 10px; border: 1px solid #d5cfc3; border-radius: 999px; background: #fff; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.guide-screen:hover { border-color: #2b3a3c; }
.guide-glossary { margin-top: 14px; font-size: 12.5px; }
.guide-glossary > summary { cursor: pointer; font-weight: 600; }
.guide-glossary dl { display: grid; gap: 6px; margin: 10px 0 0; }
.guide-term { display: grid; grid-template-columns: minmax(9em, 12em) 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #e3ddd0; }
.guide-term dt { font-weight: 600; }
.guide-term dd { margin: 0; color: #59696b; }
.guide-caution { padding: 11px 13px; margin-top: 14px; border: 1px solid #d9c7a7; border-radius: 9px; color: #6b5d48; background: #f5ecd9; font-size: 12.5px; }
@media (max-width: 860px) {
  .first-run-actions { width: 100%; }
  .first-run-actions .button { flex: 1 1 auto; }
  .guide-term { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- FC1: 計画の目標と日誌の紐づけ ---------- */
#journal-goal-options { display: grid; gap: 6px; }
#journal-goal-options label { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.4; }
.tag-list.goal-tags li { border-color: #577787; color: #577787; }

/* ---------- 2026-10-13: 入力欄をそのまま見せる画面(04 利用者管理・業務管理のマスタ)は小さめにして全体を見渡せるように ---------- */
:is(#view-child, #view-masters) .field { margin-top: 0; gap: 3px; }
:is(#view-child, #view-masters) .field > span,
:is(#view-child, #view-masters) .checkbox-field legend { font-size: 12px; }
:is(#view-child, #view-masters) .field em,
:is(#view-child, #view-masters) .field small { font-size: 11px; }
:is(#view-child, #view-masters) .field input,
:is(#view-child, #view-masters) .field select,
:is(#view-child, #view-masters) .field textarea { min-height: 34px; padding: 5px 9px; border-radius: 7px; font-size: 14px; }
:is(#view-child, #view-masters) .field textarea { min-height: 0; line-height: 1.6; }
:is(#view-child, #view-masters) .field input[type="checkbox"] { min-height: 0; }
:is(#view-child, #view-masters) .field-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 12px; }
:is(#view-child, #view-masters) .field-wide { grid-column: 1 / -1; }
:is(#view-child, #view-masters) .check-line { margin-top: 0; font-size: 13px; }
:is(#view-child, #view-masters) .settings-card { padding: 14px 16px; }
:is(#view-child, #view-masters) .button { min-height: 38px; padding-inline: 14px; font-size: 14px; }
:is(#view-child, #view-masters) .section-tabs button { min-height: 38px; padding-inline: 14px; font-size: 14px; }
#view-child .section-tabs { margin-bottom: 10px; }
.plain-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.child-inline-form { display: grid; gap: 10px; }
.child-inline-form.is-draft { border-color: var(--forest); box-shadow: inset 4px 0 0 var(--forest); }
.child-inline-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.child-inline-head .eyebrow { margin: 0; }
.child-inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.child-inline-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 12px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--paper-bright); border: 1px solid var(--line); }
.child-inline-summary > div { display: grid; gap: 1px; }
.child-inline-summary dt { color: var(--ink-soft); font-size: 11px; }
.child-inline-summary dd { margin: 0; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.child-inline-summary dd.is-empty { color: var(--ink-soft); font-weight: 400; }
.child-inline-hint { margin: 0; color: var(--ink-soft); font-size: 12px; }
#guardian-list.guardian-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.guardian-inline-form { gap: 8px; padding: 12px 14px; }
.guardian-inline-form.is-draft { border-style: dashed; border-color: var(--forest); }
.guardian-inline-form .guardian-heading h3 { font-size: 15px; }
.guardian-inline-form .guardian-heading > span { font-size: 12px; }
.guardian-inline-form .guardian-copy-address { display: flex; align-items: flex-end; }
.guardian-inline-form .guardian-actions { justify-content: flex-end; }
.guardian-inline-form .check-line { padding: 2px 0; border: 0; background: none; }
.schedule-inline-form { display: grid; gap: 10px; margin-top: 12px; }
.schedule-inline-head h2 { margin: 0; font-size: 16px; }
.schedule-inline-head p { margin: 2px 0 0; color: var(--ink-soft); font-size: 12px; }
.schedule-inline-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
@media (max-width: 680px) {
  :is(#view-child, #view-masters) .field input,
  :is(#view-child, #view-masters) .field select,
  :is(#view-child, #view-masters) .field textarea { font-size: 16px; } /* iOS の焦点での拡大を防ぐ */
  :is(#view-child, #view-masters) .field-grid { grid-template-columns: minmax(0, 1fr); }
}
/* 勤務パターン表の 職種・人員配置・勤務形態 のプルダウン(2026-10-13) */
.sched-pattern-table .sched-staff-attr { max-width: 12em; min-height: 30px; padding: 2px 4px; font-size: 12px; }
.sched-pattern-table td:first-child .sched-staff-attr { width: 11em; max-width: 11em; }
/* 立場(職種 × 人員配置)ごとの行(2026-10-15 京都市様式: 同じ人の 基準 / 加配 の行) */
.sched-position-row > td { background: #f7faf9; }
.sched-position-row > td:first-child { border-left: 3px solid #b9d3cc; }
/* 勤務パターン表の行の 追加 / 削除 と 氏名のプルダウン(2026-10-15) */
.sched-roster-add { display: flex; justify-content: flex-start; margin: 8px 0 2px; }
.sched-pattern-table .sched-row-name { min-width: 8.5em; max-width: 12em; }
.sched-pattern-table .sched-row-del { min-height: 30px; padding: 0 10px; font-size: 12px; white-space: nowrap; }
.sched-pattern-table td.is-elsewhere select { opacity: .45; }
.sched-code.is-elsewhere { opacity: .35; }
/* 08 勤務表: 2 つ目の自事業所の行(見るだけ。入力はその事業所に切り替えて。2026-10-19) */
.sched-code.is-other-site:disabled { opacity: .75; cursor: default; }
/* 03 事業所管理: 他事業所(上限額管理の相手先)の表 */
.partners-table input { width: 100%; min-width: 7em; }
.partners-table td { vertical-align: middle; }
.partners-actions { margin-top: 8px; }
@media (max-width: 680px) {
  /* 他事業所の表はスマホで 1 件 1 枚(欄の見出しは data-label) */
  .table-wrap:has(> .partners-table) { overflow: visible; }
  .partners-table { min-width: 0; width: 100%; }
  .partners-table thead { display: none; }
  .partners-table, .partners-table tbody { display: block; width: 100%; }
  .partners-table tbody tr { display: flex; flex-direction: column; gap: 6px; margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
  .partners-table td { display: block; padding: 0; border: 0; text-align: left; }
  .partners-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--ink-soft); font-size: 12px; }
  .partners-table td:last-child { text-align: right; }
}

/* ---------- 2026-10-14: 04 契約・利用は事業所ごとの契約のカード。契約曜日は横に並べる ---------- */
.settings-form .field.child-days,
:is(#view-child, #view-masters) .field.child-days { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.guardian-list.contract-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
.contract-card.is-primary { border-color: #8fb3a8; }
.contract-card .guardian-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.contract-card .guardian-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
/* 保存はカードの右上(2026-10-15 の要望「保存ボタンの位置を変更」。保護者のカード・支援・配慮点) */
.guardian-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.guardian-card-head .guardian-heading { flex: 1 1 auto; min-width: 0; }
.guardian-card-head .guardian-actions { flex: 0 0 auto; justify-content: flex-end; margin: 0; }
.subsection-heading .card-head-actions { flex: 0 0 auto; display: flex; gap: 8px; align-self: flex-start; }
/* 04 児童情報: 生年月日の横に年齢(読むだけ)と、学年の下の下校時刻の案内 */
#child-edit-age { background: #f4f1ea; }
.child-dismissal-hint { margin: 0; color: var(--ink-soft); font-size: 12px; }

/* ---------- 2026-10-14: スマホ版の体裁(SaaS)。基本の規則より後ろに置く ---------- */
/* 10 管理日案: 中の表が広くても列が縮まず、ページごと横にはみ出していた(表は .table-wrap の中で横に動かす) */
.sched-daily-grid > * { min-width: 0; }
@media (max-width: 800px) {
  .sched-daily-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  /* ヘッダーの下の帯はログアウトだけなので、細く右に寄せる(以前は 1 段まるごと使っていた) */
  .topbar, .topbar:has(.workspace-context[hidden]) { min-height: 0; padding: 6px 14px; justify-content: flex-end; gap: 8px; }
  .topbar .logout-button { min-height: 32px; padding: 0 12px; font-size: 12px; }
  /* 右下の「メモ」が最後の欄やボタンに重ならないよう、下に余白 */
  main { padding-bottom: 96px; }
  /* 見出しの「再読み込み」などは幅いっぱいにしない */
  .page-heading { align-items: stretch; gap: 10px; margin-bottom: 18px; }
  .page-heading > .button { align-self: flex-start; width: auto; min-height: 36px; padding-inline: 14px; }
  .page-heading .attendance-controls { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
  .page-heading .attendance-controls .inline-field { flex: 1 1 140px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .page-heading .attendance-controls .inline-field :is(input, select) { width: 100%; min-width: 0; box-sizing: border-box; }
  /* iOS Safari の 月 / 日 の入力は固有の幅を持ち、欄からはみ出して「再読み込み」に重なった(2026-10-15)。素の見た目にして欄の幅に収める */
  .page-heading .attendance-controls .inline-field input:is([type="month"], [type="date"]) { -webkit-appearance: none; appearance: none; display: block; text-align: left; }
  .page-heading .attendance-controls .inline-field input:is([type="month"], [type="date"])::-webkit-date-and-time-value { text-align: left; min-height: 1.3em; }
  .page-heading .attendance-controls > .button { flex: 0 0 auto; min-height: 40px; }
  /* 「1件」などの札は見出しの右に置いたまま(1 行まるごと使わない) */
  .subsection-heading { flex-direction: row; flex-wrap: nowrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .subsection-heading > div { min-width: 0; }
  /* 切り替えの丸いタブ(予定・勤務 / 帳票の種類)は折り返さず横に動かす */
  .sched-tabs { flex-wrap: nowrap; overflow-x: auto; margin-inline: -2px; padding: 2px 2px 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .sched-tab { flex: 0 0 auto; white-space: nowrap; }
}
@media (max-width: 680px) {
  /* 並んだボタン(連絡事項を保存・送信用テキスト… / 基本パターンから…)は幅をそろえる */
  .sched-actions > .button, .sched-bulk > .button { flex: 1 1 100%; justify-content: center; }
  .sched-run-actions > .button { flex: 1 1 auto; }
  /* 04 の操作列: 「緊急連絡一覧」が 2 行に折れないように */
  .child-profile-bar .button { padding-inline: 6px; white-space: nowrap; font-size: 13px; }
  /* 受給者証の操作列: 3 つ並べると文字が 3 行に折れるので 2 列(「更新する」は幅いっぱい) */
  #child-certs .master-bar-group:first-child { display: grid; grid-template-columns: 1fr 1fr; }
  #child-certs .master-bar-group:first-child > :first-child { grid-column: 1 / -1; }
  #child-certs .master-bar-group:last-child { display: grid; grid-template-columns: 1fr; }
  /* 02 学校: 学年 × 曜日の表を詰める(月〜金と「月→金」が画面に入るように) */
  .settings-table.master-grade-times { min-width: 0; }
  .master-grade-times th, .master-grade-times td { padding: 3px 2px; }
  .master-grade-times th[scope="row"] { font-size: 12px; }
  .settings-table.master-grade-times input[type="text"] { min-width: 40px; padding: 4px 1px; }
  .master-grade-times .button { min-height: 32px; padding: 0 6px; font-size: 11px; }
  /* 04 契約・利用: 契約曜日を 1 行に */
  .settings-form .field.child-days,
  :is(#view-child, #view-masters) .field.child-days { gap: 2px 10px; padding: 8px 10px; }
  .contract-card .child-check { gap: 4px; }
}

/* ---------- 2026-10-14: 一覧の表(04 利用者・01/02/03/05/06 マスタ)。スマホは 1 件 1 枚のカード ---------- */
/* 表を包む枠が横に動かず、表がカードを突き抜けて画面の右に切れていた */
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 680px) {
  .table-wrap:has(> .master-list) { overflow: visible; }
  .settings-table.master-list { min-width: 0; width: 100%; border-collapse: separate; }
  .master-list thead { display: none; }
  .master-list, .master-list tbody { display: block; width: 100%; }
  .master-list tbody tr { display: flex; flex-direction: column; gap: 2px; margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-bright, #fffdf8); }
  .master-list tbody tr.is-current { border-color: var(--forest); box-shadow: inset 3px 0 0 var(--forest); }
  .master-list td { display: flex; gap: 10px; padding: 1px 0; border: 0; font-size: 13px; line-height: 1.5; text-align: left; }
  .master-list td::before { content: attr(data-label); flex: 0 0 7.5em; color: var(--ink-soft); font-size: 12px; }
  .master-list td:empty { display: none; }
  .master-list td.list-title { order: -1; margin-bottom: 2px; font-size: 15px; font-weight: 700; }
  .master-list td.list-title::before { display: none; }
}

/* 2026-10-15: カード右上の保存はスマホでも右上に置いたまま(基本の規則より後ろ) */
@media (max-width: 680px) {
  .guardian-card-head { flex-direction: row; align-items: flex-start; }
  .guardian-card-head .guardian-actions .button { min-height: 40px; padding: 6px 14px; width: auto; }
  .subsection-heading .card-head-actions .button { width: auto; }
}

/* ---------- 不正アクセスの検知(職員・権限。src/saas-security.js。2026-10-20) ---------- */
.security-detections { display: grid; gap: 12px; }
.security-detections .subsection-heading { align-items: flex-start; }
.security-detections .subsection-heading p:not(.eyebrow) { margin: 6px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.7; max-width: 70ch; }
.security-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.security-tile { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.security-tile span { color: var(--ink-soft); font-size: 12px; }
.security-tile b { font-size: 22px; line-height: 1.2; }
.security-tile.is-critical { border-color: var(--vermillion); background: var(--vermillion-soft); }
.security-tile.is-warning { border-color: #c9a227; background: #fff8e3; }
.security-table td { vertical-align: top; }
.security-table tr.is-critical td:first-child { box-shadow: inset 3px 0 0 var(--vermillion); }
.security-table tr.is-warning td:first-child { box-shadow: inset 3px 0 0 #c9a227; }
.security-sev-critical { background: var(--vermillion-soft); color: var(--vermillion); }
.security-sev-warning { background: #fff3c4; color: #7a5a00; }
.security-sev-info { background: rgb(78 125 137 / 12%); color: var(--forest); }
.security-env { display: block; font-size: 11px; color: var(--ink-soft); font-weight: 400; }
.security-advice { padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; }
.security-advice summary { cursor: pointer; font-weight: 700; font-size: 13px; }
.security-advice ul { margin: 8px 0 0; padding-left: 1.2em; font-size: 12px; line-height: 1.7; color: var(--ink-soft); }
.security-settings { padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.security-settings summary { cursor: pointer; font-weight: 700; font-size: 13px; }
.security-settings summary small { margin-left: 6px; color: var(--ink-soft); font-weight: 400; }
.security-settings-body { display: grid; gap: 10px; padding: 10px 0 4px; }
.security-settings-body textarea { width: 100%; font: inherit; font-size: 14px; }
.security-settings-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (max-width: 680px) {
  /* スマホは 1 件 1 枚(.master-list のカード)。重さの印はカードの左の線で */
  .security-table tr.is-critical td:first-child, .security-table tr.is-warning td:first-child { box-shadow: none; }
  .security-table tbody tr.is-critical { border-left: 4px solid var(--vermillion); }
  .security-table tbody tr.is-warning { border-left: 4px solid #c9a227; }
}

/* 07 利用予定表の「この月の予定をすべて消す」(2026-10-23)と 10 の 帳票(管理日案)タブ */
.sched-bulk .button.is-danger { color: #9b2c2c; border-color: #e0b4b4; }
.sched-bulk .button.is-danger:hover { background: #fbeaea; }
.sched-daily-form { margin-top: 12px; }
.sched-daily-form .form-sheet-wrap { overflow-x: auto; }

/* 03 事業所管理: 休止中の事業所の完全削除(2026-10-23) */
.office-purge { margin-top: 16px; }
.office-purge-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.office-purge-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.office-purge .button.is-danger { color: #9b2c2c; border-color: #e0b4b4; }

/* 07 利用予定・実績 の帯の右: 利用予定一覧(Excel)・CSV出力(2026-10-23)。キャンセル待ちの印(待)はマスの文字 */
.sched-tab-actions { display: inline-flex; gap: 6px; margin-left: auto; align-items: center; }
.sched-tab-actions[hidden] { display: none; }
.sched-nav .sched-nav-export { margin-left: auto; }
.sched-nav .sched-nav-export + .sched-nav-export { margin-left: 0; }
.sched-mark-btn[data-mark="wait"].is-active { border-color: #d9a441; background: #d9a441; color: #fff; }
.sched-cell.is-waiting .sched-mark { color: #8a5a00; font-size: 15px; }
@media (max-width: 680px) { .sched-tab-actions, .sched-nav .sched-nav-export { margin-left: 0; } }

/* 07 利用予定表の詳細欄(2026-10-26): 行きの送迎 / 帰りの送迎 / 備考 / イベント の 2 × 2、送迎は 区分 + 時刻・コメント、「この日を保存」は右上。説明はふだん畳む */
.sched-detail-head .sched-day-save { margin-left: auto; }
.sched-form-grid.sched-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sched-leg-row { display: flex; gap: 6px; align-items: center; }
.sched-leg-row select { flex: 0 0 auto; width: auto; min-width: 8.5em; }
.sched-leg-row input { flex: 1 1 auto; min-width: 0; }
.sched-help { margin: 6px 0 0; }
.sched-help > summary { display: inline-flex; align-items: center; padding: 2px 12px; min-height: 30px; border: 1px solid var(--line, #d5dde0); border-radius: 999px; color: var(--ink-soft, #667); font-size: 12px; cursor: pointer; list-style: none; }
.sched-help > summary::-webkit-details-marker { display: none; }
.sched-help .sched-help-open, .sched-help[open] .sched-help-closed { display: none; }
.sched-help[open] .sched-help-open { display: inline; }
.sched-plan-head .sched-counts { margin-top: 6px; }
@media (max-width: 680px) {
  .sched-form-grid.sched-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .sched-detail-head .sched-day-save { margin-left: 0; width: 100%; }
}

/* 08 勤務予定表・勤務実績(2026-10-27): 事業所ごとに 1 つの表。サービス提供時間の行と事業所の勤務者の合計で区切り、表ごとに横スクロール */
.sched-shift-site + .sched-shift-site { margin-top: 18px; padding-top: 14px; border-top: 2px solid rgba(84, 125, 130, 0.25); }
.sched-shift-site-title { margin: 0 0 6px; font-weight: 700; }
.sched-shift-site-title small { margin-left: 8px; font-weight: 400; }
.sched-shift-table .sched-service-row td { background: rgba(84, 125, 130, 0.06); font-size: 12px; font-weight: 600; }
.sched-shift-table .sched-service-row td.left { white-space: nowrap; }

/* 08 勤務予定表・勤務実績(2026-10-28): 記号のボタンの右に 帳票の印刷 と Excel */
.sched-stamp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }
.sched-stamp-row .sched-stamps { flex: 0 1 auto; margin: 0; }
.sched-shift-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
@media (max-width: 680px) { .sched-shift-tools { margin-left: 0; } }

/* 07 利用予定・実績 のスマホ版の体裁(2026-10-28 の要望「利用予定、実績の画面の体裁を整えて」)。
   タブの帯の右の 印刷・Excel が帯の中で縦に折り返して帯が 190px の高さになり、丸いタブが大きな円になっていた。
   860px 以下はタブを折り返して並べ、印刷・Excel は帯の下の 1 行(横並び)に出す */
.sched-tabs { align-items: center; }
.sched-tab-actions .button { white-space: nowrap; }
@media (max-width: 860px) {
  .sched-tabs { flex-wrap: wrap; overflow-x: visible; }
  .sched-tab { min-height: 36px; }
  .sched-tab-actions { flex: 1 1 100%; display: flex; margin-left: 0; }
  .sched-tab-actions[hidden] { display: none; }
  .sched-tab-actions .button { flex: 1 1 0; min-width: 0; min-height: 40px; padding: 0 10px; font-size: 13px; }
}
@media (max-width: 680px) {
  /* タブは 2 列にそろえて並べ、印刷・Excel はその下の 1 行 */
  .sched-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .sched-tabs > .sched-tab { min-width: 0; padding: 4px 8px; font-size: 13px; line-height: 1.3; white-space: normal; }
  .sched-tabs > .sched-tab[hidden], .sched-tabs > .sched-tab-actions[hidden] { display: none; }
  .sched-tabs > .sched-tab-actions { grid-column: 1 / -1; }
  /* 選んだ日の ○ 利用 / × 欠席 / ― なし / 待 は 2 × 2 にそろえる */
  .sched-detail-head .sched-mark-set { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .sched-detail-head .sched-mark-btn { min-height: 40px; }
  /* 利用児の選択と月の欄の高さをそろえる(iOS の月の欄は select より高く、見出しの「月」がずれていた) */
  .page-heading .attendance-controls .inline-field :is(input, select) { height: 44px; min-height: 44px; }
  /* 利用予定表のマス(幅 40px ほど): 行 / 帰 の印は 2 段に積み、マスの下にはみ出さない */
  .sched-cell.is-use { min-height: 84px; padding-bottom: 34px; }
  .sched-tr { left: 2px; right: 2px; bottom: 2px; flex-direction: column; align-items: stretch; gap: 1px; font-size: 9px; line-height: 1.25; }
  .sched-tr-item { display: flex; justify-content: space-between; align-items: center; padding: 0 3px; }
  .sched-tr-item b { margin-left: 0; font-size: 10px; }
  .sched-cell.is-use .sched-dot, .sched-cell.is-use .sched-wait, .sched-cell.is-use .sched-full { bottom: 36px; }
}

/* 2026-10-28: 勤務予定表のサービス提供時間を日ごとに(マスの select。この日だけ変えた日は色を付ける) */
.sched-service-sel { width: 100%; min-width: 2.2em; min-height: 26px; padding: 0 2px; border: 1px solid transparent; border-radius: 6px; background: transparent; font: inherit; font-size: 12px; font-weight: 600; text-align: center; text-align-last: center; appearance: none; -webkit-appearance: none; cursor: pointer; }
.sched-service-sel:hover, .sched-service-sel:focus { border-color: #9fb7b5; background: #fff; }
.sched-service-sel.is-override, .sched-service-row .is-override { color: #b3362b; background: #fbe9e0; border-radius: 6px; }
/* 03 事業所管理: 営業時間・サービス提供時間・勤務時間 */
.office-hours { margin: 6px 0 0; }
.office-hours-title { margin: 12px 0 4px; font-weight: 700; font-size: 13px; }
.office-hours-site-name { margin: 6px 0 2px; font-size: 12px; color: #567073; }
.office-hours-table, .office-shift-table { min-width: 0; }
.office-hours-table td, .office-shift-table td { vertical-align: middle; }
.office-hours-span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.office-hours table .office-hours-span input[type="time"] { width: 8.6em; min-width: 0; }
.office-hours table input.office-hours-code { width: 3.6em; min-width: 0; text-align: center; }
.office-hours table input.office-hours-num { width: 5em; min-width: 0; }
.office-hours table td:first-child { width: 4.4em; }
.office-hours table button { white-space: nowrap; }
.office-hours-weekly { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 12px 0 0; font-size: 13px; }
.office-hours-weekly input { width: 6em; }
.office-hours-form { margin-top: 14px; }
/* 説明の段落を畳む「▽ 説明」(src/hint-fold.js)。開いたら中の段落を出す */
.hint-fold { margin: 4px 0 6px; }
.hint-fold > p { margin: 6px 0 0; }
@media (max-width: 680px) {
  .office-hours-table thead, .office-shift-table thead { display: none; }
  .office-hours-table, .office-hours-table tbody, .office-shift-table, .office-shift-table tbody { display: block; width: 100%; }
  .office-hours-table tbody tr, .office-shift-table tbody tr { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 8px; padding: 10px 12px; border: 1px solid #d5dde0; border-radius: 12px; }
  .office-hours-table td, .office-shift-table td { display: block; padding: 0; border: 0; text-align: left; }
  .office-hours-table td[data-label]::before, .office-shift-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; color: #667; font-size: 12px; }
  .table-wrap:has(> .office-hours-table), .table-wrap:has(> .office-shift-table) { overflow: visible; }
}

/* 2026-10-28 画面の体裁の点検(全画面を 1280 / 768 / 390px で撮って直したもの) */
/* サイドバーの「みちのーと」が「?」の横で「みちのー / と」と 2 行に割れていた */
.brand strong { white-space: nowrap; }
@media (min-width: 861px) { .brand strong { font-size: 19px; letter-spacing: .04em; } }
/* タブレット幅: 見出しの右の 日・月・再読み込み に押されて「実績(出欠・/送迎)」「実績・請/求」と割れていた → 欄は見出しの下へ回り込む */
@media (min-width: 601px) and (max-width: 860px) {
  .page-heading { flex-wrap: wrap; }
  .page-heading > div:first-child { flex: 1 1 280px; min-width: 260px; }
}
/* スマホ: カードの見出しの右の大きなボタン(事業所を追加・不正アクセスの検知の再読み込み)は見出しの下へ。説明が細い列に押し込まれていた */
@media (max-width: 680px) {
  .subsection-heading:has(> .button) { flex-wrap: wrap; }
  .subsection-heading:has(> .button) > div { flex: 1 1 100%; }
  .security-detections .subsection-heading { flex-wrap: wrap; }
  .security-detections .subsection-heading > div { flex: 1 1 100%; }
}

/* 日別利用予定(日付の帯 → その日の一覧)と、利用予定一覧・日別利用予定の 2 事業所表示(2026-10-28) */
.sched-list-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 10px; }
.sched-list-tools .sched-counts { margin-left: 4px; }
.sched-plan-head:has(> .sched-list-tools) { flex-wrap: nowrap; }
.sched-plan-head:has(> .sched-list-tools) > div:first-child { flex: 1 1 240px; min-width: 0; }
.sched-plan-head > .sched-list-tools { flex: 0 1 auto; }
.sched-list-site + .sched-list-site, .sched-dayusage-site + .sched-dayusage-site { margin-top: 26px; padding-top: 18px; border-top: 2px solid var(--line-strong, #b8ae9a); }
.sched-dayusage-strip { display: flex; gap: 4px; overflow-x: auto; padding: 2px 0 12px; margin-bottom: 8px; -webkit-overflow-scrolling: touch; }
.sched-dayusage-day { flex: 0 0 auto; width: 44px; display: grid; justify-items: center; gap: 1px; padding: 6px 0 4px; border: 1px solid var(--line, #d6cebd); border-radius: 10px; background: var(--paper-bright, #fff); color: var(--ink, #183638); cursor: pointer; font: inherit; }
.sched-dayusage-day b { font-size: 16px; line-height: 1.1; }
.sched-dayusage-day small { font-size: 11px; }
.sched-dayusage-day.is-holiday { color: #b5503a; }
.sched-dayusage-day.is-sat { color: #2b62b3; }
.sched-dayusage-day.is-today { border-color: var(--forest, #123b3d); }
.sched-dayusage-day.is-active { background: var(--forest, #123b3d); border-color: var(--forest, #123b3d); color: #fff; }
.sched-dayusage-n { min-height: 14px; font-size: 11px; font-weight: 700; }
.sched-dayusage-table th, .sched-dayusage-table td { text-align: center; padding: 8px 10px; }
.sched-dayusage-table th.left, .sched-dayusage-table td.left { text-align: left; }
.sched-dayusage-table td.left small { margin-left: 8px; font-size: 11px; color: var(--ink-soft, #526767); }
.sched-dayusage-table th:first-child { width: 26%; }
.sched-dayusage-table th:nth-child(2), .sched-dayusage-table th:nth-child(3) { width: 17%; }
.sched-dayusage-extra { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; font-size: 12px; }
@media (max-width: 680px) {
  .sched-plan-head:has(> .sched-list-tools) { flex-wrap: wrap; }
  .sched-list-tools { justify-content: flex-start; width: 100%; }
  .sched-list-tools .button, .sched-list-tools .ghost-button { flex: 1 1 140px; }
  .sched-dayusage-table th:first-child { width: auto; }
}

/* ---------- 勤務予定一覧(2026-10-31)と 07 の「保存」、契約の曜日ごとの送迎 ---------- */
.sched-plan-head > .sched-plan-save { flex: 0 0 auto; margin-left: auto; }
.sched-plan-save button { min-width: 7em; }
.sched-roster-confirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.sched-roster-confirm > div:first-child { flex: 1 1 320px; min-width: 0; }
.sched-roster-confirm > :is(.sched-actions, .section-actions) { margin: 0; flex: 0 0 auto; }

/* 事業所の その月の 出 / 休 + / 時(2026-11-01 の要望。勤務予定表の事業所ごとの表の上と 勤務予定一覧の確定の箱) */
.sched-quota { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.sched-quota label { display: inline-flex; align-items: center; gap: 3px; margin: 0; font-weight: 600; }
.sched-quota-label { margin-right: 2px; font-weight: 700; white-space: nowrap; }
.sched-quota-plus { margin: 0 -4px; font-weight: 600; }
.sched-quota-off { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sched-quota .sched-quota-input { width: 3.2em; height: 30px; min-height: 0; padding: 0 4px; font-size: 14px; text-align: center; -moz-appearance: textfield; }
.sched-quota .sched-quota-input.is-hours { width: 4.6em; }
.sched-quota .sched-quota-input::-webkit-inner-spin-button, .sched-quota .sched-quota-input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.sched-stamp-row > .sched-quota { flex: 0 0 auto; }
.sched-quota-panel { display: flex; flex-direction: column; gap: 6px; flex: 0 1 auto; }
.sched-roster-confirm > .sched-quota-panel { margin: 0; }
/* 勤務予定一覧の下の 職員別の 出勤日数・時間(列 = 人、行 = 事業所 + 合計) */
.sched-sum-title { margin: 18px 0 6px; }
.sched-sum-table th, .sched-sum-table td { padding: 4px 6px; font-size: 12.5px; line-height: 1.35; text-align: center; white-space: nowrap; }
.sched-sum-table th.left { text-align: left; }
.sched-sum-table td small { font-size: 11.5px; }
.sched-sum-table tr.sched-sum-total > * { border-top: 2px solid #4b5a55; font-weight: 700; }
@media (max-width: 680px) { .sched-quota .sched-quota-input { font-size: 16px; } }
.sched-roster-table { table-layout: fixed; min-width: 900px; margin-bottom: 14px; font-size: 12.5px; }
.sched-roster-table th.sched-roster-site-col { width: 6.5em; }
.sched-roster-table th.sched-roster-group-col { width: 7.5em; }
.sched-roster-table td.sched-roster-cell { vertical-align: top; padding: 4px 4px; }
.sched-roster-table tr.sched-roster-site-first > td, .sched-roster-table tr.sched-roster-site-first > td.sched-roster-site { border-top: 2px solid var(--line, #d9d4c8); }
.sched-roster-table td.sched-roster-site { font-weight: 700; vertical-align: top; }
.sched-roster-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin: 0 0 5px; padding-bottom: 3px; border-bottom: 1px dotted var(--line, #d9d4c8); }
.sched-roster-entry:last-of-type { border-bottom: 0; }
.sched-roster-entry > span { flex: 1 1 100%; min-width: 0; font-size: 12px; line-height: 1.3; word-break: break-all; }
.sched-roster-entry.is-text { flex-wrap: nowrap; }
.sched-roster-entry.is-text > span { flex: 1 1 auto; }
.sched-roster-entry.is-text b { font-weight: 700; }
.sched-roster-code { flex: 0 0 auto; width: 3.4em; min-height: 0; padding: 1px 2px; font: inherit; font-size: 12px; }
.sched-roster-del { flex: 0 0 auto; width: 20px; height: 20px; padding: 0; border: 1px solid var(--line, #d9d4c8); border-radius: 50%; background: transparent; color: inherit; font: inherit; font-size: 12px; line-height: 1; cursor: pointer; }
.sched-roster-del:hover { background: #fff1eb; border-color: #b5503a; color: #b5503a; }
.sched-roster-add { width: 100%; min-height: 0; padding: 2px 4px; font: inherit; font-size: 11.5px; color: var(--ink-soft, #667); }
.sched-roster-count { font-size: 11px; color: var(--ink-soft, #667); text-align: right; }
.sched-roster-add-row td { background: rgba(255, 255, 255, 0.4); }
.sched-roster-note { width: 100%; min-height: 0; padding: 3px 5px; font: inherit; font-size: 12px; }
.sched-roster-note-text { font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.contract-transport-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.contract-transport-table th, .contract-transport-table td { padding: 3px 4px; text-align: center; border-bottom: 1px solid var(--line, #d9d4c8); }
.contract-transport-table tbody th { white-space: nowrap; width: 3.2em; font-weight: 600; }
.contract-transport-table th.is-sun, .contract-transport-table th.is-holiday { color: #b5503a; }
.contract-transport-table th.is-sat { color: #3a5b8c; }
.contract-transport-table select { width: 100%; min-height: 0; padding: 2px 2px; font: inherit; font-size: 12px; }
@media (max-width: 680px) {
  .sched-plan-head > .sched-plan-save { margin-left: 0; width: 100%; }
  .sched-plan-save button { width: 100%; }
  .sched-roster-table { font-size: 12px; }
}

/* ---------- マスタ画面 01/02/03/05/06 の体裁(2026-11-02 の要望「レイアウトの変更」) ----------
   操作列(左: 新規登録 / 保存 / 削除、右: 一覧 / 緊急連絡一覧 / CSV出力)→「○○：[選択]」と件数(右端)→ 枠の中にタブとフォーム。
   タブはその場で切り替えるだけで、上の「保存」がどのタブの入力もまとめて保存する */
.master-screen { display: grid; gap: 14px; }
.master-pickline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.master-pickline .master-pick { flex: 1 1 auto; margin: 0; }
.master-count { flex: 0 0 auto; }
.master-panel { display: grid; gap: 16px; padding: clamp(16px, 2.4vw, 24px); border: 1px solid var(--line); border-radius: 16px; background: var(--paper-bright, #fff); }
.master-panel > .master-tabs { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.master-panel .master-tabs button small { margin-left: 6px; font-size: 11px; opacity: 0.8; }
.master-panel .master-tabs button:disabled { opacity: 0.45; cursor: not-allowed; }
.master-panel .settings-form { gap: 16px; }
.master-tabpanel { display: grid; gap: 14px; }
.master-tabpanel[hidden] { display: none; }
.master-list-title { margin: 0; font-weight: 800; font-size: 14px; }
.master-screen .office-purge { margin: 0; }
/* 06 車両: 点検情報・保険情報の画像 */
.vehicle-attachments { display: grid; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
.vehicle-attachments-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.vehicle-attachments-title { margin: 0; font-weight: 800; font-size: 14px; }
.vehicle-attachment-add { cursor: pointer; }
.vehicle-attachment-add.is-busy { opacity: 0.6; pointer-events: none; }
.vehicle-attachment-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.vehicle-attachment { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.vehicle-attachment a { display: grid; gap: 4px; color: inherit; text-decoration: none; min-width: 0; }
.vehicle-attachment img, .vehicle-attachment-pdf { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--paper-deep); }
.vehicle-attachment-pdf { display: grid; place-items: center; font-weight: 800; color: var(--vermillion); }
.vehicle-attachment-name { overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.vehicle-attachment small { color: var(--ink-soft); font-size: 11px; }
.vehicle-attachment .button { min-height: 32px; }
@media (max-width: 680px) {
  .master-pickline { flex-wrap: wrap; }
  .master-pickline .master-pick { flex-basis: 100%; }
  .master-count { margin-left: auto; }
  .master-panel { padding: 14px; }
  .vehicle-attachment-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 04 利用者管理: タブと各タブの入力を 1 つの枠に(2026-11-02)。枠の中のカードは枠を重ねない */
.child-master-panel > .section-tabs { margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.child-master-panel :is(.settings-card, .subsection-card, .child-inline-form) { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.child-master-panel [data-child-tab-panel][hidden] { display: none; }
.panel-add-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.child-pickline { margin: 2px 0 0; }
/* 03 / 04 / 06: 選択の行の下にタブの帯(設計案の四角いボタン。選んでいるタブは塗り)、その下に枠のフォーム(2026-11-03) */
.master-tabline { display: flex; }
.master-tabline :is(.master-tabs, .section-tabs) { display: flex; flex-wrap: wrap; gap: 8px; width: auto; margin: 0; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-bright, #fff); box-shadow: none; }
.master-tabline :is(.master-tabs, .section-tabs) button { min-height: 34px; padding: 0 20px; border: 1px solid var(--forest); border-radius: 6px; background: transparent; color: var(--forest); font-size: 13px; box-shadow: none; }
.master-tabline :is(.master-tabs, .section-tabs) button:is(.is-active, [aria-selected="true"]) { background: var(--forest); color: #fff; outline: none; }
.master-tabline :is(.master-tabs, .section-tabs) button small { margin-left: 4px; font-size: 11px; opacity: 0.85; }
.child-tabline { margin: 10px 0 14px; }

/* 勤務パターン: 「勤務予定表に適応」「勤務予定一覧に適応」(2026-11-03) */
.sched-pattern-apply { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }

/* 勤務予定一覧(2026-11-03): 名前だけ + ⊖、職種の行ごとの ⊕(押すと職員の選択が開く) */
/* 2026-11-04: 名前(1 行目)+ 記号の選択と ⊖(2 行目)。名前が記号に重ならないように */
.sched-roster-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 4px; }
.sched-roster-entry > .sched-roster-name { grid-column: 1 / -1; flex: none; font-size: 12px; line-height: 1.3; word-break: break-all; }
.sched-roster-entry .sched-roster-code { width: 100%; min-width: 0; min-height: 0; height: 24px; padding: 0 2px; font-size: 13px; }
.sched-roster-entry.is-text { grid-template-columns: minmax(0, 1fr) auto; }
.sched-roster-entry.is-text > .sched-roster-name { grid-column: auto; }
.sched-roster-entry .sched-roster-del { width: 20px; height: 20px; border: 0; font-size: 16px; color: #b5503a; }
.sched-roster-plus { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-top: 2px; color: var(--forest, #2f5d50); font-size: 17px; line-height: 1; cursor: pointer; }
.sched-roster-plus > select { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.sched-roster-plus:hover, .sched-roster-plus:focus-within { color: #fff; background: var(--forest, #2f5d50); border-radius: 50%; }

/* 2026-11-04: 勤務予定表・勤務実績の事業所ごとの見出し(事業所名 | 印刷・Excel)→ 時・出・休・開所・休 → 表 → 記号のボタン */
.sched-site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 14px 0 4px; }
.sched-site-head .sched-shift-site-title { margin: 0; font-weight: 700; }
.sched-site-head .sched-shift-tools { margin-left: auto; }
.sched-site-figures { display: flex; justify-content: flex-end; flex-wrap: wrap; margin: 0 0 6px; }
.sched-site-days { display: inline-flex; gap: 10px; margin-left: 10px; align-items: baseline; font-size: 12.5px; color: var(--ink-soft, #667); white-space: nowrap; }
.sched-site-days b { font-size: 16px; color: var(--ink, #223); }
.sched-shift-site > .sched-stamp-row { margin-top: 6px; }
.sched-pattern-apply { align-items: center; }
.sched-pattern-apply .sched-pattern-overwrite { margin: 0 4px 0 0; font-size: 12.5px; }
/* 勤務予定一覧の職種の見出し: 職種の下に人員配置(2026-11-05) */
.sched-roster-group .sched-roster-sub { display: block; margin-top: 2px; font-size: 11.5px; color: var(--forest, #2f5d50); font-weight: 400; }
.tenant-name-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.tenant-name-form .field { flex: 1 1 280px; margin: 0; }

/* 2026-11-05 の事業所の要望(利用予定・勤務予定の画面の体裁):
   - 利用予定表・利用予定一覧・日別利用予定 の見出しの右のボタン(.sched-plan-tools。月の確定 / 管理日案に保存 / 帳票印刷 / Excel)は 1 行に並べ、
     足りなければ折り返す(それまで 日別利用予定 の印刷・Excel が表の見出しと重なっていた)。人数・定員は見出しの左の下
   - 勤務予定表の事業所ごとの「勤務予定一覧に適応」などのボタンは、勤務予定一覧の帯のボタンと同じ大きさ(小さくしていた規則を外した)
   - 利用予定表の確定済みの知らせと、確定した月の薄いマス */
.sched-plan-head > .sched-plan-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 10px; flex: 0 1 auto; margin-left: auto; }
.sched-plan-head:has(> .sched-plan-tools) { flex-wrap: wrap; align-items: flex-start; }
.sched-plan-head:has(> .sched-plan-tools) > div:first-child { flex: 1 1 320px; min-width: 0; }
.sched-plan-tools .button { white-space: nowrap; }
.sched-plan-confirmed { margin: 8px 0 0; padding: 8px 12px; border: 1px solid #b9d6c5; border-radius: 10px; background: #eef7f1; font-size: 13px; }
.sched-grid.is-locked .sched-cell:not(.is-selected) { opacity: 0.85; }
.sched-plan-site + .sched-plan-site { margin-top: 26px; padding-top: 18px; border-top: 2px solid var(--line-strong, #b8ae9a); }
#sched-list-block { margin: 0 0 10px; }
@media (max-width: 680px) {
  .sched-plan-head > .sched-plan-tools { justify-content: flex-start; width: 100%; margin-left: 0; }
  .sched-plan-tools .button { flex: 1 1 140px; white-space: normal; }
}

/* 2026-11-06 の事業所の要望: 利用予定表・利用予定一覧・日別利用予定の 2 事業所表示は事業所ごとに枠(カード)で分ける。
   利用予定表はカレンダーの右に選んだ日の欄(広い画面)。2 事業所目にも「この内容を管理日案に保存」 */
.sched-site-card { padding: 16px 18px 14px; border: 1px solid var(--line, #d6cebd); border-radius: 14px; background: rgba(255, 255, 255, 0.55); }
.sched-site-card + .sched-site-card { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line, #d6cebd); }
.sched-site-card.is-empty { padding-bottom: 8px; }
.sched-plan-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 18px; align-items: start; margin-bottom: 12px; }
.sched-plan-body > .sched-grid { margin: 8px 0 0; }
.sched-plan-body > .sched-detail { margin: 8px 0 0; }
@media (min-width: 1100px) {
  .sched-plan-body { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); }
  .sched-plan-body > .sched-detail { position: sticky; top: 8px; }
  .sched-plan-body .sched-form-grid.sched-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .sched-plan-body .sched-detail-head { flex-wrap: wrap; }
}

/* ===== 09 送迎表(2026-11-07。曜日ごとの送迎パターン → 管理日案の配車) ===== */
.tp-weekdays { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.tp-weekday { min-width: 44px; padding: 8px 12px; border: 1px solid var(--line, #d7d2c8); border-radius: 999px; background: #fff; font: inherit; cursor: pointer; }
.tp-weekday.is-sun { color: #b4453a; }
.tp-weekday.is-sat { color: #2d5f9e; }
.tp-weekday.is-active { background: var(--ink, #2b2a28); color: #fff; border-color: var(--ink, #2b2a28); }
.tp-board { padding: 16px 18px; margin-top: 14px; min-width: 0; max-width: 100%; box-sizing: border-box; }
.tp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.tp-site-title { margin: 0; font-weight: 700; font-size: 1.05rem; }
.tp-site-title small { margin-left: 8px; font-weight: 400; color: var(--muted, #6b6760); }
.tp-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-body { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
.tp-left { display: grid; gap: 4px; }
.tp-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tp-table th, .tp-table td { border: 1px solid var(--line, #d7d2c8); padding: 4px 6px; text-align: left; vertical-align: top; }
.tp-table th { background: #f4f1ea; font-weight: 600; }
.tp-table td.c { text-align: center; }
.tp-table .tp-empty { color: var(--muted, #6b6760); font-size: 0.85rem; }
.tp-src { margin: 0 0 12px; font-size: 0.78rem; color: var(--muted, #6b6760); text-align: right; }
.tp-right { display: grid; gap: 16px; min-width: 0; }
.tp-leg { min-width: 0; }
.tp-leg-title { margin: 0 0 6px; font-weight: 700; }
.tp-runs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; align-items: stretch; }
.tp-run { flex: 0 0 200px; min-width: 200px; border: 1px solid var(--line, #d7d2c8); border-radius: 10px; padding: 8px; background: #fff; display: grid; gap: 6px; align-content: start; }
.tp-run.is-none { background: #f7f5f0; }
.tp-run.is-over { border-color: #d28b3a; }
.tp-run-add { align-items: center; justify-items: center; border-style: dashed; background: transparent; }
.tp-run-head { display: flex; gap: 4px; align-items: center; }
.tp-run-head select { flex: 1 1 auto; min-width: 0; }
.tp-cap { margin: 0; font-size: 0.78rem; color: var(--muted, #6b6760); }
.tp-cap.is-warn { color: #b4453a; font-weight: 600; }
.tp-drivers { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding-bottom: 6px; border-bottom: 1px dashed var(--line, #d7d2c8); }
.tp-chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 6px; border-radius: 999px; background: #e9f0f8; font-size: 0.85rem; }
.tp-riders { display: grid; gap: 4px; }
.tp-rider { display: grid; grid-template-columns: minmax(0, 1fr) 62px auto; gap: 4px; align-items: center; font-size: 0.9rem; }
.tp-rider.is-unknown .tp-rider-name { color: #b4453a; }
.tp-run.is-none .tp-rider { grid-template-columns: minmax(0, 1fr) auto; }
.tp-rider-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-time { width: 100%; min-width: 0; padding: 3px 4px; font: inherit; font-size: 0.85rem; }
.tp-x { border: 0; background: transparent; color: var(--muted, #6b6760); cursor: pointer; font: inherit; padding: 0 4px; line-height: 1; }
.tp-x:hover { color: #b4453a; }
.tp-run select, .tp-drivers select, .tp-riders select { font: inherit; font-size: 0.85rem; padding: 3px 4px; max-width: 100%; }
@media (max-width: 860px) {
  .tp-body { grid-template-columns: minmax(0, 1fr); }
  .tp-tools .button { flex: 1 1 100%; }
}

/* ---------- 10 管理日案(2026-11-16。見本の画面: 勤務者 / 必要な看護師の人数 / 特記事項 / 利用児童 / 送迎 / サービス提供時間 / 連絡事項 / ヒヤリハット)。
   デモ(styles.css)と SaaS(styles/saas.css)で同じ。HTML は src/daily-board.js ---------- */
.db-board { display: grid; gap: 14px; min-width: 0; }
.db-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.db-title { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.db-title b { font-size: 1.25rem; }
.db-title span { color: var(--ink-soft, #627d78); font-size: 0.92rem; }
.db-grid-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.db-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.db-col { display: grid; gap: 14px; min-width: 0; }
.db-card { border: 1px solid var(--line, #d7d2c8); border-radius: 12px; background: #fff; padding: 12px 14px; min-width: 0; }
.db-card > h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.db-table-wrap { overflow-x: auto; max-width: 100%; }
.db-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.db-table th, .db-table td { border: 1px solid var(--line, #d7d2c8); padding: 4px 6px; text-align: left; vertical-align: middle; height: 34px; }
.db-table th { background: #f1f3f2; font-weight: 600; text-align: center; line-height: 1.25; font-size: 0.82rem; white-space: nowrap; }
.db-table td.c { text-align: center; }
.db-table tr.is-blank td { color: var(--ink-soft, #627d78); }
.db-children { min-width: 760px; }
.db-children tr.is-absent td { background: #f6f3f1; color: #8b8780; }
.db-children tr.is-absent .db-name { text-decoration: line-through; }
.db-name { font-weight: 600; white-space: nowrap; }
.db-leg-cell { font-size: 0.82rem; min-width: 5.5em; }
.db-children th, .db-children td { padding: 4px; }
.db-nurse td { font-size: 1.02rem; }
.db-attend { min-width: 40px; min-height: 30px; padding: 2px 8px; border-radius: 8px; border: 1px solid #5f9b74; background: #e6f3ea; color: #1f5a37; font: inherit; font-weight: 700; cursor: pointer; }
.db-attend.is-absent { border-color: #c98a80; background: #fbe9e6; color: #9d2d2d; }
.db-attend:disabled { cursor: default; opacity: 0.7; }
.db-select { font: inherit; font-size: 0.88rem; padding: 3px 2px; min-width: 52px; max-width: 100%; min-height: 30px; border: 1px solid var(--line-strong, #becdc0); border-radius: 6px; background: #fff; }
.db-text { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border: 1px solid var(--line-strong, #becdc0); border-radius: 8px; background: #fff; resize: vertical; min-height: 84px; }
.db-note { margin: 6px 0 0; font-size: 0.78rem; color: var(--ink-soft, #627d78); }
.db-leg { min-width: 0; }
.db-leg + .db-leg { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line, #d7d2c8); }
.db-leg-title { margin: 0 0 6px; font-weight: 700; }
.db-leg-title small { margin-left: 10px; font-weight: 400; font-size: 0.78rem; color: var(--ink-soft, #627d78); }
.db-runs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; align-items: stretch; }
.db-run { flex: 0 0 190px; min-width: 190px; border: 1px solid var(--line, #d7d2c8); border-radius: 10px; padding: 8px; background: #fcfcfa; display: grid; gap: 4px; align-content: start; }
.db-run.is-pending { border-style: dashed; border-color: #d28b3a; }
.db-run.is-self { background: #f7f5f0; }
.db-run-head { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px dashed var(--line, #d7d2c8); }
.db-run-head small { color: var(--ink-soft, #627d78); font-size: 0.8rem; }
.db-chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: #e9f0f8; font-size: 0.84rem; }
.db-chip.db-vehicle { background: #e4f1e9; font-weight: 600; }
.db-rider { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 6px; padding: 3px 6px; border-radius: 6px; font-size: 0.9rem; }
.db-rider small { color: var(--ink-soft, #627d78); font-size: 0.74rem; }
.db-rider.is-error { background: #fbe9e6; color: #9d2d2d; font-weight: 600; outline: 1px solid #c98a80; }
.db-rider.is-error .db-error-mark { color: #9d2d2d; font-weight: 700; }
.db-error-count { display: inline-flex; padding: 2px 10px; border-radius: 999px; background: #fbe9e6; color: #9d2d2d; font-size: 0.82rem; font-weight: 700; }
.db-empty { margin: 0; color: var(--ink-soft, #627d78); font-size: 0.85rem; }
.db-service { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.db-service label { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; }
.db-service input { width: 18px; height: 18px; margin: 0; }
.db-detail { margin-top: 14px; }
@media (max-width: 860px) {
  .db-grid-top, .db-grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .db-card { padding: 10px; }
  .db-attend { min-width: 44px; min-height: 40px; }
  .db-select, .db-text { font-size: 16px; }
  .db-select { min-height: 40px; }
  .db-run { flex-basis: 170px; min-width: 170px; }
}
/* 管理日案の送迎を画面で直す(2026-11-16 夕方): 便ごとに 車 / 運転 / 同乗 / 利用者と時刻 */
.db-run.is-edit { flex: 0 0 236px; min-width: 236px; gap: 6px; }
.db-run-field { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) auto; gap: 4px; align-items: center; font-size: 0.82rem; color: var(--ink-soft, #627d78); }
.db-run-field .db-select { width: 100%; min-width: 0; }
.db-run-riders { display: grid; gap: 4px; padding-top: 6px; border-top: 1px dashed var(--line, #d7d2c8); }
.db-rider.db-rider-edit { display: grid; grid-template-columns: minmax(0, 1fr) 6.2em; gap: 4px; align-items: center; padding: 2px; }
.db-rider.db-rider-edit .db-select { width: 100%; min-width: 0; }
.db-rider.db-rider-edit .db-error-mark, .db-rider.db-rider-edit > small { grid-column: 1 / -1; }
.db-time { width: 100%; min-width: 0; box-sizing: border-box; font: inherit; font-size: 0.85rem; padding: 3px 4px; min-height: 30px; border: 1px solid var(--line-strong, #becdc0); border-radius: 6px; background: #fff; }
.db-add-rider { width: 100%; color: var(--ink-soft, #627d78); }
.db-x { flex: 0 0 auto; width: 26px; height: 26px; border: 1px solid var(--line, #d7d2c8); border-radius: 50%; background: #fff; color: var(--ink-soft, #627d78); cursor: pointer; font: inherit; line-height: 1; padding: 0; }
.db-x:hover { color: #9d2d2d; border-color: #c98a80; }
.db-run-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.db-mini { min-height: 30px; padding: 3px 12px; border: 1px solid var(--line-strong, #becdc0); border-radius: 999px; background: #fff; color: var(--ink, #183638); font: inherit; font-size: 0.85rem; cursor: pointer; }
.db-mini:hover { border-color: var(--forest, #1b5b59); }
@media (max-width: 680px) {
  .db-run.is-edit { flex-basis: 220px; min-width: 220px; }
  .db-time, .db-mini { font-size: 16px; min-height: 40px; }
  .db-x { width: 34px; height: 34px; }
}

/* ===== 2026-11-27 の事業所の要望(見え方): 見出しの固定・勤務予定一覧の縦詰め・送迎表の 1 行表示・管理日案の勤務者の幅 =====
   基本の規則より後ろに置く(同じ詳細度なら後勝ち) */
/* 07 利用予定一覧: 月末・下の利用児へ動かしても 利用児名(左の列)と 日・曜日(上の行)が見えるように、表を枠の中で縦横に動かして見出しを貼り付ける */
.table-wrap:has(> .sched-list-table) { max-height: calc(100vh - 150px); min-height: 220px; overflow: auto; border: 1px solid var(--line, #d9d4c8); border-radius: 8px; }
.sched-list-table { border-collapse: separate; border-spacing: 0; }
.sched-list-table thead th { position: sticky; top: 0; z-index: 2; background: #f6f4ee; box-shadow: inset 0 -1px 0 var(--line, #d9d4c8); }
.sched-list-table :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: #fbfaf6; box-shadow: inset -1px 0 0 var(--line, #d9d4c8); }
.sched-list-table thead th:first-child { z-index: 3; background: #f6f4ee; box-shadow: inset -1px -1px 0 var(--line, #d9d4c8); }
.sched-list-table thead th:is(.is-sun, .is-holiday) { background: #f8ece7; }
.sched-list-table thead th.is-over { background: #f3d8cf; }
.sched-list-table thead th.is-full { background: #f5e8c8; }
/* 08 勤務予定表・勤務実績: 月末へ動かしても 職員名(左の列)が見えるように */
.sched-shift-table { border-collapse: separate; border-spacing: 0; }
.sched-shift-table :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: #fbfaf6; box-shadow: inset -1px 0 0 var(--line, #d9d4c8); }
.sched-shift-table thead th:first-child { z-index: 2; background: #f6f4ee; }
.sched-shift-table .sched-service-row td:first-child { background: #eef3f2; }
/* 見出しの右のボタンの列は折り返す(4 つ並ぶと画面からはみ出していた: 10 帳票(管理日案)) */
.sched-plan-head > :is(.section-actions, .sched-actions) { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.sched-site-lock { margin: 6px 0 2px; padding: 6px 10px; border: 1px solid #c9d8cf; border-radius: 8px; background: #eef5f0; font-size: 12.5px; line-height: 1.5; }
/* 08 勤務予定一覧: その日の勤務者が全員見えるように縦を詰める(名前 + 記号 + ⊖ を 1 行。勤務者数の行は無し、備考は事業所で共通の 1 行) */
.sched-roster-tools { align-items: center; }
.sched-roster-table { min-width: 900px; margin-bottom: 8px; font-size: 12px; }
.sched-roster-table th { padding-top: 2px; padding-bottom: 2px; line-height: 1.2; }
.sched-roster-table th.sched-roster-site-col { width: 4.2em; }
.sched-roster-table th.sched-roster-group-col { width: 6.3em; }
.sched-roster-table td.sched-roster-site, .sched-roster-table td.sched-roster-group { padding: 3px 4px; white-space: normal; line-height: 1.25; }
.sched-roster-table td.sched-roster-cell { padding: 2px; }
.sched-roster-group .sched-roster-sub { margin-top: 0; font-size: 11px; }
.sched-roster-entry, .sched-roster-entry.is-text { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 0 2px; margin: 0; padding: 1px 0; border-bottom: 0; }
.sched-roster-entry > .sched-roster-name, .sched-roster-entry.is-text > .sched-roster-name { grid-column: auto; font-size: 11.5px; line-height: 1.2; text-align: left; white-space: normal; word-break: break-all; }
:is(#view-schedule, .scheduling-body) .sched-roster-entry select.sched-roster-code:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]) { width: 1.8em; height: 20px; min-height: 0; padding: 0; border: 1px solid var(--line, #d9d4c8); border-radius: 4px; background: #fff; background-image: none; font-size: 12.5px; line-height: 18px; text-align: center; text-align-last: center; -webkit-appearance: none; appearance: none; }
.sched-roster-entry .sched-roster-del { width: 14px; height: 18px; font-size: 13px; }
.sched-roster-plus { width: 18px; height: 18px; margin-top: 0; font-size: 15px; }
:is(#view-schedule, .scheduling-body) .sched-roster-table input.sched-roster-note:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]) { height: 24px; min-height: 0; padding: 2px 4px; border-radius: 4px; font-size: 11.5px; }
.sched-roster-note-other { margin-top: 2px; font-size: 11px; color: var(--ink-soft, #667); text-align: left; }
.sched-roster-note-row > td { vertical-align: top; }
/* 09 送迎表: 利用児・学校を 1 行で(字を少し小さく、左の列を広げる) */
.tp-body { grid-template-columns: minmax(300px, 440px) minmax(0, 1fr); }
.tp-left { min-width: 0; }
.tp-left > .tp-children { display: block; max-width: 100%; overflow-x: auto; }
.tp-children { font-size: 0.8rem; }
.tp-children th { padding: 3px 4px; font-size: 0.74rem; line-height: 1.2; text-align: center; white-space: nowrap; }
.tp-children td { padding: 3px 5px; }
.tp-children td:nth-child(-n+2) { white-space: nowrap; }
/* 10 管理日案: 勤務者の表に勤務時間。職種は折り返し、氏名・勤務時間は 1 行で、枠の中に収める */
.db-grid-top { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.db-duty { font-size: 0.84rem; }
.db-duty th { padding: 3px 4px; font-size: 0.74rem; }
.db-duty td { padding: 3px 5px; height: 30px; }
.db-duty td.db-role { min-width: 6.5em; font-size: 0.78rem; line-height: 1.25; white-space: normal; }
.db-duty td { white-space: nowrap; }
.db-duty td.db-time { font-size: 0.8rem; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .tp-body, .db-grid-top { grid-template-columns: minmax(0, 1fr); }
  .table-wrap:has(> .sched-list-table) { max-height: 78vh; }
}
@media (max-width: 680px) {
  /* iOS は 16px 未満の入力欄で画面を拡大するので、スマホでは字の大きさを戻す */
  :is(#view-schedule, .scheduling-body) .sched-roster-entry select.sched-roster-code:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]), :is(#view-schedule, .scheduling-body) .sched-roster-table input.sched-roster-note:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]) { font-size: 16px; }
  :is(#view-schedule, .scheduling-body) .sched-roster-entry select.sched-roster-code:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]) { width: 1.9em; height: 24px; line-height: 22px; }
  :is(#view-schedule, .scheduling-body) .sched-roster-table input.sched-roster-note:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]) { height: 28px; }
}
