:root{--lilac:#e9c6ea;--ink:#32253f;--plum:#714a82;--rose:#fff1f6;--paper:#fff;--edge:#e8dae9}*{box-sizing:border-box}body{margin:0;background:#faf6fb;color:var(--ink);font:16px/1.5 system-ui,'Segoe UI',sans-serif}header{background:linear-gradient(120deg,var(--lilac),#f8dbea 70%,#fff4ec);padding:17px 3%;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:10px}.brand strong{font-size:24px;letter-spacing:.09em}.brand small{color:#684b6e}.key{font-size:35px;line-height:1;color:var(--plum)}.context{font-weight:600}.layout{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:calc(100vh - 130px)}nav{padding:20px 12px;background:#fff;box-shadow:2px 0 14px #65407011}nav a{display:block;padding:10px 14px;margin:3px 0;border-radius:10px;color:var(--ink);text-decoration:none}nav a:hover{background:var(--rose);color:var(--plum)}main{padding:28px 4%;max-width:1500px;width:100%;margin:auto}h1{font-size:31px;margin:0 0 22px}h2{font-size:20px;margin:0 0 14px;color:var(--plum)}section,article{background:var(--paper);border:1px solid var(--edge);border-radius:16px;padding:22px;margin:0 0 18px;box-shadow:0 3px 16px #51415f0a}article{box-shadow:none;padding:15px;margin:10px 0}p{margin:9px 0}a{color:#694087}.grid{display:grid;gap:18px}.two{grid-template-columns:repeat(2,minmax(0,1fr))}.stats{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:12px;margin-bottom:20px}.stats>div{background:#fff;border:1px solid var(--edge);border-radius:14px;padding:16px}.stats b{display:block;font-size:30px;color:var(--plum)}form label{display:block;font-weight:600;margin:9px 0}input:not([type=checkbox]),select,textarea{width:100%;border:1px solid #cbb8d2;border-radius:8px;padding:10px;font:inherit;background:white;color:var(--ink)}textarea{min-height:75px}input[type=checkbox]{accent-color:var(--plum)}button,.button{background:var(--plum);color:white;border:0;padding:11px 18px;border-radius:9px;cursor:pointer;font:inherit;font-weight:650;text-decoration:none;display:inline-block;margin:6px 3px 3px 0}button:hover,.button:hover{background:#513263;color:white}.secondary{background:#b583a6}.small-button{font-size:13px;padding:6px 10px}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px 15px;align-items:end}.form-grid .wide{grid-column:1/-1}.inline,.actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.inline select{width:auto;min-width:140px}.inline label{white-space:nowrap}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;min-width:550px}th,td{text-align:left;border-bottom:1px solid var(--edge);padding:9px;vertical-align:middle}th{background:#fcf3fb}.plan{min-width:950px;table-layout:fixed}.plan th:first-child{width:190px}.plan td{height:44px;border-right:1px solid var(--edge);padding:3px}.plan small{display:block;font-weight:400}.bar,.tag,.legend span{padding:6px 9px;border-radius:7px;display:block;text-decoration:none;color:#2e2942;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tag{display:inline-block}.legend{display:flex;gap:7px;margin:12px 0}.tentative{background:#ffe3b4!important}.option{background:#d9d0fa!important}.confirmed{background:#bee3ee!important}.checked_in{background:#b6e4c9!important}.checked_out{background:#e9e9e9!important}.cancelled{background:#f3c8c8!important}.blocked{background:repeating-linear-gradient(45deg,#f9ecf0,#f9ecf0 5px,#eedce4 5px,#eedce4 10px)}.notice{padding:13px;border-radius:10px;background:#f7e8fd;margin-bottom:16px}.notice.error{background:#ffe0df}.small,small{font-size:13px;color:#6a5c70}footer{text-align:center;padding:15px;color:#826c89}code{background:#f3e8f3;padding:2px 5px;border-radius:4px}@media(max-width:900px){.layout{grid-template-columns:1fr}nav{display:flex;overflow-x:auto;padding:6px}nav a{white-space:nowrap}.two,.form-grid{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,1fr)}header{flex-wrap:wrap}main{padding:20px}}@media print{header,nav,footer,button,form,.notice{display:none!important}.layout{display:block}main{padding:0}section{box-shadow:none;border:0;break-inside:avoid}.stats{display:none}body{background:white}}

.brand img{display:block;width:168px;height:auto;max-height:70px;object-fit:contain;object-position:left center}

/* HOSIMA 0.2: solid contrast surface keeps the original logo readable. */
.brand{background:#fff;padding:12px 18px;border:1px solid #d4b5d6;border-radius:14px;box-shadow:0 2px 8px #32253f12;min-width:206px}.brand img{width:190px;max-height:78px}.address{display:block;margin-top:5px}.danger{background:#96313f}.danger:hover{background:#702330}.delete-link{color:#8c2035}.delete-warning{border:2px solid #ba5360}.errorlist{color:#9b2336;padding-left:20px}.helptext{display:block;color:#65506d;font-size:14px}summary{cursor:pointer;font-weight:600}input:focus,select:focus,textarea:focus,a:focus-visible,button:focus-visible{outline:3px solid #714a82;outline-offset:3px}form ul{list-style:none}article input[type=checkbox]{width:auto}

.brand img{filter:brightness(.60) saturate(.85);}

/* Version 0.3 */
header{position:sticky;top:0;z-index:50;box-shadow:0 3px 12px #32253f18}
.notice.warning{background:#fff1ce;border:1px solid #b77919;color:#553500}
[hidden]{display:none!important}abbr[title]{text-decoration:underline dotted;text-underline-offset:4px;cursor:help}
input[role=switch]{appearance:none;width:44px!important;height:24px;background:#a29aaa;border-radius:16px;vertical-align:middle;position:relative;cursor:pointer}
input[role=switch]::before{content:'';position:absolute;width:18px;height:18px;left:3px;top:3px;border-radius:50%;background:white;transition:transform .15s}
input[role=switch]:checked{background:var(--plum)}input[role=switch]:checked::before{transform:translateX(20px)}
input[readonly]{background:#f5f0f6;color:#66526f}
@media print{header{position:static}.notice.warning{display:block!important}}

main{margin:0 auto}
/* Keep wide tables/select options inside the mobile viewport. */
main,nav,section,.form-grid>*,.grid>*{min-width:0}
input,select,textarea{max-width:100%}
.context{overflow-wrap:anywhere}
@media(max-width:900px){.layout{grid-template-columns:minmax(0,1fr)}}

.unread-envelope{display:inline-block;color:#bd286e;background:#ffe2ef;border-radius:6px;padding:2px 6px;font-weight:700;font-size:1.15em}.checked_out{background:#ded4e9;color:#332640}fieldset{border:1px solid #d8c6df;border-radius:8px;margin:14px 0;padding:12px}@media print{.no-print,.unread-envelope{display:none}thead{display:table-header-group}tr{break-inside:avoid}}

.plan05{border-collapse:collapse;table-layout:fixed;min-width:1300px}.plan05 th:first-child{width:155px}.plan05 td{padding:0!important;height:48px;min-width:70px}.plan05 .morning{border-right:1px dashed #d9cce0}.plan05 .afternoon{border-left:0}.plan05 .bar{margin:0;border-radius:0;padding:10px 3px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block}.plan05 .simulation-day{border:3px solid #6d4280;border-bottom:0;background:#eedcf6}.plan05 .simulation-morning{border-left:3px solid #6d4280;background-color:#faf2fd}.plan05 .simulation-afternoon{border-right:3px solid #6d4280;background-color:#faf2fd}.plan05 tr:last-child .simulation-morning,.plan05 tr:last-child .simulation-afternoon{border-bottom:3px solid #6d4280}h2[id],span[id]{scroll-margin-top:180px}dialog{border:2px solid #c19acb;border-radius:18px;padding:36px;max-width:min(90vw,520px);color:#35253e;text-align:center;background:#fff7fc}dialog::backdrop{background:#35253e99}.closing-key{width:160px;color:#cb79a8;animation:closing-key 1s ease-in-out infinite}@keyframes closing-key{0%,100%{transform:rotate(-15deg) scale(.9)}50%{transform:rotate(15deg) scale(1.1)}}@media(prefers-reduced-motion:reduce){.closing-key{animation:none}}[hidden]{display:none!important}

.legend{flex-wrap:wrap}.legend span{flex:0 0 auto}
.sim-calendar{max-width:440px;border:2px solid #776183;border-radius:12px;padding:20px}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin:15px 0}.calendar-grid button{padding:9px}.calendar-grid .simulation-today{outline:3px solid #be628b;background:#f9dce9;color:#24142d}.selected-slot{outline:3px solid #be628b!important;background:#f9dce9!important}.sim-calendar::backdrop{background:#0007}
.class-logo{width:180px;max-height:100px;object-fit:contain;object-position:left center}.date-control{display:flex;gap:.35rem;align-items:center}.date-control input{min-width:0}.date-control button{flex:0 0 auto;padding:.5rem}.date-control:has(input:disabled){opacity:.65}.sim-calendar{max-width:min(95vw,420px)}
