:root {
  color-scheme: light;
  color: #251d25;
  background: #fff;
  font: 16px/1.55 Inter, "Hiragino Sans", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  --accent: #bd005f;
  --accent-dark: #97034d;
  --body: #251d25;
  --muted: #665b65;
  --surface: #fcf9fc;
  --line: #e9e0e8;
  --tint: #fcebF4;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, textarea, input, select { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #c84888;
  outline-offset: 3px;
}
h1, h2, h3, p { margin-block: 0; }
h1, h2, h3, p, dd, a, button { overflow-wrap: anywhere; }
h1 { line-height: 1.21; letter-spacing: -.035em; }
a { color: var(--accent-dark); text-underline-offset: .16em; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .67; }
.primary, .secondary, .quiet, .close {
  min-height: 44px;
  border-radius: 14px;
  padding: .55rem .9rem;
  border: 1px solid transparent;
  font-weight: 700;
}
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
.primary { background: var(--accent); color: #fff; }
.primary:hover:not(:disabled) { background: var(--accent-dark); }
.secondary { border-color: #e7ccd9; color: var(--accent-dark); background: #fff; }
.secondary:hover:not(:disabled), .quiet:hover:not(:disabled), .close:hover:not(:disabled) { background: var(--tint); }
.quiet, .close { background: transparent; color: var(--muted); }
.quiet:disabled { cursor: default; }
.brand { display: inline-flex; align-items: center; justify-content: center; gap: .28rem; color: var(--body); font-weight: 800; font-size: 1.16rem; letter-spacing: -.035em; }
.brand b { color: var(--accent); }
.brand img { display: inline-block; object-fit: contain; }
.brand.small { font-size: .97rem; }
.start { min-height: 100svh; display: grid; grid-template-rows: 1fr auto; align-items: center; justify-items: center; padding: 1.5rem clamp(1rem, 6vw, 3rem); }
.start-inner { width: min(100%, 35rem); padding: 2rem 0 clamp(2rem, 12vh, 8rem); text-align: center; }
.start h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); margin: .85rem 0 1.43rem; }
textarea, input:not([type=checkbox]), select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: .65rem .77rem; background: #fff; }
textarea { resize: vertical; min-height: 3rem; display: block; }
#prompt { padding: .88rem .94rem; min-height: 5rem; border-radius: 21px; box-shadow: 0 6px 26px #6120480a; }
#prompt::placeholder { color: #7a6d77; }
.guide { margin-top: .65rem; color: var(--muted); font-size: .875rem; }
.generate { margin-top: 1.13rem; padding: .63rem 1.7rem; }
.start footer { padding-bottom: .4rem; font-size: .875rem; }
.start footer a { color: var(--muted); }
.loading { grid-template-rows: 1fr; text-align: center; }
.loading-inner { width: min(100%, 24rem); margin-bottom: 4rem; }
.loading h1 { font-size: 1.8rem; }
.loading p { color: var(--muted); }
.signal { display: grid; place-items: center; width: 90px; height: 90px; margin: 0 auto; border-radius: 27px; background: #fff5fa; outline: 1px solid #f2d7e4; box-shadow: 0 0 0 12px #bd005f0b; animation: signal 2.3s ease-in-out infinite; }
.loading-track { height: 4px; width: min(100%, 15rem); margin: 1.5rem auto 0; border-radius: 8px; background: #f0dce7; overflow: hidden; }
.loading-track::after { display: block; content: ""; height: 100%; width: 34%; background: var(--accent); border-radius: inherit; animation: glide 1.6s ease-in-out infinite; }
@keyframes signal { 50% { box-shadow: 0 0 0 24px #bd005f05; transform: translateY(-4px); } }
@keyframes glide { from { transform: translateX(-110%); } to { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) { *, *::after { animation-duration: 1ms !important; } .loading-track::after { width: 100%; } }
.bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 64px; padding: .35rem clamp(.65rem, 3vw, 2rem); border-bottom: 1px solid var(--line); }
.result { background: var(--surface); min-height: 100svh; }
.result-inner { margin: 0 auto; padding: clamp(1.1rem, 4vw, 3rem) clamp(.9rem, 3vw, 1.6rem) 2.7rem; max-width: 66rem; }
.intro { margin-bottom: 1.4rem; }
.intro h1 { font-size: clamp(1.85rem, 5.25vw, 2.75rem); }
.eyebrow { font-size: .875rem; font-weight: 700; color: var(--accent-dark); margin-bottom: .32rem; }
#result-summary { color: var(--muted); margin-top: .42rem; }
.workbench { border: 1px solid var(--line); border-radius: 23px; overflow: clip; background: #fff; }
.toolbar { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .45rem; padding: .65rem .75rem; border-bottom: 1px solid var(--line); }
.views { display: flex; flex-wrap: wrap; gap: .28rem; }
.view { min-height: 42px; padding: .32rem .62rem; font-size: .875rem; color: var(--muted); }
.view[aria-pressed=true] { background: var(--tint); color: var(--accent-dark); }
.count { padding: .58rem .25rem .2rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .875rem; }
.records { padding: .78rem; display: grid; gap: .65rem; }
.records.cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.records.agenda .record { display: grid; grid-template-columns: auto 1fr; gap: .65rem; align-items: start; }
.slot { color: var(--accent-dark); font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.02rem; padding: .18rem .48rem; background: #fbecf4; border-radius: 8px; }
.records.board { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); align-items: start; }
.board-group { display: grid; gap: .5rem; padding: .66rem; background: #f8f4f8; border-radius: 15px; }
.board-group h2 { font-size: .95rem; }
.record { background: #fff; border: 1px solid var(--line); padding: .78rem .86rem; border-radius: 15px; min-width: 0; }
.record h3 { font-size: 1.055rem; line-height: 1.35; margin-bottom: .42rem; }
.record dl { margin: 0 0 .3rem; display: grid; grid-template-columns: minmax(4.7rem, 43%) 1fr; gap: .32rem .68rem; font-size: .9rem; }
.record dt { color: var(--muted); overflow-wrap: anywhere; }
.record dd { margin: 0; min-width: 0; font-weight: 650; }
.record-controls { display: flex; flex-wrap: wrap; gap: .36rem; padding-top: .45rem; }
.record-controls button { font-size: .925rem; min-height: 44px; padding: .42rem .66rem; }
.empty { color: var(--muted); padding: .75rem .4rem; }
.result-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.15rem; }
.result-guide { margin-left: .15rem; }
dialog { width: min(calc(100% - 1.5rem), 31rem); max-height: calc(100svh - 2rem); overflow-y: auto; border: 1px solid var(--line); border-radius: 21px; padding: 1.08rem; color: var(--body); box-shadow: 0 20px 72px #24102030; background: #fff; }
dialog::backdrop { background: #291b2b65; }
.dialog-head { display: flex; gap: .5rem; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.dialog-head h2 { font-size: 1.3rem; }
.dialog-head .close { line-height: 1; font-size: 1.42rem; min-width: 44px; padding: .48rem; }
dialog p { color: var(--muted); margin-bottom: .7rem; }
dialog .primary { margin-top: .35rem; }
.form-fields { display: grid; gap: .75rem; margin: .78rem 0; }
.form-fields label { display: grid; gap: .27rem; font-weight: 650; font-size: .925rem; }
.form-fields label.consent { grid-template-columns: auto 1fr; align-items: start; font-weight: 500; }
.consent input { margin: .23rem .25rem 0 0; min-width: 19px; min-height: 19px; accent-color: var(--accent); }
.line-alt { display: flex; gap: .45rem .86rem; flex-wrap: wrap; align-items: center; margin-top: .45rem; }
.code { font: .875rem/1.55 ui-monospace, monospace; padding: .55rem; border-radius: 10px; background: var(--surface); word-break: break-all; }
.form-message { margin-top: .65rem; color: var(--accent-dark); font-size: .925rem; }
.sr-only { width: 1px; height: 1px; white-space: nowrap; position: absolute; overflow: hidden; clip-path: inset(50%); }
.policy, .staff { width: min(calc(100% - 2rem), 66rem); margin: 2rem auto; }
.policy p, .policy h2, .staff h1, .staff h2 { margin-block: .7rem; }
.staff-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.staff-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .5rem; max-width: 45rem; margin: 1.3rem 0; }
.staff-counts div, .staff-item { border: 1px solid var(--line); border-radius: 13px; padding: .65rem; margin-bottom: .5rem; background: #fff; }
.staff-counts strong { display: block; font-size: 1.65rem; }
.staff-item p { margin: .33rem 0; }
.staff-item .guide { margin: .22rem 0; }
