:root {
  color-scheme: light;
  --bg: #f3f2ef;
  --surface: #ffffff;
  --surface-2: #f1f0ed;
  --ink: #171a16;
  --muted: #6b6f67;
  --line: #dfddd7;
  --accent: #f15a1a;
  --accent-2: #fff0e7;
  --black: #050504;
  --green: #1f7a4d;
  --green-2: #dff1e8;
  --blue: #315fae;
  --blue-2: #e6eefc;
  --shadow: 0 18px 42px rgba(18, 20, 17, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  background:
    linear-gradient(135deg, rgba(223, 239, 247, 0.78), rgba(239, 242, 248, 0) 34rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  min-width: 320px;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.app-topbar {
  align-items: center;
  background: rgba(247, 246, 244, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(223, 221, 215, 0.72);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 42px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-lockup {
  align-items: center;
  color: inherit;
  display: flex;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(18, 20, 17, 0.08);
  display: block;
  height: 54px;
  object-fit: contain;
  padding: 5px;
  width: 54px;
}

.brand-lockup strong {
  display: block;
  font-size: 1.1rem;
  line-height: 1.1;
}

.eyebrow {
  color: var(--accent);
  display: block;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.topbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.primary-button,
.quiet-button,
.chip-button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 850;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  text-decoration: none;
  white-space: nowrap;
}

.primary-button {
  background: var(--accent);
  color: white;
}

.quiet-button,
.chip-button {
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--line);
  color: var(--ink);
}

.v2-main {
  padding: clamp(16px, 3.4vw, 36px) clamp(16px, 4vw, 42px) clamp(28px, 5vw, 54px);
}

.v2-shell {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1180px;
}

.session-hero {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 255, 0.9)),
    linear-gradient(135deg, rgba(49, 95, 174, 0.12), rgba(31, 122, 77, 0.08));
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
}

.session-title-row {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.session-title-row input {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 950;
  line-height: 1.08;
  min-width: 0;
  padding: 0 0 5px;
  width: 100%;
}

.session-title-row input:focus {
  border-bottom-color: rgba(241, 90, 26, 0.42);
  outline: 0;
}

.status-badge {
  background: var(--green-2);
  border-radius: 999px;
  color: var(--green);
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 950;
  padding: 7px 10px;
  text-transform: uppercase;
}

.meta-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.meta-field {
  color: var(--muted);
  display: grid;
  font-size: 0.72rem;
  font-weight: 900;
  gap: 5px;
  text-transform: uppercase;
}

.meta-field input {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 40px;
  padding: 8px 10px;
  text-transform: none;
}

.info-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.info-card,
.session-plan-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.info-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.info-card h2,
.session-plan-card h2 {
  font-size: 1rem;
  margin-bottom: 0;
}

.participant-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.dot {
  align-items: center;
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 950;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.dot.good {
  background: var(--green);
}

.dot.warn {
  background: #c68a22;
}

.dot.muted {
  background: #8b8f86;
}

.avatar-strip {
  display: flex;
  justify-content: flex-end;
}

.avatar {
  align-items: center;
  background: var(--black);
  border: 2px solid white;
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 950;
  height: 30px;
  justify-content: center;
  margin-left: -8px;
  width: 30px;
}

.notes-card textarea {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 136px;
  padding: 10px;
  resize: vertical;
  width: 100%;
}

.session-plan-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.tactics-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  padding: 18px;
}

.tactics-card .plan-head p {
  color: var(--muted);
  margin: 4px 0 0;
}

.board-practice-picker,
.board-view-picker {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.76rem;
  font-weight: 900;
  gap: 8px;
  text-transform: uppercase;
}

.board-practice-picker select,
.board-view-picker select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 38px;
  padding: 7px 10px;
  text-transform: none;
}

.board-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.board-tool {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 850;
  min-height: 32px;
  padding: 6px 8px;
}

.board-tool.is-active {
  background: var(--black);
  border-color: var(--black);
  color: white;
}

.board-tool:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.tactic-board {
  aspect-ratio: 105 / 68;
  background: #7fb05b;
  border: 1px solid #6a9850;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  overflow: hidden;
  position: relative;
  touch-action: none;
  width: 100%;
}

.tactic-board.view-portrait {
  aspect-ratio: 68 / 105;
  justify-self: center;
  max-width: 560px;
}

.tactic-board-svg {
  display: block;
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.board-token {
  align-items: center;
  border: 2px solid white;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(18, 20, 17, 0.18);
  color: white;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 950;
  height: 34px;
  justify-content: center;
  padding: 0;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 34px;
  z-index: 2;
}

.board-token.is-selected {
  outline: 3px solid rgba(255, 255, 255, 0.92);
  outline-offset: 3px;
}

.board-token.red {
  background: var(--accent);
}

.board-token.blue {
  background: var(--blue);
}

.board-token.ball {
  background: white;
  border-color: var(--black);
  height: 24px;
  width: 24px;
}

.board-token.ball::after {
  background: var(--black);
  border-radius: 999px;
  content: "";
  height: 6px;
  width: 6px;
}

.board-token.cone {
  background: transparent;
  border: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 28px solid #f0cf3a;
  border-radius: 0;
  box-shadow: none;
  height: 0;
  width: 0;
}

.board-token.flat-marker {
  background: #f0cf3a;
  border-color: #f7e98f;
  border-radius: 999px;
  height: 18px;
  width: 34px;
}

.board-token.goal,
.board-token.mini-goal {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px) 0 0 / 7px 100%,
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px) 0 0 / 100% 6px,
    rgba(255, 255, 255, 0.08);
  border: 3px solid white;
  border-radius: 4px;
  box-shadow: 0 10px 20px rgba(18, 20, 17, 0.2);
  height: 24px;
  width: 56px;
}

.board-token.mini-goal {
  height: 18px;
  width: 38px;
}

.board-token.mannequin {
  background: var(--accent);
  border-color: #ffd0bd;
  border-radius: 14px 14px 6px 6px;
  height: 46px;
  width: 18px;
}

.board-token.mannequin::before,
.board-token.mannequin::after {
  background: #ffd0bd;
  border-radius: 999px;
  content: "";
  position: absolute;
}

.board-token.mannequin::before {
  height: 12px;
  top: -10px;
  width: 12px;
}

.board-token.mannequin::after {
  bottom: -9px;
  height: 10px;
  width: 34px;
}

.board-help {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  margin: 0;
}

.plan-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.plan-list {
  display: grid;
  gap: 12px;
  position: relative;
}

.plan-list::before {
  background: #c8d5f5;
  bottom: 22px;
  content: "";
  left: 19px;
  position: absolute;
  top: 22px;
  width: 2px;
}

.plan-row {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: 40px 128px minmax(0, 1fr) auto;
  position: relative;
}

.time-pin {
  align-items: center;
  background: white;
  border: 2px solid #c8d5f5;
  border-radius: 999px;
  color: var(--blue);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 950;
  height: 40px;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.drill-thumb {
  background: #8db360;
  border-radius: 8px;
  min-height: 88px;
  overflow: hidden;
  position: relative;
}

.drill-thumb svg {
  display: block;
  height: 100%;
  width: 100%;
}

.drill-body {
  background: #fbfbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.drill-body input,
.drill-body textarea {
  background: transparent;
  border: 0;
  color: var(--ink);
  outline: 0;
  width: 100%;
}

.drill-body input {
  font-weight: 950;
}

.drill-body textarea {
  color: var(--muted);
  font-size: 0.84rem;
  min-height: 54px;
  resize: vertical;
}

.row-actions {
  align-content: center;
  display: grid;
  gap: 6px;
}

.row-actions button {
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  min-height: 30px;
  padding: 5px 8px;
}

.planner-toast {
  background: var(--black);
  border-radius: 999px;
  bottom: 18px;
  color: white;
  font-weight: 800;
  left: 50%;
  opacity: 0;
  padding: 9px 13px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.planner-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  .app-topbar,
  .session-title-row,
  .plan-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions,
  .meta-row,
  .info-grid,
  .plan-row {
    grid-template-columns: 1fr;
  }

  .plan-list::before,
  .time-pin {
    display: none;
  }

  .drill-thumb {
    min-height: 140px;
  }

  .board-practice-picker,
  .board-view-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .board-tool {
    flex: 1 1 auto;
  }
}
