/* Generated from the shared phone flow foundation; tablet refinements follow. */
html.tablet-portrait {

  /* The persistent header is shared by every route. Admin is desktop-only. */
  body > .site-header .admin-button,
  body > .site-header .mobile-nav a:is([href="iida"], [href="iida.html"], [href="/iida"], [href="/iida.html"]) {
    display: none !important;
  }

  body.booking-page {
    --phone-gutter: clamp(20px, 5.6vw, 24px);
    --page-gutter: var(--phone-gutter);
    --header-height: calc(68px + env(safe-area-inset-top));
    --frame-width: calc(100% - 2 * var(--phone-gutter));
    --workspace-gap: 14px;
    --copy-size: 14px;
    overflow-x: clip;
  }
  body.booking-page > .site-header {
    inset: 0 0 auto;
    height: var(--header-height);
    gap: 16px;
    padding: env(safe-area-inset-top) var(--phone-gutter) 0;
    background: rgba(255, 248, 238, .5);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  body.booking-page > .site-header .wordmark {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    max-width: calc(100% - 60px);
    font-size: 26px;
    white-space: nowrap;
    overflow-wrap: normal;
  }
  body.booking-page > .site-header .desktop-nav { display: none; }
  body.booking-page > .site-header .menu-toggle { display: flex; width: 46px; height: 46px; }
  body.booking-page > .site-header .mobile-nav {
    inset-inline: var(--phone-gutter);
    top: calc(100% + 8px);
    max-height: calc(100dvh - var(--header-height) - 24px);
    padding: 12px 20px;
    gap: 0;
  }
  body.booking-page > .site-header .mobile-nav:not([hidden]) { display: flex; }
  body.booking-page > .site-header .mobile-nav a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding-block: 10px;
    font-size: 16px;
    line-height: 1.4;
  }

  body.booking-page .workspace-shell {
    display: block;
    width: var(--frame-width);
    height: auto;
    min-height: calc(100svh - 140px);
    margin-inline: auto;
    padding: calc(var(--header-height) + 28px) 0 12px;
    overflow: visible;
  }
  body.booking-page .workspace-heading { margin: 0 0 26px; }
  body.booking-page .workspace-heading h1 {
    font-size: clamp(32px, 9vw, 38px);
    line-height: 1.04;
    letter-spacing: -.045em;
    text-wrap: balance;
  }
  body.booking-page .workspace-heading p { margin-top: 14px; font-size: 14px; line-height: 1.55; }
  body.booking-page .booking-workspace { border-top: 0; min-height: 0; }
  body.booking-page .booking-toolbar { min-height: 44px; padding: 0; margin: -8px 0 18px; }
  body.booking-page .booking-view { flex: none; min-height: 0; gap: 14px; justify-content: flex-start; }
  body.booking-page .booking-view--format { gap: 14px; }
  /* All five cards share one price track sized by the actual price text. */
  body.booking-page .booking-view:has(> .format-grid) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    column-gap: 12px;
  }

  body.booking-page .format-grid {
    --card-scale: 1;
    --copy-size: 14px;
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    grid-auto-rows: 1fr;
    gap: 14px 12px;
  }
  body.booking-page .format-card {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    grid-template-rows: auto 1fr auto;
    height: auto;
    min-height: 0;
    padding: 16px;
    gap: 10px 12px;
    border-radius: 16px;
  }
  body.booking-page .format-card .lesson-title {
    grid-column: 1 / -1;
    min-height: 0;
    font-size: 24px;
    line-height: 1.08;
    white-space: normal;
  }
  body.booking-page .format-card .lesson-title br { display: none; }
  body.booking-page .format-card .lesson-description { grid-column: 1 / -1; align-self: start; font-size: 14px; line-height: 1.55; font-weight: 300; }
  body.booking-page .format-bottom,
  body.booking-page .format-bottom > span:first-child { display: contents; }
  body.booking-page .format-bottom .lesson-price { grid-column: 2; grid-row: 3; align-self: end; font-size: 15px; white-space: nowrap; }
  body.booking-page .format-bottom .lesson-price small { font-size: 12px; }
  body.booking-page .format-bottom > span > small { grid-column: 1; grid-row: 3; align-self: end; margin: 0; font-size: 12px; }
  body.booking-page .format-arrow { grid-column: 2; grid-row: 3; align-self: end; justify-self: end; font-size: 22px; line-height: 1; }
  body.booking-page .booking-view > .yki-block {
    display: grid;
    grid-column: 1 / -1;
    grid-row: auto;
    grid-template-columns: subgrid;
    align-items: stretch;
    height: auto;
    min-height: 0;
    padding: 16px;
    border: 1px solid transparent;
    gap: 10px 12px;
    border-radius: 16px;
  }
  body.booking-page .booking-view > .yki-block .yki-heading { grid-column: 1 / -1; padding: 0; font-size: 24px; line-height: 1.08; }
  body.booking-page .booking-view > .yki-block .yki-details,
  body.booking-page .booking-view > .yki-block .yki-overview { display: contents; }
  body.booking-page .booking-view > .yki-block .yki-description { grid-column: 1 / -1; font-size: 14px; line-height: 1.55; }
  body.booking-page .booking-view > .yki-block .yki-price { display: block; grid-column: 2; grid-row: 3; align-self: end; justify-self: start; margin: 0; padding: 0; border: 0; font-size: 15px; text-align: left; }

  body.booking-page :is(.step-heading h2, .calendar-heading h2, .booking-success-content h2) {
    font-size: 28px;
    line-height: 1.08;
    letter-spacing: -.035em;
  }
  body.booking-page :is(.step-heading p, .calendar-heading p, .booking-success-content p) { margin-top: 10px; font-size: 14px; line-height: 1.55; }
  body.booking-page .schedule-options { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 8px; }
  body.booking-page .schedule-option { position: relative; padding: 18px; border: 1px solid #fff; border-radius: 16px; }
  body.booking-page .schedule-option .format-kicker { font-size: 12px; }
  body.booking-page .schedule-option h3 { margin: 10px 0; font-size: 24px; }
  body.booking-page .schedule-option p { font-size: 14px; line-height: 1.55; max-width: none; padding-right: 20px; }
  body.booking-page .schedule-option > span:last-child { position: absolute; right: 18px; bottom: 16px; margin: 0; font-size: 22px; }

  body.booking-page .calendar-heading { flex-direction: column; align-items: stretch; gap: 18px; }
  body.booking-page .week-navigation { justify-content: space-between; gap: 12px; }
  body.booking-page .week-navigation button { width: 44px; height: 44px; }
  body.booking-page .week-navigation > span { font-size: 14px; }
  body.booking-page .week-navigation small { margin-top: 3px; }
  /* Keep the whole week's availability visible, using the desktop calendar's
     same rows, slots and selection behavior inside the phone content frame. */
  body.booking-page .calendar-grid {
    flex: none;
    grid-template-columns: 32px repeat(7, minmax(0, 1fr));
    grid-template-rows: 44px repeat(14, 28px);
    min-height: 0;
    gap: 4px;
    padding: 0;
  }
  body.booking-page .calendar-date { grid-column: auto; margin: 0; padding: 0 0 6px; justify-content: center; gap: 3px; cursor: default; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  body.booking-page .calendar-date span { font-size: 11px; }
  body.booking-page .calendar-date strong { font-size: 16px; }
  body.booking-page .calendar-date.is-day { background: transparent; }
  body.booking-page :is(.calendar-corner, .calendar-hour, .calendar-slot) { display: block; }
  body.booking-page .calendar-hour { font-size: 11px; font-variant-numeric: tabular-nums; }
  body.booking-page .calendar-slot { grid-column: auto; min-height: 28px; margin: 0; border-radius: 999px; }
  body.booking-page .calendar-slot.is-day { grid-column: auto; }
  body.booking-page .calendar-slot .slot-clock { display: none; }
  body.booking-page .slot-mark { margin: 0; font-size: 12px; }
  body.booking-page .booking-view--calendar > .calendar-actions {
    height: 156px;
    min-height: 156px;
    flex: 0 0 156px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-top: 12px;
  }
  body.booking-page .calendar-selection { flex: 1; height: auto; font-size: 13px; line-height: 1.5; }
  body.booking-page .recurring-slot-summary { gap: 2px 12px; }
  body.booking-page .first-lesson { font-size: 12px; }
  body.booking-page .booking-primary { min-height: 48px; min-width: 0; padding: 13px 16px; font-size: 14px; border-radius: 999px; }

  body.booking-page .details-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  body.booking-page .slot-summary { margin: 18px 0 0; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
  body.booking-page #booking-details label { margin-bottom: 18px; font-size: 13px; }
  body.booking-page #booking-details :is(input, textarea) { min-height: 48px; font-size: 16px; }
  body.booking-page #booking-details textarea { min-height: 90px; max-height: 180px; }
  body.booking-page #booking-details .booking-primary { width: 100%; }
  body.booking-page .booking-status { height: 56px; min-height: 56px; flex: 0 0 56px; margin: 12px 0 0; padding: 0; font-size: 13px; line-height: 18px; }

  /* Keep the introduction alive between review and payment; secure fields
     retain readable size and grow into document flow, never into the footer. */
  body.booking-page .booking-view:has(.checkout-pair) { display: block; margin: 0; }
  body.booking-page .checkout-pair { position: static; width: 100%; grid-template-columns: minmax(0, 1fr); gap: 24px; transform: none; }
  body.booking-page .checkout-card-frame { height: auto !important; min-height: 560px; border-radius: 16px; }
  body.booking-page .checkout-card-frame .checkout-card-inner { position: static; width: 100%; transform: none; }
  body.booking-page .checkout-review-content { padding: 20px; min-height: 558px; display: flex; flex-direction: column; }
  body.booking-page .checkout-review-content > .slot-summary { margin-block: 22px; }
  body.booking-page .order-line { font-size: 15px; gap: 12px; }
  body.booking-page .order-line strong { font-size: 15px; }
  body.booking-page .order-line small { font-size: 13px; }
  body.booking-page .order-total { margin-top: auto; padding: 18px 0; font-size: 14px; }
  body.booking-page .order-total strong { font-size: 24px; }
  body.booking-page .policy-check { font-size: 13px; margin: 8px 0 18px; }
  body.booking-page .policy-check input { flex-shrink: 0; width: 18px; height: 18px; }
  body.booking-page .checkout-note { margin-top: 14px; font-size: 12px; }
  body.booking-page .payment-review { padding: 20px; }
  body.booking-page .payment-identity { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  body.booking-page .payment-identity :is(input, select) { height: 44px; font-size: 16px; }
  body.booking-page .payment-identity label { font-size: 12px; }
  body.booking-page .payment-consent { font-size: 12px; }
  body.booking-page .payment-review .booking-primary { min-height: 48px; }
  body.booking-page .payment-review .checkout-note { font-size: 12px; }
  body.booking-page :is(.booking-view--confirming, .booking-view--success) { min-height: 430px; justify-content: center; }
  body.booking-page :is(.booking-view--confirming, .booking-view--success) > .booking-success-content { position: static; width: 100%; transform: none; margin: auto; }
  body.booking-page .booking-success-content .slot-summary { margin-bottom: 26px; }

  body.booking-page > .contact-footer {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    width: var(--frame-width);
    block-size: auto;
    min-height: 0;
    margin: 12px auto 0;
    padding: 18px 0 max(16px, env(safe-area-inset-bottom));
    font-size: 12px;
  }
  body.booking-page .footer-brand { min-height: 44px; max-width: none; }
  body.booking-page .linkedin-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: auto; }
  body.booking-page .footer-links { gap: 28px; }
  body.booking-page .footer-links a { display: inline-flex; align-items: center; min-height: 44px; }


  body, body.workspace-page {
    --phone-gutter: clamp(20px, 5.6vw, 24px);
    --page-gutter: var(--phone-gutter);
    --header-height: calc(68px + env(safe-area-inset-top));
    --frame-width: calc(100% - 2 * var(--phone-gutter));
    --copy-size: 14px;
    --phone-nav-surface: rgb(255 244 207 / .72);
    overflow-x: clip;
  }
  /* Blur the header on its own surface so the drawer can also blur the page
     behind it. Every route shares the index sky tint. */
  & body.workspace-page > .site-header,
  &.phone-index body.section3-preview > .site-header {
    position: fixed;
    inset: 0 0 auto;
    height: var(--header-height);
    gap: 16px;
    padding: env(safe-area-inset-top) var(--phone-gutter) 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  & body.workspace-page > .site-header::before,
  &.phone-index body.section3-preview > .site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--phone-nav-surface);
    -webkit-backdrop-filter: blur(20px) saturate(115%);
    backdrop-filter: blur(20px) saturate(115%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .2);
  }
  & body.workspace-page > .site-header .wordmark {
    display: inline-flex; align-items: center; min-height: 44px;
    max-width: calc(100% - 60px); font-size: 26px;
    white-space: nowrap; overflow-wrap: normal;
  }
  & body.workspace-page > .site-header .desktop-nav { display: none; }
  & body.workspace-page > .site-header .menu-toggle { display: flex; width: 46px; height: 46px; }
  & body.workspace-page > .site-header .mobile-nav,
  &.phone-index body.section3-preview > .site-header .mobile-nav {
    inset-inline: 0; top: 100%;
    max-height: calc(100dvh - var(--header-height));
    padding: 10px var(--phone-gutter) max(16px, env(safe-area-inset-bottom));
    gap: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
    background: var(--phone-nav-surface);
    -webkit-backdrop-filter: blur(20px) saturate(115%);
    backdrop-filter: blur(20px) saturate(115%);
    box-shadow: 0 16px 24px #29292908;
  }
  & body.workspace-page > .site-header .mobile-nav:not([hidden]) { display: flex; }
  & body.workspace-page > .site-header .mobile-nav a {
    display: flex; align-items: center; min-height: 50px;
    padding-block: 10px; font-size: 15px; line-height: 1.4;
  }

  /* Reading and account pages share the same title, gutters and natural flow. */
  body.workspace-page .workspace-shell.page-composed {
    display: block; width: var(--frame-width); height: auto; min-height: calc(100svh - 140px);
    margin-inline: auto; padding: calc(var(--header-height) + 28px) 0 24px; overflow: visible;
  }
  body.workspace-page .page-composed > .page-composition {
    --copy-size: 14px; --workspace-gap: 18px; --header-height: calc(68px + env(safe-area-inset-top));
    position: static; display: block; width: 100%; min-height: 0;
    margin: 0; padding: 0; transform: none;
  }
  body.workspace-page .page-composition .workspace-heading { margin: 0 0 36px; }
  body.workspace-page .page-composition .workspace-heading h1 {
    font-size: clamp(32px, 9vw, 38px); line-height: 1.04; letter-spacing: -.045em; text-wrap: balance;
  }
  body.workspace-page .page-composition .workspace-heading p { margin-top: 14px; font-size: 14px; line-height: 1.55; }
  body.workspace-page > .contact-footer {
    display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0;
    width: var(--frame-width); block-size: auto; min-height: 0; margin: 12px auto 0;
    padding: 10px 0 max(10px, env(safe-area-inset-bottom)); font-size: 12px;
  }
  body.workspace-page .footer-brand { min-height: 44px; max-width: none; }
  body.workspace-page .linkedin-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: auto; }
  &.phone-index body.section3-preview main#main-content .contact-footer {
    gap: 0;
    padding: 10px 0 max(10px, env(safe-area-inset-bottom));
  }
  body.workspace-page .contact-footer .footer-links,
  &.phone-index body.section3-preview main#main-content .footer-links { display: none; }

  body.workspace-page.policy-page .policy-section { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block: 28px; }
  body.workspace-page.policy-page .policy-section h3,
  body.workspace-page.policy-page .faq-section > h2 { max-width: none; font-size: 25px; line-height: 1.15; scroll-margin-top: calc(var(--header-height) + 22px); }
  body.workspace-page.policy-page .policy-copy p,
  body.workspace-page.policy-page .testimonial blockquote p { font-size: 14px; line-height: 1.65; }
  body.workspace-page.policy-page .policy-copy p + p { margin-top: 16px; }
  body.workspace-page.policy-page .faq-item summary { gap: 18px; padding-block: 18px; font-size: 14px; line-height: 1.5; }
  body.workspace-page.policy-page .faq-item:first-child summary { padding-top: 0; }
  body.workspace-page.policy-page .faq-answer > p:last-child { padding-bottom: 20px; }
  body.workspace-page.policy-page .testimonials-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  body.workspace-page.policy-page .testimonial { padding-block: 28px; gap: 20px; }
  body.workspace-page.policy-page .testimonial figcaption { font-size: 13px; }

  body.workspace-page.course-page .page-composition { --course-space: 48px; --course-gap: 24px; }
  body.workspace-page.course-page .page-composition :is(p, li, dd) { font-size: 14px; line-height: 1.65; }
  body.workspace-page.course-page .page-composition h2 { font-size: 29px; line-height: 1.12; letter-spacing: -.035em; }
  body.workspace-page.course-page :is(.course-intro, .course-section-header, .course-included, .course-update, .course-enrol) { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  body.workspace-page.course-page .course-story h2 { margin-bottom: 20px; }
  body.workspace-page.course-page .course-story p + p { margin-top: 16px; }
  body.workspace-page.course-page .course-summary { padding: 24px; border-radius: 22px; }
  body.workspace-page.course-page .course-summary h3 { font-size: 27px; margin-bottom: 18px; }
  body.workspace-page.course-page .course-price strong { font-size: 32px; }
  body.workspace-page.course-page .course-section { margin-top: 48px; padding-top: 32px; scroll-margin-top: calc(var(--header-height) + 20px); }
  body.workspace-page.course-page .course-section-header { margin-bottom: 26px; }
  body.workspace-page.course-page .course-skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
  body.workspace-page.course-page .course-skill-grid article { padding-top: 18px; }
  body.workspace-page.course-page .course-skill-grid h3 { font-size: 23px; margin-bottom: 12px; }
  body.workspace-page.course-page .course-included-list dt { font-size: 15px; }
  body.workspace-page.course-page .course-update { padding: 24px; }
  body.workspace-page.course-page .course-enrol-action { width: 100%; max-width: none; justify-self: stretch; }
  body.workspace-page.course-page .course-primary { min-height: 48px; padding: 14px 18px; font-size: 14px; }

  /* Minimal email/code and admin sign-in, centered below the page heading. */
  body.student-portal-page .portal-workspace,
  body.student-portal-page .portal-view { min-height: 0; }
  body.workspace-page .portal-shell:has(.portal-login) > .page-composition,
  body.workspace-page .admin-shell:is([data-admin-screen="login"], [data-admin-screen="checking"]) > .page-composition {
    display: flex; flex-direction: column;
    min-height: calc(100svh - var(--header-height) - 208px);
  }
  body.student-portal-page .portal-workspace:has(.portal-login),
  body.admin-page .admin-shell:is([data-admin-screen="login"], [data-admin-screen="checking"]) .admin-workspace { flex: 1; min-height: 280px; justify-content: center; }
  body.student-portal-page .portal-login { --copy-size: 16px; }
  body.student-portal-page .portal-login h2 { font-size: clamp(25px, 7vw, 29px); line-height: 1.05; min-height: 2.1em; }
  body.student-portal-page .portal-login h2 span { white-space: normal; }
  body.student-portal-page .portal-login-form { margin-top: 12px; }
  body.student-portal-page .portal-login-form input { font-size: 16px; min-height: 48px; }
  body.student-portal-page .portal-login-button { min-height: 48px; margin-top: 6px; font-size: 14px; }
  body.student-portal-page .portal-status { font-size: 13px; overflow-wrap: anywhere; }
  body.student-portal-page .portal-dashboard-heading { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 20px; }
  body.student-portal-page .portal-dashboard-heading h2 { font-size: 29px; }
  body.student-portal-page .portal-dashboard-actions { gap: 24px; }
  body.student-portal-page .portal-dashboard-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  body.student-portal-page .portal-tabs { gap: 22px; }
  body.student-portal-page .portal-tabs button { font-size: 14px; min-height: 48px; }
  body.student-portal-page .portal-lessons-list { height: auto; max-height: 480px; padding-right: 6px; }
  body.student-portal-page .portal-lesson { grid-template-columns: 38px minmax(0, 1fr); gap: 10px 14px; padding-block: 18px; }
  body.student-portal-page .portal-lesson-info h3 { font-size: 14px; }
  body.student-portal-page .portal-lesson-info p { font-size: 13px; }
  body.student-portal-page .portal-lesson-info small { display: inline-block; }
  body.student-portal-page .portal-lesson-actions { grid-column: 2; flex-wrap: wrap; gap: 16px; }
  body.student-portal-page .portal-lesson-actions :is(button, a) { min-height: 44px; }
  body.student-portal-page .portal-account-summary { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; padding: 20px; }
  body.student-portal-page .portal-account-label { font-size: 11px; margin-bottom: 12px; }
  body.student-portal-page .portal-subscription { font-size: 14px; }
  body.student-portal-page .portal-credit { font-size: 34px; }
  body.student-portal-page .portal-yki { padding: 22px; }
  body.student-portal-page .portal-yki h3 { font-size: 27px; }
  body.student-portal-page .portal-yki p { font-size: 14px; }
  body.student-portal-page .portal-success { padding-block: 34px; }
  body.student-portal-page .portal-success h2 { font-size: 32px; }
  body.student-portal-page .portal-success p { font-size: 14px; margin-block: 20px; }
  body.student-portal-page .portal-calendar { min-height: 0; gap: 18px; }
  body.student-portal-page .portal-calendar .calendar-heading { flex-direction: column; align-items: stretch; gap: 18px; }
  body.student-portal-page .portal-calendar .calendar-heading h2 { font-size: 28px; }
  body.student-portal-page .portal-calendar .calendar-heading p { margin-top: 10px; font-size: 14px; }
  body.student-portal-page .portal-calendar .calendar-grid { flex: none; grid-template-columns: 32px repeat(7, minmax(0, 1fr)); grid-template-rows: 44px repeat(14, 28px); min-height: 0; gap: 4px; padding: 0; }
  body.student-portal-page .portal-calendar .calendar-date { grid-column: auto; margin: 0; padding: 0 0 6px; gap: 3px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  body.student-portal-page .calendar-date span { font-size: 11px; }
  body.student-portal-page .calendar-date strong { font-size: 16px; }
  body.student-portal-page :is(.calendar-corner, .calendar-hour, .calendar-slot) { display: block; }
  body.student-portal-page .calendar-hour { font-size: 11px; }
  body.student-portal-page .calendar-slot { grid-column: auto; min-height: 28px; border-radius: 999px; }
  body.student-portal-page .slot-mark { margin: 0; font-size: 12px; }
  body.student-portal-page .portal-calendar .calendar-actions { min-height: 156px; flex-direction: column; align-items: stretch; gap: 12px; padding-top: 12px; }
  body.student-portal-page .calendar-selection { flex: 1; font-size: 13px; line-height: 1.5; }
  body:is(.student-portal-page, .admin-page) .week-navigation { width: 100%; justify-content: space-between; gap: 10px; }
  body:is(.student-portal-page, .admin-page) .week-navigation button { width: 44px; height: 44px; flex-shrink: 0; }
  body:is(.student-portal-page, .admin-page) .week-navigation > span { font-size: 12px; }
  body:is(.student-portal-page, .admin-page) .booking-primary { min-width: 0; min-height: 48px; padding: 13px 16px; gap: 16px; font-size: 14px; }

  /* Direct Admin access stays usable, but never appears in phone navigation. */
  &:has(body.admin-page), body.admin-page { overflow-y: auto; }
  body.admin-page .admin-login { padding-bottom: 16px; }
  body.admin-page .admin-login h2 { font-size: 29px; margin-bottom: 22px; }
  body.admin-page .admin-login .admin-form { gap: 16px; }
  body.admin-page .admin-form :is(input, select, textarea),
  body.admin-page :is(.admin-search, .admin-filter, .admin-monthly-row select) { font-size: 16px; min-height: 44px; }
  body.admin-page .admin-topbar { flex-direction: column; align-items: stretch; gap: 12px; padding-bottom: 20px; }
  body.admin-page .admin-topbar h2 { font-size: 29px; }
  body.admin-page .admin-actions { gap: 12px 20px; }
  body.admin-page .admin-text-button { min-height: 44px; }
  body.admin-page .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding-block: 22px; }
  body.admin-page .admin-stats strong { font-size: 30px; margin-bottom: 5px; }
  body.admin-page .admin-stats span { font-size: 13px; }
  body.admin-page .admin-monthly-row { flex-direction: column; align-items: stretch; gap: 12px; }
  body.admin-page .admin-monthly-values { gap: 12px 24px; flex-wrap: wrap; }
  body.admin-page .admin-monthly-note { margin-bottom: 24px; font-size: 11px; }
  body.admin-page .admin-teaching { margin-bottom: 28px; padding-bottom: 24px; }
  body.admin-page .admin-teaching-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  body.admin-page .admin-teaching-metric > strong { font-size: 30px; }
  body.admin-page .admin-teaching-metric > p { margin-bottom: 12px; }
  body.admin-page .admin-teaching-actions { flex-wrap: wrap; gap: 12px; }
  body.admin-page .admin-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; scroll-margin-top: calc(var(--header-height) + 20px); }
  body.admin-page .admin-tabs button { min-height: 48px; font-size: 14px; padding-block: 12px; }
  body.admin-page .admin-panel-heading { flex-direction: column; align-items: stretch; gap: 16px; margin-bottom: 22px; }
  body.admin-page .admin-panel-heading h3 { font-size: 26px; }
  body.admin-page .admin-tools { flex-direction: column; align-items: stretch; gap: 14px; }
  body.admin-page .admin-tools .admin-search, body.admin-page .admin-filter { width: 100%; }
  /* A local horizontal canvas preserves readable appointment names and all
     seven days. The page itself never scrolls sideways. */
  body.admin-page .admin-week-grid { grid-template-columns: 38px repeat(7, 88px); gap: 4px; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 12px; scrollbar-width: thin; }
  body.admin-page .admin-hour { position: sticky; left: 0; z-index: 1; background: #f4b1a0; font-size: 11px; }
  body.admin-page .admin-day { padding-bottom: 12px; margin-bottom: 3px; }
  body.admin-page .admin-day strong { font-size: 21px; }
  body.admin-page .admin-cell :is(button, .admin-preview, .admin-external) { font-size: 12px; padding: 8px 6px; overflow-wrap: anywhere; }
  body.admin-page .admin-cell small { font-size: 10px; }
  body.admin-page .admin-legend { gap: 12px 18px; font-size: 11px; }
  body.admin-page .admin-reschedule-banner { flex-direction: column; align-items: stretch; padding: 18px; }
  body.admin-page .admin-lesson-row { grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 16px; }
  body.admin-page .admin-lesson-row > .admin-actions, body.admin-page .admin-outcomes { grid-column: 1 / -1; justify-content: flex-start; }
  body.admin-page .admin-lesson-row h4 { font-size: 14px; }
  body.admin-page .admin-lesson-row p { font-size: 13px; }
  body.admin-page .admin-outcomes button { min-height: 44px; }
  body.admin-page .admin-student-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  body.admin-page .admin-student-card { padding: 18px; }
  body.admin-page .admin-student-card h4 { font-size: 25px; }
  body.admin-page .admin-student-details { gap: 16px; margin-block: 18px; }
  body.admin-page .admin-student-details dd { font-size: 14px; }
  body:is(.student-portal-page, .admin-page) :is(h2, h3, h4, p, dd) { overflow-wrap: anywhere; }
  body.admin-page :is(.admin-lesson-row > div, .admin-student-top > div) { min-width: 0; }
  body:is(.student-portal-page, .admin-page) :is(.portal-dialog, .admin-dialog) { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 22px; margin: auto; }
  body:is(.student-portal-page, .admin-page) :is(.portal-dialog, .admin-dialog) h2 { font-size: 28px; }
  body:is(.student-portal-page, .admin-page) :is(.portal-dialog, .admin-dialog) p { font-size: 14px; }
  body:is(.student-portal-page, .admin-page) :is(.portal-dialog-actions, .admin-dialog-actions) { flex-wrap: wrap; gap: 12px; }
  body.student-portal-page .portal-profile-form { gap: 16px; margin-top: 20px; }
  body.student-portal-page .portal-profile-form input { font-size: 16px; min-height: 44px; }
  body.admin-page .admin-form-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  body.admin-page .admin-subscription-fields { padding: 14px; gap: 16px; }
  body.admin-page .admin-slot-pair { gap: 12px; }

}
