/* The coach page: the app's look ("Under the lights", app/src/ui/theme.ts) and the boards' sizes
   (docs/design/coach-boards/Coach-Join, Coach-Wait, Coach-Players, Coach-Player-A). A phone page that also works on a
   laptop: one column, at most 560px, centered. Clay is for the one action on a view. */

:root {
  --bg: #0b0b0c;
  --surface: #1e1e20;
  --track: #2c2c2e;
  --text: #ffffff;
  --muted: #8e8e93;
  --muted-2: #a1a1a6;
  --soft: #d1d1d6;
  --clay: #fb8228;
  --clay-hi: #ff9442;
  --clay-text: #ffb27a;
  --clay-wash: rgba(251, 130, 40, 0.14);
  --hairline: rgba(255, 255, 255, 0.16);
  --hairline-2: rgba(255, 255, 255, 0.12);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: Inter, -apple-system, "SF Pro Text", system-ui, sans-serif;
  --gutter: 20px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; }
button, input, textarea { font: inherit; color: inherit; margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
h1:focus, h1:focus-visible { outline: none; }

#app {
  max-width: 560px;
  margin: 0 auto;
}

.view {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter) calc(32px + env(safe-area-inset-bottom));
}

/* The brand line and, on the players list, the coach's name */
.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-top: calc(22px + env(safe-area-inset-top));
  position: relative;
}
.brand {
  font: 900 15px/18px var(--display);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}
.who {
  font-size: 14px;
  line-height: 18px;
  color: var(--muted-2);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.display {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 52px;
  line-height: 48px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.lbl {
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.clay-text { color: var(--clay-text); }
.eyebrow { font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--clay-text); }

.intro { display: flex; flex-direction: column; gap: 10px; }
.lede { font-size: 16px; line-height: 23px; color: var(--soft); }
.lede.muted { color: var(--muted-2); }
.soft { font-size: 16px; line-height: 22px; color: var(--soft); }
.small { font-size: 14px; line-height: 20px; }
.muted { color: var(--muted-2); }

/* The one action */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-size: 18px;
  line-height: 22px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.pri {
  background: linear-gradient(180deg, var(--clay-hi) 0%, var(--clay) 100%);
  color: var(--bg);
  box-shadow: 0 10px 28px rgba(251, 130, 40, 0.38);
}
.pri:disabled { opacity: 0.6; cursor: progress; }

.actions { display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding-top: 40px; }
.fine { text-align: center; font-size: 13px; line-height: 18px; color: var(--muted); }
.err { font-size: 15px; line-height: 21px; font-weight: 600; color: var(--clay-text); }
.err:empty { display: none; }

.input {
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: 17px;
  -webkit-appearance: none;
  appearance: none;
}
input.input { height: 56px; padding: 0 16px; }
textarea.input {
  display: block;
  min-height: 84px;
  padding: 12px;
  font-size: 16px;
  line-height: 22px;
  background: var(--bg);
  resize: none;
}
.input:focus-visible { outline-offset: 2px; }

/* Full-bleed photo at the top of a view (the join page's and his page's) */
.hero {
  position: relative;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter);
  height: 330px;
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 11, 12, 0.55) 0%, rgba(11, 11, 12, 0.1) 30%, rgba(11, 11, 12, 0.7) 75%, var(--bg) 100%);
}

/* 2A: the family's link */
.join .intro { position: relative; margin-top: -94px; }
.join-form { display: flex; flex-direction: column; gap: 18px; margin-top: 46px; flex: 1; }
.field { display: flex; flex-direction: column; gap: 8px; }
fieldset.field { display: block; }
fieldset.field legend { margin-bottom: 2px; }
.choices { display: flex; flex-wrap: wrap; column-gap: 8px; }
.choice { position: relative; display: inline-flex; align-items: center; min-height: 56px; cursor: pointer; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--hairline-2);
}
.choice input:checked + span { background: var(--text); color: var(--bg); box-shadow: none; }
.choice input:focus-visible + span { outline: 2px solid var(--clay); outline-offset: 2px; }
.join .actions { padding-top: 32px; margin-left: -4px; margin-right: -4px; } /* the board's 16px button gutter */

