/* Shared with the website: Carlito, locally hosted under SIL OFL. */
@font-face {
  font-family: Carlito;
  src: url("/homepage/fonts/carlito-400-normal.woff2?v=e1bd1446e3") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Carlito;
  src: url("/homepage/fonts/carlito-400-italic.woff2?v=75d9ba43c7") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: Carlito;
  src: url("/homepage/fonts/carlito-700-normal.woff2?v=3943703a3d") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* Arial resized to Carlito's widths and line metrics (measured with fontTools), so the text keeps
   its place while Carlito loads instead of jumping when it swaps in. Calibri, which Carlito is
   metric-compatible with, needs no adjustment and comes first where it is installed. */
@font-face {
  font-family: "Carlito Fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 400;
  font-style: normal;
  size-adjust: 90.81%;
  ascent-override: 104.86%;
  descent-override: 29.57%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Carlito Fallback";
  src: local("Arial Italic"), local("Arial-ItalicMT");
  font-weight: 400;
  font-style: italic;
  size-adjust: 90.19%;
  ascent-override: 105.57%;
  descent-override: 29.78%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Carlito Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 700;
  font-style: normal;
  size-adjust: 86.41%;
  ascent-override: 110.19%;
  descent-override: 31.08%;
  line-gap-override: 0%;
}
:root {
  --ink: #233d36;
  --muted: #66766f;
  --green: #185b4a;
  --line: #dce3d9;
  --paper: #f7f8f2;
  --lime: #e5efc6;
  --orange: #fff0d9;
  /* System bar insets: iOS and edge-to-edge Android report them through env(). */
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  font-family: Carlito, Calibri, "Carlito Fallback", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
/* Edge-to-edge app: page content scrolls beneath this backdrop, never under the status
   bar. It has no height where the top inset is zero, as in ordinary browsers. */
body::before {
  content: "";
  position: fixed;
  z-index: 10;
  inset: 0 0 auto;
  height: var(--sat);
  background: var(--paper);
  pointer-events: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: white;
  border-radius: 11px;
  padding: 11px 16px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
}
button:hover {
  background: #eef3e8;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
button.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
button.primary:hover {
  background: #104636;
}
.quiet {
  background: transparent;
}
.danger {
  color: #a43a27;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
a.button {
  display: inline-flex;
  text-decoration: none;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 16px;
  background: white;
  min-height: 44px;
  font-weight: 600;
  font-size: 14px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #93b962;
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #b6c6b9;
  border-radius: 9px;
  background: white;
  color: var(--ink);
  min-height: 46px;
}
textarea {
  resize: vertical;
  min-height: 95px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 6px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 14px;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
  font-weight: 600;
  margin-bottom: 18px;
}
h3 {
  font-size: 16px;
  margin-bottom: 7px;
}
p {
  line-height: 1.6;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 12px;
  line-height: 1.5;
}
.shell {
  max-width: 1150px;
  margin: auto;
  padding: var(--sat) max(36px, var(--sar)) calc(50px + var(--sab)) max(36px, var(--sal));
}
.topbar {
  height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.brand {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -1px;
  display: flex;
  gap: 10px;
  align-items: center;
}
button.brand {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
}
.brand img {
  width: 34px;
  height: 34px;
}
.topright {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tag {
  background: #e9eee4;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 6px 9px;
  font-weight: 700;
}
.notice {
  background: #edf1e6;
  border: 1px solid var(--line);
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
  margin: 22px 0;
}
.notice.warning {
  background: var(--orange);
  border-color: #ead7ba;
}
.notice strong {
  font-weight: 650;
}
.heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 34px 0 27px;
  gap: 20px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--green);
}
.heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}
.stat {
  padding: 23px 25px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
}
.stat:first-child {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.stat .label {
  font-size: 12px;
  opacity: 0.8;
}
.stat .value {
  font-size: 35px;
  letter-spacing: -1px;
  margin: 12px 0 3px;
}
.stat small {
  color: inherit;
  opacity: 0.7;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
}
.cardhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.cardhead h2 {
  margin: 0;
}
.studentrow {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px 0;
  border-top: 1px solid #e8ece4;
}
.avatar {
  background: #edf1e5;
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 13px;
}
.grow {
  flex: 1;
  min-width: 0;
}
.name {
  font-weight: 600;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}
.rowmeta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.right {
  text-align: right;
}
.balance {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 7px;
}
.rowbuttons {
  display: flex;
  gap: 7px;
  margin-top: 9px;
  flex-wrap: wrap;
}
.rowbuttons button {
  padding: 7px 11px;
  min-height: 36px;
  font-size: 12px;
}
.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  border-radius: 30px;
  padding: 5px 9px;
  background: var(--lime);
  color: #3b5828;
}
.pill.amber {
  background: var(--orange);
  color: #885714;
}
.pill.gray {
  background: #eff0ec;
  color: #617067;
}
.steps {
  padding-left: 21px;
  margin-bottom: 0;
}
.steps li {
  padding-left: 4px;
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.6;
}
.steps li:last-child {
  margin-bottom: 0;
}
.steps b {
  display: block;
}
.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.actions > * {
  flex: 0 1 auto;
}
.full {
  width: 100%;
}
.separator {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}
.report {
  padding: 17px;
  background: #f4f7ec;
  border-radius: 12px;
  margin-top: 12px;
}
.report p {
  font-size: 13px;
  margin: 7px 0 12px;
}
.empty {
  padding: 20px 0;
  color: var(--muted);
  font-size: 14px;
}
.footer {
  margin: 30px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
dialog {
  width: 560px;
  max-width: calc(100% - 24px);
  max-height: 90dvh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 27px;
  box-shadow: 0 25px 100px #17372f30;
  color: var(--ink);
}
dialog::backdrop {
  background: #16352d66;
  backdrop-filter: blur(3px);
}
.dialoghead {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.dialoghead h2 {
  font-size: 24px;
  margin-top: 6px;
}
.close {
  padding: 7px 13px;
}
.linkbox {
  font:
    12px / 1.5 ui-monospace,
    monospace;
  background: #f5f7f0;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.formerror {
  color: #a43a27;
  font-size: 13px;
  margin: 13px 0;
  line-height: 1.5;
}
.preset {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.preset button {
  font-size: 12px;
  padding: 7px 12px;
  min-height: 35px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #193f33;
  color: white;
  border-radius: 12px;
  padding: 13px 20px;
  box-shadow: 0 4px 20px #0002;
  max-width: calc(100% - 32px);
  width: max-content;
  z-index: 5;
  font-size: 14px;
  display: none;
}
.portal {
  max-width: 760px;
}
.portal .hero {
  background: var(--green);
  color: white;
  border-radius: 23px;
  padding: 30px;
  margin: 25px 0;
}
.hero .eyebrow {
  color: #d6e8c2;
}
.hero .amount {
  font-size: 58px;
  letter-spacing: -2px;
  margin: 10px 0;
}
.hero small {
  color: #cbded6;
}
.hero .pill {
  margin-top: 12px;
}
.lesson {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-top: 1px solid #e8ece4;
  padding: 16px 0;
}
.lesson .actions button {
  font-size: 12px;
  padding: 7px 10px;
  min-height: 36px;
}
.lesson:last-child {
  padding-bottom: 0;
}
.textlink {
  padding: 3px;
  border: 0;
  min-height: 30px;
  background: transparent;
  color: var(--green);
  text-decoration: underline;
}
.intro {
  font-size: 14px;
  color: var(--muted);
}
.outboxitem {
  border-top: 1px solid var(--line);
  padding: 13px 0;
  font-size: 13px;
}
.outboxitem button {
  margin-top: 9px;
}
.check {
  display: flex;
  align-items: start;
  gap: 10px;
  line-height: 1.55;
  font-size: 13px;
  font-weight: 400;
}
.check input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 2px 0;
}
.broken {
  max-width: 560px;
  margin: 70px auto;
}
.hint {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 0;
}
@media (max-width: 800px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .grid aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .shell {
    padding: var(--sat) max(22px, var(--sar)) calc(35px + var(--sab)) max(22px, var(--sal));
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 20px;
  }
  .heading {
    align-items: start;
  }
  .topbar {
    height: 78px;
  }
  .stat .value {
    font-size: 29px;
  }
}
@media (max-width: 540px) {
  .shell {
    padding: var(--sat) max(16px, var(--sar)) calc(28px + var(--sab)) max(16px, var(--sal));
  }
  .topright {
    gap: 5px;
  }
  .topright .tag {
    display: none;
  }
  .brand {
    font-size: 21px;
  }
  .heading {
    display: block;
    margin: 28px 0 22px;
  }
  .heading > .actions {
    margin-top: 20px;
  }
  .stats {
    grid-template-columns: 1.25fr 1fr 1fr;
    gap: 7px;
  }
  .stat {
    padding: 16px 10px;
    border-radius: 13px;
  }
  .stat .value {
    font-size: 25px;
  }
  .stat .label {
    font-size: 10px;
  }
  .stat small {
    font-size: 10px;
  }
  .grid aside {
    display: block;
  }
  .card {
    padding: 20px 17px;
  }
  .avatar {
    min-width: 37px;
    height: 40px;
  }
  .studentrow {
    gap: 10px;
  }
  .rowbuttons {
    gap: 5px;
  }
  .rowbuttons button {
    padding: 7px 9px;
  }
  .balance {
    font-size: 17px;
  }
  .notice {
    padding: 12px 14px;
  }
  .portal .hero {
    padding: 25px;
  }
  .hero .amount {
    font-size: 51px;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .lesson {
    align-items: start;
  }
  .lesson .actions {
    justify-content: end;
  }
  .footer {
    line-height: 1.6;
  }
  dialog {
    padding: 22px;
  }
  .heading h1 {
    font-size: 34px;
  }
}
@media (max-width: 540px) {
  .rowbuttons button,
  .lesson .actions button,
  .preset button {
    min-height: 44px;
  }
}

.studio {
  max-width: 1000px;
}
@media (max-width: 540px) {
  .studentrow .pill {
    max-width: 104px;
    text-align: center;
  }
}

/* Mobile lesson entry */
.lesson-dialog {
  width: 520px;
  padding: 24px;
  max-height: calc(100dvh - 24px);
}
.lesson-dialog .dialoghead h2 {
  font-size: 23px;
  margin-bottom: 14px;
}
.lesson-progress {
  list-style: none;
  padding: 0;
  margin: 6px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.lesson-progress li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}
.lesson-progress li > span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #edf1e8;
  font-size: 11px;
}
.lesson-progress li[aria-current] {
  color: var(--green);
  font-weight: 700;
}
.lesson-progress li[aria-current] > span {
  background: var(--green);
  color: white;
}
.lesson-progress li.complete > span {
  background: var(--lime);
  color: var(--green);
}
.step-title {
  font-size: 22px;
  letter-spacing: -0.6px;
  margin-bottom: 20px;
  outline: none;
}
.student-picker {
  display: grid;
  gap: 9px;
}
.student-choice {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
  padding: 14px;
  min-height: 76px;
}
.student-choice .name,
.student-choice .rowmeta {
  display: block;
}
.student-choice > .grow {
  white-space: normal;
}
.student-choice > span:last-child {
  font-size: 22px;
  color: var(--green);
}
.lesson-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  margin-bottom: 12px;
}
.lesson-person strong {
  overflow-wrap: anywhere;
}
.lesson-rate {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 20px 0 32px;
  font-size: 14px;
  color: var(--muted);
}
.lesson-rate strong {
  color: var(--ink);
  font-weight: 500;
}
.lesson-dialog input[type="date"] {
  width: min(100%, 16rem);
  min-height: 58px;
  font-size: 18px;
  max-width: 100%;
  min-width: 0;
}
.duration-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 8px 0 20px;
}
.duration-grid button {
  display: grid;
  place-content: center;
  gap: 3px;
  min-height: 78px;
  padding: 10px 4px;
  background: #f8faf4;
}
.duration-grid button strong {
  font-size: 24px;
  font-weight: 600;
}
.duration-grid button span {
  font-size: 12px;
  font-weight: 400;
}
.duration-grid button[aria-pressed="true"] {
  color: white;
  background: var(--green);
  border-color: var(--green);
}
.custom-duration {
  margin: 6px 0 20px;
}
.custom-duration summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  min-height: 44px;
  align-content: center;
}
.lesson-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.lesson-total > div {
  display: grid;
  gap: 5px;
  font-size: 14px;
}
.lesson-total > strong {
  font-size: 30px;
  letter-spacing: -1px;
}
.wizard-footer {
  display: flex;
  gap: 10px;
  position: sticky;
  bottom: -24px;
  background: white;
  padding: 14px 0 8px;
  margin-bottom: -8px;
}
.wizard-footer > button {
  min-height: 52px;
}
.wizard-footer > .primary {
  flex: 1;
}
.lesson-dialog #formerror:empty {
  margin: 0;
}
@media (max-width: 540px) {
  .lesson-dialog {
    padding: 20px;
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
  }
  .duration-grid {
    gap: 8px;
  }
  .duration-grid button {
    min-height: 72px;
  }
  .step-title {
    font-size: 21px;
  }
  .wizard-footer {
    bottom: -20px;
  }
  .lesson-progress {
    gap: 8px;
  }
}

.payment-review {
  border-color: #d5dfbc;
}
.payment-review .report {
  background: #f6f8ee;
}
.reported-amount {
  font-size: 25px;
  letter-spacing: -0.7px;
}
.report h3 {
  margin-bottom: 4px;
}
.report .receipt-instruction {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}
.swipe-track {
  position: relative;
  height: 60px;
  border-radius: 14px;
  background: #e2eccf;
  border: 1px solid #d1dfb7;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  max-width: 430px;
}
.swipe-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-left: 56px;
  padding-right: 8px;
  color: #30543e;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
}
.swipe-handle {
  display: grid;
  place-items: center;
  position: absolute;
  top: 5px;
  left: 5px;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--green);
  color: white;
  font-size: 26px;
  touch-action: none;
  cursor: grab;
  transition: transform 0.18s ease;
}
.swiping .swipe-handle {
  transition: none;
  cursor: grabbing;
}
.swipe-ready {
  background: var(--green);
}
.swipe-ready .swipe-label {
  color: white;
  padding-left: 8px;
  padding-right: 56px;
}
.swipe-ready .swipe-handle {
  background: #ddecbb;
  color: var(--green);
}
.payment-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.payment-actions button {
  font-size: 12px;
}
.payment-actions .textlink {
  color: var(--muted);
}
@media (prefers-reduced-motion: reduce) {
  .swipe-handle {
    transition: none;
  }
}

