@font-face {
  font-family: Oakes;
  src: url("assets/oakes-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: Oakes, "Helvetica Neue", Arial, sans-serif;
  font-size: 100%;
  color: #fff6ef;
  background-color: #211717;
  --ink: #fff6ef;
  --muted: #ddd0c8;
  --accent: #ff8374;
  --accent-hover: #ff9b8e;
  --focus: #ffccad;
  --line: rgb(250 213 195 / 23%);
  --control-line: rgb(255 224 210 / 48%);
  --button-fill: #271a18;
  --side: clamp(1.75rem, 4.1vw, 4.25rem);
  --top: clamp(1.35rem, 5.1vh, 3.25rem);
  --bottom: clamp(1.35rem, 5.1vh, 3.25rem);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background-color: #2a1a18;
  background-image:
    linear-gradient(90deg, rgb(13 9 10 / 77%), rgb(13 9 10 / 94%)),
    url("assets/background.webp");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

body[data-screen="client"] {
  background-color: #4b3027;
  background-image:
    radial-gradient(ellipse at 50% 45%, rgb(14 10 11 / 68%) 35%, rgb(14 10 11 / 62%) 55%, rgb(14 10 11 / 40%) 100%),
    url("assets/background.webp");
}

button,
input,
textarea {
  font: inherit;
}

button {
  min-inline-size: 2.75rem;
  min-block-size: 2.75rem;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: default;
}

:where(button, input, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.app {
  min-height: 100vh;
  min-height: 100svh;
}

.workspace,
.client-view {
  width: min(100%, 100rem);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding: var(--top) var(--side) var(--bottom);
  padding-top: max(var(--top), env(safe-area-inset-top));
  padding-right: max(var(--side), env(safe-area-inset-right));
  padding-bottom: max(var(--bottom), env(safe-area-inset-bottom));
  padding-left: max(var(--side), env(safe-area-inset-left));
}

.workspace {
  --sidebar-inset: clamp(1.2rem, 3.4vw, 3.1rem);
  display: grid;
  grid-template-columns: minmax(15.75rem, .478fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3.9vw, 3.5rem);
}

.sidebar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding-inline-end: var(--sidebar-inset);
  border-inline-end: 1px solid var(--line);
}

.coach-view {
  grid-template-rows: 1fr auto;
  row-gap: 0;
}

.coach-view .sidebar {
  grid-area: 1 / 1 / 2 / 2;
}

.coach-view .equipment {
  grid-area: 1 / 2 / 3 / 3;
}

.ready-slot {
  grid-area: 2 / 1 / 3 / 2;
  padding: 0 var(--sidebar-inset) .75rem 0;
  border-inline-end: 1px solid var(--line);
}

.brand-logo {
  display: block;
  width: clamp(6.6rem, 13.7vw, 10rem);
  height: auto;
  object-fit: contain;
}

.sidebar h1 {
  max-width: 8ch;
  margin: clamp(2.75rem, 10.35vh, 6.35rem) 0 0;
  font-size: clamp(2.65rem, 5.12vw, 4.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.045em;
}

.class-field,
.message-field {
  width: 100%;
}

.class-field {
  margin-top: clamp(1.65rem, 7vh, 4rem);
}

.message-field {
  margin-top: clamp(1.3rem, 6.4vh, 3.6rem);
}

.field-label {
  display: block;
  margin-bottom: .7rem;
  font-size: 1.125rem;
  line-height: 1.2;
}

.class-field .field-label {
  color: var(--muted);
}

.secondary-button,
.class-trigger,
.class-tile,
.ready-button,
.variant-button {
  border: 1px solid var(--control-line);
  border-radius: .5rem;
  background-color: var(--button-fill);
  font-weight: 600;
}

.secondary-button {
  padding: .67em 1.1em;
  font-size: clamp(1rem, 2.04vw, 1.3rem);
  line-height: 1.1;
}

.class-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: clamp(3.6rem, 9.9vh, 4.75rem);
  padding: .65rem 1.15rem .65rem 1rem;
  background-color: rgb(35 22 20 / 88%);
}

.class-trigger .class-logo {
  display: block;
  width: min(100% - 2rem, 13.75rem);
  height: clamp(1.9rem, 5vh, 2.8rem);
  object-fit: contain;
  object-position: left center;
}

.chevron {
  width: .65rem;
  height: .65rem;
  flex: 0 0 auto;
  margin-top: -.23rem;
  border-right: 2px solid;
  border-bottom: 2px solid;
  transform: rotate(45deg);
}

.message-field textarea {
  display: block;
  width: 100%;
  min-height: 4.8rem;
  padding: .66rem .83rem;
  border: 1px solid var(--control-line);
  border-radius: .5rem;
  background-color: rgb(35 22 20 / 88%);
  color: var(--ink);
  line-height: 1.33;
  font-size: 1rem;
  resize: vertical;
}

.message-field textarea::placeholder {
  color: #bfaaa0;
}

.field-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
  margin-top: .6rem;
  color: var(--muted);
  font-size: .9rem;
}

.field-meta output {
  font-variant-numeric: tabular-nums;
}

.ready-button {
  width: 100%;
  min-height: clamp(3.3rem, 8.55vh, 4.2rem);
  margin-top: 1.8rem;
  padding: .45rem .8rem;
  border-color: var(--accent);
  border-radius: .63rem;
  background-color: var(--accent);
  color: #201312;
  font-size: clamp(1.3rem, 2.64vw, 1.85rem);
  line-height: 1.08;
}

.ready-button:disabled {
  opacity: .62;
}

.equipment,
.picker-main {
  min-width: 0;
}

.equipment {
  --equipment-columns: minmax(7.65rem, 1fr) minmax(15.75rem, 1.58fr) 9.3rem;
}

.equipment-head,
.equipment-row {
  display: grid;
  grid-template-columns: var(--equipment-columns);
  align-items: center;
  gap: .65rem;
  border-block-end: 1px solid var(--line);
}

.equipment-head {
  min-height: 2.9rem;
  padding-bottom: .58rem;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.15;
}

.equipment-head > :last-child {
  text-align: center;
}

.equipment-row {
  min-height: clamp(3.65rem, 9.75vh, 5rem);
  padding-block: .37rem;
}

.prop-name {
  font-size: clamp(1.04rem, 2.14vw, 1.45rem);
  line-height: 1.15;
}

.variants {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  gap: .38rem;
}

.fixed-weight {
  color: var(--muted);
  font-size: clamp(.98rem, 2.05vw, 1.3rem);
}

.variant-button {
  min-height: 3.05rem;
  padding: .4rem .55rem;
  border-radius: .48rem;
  background-color: transparent;
  font-size: clamp(.92rem, 1.77vw, 1.15rem);
  line-height: 1;
}

.variant-button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #1a1514;
}

