/* ============================================================================
   English Teacher Thomas — Style Guide implementation
   Metallic palette: silver-grey base, deep blue, gold accents.
   Desktop only. No vertical/horizontal page scrolling under normal use.
   ============================================================================ */

:root {
  --base: #C0C0C0;
  --blue: #1B3D81;       /* primary text / fills (also replaces pure black) */
  --blue-light: #355296; /* hover / muted */
  --gold: #D4AF37;       /* accents / borders */
  --gold-light: #F8E7C0;
  --periwinkle: #CED2EB;
  --offwhite: #EEF1F7;   /* replaces pure white */
  --main-bg: #E6E9F4;
  --error: #8B0000;
  --success: #006400;

  --header-h: 100px;
  /* Footer kept compact so the main body (and calendar) gets more height. */
  --footer-h: 52px;

  --h1: 32px; --h2: 24px; --h3: 18px; --body: 16px; --small: 14px;
  --font: "FF Angie Pro", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Helvetica Neue", Arial, sans-serif;

  /* Shared metallic surface (Private Lessons + Member Dashboard). */
  --surface-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  --surface-metal: linear-gradient(180deg, #C8C8CB 0%, var(--base) 28%, #B6B6B9 72%, #C2C2C5 100%);
  --surface-blue-tint: linear-gradient(90deg, rgba(27, 61, 129, 0.028) 0%, transparent 40%, transparent 60%, rgba(27, 61, 129, 0.028) 100%);
  --gold-shine: linear-gradient(145deg, #F8E7C0 0%, #D4AF37 22%, #B8942E 48%, #F5E6A8 72%, #D4AF37 100%);
  --panel-face: linear-gradient(168deg, var(--offwhite) 0%, #F4F6FC 42%, var(--main-bg) 100%);
  --panel-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.58),
    inset 0 -3px 6px rgba(27, 61, 129, 0.04),
    0 8px 22px rgba(27, 61, 129, 0.09),
    0 2px 6px rgba(27, 61, 129, 0.05);
  --gold-frame-glow:
    0 0 12px rgba(212, 175, 55, 0.48),
    inset 1px 1px 0 rgba(255, 255, 255, 0.6),
    inset -1px -1px 0 rgba(168, 131, 31, 0.4);

  /* Scrollbars — light blue track, darker blue thumb & arrows. */
  --scrollbar-track: #C5D0E8;
  --scrollbar-track-light: #D8E2F4;
  --scrollbar-track-edge: #A8B8D8;
  --scrollbar-thumb-top: var(--blue-light);
  --scrollbar-thumb-bottom: var(--blue);
}

* { box-sizing: border-box; }

/* Site-wide scrollbar styling (Firefox). */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb-bottom) var(--scrollbar-track);
}