.applepay-button {
  background: #111;
  color: white;
  border-color: #111;
  font-size: 21px;
  font-weight: 600;
  min-height: 52px;
  letter-spacing: -0.5px;
}
.applepay-button:hover {
  background: #282828;
}
.applepay-status {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin: 7px 0 14px;
}
.payment-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
  margin: 18px 0;
}
.payment-divider:before,
.payment-divider:after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.coach-assistant {
  display: flex;
  gap: 15px;
  align-items: start;
}
.assistant-avatar {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--lime);
  font-size: 26px;
  color: var(--green);
}
.coach-assistant h2 {
  margin: 0 0 7px;
}
.coach-assistant p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}
.assistant-subtitle {
  color: var(--muted);
  font-size: 12px;
}
.chat-messages {
  max-height: 320px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 5px 3px;
}
.chat-bubble {
  max-width: 90%;
  font-size: 14px;
  line-height: 1.55;
  border-radius: 14px;
  padding: 12px 15px;
  overflow-wrap: anywhere;
}
.chat-bubble.assistant {
  background: #eff3e8;
  align-self: flex-start;
}
.chat-bubble.user {
  background: var(--green);
  color: white;
  align-self: flex-end;
}
.chat-topics {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 15px;
}
.chat-topics button {
  font-size: 12px;
  padding: 9px 11px;
}
.chat-compose {
  display: flex;
  gap: 8px;
}
.chat-compose input {
  min-width: 0;
}
.chat-compose button {
  flex-shrink: 0;
}

