/* Shared mobile geometry and controls. Safe areas are applied once at each surface. */
:root{--app-safe-top:env(safe-area-inset-top,0px);--app-safe-bottom:env(safe-area-inset-bottom,0px);--app-safe-left:env(safe-area-inset-left,0px);--app-safe-right:env(safe-area-inset-right,0px)}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:calc(12px + var(--app-safe-top));}
body{font-family:Arial,Helvetica,sans-serif;}
body>.container{padding-top:calc(20px + var(--app-safe-top));padding-bottom:calc(24px + var(--app-safe-bottom));padding-left:max(20px,var(--app-safe-left));padding-right:max(20px,var(--app-safe-right));}
body.shortcuts-available>.container{padding-bottom:calc(100px + var(--app-safe-bottom));}
button,input,select,textarea{box-sizing:border-box;font-family:inherit;min-width:0;}
button,input,select,textarea,summary{-webkit-tap-highlight-color:transparent;}
button,input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea{-webkit-appearance:none;appearance:none;}
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=file]),textarea{max-width:100%;font-size:16px;line-height:1.35;min-height:44px;}
input:disabled,textarea:disabled{-webkit-text-fill-color:currentColor;}
input[type=checkbox],input[type=radio]{-webkit-appearance:none;appearance:none;display:inline-grid!important;place-items:center;width:21px!important;height:21px!important;min-width:21px;min-height:21px;padding:0!important;flex-shrink:0;vertical-align:middle;border:2px solid var(--app-muted,#66758a)!important;background:var(--app-surface,#fff)!important;border-radius:5px;cursor:pointer;}
input[type=checkbox]:checked,input[type=radio]:checked{border-color:var(--app-accent,#2563eb)!important;background:var(--app-accent,#2563eb)!important;}
input[type=checkbox]:checked::after{content:'✓';font-family:Arial,sans-serif;font-size:16px;line-height:1;color:var(--app-accent-ink,#fff);font-weight:700;}
input[type=radio]{border-radius:50%;}input[type=radio]:checked::after{content:'';display:block;width:7px;height:7px;border-radius:50%;background:var(--app-accent-ink,#fff);}
input[type=checkbox]:focus-visible,input[type=radio]:focus-visible{outline:3px solid var(--app-accent,#2563eb);outline-offset:3px;}
input[type=checkbox]:disabled,input[type=radio]:disabled{opacity:.5;cursor:default;}
.study-range-row>div,.tc-time-row>label,.wb-time-grid>label,.mp-fields>label{min-width:0;}
.study-range-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;}
.tc-time-row,.wb-time-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
.ai-period-options{grid-template-columns:repeat(3,minmax(0,1fr));}.ai-period-options label{min-width:0;flex-wrap:wrap;box-sizing:border-box;}
@media(max-width:600px){.study-range-row{grid-template-columns:repeat(2,minmax(0,1fr));}.study-range-row .study-range-delete{grid-column:1/-1;min-height:44px;}.study-time-card{padding:18px;}.wb-tabs-sticky{top:var(--app-safe-top);}}
body :is(.pv-modal,.wb-modal,.app-message-overlay,.resource-support-overlay){padding-top:calc(14px + var(--app-safe-top));padding-bottom:calc(14px + var(--app-safe-bottom));padding-left:max(14px,var(--app-safe-left));padding-right:max(14px,var(--app-safe-right));}
body .tc-modal{padding-top:calc(14px + var(--app-safe-top));padding-bottom:calc(14px + var(--app-safe-bottom));padding-left:max(14px,var(--app-safe-left));padding-right:max(14px,var(--app-safe-right));}
body .pv-x{top:calc(12px + var(--app-safe-top));right:calc(12px + var(--app-safe-right));}
body #adminTestOverlay .admin-test-toolbar{padding-top:calc(10px + var(--app-safe-top));padding-left:max(14px,var(--app-safe-left));padding-right:max(14px,var(--app-safe-right));}
body .es-overlay .es-sheet{max-width:calc(100% - 24px);}
body .book-track-message{font-size:13px;line-height:1.5;margin:10px 0;color:var(--app-muted,#536780);}
body .book-track-message button{margin-top:8px;min-height:44px;font-size:14px;}
/* Keep the real input available to FormData, validity, min/max/step and legacy handlers. */
body input.fp-native{position:absolute!important;width:1px!important;height:1px!important;min-width:0!important;min-height:0!important;max-width:1px!important;opacity:0!important;clip-path:inset(50%)!important;overflow:hidden!important;pointer-events:none!important;padding:0!important;border:0!important;margin:0!important;}
body button.fp-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0;min-height:48px;max-width:100%;padding:12px 13px;margin:0;border:1px solid var(--app-edge,#d1d5db);border-radius:12px;background:var(--app-surface,#fff);color:var(--app-ink,#1f2937);font-size:16px;font-weight:400;line-height:1.35;text-align:left;font-variant-numeric:tabular-nums;}
body button.fp-trigger>span:first-child{min-width:0;overflow-wrap:anywhere;}body .fp-trigger .fp-icon{flex:0 0 20px;text-align:right;font-size:19px;color:var(--app-muted,#64748b);}
body button.fp-trigger[hidden]{display:none!important;}body button.fp-trigger:disabled{opacity:.55;cursor:default;}body .fp-placeholder{color:var(--app-muted,#64748b)!important;}
body .tc-dialog .fp-trigger{margin-top:8px;color:var(--tc-ink,var(--app-ink,#1f2937));background:var(--tc-page,var(--app-surface,#fff));border-color:var(--tc-line,var(--app-edge,#d1d5db));font-size:15px;}
body .fp-overlay{position:fixed;left:0;right:0;top:var(--fp-top,0px);height:var(--fp-height,100dvh);z-index:1000000;display:flex;align-items:center;justify-content:center;padding:calc(12px + var(--app-safe-top)) max(12px,var(--app-safe-right)) calc(12px + var(--app-safe-bottom)) max(12px,var(--app-safe-left));background:#07101e66;overscroll-behavior:contain;box-sizing:border-box;}
body .fp-sheet{display:flex;flex-direction:column;min-width:0;width:100%;max-width:430px;max-height:100%;padding:18px;border:1px solid var(--app-edge,#d1d5db);border-radius:22px;background:var(--app-surface,#fff);color:var(--app-ink,#1f2937);box-shadow:0 18px 65px #0004;}
body .fp-sheet header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;margin-bottom:14px;}body .fp-sheet h2{font-size:20px;line-height:1.3;margin:0;overflow-wrap:anywhere;}
body .fp-sheet button.fp-close{width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:0;border-radius:50%;background:var(--app-page,#eef2ff);color:inherit;font-size:26px;}
body .fp-body{min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
body .fp-time-columns{display:flex;gap:12px;margin:4px 0;}body .fp-time-columns>div{flex:1;min-width:0;text-align:center;}body .fp-time-columns strong{display:block;font-size:13px;margin-bottom:8px;color:var(--app-muted,#64748b);}
body .fp-time-list{position:relative;max-height:220px;overflow:auto;scroll-padding:80px;overscroll-behavior:contain;border:1px solid var(--app-edge,#d1d5db);border-radius:14px;-webkit-overflow-scrolling:touch;}
body .fp-time-list button{display:block;width:100%;min-height:44px;padding:10px;margin:0;border:0;border-radius:0;background:transparent;color:inherit;font-size:20px;font-variant-numeric:tabular-nums;}
body .fp-time-list button[aria-selected=true],body .fp-calendar-grid button[aria-pressed=true]{background:var(--app-accent,#2563eb);color:var(--app-accent-ink,#fff);font-weight:700;}
body .fp-message{font-size:13px;line-height:1.4;color:var(--app-danger,#b42332);margin:8px 0;flex-shrink:0;}body .fp-message:empty{margin:4px 0;}
body .fp-sheet footer{display:flex;gap:8px;flex-shrink:0;margin-top:10px;}body .fp-sheet footer button{flex:1;min-width:0;min-height:44px;margin:0;padding:10px 8px;font-size:13px;line-height:1.3;}
body .fp-sheet .fp-save{background:var(--app-accent,#2563eb);color:var(--app-accent-ink,#fff);}body .fp-sheet .secondary{background:var(--app-page,#eef2ff);color:var(--app-ink,#1f2937);}body .fp-sheet [hidden]{display:none!important;}
body .fp-calendar-nav{display:grid;grid-template-columns:44px minmax(0,1fr) minmax(0,1fr) 44px;align-items:center;gap:5px;margin-bottom:12px;}
body .fp-calendar-nav>button{width:44px;min-height:44px;padding:0;margin:0;background:var(--app-page,#eef2ff);color:inherit;font-size:25px;}body .fp-calendar-nav .es-trigger{padding:9px 7px;min-height:44px;margin:0;font-size:13px;gap:4px;}
body .fp-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;margin-bottom:12px;}body .fp-calendar-grid small{text-align:center;font-size:12px;padding:8px 0;color:var(--app-muted,#64748b);}body .fp-calendar-grid button{min-width:0;width:100%;min-height:40px;padding:8px 0;margin:0;background:transparent;color:inherit;font-size:14px;border-radius:9px;}
@media(max-height:520px){body .fp-sheet{padding:12px;}body .fp-time-list{max-height:132px;}body .fp-sheet header{margin-bottom:6px;}}

/* Restore the original device date/calendar UI. The common time picker remains. */
body input[type=date],body input[type=datetime-local]{-webkit-appearance:auto;appearance:auto;min-width:0;width:100%;}

/* The manual planner header must reserve a readable date column before its range. */
body .studio-week-nav{display:grid;grid-template-columns:36px minmax(0,1fr) 36px;width:100%;min-width:0;gap:8px;}
body .studio-week-nav>.studio-start-label{grid-column:2;grid-row:1;display:block;min-width:0;margin:0;}
body .studio-week-nav>.studio-start-label input{display:block;width:100%;min-width:0;max-width:100%;margin-top:5px;}
body .studio-week-nav>span{grid-column:2;grid-row:2;text-align:center;min-width:0;overflow-wrap:normal;}
body .studio-week-nav>button:first-child{grid-column:1;grid-row:1 / span 2;}
body .studio-week-nav>button:last-child{grid-column:3;grid-row:1 / span 2;}

/* Application-owned Material-style 24-hour dial; themes cannot turn all numbers into filled buttons. */
body .fp-overlay .fp-sheet{--fp-clock-face:var(--app-page,#edf1f7);--fp-clock-accent:var(--app-accent,#2563eb);--fp-clock-on-accent:var(--app-accent-ink,#fff);}
body .fp-overlay .fp-sheet .fp-clock{width:100%;min-width:0;}
body .fp-overlay .fp-sheet .fp-clock-display{display:flex;align-items:center;justify-content:center;gap:5px;margin:0 0 4px;color:var(--app-muted,#64748b);font-variant-numeric:tabular-nums;}
body .fp-overlay .fp-sheet button.fp-clock-part{width:auto!important;min-width:66px!important;min-height:54px!important;padding:4px 8px!important;margin:0!important;border:0!important;border-radius:12px!important;background:transparent!important;color:var(--app-muted,#64748b)!important;font:400 38px/1.2 Arial,sans-serif!important;box-shadow:none!important;}
body .fp-overlay .fp-sheet button.fp-clock-part[aria-pressed=true]{background:var(--fp-clock-face)!important;color:var(--app-ink,#1f2937)!important;}
body .fp-overlay .fp-sheet .fp-clock-display>span{font-size:28px;line-height:1;}
body .fp-overlay .fp-sheet .fp-clock-instruction{text-align:center;font-size:12px!important;line-height:1.4;margin:4px 0 10px;color:var(--app-muted,#64748b);}
body .fp-overlay .fp-sheet .fp-dial{position:relative;width:min(100%,280px);aspect-ratio:1;margin:0 auto;flex-shrink:0;touch-action:none;border-radius:50%;background:var(--fp-clock-face);color:var(--app-ink,#1f2937);user-select:none;-webkit-user-select:none;overflow:visible;}
body .fp-overlay .fp-sheet .fp-clock-hand{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;}
body .fp-overlay .fp-sheet .fp-clock-hand line{stroke:var(--fp-clock-accent);stroke-width:.9;}
body .fp-overlay .fp-sheet .fp-clock-hand circle{fill:var(--fp-clock-accent);}
body .fp-overlay .fp-sheet button.fp-dial-number{position:absolute;transform:translate(-50%,-50%);width:40px!important;min-width:0!important;max-width:none!important;height:40px!important;min-height:0!important;padding:0!important;margin:0!important;display:flex!important;align-items:center;justify-content:center;border:0!important;border-radius:50%!important;background:transparent!important;color:inherit!important;box-shadow:none!important;font:400 17px/1 Arial,sans-serif!important;touch-action:none;}
body .fp-overlay .fp-sheet button.fp-dial-inner{width:32px!important;height:32px!important;font-size:14px!important;}
body .fp-overlay .fp-sheet button.fp-dial-number[aria-pressed=true]{color:var(--fp-clock-on-accent)!important;font-weight:700!important;}
body .fp-overlay .fp-sheet .fp-dial:focus-visible,body .fp-overlay .fp-sheet button.fp-dial-number:focus-visible{outline:2px solid var(--fp-clock-accent);outline-offset:2px;}
body .fp-overlay .fp-sheet button.fp-keyboard-toggle{display:block;width:auto!important;min-height:40px!important;max-width:100%;padding:8px 12px!important;margin:8px auto 0!important;border:0!important;border-radius:10px!important;background:transparent!important;color:var(--app-ink,#1f2937)!important;font-size:13px!important;box-shadow:none!important;}
body .fp-overlay .fp-sheet .fp-clock-fields{display:flex;gap:10px;margin:12px 0;}
body .fp-overlay .fp-sheet .fp-clock-fields label{flex:1;min-width:0;margin:0;font-size:13px;}
body .fp-overlay .fp-sheet .fp-clock-fields input{width:100%;min-width:0;min-height:48px;font-size:22px;text-align:center;}
body .fp-overlay .fp-sheet footer button{border:0!important;border-radius:12px!important;box-shadow:none!important;}
body .fp-overlay .fp-sheet footer .fp-save{background:var(--fp-clock-accent)!important;color:var(--fp-clock-on-accent)!important;}
body .fp-overlay .fp-sheet footer .secondary{background:var(--fp-clock-face)!important;color:var(--app-ink,#1f2937)!important;}
body .fp-overlay .fp-sheet button.fp-close{background:var(--fp-clock-face)!important;color:var(--app-ink,#1f2937)!important;}
body input[type=date],body input[type=datetime-local],body input[type=month]{font-variant-numeric:tabular-nums;white-space:nowrap;line-height:1.35;min-width:0;max-width:100%;}
body input[type=date]::-webkit-datetime-edit,body input[type=datetime-local]::-webkit-datetime-edit,body input[type=month]::-webkit-datetime-edit{min-width:0;padding:0;text-align:left;}
@media(max-width:360px){body .fp-overlay .fp-sheet{padding:14px;}body .fp-overlay .fp-sheet button.fp-dial-number{width:36px!important;height:36px!important;font-size:16px!important;}body .fp-overlay .fp-sheet button.fp-dial-inner{width:29px!important;height:29px!important;font-size:13px!important;}}
@media(max-height:520px){body .fp-overlay .fp-sheet .fp-dial{width:min(100%,210px);}body .fp-overlay .fp-sheet .fp-clock-instruction{margin:2px 0 6px;}body .fp-overlay .fp-sheet button.fp-clock-part{min-height:44px!important;font-size:30px!important;}body .fp-overlay .fp-sheet button.fp-dial-number{width:30px!important;height:30px!important;font-size:15px!important;}body .fp-overlay .fp-sheet button.fp-dial-inner{width:25px!important;height:25px!important;font-size:12px!important;}}