/* 2B: waiting */
.wait .intro { margin-top: 80px; gap: 14px; }
.wait .lede { font-size: 17px; line-height: 24px; }
.sent {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--clay-wash);
  box-shadow: inset 0 0 0 2px var(--clay);
  color: var(--clay);
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps {
  margin-top: 50px;
  border-radius: 20px;
  background: var(--surface);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.step { display: flex; gap: 14px; align-items: flex-start; }
.dot {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}
.step.done .dot { background: var(--clay); color: var(--bg); }
.step.now .dot { box-shadow: inset 0 0 0 2px var(--clay); color: var(--clay); }
.step.later .dot { box-shadow: inset 0 0 0 2px #48484a; color: var(--muted); }
.step-title { font-size: 16px; line-height: 20px; font-weight: 600; }
.step.later .step-title { color: var(--muted-2); }
.step-line { font-size: 14px; line-height: 18px; color: var(--muted-2); }
.step .dot + div { padding-top: 4px; min-width: 0; overflow-wrap: anywhere; }

.foot { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 56px; padding-bottom: 40px; }
.foot p { font-size: 15px; line-height: 21px; color: var(--muted-2); }

/* 4A: his players */
.players .intro { margin-top: 44px; gap: 6px; }
.players .display { font-size: 56px; line-height: 50px; }
.notice {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--clay-wash);
  color: var(--clay-text);
  font-size: 15px;
  line-height: 21px;
  font-weight: 500;
}
.cards { display: flex; flex-direction: column; gap: 10px; margin: 44px -4px 0; }
.notice + .cards { margin-top: 20px; }
.card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  min-height: 88px;
}
a.card { cursor: pointer; }
a.card:active { background: #252527; }
.card.closed { background: transparent; box-shadow: inset 0 0 0 1px var(--hairline-2); }
.card .chev { flex: none; color: var(--muted); }
.thumb { width: 76px; height: 96px; flex: none; border-radius: 12px; object-fit: cover; object-position: 50% 30%; background: var(--track); }
.avatar {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  background: var(--track);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--muted);
}
.avatar.solid { color: var(--text); }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.card-name { font-size: 20px; line-height: 24px; font-weight: 700; }
.card.closed .card-name { font-size: 18px; line-height: 22px; }
.card-meta { font-size: 14px; line-height: 19px; color: var(--muted-2); }
.card-mission { font-size: 15px; line-height: 20px; }
.card-mission strong { font-weight: 700; }
.card-line { font-size: 14px; line-height: 19px; color: var(--muted-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.chip.clay { background: var(--clay-wash); color: var(--clay-text); }
.chip.gray { background: var(--track); color: var(--soft); }

/* 4B: his page */
.his .hero { height: 360px; }
.his .hero-img { object-position: 50% 28%; }
.his .hero-shade { background: linear-gradient(180deg, rgba(11, 11, 12, 0.6) 0%, rgba(11, 11, 12, 0) 26%, rgba(11, 11, 12, 0.55) 70%, var(--bg) 100%); }
.his .hero.bare { height: 220px; }
.his .hero.bare .hero-shade { background: linear-gradient(180deg, #161618 0%, var(--bg) 100%); }
.back {
  position: absolute;
  left: 6px;
  top: calc(6px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 10px;
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
}
.back-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background: rgba(11, 11, 12, 0.7);
  font-size: 15px;
  font-weight: 600;
}
.back:focus-visible { outline: none; }
.back:focus-visible .back-pill { outline: 2px solid var(--clay); outline-offset: 2px; }
.hero-text { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 24px; }
.his .name { font-size: 64px; line-height: 56px; }
.meta { font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--soft); }

.boxes { display: flex; flex-direction: column; gap: 14px; margin: 20px -4px 0; }
.box {
  border-radius: 20px;
  background: var(--surface);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.mission-name { font-size: 26px; line-height: 30px; font-weight: 700; overflow-wrap: anywhere; }
.box-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.box-date { font-size: 14px; color: var(--muted-2); white-space: nowrap; }
.frames { display: grid; grid-template-columns: 1fr; gap: 8px; }
.frames.two { grid-template-columns: 1fr 1fr; }
.frame { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.frame img, .frame .no-photo { width: 100%; height: 200px; object-fit: cover; object-position: 50% 30%; border-radius: 12px; background: var(--track); }
.frames:not(.two) .frame img, .frames:not(.two) .frame .no-photo { height: 260px; }
.frame.start img { filter: grayscale(1) brightness(0.8); }
.frame.latest img, .frame.latest .no-photo { box-shadow: 0 0 0 2px var(--clay); }
.frame figcaption { font-size: 13px; line-height: 17px; color: var(--muted-2); }
.frame.latest figcaption { color: var(--text); font-weight: 600; }
.dots { display: flex; gap: 6px; align-items: center; }
.dots span { width: 18px; height: 18px; border-radius: 50%; background: var(--track); }
.dots span.on { background: var(--clay); }

.stats { display: flex; }
.stat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.num { font: 900 30px/28px var(--display); }
.clay-num { color: var(--clay); }
.stat-label { font-size: 12px; line-height: 16px; color: var(--muted-2); }

.medals { display: flex; flex-direction: column; gap: 10px; }
.medals li { display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 19px; color: var(--muted-2); }
.medal-art { flex: none; width: 52px; height: 52px; object-fit: contain; }

.notes { display: flex; flex-direction: column; gap: 8px; }
.note { border-radius: 14px; background: var(--track); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.note-meta { font-size: 13px; line-height: 17px; color: var(--muted-2); }
.note-body { font-size: 15px; line-height: 21px; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-form { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.note-form .btn { min-height: 56px; font-size: 17px; margin-top: 2px; }

/* A title and a line */
.msg .intro { margin-top: 120px; gap: 14px; }
.msg .lede { font-size: 17px; line-height: 24px; }

/* A laptop: the same column, a little air above it */
@media (min-width: 600px) {
  #app { padding-top: 24px; }
  .view { min-height: auto; padding-bottom: 64px; }
  .hero { border-radius: 24px 24px 0 0; }
  .actions, .foot { margin-top: 0; }
  .foot { padding-bottom: 0; }
}