.profile-avatar {
  border: 1px solid #cbd8b7;
  background: #e7efda;
  color: var(--green);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.profile-avatar:hover {
  background: #d9e7c4;
}
.profile-avatar.large {
  width: 58px;
  height: 58px;
  font-size: 20px;
}
.profile-identity {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 4px 0 22px;
}
.profile-identity .rowmeta {
  margin-top: 5px;
}
.qr-profile {
  width: 170px;
  max-width: 100%;
  margin: 16px auto 5px;
}
.qr-profile svg,
.qr-code svg {
  display: block;
  width: 100%;
  height: auto;
}
.qr-empty {
  margin: 16px 0;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.upload-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  background: #f5f8ef;
  margin-bottom: 5px;
}
.qr-file {
  width: 100%;
  font-size: 12px;
  min-height: 42px;
  padding: 8px;
}
.qr-file::file-selector-button {
  border: 0;
  border-radius: 5px;
  padding: 7px;
  background: #e7efda;
  color: var(--green);
  margin-right: 8px;
}
.zelle-qr {
  text-align: center;
  padding: 0 0 22px;
}
.qr-code {
  width: 192px;
  max-width: 100%;
  margin: 0 auto 10px;
}
.qr-code.expanded {
  width: 280px;
}
.zelle-qr p {
  font-size: 12px;
  color: var(--muted);
  margin: 7px 0 12px;
}
.zelle-qr > strong {
  font-size: 14px;
}
.zelle-qr button {
  font-size: 12px;
}
.qr-missing {
  text-align: center;
  margin: 0 0 18px;
}

/* Touch layouts and iPhone safe areas. Keep zoom and native form controls available. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
}
body:has(dialog[open]) {
  overflow: hidden;
}
input,
select,
textarea {
  font-size: 16px;
  min-width: 0;
  max-width: 100%;
}
input[type="date"] {
  display: block;
  min-width: 0;
  max-width: 100%;
}
input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}
button,
a.button {
  overflow-wrap: anywhere;
}
button:active,
a.button:active {
  filter: brightness(0.95);
}
.studentrow {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 12px;
}
.studentrow > .avatar {
  width: 44px;
  align-self: start;
}
.studentrow > .right {
  max-width: 140px;
  overflow-wrap: anywhere;
}
.studentrow > .rowbuttons {
  grid-column: 2 / -1;
  margin: 0;
}
.profile-identity > div:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.upload-qr {
  margin-top: 16px;
  font-size: 14px;
}
.qr-file[hidden] {
  display: none;
}
.check {
  min-height: 48px;
  align-items: center;
  padding: 8px 0;
  cursor: pointer;
}
.check input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  flex-shrink: 0;
  accent-color: var(--green);
}
dialog {
  overscroll-behavior: contain;
  scroll-padding-block: 82px 100px;
}
.dialoghead h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}
.close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}
.form-footer {
  margin: 20px 0 0;
}
#formerror:empty,
#qrstatus:empty {
  display: none;
}
.hero .amount,
.stat .value {
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 600px), (max-height: 500px) and (pointer: coarse) {
  .shell {
    padding: var(--sat) max(16px, var(--sar)) calc(28px + var(--sab)) max(16px, var(--sal));
  }
  .studio {
    padding-bottom: calc(112px + var(--sab));
  }
  .topbar {
    height: 72px;
    gap: 8px;
  }
  .brand {
    font-size: 21px;
    gap: 8px;
  }
  .topright {
    flex-shrink: 0;
  }
  .heading {
    display: block;
    margin: 24px 0;
  }
  .heading h1 {
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -1px;
  }
  .heading p {
    font-size: 14px;
  }
  .eyebrow {
    font-size: 10px;
    letter-spacing: 1.3px;
    line-height: 1.5;
  }
  .studio .lesson-dock {
    position: fixed;
    z-index: 3;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 12px max(16px, var(--sar)) calc(12px + var(--sab)) max(16px, var(--sal));
    background: #f7f8f2f5;
    border-top: 1px solid var(--line);
    backdrop-filter: blur(12px);
  }
  .lesson-dock > .primary {
    width: 100%;
    min-height: 52px;
    font-size: 16px;
    box-shadow: 0 3px 12px #185b4a18;
  }
  body:has(dialog[open]) .lesson-dock {
    visibility: hidden;
  }
  .stats {
    gap: 8px;
    margin-bottom: 22px;
  }
  .stat {
    padding: 16px 10px;
  }
  .stat .value {
    font-size: clamp(20px, 6vw, 27px);
    letter-spacing: -0.7px;
  }
  .stat .label {
    font-size: 10px;
  }
  .stat small {
    font-size: 11px;
  }
  .card {
    padding: 18px 16px;
    border-radius: 18px;
    margin-bottom: 16px;
  }
  .cardhead {
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }
  .cardhead h2 {
    font-size: 20px;
  }
  .studentrow {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 18px 0;
  }
  .studentrow > .avatar {
    width: 40px;
    min-width: 40px;
    height: 40px;
  }
  .studentrow > .right {
    max-width: 100px;
  }
  .studentrow .balance {
    font-size: 17px;
  }
  .studentrow .pill {
    max-width: 100px;
    line-height: 1.3;
  }
  .studentrow > .rowbuttons {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .rowbuttons button {
    min-height: 46px;
    font-size: 13px;
  }
  .textlink {
    min-height: 44px;
    padding: 10px 6px;
  }
  .lesson .actions button,
  .preset button {
    min-height: 44px;
  }
  .payment-actions {
    gap: 8px;
  }
  .payment-actions > button {
    min-height: 46px;
  }
  .payment-actions > button:first-child {
    flex: 1;
  }
  .report {
    padding: 14px;
  }
  .report .cardhead {
    align-items: start;
  }
  .reported-amount {
    font-size: 23px;
  }
  .swipe-label {
    font-size: 12px;
  }
  .portal .hero {
    padding: 22px;
    margin: 20px 0;
    border-radius: 20px;
  }
  .hero .amount {
    font-size: clamp(36px, 12vw, 51px);
  }
  .hero small {
    font-size: 12px;
    line-height: 1.6;
  }
  .zelle-qr button {
    width: 100%;
    min-height: 48px;
    font-size: 14px;
  }
  .coach-assistant {
    gap: 12px;
  }
  .coach-assistant h2 {
    font-size: 20px;
  }
  dialog,
  .lesson-dialog {
    position: fixed;
    inset: auto 0 calc(100% - var(--visible-top, 0px) - var(--visible-height, 100dvh));
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    max-height: calc(var(--visible-height, 100dvh) - max(12px, var(--sat)));
    padding: 20px max(20px, var(--sar)) calc(20px + var(--sab)) max(20px, var(--sal));
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
  }
  .dialoghead {
    position: sticky;
    top: -20px;
    z-index: 2;
    background: white;
    margin: -20px -20px 16px;
    padding: 16px 20px 10px;
    border-bottom: 1px solid #e8ece4;
    align-items: center;
  }
  .dialoghead h2,
  .lesson-dialog .dialoghead h2 {
    font-size: 22px;
    margin: 0;
    line-height: 1.25;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .linkbox {
    font-size: 16px;
    line-height: 1.45;
    /* Five lines hold a whole student link on a 320px phone; 26px is the padding and border. */
    min-height: calc(5lh + 26px);
  }
  dialog > .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  dialog > .actions > a {
    grid-column: 1 / -1;
    justify-content: center;
  }
  dialog > .actions > * {
    min-height: 48px;
  }
  dialog .full {
    min-height: 48px;
  }
  .form-footer,
  .wizard-footer {
    position: sticky;
    z-index: 1;
    bottom: calc(-20px - var(--sab));
    margin: 16px -20px calc(-20px - var(--sab));
    padding: 12px 20px calc(12px + var(--sab));
    background: white;
    border-top: 1px solid var(--line);
  }
  .form-footer .primary,
  .wizard-footer > button {
    min-height: 52px;
    font-size: 16px;
  }
  .lesson-progress {
    margin: 4px 0 22px;
  }
  .step-title {
    font-size: 21px;
    margin-bottom: 16px;
  }
  .lesson-person {
    margin-bottom: 8px;
    padding: 8px 0;
  }
  .duration-grid {
    gap: 8px;
  }
  .duration-grid button {
    min-height: 68px;
  }
  .duration-grid button strong {
    font-size: 23px;
  }
  .lesson-rate {
    margin-bottom: 24px;
  }
  .chat-messages {
    max-height: min(320px, 35dvh);
  }
  .chat-topics {
    gap: 8px;
  }
  .chat-topics button {
    min-height: 44px;
  }
  .chat-compose button {
    min-height: 48px;
  }
  #toast {
    bottom: calc(24px + var(--sab));
    font-size: 14px;
    line-height: 1.4;
  }
  body:has(.studio) > #toast {
    bottom: calc(90px + var(--sab));
  }
}
@media (max-width: 359px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 8px;
  }
  .stat:first-child .value {
    grid-column: 2;
    grid-row: 1 / 3;
    margin: 0;
  }
  .stat:first-child small {
    grid-column: 1;
  }
  .stat:not(:first-child) {
    padding: 12px;
  }
  .stat:not(:first-child) .value {
    margin: 6px 0;
  }
  .brand {
    font-size: 19px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .portal .topright .pill {
    font-size: 10px;
    padding: 5px 7px;
  }
  .studentrow {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 8px;
  }
  .studentrow > .avatar {
    width: 32px;
    min-width: 32px;
    height: 36px;
  }
  .studentrow > .right {
    max-width: 85px;
  }
  .studentrow .balance {
    font-size: 15px;
  }
  .lesson-progress {
    gap: 6px;
  }
  .lesson-progress li {
    font-size: 11px;
    gap: 5px;
  }
  .duration-grid {
    gap: 6px;
  }
}

h1,
h2,
h3,
.rowmeta,
.lesson-person strong {
  overflow-wrap: anywhere;
}
.lesson-person > div:last-child,
.report .cardhead > div {
  min-width: 0;
}

