:root {
  color-scheme: dark;
  --bg: #000;
  --panel: rgba(7, 13, 18, 0.9);
  --panel-soft: rgba(14, 24, 28, 0.78);
  --text: #f7fbff;
  --muted: #9eb4bf;
  --cyan: #00d4ff;
  --green: #6cff8f;
  --yellow: #ffe86b;
  --red: #ff6b7a;
  --line: rgba(255, 255, 255, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 600px;
  height: 600px;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
  color: inherit;
}

.app-shell {
  position: relative;
  width: 600px;
  height: 600px;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 46%, rgba(0, 212, 255, 0.06), transparent 34%),
    #000;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  height: 62px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1;
}

.status-pill {
  min-width: 96px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--yellow);
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  background: rgba(255, 232, 107, 0.08);
}

.screen {
  display: none;
  height: 412px;
}

.screen.active {
  display: block;
}

.map-wrap {
  display: grid;
  grid-template-columns: 264px 1fr;
  gap: 12px;
}

#courseCanvas {
  width: 248px;
  height: 248px;
  border: 2px solid rgba(0, 212, 255, 0.55);
  border-radius: 8px;
  background: #020303;
  box-shadow: inset 0 0 30px rgba(0, 212, 255, 0.08), 0 0 22px rgba(0, 212, 255, 0.18);
}

.map-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  min-height: 248px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.map-legend small {
  color: rgba(158, 180, 191, 0.74);
  font-size: 13px;
  font-weight: 700;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border-radius: 999px;
}

.map-controls {
  display: grid;
  grid-template-columns: repeat(2, 52px);
  gap: 8px;
}

.map-control {
  width: 52px;
  height: 42px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 18, 22, 0.92);
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.dot.user {
  background: var(--cyan);
}

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

.dot.hazard {
  background: var(--yellow);
}

.yardage-panel {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 10px;
  margin-top: 10px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.9fr;
  gap: 8px;
  margin-top: 6px;
}

.weather-strip,
.recommend-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  margin-top: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 13, 18, 0.82);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.weather-strip strong,
.recommend-strip strong {
  color: var(--yellow);
  font-size: 15px;
}

.recommend-strip {
  color: var(--muted);
}

.recommend-strip strong {
  color: var(--green);
  font-size: 20px;
}

.recommend-strip small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.primary-yardage,
.distance-grid > div,
.hero-card,
.score-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.primary-yardage {
  padding: 10px 14px;
}

.primary-yardage span {
  display: block;
  color: var(--green);
  font-size: 50px;
  font-weight: 900;
  line-height: 0.88;
}

.primary-yardage small {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.distance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.distance-grid > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 72px;
  padding: 8px;
  text-align: center;
}

.distance-grid strong {
  color: var(--cyan);
  font-size: 24px;
  line-height: 1;
}

.distance-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 230px;
  padding: 28px;
  text-align: center;
}

.club-name {
  color: var(--green);
  font-size: 72px;
  font-weight: 950;
  line-height: 1;
}

.club-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 20px;
  font-weight: 700;
}

.club-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.club-chip {
  min-height: 76px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  text-align: center;
}

.club-chip strong {
  display: block;
  font-size: 20px;
}

.club-chip span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.club-chip.selected {
  border-color: var(--green);
  box-shadow: 0 0 18px rgba(108, 255, 143, 0.28);
}

.score-card {
  padding: 18px;
}

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  border-top: 1px solid var(--line);
  font-size: 24px;
  font-weight: 800;
}

.score-row:first-of-type {
  border-top: 0;
}

.score-row strong {
  color: var(--green);
  font-size: 38px;
}

.command {
  display: block;
  width: 100%;
  min-height: 64px;
  margin-top: 8px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  font-size: 20px;
  font-weight: 900;
}

.command.primary {
  border-color: rgba(0, 212, 255, 0.42);
  color: var(--cyan);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding-top: 4px;
}

.settings-grid .command {
  margin-top: 0;
  min-height: 76px;
}

.tabbar {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.tab {
  min-height: 62px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(8, 18, 22, 0.9);
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
}

.tab.active {
  color: var(--text);
  border-color: rgba(108, 255, 143, 0.6);
}

.focusable {
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.focusable:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(0, 212, 255, 0.5);
  transform: translateY(-1px);
}

.hidden {
  display: none !important;
}
