/* Kemenkop operational draft colors; Apple principles adapted for responsive web. */
:root {
 --ink:#17212b; --muted:#53626c; --line:#d9e1e5; --paper:#f5f7f8; --white:#fff;
 --navy-950:#17212b; --navy-800:#065366; --teal-700:#065366; --teal-800:#044555; --teal-100:#e7f0f2;
 --tk-surface:#fff; --tk-accent:#065366; --tk-lime:#a0ba3b; --tk-gold:#e5a80e;
 color-scheme:light; --sidebar:240px;
}
html { font-size:16px; }
body,input,button,select,textarea { font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
body { color:var(--ink); background:var(--paper); }
h1 { font-size:clamp(1.75rem,2.6vw,2.5rem); line-height:1.18; letter-spacing:-.035em; font-weight:700; }
h2 { font-size:1.25rem; line-height:1.35; letter-spacing:-.02em; }
p { line-height:1.55; }
button,input,select,textarea { font-size:1rem; }
button,.primary-button,.secondary-button,.menu-button { min-height:44px; border-radius:10px; }
input:not([type=checkbox]):not([type=radio]),select,textarea { border-radius:8px; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline:3px solid #075a72; outline-offset:3px; }
.desktop-header { background:var(--tk-surface); border-bottom:1px solid var(--line); }
.brand img { width:200px; height:auto; max-height:66px; object-fit:contain; }
.sidebar { background:#edf2f3; color:var(--ink); border:1px solid var(--line); border-radius:16px; }
.sidebar nav a { color:#33424c; font-weight:500; border-left:0; border-radius:8px; margin:3px 10px; min-height:44px; }
.sidebar nav a:hover { background:#e1e9ec; color:var(--tk-accent); }
.sidebar nav a.active { background:#dcebef; color:#044555; font-weight:700; border-left:0; box-shadow:inset 3px 0 var(--tk-accent); }
.sidebar-user { color:var(--ink); border-color:var(--line); }
.sidebar-user small,.sidebar-user .text-button { color:var(--muted); }
.workspace { background:transparent; }
.form-panel,.panel,.table-panel,.memo-workflow { background:var(--tk-surface); border:1px solid var(--line); border-radius:14px; box-shadow:0 1px 2px #17212b05; }
.primary-button { background:var(--tk-accent); color:#fff; border:1px solid var(--tk-accent); }
.secondary-button { background:#fff; color:var(--tk-accent); border:1px solid #b8c9cf; box-shadow:none; }
button:disabled { opacity:.55; cursor:not-allowed; }
.notice { border-radius:10px; }
.page-heading { gap:16px; flex-wrap:wrap; }
.page-heading p { max-width:75ch; }
.mobile-topbar { background:var(--tk-surface); border-bottom:1px solid var(--line); }
.mobile-topbar a { background:transparent; border-radius:0; padding:0; }
.mobile-topbar img { background:transparent; width:190px; height:auto; max-height:56px; object-fit:contain; }
.login-context { background:#065366; }
.login-logo { background:transparent; object-fit:contain; filter:none; }
.attendance-eyebrow { font-size:.9rem; font-weight:600; color:var(--tk-accent); margin:0 0 6px; }
.attendance-layout { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:24px; align-items:start; }
.attendance-layout>* { min-width:0; padding:24px; }
.attendance-times { display:grid; grid-template-columns:1fr 1fr; border:1px solid var(--line); border-radius:12px; margin:20px 0; }
.attendance-times>div { display:grid; gap:6px; padding:18px; }
.attendance-times>div+div { border-left:1px solid var(--line); }
.attendance-times span { color:var(--muted); }
.attendance-times strong { font-variant-numeric:tabular-nums; font-size:1.15rem; }
.attendance-map { border:1px solid var(--line); border-radius:12px; background:#f5f8f9; overflow:hidden; }
.attendance-map > svg { width:100%; height:260px; display:block; }
.attendance-map.is-leaflet { height:330px; z-index:0; }
.attendance-map.is-vector { height:330px; position:relative; }
.attendance-map .maplibregl-canvas { display:block; }
.attendance-map .maplibregl-ctrl button { min-height:44px; width:44px; padding:0; }
.attendance-map .maplibregl-ctrl-attrib { font-size:10px; line-height:15px; }
.attendance-person-marker,.attendance-person-marker img { width:32px!important; height:40px!important; background:transparent!important; border-radius:0!important; object-fit:contain; }
a.attendance-day { color:var(--ink); text-decoration:none; min-height:54px; }
a.attendance-day:hover { background:#e7f0f2; }
a.attendance-day.is-selected { background:#004b5b; color:#fff; border-color:#004b5b; }
.attendance-map .leaflet-control a { color:#17212b; }
.attendance-map .leaflet-bar a { width:44px; height:44px; line-height:44px; }
.attendance-map .leaflet-marker-icon { background:transparent; border-radius:0; max-height:none; object-fit:contain; }
.attendance-tile-warning { font-size:.85rem; color:var(--muted); }
.attendance-map p { padding:0 14px 12px; margin:0; font-size:.85rem; color:var(--muted); }
.attendance-boundary { stroke:#065366; stroke-width:2; fill:#06536620; }
.attendance-position { fill:#065366; stroke:#fff; stroke-width:2; }
.attendance-capture fieldset { border:1px solid var(--line); padding:16px; border-radius:12px; min-width:0; }
.attendance-capture legend { padding:0 5px; font-weight:650; }
.attendance-capture video,.attendance-capture img { display:block; max-width:100%; width:100%; max-height:320px; object-fit:contain; background:#f5f7f8; border-radius:8px; }
[hidden] { display:none!important; }
.attendance-actions { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.attendance-month { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px; }
.attendance-weekday { text-align:center; color:var(--muted); padding:10px 0; font-size:.8rem; }
.attendance-day { min-height:62px; border:1px solid var(--line); border-radius:8px; padding:8px 2px; display:grid; text-align:center; gap:4px; }
.attendance-day small { font-size:.68rem; }
.attendance-day.is-recorded { background:#e7f0f2; color:#044555; }
.attendance-day.is-today { border:2px solid var(--tk-accent); }
.attendance-history { margin-top:24px; }
.attendance-history-day { border-top:1px solid var(--line); padding:12px 0; }
.attendance-history-day summary { min-height:44px; cursor:pointer; padding:10px 0; font-weight:600; }
.attendance-history-day p { padding-left:12px; }
.table-wrap { max-width:100%; overflow-x:auto; }
@media(max-width:900px) { .attendance-layout { grid-template-columns:1fr; } }
@media(max-width:600px) {
 body { font-size:1rem; } .attendance-layout>* { padding:16px; }
 .attendance-day { min-height:54px; } .attendance-day small { font-size:.65rem; }
 .attendance-actions { position:sticky; bottom:env(safe-area-inset-bottom,0px); background:var(--tk-surface); padding:12px 0; }
 .sidebar nav a { padding-top:10px; padding-bottom:10px; }
 main { padding-bottom:calc(24px + env(safe-area-inset-bottom,0px)); }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; animation:none!important; } }
@media(prefers-contrast:more) { :root { --line:#66747e; --muted:#33424c; } }
.work-panel { padding:24px; margin-bottom:24px; }
.work-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }
.work-row h2,.work-row h3 { margin:0; }
.work-prewrap { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.65; }
.work-log-entry { padding:24px 0; border-top:1px solid var(--line); margin-top:20px; }
.work-dialog { width:min(620px,calc(100vw - 24px)); max-height:90dvh; border:1px solid var(--line); border-radius:18px; padding:24px; color:var(--ink); overflow-y:auto; }
.work-dialog::backdrop { background:#17212b66; }
.login-assignment-dialog { position:relative; max-width:520px; }
.login-assignment-dialog .dialog-close { position:absolute; top:14px; right:14px; border:0; background:transparent; font-size:1.6rem; cursor:pointer; }
.login-assignment-dialog .dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:24px; }
.work-dialog input,.work-dialog textarea { width:100%; min-height:44px; }
.work-dialog label { display:grid; gap:8px; }
.work-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:20px 0; }
.work-stats>div { background:#f5f7f8; border:1px solid var(--line); border-radius:12px; padding:16px; display:grid; gap:6px; }
.work-stats span { color:var(--muted); }.work-stats strong { font-size:1.6rem; font-variant-numeric:tabular-nums; }
.work-day { padding:20px; background:#f5f7f8; border:1px solid var(--line); border-radius:12px; margin:16px 0; }
.work-day h3 { font-size:1rem; }.work-day .work-row>span { font-size:.85rem; color:var(--muted); }
.work-day-times { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:16px 0; border-bottom:1px solid var(--line); }
.work-day-times>div { display:grid; gap:6px; }.work-day-times small { color:var(--muted); }
@media(max-width:600px) { .work-panel,.work-dialog { padding:16px; }.work-day { padding:14px; }.work-stats strong { font-size:1.4rem; } }
.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; }
.agenda-chat { position:fixed; right:24px; bottom:24px; z-index:1100; }
.agenda-chat.is-dragging { will-change:transform; }
.agenda-chat-launcher { position:relative; isolation:isolate; width:116px; height:116px; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; cursor:grab; touch-action:none; user-select:none; transform-origin:50% 82%; }
.agenda-chat-launcher:active { cursor:grabbing; }
.agenda-chat-launcher::before,.agenda-chat-launcher::after { content:""; position:absolute; pointer-events:none; opacity:0; }
.agenda-chat-launcher::before { inset:20%; z-index:-1; border:4px dotted #8ed8f2; border-radius:50%; }
.agenda-chat-launcher::after { inset:8%; z-index:2; background:radial-gradient(circle at 15% 50%,#8ed8f2 0 4px,transparent 5px),radial-gradient(circle at 78% 18%,#b9eaff 0 5px,transparent 6px),radial-gradient(circle at 88% 72%,#8ed8f2 0 3px,transparent 4px),radial-gradient(circle at 34% 10%,#dff4ff 0 4px,transparent 5px); }
.agenda-chat-launcher img { position:relative; z-index:1; display:block; width:100%; height:100%; object-fit:contain; }
.agenda-chat.is-scrolling .agenda-chat-launcher { animation:ultraboy-shrink .55s cubic-bezier(.4,0,.2,1) both; }
.agenda-chat.is-scrolling .agenda-chat-launcher::before { animation:ultraboy-poof .72s ease-out both; }
.agenda-chat.is-scrolling .agenda-chat-launcher::after { animation:ultraboy-sparkle .72s ease-out both; }
.agenda-chat.is-returning .agenda-chat-launcher { animation:ultraboy-return .72s cubic-bezier(.2,.9,.25,1.2) both; }
.agenda-chat.is-dragging .agenda-chat-launcher { animation:none; transform:scale(1); }
@keyframes ultraboy-shrink { 0%{transform:scale(1)} 34%{transform:scale(.82,1.05) rotate(-2deg)} 68%{transform:scale(.58,.47) rotate(2deg)} 100%{transform:scale(.5)} }
@keyframes ultraboy-return { 0%{transform:scale(.5)} 58%{transform:scale(1.12,.92)} 76%{transform:scale(.94,1.06)} 90%{transform:scale(1.04,.98)} 100%{transform:scale(1)} }
@keyframes ultraboy-poof { 0%{opacity:0;transform:scale(.35)} 28%{opacity:.9} 100%{opacity:0;transform:scale(1.35) rotate(22deg)} }
@keyframes ultraboy-sparkle { 0%{opacity:0;transform:scale(.5) rotate(0)} 35%{opacity:1} 100%{opacity:0;transform:scale(1.25) rotate(-18deg)} }
@media(prefers-reduced-motion:reduce) {
 .agenda-chat.is-scrolling .agenda-chat-launcher { animation:none!important; transform:scale(.5); }
 .agenda-chat.is-returning .agenda-chat-launcher { animation:none!important; transform:scale(1); }
 .agenda-chat-launcher::before,.agenda-chat-launcher::after { display:none; }
}
.agenda-chat-thought { position:absolute; right:96px; bottom:80px; width:max-content; min-width:170px; max-width:min(310px,calc(100vw - 140px)); min-height:64px; padding:15px 18px; color:#173440; font-size:.615rem; font-weight:600; line-height:1.45; text-align:center; overflow-wrap:anywhere; background:#dff4ff; border:2px solid #173440; box-shadow:3px 4px 0 #17344024; }
.agenda-chat-message p { margin:0 0 .55rem; }
.agenda-chat-message p:last-child { margin-bottom:0; }
.agenda-chat-message ol,.agenda-chat-message ul { margin:.3rem 0 .55rem 1.2rem; padding:0; }
.agenda-chat-message li+li { margin-top:.3rem; }
.agenda-chat-message code { padding:.08rem .28rem; border-radius:4px; background:#edf2f4; font-size:.9em; }
.agenda-chat-message a { color:inherit; text-decoration:underline; text-underline-offset:2px; }
.agenda-chat-subheading { display:block; margin:.2rem 0 .45rem; }
.agenda-chat-thought::after { content:""; position:absolute; right:-18px; bottom:16px; width:24px; height:20px; background:#dff4ff; border-right:2px solid #173440; border-bottom:2px solid #173440; clip-path:polygon(0 0,100% 100%,0 70%); }
.agenda-chat-thought.is-oval { padding:18px 24px; border-radius:52% 48% 46% 54% / 48% 54% 46% 52%; }
.agenda-chat-thought.is-cloud { padding:20px 24px; border-radius:44% 56% 42% 58% / 55% 42% 58% 45%; box-shadow:3px 4px 0 #17344024,inset 0 0 0 2px #ffffff70; }
.agenda-chat-thought.is-rounded { text-align:left; border-radius:22px 22px 22px 8px; }
.agenda-chat-thought.is-burst { max-width:min(330px,calc(100vw - 140px)); padding:27px 30px; border:0; clip-path:polygon(50% 0,59% 12%,70% 4%,76% 18%,91% 14%,90% 30%,100% 38%,88% 49%,98% 61%,84% 67%,87% 83%,70% 82%,62% 97%,50% 88%,38% 100%,30% 84%,13% 87%,16% 69%,1% 62%,12% 50%,0 39%,14% 30%,10% 15%,27% 17%,35% 3%); filter:drop-shadow(2px 3px 0 #173440); }
.agenda-chat-thought.is-burst::after { display:none; }
.agenda-chat.is-left .agenda-chat-thought { left:96px; right:auto; }
.agenda-chat.is-left .agenda-chat-thought::after { left:-18px; right:auto; transform:scaleX(-1); }
.agenda-chat.is-top .agenda-chat-thought { top:76px; bottom:auto; }
.agenda-chat-thought:hover { background:#cceeff; }
.agenda-chat-launcher:focus-visible,.agenda-chat-panel button:focus-visible,.agenda-chat-panel textarea:focus-visible { outline:3px solid #a0ba3b; outline-offset:2px; }
.agenda-chat-panel { position:absolute; right:0; bottom:130px; width:min(380px,calc(100vw - 32px)); height:min(620px,calc(100dvh - 152px)); background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:0 12px 32px #17212b2e; overflow:hidden; }
.agenda-chat.is-left .agenda-chat-panel { left:0; right:auto; }
.agenda-chat.is-top .agenda-chat-panel { top:130px; bottom:auto; }
.agenda-chat-header { min-height:68px; display:grid; grid-template-columns:42px 1fr 44px; align-items:center; gap:10px; padding:10px 12px; color:#fff; background:#004b5b; }
.agenda-chat-header>img { width:34px; height:42px; object-fit:contain; }
.agenda-chat-header div { display:grid; gap:2px; min-width:0; }.agenda-chat-header small { color:#dcebee; font-size:.72rem; }
.agenda-chat-header button { width:44px; height:44px; padding:0; border:0; background:transparent; color:#fff; font-size:1.65rem; }
.agenda-chat-messages { height:calc(100% - 224px); min-height:190px; padding:16px; overflow-y:auto; background:#f5f7f8; }
.agenda-chat-message { width:fit-content; max-width:88%; margin:0 0 12px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:#fff; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.5; }
.agenda-chat-message.is-user { margin-left:auto; color:#fff; background:#065366; border-color:#065366; }
.agenda-chat-suggestions { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 14px; }
.agenda-chat-suggestions button { min-height:38px; padding:7px 10px; color:#065366; font-size:.78rem; text-align:left; background:#fff; border:1px solid #9db3b8; border-radius:999px; }
.agenda-chat-suggestions button:hover { background:#e9f0f1; border-color:#065366; }
.agenda-chat-form { display:grid; gap:7px; padding:12px; border-top:1px solid var(--line); background:#fff; }
.agenda-chat-form label { font-size:.78rem; font-weight:650; }.agenda-chat-form textarea { width:100%; min-height:58px; max-height:108px; resize:vertical; padding:9px 10px; }
.agenda-chat-form>div { display:flex; align-items:center; justify-content:flex-end; gap:12px; }
.agenda-chat-form button { min-width:76px; min-height:42px; color:#fff; background:#065366; border:1px solid #065366; }
.agenda-chat-status { min-height:18px; margin:0; color:var(--muted); font-size:.75rem; }
@media(max-width:600px) { .agenda-chat { right:12px; bottom:calc(12px + env(safe-area-inset-bottom,0px)); }.agenda-chat-panel { bottom:124px; width:calc(100vw - 24px); height:min(560px,calc(100dvh - 148px)); }.agenda-chat.is-top .agenda-chat-panel { top:124px; }.agenda-chat-launcher { width:112px; height:112px; }.agenda-chat-thought { right:82px; bottom:76px; min-width:150px; max-width:min(250px,calc(100vw - 130px)); }.agenda-chat.is-left .agenda-chat-thought { left:82px; }.agenda-chat.is-top .agenda-chat-thought { top:72px; } }

/* Avatar settings: quiet administrative framing with the character art as the only decorative element. */
.avatar-settings { display:grid; gap:24px; max-width:980px; }
.avatar-current { display:flex; align-items:center; gap:20px; padding:20px; border:1px solid var(--line); border-radius:18px; background:#f7fafb; }
.avatar-current img { width:112px; height:112px; flex:0 0 112px; object-fit:contain; }
.avatar-current div { display:grid; gap:4px; min-width:0; }
.avatar-current span,.avatar-current small,.avatar-name small,.avatar-upload small { color:var(--muted); }
.avatar-current strong { font-size:1.35rem; overflow-wrap:anywhere; }
.avatar-name,.avatar-upload { display:grid; gap:8px; font-weight:700; }
.avatar-name input,.avatar-upload input { font-weight:400; }
.avatar-picker { margin:0; padding:0; border:0; }
.avatar-picker legend { margin-bottom:12px; font-weight:700; }
.avatar-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(138px,1fr)); gap:12px; }
.avatar-option { position:relative; display:block; cursor:pointer; }
.avatar-option input { position:absolute; width:1px; height:1px; opacity:0; }
.avatar-option span { display:grid; min-height:174px; grid-template-rows:124px auto; align-items:center; justify-items:center; gap:8px; padding:12px; border:1px solid var(--line); border-radius:16px; background:#fff; transition:border-color .16s ease,box-shadow .16s ease,background .16s ease; }
.avatar-option img { width:116px; height:116px; object-fit:contain; }
.avatar-option strong { text-align:center; line-height:1.25; }
.avatar-option input:checked + span { border-color:var(--tk-accent); background:#eef8fa; box-shadow:inset 0 0 0 2px var(--tk-accent); }
.avatar-option input:focus-visible + span { outline:3px solid var(--tk-gold); outline-offset:3px; }
@media(max-width:600px) { .avatar-current { align-items:flex-start; }.avatar-current img { width:88px; height:88px; flex-basis:88px; }.avatar-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.avatar-option span { min-height:154px; grid-template-rows:106px auto; }.avatar-option img { width:100px; height:100px; } }
@media(prefers-reduced-motion:reduce) { .avatar-option span { transition:none; } }