/* Gesture shortcuts never replace visible buttons or bank verification. */
.student-swipe {
  position: relative;
  border-top: 1px solid #e8ece4;
  overflow: hidden;
  isolation: isolate;
}
.student-swipe .studentrow {
  position: relative;
  z-index: 1;
  background: white;
  border-top: 0;
  transition: transform 0.2s ease;
}
.student-quick,
.student-invite {
  display: none;
}
.gesture-hint,
.sheet-grip {
  display: none;
}
dialog {
  transition: transform 0.18s ease;
}
.gesture-dragging {
  /* biome-ignore lint/complexity/noImportantStyles: a drag must follow the finger even over a rule that animates the element. */
  transition: none !important;
}
@media (max-width: 600px), (pointer: coarse) {
  .student-swipe:not([data-locked]) .studentrow {
    touch-action: pan-y pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
  }
  .student-quick,
  .student-invite {
    display: flex;
    position: absolute;
    inset: 8px 0 8px auto;
    width: 100px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: var(--green);
    color: white;
    border-color: var(--green);
    font-size: 13px;
    line-height: 1.3;
    padding: 10px;
    visibility: hidden;
  }
  .student-invite {
    inset: 8px auto 8px 0;
    background: #365c78;
    border-color: #365c78;
  }
  .student-invite:hover {
    background: #29475c;
  }
  .student-quick span,
  .student-invite span {
    font-size: 26px;
  }
  .student-quick:hover {
    background: #104636;
  }
  .student-swipe[data-drag-side="left"] .student-quick,
  .student-swipe[data-swipe-side="left"]:not([data-drag-side]) .student-quick {
    visibility: visible;
  }
  .student-swipe[data-drag-side="right"] .student-invite,
  .student-swipe[data-swipe-side="right"]:not([data-drag-side]) .student-invite {
    visibility: visible;
  }
  .student-swipe[data-swipe-side="left"] .studentrow {
    transform: translateX(-108px);
  }
  .student-swipe[data-swipe-side="right"] .studentrow {
    transform: translateX(108px);
  }
  .gesture-hint {
    display: block;
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted);
    margin: -4px 0 14px;
  }
  .back-hint {
    margin: -10px 0 16px;
  }
  .sheet-grip {
    display: block;
    position: absolute;
    top: 7px;
    left: calc(50% - 20px);
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: #c7d1c6;
  }
  .dialoghead {
    padding-top: 24px;
    touch-action: pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
  }
  .lesson-dialog {
    touch-action: pan-y pinch-zoom;
  }
  .lesson-dialog .dialoghead {
    touch-action: pinch-zoom;
  }
  .gesture-ready .sheet-grip {
    background: var(--green);
  }
}
@media (prefers-reduced-motion: reduce) {
  dialog,
  .student-swipe .studentrow {
    transition: none;
  }
}

/* Keep the instructor's working area focused on balances and confirmation. */
.studio .studio-heading {
  margin: 20px 0;
  align-items: center;
}
.studio .studio-heading h1 {
  font-size: 22px;
  letter-spacing: -0.5px;
  margin-bottom: 5px;
}
.studio .stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.studio .stat:first-child {
  grid-column: auto;
  display: block;
}
.demo-qr .hint {
  text-align: center;
  margin: 8px 0 16px;
}
@media (max-width: 359px) {
  .studio .stat:first-child .value {
    margin: 6px 0;
  }
}

.connection-status {
  position: sticky;
  top: var(--sat);
  margin-top: var(--sat);
  z-index: 4;
  background: #fff0d9;
  color: #70491c;
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
}
.connection-status + .shell {
  padding-top: 0;
}

/* Whole-lesson receipts: optional swipe shortcuts and an explicit confirmation. */
.lesson-swipe {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid #e8ece4;
}
.lesson-swipe > .lesson {
  position: relative;
  z-index: 1;
  background: white;
  border: 0;
  transition: transform 0.2s ease;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.lesson-paid-action,
.lesson-cancel-action {
  display: none;
}
.lesson-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
  min-width: 0;
  min-height: 84px;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 12px 4px;
  font-weight: 400;
}
.lesson-open .rowmeta,
.lesson-open small {
  display: block;
  margin-top: 4px;
}
.lesson-open strong {
  white-space: nowrap;
}
.lesson-menu {
  flex: 0 0 44px;
  min-width: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 26px;
}
.lesson-open:focus-visible {
  outline-offset: -3px;
}
.lesson-options {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}
.lesson-payment-hint .textlink {
  display: block;
  margin-left: auto;
}
.lesson-payment-hint {
  margin: 12px 0;
}
.payment-selection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.payment-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 12px;
  margin: 10px 0;
  cursor: pointer;
  min-height: 70px;
}
.payment-choice:has(input:checked) {
  border-color: var(--green);
  background: #f1f6e8;
}
.payment-choice input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  flex: 0 0 22px;
  accent-color: var(--green);
  margin: 0;
}
.payment-choice span {
  flex: 1;
  min-width: 0;
}
.payment-choice small {
  display: block;
  margin-top: 4px;
}
.payment-choice > strong {
  white-space: nowrap;
}
.receipt-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
.receipt-total strong {
  font-size: 24px;
}
.receipt-footer .hint {
  margin: 7px 0 12px;
}
.payment-choices {
  margin-bottom: 22px;
}
@media (max-width: 600px), (pointer: coarse) {
  .lesson-swipe:not([data-locked]) > .lesson {
    touch-action: pan-y pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
  }
  .lesson-paid-action,
  .lesson-cancel-action {
    display: flex;
    position: absolute;
    inset: 8px 0 8px auto;
    width: 100px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--green);
    color: white;
    border-color: var(--green);
    visibility: hidden;
    padding: 10px;
    font-size: 13px;
  }
  .lesson-cancel-action {
    inset: 8px auto 8px 0;
    background: #a22f31;
    border-color: #a22f31;
  }
  .lesson-cancel-action:hover {
    background: #812528;
  }
  .lesson-paid-action span,
  .lesson-cancel-action span {
    font-size: 24px;
  }
  .lesson-paid-action:hover {
    background: #104636;
  }
  .lesson-swipe[data-drag-side="left"] .lesson-paid-action,
  .lesson-swipe[data-swipe-side="left"]:not([data-drag-side]) .lesson-paid-action {
    visibility: visible;
  }
  .lesson-swipe[data-drag-side="right"] .lesson-cancel-action,
  .lesson-swipe[data-swipe-side="right"]:not([data-drag-side]) .lesson-cancel-action {
    visibility: visible;
  }
  .lesson-swipe[data-swipe-side="left"] > .lesson {
    transform: translateX(-108px);
  }
  .lesson-swipe[data-swipe-side="right"] > .lesson {
    transform: translateX(108px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .lesson-swipe > .lesson {
    transition: none;
  }
}

/* Compact student rows; the global lesson dock remains the main entry point. */
.student-swipe .studentrow {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 0;
}
.student-open {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  min-height: 88px;
  padding: 8px 3px;
  border: 0;
  background: transparent;
  text-align: left;
  font-weight: 400;
}
.student-open .avatar {
  flex: 0 0 36px;
  min-width: 36px;
  width: 36px;
  height: 40px;
}
.student-open .grow {
  min-width: 0;
  flex: 1;
}
.student-open .name,
.student-open .rowmeta,
.student-open .balance {
  display: block;
}
.student-open .name,
.student-open .rowmeta {
  overflow-wrap: anywhere;
}
.student-open .right {
  flex: 0 0 auto;
  max-width: 100px;
}
.student-open .balance {
  white-space: nowrap;
}
.student-menu {
  flex: 0 0 44px;
  min-width: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 26px;
}
.student-open:focus-visible {
  outline-offset: -3px;
}
.student-gesture-hint .textlink {
  display: block;
  margin-left: auto;
}
@media (max-width: 359px) {
  .student-open {
    gap: 6px;
  }
  .student-open .avatar {
    display: none;
  }
  .student-open .name {
    font-size: 15px;
  }
  .student-open .balance {
    font-size: 16px;
  }
}

.student-search-label {
  margin-top: 0;
}
#studentsearch {
  margin-bottom: 14px;
}
.student-choice[hidden] {
  display: none;
}
form[aria-busy="true"] button {
  cursor: wait;
}
/* One select style everywhere: tablet WebKit otherwise draws a short native control. */
select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 48px;
  padding: 12px 36px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background-color: white;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