/* Site-wide scrollbar styling (Chrome, Edge, Safari). */
*::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}
*::-webkit-scrollbar-track {
  background: linear-gradient(
    90deg,
    var(--scrollbar-track-edge) 0%,
    var(--scrollbar-track) 30%,
    var(--scrollbar-track-light) 50%,
    var(--scrollbar-track) 70%,
    var(--scrollbar-track-edge) 100%
  );
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.38);
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    var(--scrollbar-thumb-top) 0%,
    var(--scrollbar-thumb-bottom) 58%,
    #152F66 100%
  );
  border-radius: 8px;
  border: 2px solid var(--scrollbar-track);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  min-height: 36px;
  min-width: 36px;
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #4A6AB0 0%, var(--blue-light) 50%, var(--blue) 100%);
}
*::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, var(--blue) 0%, #152F66 100%);
}
*::-webkit-scrollbar-button {
  background: linear-gradient(180deg, var(--scrollbar-thumb-top) 0%, var(--scrollbar-thumb-bottom) 100%);
  border: 1px solid var(--scrollbar-track-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
*::-webkit-scrollbar-button:hover {
  background: linear-gradient(180deg, #4A6AB0 0%, var(--blue-light) 100%);
}
*::-webkit-scrollbar-button:active {
  background: linear-gradient(180deg, var(--blue) 0%, #152F66 100%);
}
*::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

html, body {
  margin: 0;
  height: 100%;
  font-family: var(--font);
  font-size: var(--body);
  color: var(--blue);
  background: var(--base);
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden; /* page itself never scrolls */
}

h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
a { color: var(--blue); }
.link { color: var(--blue-light); text-decoration: underline; cursor: pointer; font-size: var(--small); }

/* ---- Header ---- */
/* Wordmark is absolutely centered with an explicit capped width so the wide
   (19.795:1) SVG always scales down and never overlaps the header controls.
   Avoid max-width:100% on the img — that collapses to 0 when the parent has
   no intrinsic width. */
.site-header {
  height: var(--header-h);
  min-height: var(--header-h);
  background: var(--base);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px;
  position: relative;
}
.wordmark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  height: 60px;
  /* 60px × 19.795 aspect ratio ≈ 1188px; reserve 140px per side for controls. */
  width: min(1188px, calc(100% - 340px));
  line-height: 0;
  text-decoration: none;
  z-index: 1;
}
.wordmark-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.wordmark-fallback {
  display: inline-block;
  font-size: clamp(14px, 2.2vw, 26px);
  font-weight: bold;
  color: var(--blue);
  letter-spacing: 0.5px;
  white-space: nowrap;
  line-height: 60px;
}
.header-right {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-left {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  flex-shrink: 0;
}
.login-btn,
.logout-btn {
  height: 40px;
  min-height: 40px;
  padding: 0 16px;
  font-size: var(--body);
  white-space: nowrap;
}
.login-btn { min-width: 96px; }
.logout-btn { min-width: 116px; }
.dashboard-btn,
.private-lessons-btn,
.header-nav-btn {
  display: inline-flex;
  width: 80px;
  height: 80px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.dashboard-btn:hover,
.private-lessons-btn:hover,
.header-nav-btn:hover { opacity: 0.85; }
.dashboard-logo,
.private-lessons-logo,
.header-nav-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  display: block;
}
.dashboard-btn-fallback::after { content: "ETT"; color: var(--blue); font-weight: bold; font-size: var(--h3); }
.private-lessons-btn-fallback::after { content: "予約"; color: var(--blue); font-weight: bold; font-size: var(--small); letter-spacing: 0.05em; }

/* ---- Footer ---- */
.site-footer {
  height: var(--footer-h);
  min-height: var(--footer-h);
  background: var(--base);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 24px 16px;
  flex-shrink: 0;
}
.legal { color: var(--blue); font-size: var(--small); }
.legal-contact { padding: 0; }

/* ---- Main ---- */
main.main-body {
  flex: 1 1 auto;
  background: var(--main-bg);
  padding: 20px;
  overflow: hidden;
  min-height: 0;
}

/* Blur the page body until privacy is accepted (Global Missing Record Rule). */
body.privacy-locked main.main-body,
body.privacy-locked .site-footer { filter: blur(5px); pointer-events: none; user-select: none; }

/* ---- Buttons ---- */
.btn {
  min-height: 44px;
  padding: 10px 20px;
  background: var(--blue);
  color: var(--offwhite);
  border: 2px solid var(--gold);
  border-radius: 8px;
  font-size: var(--body);
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, filter 0.15s ease;
}
.btn:hover { background: var(--blue-light); transform: scale(1.02); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-secondary { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn-secondary:hover { background: var(--periwinkle); }
.btn-gold { background: var(--gold); color: var(--blue); border: 2px solid var(--blue); font-weight: bold; }
.btn-gold:hover { background: var(--gold-light); }

/* ---- Inputs ---- */
.text-input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  margin-bottom: 12px;
  background: #FFFFFF;
  border: 2px solid var(--blue);
  border-radius: 6px;
  font-size: var(--body);
  color: var(--blue);
}
.text-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,0.35); }
.field-label { display: block; font-size: var(--small); color: var(--blue); margin-bottom: 4px; font-weight: bold; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: var(--small); margin: 10px 0; }

/* Honeypot — visually hidden but present for bots. */
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; overflow: hidden; }

/* Password rule hints */
.pw-rules { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--blue-light); }
.pw-rules li::before { content: "○ "; }
.pw-rules li.ok { color: var(--success); }
.pw-rules li.ok::before { content: "● "; }

/* ---- Modals & Overlays ---- */
.modal-backdrop, .overlay {
  position: fixed; inset: 0;
  background: rgba(27, 61, 129, 0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal-backdrop[hidden], .overlay[hidden] { display: none; }
.modal, .overlay-box {
  position: relative;
  background: var(--offwhite);
  border: 3px solid var(--gold);
  border-radius: 16px;
  padding: 28px 32px;
  width: 420px;
  max-width: 92vw;
  max-height: 86vh;
  overflow: auto;
}
.modal-login, .modal-create { width: 460px; }
.modal-terms { width: 640px; }
.modal h2, .overlay-box h2 { margin-top: 0; color: var(--blue); }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--gold); background: transparent; color: var(--gold);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.modal-actions, .overlay-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.overlay-box { width: 520px; text-align: center; }
.privacy-box { text-align: left; }
.privacy-text { line-height: 1.8; }
.scroll-body { max-height: 46vh; overflow-y: auto; padding-right: 8px; line-height: 1.7; }
.terms-text p, .guidelines-text p { margin: 0 0 10px; }

/* ---- Messages ---- */
.form-error { color: var(--error); background: rgba(139,0,0,0.08); border: 1px solid var(--error); border-radius: 6px; padding: 8px 10px; font-size: var(--small); margin: 10px 0 0; }
.form-success { color: var(--success); background: rgba(0,100,0,0.08); border: 1px solid var(--success); border-radius: 6px; padding: 8px 10px; font-size: var(--small); }

/* ---- Loading spinner ---- */
.spinner { width: 48px; height: 48px; border: 5px solid var(--periwinkle); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto; }
.loading-text { text-align: center; color: var(--blue-light); margin-top: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================================
   Private Lessons Page
   ============================================================================ */
/* One continuous page background — header, main, and footer stay transparent. */
.page-private-lessons {
  background-color: var(--base);
  background-image:
    var(--surface-grain),
    linear-gradient(180deg, rgba(238, 241, 247, 0.14) 0%, transparent 18%),
    var(--surface-blue-tint),
    var(--surface-metal);
  background-size: 180px 180px, 100% 100%, 100% 100%, 100% 100%;
  background-attachment: fixed;
  overflow-x: auto;
  overflow-y: hidden;
}
.page-home {
  overflow-x: auto;
  overflow-y: hidden;
}
.page-private-lessons .site-header,
.page-private-lessons .main-body,
.page-private-lessons .site-footer,
.page-home .site-header,
.page-home .main-body,
.page-home .site-footer {
  min-width: 1100px;
}
@media (max-height: 599px) {
  .page-private-lessons,
  .page-home {
    min-height: 600px;
    overflow-y: auto;
  }
}
.page-private-lessons .site-header,
.page-private-lessons .main-body,
.page-private-lessons .site-footer {
  background: transparent;
  box-shadow: none;
  border: none;
}
.page-private-lessons .wordmark-img {
  filter: drop-shadow(0 1px 0 rgba(238, 241, 247, 0.85)) drop-shadow(0 2px 3px rgba(27, 61, 129, 0.07));
}
.page-private-lessons .site-footer .legal {
  color: var(--blue);
  text-shadow: 0 1px 0 rgba(238, 241, 247, 0.45);
}

.lessons-layout { display: flex; gap: 16px; height: 100%; align-items: stretch; }
.panel {
  position: relative;
  background: var(--panel-face);
  border: none;
  border-radius: 12px;
  padding: 16px;
  display: flex; flex-direction: column;
  min-height: 0;
  transition: width 0.25s ease, box-shadow 0.2s ease-out;
  box-shadow: var(--panel-shadow);
}
/* Metallic gold frame (static shine, no animation). */
.page-private-lessons .panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 12px;
  padding: 5px;
  background: var(--gold-shine);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  box-shadow: var(--gold-frame-glow);
}
.page-private-lessons .panel > * {
  position: relative;
  z-index: 1;
}
.page-private-lessons .panel-title,
.page-private-lessons .cal-title {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}
.page-private-lessons .cal-dow {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.calendar-panel { width: 100%; }
.lessons-layout.has-slots .calendar-panel { width: 60%; }
.lessons-layout.has-slots .slots-panel { width: 40%; }
.lessons-layout.has-booking .calendar-panel { width: 40%; }
.lessons-layout.has-booking .slots-panel { width: 30%; }
.lessons-layout.has-booking .booking-panel { width: 30%; }
/* Hidden entirely until activated — must be display:none (not width:0), or the
   panel's padding + border would still render as a visible sliver. */
.slots-panel, .booking-panel { display: none; }
.lessons-layout.has-slots .slots-panel,
.lessons-layout.has-booking .slots-panel,
.lessons-layout.has-booking .booking-panel { display: flex; }

.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-title { font-size: var(--h3); font-weight: bold; }
.cal-nav {
  background: linear-gradient(180deg, #D4D4D7 0%, var(--base) 55%, #A8A8AB 100%);
  border: 2px solid var(--blue);
  color: var(--blue);
  border-radius: 6px;
  width: 40px;
  height: 36px;
  cursor: pointer;
  font-size: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 4px rgba(27, 61, 129, 0.08);
  transition: all 0.2s ease-out;
}
.page-private-lessons .cal-nav:hover {
  background: linear-gradient(180deg, #DCDCE0 0%, #C8C8CB 55%, #B0B0B3 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 3px 7px rgba(27, 61, 129, 0.1);
  transform: scale(1.03);
}
.page-private-lessons .cal-nav.cal-nav-disabled,
.page-private-lessons .cal-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.page-private-lessons .cal-nav.cal-nav-disabled:hover,
.page-private-lessons .cal-nav:disabled:hover {
  background: linear-gradient(180deg, #D4D4D7 0%, var(--base) 55%, #A8A8AB 100%);
  transform: none;
}
/* Weekday header row: its own fixed-height grid so the date grid below can use
   all remaining vertical space. */
.cal-dow-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
/* Date grid fills remaining panel height; rows share that height equally so
   every week is visible regardless of viewport size (5 or 6 rows). */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 1fr; gap: 6px; flex: 1 1 auto; min-height: 0; }
.cal-dow { text-align: center; font-size: var(--small); color: var(--blue-light); font-weight: bold; }
.cal-day {
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; cursor: pointer; font-size: 17px;
  border: 2px solid transparent; min-height: 0; overflow: hidden;
  font-weight: 700;
  transition: transform 0.2s ease-out, filter 0.2s ease-out, box-shadow 0.2s ease-out;
}
.cal-day.available {
  background: linear-gradient(180deg, #FDF3D8 0%, var(--gold-light) 42%, #E2C55A 100%);
  color: var(--blue);
  border-color: var(--gold);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 2px 5px rgba(27, 61, 129, 0.07);
}
.cal-day.available:hover {
  transform: scale(1.05);
  filter: brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 3px 8px rgba(27, 61, 129, 0.1);
}
.cal-day.dimmed {
  background: linear-gradient(180deg, #D8D8DB 0%, #BABABD 100%);
  color: var(--blue-light);
  opacity: 0.55;
  cursor: default;
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.cal-day.dimmed:hover { transform: none; filter: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.cal-day.unavailable {
  background: linear-gradient(180deg, #CECED1 0%, #B0B0B3 100%);
  color: var(--blue-light);
  opacity: 0.5;
  cursor: default;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.cal-day.empty { background: transparent; cursor: default; }
/* Orbit angle for the traveling streak (avoids rotating an oversized layer). */
@property --orbit-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* Selected: dual-tone gold/blue ring with an orbiting light streak. */
.cal-day.selected,
.slot.selected {
  position: relative;
  z-index: 1;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow:
    0 0 8px rgba(27, 61, 129, 0.22),
    0 0 6px rgba(212, 175, 55, 0.2);
  animation: select-ambient 2.5s ease-in-out infinite;
  transition: box-shadow 0.2s ease-out;
}
/* Grid cells keep row height; clip border glow to the cell. */
.cal-day.selected { overflow: hidden; }
/* Flex-column slots must not shrink — overflow:hidden on a flex child allows collapse. */
.slot.selected {
  overflow: visible;
  flex-shrink: 0;
}
.cal-day.selected > *,
.slot.selected > * {
  position: relative;
  z-index: 2;
}
.cal-day.selected:hover,
.slot.selected:hover {
  box-shadow:
    0 0 14px rgba(27, 61, 129, 0.36),
    0 0 10px rgba(212, 175, 55, 0.32);
}
.page-private-lessons .cal-day.selected.available {
  background: linear-gradient(180deg, #FDF3D8 0%, var(--gold-light) 40%, var(--gold) 100%);
}
/* Static dual-tone border (gold + blue), locked to the button edge. */
.cal-day.selected::before,
.slot.selected::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-sizing: border-box;
  padding: 2px;
  background: conic-gradient(
    from 0deg,
    var(--gold) 0deg,
    var(--gold-light) 52deg,
    var(--blue-light) 128deg,
    var(--blue) 208deg,
    var(--gold-light) 286deg,
    var(--gold) 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}
/* Traveling streak — gradient angle orbits along the same border box. */
.cal-day.selected::after,
.slot.selected::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-sizing: border-box;
  padding: 2px;
  --orbit-angle: 0deg;
  background: conic-gradient(
    from var(--orbit-angle),
    transparent 0deg,
    transparent 248deg,
    rgba(248, 231, 192, 0.25) 262deg,
    rgba(248, 231, 192, 0.95) 280deg,
    rgba(238, 241, 247, 1) 288deg,
    rgba(53, 82, 150, 0.92) 296deg,
    rgba(27, 61, 129, 0.88) 304deg,
    rgba(212, 175, 55, 0.75) 314deg,
    transparent 326deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
  animation: select-orbit-angle 2.5s linear infinite;
}

@keyframes select-orbit-angle {
  to { --orbit-angle: 360deg; }
}

@keyframes select-ambient {
  0%, 100% {
    box-shadow:
      0 0 8px rgba(27, 61, 129, 0.22),
      0 0 6px rgba(212, 175, 55, 0.2);
  }
  50% {
    box-shadow:
      0 0 11px rgba(27, 61, 129, 0.3),
      0 0 8px rgba(212, 175, 55, 0.26);
  }
}

.panel-title { font-size: var(--h3); font-weight: bold; margin-bottom: 10px; }
.slot-list, .booking-list { overflow-y: auto; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.slot {
  flex-shrink: 0;
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  background: linear-gradient(180deg, #FDF3D8 0%, var(--gold-light) 48%, #E2C55A 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 2px 5px rgba(27, 61, 129, 0.07);
  transition: background 0.2s ease-out, border-color 0.2s ease-out, box-shadow 0.2s ease-out;
}
/* Hover highlight only — no scale (scale caused horizontal overflow in the slots panel). */
.slot:hover:not(.unavailable):not(.selected) {
  background: linear-gradient(180deg, #FFF9ED 0%, #FCEABB 46%, #E8C96A 100%);
  border-color: #E2C55A;
  box-shadow:
    inset 0 0 0 2px rgba(206, 210, 235, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 2px 6px rgba(27, 61, 129, 0.09);
}
.slot.unavailable {
  background: linear-gradient(180deg, #CECED1 0%, #B0B0B3 100%);
  opacity: 0.5;
  cursor: default;
  border-color: #B0B0B3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.slot.unavailable:hover { transform: none; filter: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15); }
.slot.selected {
  background: linear-gradient(180deg, #FDF3D8 0%, var(--gold-light) 38%, var(--gold) 100%);
  color: var(--blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.slot .slot-local { font-weight: 700; }
.slot .slot-utc { font-size: 11px; color: var(--blue-light); }
.page-private-lessons .slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
}
.page-private-lessons .slot .slot-time {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  width: 100%;
  line-height: 1.3;
}
.page-private-lessons .booking-row .booking-slot-time {
  flex: 1 1 auto;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}
@media (max-width: 1099px) {
  .page-private-lessons .slot .slot-time {
    font-size: 16px;
  }
  .page-private-lessons .booking-row .booking-slot-time {
    font-size: 14px;
  }
}

.booking-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 8px;
  background: linear-gradient(180deg, var(--offwhite) 0%, var(--main-bg) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 2px 6px rgba(27, 61, 129, 0.07);
  transition: box-shadow 0.2s ease-out;
}
/* Booking panel slots mirror the Time Slots panel gold treatment. */
.page-private-lessons .booking-row {
  background: linear-gradient(180deg, #FDF3D8 0%, var(--gold-light) 48%, #E2C55A 100%);
  color: var(--blue);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 2px 5px rgba(27, 61, 129, 0.07);
}
.page-private-lessons .booking-row:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    0 3px 8px rgba(27, 61, 129, 0.1);
}
.page-private-lessons .booking-row .slot-local { font-weight: 700; }
.page-private-lessons .booking-row .slot-utc { color: var(--blue-light); }
.page-private-lessons .booking-row .booking-price { color: var(--blue); font-weight: 700; }
.page-private-lessons .booking-fee {
  padding: 6px 4px;
  border-radius: 6px;
  background: linear-gradient(90deg, transparent 0%, rgba(206, 210, 235, 0.22) 50%, transparent 100%);
}
.booking-row .slot-local { font-weight: bold; }
.booking-row .slot-utc { font-size: 11px; color: var(--blue-light); }
.booking-price { font-weight: bold; margin: 0 8px; }
.remove-slot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--gold); color: var(--gold); background: transparent; cursor: pointer; }
.booking-fee { margin-top: 10px; padding-top: 8px; font-size: var(--small); color: var(--blue-light); display: flex; justify-content: space-between; }
.booking-total {
  border-top: 2px solid var(--gold);
  margin-top: 8px;
  padding-top: 10px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
}
.page-private-lessons .booking-total {
  background: linear-gradient(180deg, rgba(248, 231, 192, 0.18) 0%, rgba(206, 210, 235, 0.12) 100%);
  border-radius: 6px;
  padding: 10px 6px 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.page-private-lessons .remove-slot {
  background: linear-gradient(180deg, #D8D8DB 0%, var(--base) 100%);
  transition: all 0.2s ease-out;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.page-private-lessons .remove-slot:hover {
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
  color: var(--blue);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 6px rgba(27, 61, 129, 0.1);
}
.booking-currency-note {
  margin: 10px 0 0;
  font-size: var(--small);
  color: var(--blue-light);
  line-height: 1.5;
  text-align: center;
}
.confirm-booking-btn { width: 100%; margin-top: 12px; }
.page-private-lessons .btn-gold {
  background: linear-gradient(180deg, #F5E2A8 0%, var(--gold-light) 35%, var(--gold) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 4px 10px rgba(27, 61, 129, 0.12);
  transition: all 0.2s ease-out;
}
.page-private-lessons .btn-gold:hover:not(:disabled) {
  background: linear-gradient(180deg, #FDF3D8 0%, var(--gold-light) 40%, #E2C55A 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    0 5px 12px rgba(27, 61, 129, 0.14);
}
.page-private-lessons .btn-secondary {
  background: linear-gradient(180deg, #D8D8DB 0%, var(--base) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: all 0.2s ease-out;
}
.page-private-lessons .btn-secondary:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--offwhite) 0%, var(--periwinkle) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 7px rgba(27, 61, 129, 0.09);
}
.page-private-lessons .dashboard-btn,
.page-private-lessons .header-nav-btn.dashboard-btn {
  filter: drop-shadow(0 2px 4px rgba(27, 61, 129, 0.12));
}
.strikethrough .slot-local, .strikethrough .slot-utc { text-decoration: line-through; }

/* ============================================================================
   Member Dashboard
   ============================================================================ */
.page-dashboard {
  background-color: var(--base);
  background-image:
    var(--surface-grain),
    linear-gradient(180deg, rgba(238, 241, 247, 0.14) 0%, transparent 18%),
    var(--surface-blue-tint),
    var(--surface-metal);
  background-size: 180px 180px, 100% 100%, 100% 100%, 100% 100%;
  background-attachment: fixed;
  overflow-x: auto;
  overflow-y: hidden;
}
.page-dashboard .site-header,
.page-dashboard .main-body,
.page-dashboard .site-footer {
  min-width: 1280px;
}
@media (max-height: 719px) {
  .page-dashboard {
    height: 720px;
    overflow-y: auto;
  }
}
.page-dashboard .site-header,
.page-dashboard .main-body,
.page-dashboard .site-footer {
  background: transparent;
  box-shadow: none;
  border: none;
}
.page-dashboard .wordmark-img {
  filter: drop-shadow(0 1px 0 rgba(238, 241, 247, 0.85)) drop-shadow(0 2px 3px rgba(27, 61, 129, 0.07));
}
.page-dashboard .site-footer .legal,
.page-dashboard .site-footer .legal-contact {
  color: var(--blue);
  text-shadow: 0 1px 0 rgba(238, 241, 247, 0.45);
}
.page-dashboard .dashboard-btn,
.page-dashboard .private-lessons-btn,
.page-dashboard .header-nav-btn {
  filter: drop-shadow(0 2px 4px rgba(27, 61, 129, 0.12));
}

.dashboard-layout { display: flex; height: 100%; gap: 16px; width: 100%; min-width: 1050px; align-items: stretch; }
.dash-nav {
  flex: 0.75 1 420px;
  min-width: 320px;
  position: relative;
  background: var(--panel-face);
  border: none;
  border-radius: 12px;
  padding: clamp(20px, 2.5vh, 32px) 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--panel-shadow);
}
.dash-nav-fill {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(10px, 1.4vh, 16px);
  overflow-y: auto;
  padding-right: 2px;
}
.dash-section-group {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 0.9vh, 10px);
  flex: 0 0 auto;
}
.dash-subsections {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 0.9vh, 10px);
  margin-left: 16px;
}
.dash-nav-subitem {
  width: 100%;
}
.page-dashboard .dash-nav::before,
.page-dashboard .dash-list::before,
.page-dashboard .dash-detail::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 12px;
  padding: 5px;
  background: var(--gold-shine);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  box-shadow: var(--gold-frame-glow);
}
.page-dashboard .dash-nav > *,
.page-dashboard .dash-nav-fill > *,
.page-dashboard .dash-list > *,
.page-dashboard .dash-detail > * {
  position: relative;
  z-index: 1;
}
.dash-section-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(38px, 4.8vh, 46px);
  flex-shrink: 0;
  width: 100%;
  padding: 8px 12px;
  border: 2px solid var(--gold);
  border-radius: 10px;
  background: var(--offwhite);
  color: var(--blue);
  font-size: clamp(15px, 1.05rem, 18px);
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.dash-section-tab:hover { transform: none; }
.dash-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(34px, 4.2vh, 42px);
  flex-shrink: 0;
  padding: 8px 12px;
  border: 2px solid var(--gold);
  border-radius: 10px;
  background: var(--offwhite);
  text-decoration: none;
  color: var(--blue);
  font-size: clamp(13px, 0.92rem, 15px);
  font-weight: bold;
  line-height: 1.3;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.dash-nav-item:hover { transform: none; }
.dash-nav-item.disabled {
  pointer-events: none;
  cursor: not-allowed;
}
.dash-main { flex: 1.4 1 796px; display: flex; gap: 16px; align-items: stretch; min-height: 0; min-width: 714px; width: 100%; }
.dash-list {
  flex: 0.75 1 360px;
  min-width: 280px;
  min-height: 0;
  position: relative;
  background: var(--panel-face);
  border: none;
  border-radius: 12px;
  padding: 16px;
  overflow: hidden;
  box-shadow: var(--panel-shadow);
  display: flex;
  flex-direction: column;
}
.dash-list-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
.dash-detail {
  flex: 1.4 1 420px;
  min-width: 420px;
  min-height: 0;
  position: relative;
  background: var(--panel-face);
  border: none;
  border-radius: 12px;
  padding: 20px;
  overflow: hidden;
  box-shadow: var(--panel-shadow);
  display: flex;
  flex-direction: column;
}
.dash-detail-scroll {
  overflow-y: auto;
}
.dash-detail-with-mascot {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}
.dash-detail-with-mascot .dash-detail-body {
  grid-area: 1 / 1;
  z-index: 2;
  align-self: start;
  width: 100%;
}
.dash-detail-with-mascot .dash-mascot-area {
  grid-area: 1 / 1;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.dash-mascot-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--blue);
  transition: filter 0.2s ease-out, transform 0.2s ease-out;
}
.dash-mascot-link:hover {
  filter: brightness(1.04);
}
.dash-mascot-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 8px;
}
.dash-detail-mascot-hero .dash-detail-body:empty {
  display: none;
}
.dash-detail-mascot-hero .dash-detail:not(.dash-account-detail):not(.dash-detail-with-mascot) {
  overflow-y: auto;
}

@media (max-height: 680px) {
  .dash-nav {
    overflow-y: auto;
  }
  .dash-nav-fill {
    justify-content: flex-start;
    gap: 12px;
    overflow-y: auto;
  }
  .dash-account-detail {
    overflow-y: auto;
    grid-template-columns: 1fr;
    align-content: start;
  }
  .dash-account-mascot-wrap {
    padding-top: 16px;
  }
  .dash-detail-with-mascot {
    overflow-y: auto;
  }
}

.dash-mascot {
  max-width: min(500px, 90%);
  max-height: min(620px, 100%);
}
.dash-detail-mascot-companion .dash-mascot-area {
  align-items: stretch;
  justify-content: center;
  padding: clamp(128px, 20vh, 210px) 12px clamp(10px, 1.5vh, 16px);
  box-sizing: border-box;
}
.dash-detail-mascot-companion .dash-mascot-link {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dash-detail-mascot-companion .dash-mascot {
  max-width: min(420px, 80%);
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.dash-detail-loading .dash-mascot-area {
  visibility: hidden;
}
.dash-receipt-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(14px, 2vh, 20px);
  width: 100%;
  padding: clamp(18px, 3vh, 32px) clamp(20px, 3vw, 28px);
}
.btn-receipt-panel {
  width: 100%;
  min-height: clamp(64px, 11vh, 104px);
  padding: clamp(14px, 2vh, 22px) clamp(18px, 3vw, 28px);
  font-size: clamp(18px, 2.6vh, 26px);
  font-weight: bold;
  text-align: center;
  line-height: 1.35;
}
.page-dashboard .btn-receipt-panel-secondary {
  background: linear-gradient(180deg, #D8D8DB 0%, var(--base) 100%);
  color: var(--blue);
  text-shadow: none;
}
.page-dashboard .btn-receipt-panel-secondary:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--offwhite) 0%, var(--periwinkle) 100%);
  color: var(--blue);
}
.dash-cancel-reason {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 clamp(20px, 3vw, 28px) clamp(12px, 2vh, 20px);
  font-size: var(--body);
  color: var(--blue-light);
  text-align: center;
  line-height: 1.5;
}

@media (max-height: 680px) {
  .dash-nav {
    overflow-y: auto;
  }
  .dash-nav-fill {
    justify-content: flex-start;
    gap: 12px;
    overflow-y: auto;
  }
  .dash-account-detail {
    overflow-y: auto;
    grid-template-columns: 1fr;
    align-content: start;
  }
  .dash-account-mascot-wrap {
    padding-top: 16px;
  }
  .dash-detail-with-mascot {
    overflow-y: auto;
  }
}

.dash-mascot {
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(27, 61, 129, 0.16));
  user-select: none;
}
.dash-account-detail {
  display: grid;
  grid-template-columns: 1fr minmax(160px, 30%);
  grid-template-rows: 1fr;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  padding: clamp(16px, 2vh, 24px) clamp(24px, 3vw, 36px);
  min-height: 0;
}
.dash-account-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(22px, 3.5vh, 32px);
  min-width: 0;
  padding-left: 12px;
}
.dash-policy-detail {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(16px, 2vh, 22px);
}
.dash-policy-document {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  position: relative;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: clamp(4px, 0.6vh, 8px) 4px clamp(4px, 0.6vh, 8px) 0;
}
.policy-document-readonly > * {
  position: relative;
  z-index: 1;
}
.policy-document-title {
  margin: 0 0 clamp(14px, 2vh, 20px);
  font-size: clamp(18px, 1.25rem, 22px);
  font-weight: bold;
  color: var(--blue);
  text-align: center;
  line-height: 1.4;
}
.dash-policy-document p {
  margin: 0 0 12px;
  font-size: var(--body);
  color: var(--blue);
  line-height: 1.65;
  text-align: left;
}
.dash-policy-document p:last-child {
  margin-bottom: 0;
}
.dash-policy-document.dash-policy-brief {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: clamp(28px, 5vh, 56px) clamp(24px, 3.5vw, 44px);
}
.dash-policy-document.dash-policy-brief .policy-document-title {
  font-size: clamp(28px, 3.6vh, 40px);
  margin-bottom: clamp(28px, 4.5vh, 48px);
  line-height: 1.35;
}
.dash-policy-document.dash-policy-brief p {
  font-size: clamp(24px, 3.1vh, 34px);
  line-height: 1.8;
  letter-spacing: 0.03em;
  text-align: center;
}
.modal .policy-document-title {
  display: none;
}
.modal .policy-dashboard-note,
.overlay .policy-dashboard-note {
  margin-top: 14px;
  font-size: var(--body);
  line-height: 1.65;
  color: var(--blue);
}
.page-dashboard .dash-account-detail .toggle-row {
  align-items: flex-start;
  gap: clamp(20px, 2.5vw, 28px);
  margin-bottom: 0;
  width: 100%;
}
.page-dashboard .dash-account-detail .toggle-copy {
  flex: 1;
  min-width: 0;
}
.page-dashboard .dash-account-detail .toggle {
  width: 76px;
  height: 38px;
  flex-shrink: 0;
  margin-top: 2px;
}
.page-dashboard .dash-account-detail .toggle .thumb {
  width: 30px;
  height: 30px;
}
.page-dashboard .dash-account-detail .toggle input:checked + .track + .thumb {
  transform: translateX(38px);
}
.page-dashboard .dash-account-detail .toggle-copy strong {
  font-size: clamp(21px, 2.4vh, 26px);
  line-height: 1.45;
  display: block;
}
.page-dashboard .dash-account-detail .toggle-copy .slot-utc {
  font-size: clamp(18px, 2vh, 22px);
  line-height: 1.55;
  margin-top: 10px;
  color: var(--blue-light);
}
.dash-account-password-btn {
  align-self: flex-start;
  width: auto;
  min-width: 200px;
  max-width: 280px;
  margin-top: clamp(4px, 1vh, 12px);
}
.dash-account-mascot-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 8px 0;
}
.dash-mascot-account {
  max-width: min(300px, 100%);
  max-height: min(360px, 72vh);
}
.dash-list-empty-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 0;
  align-self: stretch;
  padding: 36px 40px;
  text-decoration: none;
  color: var(--blue);
  cursor: pointer;
  overflow: hidden;
  transition: filter 0.2s ease-out, box-shadow 0.2s ease-out;
}
.dash-list-empty-cta:hover {
  filter: brightness(1.03);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.62),
    inset 0 -3px 6px rgba(27, 61, 129, 0.05),
    0 10px 26px rgba(27, 61, 129, 0.11),
    0 2px 6px rgba(27, 61, 129, 0.06);
}
.dash-empty-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: clamp(1.45rem, 3vh, 2.05rem);
  font-weight: bold;
  color: var(--blue);
  line-height: 2.25;
  letter-spacing: 0.14em;
  margin: 0;
  padding: 0;
  text-decoration: none;
  text-align: center;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
}
.page-dashboard .dash-detail h2 {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}
.page-dashboard #lesson-detail-panel:not(.dash-detail-with-mascot) {
  min-height: 0;
  padding: 16px 18px 14px;
}
.page-dashboard #lesson-detail {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.page-dashboard #lesson-detail .lesson-detail-scroll {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-right: 4px;
}
.lesson-detail-fill {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  min-height: 0;
  gap: clamp(10px, 2vh, 18px);
}
.lesson-detail-empty {
  padding: clamp(12px, 2vh, 18px) 0;
  font-size: clamp(17px, 2vh, 21px);
  line-height: 1.5;
}
.lesson-credentials {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.8vh, 8px);
}
.page-dashboard #lesson-detail .lesson-detail-scroll .cred-line {
  padding: clamp(10px, 1.6vh, 16px) 4px;
}
.page-dashboard #lesson-detail .lesson-detail-scroll .cred-line:first-child {
  padding-top: clamp(4px, 0.8vh, 8px);
}
.page-dashboard #lesson-detail .lesson-detail-scroll .cred-label {
  margin-bottom: clamp(5px, 0.9vh, 8px);
  font-size: clamp(18px, 2.1vh, 22px);
}
.page-dashboard #lesson-detail .lesson-detail-scroll .cred-value {
  font-size: clamp(17px, 2vh, 21px);
  line-height: 1.45;
}
.lesson-join-hint {
  margin: 0;
  font-size: clamp(17px, 2vh, 21px);
  line-height: 1.5;
  color: var(--blue-light);
  text-align: center;
}
.lesson-join-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 0;
}
/* Join Lesson — Private Lessons gold button (blue text on gold gradient). */
.page-dashboard .lesson-join-btn.btn-gold {
  min-width: min(100%, 340px);
  padding: clamp(14px, 2vh, 18px) clamp(28px, 4vw, 40px);
  font-size: clamp(18px, 2.1vh, 22px);
  text-align: center;
  color: var(--blue);
  font-weight: bold;
  text-shadow: none;
  border: 2px solid var(--blue);
  background: linear-gradient(180deg, #F5E2A8 0%, var(--gold-light) 35%, var(--gold) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 4px 10px rgba(27, 61, 129, 0.12);
  transition: all 0.2s ease-out;
  text-decoration: none;
}
.page-dashboard .lesson-join-btn.btn-gold:hover {
  color: var(--blue);
  background: linear-gradient(180deg, #FDF3D8 0%, var(--gold-light) 40%, #E2C55A 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    0 5px 12px rgba(27, 61, 129, 0.14);
  transform: scale(1.02);
}
.lesson-item { padding: 10px; border: 2px solid var(--gold); border-radius: 8px; margin-bottom: 8px; cursor: pointer; }
.lesson-item.active { outline: none; }

/* Dashboard nav + list buttons — inverted Private Lessons palette (blue fill, gold text). */
.page-dashboard .dash-section-tab,
.page-dashboard .dash-nav-item:not(.disabled),
.page-dashboard .lesson-item {
  background: linear-gradient(180deg, var(--blue-light) 0%, var(--blue) 58%, #152F66 100%);
  color: var(--gold-light);
  border: 2px solid var(--gold);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 2px 5px rgba(27, 61, 129, 0.12);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease-out, border-color 0.2s ease-out, box-shadow 0.2s ease-out;
}
.page-dashboard .dash-section-tab:not(.active):hover,
.page-dashboard .dash-nav-item:not(.active):not(.disabled):hover,
.page-dashboard .lesson-item:not(.active):hover {
  background: linear-gradient(180deg, #4A6AB0 0%, var(--blue-light) 50%, var(--blue) 100%);
  box-shadow:
    inset 0 0 0 2px rgba(248, 231, 192, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 3px 8px rgba(27, 61, 129, 0.14);
}
.page-dashboard .dash-nav-item.disabled {
  background: linear-gradient(180deg, #6E7FA0 0%, #556688 58%, #455672 100%);
  color: var(--gold-light);
  border-color: rgba(212, 175, 55, 0.65);
  opacity: 1;
  background-image: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 2px 4px rgba(27, 61, 129, 0.08);
}
.page-dashboard .lesson-item {
  font-weight: 700;
  text-align: center;
}
.page-dashboard .lesson-item > div {
  text-align: center;
}
.page-dashboard .lesson-item .slot-utc {
  color: rgba(248, 231, 192, 0.82);
  font-size: 14px;
  font-weight: 700;
}
.page-dashboard .lesson-item.active .slot-utc { color: var(--gold-light); }

/* Selected dashboard buttons — inverted dual-tone orbit (blue/gold swapped vs Private Lessons). */
.page-dashboard .dash-section-tab.active,
.page-dashboard .dash-nav-item.active,
.page-dashboard .lesson-item.active {
  position: relative;
  z-index: 1;
  border: 2px solid transparent;
  background-clip: padding-box;
  color: var(--gold-light);
  background: linear-gradient(180deg, var(--blue-light) 0%, var(--blue) 58%, #152F66 100%);
  box-shadow:
    0 0 8px rgba(212, 175, 55, 0.22),
    0 0 6px rgba(27, 61, 129, 0.2);
  animation: dash-select-ambient 2.5s ease-in-out infinite;
}
.page-dashboard .dash-section-tab.active,
.page-dashboard .dash-nav-item.active {
  overflow: hidden;
}
.page-dashboard .lesson-item.active {
  overflow: visible;
}
.page-dashboard .dash-section-tab.active > *,
.page-dashboard .dash-nav-item.active > *,
.page-dashboard .lesson-item.active > * {
  position: relative;
  z-index: 2;
}
.page-dashboard .dash-section-tab.active:hover,
.page-dashboard .dash-nav-item.active:hover,
.page-dashboard .lesson-item.active:hover {
  box-shadow:
    0 0 14px rgba(212, 175, 55, 0.32),
    0 0 10px rgba(27, 61, 129, 0.36);
}
.page-dashboard .dash-section-tab.active::before,
.page-dashboard .dash-nav-item.active::before,
.page-dashboard .lesson-item.active::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-sizing: border-box;
  padding: 2px;
  background: conic-gradient(
    from 0deg,
    var(--blue) 0deg,
    var(--blue-light) 52deg,
    var(--gold-light) 128deg,
    var(--gold) 208deg,
    var(--blue-light) 286deg,
    var(--blue) 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}
.page-dashboard .dash-section-tab.active::after,
.page-dashboard .dash-nav-item.active::after,
.page-dashboard .lesson-item.active::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-sizing: border-box;
  padding: 2px;
  --orbit-angle: 0deg;
  background: conic-gradient(
    from var(--orbit-angle),
    transparent 0deg,
    transparent 248deg,
    rgba(27, 61, 129, 0.25) 262deg,
    rgba(53, 82, 150, 0.95) 280deg,
    rgba(238, 241, 247, 1) 288deg,
    rgba(248, 231, 192, 0.92) 296deg,
    rgba(212, 175, 55, 0.88) 304deg,
    rgba(248, 231, 192, 0.75) 314deg,
    transparent 326deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
  animation: select-orbit-angle 2.5s linear infinite;
}

@keyframes dash-select-ambient {
  0%, 100% {
    box-shadow:
      0 0 8px rgba(212, 175, 55, 0.22),
      0 0 6px rgba(27, 61, 129, 0.2);
  }
  50% {
    box-shadow:
      0 0 11px rgba(212, 175, 55, 0.3),
      0 0 8px rgba(27, 61, 129, 0.26);
  }
}
.lesson-detail-head { font-size: var(--h3); font-weight: bold; margin-bottom: 12px; }
.lesson-action-row {
  flex-shrink: 0;
  padding: clamp(14px, 2vh, 20px) 0 clamp(4px, 0.6vh, 8px);
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: stretch;
  gap: clamp(10px, 1.5vw, 16px);
}
.page-dashboard .lesson-action-row .btn {
  flex: 1 1 0;
  min-width: 0;
  font-size: clamp(15px, 1.8vh, 19px);
  padding: clamp(10px, 1.5vh, 14px) clamp(10px, 1.5vw, 16px);
  min-height: clamp(44px, 6vh, 54px);
  line-height: 1.35;
  color: var(--gold-light);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  background: linear-gradient(180deg, var(--blue-light) 0%, var(--blue) 58%, #152F66 100%);
  border: 2px solid var(--gold);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 3px 8px rgba(27, 61, 129, 0.14);
}
.page-dashboard .lesson-action-row .btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #4A6AB0 0%, var(--blue-light) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 4px 10px rgba(27, 61, 129, 0.18);
}
.cred-line {
  display: block;
  padding: clamp(14px, 2.5vh, 24px) clamp(4px, 0.6vw, 8px);
  border-bottom: 1px solid var(--periwinkle);
}
.cred-label {
  display: block;
  color: var(--blue-light);
  font-size: clamp(17px, 2.2vh, 22px);
  font-weight: bold;
  margin-bottom: clamp(6px, 1vh, 10px);
}
.cred-value {
  display: block;
  font-size: clamp(16px, 2vh, 20px);
  line-height: 1.5;
  color: var(--blue);
  word-break: break-word;
}
.toggle { position: relative; display: inline-block; width: 60px; height: 30px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .track { position: absolute; inset: 0; background: var(--main-bg); border-radius: 30px; border: 2px solid var(--blue); transition: 0.2s; }
.toggle .thumb { position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; background: var(--gold); border-radius: 50%; transition: 0.2s; }
.toggle input:checked + .track { background: var(--blue); }
.toggle input:checked + .track + .thumb { transform: translateX(30px); }
.toggle-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.empty-state { color: var(--blue-light); padding: 20px; font-size: var(--body); line-height: 1.6; }
.empty-state a { color: var(--blue); font-weight: bold; }

.page-dashboard .btn {
  background: linear-gradient(180deg, var(--blue-light) 0%, var(--blue) 58%, #152F66 100%);
  color: var(--gold-light);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 3px 8px rgba(27, 61, 129, 0.14);
  transition: all 0.2s ease-out;
}
.page-dashboard .btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #4A6AB0 0%, var(--blue-light) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 4px 10px rgba(27, 61, 129, 0.18);
}
.page-dashboard .btn-gold {
  background: linear-gradient(180deg, #F5E2A8 0%, var(--gold-light) 35%, var(--gold) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 4px 10px rgba(27, 61, 129, 0.12);
}
.page-dashboard .btn-gold:hover:not(:disabled) {
  background: linear-gradient(180deg, #FDF3D8 0%, var(--gold-light) 40%, #E2C55A 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    0 5px 12px rgba(27, 61, 129, 0.14);
}
.page-dashboard .btn-secondary {
  background: linear-gradient(180deg, #D8D8DB 0%, var(--base) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.page-dashboard .btn-secondary:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--offwhite) 0%, var(--periwinkle) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 7px rgba(27, 61, 129, 0.09);
}
.page-dashboard .modal {
  background: linear-gradient(168deg, var(--offwhite) 0%, #F4F6FC 55%, var(--main-bg) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    0 10px 28px rgba(27, 61, 129, 0.14);
}
.page-dashboard .cred-line {
  background: linear-gradient(90deg, transparent 0%, rgba(206, 210, 235, 0.15) 50%, transparent 100%);
  border-radius: 4px;
}

/* PDF receipt viewer overlay */
.pdf-overlay { position: fixed; inset: 0; background: rgba(27,61,129,0.65); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1100; }
.pdf-overlay iframe { width: 80vw; height: 80vh; border: 3px solid var(--gold); border-radius: 8px; background: #fff; }
.pdf-overlay .btn { margin-top: 12px; }

/* ============================================================================
   Viewport guard and soft notice
   ============================================================================ */
#viewport-guard { display: none; }

.viewport-soft-notice[hidden] { display: none !important; }
.viewport-soft-notice {
  position: fixed;
  left: 50%;
  bottom: 12px;
  z-index: 900;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(720px, calc(100vw - 32px));
  padding: 10px 14px;
  color: var(--blue);
  background: rgba(238, 241, 247, 0.96);
  border: 2px solid var(--gold);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(27, 61, 129, 0.16);
  font-size: var(--small);
  line-height: 1.5;
}
.viewport-soft-notice-close {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

