@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&family=Nunito+Sans:wght@700;800;900&display=swap");

:root {
  --navy: #0b3557;
  --navy-deep: #072a46;
  --teal: #0c9294;
  --teal-dark: #087779;
  --aqua: #e9f8f5;
  --gold: #f5b942;
  --cream: #fbfaf6;
  --ink: #193447;
  --muted: #617788;
  --line: #d3e2e4;
  --white: #fff;
  --shadow: 0 22px 65px rgba(7, 42, 70, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: "Manrope", sans-serif; }
body.dialog-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, label, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.skip-link { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { z-index: 100; top: 8px; left: 8px; width: auto; height: auto; padding: 10px 14px; margin: 0; overflow: visible; clip: auto; color: #fff; border-radius: 8px; background: var(--navy); }

.site-header { position: sticky; z-index: 30; top: 0; display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 30px; padding: 13px max(24px, calc((100vw - 1540px) / 2)); border-bottom: 1px solid rgba(11, 53, 87, .1); background: rgba(251, 250, 246, .94); backdrop-filter: blur(15px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); text-decoration: none; }
.brand img { width: 48px; height: 48px; }
.brand span { display: grid; }
.brand strong { font: 900 1.18rem/1 "Nunito Sans", sans-serif; }
.brand small { margin-top: 5px; color: var(--teal-dark); font-size: .65rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.site-header nav { display: flex; align-items: center; gap: 25px; }
.site-header nav a { color: #39556b; font-size: .84rem; font-weight: 800; text-decoration: none; }
.site-header nav a:hover { color: var(--teal-dark); }
.site-header .home-link { padding: 12px 17px; color: #fff; border-radius: 999px; background: var(--navy); }

main { width: min(1540px, calc(100% - 48px)); margin: 0 auto; padding: 48px 0 90px; }
.bridge-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .7fr); gap: 70px; align-items: end; padding: 14px 8px 42px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 17px; color: var(--teal-dark); font-size: .72rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow > span { width: 34px; height: 2px; background: var(--teal-dark); }
.bridge-intro h1 { margin: 0; color: var(--navy); font: 900 clamp(3.4rem, 5.8vw, 6.5rem)/.92 "Nunito Sans", sans-serif; letter-spacing: -.065em; }
.bridge-intro h1 em { color: var(--teal); font-style: normal; }
.intro-copy > p:first-child { margin: 0; color: #4e687a; font-size: 1.05rem; line-height: 1.75; }
.local-note { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; color: var(--teal-dark); font-size: .78rem; font-weight: 800; }
.local-note span { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; color: #fff; border-radius: 50%; background: var(--teal); font-size: .68rem; }

.planner-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 30px; background: #fff; box-shadow: var(--shadow); }
.planner-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 15px 18px; border-bottom: 1px solid var(--line); background: #f6faf9; }
.view-tabs { display: flex; gap: 5px; padding: 4px; border-radius: 15px; background: #e8f1f1; }
.view-tabs button { min-height: 42px; padding: 8px 15px; color: #567081; border: 0; border-radius: 11px; background: transparent; font-size: .77rem; font-weight: 900; }
.view-tabs button span { margin-right: 6px; }
.view-tabs button.is-active { color: #fff; background: var(--navy); box-shadow: 0 7px 18px rgba(7, 42, 70, .15); }
.toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.toolbar-actions button, .backup-upload { display: inline-flex; min-height: 40px; align-items: center; gap: 6px; padding: 8px 11px; color: var(--navy); border: 1px solid #c8dadc; border-radius: 11px; background: #fff; font-size: .68rem; font-weight: 900; }
.toolbar-actions button:hover, .backup-upload:hover { color: var(--teal-dark); border-color: var(--teal); }
.backup-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.save-state { display: flex; align-items: center; gap: 7px; padding: 0 8px; color: var(--teal-dark); font-size: .66rem; font-weight: 800; }
.save-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(12, 146, 148, .1); }
.save-state.is-saving i { background: var(--gold); }

.view-panel { padding: 24px; }
.week-heading { display: grid; grid-template-columns: auto minmax(440px, 1fr); gap: 28px; align-items: end; }
.week-navigation { display: flex; align-items: end; gap: 7px; }
.week-navigation button { min-height: 48px; padding: 0 14px; color: var(--navy); border: 1px solid var(--line); border-radius: 13px; background: #f8fbfb; font-size: .72rem; font-weight: 900; }
.week-navigation button:first-child, .week-navigation button:last-child { width: 48px; padding: 0; font-size: 1rem; }
.week-navigation button:hover { color: #fff; border-color: var(--teal); background: var(--teal); }
.week-navigation label, .week-identity label, .period-controls label { display: grid; gap: 6px; }
.week-navigation label span, .week-identity label span, .period-controls label span { color: #526c7d; font-size: .65rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.week-navigation input, .week-identity input, .period-controls input, .period-controls select { min-height: 48px; padding: 0 13px; color: var(--ink); border: 1px solid var(--line); border-radius: 13px; background: #fbfdfd; outline: 0; }
.week-navigation input:focus, .week-identity input:focus, .period-controls input:focus, .period-controls select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(12, 146, 148, .1); }
.week-identity { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(180px, .45fr); gap: 12px; }

.week-summary { display: grid; grid-template-columns: 1.3fr repeat(3, minmax(120px, .72fr)) minmax(180px, .9fr); gap: 0; overflow: hidden; margin-top: 22px; border: 1px solid var(--line); border-radius: 19px; background: #f8fbfb; }
.week-summary > div { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 15px; border-right: 1px solid var(--line); }
.week-summary > div > span { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; color: var(--teal-dark); border-radius: 11px; background: var(--aqua); font-size: .75rem; font-weight: 900; }
.week-summary p { display: grid; min-width: 0; gap: 2px; margin: 0; }
.week-summary small { color: #718692; font-size: .55rem; font-weight: 900; letter-spacing: .08em; }
.week-summary strong { overflow: hidden; color: var(--navy); font: 900 .84rem/1.2 "Nunito Sans", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.week-summary > button { color: #fff; border: 0; background: var(--teal); font-size: .75rem; font-weight: 900; }
.week-summary > button:hover { background: var(--navy); }
.week-summary > button span { margin-right: 6px; color: var(--gold); font-size: 1rem; }

.week-board { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 10px; overflow-x: auto; padding: 18px 2px 5px; }
.day-column { min-width: 210px; overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: #f7faf9; transition: .16s ease; }
.day-column.is-today { border-color: #8acbc7; box-shadow: 0 0 0 2px rgba(12, 146, 148, .07); }
.day-column.is-drop-target { border-color: var(--gold); background: #fffbeb; transform: translateY(-2px); }
.day-column > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; color: #fff; background: var(--navy); }
.day-column.is-today > header { background: linear-gradient(120deg, var(--teal-dark), var(--teal)); }
.day-column > header div { display: grid; }
.day-column > header small { color: #a7dcd7; font-size: .55rem; font-weight: 900; letter-spacing: .08em; }
.day-column > header strong { margin-top: 3px; font: 900 .92rem/1 "Nunito Sans", sans-serif; }
.day-column > header > span { display: grid; min-width: 28px; height: 28px; padding: 0 7px; place-items: center; color: var(--navy); border-radius: 9px; background: var(--gold); font-size: .62rem; font-weight: 900; }
.day-actions { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); background: #fff; }
.day-actions button { min-height: 34px; padding: 6px 8px; color: var(--teal-dark); border: 1px solid #cce0e1; border-radius: 10px; background: #f8fbfb; font-size: .61rem; font-weight: 900; }
.day-actions button:hover { color: #fff; border-color: var(--teal); background: var(--teal); }
.day-actions button:nth-child(n+2) { width: 34px; padding: 0; color: var(--navy); }
.lesson-list { display: grid; gap: 8px; min-height: 310px; align-content: start; padding: 9px; }
.lesson-empty { display: grid; min-height: 220px; place-content: center; justify-items: center; padding: 22px; color: #8aa0aa; text-align: center; }
.lesson-empty span { display: grid; width: 42px; height: 42px; place-items: center; border: 1px dashed #bfd0d2; border-radius: 14px; background: #fff; font-size: 1.1rem; }
.lesson-empty p { max-width: 150px; margin: 10px 0 0; font-size: .63rem; line-height: 1.5; }

.lesson-card { --lesson: var(--teal); position: relative; overflow: hidden; padding: 11px 10px 10px 14px; border: 1px solid #d2e0e1; border-radius: 14px; background: #fff; box-shadow: 0 5px 13px rgba(11, 53, 87, .05); cursor: grab; }
.lesson-card:active { cursor: grabbing; }
.lesson-card::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--lesson); content: ""; }
.lesson-card[data-color="blue"] { --lesson: #397fbd; }
.lesson-card[data-color="gold"] { --lesson: #e8a51f; }
.lesson-card[data-color="coral"] { --lesson: #dc6e50; }
.lesson-card[data-color="purple"] { --lesson: #7e69bd; }
.lesson-card[data-color="green"] { --lesson: #4a9665; }
.lesson-card[data-color="rose"] { --lesson: #c85f83; }
.lesson-card[data-color="slate"] { --lesson: #688092; }
.lesson-card.is-ready { border-color: color-mix(in srgb, var(--lesson) 45%, #d2e0e1); }
.lesson-card.is-dragging { opacity: .45; }
.lesson-card > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lesson-card-time { color: var(--lesson); font-size: .62rem; font-weight: 900; }
.lesson-card-time span { color: #8798a2; font-weight: 700; }
.lesson-card-menu { width: 27px; height: 27px; padding: 0; color: #6c818e; border: 0; border-radius: 8px; background: #f2f7f6; font-size: .8rem; font-weight: 900; }
.lesson-card-menu:hover { color: #fff; background: var(--navy); }
.lesson-card h3 { margin: 7px 0 3px; color: var(--navy); font: 900 .77rem/1.25 "Nunito Sans", sans-serif; }
.lesson-card p { overflow: hidden; margin: 0; color: #617987; font-size: .58rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.lesson-card footer { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: 9px; }
.lesson-card footer span { padding: 4px 6px; color: #57717e; border-radius: 7px; background: #f0f5f4; font-size: .51rem; font-weight: 800; }
.lesson-card footer div { display: flex; gap: 3px; }
.lesson-card footer button { display: grid; width: 24px; height: 24px; padding: 0; place-items: center; color: #607986; border: 1px solid #d6e3e4; border-radius: 7px; background: #fff; font-size: .58rem; font-weight: 900; }
.lesson-card footer button:hover { color: #fff; border-color: var(--teal); background: var(--teal); }

.week-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; margin-top: 18px; color: #fff; border-radius: 19px; background: linear-gradient(120deg, var(--navy-deep), #0b5268); }
.week-footer div { display: grid; gap: 4px; }
.week-footer strong { font: 900 1rem/1.2 "Nunito Sans", sans-serif; }
.week-footer span { color: #bcd6dc; font-size: .7rem; }
.week-footer button { min-height: 44px; padding: 9px 14px; color: var(--navy); border: 0; border-radius: 12px; background: var(--gold); font-size: .7rem; font-weight: 900; }

.period-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; padding: 8px 4px 26px; }
.period-heading .eyebrow { margin-bottom: 9px; }
.period-heading h2 { margin: 0; color: var(--navy); font: 900 clamp(2rem, 3.2vw, 3.5rem)/1 "Nunito Sans", sans-serif; letter-spacing: -.04em; }
.period-heading p:not(.eyebrow) { max-width: 650px; margin: 10px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.6; }
.period-heading > button { min-height: 47px; padding: 10px 16px; color: #fff; border: 0; border-radius: 13px; background: var(--teal); font-size: .72rem; font-weight: 900; }
.period-controls { display: flex; align-items: end; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: #f7faf9; }
.period-controls input, .period-controls select { min-width: 165px; }
.period-controls p { display: flex; align-items: center; gap: 7px; margin: 0 0 12px auto; color: var(--teal-dark); font-size: .68rem; font-weight: 800; }
.period-controls p span { display: grid; width: 20px; height: 20px; place-items: center; color: #fff; border-radius: 50%; background: var(--teal); font-size: .58rem; }
.period-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 17px; }
.period-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; align-items: center; padding: 17px; text-align: left; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 7px 18px rgba(11, 53, 87, .04); }
.period-card:hover { border-color: var(--teal); transform: translateY(-1px); }
.period-card.is-active { color: #fff; border-color: var(--navy); background: var(--navy); }
.period-card.is-active .period-card-copy small, .period-card.is-active .period-card-copy span { color: #c4dadd; }
.period-card-date { display: grid; width: 49px; height: 49px; place-items: center; color: var(--navy); border-radius: 14px; background: var(--aqua); }
.period-card-date strong { font: 900 1.2rem/1 "Nunito Sans", sans-serif; }
.period-card-date small { margin-top: -7px; font-size: .5rem; font-weight: 900; text-transform: uppercase; }
.period-card.is-active .period-card-date { color: var(--navy); background: var(--gold); }
.period-card-copy { display: grid; min-width: 0; gap: 3px; }
.period-card-copy small { color: var(--teal-dark); font-size: .56rem; font-weight: 900; letter-spacing: .07em; }
.period-card-copy strong { overflow: hidden; color: inherit; font: 900 .82rem/1.25 "Nunito Sans", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.period-card-copy span { color: var(--muted); font-size: .58rem; }
.period-card-progress { grid-column: 1 / -1; height: 5px; overflow: hidden; border-radius: 99px; background: #e7eeee; }
.period-card-progress i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.period-card.is-active .period-card-progress { background: rgba(255, 255, 255, .16); }
.period-card.is-active .period-card-progress i { background: var(--gold); }

dialog { max-width: none; max-height: none; padding: 0; border: 0; background: transparent; }
dialog::backdrop { background: rgba(4, 27, 45, .72); backdrop-filter: blur(7px); }
.sheet-dialog { width: min(900px, calc(100% - 28px)); }
.dialog-shell { overflow: hidden; border: 1px solid rgba(255, 255, 255, .16); border-radius: 26px; background: #fff; box-shadow: 0 30px 100px rgba(0, 0, 0, .28); }
.dialog-shell > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 23px; color: #fff; background: linear-gradient(125deg, var(--navy-deep), #0b5869); }
.dialog-shell > header > div { display: flex; align-items: center; gap: 12px; }
.dialog-shell > header > div > span { display: grid; width: 42px; height: 42px; place-items: center; color: var(--navy); border-radius: 13px; background: var(--gold); font-size: 1rem; font-weight: 900; }
.dialog-shell > header small { color: #a9dedb; font-size: .6rem; font-weight: 900; letter-spacing: .1em; }
.dialog-shell > header h2 { margin: 3px 0 0; font: 900 1.35rem/1.1 "Nunito Sans", sans-serif; }
.dialog-shell > header button { width: 39px; height: 39px; color: #fff; border: 1px solid rgba(255, 255, 255, .24); border-radius: 12px; background: rgba(255, 255, 255, .08); font-size: 1.3rem; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-height: min(64vh, 650px); overflow-y: auto; padding: 23px; }
.form-grid label, .paste-field { display: grid; gap: 7px; }
.form-grid label.wide { grid-column: 1 / -1; }
.form-grid label > span, .paste-field > span { color: #405d70; font-size: .71rem; font-weight: 900; }
.form-grid label > span small { color: #8497a1; font-weight: 700; }
.form-grid input, .form-grid select, .form-grid textarea, .paste-field textarea { width: 100%; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: #fbfdfd; outline: 0; }
.form-grid input, .form-grid select { min-height: 47px; padding: 0 12px; }
.form-grid textarea, .paste-field textarea { padding: 12px; resize: vertical; line-height: 1.5; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .paste-field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(12, 146, 148, .1); }
.dialog-shell > footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 23px; border-top: 1px solid var(--line); background: #f7faf9; }
.dialog-shell > footer > div { display: flex; gap: 8px; }
.dialog-shell > footer button { min-height: 42px; padding: 8px 14px; color: var(--navy); border: 1px solid #cadcdd; border-radius: 11px; background: #fff; font-size: .7rem; font-weight: 900; }
.dialog-shell > footer .primary { color: #fff; border-color: var(--teal); background: var(--teal); }
.dialog-shell > footer .danger { color: #a53b38; border-color: #efc3c1; background: #fff4f3; }

.import-shell { width: min(760px, 100%); margin: auto; }
.import-help { display: flex; gap: 11px; align-items: start; padding: 16px; margin: 22px 22px 0; border: 1px solid #bfe1dc; border-radius: 15px; background: #eef9f7; }
.import-help > span { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; color: #fff; border-radius: 9px; background: var(--teal); font-size: .68rem; font-weight: 900; }
.import-help p { margin: 1px 0 0; color: #466674; font-size: .69rem; line-height: 1.55; }
.file-drop { display: grid; justify-items: center; padding: 25px; margin: 14px 22px; color: var(--teal-dark); border: 2px dashed #a7d3ce; border-radius: 17px; background: #fbfefd; text-align: center; cursor: pointer; }
.file-drop input { position: absolute; opacity: 0; }
.file-drop > span { display: grid; width: 42px; height: 42px; place-items: center; color: #fff; border-radius: 13px; background: var(--teal); font-weight: 900; }
.file-drop strong { margin-top: 9px; font-size: .83rem; }
.file-drop small { margin-top: 4px; color: #718894; font-size: .61rem; }
.file-drop.is-loaded { border-style: solid; border-color: var(--teal); background: var(--aqua); }
.import-divider { display: flex; align-items: center; gap: 12px; margin: 0 22px; color: #8a9ca5; font-size: .58rem; font-weight: 900; text-transform: uppercase; }
.import-divider::before, .import-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.paste-field { margin: 14px 22px 0; }
.import-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 13px 22px 0; }
.import-actions button { min-height: 38px; padding: 7px 11px; color: var(--navy); border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: .65rem; font-weight: 900; }
.import-actions label { display: flex; align-items: center; gap: 7px; color: #5e7481; font-size: .64rem; font-weight: 800; }
.import-actions input { accent-color: var(--teal); }
.dialog-status { min-height: 20px; margin: 12px 22px; color: var(--teal-dark); font-size: .68rem; font-weight: 800; }
.dialog-status.is-error { color: #b24642; }

.repeat-shell { width: min(690px, 100%); margin: auto; }
.dialog-lead { margin: 20px 22px 0; color: #5a7180; font-size: .76rem; line-height: 1.55; }
.repeat-shell .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 10px; }
.copy-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 22px; margin: 4px 0 0; border: 0; }
.copy-mode legend { margin-bottom: 8px; color: #405d70; font-size: .71rem; font-weight: 900; }
.copy-mode label { cursor: pointer; }
.copy-mode input { position: absolute; opacity: 0; }
.copy-mode span { display: grid; min-height: 86px; align-content: center; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fbfdfd; }
.copy-mode strong { color: var(--navy); font-size: .73rem; }
.copy-mode small { margin-top: 4px; color: var(--muted); font-size: .61rem; line-height: 1.45; }
.copy-mode input:checked + span { border-color: var(--teal); background: var(--aqua); box-shadow: 0 0 0 2px rgba(12, 146, 148, .08); }
.replace-choice { display: flex; align-items: start; gap: 10px; padding: 14px; margin: 14px 22px 0; border-radius: 13px; background: #fff8e6; }
.replace-choice input { margin-top: 3px; accent-color: var(--teal); }
.replace-choice span { display: grid; }
.replace-choice strong { color: var(--navy); font-size: .7rem; }
.replace-choice small { margin-top: 3px; color: #746e5e; font-size: .59rem; }

.student-dialog { width: 100vw; height: 100vh; }
.student-shell { display: grid; width: 100%; height: 100%; grid-template-rows: auto 1fr auto; color: #fff; background: linear-gradient(145deg, #061f35, #0a3b59 58%, #087576); }
.student-shell > header { display: grid; grid-template-columns: 1fr auto 52px; gap: 25px; align-items: center; padding: 20px 28px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.student-brand { display: flex; align-items: center; gap: 13px; }
.student-brand > span { display: grid; width: 48px; height: 48px; place-items: center; color: var(--navy); border-radius: 15px; background: var(--gold); font-size: 1.1rem; font-weight: 900; }
.student-brand div { display: grid; }
.student-brand small, .live-clock small { color: #a5deda; font-size: .64rem; font-weight: 900; letter-spacing: .1em; }
.student-brand strong { margin-top: 3px; font: 900 1.25rem/1.1 "Nunito Sans", sans-serif; }
.live-clock { display: grid; justify-items: end; }
.live-clock strong { color: var(--gold); font: 900 1.8rem/1 "Nunito Sans", sans-serif; }
.student-shell > header > button { width: 45px; height: 45px; color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 14px; background: rgba(255, 255, 255, .08); font-size: 1.4rem; }
.student-shell > main { display: grid; min-height: 0; grid-template-columns: minmax(250px, .28fr) minmax(0, 1fr); }
.student-shell > main > aside { overflow-y: auto; padding: 22px; border-right: 1px solid rgba(255, 255, 255, .13); background: rgba(2, 22, 37, .28); }
.student-shell > main > aside > small { color: #9cdad5; font-size: .61rem; font-weight: 900; letter-spacing: .12em; }
#student-agenda { display: grid; gap: 8px; margin-top: 13px; }
#student-agenda button { display: grid; grid-template-columns: 48px minmax(0, 1fr) 25px; gap: 10px; align-items: center; padding: 12px; color: #fff; text-align: left; border: 1px solid rgba(255, 255, 255, .14); border-radius: 13px; background: rgba(255, 255, 255, .06); }
#student-agenda button > span { color: var(--gold); font-size: .68rem; font-weight: 900; }
#student-agenda button div { display: grid; min-width: 0; }
#student-agenda button strong { overflow: hidden; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
#student-agenda button small { overflow: hidden; margin-top: 3px; color: #aac6ce; font-size: .55rem; text-overflow: ellipsis; white-space: nowrap; }
#student-agenda button i { display: grid; width: 24px; height: 24px; place-items: center; color: #9fcacb; border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; font-size: .55rem; font-style: normal; }
#student-agenda button.is-active { color: var(--navy); border-color: var(--gold); background: var(--gold); }
#student-agenda button.is-active > span, #student-agenda button.is-active small { color: #516672; }
#student-agenda button.is-active i { color: #fff; border-color: var(--teal); background: var(--teal); }
.student-focus { display: grid; min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(260px, .38fr); gap: 25px; align-items: center; padding: clamp(28px, 5vw, 70px); }
.student-focus-copy > p:first-child { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: #a7e2dc; font-size: .68rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.student-focus-copy > p:first-child::before { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); content: ""; }
.student-focus h2 { max-width: 850px; margin: 15px 0; color: #fff; font: 900 clamp(2.6rem, 5vw, 5.7rem)/.98 "Nunito Sans", sans-serif; letter-spacing: -.055em; }
.student-goal { max-width: 820px; padding: 18px 20px; border-left: 4px solid var(--gold); border-radius: 0 15px 15px 0; background: rgba(255, 255, 255, .08); }
.student-goal small, .student-notes small { color: var(--gold); font-size: .58rem; font-weight: 900; letter-spacing: .1em; }
.student-goal p { margin: 6px 0 0; color: #e3eff1; font-size: clamp(.95rem, 1.35vw, 1.25rem); line-height: 1.55; }
.student-notes { margin-top: 17px; }
.student-notes p { margin: 5px 0 0; color: #c4d9dd; font-size: .84rem; line-height: 1.6; white-space: pre-line; }
.student-side-card { overflow: hidden; border: 1px solid rgba(255, 255, 255, .17); border-radius: 23px; background: rgba(255, 255, 255, .08); }
.student-side-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.student-side-card > header div { display: grid; gap: 4px; }
.student-side-card > header small { color: #9edcd7; font-size: .57rem; font-weight: 900; }
.student-side-card > header select { min-height: 35px; padding: 0 9px; color: var(--navy); border: 0; border-radius: 9px; background: var(--gold); font-size: .65rem; font-weight: 900; }
.student-timer { display: grid; justify-items: center; padding: 25px 18px; }
.student-timer > small { color: #a5ced2; font-size: .58rem; font-weight: 900; letter-spacing: .1em; }
.student-timer > strong { margin-top: 5px; color: var(--gold); font: 900 clamp(3.2rem, 5vw, 5.5rem)/1 "Nunito Sans", sans-serif; letter-spacing: -.06em; }
.student-timer-track { width: 100%; height: 7px; overflow: hidden; margin-top: 17px; border-radius: 99px; background: rgba(255, 255, 255, .13); }
.student-timer-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--gold); }
.student-timer div:last-child { display: flex; width: 100%; gap: 7px; margin-top: 15px; }
.student-timer button { min-height: 42px; flex: 1; color: #fff; border: 1px solid rgba(255, 255, 255, .2); border-radius: 11px; background: rgba(255, 255, 255, .08); font-size: .67rem; font-weight: 900; }
.student-timer button:first-child { color: var(--navy); border-color: var(--gold); background: var(--gold); }
.student-route { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 15px 18px; color: #fff; border-top: 1px solid rgba(255, 255, 255, .14); text-decoration: none; }
.student-route span { display: grid; }
.student-route small { color: #9fd5d2; font-size: .54rem; font-weight: 900; }
.student-route strong { margin-top: 3px; font-size: .69rem; }
.student-route b { color: var(--gold); font-size: 1rem; }
.student-route.is-empty { opacity: .62; pointer-events: none; }
.student-shell > footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 28px; border-top: 1px solid rgba(255, 255, 255, .14); background: rgba(2, 21, 36, .25); }
.student-shell > footer p { margin: 0; color: #abc8cf; font-size: .62rem; }
.student-shell > footer button { min-height: 42px; padding: 8px 15px; color: #fff; border: 1px solid rgba(255, 255, 255, .2); border-radius: 11px; background: rgba(255, 255, 255, .08); font-size: .68rem; font-weight: 900; }
.student-shell > footer button:disabled { opacity: .35; cursor: default; }

.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: min(390px, calc(100% - 48px)); padding: 14px 17px; color: #fff; border-radius: 13px; background: var(--navy); box-shadow: 0 16px 45px rgba(4, 27, 45, .24); font-size: .72rem; font-weight: 800; }
.toast.is-error { background: #a3433f; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 24px max(24px, calc((100vw - 1540px) / 2)); color: #77909d; border-top: 1px solid var(--line); background: #fff; font-size: .64rem; }

@media (max-width: 1180px) {
  .week-heading { grid-template-columns: 1fr; }
  .week-summary { grid-template-columns: repeat(4, 1fr); }
  .week-summary > div:nth-child(4) { border-right: 0; }
  .week-summary > button { grid-column: 1 / -1; min-height: 49px; }
  .period-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-focus { grid-template-columns: 1fr; align-content: start; overflow-y: auto; }
  .student-side-card { max-width: 650px; }
}

@media (max-width: 840px) {
  .site-header nav a:not(.home-link) { display: none; }
  main { width: min(100% - 24px, 1540px); padding-top: 28px; }
  .bridge-intro { grid-template-columns: 1fr; gap: 20px; padding-bottom: 30px; }
  .bridge-intro h1 { font-size: clamp(2.9rem, 12vw, 5rem); }
  .intro-copy { max-width: 650px; }
  .planner-toolbar { align-items: start; }
  .toolbar-actions { max-width: 430px; }
  .save-state { width: 100%; justify-content: flex-end; }
  .view-panel { padding: 17px; }
  .week-identity { grid-template-columns: 1fr; }
  .week-summary { grid-template-columns: repeat(2, 1fr); }
  .week-summary > div:nth-child(2) { border-right: 0; }
  .week-summary > div:nth-child(3), .week-summary > div:nth-child(4) { border-top: 1px solid var(--line); }
  .week-summary > div:nth-child(4) { border-right: 0; }
  .period-heading { align-items: start; flex-direction: column; gap: 18px; }
  .period-controls { align-items: stretch; flex-direction: column; }
  .period-controls p { margin: 5px 0 0; }
  .period-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-shell > main { grid-template-columns: 1fr; overflow: hidden; }
  .student-shell > main > aside { max-height: 170px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .13); }
  #student-agenda { display: flex; overflow-x: auto; }
  #student-agenda button { min-width: 220px; }
  .student-focus { padding: 25px; }
  .student-focus h2 { font-size: clamp(2.2rem, 8vw, 4rem); }
}

@media (max-width: 600px) {
  .site-header { min-height: 70px; padding: 10px 14px; }
  .brand img { width: 42px; height: 42px; }
  .site-header .home-link { padding: 10px 13px; font-size: .7rem; }
  main { width: min(100% - 16px, 1540px); padding-top: 22px; }
  .bridge-intro { padding-inline: 4px; }
  .bridge-intro h1 { font-size: 2.7rem; }
  .intro-copy > p:first-child { font-size: .9rem; }
  .planner-shell { border-radius: 22px; }
  .planner-toolbar { flex-direction: column; }
  .view-tabs, .toolbar-actions { width: 100%; }
  .view-tabs button { flex: 1; }
  .toolbar-actions { justify-content: start; }
  .save-state { justify-content: start; }
  .view-panel { padding: 12px; }
  .week-navigation { display: grid; grid-template-columns: 42px 1fr 42px; }
  .week-navigation label { grid-column: 2; grid-row: 1; }
  .week-navigation button:first-child { grid-column: 1; grid-row: 1; width: 42px; }
  .week-navigation button:last-child { grid-column: 3; grid-row: 1; width: 42px; }
  #current-week { grid-column: 1 / -1; }
  .week-summary { grid-template-columns: 1fr; }
  .week-summary > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .week-summary > div:nth-child(3), .week-summary > div:nth-child(4) { border-top: 0; }
  .week-footer { align-items: stretch; flex-direction: column; }
  .week-footer button { width: 100%; }
  .dialog-shell { border-radius: 20px; }
  .form-grid, .repeat-shell .form-grid { grid-template-columns: 1fr; }
  .form-grid label.wide { grid-column: auto; }
  .copy-mode { grid-template-columns: 1fr; }
  .dialog-shell > footer { align-items: stretch; flex-direction: column; }
  .dialog-shell > footer > div { width: 100%; }
  .dialog-shell > footer button { flex: 1; }
  .student-shell > header { grid-template-columns: 1fr auto; gap: 12px; padding: 13px; }
  .student-brand > span { width: 40px; height: 40px; }
  .student-brand strong { font-size: .95rem; }
  .live-clock { display: none; }
  .student-shell > header > button { width: 40px; height: 40px; }
  .student-shell > main > aside { padding: 13px; }
  .student-focus { gap: 16px; padding: 19px; }
  .student-focus h2 { margin-block: 10px; }
  .student-shell > footer { padding: 11px 13px; }
  .student-shell > footer p { display: none; }
  .site-footer { align-items: start; flex-direction: column; }
}

@media print {
  @page { size: landscape; margin: 10mm; }
  body { background: #fff; }
  .site-header, .bridge-intro, .planner-toolbar, .week-navigation button, .week-summary > button, .day-actions, .week-footer, .site-footer, .toast { display: none !important; }
  main { width: 100%; padding: 0; }
  .planner-shell { overflow: visible; border: 0; box-shadow: none; }
  .view-panel { padding: 0; }
  .week-heading { grid-template-columns: 1fr; }
  .week-summary { margin-top: 12px; }
  .week-board { grid-template-columns: repeat(5, 1fr); overflow: visible; gap: 5px; padding-top: 12px; }
  .day-column { min-width: 0; break-inside: avoid; }
  .lesson-list { min-height: 0; padding: 5px; }
  .lesson-card { padding: 7px 6px 7px 9px; box-shadow: none; }
  .lesson-card-menu, .lesson-card footer div { display: none; }
  .lesson-card h3 { font-size: .64rem; }
  .lesson-card p { font-size: .5rem; white-space: normal; }
  .period-grid { grid-template-columns: repeat(4, 1fr); }
}