/* Instructor authentication shares the existing typography and controls. */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 60px;
  align-items: start;
  padding: 56px 0 30px;
  max-width: 1000px;
  margin: auto;
}
.auth-intro {
  padding-top: 30px;
}
.auth-intro h1 {
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.08;
}
.auth-intro p {
  max-width: 320px;
  color: var(--muted);
}
.auth-card {
  padding: 30px;
}
.auth-card h2 {
  font-size: 27px;
  margin-bottom: 10px;
}
.auth-card .intro {
  font-size: 14px;
}
.auth-card form > button {
  margin-top: 8px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin: 20px 0;
}
.auth-divider:before,
.auth-divider:after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.social-logins {
  display: grid;
  gap: 10px;
}
.social-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.apple-login {
  background: #000;
  border-color: #000;
  color: #fff;
}
.apple-login svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 14px;
}
.auth-links button {
  font-size: 13px;
  min-height: 44px;
}
.demo-entry {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 18px;
}
.demo-entry .hint {
  margin: 12px 0 0;
}
.demo-account {
  margin-top: 20px;
}
.auth-card .notice {
  font-size: 13px;
}
.auth-card .formerror:empty {
  display: none;
}
@media (max-width: 700px) {
  .auth-layout {
    display: block;
    padding: 26px 0 0;
  }
  .auth-intro {
    padding: 0;
  }
  .auth-intro h1 {
    font-size: 35px;
    margin-bottom: 12px;
  }
  .auth-intro p {
    max-width: none;
    font-size: 14px;
  }
  .auth-intro .eyebrow {
    font-size: 10px;
  }
  .auth-card {
    padding: 24px 20px;
  }
  .auth-links {
    justify-content: space-between;
  }
}

.information-page {
  max-width: 820px;
}
.information-page .brand {
  text-decoration: none;
}
.information-page article h2:not(:first-child) {
  margin-top: 30px;
}
.information-page article li {
  line-height: 1.6;
  margin-bottom: 12px;
}
.information-page article a {
  overflow-wrap: anywhere;
}

.payment-lesson-list {
  margin: 14px 0 18px;
  border-top: 1px solid var(--line);
}
.payment-lesson {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.payment-lesson > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.payment-lesson small {
  color: var(--muted);
  font-size: 12px;
}
#studentpaymentmethod {
  margin-bottom: 8px;
}
#student-zelle-details[hidden] {
  display: none;
}
.developer-credit {
  flex-basis: 100%;
  font-size: 11px;
}
.developer-credit a {
  text-underline-offset: 3px;
}

.lesson-dock > .assistant-launch {
  min-height: 52px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
}
.assistant-launch img {
  flex: none;
}
@media (max-width: 600px), (max-height: 500px) and (pointer: coarse) {
  .studio .lesson-dock {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .lesson-dock > button {
    white-space: nowrap;
    min-width: 0;
  }
}

#feature-form[hidden] {
  display: none;
}
.feature-idea {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.feature-idea h3 {
  margin: 0 0 8px;
}
.feature-idea p {
  white-space: pre-wrap;
}
.feature-vote {
  min-height: 44px;
}
#feature-list {
  margin-top: 18px;
}
#feature-form {
  margin-top: 18px;
}
.ideas-invitation {
  display: flex;
  align-items: center;
  gap: 28px;
  background: #f0f4e6;
  border-color: #d5dfc6;
  padding: 28px;
}
.ideas-art {
  flex: none;
  width: 144px;
  height: 112px;
}
.ideas-copy {
  min-width: 0;
}
.ideas-copy .eyebrow {
  margin-bottom: 8px;
  letter-spacing: 1.2px;
}
.ideas-copy h2 {
  margin-bottom: 9px;
  font-size: 24px;
}
.ideas-copy > p:not(.eyebrow) {
  font-size: 14px;
  color: var(--muted);
  max-width: 460px;
  margin-bottom: 18px;
}
.ideas-copy button {
  display: inline-flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  border-color: #b8c9ac;
}
.ideas-copy button span {
  font-size: 20px;
  font-weight: 400;
}
@media (max-width: 540px) {
  .ideas-invitation {
    align-items: flex-start;
    gap: 10px;
    padding: 20px 17px;
    flex-wrap: wrap;
  }
  .ideas-art {
    width: 96px;
    height: auto;
    margin-bottom: 2px;
  }
  .ideas-copy {
    flex: 1 1 100%;
  }
  .ideas-copy h2 {
    font-size: 23px;
  }
  .ideas-copy button {
    width: 100%;
  }
}

/* Private owner summary; no extra horizontal scrolling on phones. */
.owner-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.owner-metrics .stat {
  color: var(--ink);
  grid-column: auto;
  display: block;
  min-width: 0;
  padding: 16px;
  background: #eef6f2;
  border-radius: 16px;
}
.owner-metrics .value {
  font-size: 30px;
}
.owner-table {
  overflow-x: auto;
  margin: 12px 0;
}
.owner-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.owner-table th,
.owner-table td {
  text-align: right;
  padding: 10px 6px;
  border-bottom: 1px solid #dde6e0;
}
.owner-table th:first-child,
.owner-table td:first-child {
  text-align: left;
}
.owner-table th {
  white-space: normal;
}
#owner-root summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
}
.owner-instructors {
  list-style: none;
  padding: 0;
  margin: 12px 0 24px;
}
.owner-instructors li {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid #dde6e0;
  overflow-wrap: anywhere;
}
.owner-instructors time {
  color: var(--muted);
  font-size: 14px;
}
#insights-controls:empty {
  display: none;
}

.owner-metrics .stat .label,
.owner-metrics .stat .value {
  color: var(--ink);
}

/* A focused two-step composer keeps the active field above the phone keyboard. */
#feature-root [hidden] {
  /* biome-ignore lint/complexity/noImportantStyles: `hidden` must win over the display of every component inside the board. */
  display: none !important;
}
.feature-composing #feature-form {
  margin-top: 0;
}
.feature-composing #feature-step {
  margin: 0 0 12px;
}
.feature-composing #feature-description {
  min-height: 76px;
  height: 76px;
  resize: vertical;
}
.feature-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.feature-form-actions button {
  flex: 1;
  min-height: 48px;
}
.feature-privacy {
  font-size: 12px;
  line-height: 1.4;
  margin: 12px 0 0;
}
.feature-composing #feature-status:empty,
.feature-composing #formerror:empty {
  display: none;
}

/* Readable working screens: preserve text size and let content take more space. */
body {
  font-size: 17px;
}
button,
a.button {
  font-size: 16px;
}
label {
  font-size: 16px;
}
input,
select,
textarea {
  font-size: 18px;
}
h3 {
  font-size: 19px;
}
small,
.hint,
.rowmeta,
.gesture-hint,
.intro,
.notice,
.formerror,
.check,
.steps li,
.report p,
.report .receipt-instruction,
.payment-lesson,
.payment-lesson small,
.connection-status,
.assistant-subtitle,
.qr-empty,
.qr-file,
.zelle-qr p,
.feature-privacy {
  font-size: 14px;
  line-height: 1.5;
}
.eyebrow,
.pill,
.stat .label,
.auth-divider,
.developer-credit {
  font-size: 13px;
}
.footer {
  font-size: 14px;
}
.footer .developer-credit {
  font-size: 13px;
}
.heading p,
.auth-intro p,
.auth-card .intro,
.ideas-copy > p:not(.eyebrow),
.empty {
  font-size: 16px;
}
.auth-links button,
.rowbuttons button,
.lesson .actions button,
.preset button,
.payment-actions button,
.chat-topics button,
.zelle-qr button {
  font-size: 16px;
  min-height: 44px;
}
.chat-bubble {
  font-size: 17px;
}
.coach-assistant p {
  font-size: 16px;
}
.studio .studio-heading h1 {
  font-size: 26px;
  line-height: 1.2;
}
.studio .stats {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 12px;
}
.studio .stats .stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-width: 0;
  min-height: 174px;
  padding: 24px 12px;
  gap: 12px;
}
.studio .stats .stat .label {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  opacity: 1;
  letter-spacing: 0.5px;
}
.studio .stats .stat .value {
  font-size: clamp(40px, 11vw, 64px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin: 0;
  max-width: 100%;
  white-space: nowrap;
}
.studio .stats .stat:last-child .value {
  font-size: clamp(40px, 11vw, 56px);
}
.studio .stats .stat:last-child .label {
  color: var(--muted);
}
.student-open .name {
  font-size: 18px;
  line-height: 1.3;
}
.studentrow .balance,
.student-open .balance,
.lesson .balance {
  font-size: 24px;
  line-height: 1.2;
}
.student-open .right {
  max-width: none;
}
.student-open .rowmeta {
  font-size: 14px;
}
.studentrow .pill {
  font-size: 13px;
  max-width: none;
  line-height: 1.3;
}
.lesson-open {
  font-size: 17px;
  gap: 16px;
}
.lesson-open > span {
  min-width: 0;
}
.lesson-open > strong,
.payment-choice > strong,
.payment-lesson > strong {
  font-size: 23px;
  font-variant-numeric: tabular-nums;
}
.lesson-balance strong {
  display: block;
  font-size: 32px;
  line-height: 1.25;
}
.reported-amount,
.receipt-total strong {
  font-size: 32px;
}
.swipe-label {
  font-size: 16px;
}
.portal .hero {
  text-align: center;
  padding: 30px 20px;
}
.hero .eyebrow {
  font-size: 15px;
  letter-spacing: 1px;
}
.hero .amount {
  font-size: clamp(44px, 12vw, 64px);
  font-weight: 700;
  line-height: 1.1;
}
.hero small {
  font-size: 14px;
}
.hero .pill {
  font-size: 14px;
}
.owner-metrics .stat {
  text-align: center;
}
.owner-metrics .value {
  font-size: 40px;
  font-weight: 700;
}
.owner-metrics .label {
  font-size: 16px;
  opacity: 1;
}
.owner-table table {
  font-size: 16px;
}
.duration-grid button span,
.lesson-progress li,
.custom-duration summary {
  font-size: 14px;
}
.lesson-total > div {
  font-size: 16px;
}
.lesson-total > strong {
  font-size: 34px;
}
@media (max-width: 600px) {
  .studio .stats .stat {
    min-height: 156px;
    padding: 20px 10px;
  }
  .studio .stats {
    gap: 10px;
  }
  .student-open .avatar {
    display: none;
  }
  .student-open {
    gap: 12px;
    padding: 14px 3px;
    min-height: 96px;
  }
  .student-open .grow {
    flex: 1 1 50%;
  }
  .student-open .right {
    flex: 0 1 auto;
    min-width: 0;
  }
  .student-open .balance {
    white-space: nowrap;
  }
  .student-open.balance-wide {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .student-open.balance-wide .right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .student-open.balance-wide .balance {
    margin: 0;
  }
  .lesson-dock > .primary,
  .lesson-dock > .assistant-launch {
    font-size: 17px;
  }
  .lesson-dock > .assistant-launch {
    gap: 6px;
    padding-inline: 8px;
  }
  .ideas-invitation {
    gap: 14px;
  }
  .ideas-art {
    width: 72px;
  }
  .ideas-copy > p:not(.eyebrow) {
    margin-bottom: 14px;
  }
}

@media (max-width: 800px) {
  .studio .stats-wide {
    grid-template-columns: minmax(0, 1fr);
  }
  .studio .stats-wide .stat:first-child .value {
    font-size: 40px;
  }
  .studio .stats-wide .stat:last-child {
    min-height: 90px;
    flex-direction: row;
    gap: 24px;
  }
}

/* Profile panels share one form so section changes retain unsaved values. */
.profile-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 24px;
}
.profile-sections button {
  min-width: 0;
  min-height: 48px;
  padding: 10px 6px;
  font-size: 16px;
}
.profile-sections button[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
[data-profile-panel][hidden],
#student-zelle-toggle[hidden] {
  display: none;
}
[data-profile-panel] > :first-child {
  margin-top: 0;
}
#profile-account .actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 20px;
}
#profile-account .actions button {
  text-align: left;
  min-height: 48px;
}
#profile-payment .qr-profile {
  margin: 20px auto 12px;
}
.qr-disclosure {
  margin: 16px 0;
  min-height: 48px;
}
#student-zelle-details {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.lesson-options .separator {
  width: 100%;
  margin: 4px 0;
}