.equipment-row[data-needs-option] .variant-button {
  border-color: var(--accent);
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 3.05rem;
  border: 1px solid var(--control-line);
  border-radius: .5rem;
  background-color: rgb(39 26 24 / 78%);
  font-size: clamp(1.15rem, 2.34vw, 1.55rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.stepper button,
.stepper output {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.stepper button:first-child {
  border-radius: .48rem 0 0 .48rem;
}

.stepper button:last-child {
  border-radius: 0 .48rem .48rem 0;
  color: var(--accent);
}

.stepper button:disabled {
  color: #a18d85;
}

.stepper output {
  padding-inline: .15rem;
  border-inline: 1px solid var(--line);
  background-color: rgb(255 129 110 / 13%);
  color: var(--ink);
  font-weight: 600;
}

.stepper:has(button:first-child:disabled) output {
  background-color: transparent;
  color: var(--muted);
}

.towel-toggle {
  display: flex;
  align-items: center;
  gap: .8rem;
  width: fit-content;
  max-width: 100%;
  min-height: 2.75rem;
  margin-top: 1.38rem;
  cursor: pointer;
  font-size: clamp(1rem, 2.14vw, 1.45rem);
}

.towel-toggle input {
  flex: 0 0 auto;
  width: 1.77rem;
  height: 1.77rem;
  margin: 0;
  accent-color: var(--ink);
}

.form-error {
  margin: .75rem 0 0;
  color: #ffbfac;
  font-size: .98rem;
  line-height: 1.35;
}

.picker-main {
  align-self: start;
  padding-block: clamp(.6rem, 4.15vh, 2.35rem);
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.6rem, 1.3vw, 1.06rem);
}

.class-tile {
  display: grid;
  align-items: center;
  justify-items: center;
  aspect-ratio: 1.13;
  min-width: 0;
  padding: clamp(.72rem, 1.62vw, 1.4rem);
  border-color: var(--line);
  background: rgb(38 26 25 / 82%);
}

.class-tile .class-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 5.7rem;
  object-fit: contain;
}

.class-tile[aria-pressed="true"],
.class-tile[aria-current="true"] {
  border-color: var(--accent);
}

.picker-view .sidebar .secondary-button {
  margin-top: clamp(1.5rem, 6vh, 3.1rem);
}

.client-view {
  display: flex;
  flex-direction: column;
  --prop-gap: clamp(1rem, 3.2vh, 2rem);
}

.client-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.new-class {
  min-width: min(100%, 11.25rem);
  min-height: clamp(2.75rem, 6.8vh, 3.35rem);
  background-color: #3a221e;
}

.client-hero {
  margin-top: clamp(2.05rem, 9.5vh, 5.3rem);
  text-align: center;
}

.client-class-logo {
  display: block;
  width: min(100%, 37rem);
  height: clamp(4.25rem, 14.2vh, 7.05rem);
  margin-inline: auto;
  object-fit: contain;
}

.client-hero h1 {
  margin: clamp(1.1rem, 4.6vh, 2.35rem) 0 0;
  color: var(--ink);
  font-size: clamp(1.55rem, 4.1vh, 2.25rem);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -.025em;
}

.client-props {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: var(--prop-gap);
  width: min(100%, 64rem);
  margin: clamp(2.35rem, 8.7vh, 4.4rem) auto clamp(1.68rem, 5vh, 3rem);
}

.client-prop {
  display: flex;
  flex: 0 0 25%;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  min-height: 6.4rem;
  gap: .3rem;
  padding-inline: .55rem;
  text-align: center;
  overflow-wrap: anywhere;
}

.client-prop:not(:nth-child(4n + 1)) {
  border-inline-start: 1px solid var(--line);
}

.prop-count {
  font-size: clamp(3.25rem, 10.2vh, 5.25rem);
  font-weight: 600;
  line-height: .93;
  letter-spacing: -.05em;
}

.client-prop-name {
  margin-top: .35rem;
  font-size: clamp(1.15rem, 2.42vw, 1.7rem);
  font-weight: 600;
  line-height: 1.08;
}

.prop-detail {
  font-size: clamp(1rem, 2.08vw, 1.42rem);
  line-height: 1.14;
}

.client-view:has(.client-prop:nth-child(5)) {
  --prop-gap: clamp(1.2rem, 4.8vh, 3rem);
}

.client-view:has(.client-prop:nth-child(5)) .client-hero {
  margin-top: clamp(.9rem, 3.65vh, 2.25rem);
}

.client-view:has(.client-prop:nth-child(5)) .client-class-logo {
  width: min(100%, 31.5rem);
  height: clamp(3.7rem, 12vh, 6rem);
}

.client-view:has(.client-prop:nth-child(5)) .client-hero h1 {
  margin-top: clamp(.85rem, 2.8vh, 1.5rem);
  font-size: clamp(1.4rem, 3.65vh, 1.95rem);
}

.client-props:has(.client-prop:nth-child(5)) {
  margin-top: clamp(1.5rem, 5.5vh, 3rem);
  margin-bottom: clamp(1rem, 3.55vh, 2.25rem);
}

.client-props:has(.client-prop:nth-child(5)) .prop-count {
  font-size: clamp(2.75rem, 7.85vh, 4.25rem);
}

.client-props:has(.client-prop:nth-child(5))::after {
  position: absolute;
  inset: 50% 5% auto;
  border-top: 1px solid var(--line);
  pointer-events: none;
  content: "";
}

.client-empty {
  margin: clamp(2rem, 8vh, 4rem) auto;
  color: var(--muted);
  text-align: center;
  font-size: clamp(1.18rem, 3vw, 1.6rem);
}

.client-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  width: min(90.5%, 58rem);
  margin: auto auto 0;
  padding-block: clamp(.95rem, 3.6vh, 1.8rem) clamp(.4rem, 2.15vh, 1.2rem);
  border-block-start: 1px solid rgb(250 213 195 / 40%);
  overflow-wrap: anywhere;
}

