:root{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;color:#20262d;background:#f5f7f8;font-size:15px;--blue:#176b87;--blue-dark:#10546b;--line:#dce3e7;--muted:#6f7b83;--red:#c84d4d;--green:#21835c}
*{box-sizing:border-box}body{margin:0;min-width:320px}a{color:var(--blue);text-decoration:none}button,input,select{font:inherit}button,.button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:9px 16px;border:1px solid #cbd5da;border-radius:9px;background:#fff;color:#26343c;cursor:pointer}button:hover,.button:hover{background:#f2f8fa}.primary{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:700}.primary:hover{background:var(--blue-dark);color:#fff}.danger{background:#fff7f7;border-color:#e7bebe;color:#a93030}.small{min-height:34px;padding:5px 11px;font-size:.9rem}.wide{width:100%}.site-header{height:62px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 max(18px,calc((100vw - 1400px)/2));gap:22px;position:sticky;top:0;z-index:10}.brand{font-size:1.15rem;font-weight:800;color:#22343e}.header-user{font-weight:700}.site-header nav{margin-left:auto;display:flex;align-items:center;gap:18px}.container{max-width:1500px;margin:0 auto;padding:24px 20px 52px}.page-title{display:flex;align-items:center;gap:16px;margin:4px 0 20px}.page-title h1{margin:0;font-size:1.6rem}.page-title> :last-child{margin-left:auto}.eyebrow{font-size:.72rem;letter-spacing:.12em;color:var(--muted);margin:0 0 5px}.status-pill{display:inline-flex;padding:7px 14px;border-radius:999px;background:#edf0f2;color:#68737a;font-size:.9rem;font-weight:700;white-space:nowrap}.status-pill.live{background:#e4f5ec;color:#167447}.toolbar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:14px}.toolbar .muted{margin-left:auto}.month-picker label,.inline-form label{display:flex;align-items:center;gap:10px;font-weight:700}.month-picker input,.inline-form input{width:auto}.panel{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px;margin:16px 0;box-shadow:0 2px 8px #182b3508}.panel h2{font-size:1.14rem;margin:0 0 16px}.panel p{color:#4f5b62}.muted{color:var(--muted);font-size:.9rem}input,select{min-height:42px;border:1px solid #cbd5da;border-radius:8px;padding:8px 10px;background:#fff;color:#20262d;max-width:100%}input:focus,select:focus,button:focus-visible,a:focus-visible{outline:3px solid #8bd0e3;outline-offset:2px}label{display:flex;flex-direction:column;gap:6px;font-weight:650}fieldset{border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin:0;min-width:0}legend{font-weight:750;padding:0 6px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.span-2{grid-column:span 2}.check-grid{display:flex;gap:8px 18px;align-items:center;flex-wrap:wrap}.check-grid.compact{gap:4px 8px}.check{display:inline-flex;flex-direction:row;align-items:center;gap:5px;font-size:.9rem;font-weight:500;white-space:nowrap}.check input{min-height:0;width:17px;height:17px;accent-color:var(--blue)}.form-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:16px}.admin-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.inline-form{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.flash{border-radius:10px;padding:12px 15px;margin:12px 0;background:#edf5f7;border:1px solid #d2e6eb;color:#204754}.flash.success{background:#eaf6ef;border-color:#c7e8d4;color:#185b38}.flash.error{background:#fff0ef;border-color:#f0c9c4;color:#912e26}.flash.warning{background:#fff8e8;border-color:#f2dda5;color:#74520c}.flash ul{margin:8px 0 0;padding-left:22px}.empty-state{padding:46px 18px;text-align:center;background:#fff;border:1px dashed #bac9cf;border-radius:14px;color:var(--muted)}.table-scroll{width:100%;overflow:auto;border:1px solid var(--line);border-radius:10px;background:#fff;overscroll-behavior-x:contain}.shift-table{border-collapse:separate;border-spacing:0;min-width:max-content;width:100%;font-size:.9rem}.shift-table th,.shift-table td{border-right:1px solid #e7ecee;border-bottom:1px solid #e7ecee;text-align:center;padding:5px 4px;height:48px}.shift-table thead th{position:sticky;top:0;background:#f0f4f5;z-index:2}.shift-table .staff-col,.shift-table .staff-name{position:sticky;left:0;background:#fff;z-index:3;min-width:128px;text-align:left;padding:8px 10px}.shift-table .staff-col{background:#edf2f4;z-index:4}.staff-name small{display:block;font-size:.73rem;font-weight:500;color:var(--muted);margin-top:2px}.day-head{min-width:42px}.day-head span{display:block;font-weight:800}.day-head small{font-size:.7rem;color:var(--muted)}.sun{color:#c24747}.sat{color:#3674ac}.sun-bg{background:#fff6f5}.sat-bg{background:#f3f8fc}.shift-cell{min-width:42px}.shift-cell select{width:100%;min-width:39px;min-height:38px;padding:2px;font-size:.86rem;border-color:transparent;background:transparent;text-align:center}.own-cell{background:#f2fafc}.own-cell select{border-color:#bdd6dd;background:#fff}.mark{font-weight:800;color:#183d4d}.wish-mark{color:#67747b;font-weight:700}.vacant{background:#fff0ed}.table-caption{color:var(--muted);font-size:.82rem;margin:10px 2px}.form-actions .muted{margin-right:auto}.requirements-table{border-collapse:collapse;width:100%;min-width:850px}.requirements-table th,.requirements-table td{border:1px solid var(--line);padding:8px;vertical-align:middle;text-align:left}.requirements-table th{background:#f2f5f6;white-space:nowrap}.requirements-table td input[type=number]{width:76px}.requirements-table select{min-width:125px}.staff-list{display:flex;flex-direction:column}.staff-row{display:grid;grid-template-columns:100px minmax(120px,1fr) minmax(100px,.7fr) auto auto;gap:12px;align-items:center;padding:10px 2px;border-bottom:1px solid var(--line)}.staff-row:last-child{border-bottom:0}.staff-row form{margin:0}.cell-edit select{min-width:38px;padding:1px;font-weight:700}.login-page{min-height:100vh;display:grid;place-items:center;padding:20px;background:linear-gradient(145deg,#f4f8f9,#e9f0f2)}.login-card,.setup-card{width:min(430px,100%);padding:30px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 16px 48px #18333e12}.setup-card{width:min(700px,100%)}.login-logo{text-align:center;font-size:1.1rem;font-weight:900;color:var(--blue);margin:0 0 24px}.login-logo span{color:#26343c}.login-card form{display:flex;flex-direction:column;gap:10px}.login-card form label{margin-top:5px}.login-card input{height:54px;font-size:1.05rem}.login-card button{height:54px;margin-top:12px;font-size:1.05rem}.setup-card h1{font-size:1.4rem;margin:0 0 8px}.setup-card p{color:var(--muted);line-height:1.6}.setup-card .form-grid{margin:18px 0}.setup-card .primary{margin-top:14px}.setup-card label{font-size:.92rem}
@media(max-width:760px){body{font-size:16px}.site-header{height:58px;padding:0 12px;gap:10px}.brand{font-size:1rem}.header-user{font-size:.92rem}.site-header nav{gap:10px;font-size:.88rem}.container{padding:18px 10px 36px}.page-title{align-items:flex-start}.page-title h1{font-size:1.35rem}.page-title .primary,.page-title .button{min-height:44px;padding:8px 11px}.toolbar{align-items:flex-start}.toolbar .muted{width:100%;margin:0}.panel{padding:15px 11px;border-radius:12px;margin:12px 0}.panel h2{font-size:1.05rem}.form-grid{grid-template-columns:1fr;gap:13px}.span-2{grid-column:auto}.admin-actions{align-items:stretch;flex-direction:column}.admin-actions>*{width:100%}.inline-form{align-items:stretch;flex-direction:column}.inline-form label{align-items:stretch}.shift-table th,.shift-table td{height:56px}.shift-table .staff-col,.shift-table .staff-name{min-width:116px}.day-head,.shift-cell{min-width:45px}.shift-cell select{min-height:46px;font-size:.95rem}.staff-row{grid-template-columns:78px minmax(90px,1fr) auto auto;gap:6px;padding:10px 0}.staff-row span:nth-of-type(2){grid-column:2}.staff-row .button,.staff-row button{padding:4px 7px}.requirements-table td{padding:6px}.login-page{padding:12px}.login-card{padding:25px 20px}.login-card input{height:62px;font-size:1.2rem}.login-card button{height:62px;font-size:1.15rem}.setup-card{padding:22px 16px}.check-grid{gap:8px 13px}}

/* Clearer workflow and compact, role-aware forms */
.admin-title{margin-bottom:10px}
.admin-toolbar{padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff}
.workflow-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0 20px}
.workflow-nav a{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fff;color:#26343c;font-weight:700}
.workflow-nav a:hover{border-color:#84bdcc;background:#f4fbfd}
.workflow-nav b,.step-number{display:grid;place-items:center;width:32px;height:32px;flex:0 0 32px;border-radius:50%;background:#e5f3f6;color:var(--blue);font-size:1rem}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.section-heading h2{margin:0}
.section-heading .eyebrow{margin-bottom:4px}
.count-badge{display:inline-flex;align-items:center;justify-content:center;min-width:34px;padding:5px 10px;border-radius:999px;background:#edf2f4;color:#53636c;font-weight:700}
.first-step{display:flex;gap:16px;align-items:flex-start;padding:24px}
.first-step h2{margin:0}
.first-step p{margin:8px 0 14px}
.requirements-table{min-width:1000px}
.requirements-table th small,.staff-primary small,legend small{display:block;color:var(--muted);font-size:.78rem;font-weight:500}
.requirements-table .requirement-date{position:sticky;left:0;z-index:2;min-width:70px}
.requirements-table .requirement-date strong{font-size:1.05rem}
.requirements-table .requirement-date small{margin-left:5px;display:inline}
.requirements-table td:nth-child(4){min-width:440px}
.requirements-table .check-grid.compact{gap:4px 10px}
.requirements-table .check{font-size:.83rem}
.requirements-table input[type=number]{width:68px;text-align:center;font-weight:700}
.admin-board .staff-col,.admin-board .staff-name{min-width:142px}
.admin-board .shift-cell{min-width:75px}
.admin-board .cell-edit select{font-size:.88rem}
.cell-wish{display:block;color:#95600c;font-size:.7rem;line-height:1.2}
.shift-cell.has-wish-off{box-shadow:inset 0 0 0 2px #e2bc67}
.wish-overflow{background:#ffebe8!important;color:#a8342c}
.wish-overflow i{display:block;font-size:.62rem;font-style:normal;color:#a8342c}
.reception-summary{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}
.reception-summary div{display:flex;flex-direction:column;min-width:125px;padding:10px 14px;border:1px solid var(--line);border-radius:10px;background:#fbfcfc}
.reception-summary strong{font-size:1.05rem}
.reception-summary span{color:var(--muted);font-size:.8rem}
.build-panel .primary{min-width:220px}
.notice{padding:12px 14px;border-radius:10px;background:#f1f6f8;color:#3c5964}
.notice.success{background:#e9f6ed;color:#276342}
.publish-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:16px;padding:14px;border-radius:12px;background:#f1f7f8}
.publish-bar div{display:flex;flex-direction:column;gap:4px}
.publish-bar span{color:var(--muted);font-size:.87rem}
.vacant{background:#fff0ed!important;box-shadow:inset 0 0 0 1px #e8a59a}
.own-row .staff-name{background:#eaf6f8}
.wish-intro{display:flex;align-items:center;justify-content:space-between;gap:12px}
.wish-intro h2{margin:0 0 5px}
.wish-intro p{margin:0 0 5px}
.wish-counter,.note-pill{display:inline-flex;padding:6px 10px;border-radius:999px;background:#edf5f7;color:#3c6874;font-size:.84rem;font-weight:700}
.shift-result{display:block;color:#1d5062;font-size:.7rem;font-weight:700}
.wish-form .shift-cell select{min-width:70px}
.staff-editor .section-heading{margin-bottom:18px}
.staff-primary{grid-template-columns:repeat(4,minmax(0,1fr));align-items:end;padding:16px;border-radius:12px;background:#f6f8f9}
.staff-primary label{min-width:0}
.settings-section{margin-top:14px;border:1px solid var(--line);border-radius:12px;background:#fff}
.settings-section>summary{padding:14px 16px;cursor:pointer;font-weight:800}
.settings-section[open]>summary{border-bottom:1px solid var(--line);background:#f7f9fa}
.settings-section>.form-grid{padding:16px}
.settings-section .check-grid{padding:4px 2px}
.settings-section legend{font-size:.94rem}
.rule-selects{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.staff-row{grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:13px 4px}
.staff-identity{display:flex;align-items:center;gap:14px;min-width:0}
.staff-identity strong{min-width:160px}
.staff-identity span{color:var(--muted);font-size:.88rem}
.staff-actions{display:flex;align-items:center;gap:8px}
.staff-actions form{margin:0}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.week-controls{display:none;gap:7px;overflow-x:auto;padding:8px 0}
.week-controls button{min-height:38px;padding:6px 12px;white-space:nowrap}
.week-controls button[aria-pressed=true]{background:var(--blue);border-color:var(--blue);color:white}
@media(max-width:900px){.staff-primary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
  .workflow-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .workflow-nav a{padding:9px;font-size:.86rem}
  .workflow-nav b{width:28px;height:28px;flex-basis:28px}
  .admin-toolbar{align-items:center}
  .first-step{padding:18px 13px}
  .requirements-table{min-width:740px;font-size:.88rem}
  .requirements-table td:nth-child(4){min-width:290px}
  .requirements-table .check-grid.compact{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 7px}
  .requirements-table .check{white-space:normal;font-size:.8rem}
  .admin-board .shift-cell{min-width:63px}
  .admin-board .cell-edit select{min-height:46px;font-size:.83rem}
  .cell-wish{font-size:.65rem}
  .publish-bar{align-items:stretch;flex-direction:column}
  .publish-bar .primary{width:100%}
  .wish-intro{align-items:flex-start;flex-direction:column}
  .week-controls{display:flex}
  [data-week-hidden]{display:none!important}
  .staff-primary{grid-template-columns:1fr 1fr;padding:12px}
  .settings-section>.form-grid{padding:12px}
  .staff-row{grid-template-columns:minmax(0,1fr) auto;gap:7px}
  .staff-identity{align-items:flex-start;flex-direction:column;gap:2px}
  .staff-identity strong{min-width:0}
  .staff-actions{gap:5px}
  .staff-actions .button,.staff-actions button{min-height:40px;padding:5px 8px}
  .rule-selects{grid-template-columns:1fr 1fr}
}
@media(max-width:420px){
  .site-header nav{gap:7px;font-size:.8rem}
  .staff-primary{grid-template-columns:1fr}
  .reception-summary div{min-width:calc(50% - 6px);flex:1}
  .workflow-nav span{font-size:.8rem}
}