/* Give student identity and payment state their own readable rows. */
.student-open,
.student-choice.roster-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
}
.student-open {
  padding: 18px 3px;
  min-height: 124px;
}
.student-open > .name,
.roster-choice > .student-identity {
  grid-column: 1 / -1;
}
.student-open .name,
.student-choice .name {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  overflow-wrap: anywhere;
}
.student-totals {
  text-align: right;
  min-width: 0;
  color: var(--ink);
}
.student-totals .balance {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 3px;
  font-variant-numeric: tabular-nums;
}
.student-totals .rowmeta {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}
.pill.payment-status {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  border-radius: 10px;
  padding: 8px 11px;
  border: 1px solid;
  max-width: 100%;
  white-space: normal;
  text-align: left;
  justify-self: start;
}
.payment-status.unpaid {
  color: #922f20;
  background: #fff0ec;
  border-color: #efb6a9;
}
.payment-status.pending {
  color: #714600;
  background: #fff1cd;
  border-color: #dfbf6f;
}
.payment-status.paid {
  color: #185b4a;
  background: #e6f3ec;
  border-color: #a2c9b5;
}
.lesson-open .payment-status {
  margin-top: 8px;
}
.portal .lesson .payment-status {
  margin-top: 4px;
}
.report h3 {
  font-size: 22px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.roster-choice .student-identity .rowmeta {
  margin-top: 5px;
}
@media (max-width: 600px) {
  .student-open.balance-wide {
    grid-template-columns: minmax(0, 1fr);
  }
  .student-open.balance-wide .student-totals {
    grid-column: 1 / -1;
    text-align: left;
  }
  .student-choice.roster-choice {
    padding: 16px 12px;
  }
  .portal .lesson {
    flex-wrap: wrap;
  }
  .portal .lesson > .right {
    margin-left: auto;
    max-width: 100%;
  }
}

.student-choice.roster-choice[hidden] {
  display: none;
}

/* Compact summaries keep the amount prominent without a tall empty card. */
.studio .stats .stat {
  min-height: 106px;
  padding: 14px 10px;
  gap: 7px;
}
.studio .stats .stat .value,
.studio .stats .stat:last-child .value {
  font-size: 48px;
  line-height: 1;
}
.studio .stats {
  margin-bottom: 20px;
}
.portal .hero {
  padding: 18px 20px;
  margin: 18px 0;
}
.portal .hero .eyebrow {
  margin: 0;
}
.portal .hero .amount {
  font-size: 48px;
  margin: 8px 0;
}
.balance-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
}
.portal .hero .pill {
  margin: 0;
}
.payment-method-label {
  font-size: 16px;
  font-weight: 700;
  margin: 16px 0 8px;
}
.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.payment-methods button {
  min-height: 50px;
  font-size: 18px;
}
.receipt-methods {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.receipt-methods button {
  padding-inline: 8px;
}
.payment-methods button[aria-pressed="true"] {
  background: var(--green);
  color: white;
  border-color: var(--green);
  box-shadow: inset 0 0 0 2px var(--green);
}
.history-period {
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  margin: 18px 0 10px;
}
@media (max-width: 600px) {
  .studio .stats .stat {
    min-height: 100px;
    padding: 14px 8px;
  }
  .studio .stats .stat .value,
  .studio .stats .stat:last-child .value {
    font-size: 44px;
  }
  .studio .stats-wide .stat:first-child .value {
    font-size: 40px;
  }
  .studio .stats-wide .stat:last-child {
    min-height: 76px;
  }
  .portal .hero .amount {
    font-size: 44px;
  }
}

/* Footer destinations have the same minimum touch area as app controls. */
.footer a,
.auth-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 6px;
}

/* Focused editing, with large controls and a fixed, readable total/save area. */
.nav-back {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 28px;
}
.dialoghead h2 {
  flex: 1;
}
.edit-lesson-student strong {
  display: block;
  font-size: 22px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.edit-lesson-student {
  margin: 0 0 18px;
}
.edit-lesson-numbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.edit-lesson-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}
.edit-lesson-presets button {
  padding: 10px 4px;
  font-size: 18px;
  min-height: 48px;
}
.edit-lesson-presets button[aria-pressed="true"] {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.edit-lesson-dialog input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  max-width: 100%;
  min-height: 50px;
}
.edit-lesson-dialog .receipt-total {
  margin: 0 0 12px;
}
#student-payment-status {
  scroll-margin-top: 16px;
}
.short-viewport .edit-lesson-dialog .form-footer {
  position: static;
  margin: 16px 0 0;
  padding: 12px 0;
}