.client-footer p {
  min-width: 0;
  margin: 0;
  padding-inline-end: clamp(.8rem, 3.15vw, 2.35rem);
}

.client-footer p:only-child {
  grid-column: 1 / -1;
  padding-inline-end: 0;
}

.client-footer p + p {
  padding-inline: clamp(.8rem, 3.45vw, 2.4rem) 0;
  border-inline-start: 1px solid rgb(250 213 195 / 40%);
}

.coach-note {
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: clamp(1.3rem, 2.64vw, 1.85rem);
  font-style: italic;
  line-height: 1.22;
}

.towel-note {
  font-size: clamp(1.04rem, 2.08vw, 1.37rem);
  line-height: 1.45;
}

.storage-warning {
  max-width: 52rem;
  margin: .7rem auto 0;
  padding: .65rem 1rem;
  border: 1px solid var(--control-line);
  border-radius: .5rem;
  background-color: #321e1a;
  color: var(--ink);
  font-size: .92rem;
  line-height: 1.3;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (hover: hover) and (pointer: fine) {
  .secondary-button:hover,
  .class-trigger:hover,
  .class-tile:hover,
  .variant-button[aria-pressed="false"]:hover,
  .stepper button:not(:disabled):hover {
    border-color: var(--accent);
    background-color: #4b2925;
  }

  .ready-button:not(:disabled):hover {
    background-color: var(--accent-hover);
  }
}

@media (min-width: 54em) and (max-width: 64em) {
  .workspace {
    grid-template-columns: minmax(14.2rem, .478fr) minmax(0, 1fr);
  }

  .equipment {
    --equipment-columns: minmax(6.65rem, 1fr) minmax(15.3rem, 1.58fr) 8.45rem;
  }
}

@media (max-width: 57.5em) {
  .workspace {
    --side: clamp(1rem, 4vw, 2.1rem);
    --top: 1.7rem;
    --bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
  }

  .sidebar {
    padding-inline-end: 0;
    border-inline-end: 0;
  }

  .sidebar h1 {
    max-width: none;
    margin-top: 1.4rem;
    font-size: clamp(2.45rem, 6vw, 3.65rem);
  }

  .sidebar h1 br {
    display: none;
  }

  .class-field,
  .message-field {
    width: min(100%, 27rem);
    margin-top: 0;
  }

  .coach-view .sidebar {
    display: contents;
  }

  .coach-view .sidebar h1 {
    margin-top: 0;
  }

  .coach-view .ready-slot {
    width: min(100%, 27rem);
    padding: 0;
    border-inline-end: 0;
  }

  .coach-view .ready-button {
    margin-top: 0;
  }

  .picker-main {
    align-self: stretch;
    padding-block: 0;
  }

  .class-tile {
    aspect-ratio: 1.67;
  }

  .equipment {
    --equipment-columns: minmax(6.8rem, 1fr) minmax(14.85rem, 1.5fr) 8.45rem;
  }

  .stepper {
    min-height: 2.8rem;
  }
}

@media (max-width: 35em) {
  .client-view {
    --side: 1.15rem;
    --top: 1.4rem;
    --bottom: 1.85rem;
  }

  .class-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .equipment-head {
    display: none;
  }

  .equipment-row {
    grid-template-areas:
      "prop quantity"
      "variants variants";
    grid-template-columns: minmax(0, 1fr) 8.45rem;
    min-height: 0;
    gap: .45rem .75rem;
    padding-block: .55rem;
  }

  .equipment-row > .prop-name {
    grid-area: prop;
  }

  .equipment-row > .variants,
  .equipment-row > .fixed-weight {
    grid-area: variants;
  }

  .equipment-row > .variants:empty {
    display: none;
  }

  .equipment-row > .stepper {
    grid-area: quantity;
  }

  .client-prop {
    flex-basis: 50%;
  }

  .client-prop:not(:nth-child(4n + 1)) {
    border-inline-start: 0;
  }

  .client-prop:nth-child(even) {
    border-inline-start: 1px solid var(--line);
  }

  .client-props:has(.client-prop:nth-child(5))::after {
    display: none;
  }

  .new-class {
    min-width: 8.25rem;
  }

  .client-footer {
    grid-template-columns: minmax(0, 1fr);
    gap: .8rem;
    width: 100%;
  }

  .client-footer p,
  .client-footer p + p {
    padding-inline: 0;
    border-inline-start: 0;
  }
}

@media (min-width: 57.51em) and (max-height: 44em) {
  .sidebar h1 {
    margin-top: clamp(1.8rem, 7.9vh, 3.5rem);
  }

  .class-field {
    margin-top: clamp(1.65rem, 5.4vh, 2.5rem);
  }

  .message-field {
    margin-top: clamp(1.35rem, 4.5vh, 2.25rem);
  }
}
