:root {
  font-family: 'Yu Gothic UI', 'Yu Gothic', 'Hiragino Kaku Gothic ProN', system-ui, sans-serif;
  color: #182238;
  background: #f3f4f6;
  font-synthesis: none;
  --navy: #101c32;
  --ink: #182238;
  --muted: #70788a;
  --line: #dfe3e8;
  --orange: #ee5b2a;
  --orange-dark: #d84718;
  --paper: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, a { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; }
.topbar {
  height: 70px; padding: 0 max(28px, calc((100vw - 1440px) / 2));
  display: flex; align-items: center; background: var(--navy); color: white;
  position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 10px #0b14261f;
}
.brand { width: 270px; display: flex; gap: 11px; color: white; text-decoration: none; align-items: center; }
.brand-mark { width: 33px; height: 32px; display: flex; align-items: flex-end; gap: 3px; padding: 5px; transform: skew(-7deg); background: var(--orange); }
.brand-mark i { display: block; width: 6px; background: white; }
.brand-mark i:nth-child(1) { height: 9px; }.brand-mark i:nth-child(2) { height: 16px; }.brand-mark i:nth-child(3) { height: 22px; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1; }
.brand b { font-family: 'Arial Narrow', Arial, sans-serif; font-size: 24px; letter-spacing: .08em; }
.brand small { font: 600 8px/1.4 'Yu Gothic UI', sans-serif; color: #aab3c3; letter-spacing: .18em; }
.topbar nav { height: 100%; display: flex; gap: 34px; }
.topbar nav a { color: #b8c0ce; text-decoration: none; display: grid; place-items: center; font-size: 13px; font-weight: 600; position: relative; }
.topbar nav a:hover { color: white; }
.topbar nav a:first-child::after { content: ''; position: absolute; bottom: 0; height: 3px; width: 100%; background: var(--orange); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.demo-label { color: #ffb79c; border: 1px solid #914228; padding: 5px 9px; font: 700 10px 'Barlow Condensed'; letter-spacing: .16em; }
.operator { display: flex; align-items: center; gap: 9px; }
.operator > span { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 50%; background: #2b3950; font: 700 12px 'Barlow Condensed'; }
.operator div { display: flex; flex-direction: column; }.operator b { font-size: 11px; }.operator small { color: #8f9bad; font-size: 9px; margin-top: 2px; }

main { max-width: 1440px; margin: 0 auto; padding: 42px 28px 52px; }
.hero-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; }
.date-label, .eyebrow { margin: 0 0 7px; color: var(--orange); font: 700 11px/1 'Barlow Condensed', sans-serif; letter-spacing: .14em; }
.date-label span { display: inline-block; width: 18px; height: 1px; margin: 0 8px 3px; background: #c3c9d1; }
h1 { margin: 0; font-size: 32px; letter-spacing: -.04em; line-height: 1.25; }
.hero-row > div > p:last-child { color: var(--muted); margin: 8px 0 0; font-size: 13px; }
.generate-button { border: 0; min-width: 286px; height: 62px; background: var(--orange); color: white; display: flex; gap: 13px; align-items: center; padding: 0 18px; box-shadow: 0 8px 0 #c94118, 0 12px 23px #d950232b; transition: transform .15s, box-shadow .15s, background .15s; }
.generate-button:hover:not(:disabled) { background: #f26739; transform: translateY(-2px); box-shadow: 0 10px 0 #c94118, 0 14px 25px #d9502330; }
.generate-button:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 3px 0 #c94118; }
.generate-button > .generate-copy-text { text-align: left; flex: 1; display: flex; flex-direction: column; }
.button-icon { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; }
.generate-button b { font-size: 14px; }.generate-button small { opacity: .78; font-size: 10px; margin-top: 3px; }
.generate-button.loading { background: #26354c; box-shadow: 0 5px 0 #101c32; cursor: wait; }
.spinner { width: 21px; height: 21px; border: 2px solid #ffffff50; border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.metrics-panel { margin-bottom: 18px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); background: white; }
.metrics article { display: flex; align-items: center; min-height: 92px; padding: 18px 22px; border-right: 1px solid var(--line); }
.metrics article:last-child { border-right: 0; }
.metric-icon { width: 38px; height: 38px; display: grid; place-items: center; margin-right: 13px; background: #edf0f4; color: #40506a; border-radius: 3px; }
.metric-icon.alert { color: #d8562e; background: #fff0ea; }
.metrics article > div { display: flex; flex-direction: column; }.metrics small { color: var(--muted); font-size: 10px; }
.metrics strong { margin-top: 2px; font: 700 28px/1.1 'Barlow Condensed'; letter-spacing: .01em; }.metrics strong em { font: 600 11px 'Noto Sans JP'; font-style: normal; margin-left: 3px; }
.metric-note { margin-left: auto; align-self: flex-end; color: #89909d; background: #f2f3f5; padding: 4px 7px; font-size: 9px; font-weight: 600; }
.metric-note.positive { color: #18745e; background: #e8f4ef; }.metric-note.warning { color: #b84823; background: #fff0e9; }

.panel { background: white; border: 1px solid var(--line); }
.panel-heading { min-height: 73px; padding: 17px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }.panel-heading h2 span { font-size: 11px; color: var(--muted); margin-left: 6px; font-weight: 500; }
.panel-heading.compact { min-height: 69px; }
.panel-toggle { cursor: pointer; list-style: none; border-bottom: 0; transition: background .15s; }
.panel-toggle::-webkit-details-marker { display: none; }
.panel-toggle:hover { background: #fafbfc; }
.panel-toggle:focus-visible { outline: 3px solid #ee5b2a55; outline-offset: -3px; }
.panel-toggle-action { display: flex; align-items: center; gap: 9px; color: #667080; font-size: 10px; font-weight: 700; }
.panel-toggle-action svg { transition: transform .2s ease; transform: rotate(90deg); }
.collapsible-panel[open] .panel-toggle { border-bottom: 1px solid var(--line); }
.collapsible-panel[open] .panel-toggle-action svg { transform: rotate(-90deg); }
.panel-toggle .when-open { display: none; }
.collapsible-panel[open] .when-closed { display: none; }
.collapsible-panel[open] .when-open { display: inline; }
.collapsible-content { animation: revealPanel .2s ease-out; }
@keyframes revealPanel { from { opacity: 0; transform: translateY(-4px); } }
.staff-toolbar { min-height: 49px; padding: 8px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #fbfbfc; border-bottom: 1px solid var(--line); }
.staff-toolbar p { margin: 0; color: var(--muted); font-size: 10px; }
.filter-tabs { display: flex; background: #f1f2f4; padding: 3px; }
.filter-tabs button { border: 0; background: transparent; padding: 6px 13px; font-size: 10px; color: #777f8c; }
.filter-tabs button.active { background: white; color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px #14213c18; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1010px; }
th { height: 36px; padding: 0 14px; background: #f6f7f8; color: #7b8392; text-align: left; font-size: 9px; letter-spacing: .05em; border-bottom: 1px solid var(--line); }
td { height: 54px; padding: 7px 14px; border-bottom: 1px solid #ebedf0; font-size: 11px; }
tbody tr:last-child td { border-bottom: 0; } tbody tr:hover { background: #fafbfc; }
.person-cell { display: flex; align-items: center; gap: 9px; min-width: 125px; }.person-cell strong { font-size: 11px; white-space: nowrap; }
.avatar { width: 29px; height: 29px; flex: 0 0 auto; border-radius: 4px; display: grid; place-items: center; font: 700 9px 'Barlow Condensed'; color: #28334a; background: #e6e9ed; }
.avatar--small { width: 19px; height: 19px; border-radius: 3px; font-size: 7px; }
.avatar--orange,.avatar--coral { background: #fee1d5; color: #b44420; }.avatar--blue,.avatar--navy,.avatar--indigo { background: #dae5f6; color: #345482; }.avatar--purple,.avatar--violet { background: #e7def5; color: #664b91; }.avatar--teal,.avatar--green { background: #d7eee8; color: #28715f; }.avatar--pink,.avatar--rose { background: #f8dfeb; color: #98506e; }.avatar--yellow { background: #f8ebc9; color: #836827; }.avatar--cyan,.avatar--sky { background: #d9edf2; color: #367080; }
.day-list { display: flex; gap: 3px; min-width: 174px; }.day-list span { width: 21px; height: 21px; display: grid; place-items: center; color: #a1a7b1; background: #f0f1f3; font-size: 9px; border-radius: 2px; }.day-list span.selected { color: white; background: #293851; font-weight: 700; }
.time-text { display: block; color: #334057; font: 600 11px 'Barlow Condensed'; letter-spacing: .02em; white-space: nowrap; }td small { color: #9a9faa; font-size: 8px; }
.work-badge { color: #59616f; background: #eef0f3; border: 1px solid #dfe2e6; padding: 3px 7px; font-size: 9px; white-space: nowrap; }.work-badge.remote { color: #366879; background: #ebf5f7; border-color: #cfe6eb; }
.priority-text { color: #666e7c; white-space: nowrap; }

.generation-strip { position: sticky; top: 81px; z-index: 20; height: 62px; margin: 18px 0; display: flex; align-items: center; gap: 20px; padding: 0 18px; color: white; background: #192941; box-shadow: 0 9px 30px #101c323d; animation: slideDown .25s ease-out; }
.generation-strip[hidden] { display: none; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } }
.generation-copy { display: flex; align-items: center; gap: 11px; width: 300px; }.generation-copy div { display: flex; flex-direction: column; }.generation-copy strong { font-size: 12px; }.generation-copy small { color: #9dabbc; font-size: 9px; margin-top: 2px; }
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 #ee5b2a80; animation: pulse 1.1s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px #ee5b2a00; } }
.progress-track { flex: 1; height: 4px; background: #3b485b; overflow: hidden; }.progress-track span { display: block; height: 100%; background: var(--orange); transition: width .12s linear; }
.generation-strip > b { width: 52px; font: 700 22px 'Barlow Condensed'; text-align: right; }.generation-strip > b small { font-size: 11px; color: #8e9aac; }

.schedule-panel { margin-top: 18px; scroll-margin-top: 88px; }
.schedule-heading h2 { font-family: 'Barlow Condensed'; font-size: 19px; letter-spacing: .01em; }
.schedule-legend { display: flex; gap: 17px; color: #757d8a; font-size: 9px; }.schedule-legend span { display: flex; align-items: center; gap: 5px; }.legend-dot { width: 7px; height: 7px; background: #263650; }.legend-dot.remote { background: white; border: 2px solid #527a86; }
.empty-schedule { height: 270px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #89919e; }
.empty-schedule strong { font-size: 12px; color: #687180; margin-top: 15px; }.empty-schedule p { font-size: 10px; margin: 4px 0; }
.empty-mark { width: 54px; height: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 5px; border: 1px dashed #cbd0d7; transform: skew(-5deg); }.empty-mark span { align-self: end; background: #d7dbe0; }.empty-mark span:nth-child(1) { height: 12px; }.empty-mark span:nth-child(2) { height: 24px; }.empty-mark span:nth-child(3) { height: 33px; background: #f0bda9; }
.schedule-scroll { overflow-x: auto; }
.schedule-grid { display: grid; grid-template-columns: 112px repeat(7, minmax(135px, 1fr)); min-width: 1060px; }
.grid-corner,.day-header,.slot-label,.schedule-cell { border-right: 1px solid #e3e6ea; border-bottom: 1px solid #e3e6ea; }
.grid-corner { height: 54px; padding: 12px; display: flex; flex-direction: column; color: #949ba6; background: #f7f8f9; }.grid-corner span { font: 700 8px 'Barlow Condensed'; letter-spacing: .12em; }.grid-corner b { color: #596271; font-size: 10px; margin-top: 3px; }
.day-header { height: 54px; background: #f7f8f9; display: flex; align-items: center; justify-content: center; gap: 7px; }.day-header b { font-size: 12px; }.day-header span { color: #8e95a0; font: 600 12px 'Barlow Condensed'; }.day-header.weekend { color: #d6542b; background: #fff9f6; }
.slot-label { min-height: 142px; padding: 15px 12px; display: flex; flex-direction: column; background: #fbfbfc; }.slot-label strong { font-size: 11px; }.slot-label span { margin-top: 3px; color: #888f9a; font: 600 10px 'Barlow Condensed'; }
.schedule-cell { min-height: 142px; padding: 8px; position: relative; background: white; transition: background .3s; }
.shift-person { height: 26px; display: flex; align-items: center; gap: 5px; margin-bottom: 4px; padding: 3px 5px 3px 3px; color: #27344a; background: #f1f3f6; border-left: 2px solid #3b4b65; font-size: 9px; font-weight: 600; opacity: 0; transform: translateY(5px) scale(.96); }
.shift-person.placed { animation: place .22s cubic-bezier(.2,.9,.3,1.2) forwards; }
@keyframes place { to { opacity: 1; transform: translateY(0) scale(1); } }
.shift-person span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.shift-person em { margin-left: auto; font: 700 7px 'Barlow Condensed'; font-style: normal; color: #387180; border: 1px solid #79a4af; width: 14px; height: 14px; display: grid; place-items: center; border-radius: 50%; }
.schedule-cell.shortage { background: repeating-linear-gradient(-45deg,#fff8f5,#fff8f5 8px,#fff4ef 8px,#fff4ef 16px); box-shadow: inset 0 0 0 1px #f0a78d; }
.shortage-note { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 5px; color: #c4451b; font-size: 9px; font-weight: 700; opacity: 0; transition: opacity .25s; }.schedule-cell.shortage .shortage-note { opacity: 1; }.shortage-note span { width: 16px; height: 16px; display: grid; place-items: center; background: var(--orange); color: white; border-radius: 50%; font: 700 10px 'Barlow Condensed'; }

.export-panel { min-height: 85px; margin-top: 18px; padding: 16px 18px; display: flex; align-items: center; gap: 13px; background: #e8eaed; border: 1px solid #d8dbe0; color: #777f8c; }
.export-panel.ready { color: white; background: var(--navy); border-color: var(--navy); }.export-icon { width: 39px; height: 39px; display: grid; place-items: center; background: #d8dbe0; }.ready .export-icon { background: #253650; color: #ff855c; }.export-panel > div:nth-child(2) { flex: 1; }.export-panel strong { font-size: 12px; }.export-panel p { margin: 3px 0 0; font-size: 9px; opacity: .67; }
.export-panel button { height: 36px; display: flex; align-items: center; gap: 7px; border: 0; padding: 0 15px; color: #9ca1aa; background: #f5f5f6; font-size: 10px; font-weight: 700; }.export-panel.ready button { color: white; background: var(--orange); }.export-panel.ready button:hover { background: #f36d41; }

.guide-backdrop {
  position: fixed; inset: 0; z-index: 100; opacity: 0; pointer-events: none;
  background: rgb(7 14 27 / 76%); transition: opacity .16s ease;
}
.guide-backdrop.is-visible { opacity: 1; pointer-events: auto; }
.guide-spotlight {
  position: relative; z-index: 101 !important;
}
.guide-callout {
  position: fixed; z-index: 102; width: min(360px, calc(100vw - 32px)); padding: 20px;
  color: var(--ink); background: white; border-top: 4px solid var(--orange);
  box-shadow: 0 18px 48px rgb(2 8 20 / 38%); animation: guideIn .18s ease-out;
}
.guide-callout::before {
  content: ''; position: absolute; left: calc(50% - 8px); width: 16px; height: 16px;
  background: white; transform: rotate(45deg);
}
.guide-callout[data-position="below"]::before { top: -8px; }
.guide-callout[data-position="above"]::before { bottom: -8px; }
.guide-step { display: block; margin-bottom: 7px; color: var(--orange); font: 700 10px 'Barlow Condensed', sans-serif; letter-spacing: .14em; }
.guide-callout strong { display: block; font-size: 17px; }
.guide-callout p { margin: 8px 0 0; color: #626b7b; font-size: 12px; line-height: 1.7; }
.guide-callout button { display: block; min-width: 92px; height: 38px; margin: 16px 0 0 auto; border: 0; color: white; background: var(--orange); font-size: 12px; font-weight: 700; }
.guide-callout button:hover { background: #f26739; }
.guide-callout button:focus-visible { outline: 3px solid #ffb198; outline-offset: 2px; }
.guide-callout button[hidden] { display: none; }
@keyframes guideIn { from { opacity: 0; transform: translateY(5px); } }

footer { min-height: 66px; padding: 0 max(28px, calc((100vw - 1440px) / 2)); background: #0b1526; color: #758094; display: flex; align-items: center; justify-content: space-between; font: 500 9px 'Noto Sans JP'; }
footer p { margin: 0; color: #9ba4b4; }

@media (max-width: 900px) {
  .topbar { padding: 0 16px; }.brand { width: auto; }.topbar nav,.operator div,.demo-label { display: none; }.top-actions { margin-left: auto; }
  main { padding: 28px 14px 38px; }.hero-row { align-items: stretch; gap: 25px; flex-direction: column; }.generate-button { width: 100%; }
  .metrics { grid-template-columns: 1fr 1fr; }.metrics article:nth-child(2) { border-right: 0; }.metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .generation-copy { width: auto; }.generation-copy small { display: none; }
  footer { padding: 18px; flex-direction: column; gap: 8px; text-align: center; }
}
@media (max-width: 560px) {
  h1 { font-size: 27px; }.hero-row { margin-bottom: 23px; }.metrics { grid-template-columns: 1fr; }.metrics article { border-right: 0; border-bottom: 1px solid var(--line); min-height: 76px; }.metrics article:nth-child(3) { border-bottom: 1px solid var(--line); }
  .panel-heading { align-items: flex-start; flex-direction: column; gap: 13px; }.panel-toggle { align-items: center; flex-direction: row; }.staff-toolbar { align-items: stretch; flex-direction: column; padding: 12px 14px; }.filter-tabs { width: 100%; }.filter-tabs button { flex: 1; }.schedule-heading { flex-direction: row; align-items: center; }.schedule-legend { display: none; }
  .generation-strip { top: 78px; padding: 0 12px; gap: 10px; }.progress-track { min-width: 40px; }.generation-strip > b { width: 44px; }.generation-copy strong { font-size: 10px; }
  .export-panel { align-items: flex-start; flex-wrap: wrap; }.export-panel button { width: 100%; justify-content: center; }
}

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