/* Assistant permission: shown before anything is sent to the AI provider. */
.assistant-consent h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.3;
}
.assistant-consent ul {
  margin: 0 0 12px;
  padding-left: 22px;
  line-height: 1.5;
}
.assistant-consent .consent-privacy {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.consent-actions button,
.assistant-permission button {
  min-height: 48px;
}
.assistant-permission {
  margin-top: 22px;
}
.assistant-permission button {
  margin-top: 12px;
}

/* Authentication controls and locally served Google branding. */
@font-face {
  font-family: Google Sans;
  src: url("/auth-assets/google-sans-500.ttf?v=4bf72f2d54") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
.google-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #747775;
  border-radius: 11px;
  background: #fff;
  color: #1f1f1f;
  font-family:
    Google Sans,
    Arial,
    sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0;
  min-height: 44px;
}
.google-login img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: none;
}
.google-login span {
  flex: 1;
  text-align: center;
}
.google-login:hover {
  background: #f8fafd;
}
.google-login:active {
  background: #edf2fa;
}
.google-login:disabled {
  opacity: 1;
  color: #747775;
  border-color: #c4c7c5;
  background: #fff;
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 78px;
}
.password-toggle {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 64px;
  min-height: 44px;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--green);
  font-size: 14px;
}
.password-toggle:hover {
  background: #eef3e8;
}
.password-toggle:focus-visible {
  outline-offset: -3px;
}
.auth-links {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}
.auth-links button {
  font-size: 14px;
  min-height: 44px;
}
.auth-recovery {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 8px;
}
.auth-recovery button {
  padding: 8px 0;
}
.auth-switch {
  width: 100%;
  text-align: center;
}
.auth-account-help {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
}
.auth-account-help a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 0;
  color: var(--muted);
}
.auth-card a[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.6;
}
.auth-progress:empty {
  display: none;
}
.auth-progress {
  margin: 12px 0 0;
}
.auth-card [aria-busy="true"] {
  cursor: wait;
}
.auth-card h2:focus {
  outline: none;
}
.auth-verification p {
  margin: 6px 0 2px;
}
.auth-verification button {
  padding: 8px 0;
  min-height: 44px;
}
.auth-verification:focus,
#auth-notice:focus {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* Ideas pages use the document's single scroll area, including with the keyboard open. */
.feature-screen {
  max-width: 800px;
  padding-block: max(24px, env(safe-area-inset-top)) max(32px, env(safe-area-inset-bottom));
  font-size: 20px;
  overflow-wrap: anywhere;
}
.feature-screen [hidden] {
  display: none;
}
.feature-screen h1 {
  font-size: 32px;
  line-height: 1.15;
  margin-block: 24px 16px;
}
.feature-screen h2 {
  font-size: 24px;
  line-height: 1.25;
  margin: 0 0 16px;
}
.feature-screen p {
  margin-block: 16px;
  white-space: pre-wrap;
}
.feature-screen .feature-explanation,
.feature-screen .notice {
  font-size: 18px;
}
.feature-screen button,
.feature-screen input,
.feature-screen textarea {
  font: inherit;
  min-height: 54px;
  border-radius: 14px;
  max-width: 100%;
}
.feature-screen button {
  white-space: normal;
  padding: 12px 24px;
}
.feature-screen :focus-visible,
.ideas-invitation button:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}
.feature-screen #feature-list {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}
.feature-screen .feature-idea {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  min-width: 0;
}
.feature-screen .feature-vote {
  display: block;
  width: 100%;
}
.feature-screen .feature-vote.voted {
  background: #e5eedc;
  border-color: var(--green);
  color: var(--ink);
}
.feature-screen button:disabled {
  opacity: 0.65;
}
.feature-screen .feature-vote.voted {
  opacity: 1;
}
.feature-screen [role="status"]:empty {
  display: none;
}
.feature-screen #feature-refresh {
  margin-top: 16px;
}
.feature-screen #feature-more {
  width: 100%;
  margin-top: 24px;
}
.feature-screen #feature-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.feature-screen #feature-form p {
  margin: 0;
}
.feature-screen label {
  margin: 0;
  font-size: 20px;
}
.feature-screen input,
.feature-screen textarea {
  width: 100%;
  padding: 16px;
  scroll-margin: 16px;
}
.feature-screen textarea {
  resize: vertical;
  min-height: 128px;
}
.feature-screen .feature-help {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 32px;
  font-size: 18px;
}
.feature-screen .feature-help a {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
}
.ideas-invitation {
  border-radius: 20px;
  padding: 24px;
  gap: 24px;
}
.ideas-invitation .ideas-copy .eyebrow {
  font-size: 18px;
}
.ideas-invitation .ideas-copy h2 {
  font-size: 24px;
  margin-bottom: 16px;
}
.ideas-invitation .ideas-copy > p:not(.eyebrow) {
  font-size: 20px;
  margin-bottom: 24px;
}
.ideas-invitation .ideas-copy button {
  font-size: 20px;
  min-height: 54px;
  border-radius: 14px;
}
@media (max-width: 540px) {
  .feature-screen {
    padding-inline: 16px;
  }
  .feature-screen .feature-idea {
    padding: 24px 16px;
  }
  .ideas-invitation {
    flex-direction: column;
    align-items: flex-start;
  }
  .ideas-invitation .ideas-art {
    width: 112px;
    height: auto;
  }
}

.feature-screen h1:focus {
  outline: none;
}

/* Tablets and large screens (ADR-0027): the phone design gains room, not new screens.
   720px and up covers every tablet in portrait; 1000px and up splits the studio into two columns.
   Both need more than 500px of height, so phones in landscape keep their own layout. */
@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
}
@media (min-width: 720px) and (min-height: 501px) {
  dialog,
  .lesson-dialog {
    width: 640px;
    padding: 32px;
    border-radius: 24px;
    max-height: min(88dvh, 920px);
  }
  dialog[open] {
    animation: sheet-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .student-open,
  .student-open.balance-wide,
  .student-choice.roster-choice {
    grid-template-columns: minmax(0, 1fr) auto minmax(132px, auto);
    gap: 4px 20px;
  }
  .student-open {
    min-height: 88px;
    padding: 16px 12px;
    border-radius: 14px;
  }
  .student-open > .name,
  .roster-choice > .student-identity {
    grid-column: auto;
  }
  .student-open.balance-wide .student-totals {
    grid-column: auto;
    text-align: right;
  }
  .student-choice.roster-choice {
    padding: 16px 18px;
  }
  .payment-status {
    justify-self: end;
  }
  .lesson-open > span:first-child {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 16px;
  }
  .lesson-open > span:first-child > .payment-status {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
  }
  .lesson-open {
    min-height: 76px;
    gap: 20px;
  }
  .lesson-open > strong {
    min-width: 112px;
    text-align: right;
  }
  .portal .lesson > .right {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 20px;
  }
  .portal .lesson > .right .balance {
    min-width: 112px;
    margin: 0;
  }
  .portal .lesson .payment-status {
    margin-top: 0;
  }
  .footer {
    justify-content: flex-start;
    gap: 8px 28px;
  }
  .footer > span:first-child {
    margin-right: auto;
  }
}
/* Tablets in landscape below 900px tall: sheets use the height a phone sheet would. */
@media (min-width: 720px) and (min-height: 501px) and (max-height: 900px) {
  dialog,
  .lesson-dialog {
    max-height: calc(100dvh - 32px);
    padding: 24px 28px;
  }
}
/* Landscapes below 780px tall (iPad mini, the iPhone Duo inner display) cannot hold the Log a
   lesson duration step and its total above the footer: the eight durations share one row. */
@media (min-width: 720px) and (min-height: 501px) and (max-height: 780px) {
  .duration-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
  }
  .lesson-progress {
    margin-bottom: 20px;
  }
  .lesson-person {
    padding: 8px 0;
    margin-bottom: 8px;
  }
}
/* Phones below 720px tall that also keep a home indicator strip (the iPhone Duo cover display)
   would put the Log a lesson total under the sticky footer. */
@media (max-width: 600px) and (max-height: 720px) {
  .lesson-progress {
    margin-bottom: 14px;
  }
  .lesson-person {
    padding: 4px 0;
    margin-bottom: 4px;
  }
  .duration-grid {
    margin-bottom: 8px;
  }
  .custom-duration {
    margin: 0 0 8px;
  }
}
@media (min-width: 720px) and (min-height: 501px) and (pointer: coarse) {
  .gesture-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .student-gesture-hint .textlink {
    margin-left: 0;
  }
}
@media (min-width: 1000px) and (min-height: 501px) {
  .studio {
    max-width: 1240px;
  }
  .studio .studio-heading {
    margin: 32px 0 24px;
  }
  .studio .studio-heading h1 {
    font-size: 32px;
    letter-spacing: -0.8px;
  }
  .studio-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(300px, 30%, 360px);
    grid-template-rows: auto 1fr;
    gap: 0 24px;
    align-items: start;
  }
  .studio-summary {
    grid-column: 2;
    grid-row: 1;
  }
  .studio-main {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-width: 0;
  }
  .studio-extras {
    grid-column: 2;
    grid-row: 2;
  }
  .studio .stats,
  .studio .stats-wide {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .studio .stats .stat:first-child {
    min-height: 168px;
    gap: 10px;
    background: linear-gradient(150deg, #1d6b57, var(--green) 60%);
    box-shadow: 0 14px 32px #185b4a24;
  }
  .studio .stats .stat:first-child .value {
    font-size: clamp(44px, 4.2vw, 56px);
  }
  .studio .stats .stat:last-child {
    min-height: 84px;
    flex-direction: row;
    justify-content: space-between;
    padding: 14px 24px;
  }
  .studio .stats .stat:last-child .value {
    font-size: 40px;
  }
  .studio-main > .card,
  .studio-extras > .card,
  .studio-extras > div > .card {
    margin-bottom: 20px;
  }
  .studio-main .cardhead h2 {
    font-size: 24px;
  }
  .studio-extras .ideas-invitation {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
  }
  .studio-extras .ideas-art {
    width: 112px;
    height: auto;
  }
  .studio-extras .ideas-copy h2 {
    font-size: 22px;
  }
  .studio-extras .ideas-invitation .ideas-copy > p:not(.eyebrow) {
    font-size: 17px;
    margin-bottom: 18px;
  }
  .studio-extras .ideas-invitation .ideas-copy button {
    width: 100%;
    font-size: 18px;
  }
}
/* Tall screens centre the sign-in pitch beside its card; short landscapes keep it at the top. */
@media (min-width: 1000px) and (min-height: 1000px) {
  .auth-layout {
    align-items: center;
    padding-block: 48px;
  }
  .auth-intro {
    padding-top: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  dialog[open] {
    animation: none;
  }
}

/* Assistant chat shares the dialog lifecycle, with one conversation scroll area. */
dialog.assistant-dialog {
  position: fixed;
  inset: var(--visible-top, 0px) 0 auto;
  display: flex;
  flex-direction: column;
  width: min(100%, 720px);
  max-width: 100%;
  height: var(--visible-height, 100dvh);
  max-height: var(--visible-height, 100dvh);
  margin: 0 auto;
  padding: max(12px, var(--sat)) max(20px, var(--sar)) max(12px, var(--sab)) max(20px, var(--sal));
  border-radius: 0;
  overflow: hidden;
}
dialog.assistant-dialog:not([open]) {
  display: none;
}
.assistant-dialog .dialoghead {
  position: static;
  flex: none;
  align-items: center;
  margin: 0 0 12px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
}
.assistant-dialog .dialoghead h2 {
  margin: 0;
  font-size: 22px;
}
.assistant-dialog #formerror:empty {
  display: none;
}
#coach-assistant-root {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.assistant-consent {
  overflow: auto;
  min-height: 0;
}
.assistant-conversation {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  position: relative;
}
.coach-chat {
  flex: 1;
  min-height: 0;
  max-height: none;
  padding: 8px 0 20px;
  overscroll-behavior: contain;
  overflow-anchor: none;
}
.coach-chat .chat-bubble {
  flex: none;
  white-space: pre-wrap;
}
.coach-chat .chat-bubble.assistant {
  max-width: 100%;
}
#coach-status {
  margin: 0;
  color: var(--muted);
}
#coach-status[hidden],
#coach-new-answer[hidden],
#coach-level[hidden] {
  display: none;
}
#coach-proposal {
  white-space: normal;
  border-top: 1px solid #d9e2d0;
  padding-top: 12px;
  margin-top: 12px;
}
#coach-proposal .hint {
  margin: 0 0 10px;
}
#coach-new-answer {
  position: absolute;
  bottom: 10px;
  align-self: center;
  z-index: 1;
  min-height: 44px;
  box-shadow: 0 3px 18px #17372f24;
  color: var(--green);
  background: white;
}
.assistant-bottom {
  flex: none;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
#coachassistantform {
  margin: 0;
}
#coachassistantform label {
  font-size: 13px;
  margin: 0 0 6px;
}
#coach-question {
  width: 100%;
  min-height: 64px;
  max-height: 120px;
  margin: 0;
  padding: 10px 12px;
  resize: none;
}
.assistant-composer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.assistant-composer-actions button {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 14px;
}
#coach-mic {
  flex-shrink: 1;
  white-space: normal;
}
#coach-mic[data-recording="true"] {
  color: #9a302a;
  border-color: #d4a9a6;
  background: #fff5f3;
}
#coach-level {
  width: 44px;
  min-width: 24px;
}
#coach-send {
  margin-left: auto;
}
.assistant-details {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  max-height: 30vh;
  overflow: auto;
}
.assistant-details summary {
  min-height: 44px;
  cursor: pointer;
  padding: 8px 0;
}
.assistant-details p {
  margin: 8px 0;
}
#coach-profile {
  min-height: 44px;
  white-space: normal;
  padding: 8px 0;
}
@media (max-height: 500px) {
  dialog.assistant-dialog {
    padding-top: max(8px, var(--sat));
    padding-bottom: max(8px, var(--sab));
  }
  .assistant-dialog .dialoghead {
    margin-bottom: 4px;
    padding-bottom: 4px;
  }
  .assistant-bottom {
    padding-top: 6px;
  }
  #coach-question {
    height: 52px;
    min-height: 52px;
  }
  .assistant-details {
    margin-top: 2px;
  }
}

/* A keyboard changes visualViewport, while height media queries may still see the
   full screen. The existing viewport helper supplies this class from its visible height. */
.short-viewport dialog.assistant-dialog {
  padding-top: max(8px, var(--sat));
  padding-bottom: max(8px, var(--sab));
}
.short-viewport .assistant-dialog .dialoghead {
  margin-bottom: 4px;
  padding-bottom: 4px;
}
.short-viewport .assistant-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, 44px);
  align-items: center;
  gap: 8px;
  padding-top: 6px;
}
.short-viewport #coachassistantform,
.short-viewport .assistant-composer-actions {
  display: contents;
}
.short-viewport #coachassistantform label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.short-viewport #coach-question {
  min-width: 0;
  min-height: 48px;
  height: 48px;
  padding: 8px 10px;
}
.short-viewport .coach-chat {
  padding: 0;
}
.short-viewport .coach-chat .chat-bubble {
  padding: 8px 10px;
}
.short-viewport #coach-mic,
.short-viewport #coach-send {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 0;
}
.short-viewport #coach-mic {
  position: relative;
  background-image:
    linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
  background-size:
    2px 6px,
    10px 2px;
  background-position:
    center 31px,
    center 36px;
  background-repeat: no-repeat;
}
.short-viewport #coach-mic::before {
  content: "";
  width: 10px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 8px;
  transform: translateY(-5px);
}
.short-viewport #coach-mic::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 12px;
  width: 18px;
  height: 16px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 10px 10px;
}
.short-viewport #coach-send::before {
  content: "↑";
  font-size: 26px;
  line-height: 1;
}
.short-viewport #coach-level {
  display: none;
}
.short-viewport .assistant-details {
  position: relative;
  max-height: none;
  overflow: visible;
  margin: 0;
}
.short-viewport .assistant-details summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.short-viewport .assistant-details summary::-webkit-details-marker {
  display: none;
}
.short-viewport .assistant-details summary::before {
  content: "⋯";
  font-size: 24px;
}
.short-viewport .assistant-details-content {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: calc(100% + 8px);
  width: min(320px, calc(100vw - 40px));
  max-height: max(60px, calc(var(--visible-height, 100dvh) - var(--sat) - var(--sab) - 110px));
  overflow: auto;
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 3px 18px #17372f24;
}

/* The date field stays compact; its calendar has independent touch-sized controls. */
.lesson-date-control {
  position: relative;
  width: min(100%, 16rem);
}
.edit-lesson-dialog .lesson-date-control {
  width: 100%;
}
.lesson-date-control input[type="date"] {
  width: 100%;
  padding-right: 54px;
}
.lesson-date-control input::-webkit-calendar-picker-indicator {
  opacity: 0;
  pointer-events: none;
}
.lesson-calendar-trigger {
  position: absolute;
  inset: 2px;
  width: calc(100% - 4px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 14px;
  border: 0;
  background: transparent;
}
.lesson-calendar-trigger:hover {
  background: transparent;
}
.lesson-calendar {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(420px, calc(100vw - 8px));
  max-height: calc(100dvh - 16px);
  padding: 12px 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: white;
  box-shadow: 0 12px 50px #173c3540;
}
.lesson-calendar-header {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  padding: 0 8px 8px;
  gap: 8px;
  text-align: center;
  font-size: 22px;
}
.lesson-calendar-header button {
  min-height: 48px;
  padding: 0;
  font-size: 30px;
}
.lesson-calendar-week,
.lesson-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
}
.lesson-calendar-week {
  color: var(--muted);
  font-size: 13px;
  padding: 6px 0;
}
.lesson-calendar-days button {
  min-width: 0;
  min-height: 48px;
  padding: 0;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: white;
  font-size: 20px;
}
.lesson-calendar-days .outside-month {
  color: var(--muted);
}
.lesson-calendar-days [aria-current="date"] {
  border-color: var(--green);
}
.lesson-calendar-days [aria-pressed="true"] {
  color: white;
  background: var(--green);
}
.lesson-calendar-days button:focus-visible {
  outline-offset: -4px;
}
.lesson-calendar-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 12px 0;
}
.lesson-calendar-footer button {
  min-height: 48px;
  min-width: 88px;
}

/* Inert in-memory layers exist only while returning to the previous sheet screen. */
.sheet-preview {
  position: absolute;
  left: 0;
  max-width: none;
  margin: 0;
  border: 0;
  overflow: hidden;
  background: white;
  pointer-events: none;
  z-index: 20;
  box-sizing: border-box;
}
.sheet-preview-current {
  z-index: 21;
  box-shadow: -8px 0 24px #17372f18;
}
.sheet-back-active > :not(.sheet-preview) {
  visibility: hidden;
}
.sheet-preview > .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.gesture-blocked .sheet-grip {
  background: #a46a29;
}
.swipe-pending .swipe-handle {
  pointer-events: none;
}
