@font-face {
  font-family: "Birdie Badge Sans";
  src: url("./assets/fonts/BirdieBadgeSans-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

:root {
  --forest-900: #173b27;
  --forest-800: #234d34;
  --forest-700: #2c6b43;
  --forest-600: #3e8e5a;
  --forest-100: #e9f2e6;
  --forest-050: #f1f6ee;
  --cream: #fbf8f0;
  --paper: #fffdf8;
  --gold: #f2c14e;
  --ink: #1f2d24;
  --muted: #65746a;
  --muted-strong: #53645a;
  --line: rgba(31, 45, 36, 0.14);
  --danger: #a74238;
  --danger-soft: #faeeeb;
  --success-soft: #e9f4e8;
  --shadow-card: 0 18px 50px rgba(23, 59, 39, 0.09);
  --shadow-button: 0 10px 24px rgba(35, 77, 52, 0.18);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --serif: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #e6ede3;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body {
  overscroll-behavior: none;
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 10%, rgba(242, 193, 78, 0.12), transparent 26%),
    var(--cream);
  box-shadow: 0 0 70px rgba(23, 59, 39, 0.08);
}

.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  animation: none;
}

/* Keep membership navigation attached to the viewport. overflow:hidden on
   app-shell otherwise traps its sticky header in a non-scrolling ancestor. */
.app-shell.paywall-active,
.app-shell:has(> .screen[data-screen="studio"]) {
  overflow: clip;
}

.paywall-screen .topbar {
  grid-template-columns: 48px 1fr 60px;
}

.customer-access-status {
  color: var(--forest-800);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.screen[data-screen="editor"],
.screen[data-screen="transfer"] {
  height: 100dvh;
}

.test-mode-active .screen[data-screen="editor"],
.test-mode-active .screen[data-screen="transfer"] {
  height: calc(100dvh - 58px);
  min-height: calc(100dvh - 58px);
}

.screen-body {
  min-width: 0;
  flex: 1;
  padding: var(--space-4) var(--space-5) calc(var(--space-6) + env(safe-area-inset-bottom));
}

.splash-screen {
  position: relative;
  align-items: center;
  justify-content: center;
  padding: calc(var(--space-6) + env(safe-area-inset-top)) var(--space-5)
    calc(var(--space-6) + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 44%, #ffffff 0, rgba(255, 255, 255, 0.9) 20%, transparent 46%),
    var(--cream);
  text-align: center;
}

.splash-art {
  width: min(68vw, 272px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.splash-art svg {
  width: 100%;
  height: 100%;
}

.splash-wordmark {
  margin-top: var(--space-3);
  color: var(--forest-800);
  font-family: var(--serif);
  font-size: clamp(38px, 11vw, 52px);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.splash-caption {
  min-height: 24px;
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.skip-button {
  position: absolute;
  top: calc(var(--space-4) + env(safe-area-inset-top));
  right: var(--space-4);
  min-width: 64px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.78);
  color: var(--forest-800);
  font-weight: 700;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: calc(64px + env(safe-area-inset-top));
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: end;
  padding: env(safe-area-inset-top) var(--space-4) var(--space-2);
  border-bottom: 1px solid rgba(31, 45, 36, 0.08);
  background: var(--cream);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.test-mode-active .topbar,
.test-mode-active .studio-header {
  top: 58px;
}

.topbar-title {
  align-self: center;
  overflow: hidden;
  color: var(--forest-900);
  font-size: 16px;
  font-weight: 760;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--forest-800);
}

.icon-button svg {
  width: 24px;
  height: 24px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-2) 0 var(--space-6);
}

.brand-lockup img {
  width: 48px;
  height: 48px;
}

.brand-lockup span {
  color: var(--forest-800);
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--forest-600);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 360px;
  margin-bottom: var(--space-3);
  color: var(--forest-900);
  font-family: var(--serif);
  font-size: clamp(34px, 9.5vw, 44px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

h2 {
  margin-bottom: var(--space-2);
  color: var(--forest-900);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.2;
}

.lede {
  max-width: 390px;
  margin-bottom: var(--space-6);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.method-list {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.method-card,
.device-card {
  width: 100%;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: var(--space-4);
  align-items: center;
  min-height: 104px;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 30px rgba(35, 77, 52, 0.04);
}

button.method-card,
button.device-card {
  cursor: pointer;
}

.method-card:active,
.device-card:active {
  transform: scale(0.985);
}

.method-card.recommended {
  border-color: rgba(62, 142, 90, 0.42);
  background: linear-gradient(145deg, #f6fbf3, #fffdf8);
  box-shadow: var(--shadow-card);
}

.method-icon,
.device-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--forest-100);
  color: var(--forest-800);
}

.method-icon.bluetooth {
  background: #edf2f7;
  color: #315d7c;
}

.method-icon svg,
.device-icon svg {
  width: 27px;
  height: 27px;
}

.method-copy strong,
.device-copy strong {
  display: block;
  color: var(--forest-900);
  font-size: 16px;
  line-height: 1.3;
}

.method-copy small,
.device-copy small {
  display: block;
  margin-top: var(--space-1);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 var(--space-2);
  border-radius: 999px;
  background: var(--forest-100);
  color: var(--forest-700);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chevron {
  color: #8c9890;
}

.chevron svg {
  width: 20px;
  height: 20px;
}

.trust-note {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  margin: var(--space-5) 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.trust-note svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--forest-600);
}

.instructions {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-5) 0 var(--space-6);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.instruction {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: var(--space-3);
  align-items: start;
}

.instruction-number {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--forest-100);
  color: var(--forest-800);
  font-size: 12px;
  font-weight: 800;
}

.instruction-copy {
  padding-top: 3px;
  color: #3e4d43;
  font-size: 14px;
  line-height: 1.5;
}

.primary-button,
.secondary-button,
.text-button {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  font-weight: 760;
}

.primary-button {
  border: 0;
  background: var(--forest-800);
  color: var(--cream);
  box-shadow: var(--shadow-button);
}

.primary-button:active {
  background: var(--forest-900);
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: default;
  opacity: 0.48;
  box-shadow: none;
}

.secondary-button {
  border: 1px solid rgba(35, 77, 52, 0.36);
  background: transparent;
  color: var(--forest-800);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--forest-700);
}

.button-stack {
  display: grid;
  gap: var(--space-2);
  margin-top: auto;
}

.scan-stage,
.success-stage,
.error-stage,
.empty-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-5);
  text-align: center;
}

.scan-visual {
  position: relative;
  width: 176px;
  height: 176px;
  display: grid;
  place-items: center;
  margin-bottom: var(--space-6);
}

.scan-ring,
.scan-ring::before,
.scan-ring::after {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(62, 142, 90, 0.28);
  border-radius: 50%;
  content: "";
  animation: scan-pulse 1.8s ease-out infinite;
}

.scan-ring::before {
  animation-delay: 600ms;
}

.scan-ring::after {
  animation-delay: 1200ms;
}

.scan-center {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background: var(--forest-800);
  color: var(--cream);
  box-shadow: var(--shadow-card);
}

.scan-center svg {
  width: 38px;
  height: 38px;
}

.scan-stage h1,
.success-stage h1,
.error-stage h1,
.empty-stage h1 {
  max-width: 340px;
  margin-bottom: var(--space-3);
}

.scan-stage .lede,
.success-stage .lede,
.error-stage .lede,
.empty-stage .lede {
  max-width: 340px;
  margin-bottom: var(--space-5);
}

.success-stage {
  padding-top: calc(var(--space-7) + env(safe-area-inset-top));
  padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
}

.success-stage .lede {
  margin-bottom: 0;
}

.success-stage .button-stack {
  width: 100%;
  max-width: 360px;
  margin-top: var(--space-6);
}

.device-list {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.device-card {
  min-height: 88px;
}

.device-icon {
  border-radius: 50%;
}

.device-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  margin: var(--space-5) 0 var(--space-6);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.device-meta dt,
.device-meta dd {
  margin: 0;
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(31, 45, 36, 0.08);
  font-size: 13px;
}

.device-meta dt:nth-last-of-type(1),
.device-meta dd:nth-last-of-type(1) {
  border-bottom: 0;
}

.device-meta dt {
  color: var(--muted);
}

.device-meta dd {
  color: var(--forest-900);
  font-weight: 700;
  text-align: right;
}

.success-mark,
.error-mark,
.empty-mark {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  margin-bottom: var(--space-6);
  border-radius: 50%;
  background: var(--success-soft);
}

.success-mark svg {
  width: 104px;
  height: 104px;
}

.error-mark {
  background: var(--danger-soft);
  color: var(--danger);
}

.error-mark svg,
.empty-mark svg {
  width: 52px;
  height: 52px;
}

.empty-mark {
  background: var(--forest-050);
  color: var(--forest-700);
}

.preview-label {
  position: fixed;
  z-index: 20;
  right: var(--space-3);
  bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
  padding: 6px 10px;
  border: 1px solid rgba(35, 77, 52, 0.2);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  pointer-events: none;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
  max-width: min(86vw, 390px);
  padding: var(--space-3) var(--space-4);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

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

.visually-hidden {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.grow {
  min-width: 0;
  flex: 1;
}

.full-width {
  width: 100%;
}

.studio-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  min-height: calc(72px + env(safe-area-inset-top));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: calc(var(--space-2) + env(safe-area-inset-top)) var(--space-5) var(--space-3);
}

.brand-lockup.compact {
  gap: var(--space-2);
  margin: 0;
}

.brand-lockup.compact img {
  width: 38px;
  height: 38px;
}

.brand-lockup.compact span {
  font-size: 25px;
}

.avatar-button {
  min-width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid rgba(35, 77, 52, 0.18);
  border-radius: 999px;
  background: var(--paper);
  color: var(--forest-800);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.birdie-plus-lockup {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  white-space: nowrap;
}

.birdie-plus-lockup img {
  width: 34px;
  height: auto;
  flex: 0 0 auto;
  display: block;
}

.birdie-plus-lockup.compact {
  gap: 4px;
}

.birdie-plus-lockup.compact img {
  width: 24px;
}

.studio-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Globe = native language picker; the <select> sits invisibly over the icon so a tap opens it directly. */
.lang-globe {
  position: relative;
  cursor: pointer;
}

.lang-globe svg {
  width: 22px;
  height: 22px;
}

.lang-globe select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.avatar-button .birdie-plus-lockup.compact img {
  width: 31px;
}

.birdie-plus-button {
  display: inline-grid;
  place-items: center;
}

.birdie-plus-button .birdie-plus-lockup {
  justify-content: center;
  font-size: 10px;
}

.topbar .birdie-plus-button .birdie-plus-lockup > span,
.topbar .game-plus-pill .birdie-plus-lockup > span {
  display: none;
}

.topbar .birdie-plus-button .birdie-plus-lockup img,
.topbar .game-plus-pill .birdie-plus-lockup img {
  width: 29px;
}

.primary-button .birdie-plus-lockup,
.text-button .birdie-plus-lockup {
  font-size: inherit;
}

.primary-button .birdie-plus-lockup img,
.text-button .birdie-plus-lockup img {
  width: 23px;
}

.studio-body {
  padding-top: var(--space-3);
}

.today-discovery-card {
  width: 100%;
  display: grid;
  gap: 7px;
  margin: 0 0 var(--space-4);
  padding: 14px 16px;
  border: 1px solid rgba(242, 193, 78, 0.72);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 88% 8%, rgba(242, 193, 78, 0.28), transparent 32%),
    var(--forest-900);
  color: #ffffff;
  text-align: left;
  box-shadow: 0 14px 34px rgba(23, 59, 39, 0.15);
}

.today-discovery-card.unlocked {
  border-color: rgba(62, 142, 90, 0.7);
}

.today-discovery-top,
.today-discovery-action,
.today-access-pill {
  display: flex;
  align-items: center;
}

.today-discovery-top {
  justify-content: space-between;
  gap: var(--space-3);
}

.today-discovery-top > span:first-child {
  display: grid;
  gap: 2px;
}

.today-discovery-top small {
  color: #f6d774;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.today-discovery-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.today-discovery-kicker .birdie-plus-lockup {
  color: #f6d774;
  font-size: inherit;
  letter-spacing: inherit;
}

.today-discovery-kicker .birdie-plus-lockup img,
.today-access-pill .birdie-plus-lockup img {
  width: 22px;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.34));
}

.today-discovery-top strong {
  font-family: var(--serif);
  font-size: 31px;
  line-height: 1;
}

.today-access-pill {
  gap: 5px;
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 10px;
  font-weight: 850;
}

.today-access-pill svg {
  width: 14px;
  height: 14px;
}

.today-discovery-copy {
  max-width: 330px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.32;
}

.today-discovery-previews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.today-discovery-previews > button {
  min-width: 0;
  display: grid;
  gap: 1px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  text-align: left;
}

.today-discovery-previews > button:active,
.today-discovery-previews > button:focus-visible {
  border-color: rgba(246, 215, 116, 0.78);
  background: rgba(255, 255, 255, 0.15);
  outline: none;
}

.today-discovery-previews small {
  grid-row: 2;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.today-discovery-previews b {
  color: #ffffff;
  font-size: 15px;
}

.today-discovery-previews i {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.66);
  font-size: 10px;
  font-style: normal;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-discovery-action {
  justify-content: flex-end;
  gap: 4px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f6d774;
  font-size: 12px;
  font-weight: 850;
}

.today-discovery-action svg {
  width: 16px;
  height: 16px;
}

.today-screen {
  background:
    radial-gradient(circle at 86% 8%, rgba(242, 193, 78, 0.2), transparent 25%),
    var(--cream);
}

.today-body {
  padding-top: var(--space-3);
}

.today-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-3);
}

.today-heading h1 {
  margin: 2px 0 5px;
  font-size: clamp(27px, 8vw, 38px);
}

.today-heading p:not(.eyebrow) {
  max-width: 300px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.42;
}

.today-member-badge {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #ead49a;
  border-radius: 999px;
  background: #fff7dd;
  color: #6d5013;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.today-member-badge .birdie-plus-lockup {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.today-member-badge .birdie-plus-lockup img {
  width: 22px;
}

.today-member-badge svg {
  width: 14px;
  height: 14px;
}

.today-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: var(--space-4) 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.74);
}

.today-tab {
  min-height: 44px;
  padding: 7px 5px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.today-tab.selected {
  background: var(--forest-800);
  color: #ffffff;
  box-shadow: 0 5px 12px rgba(35, 77, 52, 0.16);
}

.today-preview-layout {
  display: grid;
  gap: var(--space-4);
}

.today-preview-frame {
  position: relative;
  width: min(62vw, 236px);
  aspect-ratio: 1;
  justify-self: center;
  overflow: hidden;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(23, 59, 39, 0.14);
}

.today-preview-frame canvas {
  width: 100%;
  height: 100%;
  display: block;
  clip-path: circle(50% at 50% 50%);
}

.today-panel {
  min-width: 0;
}

.today-sample-note,
.today-status-card,
.today-setup-card {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.today-sample-note,
.today-status-card {
  display: grid;
  gap: 4px;
}

.today-sample-note strong,
.today-status-card strong,
.today-setup-card strong {
  color: var(--forest-900);
  font-size: 14px;
}

.today-sample-note span,
.today-status-card span,
.today-setup-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.43;
}

.today-setup-card {
  display: grid;
  gap: var(--space-3);
}

.secondary-button.compact,
.primary-button.compact {
  min-height: 44px;
  margin: 0;
  padding: 9px 14px;
}

.today-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid var(--forest-100);
  border-top-color: var(--forest-700);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.today-calendar-picker {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.today-calendar-picker-heading,
.today-calendar-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.today-calendar-picker-heading > span,
.today-calendar-summary > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.today-calendar-picker-heading strong,
.today-calendar-summary strong {
  color: var(--forest-900);
  font-size: 13px;
}

.today-calendar-picker-heading small,
.today-calendar-summary small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.today-calendar-picker-heading b {
  flex: 0 0 auto;
  color: var(--forest-700);
  font-size: 9px;
}

.today-calendar-bulk {
  display: flex;
  gap: 8px;
}

.today-calendar-bulk button,
.today-calendar-summary button {
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid rgba(35, 77, 52, 0.17);
  border-radius: 11px;
  background: var(--forest-050);
  color: var(--forest-700);
  font-size: 10px;
  font-weight: 800;
}

.today-calendar-groups {
  display: grid;
  gap: 9px;
}

.today-calendar-source {
  min-width: 0;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 9px;
  border: 1px solid rgba(35, 77, 52, 0.12);
  border-radius: 13px;
  background: var(--cream);
}

.today-calendar-source legend {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 5px;
}

.today-calendar-source legend strong {
  overflow: hidden;
  color: var(--forest-900);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-calendar-source legend small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 8px;
}

.today-calendar-option {
  min-height: 44px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 11px;
  background: var(--paper);
}

.today-calendar-option input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--forest-700);
}

.today-calendar-option span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.today-calendar-option strong {
  overflow: hidden;
  color: var(--forest-900);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-calendar-option small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-calendar-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.today-calendar-actions > :only-child {
  grid-column: 1 / -1;
}

.today-calendar-notice {
  margin: 0;
  padding: 8px 9px;
  border-radius: 10px;
  background: #fff5d9;
  color: #795710;
  font-size: 9px;
  line-height: 1.4;
}

.today-calendar-summary {
  margin-bottom: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(35, 77, 52, 0.14);
  border-radius: 13px;
  background: var(--forest-050);
}

.today-event-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.today-event-list li {
  min-height: 52px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.today-event-list li.next {
  border-color: rgba(62, 142, 90, 0.48);
  background: linear-gradient(100deg, var(--forest-050), var(--paper));
  box-shadow: 0 7px 18px rgba(35, 77, 52, 0.07);
}

.today-event-list li.next time::after {
  content: "NEXT";
  display: block;
  width: max-content;
  margin-top: 3px;
  padding: 2px 4px;
  border-radius: 999px;
  background: var(--forest-700);
  color: #ffffff;
  font-size: 7px;
  letter-spacing: 0.08em;
}

.today-event-list time {
  color: var(--forest-700);
  font-size: 11px;
  font-weight: 900;
}

.today-event-list span,
.today-event-list strong,
.today-event-list small {
  min-width: 0;
  display: block;
}

.today-event-list strong {
  overflow: hidden;
  color: var(--forest-900);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-event-list small {
  display: flex;
  gap: 5px;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-event-list small span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.today-event-list small span + span::before {
  content: "·";
  margin-right: 5px;
}

.today-source-note,
.today-course-hint {
  display: block;
  margin: 7px 2px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.42;
}

.today-refresh {
  margin-top: 5px;
}

.today-location-card,
.today-reminders-card {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
  padding: 9px 11px;
  border: 1px solid rgba(35, 77, 52, 0.15);
  border-radius: 14px;
  background: var(--paper);
}

.today-location-card.warning,
.today-reminders-card.warning {
  border-color: rgba(167, 66, 56, 0.25);
  background: var(--danger-soft);
}

.today-location-card.ready,
.today-reminders-card.ready {
  border-color: rgba(62, 142, 90, 0.33);
  background: var(--forest-050);
}

.today-location-card > div,
.today-reminders-card > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.today-location-card strong,
.today-reminders-card strong {
  color: var(--forest-900);
  font-size: 11px;
}

.today-location-card small,
.today-reminders-card small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.38;
}

.today-location-card > button,
.today-reminders-card > button {
  min-width: 66px;
  min-height: 40px;
  padding: 7px 9px;
  border: 0;
  border-radius: 11px;
  background: #ffffff;
  color: var(--forest-700);
  font-size: 9px;
  font-weight: 850;
}

.today-location-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--forest-600);
  box-shadow: 0 0 0 4px rgba(62, 142, 90, 0.13);
}

.today-location-symbol {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--forest-050);
  color: var(--forest-700);
  font-size: 12px;
  font-weight: 900;
}

.today-location-card.warning .today-location-symbol,
.today-reminders-card.warning .today-location-symbol {
  background: #ffffff;
  color: var(--danger);
}

.today-status-card.error {
  border-color: rgba(167, 66, 56, 0.25);
  background: var(--danger-soft);
}

.today-selected-course {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: 9px;
  padding: 9px 11px;
  border: 1px solid rgba(62, 142, 90, 0.36);
  border-radius: 14px;
  background: var(--forest-050);
}

.today-selected-course span,
.today-selected-course small,
.today-selected-course strong,
.today-selected-course i {
  min-width: 0;
  display: block;
}

.today-selected-course small,
.today-selected-course i {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.today-selected-course strong {
  overflow: hidden;
  margin: 2px 0;
  color: var(--forest-900);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-selected-course button {
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--forest-700);
  font-size: 10px;
  font-weight: 850;
}

.today-selected-course.compact {
  min-height: 0;
  gap: 8px;
  padding: 6px 11px;
}

.today-selected-course.compact span {
  flex: 1 1 auto;
}

.today-selected-course.compact strong {
  margin: 1px 0;
  font-size: 11px;
}

.today-selected-course.compact i {
  flex: 0 1 auto;
  max-width: 44%;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-nearby-courses {
  display: grid;
  gap: 3px;
  max-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin: -2px 0 9px;
  padding: 5px;
  border: 1px solid rgba(62, 142, 90, 0.28);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

.today-nearby-courses > small {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 3px 6px 2px;
  background: var(--paper);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.today-nearby-courses button {
  min-height: 44px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 6px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--forest-900);
  text-align: left;
}

.today-nearby-courses button:active,
.today-nearby-courses button.selected {
  background: var(--forest-050);
}

.today-nearby-courses button.selected {
  outline: 2px solid rgba(62, 142, 90, 0.35);
  outline-offset: -2px;
}

.today-nearby-courses button strong {
  font-size: 11px;
}

.today-nearby-courses button small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.today-nearby-courses button i {
  color: var(--forest-700);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.today-nearby-error {
  margin: -2px 0 9px;
  padding: 9px 11px;
  border: 1px solid rgba(181, 115, 41, 0.3);
  border-radius: 11px;
  background: rgba(255, 246, 221, 0.72);
  color: var(--forest-900);
  font-size: 10px;
  line-height: 1.4;
}

.today-course-search {
  position: relative;
  margin-bottom: 9px;
}

.today-course-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.today-course-search input {
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
}

.today-course-search-row > button {
  min-height: 44px;
  padding: 8px 13px;
  border: 0;
  border-radius: 12px;
  background: var(--forest-800);
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
}

.today-course-results {
  max-height: 218px;
  display: grid;
  gap: 3px;
  overflow-y: auto;
  margin-top: 7px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

.today-course-results button {
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--forest-900);
  text-align: left;
}

.today-course-results button[aria-selected="true"],
.today-course-results button:focus-visible {
  background: var(--forest-050);
  outline: 2px solid rgba(62, 142, 90, 0.3);
  outline-offset: -2px;
}

.today-course-results button:active {
  background: var(--forest-050);
}

.today-course-results strong {
  font-size: 11px;
}

.today-course-results small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.today-course-results i {
  color: var(--forest-700);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.today-weather-now {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 7px;
  padding: 11px 14px;
  border-radius: 17px;
  background: linear-gradient(128deg, var(--forest-900), #2d6041);
  color: #ffffff;
}

.today-weather-now > strong {
  flex: 0 0 auto;
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1;
}

.today-weather-now > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.today-weather-now b,
.today-weather-now small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-weather-now b {
  font-size: 13px;
}

.today-weather-now small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
}

.today-weather-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.today-weather-facts span {
  min-width: 0;
  display: grid;
  gap: 3px;
  text-align: center;
}

.today-weather-facts small {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.today-weather-facts strong {
  overflow: hidden;
  color: var(--forest-900);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-weather-attribution {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(101, 116, 106, 0.42);
  text-underline-offset: 2px;
}

.today-weather-attribution img {
  width: auto;
  max-width: 72px;
  height: 11px;
  object-fit: contain;
}

.today-weather-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 7px 2px 0;
  color: var(--muted);
  font-size: 9px;
}

.today-weather-stale {
  margin-top: 7px;
  padding: 7px 9px;
  border-radius: 10px;
  background: #fff5d9;
  color: #795710;
  font-size: 9px;
  font-weight: 750;
}

.today-todo-editor {
  display: grid;
  gap: 7px;
}

.today-todo-date {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.today-todo-date label,
.today-todo-date span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.today-todo-date input {
  min-width: 0;
  min-height: 40px;
  padding: 6px 8px;
  border: 1px solid rgba(31, 45, 36, 0.12);
  border-radius: 10px;
  background: var(--cream);
  color: var(--forest-900);
  font-size: 11px;
}

.today-task-list {
  display: grid;
  gap: 7px;
}

.today-todo-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.today-todo-row button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--forest-700);
}

.today-todo-row button:first-child::before {
  content: "";
  width: 22px;
  height: 22px;
  border: 2px solid var(--forest-700);
  border-radius: 7px;
}

.today-todo-row button[aria-pressed="true"] {
  position: relative;
}

.today-todo-row button[aria-pressed="true"]::before {
  background: var(--forest-700);
}

.today-todo-row button[aria-pressed="true"] svg {
  position: absolute;
  width: 15px;
  height: 15px;
  color: #ffffff;
}

.today-task-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 2px;
}

.today-task-copy > strong,
.today-task-copy > input {
  overflow: hidden;
  color: var(--forest-900);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-task-copy small {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
}

.today-task-copy small > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-task-copy time,
.today-task-copy b {
  flex: 0 0 auto;
}

.today-task-copy b {
  padding: 2px 4px;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 7px;
}

.today-todo-row input {
  min-width: 0;
  height: 44px;
  padding: 8px 2px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--forest-900);
  font-size: 12px;
  font-weight: 700;
}

.today-imported-mark {
  justify-self: end;
  margin-right: 8px;
  padding: 4px 6px;
  border-radius: 999px;
  background: var(--forest-050);
  color: var(--forest-700);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.today-remove-todo {
  color: var(--muted) !important;
  font-size: 20px;
}

.today-add-todo {
  justify-self: start;
}

.today-todo-composer {
  display: grid;
  gap: 7px;
  margin-top: 2px;
  padding: 12px;
  border: 1px solid rgba(62, 142, 90, 0.3);
  border-radius: 16px;
  background: var(--forest-050);
}

.today-todo-composer > strong {
  color: var(--forest-900);
  font-size: 12px;
}

.today-todo-composer label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.today-todo-composer > input,
.today-todo-composer label input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(31, 45, 36, 0.14);
  border-radius: 11px;
  background: #ffffff;
  color: var(--forest-900);
  font-size: 11px;
}

.today-todo-composer > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.today-todo-composer > small {
  color: var(--muted);
  font-size: 8px;
}

.today-send-button {
  margin-top: var(--space-4);
}

.today-locked-panel {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  margin-top: var(--space-4);
  padding: 14px;
  border: 1px solid #ead49a;
  border-radius: var(--radius-lg);
  background: #fff7dd;
}

.today-locked-panel > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #ffffff;
  color: #795710;
}

.today-locked-panel > span svg {
  width: 21px;
  height: 21px;
}

.today-locked-panel strong {
  color: var(--forest-900);
  font-size: 13px;
}

.today-locked-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.42;
}

.today-locked-panel .primary-button {
  grid-column: 1 / -1;
  min-height: 48px;
  margin-top: 2px;
}

.device-hero {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-2);
  padding: var(--space-4);
  border: 1.5px solid rgba(35, 77, 52, 0.24);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #eef5eb, #fff9e9);
}

.device-hero .eyebrow {
  margin-bottom: var(--space-1);
}

.device-hero h2 {
  margin: 0;
  font-size: 22px;
}

.device-detail {
  margin: var(--space-1) 0 0;
  color: var(--muted);
  font-size: 12px;
}

.device-management {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-6);
}

.add-device-button {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 24px;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid rgba(35, 77, 52, 0.3);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.9);
  color: var(--forest-900);
  text-align: left;
  box-shadow: 0 8px 24px rgba(35, 77, 52, 0.05);
}

.add-device-button:active {
  transform: scale(0.985);
}

.add-device-plus {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--forest-800);
  color: #fff;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}

.add-device-copy strong,
.add-device-copy small {
  display: block;
}

.add-device-copy strong {
  font-size: 15px;
  line-height: 1.25;
}

.add-device-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.connected-devices {
  min-width: 0;
  max-width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.74);
}

.connected-devices-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  color: var(--forest-900);
  font-size: 12px;
  font-weight: 800;
}

.connected-devices-heading small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.connected-device-list {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.connected-device-list::-webkit-scrollbar {
  display: none;
}

.connected-device-pill {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-width: 132px;
  min-height: 50px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--forest-900);
  text-align: left;
}

.connected-device-pill.active {
  border-color: rgba(62, 142, 90, 0.62);
  background: var(--forest-100);
}

.connected-device-pill span,
.connected-device-pill small {
  display: block;
}

.connected-device-pill span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connected-device-pill small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.device-orbit {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: white;
  box-shadow: 0 8px 24px rgba(35, 77, 52, 0.08);
}

.device-orbit img {
  width: 42px;
  height: 42px;
}

.status-chip,
.committed-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--forest-800);
  font-size: 11px;
  font-weight: 800;
}

.status-chip span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--forest-600);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
}

.section-heading.small {
  margin-top: var(--space-7);
}

.source-list {
  display: grid;
  gap: var(--space-3);
}

.source-card {
  width: 100%;
  min-height: 96px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 26px rgba(35, 77, 52, 0.035);
}

.source-card--game {
  position: relative;
  grid-template-columns: 56px minmax(0, 1fr);
}

.source-card--game .source-copy strong {
  padding-right: 140px;
}

.source-card--game .source-badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
}

.source-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
}

.source-icon svg {
  width: 27px;
  height: 27px;
}

.source-icon.photo {
  background: #e8f1e4;
  color: var(--forest-700);
}

.source-icon.template {
  background: #fff0c6;
  color: #795710;
}

.source-icon.ai {
  background: #e9edff;
  color: #354f9d;
}

.source-icon.game {
  background: var(--forest-800);
  color: var(--gold);
}

.source-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.source-copy strong {
  color: var(--forest-900);
  font-size: 16px;
}

.source-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.source-badge {
  align-self: start;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--forest-050);
  color: var(--forest-700);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.source-badge .birdie-plus-lockup {
  font-size: inherit;
  letter-spacing: 0;
}

.source-badge .birdie-plus-lockup img {
  width: 21px;
}

.game-screen {
  background:
    radial-gradient(circle at 88% 8%, rgba(242, 193, 78, 0.2), transparent 27%),
    var(--cream);
}

.game-plus-pill {
  min-width: 44px;
  display: inline-grid;
  place-items: center;
  justify-self: end;
  align-self: center;
  padding: 6px 7px;
  border: 1px solid rgba(35, 77, 52, 0.16);
  border-radius: 999px;
  background: var(--forest-050);
  color: var(--forest-700);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.game-plus-pill .birdie-plus-lockup {
  font-size: inherit;
  letter-spacing: 0;
}

.game-plus-pill .birdie-plus-lockup img {
  width: 22px;
}

.game-body {
  padding-top: var(--space-3);
}

.game-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--forest-900), #2d6041);
  box-shadow: var(--shadow-card);
}

.game-hero::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  top: -78px;
  right: -62px;
  border: 1px solid rgba(242, 193, 78, 0.24);
  border-radius: 50%;
}

.game-hero-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: var(--space-4);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--gold);
}

.game-hero-icon svg {
  width: 27px;
  height: 27px;
}

.game-hero .eyebrow {
  color: #f6d774;
}

.game-hero h1 {
  max-width: 310px;
  margin-bottom: var(--space-3);
  color: white;
  font-size: clamp(30px, 8.5vw, 38px);
}

.game-hero .lede {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.game-guide-note {
  display: grid;
  gap: 4px;
  margin-bottom: var(--space-4);
  padding: 13px 14px;
  border: 1px solid rgba(35, 77, 52, 0.13);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.82);
}

.game-guide-note strong {
  color: var(--forest-900);
  font-size: 13px;
}

.game-guide-note span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.game-format-grid {
  display: grid;
  gap: var(--space-3);
}

.game-format-card {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(23, 59, 39, 0.055);
}

.game-format-heading {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.game-format-heading > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--forest-100);
  color: var(--forest-700);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
}

.game-format-heading p {
  margin: 0 0 2px;
  color: var(--forest-700);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-format-heading h2 {
  margin: 0;
  font-size: 21px;
}

.game-format-card > p {
  margin: 0 0 6px;
  color: var(--forest-900);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.game-format-card > small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.game-format-card.wolf .game-format-heading > span {
  background: #fff0c6;
  color: #795710;
}

.game-format-card.bbb .game-format-heading > span {
  background: #e9edff;
  color: #354f9d;
}

.game-boundary {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--forest-050);
  color: var(--forest-700);
}

.game-boundary > svg {
  width: 24px;
  height: 24px;
}

.game-boundary span {
  display: grid;
  gap: 3px;
}

.game-boundary strong {
  color: var(--forest-900);
  font-size: 12px;
}

.game-boundary small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.game-start-button {
  width: 100%;
  margin: 0 0 var(--space-5);
}

.game-resume-card,
.game-summary-card {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding: var(--space-4);
  border: 1px solid rgba(35, 77, 52, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 12px 34px rgba(23, 59, 39, 0.07);
}

.game-resume-card h2,
.game-summary-card h2 {
  margin: 2px 0 4px;
  font-size: 25px;
}

.game-resume-card > div > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.game-resume-actions {
  display: grid;
  gap: var(--space-2);
}

.game-scoreboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-scoreboard li {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid rgba(35, 77, 52, 0.1);
  border-radius: 13px;
  background: var(--forest-050);
}

.game-scoreboard li > span {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-scoreboard strong {
  color: var(--forest-900);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
}

.game-scoreboard strong small {
  color: var(--forest-700);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.game-19th-hole-entry {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
  padding: 12px 13px;
  border: 1px solid rgba(113, 78, 24, 0.22);
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--forest-900);
  font: inherit;
  text-align: left;
  box-shadow: 0 10px 28px rgba(23, 59, 39, 0.06);
}

.game-19th-hole-entry:focus-visible {
  outline: 3px solid rgba(47, 111, 176, 0.46);
  outline-offset: 3px;
}

.game-19th-hole-entry:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.game-19th-hole-previews {
  position: relative;
  width: 82px;
  height: 62px;
  display: block;
}

.game-19th-hole-previews img {
  position: absolute;
  top: 4px;
  width: 54px;
  height: 54px;
  display: block;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: white;
  object-fit: contain;
  box-shadow: 0 5px 12px rgba(23, 59, 39, 0.13);
}

.game-19th-hole-previews img:nth-child(1) { left: 0; z-index: 3; }
.game-19th-hole-previews img:nth-child(2) { left: 14px; z-index: 2; }
.game-19th-hole-previews img:nth-child(3) { left: 28px; z-index: 1; }

.game-19th-hole-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.game-19th-hole-copy > small,
.game-19th-hole-kicker {
  color: #87621d;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-19th-hole-copy > strong {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.08;
}

.game-19th-hole-copy > span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.game-19th-hole-action {
  min-width: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: var(--forest-700);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.game-19th-hole-action svg {
  width: 15px;
  height: 15px;
}

.game-page-heading {
  margin-bottom: var(--space-5);
}

.game-page-heading h1 {
  margin-bottom: var(--space-2);
  font-size: clamp(30px, 9vw, 38px);
}

.game-screen [tabindex="-1"]:focus {
  outline: none;
}

.game-page-heading .lede {
  margin: 0;
  font-size: 13px;
}

.game-setup-form {
  display: grid;
  gap: var(--space-5);
}

.game-fieldset {
  min-width: 0;
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  border: 0;
}

.game-fieldset > legend,
.game-course-field > label {
  width: 100%;
  padding: 0;
  color: var(--forest-900);
  font-size: 13px;
  font-weight: 850;
}

.game-course-field > label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.game-field-help {
  margin: -5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.game-format-picker,
.game-player-fields,
.game-bbb-fields {
  display: grid;
  gap: 9px;
}

.game-format-option {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: var(--space-3);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  color: var(--forest-900);
  text-align: left;
}

.game-format-option > span {
  display: grid;
  gap: 3px;
}

.game-format-option strong {
  font-size: 14px;
}

.game-format-option small {
  color: var(--muted);
  font-size: 10px;
}

.game-format-option > svg {
  width: 20px;
  height: 20px;
  opacity: 0;
}

.game-format-option.selected {
  border-color: var(--forest-700);
  background: var(--forest-050);
  box-shadow: inset 0 0 0 1px var(--forest-700);
}

.game-format-option.selected > svg {
  opacity: 1;
}

.game-player-field {
  display: grid;
  gap: 5px;
}

.game-player-field > label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.game-player-color {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border: 1px solid rgba(23, 59, 39, 0.5);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--paper);
}

.game-player-color.blue { background: #2b4da0; }
.game-player-color.green { background: #2c6b43; }
.game-player-color.red { background: #c8322d; }
.game-player-color.yellow { background: #f2c14e; }
.game-player-color.black { background: #1f2d24; }

.game-player-field > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}

.game-player-field input,
.game-course-field input,
.game-score-fields input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--forest-900);
  font: inherit;
}

.game-player-field input,
.game-course-field input {
  padding: 0 13px;
}

.game-player-field button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(166, 68, 54, 0.18);
  border-radius: 13px;
  background: #fff4ef;
  color: #934334;
  font-size: 22px;
}

.game-add-player {
  width: max-content;
  min-height: 44px;
}

.game-course-field {
  display: grid;
  gap: 6px;
}

.game-round-details {
  padding: 16px;
  border: 1px solid rgba(54, 80, 157, 0.16);
  border-radius: var(--radius-md);
  background: #f4f5fc;
}

.game-round-details > legend {
  width: auto;
  padding: 0 6px;
}

.game-course-picker {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.game-location-card {
  min-height: 66px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(35, 77, 52, 0.2);
  border-radius: 14px;
  background: var(--paper);
}

.game-location-card.ready {
  border-color: rgba(62, 142, 90, 0.4);
  background: var(--forest-050);
}

.game-location-card.warning {
  border-color: rgba(167, 66, 56, 0.25);
  background: var(--danger-soft);
}

.game-location-card > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.game-location-card strong {
  color: var(--forest-900);
  font-size: 13px;
  font-weight: 850;
}

.game-location-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.38;
}

.game-location-card > button {
  min-width: 70px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid rgba(35, 77, 52, 0.14);
  border-radius: 12px;
  background: #ffffff;
  color: var(--forest-700);
  font-size: 11px;
  font-weight: 850;
}

.game-location-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--forest-600);
  box-shadow: 0 0 0 4px rgba(62, 142, 90, 0.13);
}

.game-location-symbol {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--forest-050);
  color: var(--forest-700);
  font-size: 14px;
  font-weight: 900;
}

.game-location-card.warning .game-location-symbol {
  background: #ffffff;
  color: var(--danger);
}

.game-nearby-courses {
  display: grid;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(62, 142, 90, 0.3);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

.game-nearby-courses > h3 {
  margin: 0;
  padding: 5px 7px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.game-nearby-courses ol {
  max-height: 300px;
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  list-style: none;
}

.game-nearby-courses li {
  min-width: 0;
}

.game-nearby-courses button,
.game-course-results button {
  width: 100%;
  min-height: 52px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--forest-900);
  text-align: left;
}

.game-nearby-courses button:active,
.game-course-results button:active,
.game-course-results button[aria-selected="true"],
.game-nearby-courses button:focus-visible,
.game-course-results button:focus-visible {
  background: var(--forest-050);
  outline: 2px solid rgba(62, 142, 90, 0.34);
  outline-offset: -2px;
}

.game-nearby-courses strong,
.game-course-results strong {
  font-size: 14px;
  font-weight: 850;
}

.game-nearby-courses button small,
.game-course-results button small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.game-nearby-courses button i,
.game-course-results button i {
  color: var(--forest-700);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.game-nearby-error {
  padding: 10px 11px;
  border: 1px solid rgba(181, 115, 41, 0.3);
  border-radius: 11px;
  background: rgba(255, 246, 221, 0.72);
  color: var(--forest-900);
  font-size: 12px;
  line-height: 1.42;
}

.game-course-search {
  position: relative;
  display: grid;
  gap: 6px;
}

.game-course-search > label {
  color: var(--forest-900);
  font-size: 13px;
  font-weight: 850;
}

.game-course-search > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.game-course-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.game-course-search-row input {
  min-width: 0;
  min-height: 48px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--forest-900);
  font: inherit;
}

.game-course-search-row > button {
  min-height: 48px;
  padding: 8px 13px;
  border: 0;
  border-radius: 12px;
  background: var(--forest-800);
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.game-course-search-row > button:disabled {
  opacity: 0.62;
}

.game-course-results {
  max-height: 260px;
  display: grid;
  gap: 3px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

.game-course-search-error {
  margin: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: #fff0ea;
  color: #8c382d;
  font-size: 12px;
  line-height: 1.4;
}

.game-location-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 9px;
}

.game-form-error {
  margin: -5px 0 0;
  padding: 11px 12px;
  border-radius: 12px;
  background: #fff0ea;
  color: #8c382d;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}

.game-hole-count {
  min-width: 45px;
  justify-self: end;
  color: var(--forest-700);
  font-size: 11px;
  font-weight: 850;
}

.game-hole-heading {
  margin-bottom: var(--space-4);
}

.game-progress {
  height: 5px;
  overflow: hidden;
  margin-top: var(--space-3);
  border-radius: 999px;
  background: rgba(35, 77, 52, 0.1);
}

.game-progress i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--forest-700);
}

.game-hole-heading + .game-scoreboard {
  margin-bottom: var(--space-4);
}

.game-correction-note {
  display: grid;
  gap: 3px;
  margin-bottom: var(--space-4);
  padding: 11px 12px;
  border: 1px solid rgba(35, 77, 52, 0.12);
  border-radius: 12px;
  background: var(--forest-050);
}

.game-correction-note strong {
  color: var(--forest-900);
  font-size: 11px;
}

.game-correction-note span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.game-correction-note.warning {
  border-color: rgba(155, 104, 24, 0.2);
  background: #fff5d9;
}

.game-correction-note.success {
  background: #edf6eb;
}

.game-hole-fields,
.game-bbb-fields,
.game-wolf-fields {
  margin-bottom: var(--space-5);
}

.game-score-fields {
  display: grid;
  gap: 9px;
}

.game-score-fields label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.game-score-fields label > span {
  overflow: hidden;
  color: var(--forest-900);
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-score-fields input {
  padding: 0 8px;
  text-align: center;
  font-size: 19px;
  font-weight: 800;
}

.game-choice-field {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.game-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.game-choice-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.game-choice {
  min-width: 0;
  min-height: 46px;
  padding: 8px;
  border: 1px solid rgba(35, 77, 52, 0.14);
  border-radius: 12px;
  background: var(--forest-050);
  color: var(--forest-900);
  font-size: 11px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.game-choice.selected {
  border-color: var(--forest-700);
  background: var(--forest-800);
  color: white;
  box-shadow: inset 0 0 0 1px var(--forest-700);
}

.game-wolf-fields {
  display: grid;
  gap: var(--space-4);
}

.game-wolf-role {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 13px 14px;
  border-radius: 15px;
  background: var(--forest-900);
  color: white;
}

.game-wolf-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--gold);
  color: var(--forest-900);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 800;
}

.game-wolf-role > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.game-wolf-role small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.game-wolf-role strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.game-tee-order {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-tee-order li {
  min-height: 44px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--forest-900);
  font-size: 11px;
  font-weight: 750;
}

.game-tee-player {
  min-width: 0;
  font: inherit;
  overflow-wrap: anywhere;
}

.game-tee-order li > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--forest-050);
  color: var(--forest-700);
  font-size: 10px;
}

.game-tee-order li.done > span {
  background: var(--forest-700);
  color: white;
}

.game-tee-order li.wolf {
  border-color: rgba(242, 193, 78, 0.45);
  background: #fff9e8;
}

.game-tee-order li small {
  color: #795710;
  font-size: 8px;
  text-transform: uppercase;
}

.game-wolf-window,
.game-wolf-decision {
  display: grid;
  gap: 10px;
  padding: var(--space-4);
  border: 1px solid rgba(242, 193, 78, 0.5);
  border-radius: 16px;
  background: #fff8df;
}

.game-wolf-window p,
.game-wolf-decision > span {
  display: grid;
  gap: 3px;
  margin: 0;
}

.game-wolf-window p strong,
.game-wolf-decision strong {
  min-width: 0;
  color: var(--forest-900);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.game-wolf-window p span,
.game-wolf-decision small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.game-wolf-window .primary-button,
.game-wolf-window .secondary-button {
  min-height: 46px;
  overflow-wrap: anywhere;
}

.game-wolf-decision.locked {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.game-save-hole {
  width: 100%;
}

.game-hole-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: var(--space-3);
}

.game-hole-nav button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--forest-700);
  font-size: 11px;
  font-weight: 800;
}

.game-hole-nav button:disabled {
  opacity: 0.35;
}

.game-hole-nav svg {
  width: 17px;
  height: 17px;
}

.game-summary-hero {
  display: grid;
  justify-items: center;
  margin-bottom: var(--space-5);
  padding: var(--space-5) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--forest-900);
  color: white;
  text-align: center;
}

.game-summary-check {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: var(--space-3);
  border-radius: 50%;
  background: var(--gold);
  color: var(--forest-900);
}

.game-summary-check svg {
  width: 27px;
  height: 27px;
}

.game-summary-hero .eyebrow {
  color: #f6d774;
}

.game-summary-hero h1 {
  margin: 3px 0 8px;
  color: white;
  font-size: 31px;
}

.game-summary-hero > p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.game-summary-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.game-summary-title h2 {
  margin: 0;
  font-size: 20px;
}

.game-summary-title span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.game-unawarded-note {
  margin: 0;
  padding: 10px 11px;
  border-radius: 11px;
  background: #fff5d9;
  color: #755414;
  font-size: 10px;
  line-height: 1.45;
}

.game-keepsake-prompt {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  margin: 0 0 var(--space-5);
  padding: 16px;
  border: 1px solid rgba(54, 80, 157, 0.22);
  border-radius: var(--radius-lg);
  background: #f3f5ff;
  box-shadow: 0 10px 28px rgba(23, 59, 39, 0.06);
}

.game-keepsake-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #36509d;
  color: white;
}

.game-keepsake-icon svg,
.game-keepsake-reopen > svg:first-child {
  width: 22px;
  height: 22px;
}

.game-keepsake-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.game-keepsake-copy > small,
.game-keepsake-editor-note > span {
  color: #36509d;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.game-keepsake-copy h2 {
  margin: 0;
  color: var(--forest-900);
  font-size: 22px;
  line-height: 1.08;
}

.game-keepsake-copy p,
.game-keepsake-wait {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.game-keepsake-copy > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 3px;
}

.game-keepsake-copy .text-button {
  min-height: 44px;
  padding: 0 8px;
}

.game-keepsake-reopen {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  margin: 0 0 var(--space-5);
  padding: 11px 14px;
  border: 1px solid rgba(54, 80, 157, 0.2);
  border-radius: var(--radius-md);
  background: #f3f5ff;
  color: #36509d;
  text-align: left;
}

.game-keepsake-reopen > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.game-keepsake-reopen strong {
  color: var(--forest-900);
  font-size: 12px;
}

.game-keepsake-reopen small {
  color: var(--muted);
  font-size: 9px;
}

.game-keepsake-reopen > svg:last-child {
  width: 18px;
  height: 18px;
}

.marker-moment-test-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
  padding: 14px;
  border: 1px dashed rgba(38, 79, 190, 0.32);
  border-radius: var(--radius-md);
  background: #f3f5ff;
}

.marker-moment-test-entry > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.marker-moment-test-entry small,
.marker-moment-kicker {
  color: #36509d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.marker-moment-test-entry strong {
  color: var(--forest-900);
  font-size: 14px;
}

.marker-moment-test-entry p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.marker-moment-suggestion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  align-items: center;
  gap: var(--space-4);
  margin: 0 0 var(--space-5);
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(35, 77, 52, 0.16);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #fffdf8 0%, #f2f7ed 100%);
  box-shadow: 0 14px 34px rgba(23, 59, 39, 0.08);
}

.marker-moment-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.marker-moment-copy h2 {
  margin: 0;
  color: var(--forest-900);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.05;
}

.marker-moment-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.marker-moment-copy .primary-button {
  min-height: 44px;
  margin-top: 2px;
  padding: 0 12px;
  font-size: 11px;
}

.marker-moment-copy > small:last-child {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.marker-moment-suggestion > img {
  width: 116px;
  height: 116px;
  display: block;
  border: 1px solid rgba(35, 77, 52, 0.12);
  border-radius: 50%;
  background: white;
  object-fit: cover;
  box-shadow: 0 9px 22px rgba(23, 59, 39, 0.12);
}

.marker-moment-suggestion.is-dynamic-recap {
  grid-template-columns: minmax(0, 1fr) 144px;
}

.marker-moment-suggestion.is-dynamic-recap > img {
  width: 144px;
  height: 144px;
}

.marker-moment-auto-setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0 0 var(--space-5);
  padding: 14px 15px;
  border: 1px solid rgba(35, 77, 52, 0.14);
  border-radius: var(--radius-md);
  background: rgba(246, 249, 243, 0.92);
}

.marker-moment-auto-setting > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.marker-moment-auto-setting small {
  color: #36509d;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.marker-moment-auto-setting strong {
  color: var(--forest-900);
  font-size: 13px;
}

.marker-moment-auto-setting p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.marker-moment-auto-setting button[role="switch"] {
  min-width: 64px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid rgba(35, 77, 52, 0.2);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
}

.marker-moment-auto-setting button[role="switch"] i {
  width: 20px;
  height: 20px;
  display: block;
  border-radius: 50%;
  background: #b9c2ba;
}

.marker-moment-auto-setting button[role="switch"][aria-checked="true"] {
  border-color: rgba(35, 77, 52, 0.3);
  background: var(--forest-900);
  color: white;
}

.marker-moment-auto-setting button[role="switch"][aria-checked="true"] i {
  background: #f2c94c;
}

.marker-moment-auto-setting button[role="switch"]:disabled {
  opacity: 0.58;
}

.marker-moment-delivery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  align-items: center;
  gap: 14px;
  margin: 0 0 var(--space-5);
  padding: 15px;
  border: 1px solid rgba(35, 77, 52, 0.18);
  border-left: 4px solid #36509d;
  border-radius: var(--radius-lg);
  background: #f7f8fd;
  box-shadow: 0 12px 30px rgba(23, 59, 39, 0.07);
}

.marker-moment-delivery > div {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.marker-moment-delivery h2 {
  margin: 0;
  color: var(--forest-900);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.08;
}

.marker-moment-delivery p,
.marker-moment-delivery small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.marker-moment-delivery p.marker-moment-delivery-status {
  color: var(--forest-700);
  font-size: 13px;
  font-weight: 750;
}

.marker-moment-delivery .secondary-button {
  min-height: 44px;
  margin-top: 2px;
}

.marker-moment-delivery > img {
  width: 88px;
  height: 88px;
  display: block;
  border: 1px solid rgba(35, 77, 52, 0.12);
  border-radius: 50%;
  background: white;
  object-fit: cover;
}

.marker-moment-delivery.is-dynamic-recap {
  grid-template-columns: minmax(0, 1fr) 136px;
}

.marker-moment-delivery.is-dynamic-recap > img {
  width: 136px;
  height: 136px;
}

.marker-moment-delivery.is-success {
  border-left-color: #347449;
  background: #f0f8ef;
}

.marker-moment-delivery.is-failure {
  border-left-color: #a45c31;
  background: #fff7ef;
}

.marker-moment-test-note {
  display: grid;
  gap: 4px;
  margin-bottom: var(--space-4);
  padding: 12px 13px;
  border-radius: 13px;
  background: #eef1ff;
}

.marker-moment-test-note strong {
  color: #354f9d;
  font-size: 10px;
  letter-spacing: 0.05em;
}

.marker-moment-test-note span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.marker-moment-test-grid {
  display: grid;
  gap: var(--space-3);
}

.marker-moment-test-group {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-6);
}

.marker-moment-test-group-heading {
  display: grid;
  gap: 4px;
  padding: 0 2px;
}

.marker-moment-test-group-heading span {
  color: #36509d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.marker-moment-test-group-heading h2,
.marker-moment-test-group-heading p {
  margin: 0;
}

.marker-moment-test-group-heading h2 {
  color: var(--forest-900);
  font-size: 20px;
}

.marker-moment-test-group-heading p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.marker-moment-test-group.is-recap {
  padding: 14px;
  border: 1px solid rgba(38, 79, 190, 0.18);
  border-radius: var(--radius-lg);
  background: #f6f7ff;
}

.marker-moment-test-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  padding: 13px;
  border: 1px solid rgba(35, 77, 52, 0.14);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(23, 59, 39, 0.06);
}

.marker-moment-test-card img {
  width: 118px;
  height: 118px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}

.marker-moment-test-card > div {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.marker-moment-test-card small {
  color: #36509d;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.marker-moment-test-card h2 {
  margin: 0;
  color: var(--forest-900);
  font-size: 19px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.marker-moment-test-card .primary-button {
  min-height: 44px;
  padding: 0 10px;
  font-size: 10px;
}

.marker-moment-transfer-intro {
  padding-top: 2px;
}

.marker-moment-transfer-intro .marker-moment-kicker {
  margin: 0 0 5px;
}

@media (max-width: 360px) {
  .game-location-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .game-location-card > button {
    width: 100%;
    grid-column: 1 / -1;
  }

  .game-nearby-courses ol {
    max-height: 240px;
  }

  .game-location-fields {
    grid-template-columns: 1fr;
  }

  .game-19th-hole-entry {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px;
    padding: 11px;
  }

  .game-19th-hole-previews {
    width: 70px;
  }

  .game-19th-hole-previews img {
    width: 50px;
    height: 50px;
  }

  .game-19th-hole-previews img:nth-child(2) { left: 10px; }
  .game-19th-hole-previews img:nth-child(3) { left: 20px; }

  .game-19th-hole-action {
    grid-column: 2;
    justify-content: flex-start;
  }

  .game-choice-grid.three {
    grid-template-columns: 1fr;
  }

  .game-summary-hero h1 {
    font-size: 27px;
  }

  .marker-moment-suggestion {
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 12px;
    padding: 13px;
  }

  .marker-moment-delivery {
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 11px;
    padding: 13px;
  }

  .marker-moment-delivery > img {
    width: 74px;
    height: 74px;
  }

  .marker-moment-auto-setting {
    gap: 10px;
    padding: 12px;
  }

  .marker-moment-suggestion > img {
    width: 96px;
    height: 96px;
  }

  .marker-moment-suggestion.is-dynamic-recap,
  .marker-moment-delivery.is-dynamic-recap {
    grid-template-columns: 1fr;
  }

  .marker-moment-suggestion.is-dynamic-recap > div,
  .marker-moment-delivery.is-dynamic-recap > div {
    grid-row: 2;
  }

  .marker-moment-suggestion.is-dynamic-recap > img,
  .marker-moment-delivery.is-dynamic-recap > img {
    grid-row: 1;
    justify-self: center;
  }

  .marker-moment-suggestion.is-dynamic-recap > img {
    width: 144px;
    height: 144px;
  }

  .marker-moment-delivery.is-dynamic-recap > img {
    width: 136px;
    height: 136px;
  }

  .marker-moment-test-entry {
    grid-template-columns: 1fr;
  }

  .marker-moment-test-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
  }

  .marker-moment-test-card img {
    width: 96px;
    height: 96px;
  }
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.recent-card {
  overflow: hidden;
  padding: 0 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--forest-900);
  font-size: 12px;
  font-weight: 750;
}

.recent-open {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--forest-900);
  text-align: left;
}

.recent-open canvas {
  width: 100%;
  display: block;
  aspect-ratio: 1;
  background: white;
}

.recent-open > span {
  display: block;
  overflow: hidden;
  padding: var(--space-3) var(--space-3) var(--space-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 var(--space-3);
}

.recent-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--forest-050);
  color: var(--forest-700);
  font-size: 10px;
  font-weight: 850;
}

.recent-action svg {
  width: 15px;
  height: 15px;
}

.recent-action.danger {
  border-color: rgba(154, 53, 43, 0.2);
  background: #fff6f4;
  color: #8a3028;
}

html.dialog-open,
html.dialog-open body {
  overflow: hidden;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: end center;
  padding: 24px max(18px, env(safe-area-inset-right))
    max(18px, calc(env(safe-area-inset-bottom) + 12px)) max(18px, env(safe-area-inset-left));
  background: rgba(13, 35, 23, 0.48);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.confirm-dialog {
  width: min(100%, 430px);
  padding: 26px 22px 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(13, 35, 23, 0.3);
  color: var(--ink);
  text-align: center;
  animation: confirm-in 180ms cubic-bezier(0.2, 0.85, 0.3, 1) both;
}

.confirm-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: var(--danger-soft);
  color: var(--danger);
}

.confirm-icon svg {
  width: 24px;
  height: 24px;
}

.confirm-icon.game-confirm-icon {
  background: #fff2c7;
  color: var(--forest-800);
}

.confirm-dialog .eyebrow {
  margin: 0 0 8px;
  color: var(--forest-600);
}

.confirm-dialog h2 {
  margin: 0;
  color: var(--forest-900);
  font-family: var(--serif);
  font-size: clamp(28px, 8vw, 36px);
  line-height: 1.02;
}

.confirm-dialog > p:last-of-type {
  max-width: 340px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.confirm-dialog > p strong {
  color: var(--ink);
}

.confirm-dialog > .game-new-round-error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff0ea;
  color: #8c382d;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.confirm-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.confirm-actions button {
  min-height: 50px;
  padding: 12px 16px;
  border-radius: 15px;
  font-size: 15px;
  font-weight: 850;
}

.confirm-keep {
  border: 1px solid var(--forest-700);
  background: var(--forest-800);
  color: white;
  box-shadow: var(--shadow-button);
}

.confirm-delete {
  border: 1px solid rgba(167, 66, 56, 0.28);
  background: var(--danger-soft);
  color: var(--danger);
}

@keyframes confirm-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 560px) {
  .confirm-overlay {
    place-items: center;
  }
}

.share-design-button {
  width: 100%;
  margin: var(--space-4) 0 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.share-design-button svg {
  width: 18px;
  height: 18px;
}

.test-mode-banner {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 14px;
  border-bottom: 2px solid #272012;
  background: #ffd64a;
  color: #272012;
  box-shadow: 0 5px 16px rgba(39, 32, 18, 0.14);
}

.test-mode-banner > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.test-mode-banner strong {
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.test-mode-banner small {
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.test-mode-banner button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #272012;
  border-radius: 10px;
  background: #272012;
  color: white;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.studio-trust {
  margin-top: var(--space-6);
}

.topbar-text {
  min-width: 48px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--forest-700);
  font-size: 12px;
  font-weight: 800;
}

.template-screen-body {
  padding-top: var(--space-2);
}

.game-19th-hole-library {
  background:
    radial-gradient(circle at 88% 7%, rgba(242, 193, 78, 0.18), transparent 24%),
    var(--cream);
}

.game-19th-hole-library-intro {
  display: grid;
  gap: 7px;
  margin-bottom: var(--space-5);
  padding: 16px;
  border: 1px solid rgba(113, 78, 24, 0.2);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.game-19th-hole-library-intro h1 {
  margin: 0;
  color: var(--forest-900);
  font-size: clamp(27px, 7.5vw, 34px);
  line-height: 1.04;
}

.game-19th-hole-library-intro p,
.game-19th-hole-library-intro > small {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.48;
}

.game-19th-hole-library-intro p strong {
  color: var(--forest-800);
}

.game-19th-hole-library-intro > small {
  color: var(--forest-700);
  font-weight: 800;
}

.template-library-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.template-library-heading h1 {
  margin: 0;
  font-size: clamp(26px, 7.5vw, 30px);
  line-height: 1;
}

.template-library-heading > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.template-series-picker {
  display: grid;
  gap: 6px;
  margin-bottom: var(--space-3);
}

.template-series-picker-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--forest-900);
  font-size: 11px;
  font-weight: 850;
}

.template-series-picker-label small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
}

.template-series-control {
  position: relative;
}

.template-series-select {
  width: 100%;
  min-height: 48px;
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 44px 9px 13px;
  border: 1px solid var(--forest-700);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--forest-900);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.template-series-select:focus-visible {
  outline: 3px solid rgba(38, 151, 76, 0.28);
  outline-offset: 2px;
}

.template-series-chevron {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 20px;
  height: 20px;
  color: var(--forest-700);
  pointer-events: none;
  transform: translateY(-50%) rotate(90deg);
}

.template-series-chevron svg {
  width: 100%;
  height: 100%;
}

.template-series-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-inline: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
}

.template-series-meta > span:first-child {
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-series-access-summary {
  flex: 0 0 auto;
  color: var(--forest-700);
  font-weight: 800;
  white-space: nowrap;
}

.template-category {
  display: grid;
  gap: 6px;
  margin-bottom: var(--space-6);
}

.template-category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.template-category-heading h2 {
  margin: 0;
  color: var(--forest-900);
  font-size: 22px;
  line-height: 1.1;
}

.template-category-heading span {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.template-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.us-kids-league-library .template-category {
  gap: 8px;
  margin-bottom: 18px;
}

.us-kids-league-library .template-category-heading {
  align-items: end;
}

.us-kids-league-library .template-category-heading h2 {
  min-width: 0;
  font-size: 18px;
  line-height: 1.05;
}

.us-kids-league-library .template-category-heading span {
  font-size: 10px;
  font-weight: 750;
}

.us-kids-league-library .template-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.us-kids-league-library .template-card-v2 {
  min-width: 0;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(23, 59, 39, 0.055);
}

.us-kids-league-library .template-info {
  gap: 3px;
  padding: 8px 9px 6px;
}

.us-kids-league-library .template-info strong {
  min-height: 2.5em;
  display: -webkit-box;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.us-kids-league-library .template-info small {
  min-height: 3.7em;
  display: -webkit-box;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.template-level-badge {
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 999px;
  background: #e8f1f7;
  color: #245b85;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.us-kids-league-library .template-access {
  margin: 0 9px 9px;
  padding: 4px 6px;
  font-size: 9px;
  white-space: nowrap;
}

.template-card-v2 {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--ink);
  text-align: left;
}

.template-card-v2.preview-only:disabled {
  opacity: 1;
  cursor: default;
}

.template-card-v2.preview-only .template-art {
  opacity: 0.78;
}

.template-art {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  overflow: hidden;
  background: white;
}

.template-art img {
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.template-info {
  display: grid;
  gap: 4px;
  padding: var(--space-3) var(--space-3) var(--space-2);
}

.template-info strong {
  color: var(--forest-900);
  font-size: 13px;
}

.template-info small {
  min-height: 32px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.template-access {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  margin: 0 var(--space-3) var(--space-3);
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--forest-050);
  color: var(--forest-700);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.template-access.premium {
  background: #fff0c6;
  color: #6d5013;
}

.template-access.manual {
  background: #fff0c6;
  color: #6d5013;
}

.template-access.preview {
  background: #edf1f4;
  color: #52636d;
}

.template-access svg {
  width: 11px;
  height: 11px;
}

.template-access .birdie-plus-lockup {
  font-size: inherit;
  letter-spacing: 0;
}

.template-access .birdie-plus-lockup img {
  width: 19px;
}

.ai-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 var(--space-5);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #edf1ff, #fff7dd);
}

.ai-hero .lede {
  margin-bottom: 0;
}

.ai-quota-card {
  display: grid;
  gap: 8px;
  margin: 0 0 var(--space-5);
  padding: var(--space-4);
  border: 1px solid rgba(35, 77, 52, 0.16);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(23, 59, 39, 0.06);
}

.ai-quota-card.member {
  border-color: rgba(242, 193, 78, 0.7);
  background: linear-gradient(145deg, #fffdf8, #fff7dd);
}

.ai-quota-card .eyebrow .birdie-plus-lockup {
  color: var(--forest-700);
  font-size: inherit;
  letter-spacing: inherit;
}

.ai-quota-card .eyebrow .birdie-plus-lockup img {
  width: 22px;
}

.ai-quota-card strong {
  color: var(--forest-900);
  font-size: 14px;
}

.ai-quota-card > span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.ai-quota-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--forest-100);
}

.ai-quota-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forest-600), var(--gold));
  transform-origin: left center;
  transition: transform 220ms ease;
}

.ai-spark {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: #354f9d;
}

.ai-spark svg {
  width: 27px;
  height: 27px;
}

.field-label {
  display: block;
  margin: 0 0 var(--space-2);
  color: var(--forest-900);
  font-size: 12px;
  font-weight: 800;
}

.prompt-input,
.editor-input {
  width: 100%;
  border: 1.5px solid rgba(35, 77, 52, 0.2);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--ink);
  outline: none;
}

.prompt-input {
  min-height: 132px;
  padding: var(--space-4);
  resize: vertical;
  font: inherit;
  line-height: 1.55;
}

.editor-input {
  height: 50px;
  padding: 0 var(--space-4);
}

.editor-textarea {
  min-height: 92px;
  height: auto;
  padding: 14px var(--space-4);
  resize: none;
  font: inherit;
  line-height: 1.35;
}

.prompt-input:focus,
.editor-input:focus {
  border-color: var(--forest-600);
  box-shadow: 0 0 0 3px rgba(62, 142, 90, 0.12);
}

.prompt-suggestions {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  margin: var(--space-3) 0 var(--space-5);
  padding-bottom: var(--space-1);
  scrollbar-width: none;
}

.prompt-suggestions button,
.style-chip,
.tool-row button {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(35, 77, 52, 0.2);
  border-radius: 999px;
  background: var(--paper);
  color: var(--forest-800);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.style-row,
.tool-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.style-chip.on {
  border-color: var(--forest-700);
  background: var(--forest-800);
  color: white;
}

.ai-button {
  margin-top: var(--space-5);
}

.microcopy {
  margin: var(--space-3) auto 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.locked-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding: var(--space-4);
  border: 1px solid #ead49a;
  border-radius: var(--radius-lg);
  background: #fff7dd;
}

.locked-card strong {
  color: var(--forest-900);
}

.locked-card p {
  margin: 5px 0 var(--space-3);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.locked-card .primary-button {
  grid-column: 1 / -1;
}

.locked-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: white;
  color: #795710;
}

.locked-icon svg {
  width: 23px;
  height: 23px;
}

.paywall-screen {
  background:
    radial-gradient(circle at 50% 12%, rgba(242, 193, 78, 0.25), transparent 32%),
    var(--cream);
}

.purchase-preview-notice {
  display: grid;
  gap: 2px;
  margin: 0 0 var(--space-4);
  padding: 10px 12px;
  border: 1px solid #ead49a;
  border-radius: var(--radius-sm);
  background: #fff7dd;
  color: #6d5013;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.paywall-free-exit {
  min-height: 44px;
  margin: 0 0 var(--space-4);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--forest-700);
  font-size: 13px;
  font-weight: 760;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.active-membership-card {
  display: grid;
  gap: 6px;
  margin: var(--space-5) 0;
  padding: var(--space-5);
  border: 1px solid rgba(62, 142, 90, 0.35);
  border-radius: var(--radius-md);
  background: var(--forest-050);
  color: var(--forest-900);
}

.active-membership-card strong {
  font-family: var(--serif);
  font-size: 22px;
}

.active-membership-card span {
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.55;
}

.plan-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 var(--space-5);
}

.plan-comparison article {
  min-width: 0;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.plan-comparison article.plus {
  border-color: rgba(62, 142, 90, 0.45);
  background: var(--forest-050);
}

.plan-comparison span,
.plan-comparison strong {
  display: block;
}

.plan-comparison span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.plan-comparison .birdie-plus-lockup {
  display: inline-flex;
  color: inherit;
  font-size: inherit;
  letter-spacing: 0;
}

.plan-comparison .birdie-plus-lockup img {
  width: 23px;
}

.plan-comparison strong {
  margin-top: 3px;
  color: var(--forest-900);
  font-size: 14px;
}

.plan-comparison ul {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.plan-comparison li {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.paywall-mark {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: var(--space-4) 0 var(--space-5);
  border-radius: 24px;
  background: var(--forest-800);
  color: var(--gold);
  box-shadow: var(--shadow-button);
}

.paywall-mark svg {
  width: 36px;
  height: 36px;
}

.paywall-mark .birdie-plus-lockup,
.paywall-mark .birdie-plus-lockup img {
  width: 58px;
}

.birdie-plus-eyebrow .birdie-plus-lockup {
  color: var(--forest-700);
  font-size: inherit;
  letter-spacing: inherit;
}

.benefit-list {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
}

.benefit-list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--forest-900);
  font-size: 13px;
  font-weight: 650;
}

.benefit-list svg {
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 50%;
  background: var(--forest-100);
  color: var(--forest-700);
}

.subscription-age-confirmation {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
  padding: var(--space-4);
  border: 1px solid rgba(62, 142, 90, 0.35);
  border-radius: var(--radius-md);
  background: var(--forest-050);
  color: var(--forest-900);
}

.subscription-age-confirmation input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--forest-700);
}

.subscription-age-confirmation span {
  display: grid;
  gap: 3px;
}

.subscription-age-confirmation strong {
  font-size: 13px;
}

.subscription-age-confirmation small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.offer-card {
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin: 0 0 var(--space-3);
  padding: var(--space-4);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--forest-900);
  text-align: left;
}

.offer-card.featured {
  border-color: var(--forest-600);
  background: var(--forest-050);
}

.offer-card:disabled {
  cursor: not-allowed;
  opacity: 0.66;
}

.offer-card[data-store-busy="true"]:disabled,
.restore-button:disabled {
  cursor: progress;
}

.store-status {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--forest-050);
  color: var(--forest-800);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.store-status.error {
  border-color: rgba(177, 62, 44, 0.3);
  background: rgba(177, 62, 44, 0.08);
  color: #7a2d22;
}

.offer-card span {
  display: grid;
  gap: 4px;
}

.offer-card strong {
  font-size: 14px;
}

.offer-card small {
  color: var(--muted);
  font-size: 11px;
}

.offer-card b {
  font-size: 14px;
  white-space: nowrap;
}

.restore-button {
  width: 100%;
  margin-top: var(--space-2);
}

.store-note {
  margin: var(--space-4) 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.editor-body {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: var(--space-1);
  overflow: hidden;
  padding-top: var(--space-1);
  padding-bottom: max(var(--space-1), env(safe-area-inset-bottom));
}

.editor-preview-workspace {
  min-height: 0;
}

.device-preview-shell {
  width: min(82vw, 330px);
  margin: 0 auto var(--space-5);
  padding: 18px;
  border-radius: 50%;
  background: #f7f6f1;
  box-shadow:
    inset 0 0 0 1px rgba(31, 45, 36, 0.12),
    0 18px 44px rgba(23, 59, 39, 0.12);
}

.device-preview-camera {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 50%;
  background: white;
  box-shadow: inset 0 0 0 2px rgba(31, 45, 36, 0.13);
}

.device-preview-camera canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.device-preview-paint-host {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #f4f1e8, #fffdf8);
}

.device-preview-paint-host canvas {
  opacity: 0;
}

.device-preview-paint-host.is-ready canvas {
  opacity: 1;
}

.device-preview-paint-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  padding: 20px;
  color: var(--muted-strong);
  text-align: center;
  pointer-events: none;
}

.device-preview-paint-state strong {
  font-size: 14px;
}

.device-preview-paint-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--forest-700);
  box-shadow: 0 8px 20px rgba(35, 77, 52, 0.09);
}

.device-preview-paint-mark svg {
  width: 22px;
  height: 22px;
}

.device-preview-paint-host.is-ready .device-preview-paint-state {
  display: none;
}

.device-preview-paint-host.is-error .device-preview-paint-state {
  color: var(--danger);
}

.editor-preview-shell {
  width: min(78vw, 320px);
  margin: 0 auto;
  padding: 10px;
  box-shadow:
    inset 0 0 0 1px rgba(31, 45, 36, 0.1),
    0 14px 34px rgba(23, 59, 39, 0.12);
}

#editorCanvas {
  position: relative;
  z-index: 1;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#editorCanvas:active {
  cursor: grabbing;
}

.editor-source-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-caption {
  display: block;
  margin: var(--space-3) 0 calc(-1 * var(--space-2));
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.editor-panel {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.82);
}

.canvas-help {
  margin: 8px 0 2px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
}

.ai-preview-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 5px 0 0;
  padding: 7px 10px;
  border: 1px solid rgba(47, 139, 87, 0.22);
  border-radius: 14px;
  background: #edf7ee;
  color: var(--forest-800);
  font-size: 10px;
  line-height: 1.3;
}

.ai-preview-note strong {
  font-size: 11px;
}

.editor-controls-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.editor-controls-scroll::-webkit-scrollbar {
  display: none;
}

.editor-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(233, 242, 230, 0.72);
}

.editor-tabs button {
  min-height: 48px;
  display: grid;
  grid-template-rows: 20px auto;
  place-items: center;
  gap: 2px;
  padding: 5px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.editor-tabs button.selected {
  background: var(--paper);
  color: var(--forest-800);
  box-shadow: 0 6px 18px rgba(23, 59, 39, 0.1);
}

.editor-tabs svg {
  width: 19px;
  height: 19px;
}

.game-19th-hole-editor-note {
  display: grid;
  gap: 4px;
  margin-bottom: var(--space-2);
  padding: 12px 13px;
  border: 1px solid rgba(113, 78, 24, 0.2);
  border-radius: 14px;
  background: #fff8e7;
}

.game-keepsake-editor-note {
  display: grid;
  gap: 4px;
  margin-bottom: var(--space-2);
  padding: 12px 13px;
  border: 1px solid rgba(54, 80, 157, 0.2);
  border-radius: 14px;
  background: #f3f5ff;
}

.ajga-editor-note {
  display: grid;
  gap: 4px;
  margin-bottom: var(--space-2);
  padding: 12px 13px;
  border: 1px solid rgba(22, 36, 58, 0.18);
  border-radius: 14px;
  background: #f4f2ea;
}

.ajga-editor-note > span {
  color: #5a6b80;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.ajga-editor-note strong {
  color: var(--forest-900);
  font-size: 14px;
}

.ajga-editor-note small {
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.4;
}

.us-kids-editor-note {
  border-color: rgba(36, 91, 133, 0.18);
  background: #f2f7f6;
}

.us-kids-editor-note > span {
  color: #245b85;
}

.ajga-badge-fields {
  display: grid;
  gap: 9px;
}

.ajga-badge-fields .field-label {
  margin: 1px 0 -3px;
}

.ajga-panel-heading {
  margin-bottom: 1px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.ajga-logo-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid rgba(22, 36, 58, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.ajga-logo-control small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.ajga-logo-control .ajga-logo-gesture-help {
  margin-top: 4px;
  color: var(--forest-700);
  font-weight: 800;
}

.ajga-logo-actions {
  display: flex;
  gap: 6px;
}

.ajga-logo-actions .editor-compact-button {
  min-width: 0;
  padding: 0 11px;
}

.ajga-logo-actions .editor-compact-button.quiet {
  color: var(--muted-strong);
}

.ajga-birdie-logo-control {
  min-width: 0;
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 10px 11px 11px;
  border: 1px solid rgba(22, 36, 58, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.ajga-birdie-logo-control > legend {
  padding: 0 3px;
}

.ajga-birdie-logo-help {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.ajga-birdie-logo-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.us-kids-birdie-logo-control .ajga-birdie-logo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.us-kids-birdie-logo-control .ajga-birdie-logo-choice {
  min-height: 78px;
}

.ajga-birdie-logo-choice {
  min-width: 0;
  min-height: 82px;
  display: grid;
  grid-template-rows: 52px auto;
  place-items: center;
  gap: 4px;
  padding: 5px 3px 6px;
  border: 1.5px solid rgba(22, 36, 58, 0.13);
  border-radius: 12px;
  background: #fff;
  color: var(--forest-900);
  font: inherit;
  text-align: center;
}

.ajga-birdie-logo-choice canvas {
  width: 52px;
  height: 52px;
  max-width: 100%;
  display: block;
  pointer-events: none;
}

.ajga-birdie-logo-choice small {
  max-width: 100%;
  color: var(--muted-strong);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.ajga-birdie-logo-choice.selected {
  border-color: var(--forest-700);
  background: var(--forest-050);
  box-shadow: 0 0 0 2px rgba(47, 139, 87, 0.13);
}

.ajga-birdie-logo-choice.selected small {
  color: var(--forest-900);
}

.ajga-location-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 0.65fr);
  gap: 9px;
}

.ajga-location-fields label {
  min-width: 0;
}

.ajga-badge-editor #editorCanvas {
  cursor: default;
}

.ajga-badge-editor.ajga-mark-framing #editorCanvas {
  cursor: grab;
}

.ajga-badge-editor.ajga-mark-framing #editorCanvas:active {
  cursor: grabbing;
}

.game-keepsake-editor-note strong {
  color: var(--forest-900);
  font-size: 13px;
}

.game-keepsake-editor-note small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.game-19th-hole-editor-note strong {
  color: var(--forest-900);
  font-size: 13px;
}

.game-19th-hole-editor-note small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.game-19th-hole-transfer-intro .game-19th-hole-kicker {
  margin: 0 0 5px;
}

.text-tool-icon,
.sticker-tool-icon {
  font-size: 19px;
  font-weight: 850;
  line-height: 1;
}

.editor-tool-panel {
  min-height: 0;
}

.editor-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.editor-panel-heading strong,
.editor-panel-heading small {
  display: block;
}

.editor-panel-heading > div {
  min-width: 0;
}

.editor-panel-heading strong {
  color: var(--forest-900);
  font-size: 15px;
}

.editor-panel-heading small {
  margin-top: 3px;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.45;
}

.editor-compact-button,
.editor-delete-button {
  min-height: 44px;
  border: 1px solid rgba(35, 77, 52, 0.2);
  border-radius: 13px;
  background: var(--paper);
  color: var(--forest-800);
  font-size: 12px;
  font-weight: 800;
}

.editor-compact-button {
  min-width: 84px;
  padding: 0 14px;
}

.editor-helper,
.editor-empty-note {
  margin: var(--space-2) 0 var(--space-3);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.editor-helper.strong {
  color: var(--forest-800);
  font-weight: 700;
}

.editor-empty-note {
  padding: var(--space-3);
  border-radius: 13px;
  background: var(--forest-050);
}

.editor-select {
  width: 100%;
  min-height: 46px;
  margin-top: var(--space-2);
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--forest-900);
}

.editor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: var(--space-2) 0 var(--space-1);
}

.editor-row .field-label {
  margin: 0;
}

.editor-row output {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.editor-range {
  width: 100%;
  accent-color: var(--forest-600);
}

.tool-row {
  margin: var(--space-4) 0 0;
}

.tool-row button,
.framing-row button {
  min-height: 44px;
}

.framing-label {
  margin-top: var(--space-2);
}

.framing-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(42px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.photo-framing-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
}

.photo-framing-row button {
  min-height: 48px;
  font-size: 13px;
  grid-column: auto;
}

.framing-row button {
  min-width: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(35, 77, 52, 0.2);
  border-radius: 12px;
  background: var(--paper);
  color: var(--forest-800);
  font-size: 12px;
  font-weight: 750;
}

.framing-row button:nth-last-child(-n + 2) {
  grid-column: span 2;
}

.photo-framing-row button:nth-last-child(-n + 2) {
  grid-column: auto;
}

.framing-row.compact {
  margin-top: var(--space-2);
}

.editor-color-border {
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
}

.editor-color-border-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

.editor-color-border-heading .field-label {
  margin: 0;
}

.editor-color-border-heading small {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 650;
}

.editor-frame-color-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(44px, 1fr));
  gap: var(--space-1);
  margin-top: var(--space-1);
}

.editor-frame-color {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 13px;
  background: transparent;
}

.editor-frame-color span {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 50%;
  background: var(--swatch);
}

.editor-frame-color.selected {
  border-color: var(--forest-700);
  background: var(--forest-050);
}

.editor-frame-color.black { --swatch: #000000; }
.editor-frame-color.white { --swatch: #ffffff; }
.editor-frame-color.red { --swatch: #dc2824; }
.editor-frame-color.yellow { --swatch: #f6c52a; }
.editor-frame-color.green { --swatch: #26974c; }
.editor-frame-color.blue { --swatch: #254fbe; }

.text-style-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.text-style-row button {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--forest-800);
}

.text-style-row button.selected {
  border-color: var(--forest-600);
  background: var(--forest-100);
}

.text-style-row button > :first-child {
  font-size: 19px;
}

.text-style-row button span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.sticker-category-tabs {
  display: flex;
  gap: 8px;
  margin: 0 calc(var(--space-1) * -1) var(--space-3);
  padding: 2px var(--space-1) 7px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.sticker-category-tabs::-webkit-scrollbar {
  display: none;
}

.sticker-category-tabs button {
  min-width: max-content;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sticker-category-tabs button.selected {
  border-color: var(--forest-600);
  background: var(--forest-100);
  color: var(--forest-900);
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}

.sticker-grid button {
  min-height: 76px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 6px 3px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--forest-900);
}

.sticker-grid button:active {
  transform: scale(0.96);
}

.sticker-grid small {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticker-sample {
  font-size: 30px;
  font-weight: 850;
  line-height: 1;
  -webkit-text-stroke: 1px #000000;
}

.sticker-sample.black { color: #000000; }
.sticker-sample.white { color: #ffffff; }
.sticker-sample.red { color: #dc2824; }
.sticker-sample.yellow { color: #f6c52a; }
.sticker-sample.green { color: #26974c; }
.sticker-sample.blue { color: #254fbe; }

.sticker-controls {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.editor-delete-button {
  width: 100%;
  margin-top: var(--space-4);
  border-color: rgba(167, 66, 56, 0.3);
  color: var(--danger);
}

.editor-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.38fr);
  gap: var(--space-2);
}

.editor-actions .share-design-button,
.editor-actions .transfer-cta {
  min-height: 48px;
  margin: 0;
}

.editor-actions .share-design-button {
  font-size: 12px;
}

.transfer-cta {
  margin-top: 0;
}

.transfer-body {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: var(--space-3);
  overscroll-behavior-y: contain;
  text-align: center;
}

.screen[data-screen="transfer"] .topbar-title {
  font-size: 18px;
}

.transfer-preview-stage {
  display: grid;
  place-items: center;
  margin: 0 0 var(--space-3);
  padding: var(--space-3);
  border: 1px solid rgba(62, 142, 90, 0.18);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.96), rgba(233, 242, 230, 0.72) 64%, rgba(233, 242, 230, 0.42)),
    var(--forest-050);
}

.transfer-display-stack {
  display: grid;
  place-items: center;
  gap: var(--space-1);
}

.transfer-display-viewport {
  position: relative;
  width: min(50vw, 200px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  background: #ffffff;
  clip-path: circle(47.75% at 50% 50%);
  filter: drop-shadow(0 8px 16px rgba(23, 59, 39, 0.12));
}

.transfer-display-viewport::after {
  position: absolute;
  inset: 2.25%;
  border: 1px solid rgba(31, 45, 36, 0.16);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.transfer-display-viewport canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.transfer-display-viewport canvas.is-unavailable {
  opacity: 0.16;
}

.transfer-preview-status {
  position: absolute;
  inset: 6%;
  z-index: 1;
  display: grid;
  place-content: center;
  gap: var(--space-1);
  padding: var(--space-4);
  border-radius: 50%;
  background: rgba(247, 249, 242, 0.94);
  color: var(--forest-900);
  text-align: center;
}

.transfer-preview-status strong {
  font-size: 14px;
  line-height: 1.25;
}

.transfer-preview-status small {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.4;
}

.transfer-preview-status.is-error {
  background: rgba(255, 247, 238, 0.97);
  color: #7f342c;
}

.transfer-display-stack .preview-caption {
  margin: 0;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.transfer-intro {
  margin-bottom: var(--space-3);
}

.transfer-title {
  max-width: none;
  margin: 0;
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.transfer-lede {
  margin: var(--space-1) 0 0;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.45;
}

.transfer-choice-section {
  margin: var(--space-3) 0;
  text-align: left;
}

.transfer-section-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.transfer-section-heading strong {
  color: var(--forest-900);
  font-size: 16px;
  line-height: 1.25;
}

.transfer-section-heading small {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.4;
}

.eink-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.eink-mode-card {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 5px 14px rgba(23, 59, 39, 0.035);
}

.eink-mode-card.selected {
  border-color: var(--forest-600);
  background: var(--forest-050);
  box-shadow: 0 0 0 1px rgba(62, 142, 90, 0.16), 0 12px 28px rgba(23, 59, 39, 0.07);
}

.choice-radio {
  position: relative;
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
  border: 1.5px solid rgba(44, 107, 67, 0.5);
  border-radius: 50%;
  background: #ffffff;
}

.selected .choice-radio {
  border-color: var(--forest-600);
}

.selected .choice-radio::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--forest-600);
}

.choice-copy,
.choice-copy strong,
.choice-copy small {
  min-width: 0;
  display: block;
}

.choice-copy strong {
  color: var(--forest-900);
  font-size: 14px;
  line-height: 1.2;
}

.transfer-method-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.transfer-method-option {
  min-width: 0;
  min-height: 76px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--ink);
  text-align: left;
}

.transfer-method-option.selected {
  border-color: var(--forest-600);
  background: var(--forest-050);
  box-shadow: 0 0 0 1px rgba(62, 142, 90, 0.14);
}

.transfer-method-option strong,
.transfer-method-option small {
  display: block;
}

.transfer-method-option strong {
  color: var(--forest-900);
  font-size: 15px;
  line-height: 1.25;
}

.transfer-method-option small {
  margin-top: var(--space-1);
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.method-choice-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(242, 193, 78, 0.18);
  color: var(--forest-800);
}

.method-choice-icon.bluetooth {
  background: rgba(37, 79, 190, 0.1);
  color: #254fbe;
}

.method-choice-icon svg,
.send-method-icon svg {
  width: 20px;
  height: 20px;
}

.eink-mode-card:focus-visible,
.transfer-method-option:focus-visible {
  outline: 3px solid rgba(62, 142, 90, 0.32);
  outline-offset: 2px;
}

.eink-mode-card:disabled,
.transfer-method-option:disabled {
  cursor: wait;
  opacity: 0.62;
}

.transfer-meta {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-3) 0 0;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.transfer-meta strong {
  color: var(--forest-900);
  font-weight: 750;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  margin: 0 0 var(--space-3);
  border-radius: 999px;
  background: #dfe8dc;
}

.progress-track i {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--forest-600);
  opacity: 0;
}

.progress-track.is-active i {
  width: 36%;
  opacity: 1;
  animation: birdie-transfer-glide 1.9s cubic-bezier(0.45, 0, 0.2, 1) infinite;
  will-change: transform;
}

@keyframes birdie-transfer-glide {
  0% {
    transform: translateX(-115%);
  }
  55% {
    transform: translateX(105%);
  }
  100% {
    transform: translateX(285%);
  }
}

.progress-label {
  margin: var(--space-3) 0 var(--space-2);
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.4;
}

.transfer-progress-copy {
  min-height: 20px;
  margin-bottom: var(--space-2);
  font-size: 14px;
  font-weight: 700;
}

.transfer-progress-copy.is-active {
  color: var(--forest-800);
}

.transfer-send-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 56px;
  font-size: 17px;
}

.send-method-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.transfer-safety-note {
  margin: var(--space-2) auto 0;
  max-width: 360px;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.45;
}

@media (max-height: 760px) {
  .editor-preview-shell {
    width: min(68vw, 272px);
  }

  .transfer-display-viewport {
    width: min(44vw, 164px);
  }

  .transfer-body {
    padding-top: var(--space-1);
  }

  .transfer-preview-stage,
  .transfer-intro,
  .transfer-choice-section {
    margin-bottom: var(--space-2);
  }

  .transfer-preview-stage {
    padding: var(--space-2);
  }

  .transfer-method-option {
    min-height: 72px;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .editor-body {
    grid-template-columns: minmax(190px, 0.9fr) minmax(260px, 1.1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    column-gap: var(--space-4);
    overflow-y: auto;
  }

  .editor-preview-workspace {
    grid-row: 1 / span 2;
    align-self: center;
  }

  .editor-preview-shell {
    width: min(58vh, 250px);
  }

  .editor-controls-scroll {
    overflow-y: auto;
  }

  .editor-actions {
    grid-column: 2;
  }
}

.success-check {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  margin-bottom: var(--space-5);
  border-radius: 50%;
  background: var(--forest-800);
  color: white;
  box-shadow: var(--shadow-button);
}

.success-check svg {
  width: 46px;
  height: 46px;
}

.device-home-preview {
  margin-top: var(--space-3);
}

.device-home-empty {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--space-2);
  padding: 42px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.96) 0 34%, transparent 35%),
    linear-gradient(145deg, var(--forest-050), #fff9e9);
  color: var(--forest-900);
  text-align: center;
}

.device-home-empty::before {
  content: "";
  position: absolute;
  width: min(62vw, 244px);
  aspect-ratio: 1;
  border: 1px dashed rgba(35, 77, 52, 0.25);
  border-radius: 50%;
  pointer-events: none;
}

.device-empty-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--forest-700);
  box-shadow: 0 8px 20px rgba(35, 77, 52, 0.1);
}

.device-empty-mark svg {
  width: 26px;
  height: 26px;
}

.device-home-empty strong,
.device-home-empty span,
.device-empty-mark {
  position: relative;
  z-index: 1;
}

.device-home-empty strong {
  font-family: var(--display);
  font-size: 20px;
}

.device-home-empty span {
  max-width: 220px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.device-home-preview-stack {
  margin-top: var(--space-3);
  margin-bottom: var(--space-5);
}

.device-home-preview-stack .device-home-preview {
  margin-top: 0;
  margin-bottom: var(--space-3);
}

.device-preview-save-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: 14px;
  border: 1px solid #e6d49c;
  border-radius: var(--radius-md);
  background: #fff8df;
}

.device-preview-save-strip > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.device-preview-save-strip strong {
  color: var(--forest-900);
  font-size: 15px;
}

.device-preview-save-strip span {
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.45;
}

.device-preview-save-strip button {
  min-width: 104px;
  min-height: 44px;
}

.device-home-recovery {
  width: 100%;
  min-height: 190px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #f4f1e8, #fffdf8);
  text-align: left;
}

.device-home-recovery > div:not(.device-empty-mark) {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.device-home-recovery strong {
  color: var(--forest-900);
  font-size: 19px;
}

.device-home-recovery span {
  color: var(--muted-strong);
  font-size: 15px;
  line-height: 1.48;
}

.device-preview-retry {
  grid-column: 1 / -1;
  width: 100%;
  font-size: 15px;
}

.device-home-add {
  margin-top: var(--space-3);
}

.device-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin: 0 0 var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

.device-status-card > div {
  min-width: 0;
}

.device-status-card .eyebrow {
  margin-bottom: 5px;
}

.device-status-card h2 {
  margin-bottom: 5px;
  font-size: 19px;
}

.device-status-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.48;
}

.committed-chip {
  flex: 0 0 auto;
  min-height: 38px;
  background: var(--forest-100);
  font-size: 13px;
}

.committed-chip.pending {
  background: #f1eee5;
  color: var(--muted);
}

.device-display-history {
  margin: calc(var(--space-2) * -1) 0 var(--space-5);
}

.device-history-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.device-history-heading .eyebrow {
  margin-bottom: 4px;
}

.device-history-heading h2 {
  font-size: 21px;
}

.device-history-heading > span {
  padding-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.device-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.device-history-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: 0 8px 20px rgba(35, 77, 52, 0.05);
}

.device-history-artwork {
  width: 100%;
  aspect-ratio: 1;
}

.device-history-artwork canvas {
  position: absolute;
  inset: 0;
}

.device-history-card canvas,
.device-history-preview-unavailable {
  width: 100%;
  display: block;
  aspect-ratio: 1;
  background: white;
}

.device-history-preview-unavailable {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  background: linear-gradient(145deg, #f1eee5, #fffdf8);
  color: var(--muted);
  text-align: center;
}

.device-history-preview-unavailable span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--forest-700);
}

.device-history-preview-unavailable svg {
  width: 18px;
  height: 18px;
}

.device-history-preview-unavailable small {
  font-size: 12px;
  font-weight: 750;
}

.device-history-preview-unavailable button {
  min-width: 88px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(35, 77, 52, 0.2);
  border-radius: 999px;
  background: var(--paper);
  color: var(--forest-800);
  font-size: 12px;
  font-weight: 800;
}

.device-history-save-row {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  border-top: 1px solid var(--line);
  background: #fff8df;
}

.device-history-save-row span {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 750;
}

.device-history-save-row button {
  min-width: 64px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid rgba(35, 77, 52, 0.25);
  border-radius: 12px;
  background: var(--paper);
  color: var(--forest-800);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.device-history-meta {
  display: grid;
  gap: 2px;
  padding: 10px 11px 11px;
}

.device-history-card strong,
.device-history-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-history-card strong {
  color: var(--forest-900);
  font-size: 14px;
}

.device-history-card span {
  color: var(--muted);
  font-size: 12px;
}

.danger-text {
  width: 100%;
  margin-top: var(--space-3);
  color: var(--danger);
}

@media (max-width: 360px) {
  .screen-body {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .source-card {
    grid-template-columns: 50px minmax(0, 1fr) auto;
    gap: var(--space-3);
  }

  .source-card--game {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .source-icon {
    width: 48px;
    height: 48px;
  }

  .device-hero {
    gap: var(--space-3);
  }

  .device-orbit {
    width: 58px;
    height: 58px;
  }

  .status-chip {
    padding: 7px 8px;
  }

  .transfer-method-picker {
    grid-template-columns: 1fr;
  }

  .transfer-method-option {
    min-height: 68px;
  }
}

.noscript {
  max-width: 440px;
  margin: 40px auto;
  padding: 24px;
  color: var(--danger);
  text-align: center;
}

button:focus-visible {
  outline: 3px solid rgba(47, 111, 176, 0.46);
  outline-offset: 3px;
}

@keyframes scan-pulse {
  0% {
    opacity: 0.75;
    transform: scale(0.5);
  }
  100% {
    opacity: 0;
    transform: scale(1.1);
  }
}

@media (min-width: 700px) {
  body {
    padding: 24px 0;
  }

  .app-shell {
    min-height: calc(100dvh - 48px);
    border-radius: 32px;
  }

  .screen {
    min-height: calc(100dvh - 48px);
  }
}

@media (max-height: 700px) {
  .brand-lockup {
    margin-bottom: var(--space-4);
  }

  .screen-body {
    padding-top: var(--space-3);
  }

  .method-list {
    margin-top: var(--space-4);
  }

  .method-card {
    min-height: 92px;
  }

  .splash-art {
    width: min(52vh, 236px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .scan-ring,
  .scan-ring::before,
  .scan-ring::after {
    opacity: 0.3;
    transform: scale(0.78);
  }

  .progress-track.is-active i {
    width: 100%;
    opacity: 0.55;
    animation: none !important;
    transform: none;
  }
}

/* Device naming (Find My style) */
.name-device-preview { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 18px 0 14px; }
.name-device-preview .name-device-icon { font-size: 42px; line-height: 1; }
.name-device-preview small { opacity: 0.55; }
.text-input { width: 100%; padding: 12px 14px; font-size: 16px; border-radius: 12px; border: 1.5px solid rgba(0,0,0,0.18); background: #fff; box-sizing: border-box; }
.device-icon-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 16px 0 20px; }
.device-icon-choice { font-size: 22px; width: 46px; height: 46px; border-radius: 12px; border: 1.5px solid rgba(0,0,0,0.14); background: #fff; cursor: pointer; }
.device-icon-choice.active { border-color: #111; background: rgba(0,0,0,0.07); }

/* Tap health: iOS WebView text selection must never eat button taps (b70) */
button, .connected-device-pill, .device-hero, .device-card, .status-chip, .device-icon-choice {
  -webkit-user-select: none;
  user-select: none;
}
input, textarea { -webkit-user-select: text; user-select: text; }

/* Connected hero as a tappable card (b70) */
.device-hero-button {
  width: 100%;
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.device-orbit-icon { font-size: 30px; line-height: 1; }

/* Battery metadata is independent of the confirmed screen preview. */
.battery-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
}
.battery-compact [data-battery-icon],
.device-battery-row [data-battery-icon] { display: flex; flex: 0 0 auto; }
.battery-compact .battery-icon { width: 23px; height: 18px; }
.battery-compact.is-low, .device-battery-row.is-low, .battery-sheet-reading .is-low { color: var(--danger); }
.battery-compact[hidden], .battery-inline-warning[hidden], .battery-update-hint[hidden] { display: none; }
.connected-device-pill .battery-compact { display: flex; overflow: visible; white-space: normal; font-size: 13px; font-weight: 500; }
.connected-device-pill .battery-compact [data-battery-label] { overflow: visible; white-space: normal; font-size: 13px; font-weight: 500; }
.device-hero .grow { min-width: 0; }
.device-battery-metadata { margin-bottom: 16px; }
.device-battery-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--forest-800);
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease;
}
.device-battery-row:active { background: var(--forest-050); }
.battery-row-copy { flex: 1 1 auto; min-width: 0; }
.battery-row-heading { display: block; color: var(--muted-strong); font-size: 13px; line-height: 1.3; }
.battery-row-copy strong { display: block; font-size: 15px; line-height: 1.4; font-weight: 650; }
.battery-row-tail { display: flex; align-items: center; gap: 8px; flex: 0 1 35%; min-width: 0; }
.battery-row-tail small { min-width: 0; overflow-wrap: anywhere; color: var(--muted-strong); font-size: 13px; line-height: 1.4; }
.battery-row-tail svg { flex: 0 0 16px; width: 16px; height: 16px; color: var(--muted-strong); }
.battery-update-hint { margin: 8px 14px 0; color: var(--muted-strong); font-size: 14px; line-height: 1.5; }
.battery-sheet-update-hint { margin: 8px 0 0; }
.battery-inline-warning {
  margin: 10px 0 0;
  padding: 12px 14px;
  background: var(--forest-050);
  border-radius: var(--radius-sm);
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.5;
}
.battery-inline-warning.is-low { background: var(--danger-soft); color: var(--danger); }
.transfer-body > .battery-inline-warning { margin-top: 0; }
.battery-sheet-host:empty { display: none; }
.battery-sheet-backdrop { position: fixed; inset: 0; z-index: 110; background: rgba(15, 29, 20, 0.48); }
.battery-sheet {
  position: fixed;
  z-index: 111;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 480px);
  max-height: calc(100dvh - 24px - env(safe-area-inset-top));
  overflow: auto;
  padding: 10px 24px calc(24px + env(safe-area-inset-bottom));
  background: var(--cream);
  color: var(--ink);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -12px 40px rgba(23, 59, 39, 0.16);
}
.battery-sheet-handle { width: 36px; height: 5px; margin: 0 auto 18px; border-radius: 5px; background: var(--line); }
.battery-sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.battery-sheet-header h2 { margin: 4px 0 0; font-size: 26px; }
.battery-sheet-header .eyebrow { margin: 0; }
.battery-sheet-close { width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: 50%; background: var(--forest-100); color: var(--forest-900); font-size: 28px; line-height: 1; cursor: pointer; }
.battery-sheet-close:active { background: var(--forest-050); }
.battery-sheet-reading { display: flex; align-items: center; gap: 12px; margin-top: 28px; color: var(--forest-800); }
.battery-sheet-reading .battery-icon { width: 36px; height: 26px; }
.battery-sheet-reading strong { font-size: 24px; line-height: 1.25; font-weight: 650; }
.battery-sheet-time { margin: 10px 0 0; color: var(--muted-strong); font-size: 14px; line-height: 1.5; }
.battery-sheet-copy { margin: 16px 0 24px; color: var(--muted-strong); font-size: 15px; line-height: 1.5; }
.battery-sheet .primary-button { width: 100%; min-height: 48px; }
.battery-sheet button:focus-visible, .device-battery-row:focus-visible { outline: 3px solid var(--forest-600); outline-offset: 3px; }
@media (max-width: 375px) {
  .device-battery-row { padding: 12px; gap: 8px; }
  .battery-row-tail { flex-basis: 32%; gap: 4px; }
  .battery-sheet { padding-left: 20px; padding-right: 20px; }
}

/* My Designs gallery (b79) */
.designs-usage { font-size: 13px; font-weight: 700; opacity: 0.7; }
.gallery-lede { margin: 4px 0 14px; }
.gallery-viewall { font-size: 13px; font-weight: 700; }
.gallery-thumb { display: flex; flex-direction: column; gap: 6px; }
.gallery-thumb img,
.gallery-thumb canvas { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 50%; }
.gallery-empty-icon { font-size: 40px; display: block; text-align: center; padding: 30px 0; }
.gallery-title { font-size: 13px; }

/* Build 157 · fast group Scorecard */
.leader-blue { --leader-tone: #2b4da0; --leader-soft: #edf1ff; }
.leader-green { --leader-tone: #2c6b43; --leader-soft: #eaf5ed; }
.leader-red { --leader-tone: #b92f2b; --leader-soft: #fff0ed; }
.leader-yellow { --leader-tone: #97700d; --leader-soft: #fff6d5; }
.leader-black { --leader-tone: #1f2d24; --leader-soft: #edf0ee; }
.leader-neutral { --leader-tone: #315441; --leader-soft: #eef4ef; }

.game-format-card.scorecard .game-format-heading > span {
  background: #eaf5ed;
  color: #22593a;
}

.game-history-entry,
.game-history-save-later {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  margin: 0 0 var(--space-5);
  padding: 14px 15px;
  border: 1px solid rgba(35, 77, 52, 0.15);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--forest-900);
  font: inherit;
  text-align: left;
  box-shadow: 0 8px 24px rgba(23, 59, 39, 0.05);
}

.game-history-entry > span,
.game-history-save-later > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.game-history-entry small {
  color: var(--forest-700);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.game-history-entry strong,
.game-history-save-later strong {
  font-size: 15px;
  font-weight: 850;
}

.game-history-entry em,
.game-history-save-later small {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.4;
}

.game-history-entry > svg,
.game-history-save-later > svg {
  width: 20px;
  color: var(--forest-700);
}

.scorecard-mode-picker {
  display: grid;
  gap: 9px;
}

.scorecard-mode-option {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  color: var(--forest-900);
  text-align: left;
}

.scorecard-mode-option > span {
  display: grid;
  gap: 3px;
}

.scorecard-mode-option strong {
  font-size: 15px;
  font-weight: 850;
}

.scorecard-mode-option small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.scorecard-mode-option > svg {
  width: 20px;
  opacity: 0;
}

.scorecard-mode-option.selected {
  border-color: var(--forest-700);
  background: var(--forest-050);
  box-shadow: inset 0 0 0 1px var(--forest-700);
}

.scorecard-mode-option.selected > svg { opacity: 1; }

.scorecard-team-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 7px;
}

.scorecard-team-preview > div {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 72px;
  padding: 11px;
  border-radius: 14px;
}

.scorecard-team-preview .team-blue { background: #edf1ff; border: 1px solid rgba(43, 77, 160, 0.2); }
.scorecard-team-preview .team-red { background: #fff0ed; border: 1px solid rgba(185, 47, 43, 0.2); }
.scorecard-team-preview > span { align-self: center; color: var(--muted); font-size: 9px; font-weight: 900; }
.scorecard-team-preview small { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: 0.08em; }
.scorecard-team-preview strong { min-width: 0; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }

.game-hole-heading.is-scorecard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  align-items: center;
  gap: 16px;
}

.game-hole-heading.is-scorecard h1 {
  margin: 1px 0 5px;
  font-size: clamp(31px, 9vw, 39px);
  font-weight: 800;
}

.scorecard-course-line {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}

.scorecard-progress-ring {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  justify-self: end;
  padding: 6px;
  border-radius: 50%;
  background: conic-gradient(var(--forest-700) var(--scorecard-progress), rgba(35, 77, 52, 0.11) 0);
  box-shadow: 0 8px 22px rgba(23, 59, 39, 0.08);
}

.scorecard-progress-ring > span {
  width: 100%;
  height: 100%;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: var(--cream);
  text-align: center;
}

.scorecard-progress-ring strong {
  color: var(--forest-900);
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 800;
  line-height: 0.88;
}

.scorecard-progress-ring small {
  margin-top: 5px;
  color: var(--forest-700);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.scorecard-team-standing {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-left: 5px solid var(--leader-tone);
  border-radius: 13px;
  background: var(--leader-soft);
}

.scorecard-team-standing small {
  color: var(--leader-tone);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.scorecard-team-standing strong { color: var(--forest-900); font-size: 16px; font-weight: 900; }
.scorecard-team-standing span { color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.4; }

.scorecard-scoreboard {
  padding-top: 8px;
  border-top: 4px solid var(--leader-tone);
  border-radius: 3px;
}

.scorecard-scoreboard li {
  position: relative;
  padding: 12px 13px;
  background: var(--paper);
}

.scorecard-scoreboard > li:only-child,
.scorecard-player-summary-grid > article:only-child,
.scorecard-team-summary-grid > article:only-child,
.scorecard-hole-player-grid > div:only-child {
  grid-column: 1 / -1;
}

.scorecard-scoreboard li.is-leading {
  border-color: var(--leader-tone);
  background: var(--leader-soft);
  box-shadow: inset 0 0 0 1px var(--leader-tone);
}

.scorecard-scoreboard li > span,
.scorecard-hole-player-grid > div > span,
.scorecard-player-card > span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.scorecard-scoreboard strong {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 7px;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}

.scorecard-scoreboard strong small {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.scorecard-hole-entry {
  display: grid;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.scorecard-par-field,
.scorecard-strokes-field {
  padding: 16px;
  border: 1px solid rgba(35, 77, 52, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 10px 28px rgba(23, 59, 39, 0.055);
}

.scorecard-par-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.scorecard-par-picker button {
  min-height: 66px;
  display: grid;
  place-content: center;
  gap: 2px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--forest-050);
  color: var(--forest-900);
}

.scorecard-par-picker button small { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: 0.08em; }
.scorecard-par-picker button strong { font-family: var(--serif); font-size: 27px; line-height: 1; }
.scorecard-par-picker button.selected { border-color: var(--forest-700); background: var(--forest-800); color: white; box-shadow: inset 0 0 0 1px var(--forest-700); }
.scorecard-par-picker button.selected small { color: rgba(255, 255, 255, 0.72); }

.scorecard-player-list {
  display: grid;
  gap: 9px;
}

.scorecard-player-entry {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: stretch;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.scorecard-player-entry.is-active {
  border-color: var(--forest-700);
  box-shadow: inset 0 0 0 2px var(--forest-700);
}

.scorecard-player-target {
  min-width: 0;
  min-height: 50px;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--forest-900);
  text-align: left;
}

.scorecard-player-target > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.scorecard-player-target strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scorecard-player-target small {
  min-height: 16px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.score-result-icon {
  min-width: 18px;
  min-height: 18px;
  display: inline-grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--forest-700);
  font-size: 8px;
  font-weight: 950;
  line-height: 1;
}

.score-result-icon.result-hole-in-one,
.score-result-icon.result-eagle,
.score-result-icon.result-albatross { color: #9b5e00; background: #fff4c8; }
.score-result-icon.result-birdie { color: #245f3c; background: #e9f5ec; }
.score-result-icon.result-bogey,
.score-result-icon.result-double-bogey,
.score-result-icon.result-triple-plus { color: #a3342d; background: #fff0ed; border-radius: 4px; }

.scorecard-stepper {
  display: grid;
  grid-template-columns: 44px 44px 44px;
  align-items: stretch;
}

.scorecard-stepper button,
.scorecard-stepper output {
  min-width: 44px;
  min-height: 50px;
  display: grid;
  place-items: center;
  border: 0;
  background: var(--forest-050);
  color: var(--forest-900);
}

.scorecard-stepper button:first-child { border-radius: 11px 0 0 11px; }
.scorecard-stepper button:last-child { border-radius: 0 11px 11px 0; }
.scorecard-stepper button { font-size: 21px; font-weight: 800; }
.scorecard-stepper button:disabled { color: rgba(35, 77, 52, 0.25); }
.scorecard-stepper output { background: white; font-family: var(--serif); font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }

.scorecard-keypad {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.scorecard-keypad button {
  min-width: 0;
  min-height: 54px;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
  padding: 0;
  border: 1px solid rgba(35, 77, 52, 0.16);
  border-radius: 14px;
  background: var(--forest-800);
  color: white;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.scorecard-keypad button small { font-family: var(--sans); font-size: 9px; }

.scorecard-entry-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  padding: 12px 13px;
  border-radius: 13px;
  background: var(--forest-050);
}

.scorecard-entry-status strong { color: var(--forest-900); font-size: 12px; font-weight: 900; }
.scorecard-entry-status span { grid-column: 1; color: var(--muted); font-size: 10px; line-height: 1.4; }
.scorecard-entry-status .text-button { grid-column: 2; grid-row: 1 / span 2; align-self: center; min-height: 44px; font-size: 9px; }
.scorecard-entry-status.is-ready { background: #e8f4e9; box-shadow: inset 0 0 0 1px rgba(44, 107, 67, 0.2); }

.game-save-hole:disabled { opacity: 0.42; }

.game-summary-hero.leader-blue,
.game-summary-hero.leader-green,
.game-summary-hero.leader-red,
.game-summary-hero.leader-yellow,
.game-summary-hero.leader-black,
.game-summary-hero.leader-neutral {
  background: var(--leader-tone);
}

.scorecard-player-summary,
.scorecard-team-summary,
.scorecard-full-card {
  display: grid;
  gap: 13px;
  margin-bottom: var(--space-5);
  padding: 16px;
  border: 1px solid rgba(35, 77, 52, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.97);
  box-shadow: 0 10px 30px rgba(23, 59, 39, 0.06);
}

.scorecard-player-summary,
.scorecard-team-summary { border-top: 5px solid var(--leader-tone); }

.scorecard-player-summary-grid,
.scorecard-team-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.scorecard-player-card,
.scorecard-team-summary-grid article {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-top: 4px solid #315441;
  border-radius: 13px;
  background: var(--paper);
}

.scorecard-player-card.player-blue { border-top-color: #2b4da0; }
.scorecard-player-card.player-green { border-top-color: #2c6b43; }
.scorecard-player-card.player-red { border-top-color: #b92f2b; }
.scorecard-player-card.player-yellow { border-top-color: #c09218; }
.scorecard-player-card.player-black { border-top-color: #1f2d24; }
.scorecard-player-card.is-leading { background: var(--leader-soft); box-shadow: inset 0 0 0 1px var(--leader-tone); }

.scorecard-player-card > span strong { min-width: 0; overflow: hidden; font-size: 13px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.scorecard-player-card > div { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; }
.scorecard-player-card > div b { color: var(--forest-900); font-family: var(--serif); font-size: 29px; font-variant-numeric: tabular-nums; }
.scorecard-player-card > div em { color: var(--forest-700); font-size: 13px; font-weight: 900; font-style: normal; font-variant-numeric: tabular-nums; }
.scorecard-player-card > small { color: var(--muted); font-size: 9px; font-weight: 750; }

.scorecard-team-summary-grid article.team-blue { border-top-color: #2b4da0; }
.scorecard-team-summary-grid article.team-red { border-top-color: #b92f2b; }
.scorecard-team-summary-grid article.is-leading { background: var(--leader-soft); }
.scorecard-team-summary-grid article > small { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: 0.07em; }
.scorecard-team-summary-grid article > strong { display: flex; align-items: baseline; justify-content: space-between; gap: 5px; color: var(--forest-900); font-family: var(--serif); font-size: 29px; }
.scorecard-team-summary-grid article > strong em { color: var(--forest-700); font-family: var(--sans); font-size: 9px; font-style: normal; text-transform: uppercase; }
.scorecard-team-summary-grid article > span { color: var(--muted); font-size: 9px; line-height: 1.35; overflow-wrap: anywhere; }

.scorecard-hole-list {
  display: grid;
  gap: 10px;
}

.scorecard-hole-summary {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.scorecard-hole-summary > header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  background: var(--forest-050);
}

.scorecard-hole-summary > header > span { display: flex; align-items: baseline; gap: 8px; }
.scorecard-hole-summary > header strong { color: var(--forest-900); font-size: 14px; font-weight: 900; }
.scorecard-hole-summary > header small,
.scorecard-hole-summary > header > span:not(:has(strong)) { color: var(--muted); font-size: 9px; font-weight: 900; }
.scorecard-hole-summary > header button { min-width: 44px; min-height: 36px; border: 0; border-radius: 10px; background: white; color: var(--forest-700); font-size: 10px; font-weight: 850; }

.scorecard-hole-player-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.scorecard-hole-player-grid > div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  padding: 10px 11px;
  background: var(--paper);
}

.scorecard-hole-player-grid > div.is-counting { background: #f0f6ef; }
.scorecard-hole-player-grid > div > span { min-width: 0; overflow: hidden; color: var(--muted-strong); font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.scorecard-hole-player-grid > div > strong { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--forest-900); font-family: var(--serif); font-size: 24px; font-variant-numeric: tabular-nums; }
.scorecard-hole-player-grid > div > small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 8px; font-weight: 900; }
.scorecard-hole-player-grid > div > small b { min-width: 15px; color: var(--forest-700); font-size: 8px; }
.scorecard-hole-player-grid > div > small.result-hole-in-one,
.scorecard-hole-player-grid > div > small.result-albatross,
.scorecard-hole-player-grid > div > small.result-eagle { color: #8b5b00; }
.scorecard-hole-player-grid > div > small.result-birdie { color: #245f3c; }
.scorecard-hole-player-grid > div > small.result-bogey,
.scorecard-hole-player-grid > div > small.result-double-bogey,
.scorecard-hole-player-grid > div > small.result-triple-plus { color: #a3342d; }

.game-history-prompt {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 13px;
  margin-bottom: var(--space-5);
  padding: 16px;
  border: 1px solid rgba(43, 77, 160, 0.2);
  border-radius: var(--radius-lg);
  background: #f2f4ff;
}

.game-history-prompt.is-saved { border-color: rgba(44, 107, 67, 0.2); background: #edf6ef; }
.game-history-prompt-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: white; color: var(--forest-700); }
.game-history-prompt-icon svg { width: 25px; height: 25px; }
.game-history-prompt > div { min-width: 0; display: grid; gap: 7px; }
.game-history-prompt > div > small { color: #354f9d; font-size: 8px; font-weight: 900; letter-spacing: 0.08em; }
.game-history-prompt h2 { margin: 0; font-size: 22px; }
.game-history-prompt p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.game-history-prompt > div > div { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }

.game-history-list { display: grid; gap: 11px; }
.game-history-card {
  width: 100%;
  min-height: 116px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(35, 77, 52, 0.14);
  border-left: 6px solid var(--leader-tone);
  border-radius: 16px;
  background: var(--paper);
  color: var(--forest-900);
  font: inherit;
  text-align: left;
  box-shadow: 0 9px 27px rgba(23, 59, 39, 0.055);
}
.game-history-card > span { min-width: 0; display: grid; gap: 4px; }
.game-history-card small { color: var(--forest-700); font-size: 8px; font-weight: 900; letter-spacing: 0.06em; }
.game-history-card strong { overflow: hidden; font-family: var(--serif); font-size: 22px; text-overflow: ellipsis; white-space: nowrap; }
.game-history-card em { color: var(--muted); font-size: 10px; font-style: normal; }
.game-history-card b { color: var(--leader-tone); font-size: 11px; font-weight: 900; }
.game-history-card > svg { width: 20px; color: var(--leader-tone); }
.game-history-card { display: block; padding: 0; }
.game-history-card-open { width: 100%; min-height: 116px; display: grid; grid-template-columns: minmax(0, 1fr) 22px; align-items: center; gap: 12px; padding: 16px; border: 0; border-radius: 14px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.game-history-card-open > span { min-width: 0; display: grid; gap: 4px; }
.game-history-card-open svg { width: 20px; color: var(--leader-tone); }
.game-history-card-open small { font-size: 12px; line-height: 1.5; }
.game-history-card-open em { font-size: 13px; line-height: 1.5; }
.game-history-card-open b { font-size: 14px; line-height: 1.5; }
.game-history-card-open strong { white-space: normal; overflow-wrap: anywhere; }
.game-history-card-open:active { background: var(--forest-050); }
.game-history-card-open:focus-visible { outline: 3px solid var(--forest-700); outline-offset: 3px; }
.history-overview { min-width: 0; color: var(--forest-900); }
.history-overview.is-compact { padding: 0 16px 16px; }
.history-overview.is-detail { padding: 20px; border: 1px solid rgba(35, 77, 52, 0.14); border-radius: 20px; background: var(--paper); }
.history-overview .game-summary-title { flex-wrap: wrap; }
.history-overview-hole-count { margin: 0 0 16px; color: var(--muted-strong); font-size: 12px; line-height: 1.5; }
.history-overview-group + .history-overview-group { margin-top: 20px; }
.history-overview-group :is(h2, h3) { margin: 0 0 8px; font-family: var(--sans); font-size: 14px; line-height: 1.5; }
.history-overview-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; line-height: 1.45; }
.history-overview-table th, .history-overview-table td { padding: 8px 4px; vertical-align: top; overflow-wrap: anywhere; }
.history-overview-table thead th { color: var(--muted-strong); font-size: 12px; font-weight: 600; text-align: left; border-bottom: 1px solid rgba(35, 77, 52, 0.14); }
.history-overview-table th:first-child { width: 44%; padding-left: 0; }
.history-overview-table tbody th { text-align: left; font-weight: 700; }
.history-overview-table td { font-variant-numeric: tabular-nums; }
.history-overview-table tbody tr + tr { border-top: 1px solid rgba(35, 77, 52, 0.08); }
.history-overview-table span { display: block; color: var(--muted-strong); font-size: 12px; line-height: 1.5; font-weight: 400; }
.history-overview-table b, .history-overview-row b, .history-overview-matches b { color: var(--forest-900); font-size: 18px; font-weight: 800; }
.history-overview-rows { display: grid; gap: 12px; }
.history-overview-row { min-width: 0; padding: 16px; border-radius: 14px; background: var(--forest-050); }
.history-overview-row header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.history-overview-row header > div { min-width: 0; }
.history-overview-row h4 { margin: 0; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.history-overview-row p { margin: 4px 0 0; color: var(--muted-strong); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.history-overview-points { text-align: right; }
.history-overview-points span { display: block; font-size: 12px; line-height: 1.4; }
.history-overview-row dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0 0; }
.history-overview-row dt { color: var(--muted-strong); font-size: 12px; font-weight: 700; }
.history-overview-row dd { margin: 4px 0 0; }
.history-overview-row dd span { display: block; margin-top: 4px; color: var(--muted-strong); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.history-overview-matches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 112px), 1fr)); gap: 8px; margin-top: 16px; }
.history-overview-matches > div { padding: 12px; border-radius: 12px; background: var(--forest-050); }
.history-overview-matches span { display: block; font-size: 12px; line-height: 1.5; }
.history-overview-matches b { display: block; margin-top: 4px; }
.history-overview-matches p, .history-overview-notes p { margin: 4px 0 0; color: var(--muted-strong); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.history-overview-notes { margin-top: 16px; }
.game-history-empty { display: grid; justify-items: center; gap: 7px; padding: 34px 18px; border: 1px dashed rgba(35, 77, 52, 0.22); border-radius: 17px; text-align: center; }
.game-history-empty > span { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: var(--forest-050); color: var(--forest-700); }
.game-history-empty svg { width: 26px; }
.game-history-empty h2 { margin: 5px 0 0; font-size: 22px; }
.game-history-empty p,
.game-history-device-note,
.scorecard-locked-note { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.game-history-device-note { margin-top: var(--space-4); padding: 11px 12px; border-radius: 12px; background: var(--forest-050); text-align: center; }
.scorecard-locked-note { padding: 11px 12px; border-radius: 12px; background: #edf6ef; text-align: center; }

.game-history-entry:focus-visible,
.game-history-save-later:focus-visible,
.scorecard-mode-option:focus-visible,
.scorecard-par-picker button:focus-visible,
.scorecard-player-target:focus-visible,
.scorecard-stepper button:focus-visible,
.scorecard-keypad button:focus-visible,
.game-history-card:focus-visible {
  outline: 3px solid rgba(47, 111, 176, 0.48);
  outline-offset: 3px;
}

@media (max-width: 360px) {
  .game-format-heading { grid-template-columns: 34px minmax(0, 1fr); }
  .game-hole-heading.is-scorecard { grid-template-columns: minmax(0, 1fr) 78px; gap: 10px; }
  .scorecard-progress-ring { width: 78px; height: 78px; padding: 5px; }
  .scorecard-progress-ring strong { font-size: 27px; }
  .scorecard-player-entry { grid-template-columns: minmax(0, 1fr) 120px; }
  .scorecard-stepper { grid-template-columns: repeat(3, 40px); }
  .scorecard-stepper button,
  .scorecard-stepper output { min-width: 40px; }
  .scorecard-player-summary-grid,
  .scorecard-team-summary-grid,
  .scorecard-hole-player-grid { grid-template-columns: 1fr; }
  .scorecard-entry-status { grid-template-columns: 1fr; }
  .scorecard-entry-status .text-button { grid-column: 1; grid-row: auto; justify-self: start; }
}

/* Keep both explicit round-photo sources usable on a narrow phone. */
.game-keepsake-photo-actions > .primary-button,
.game-keepsake-photo-actions > .secondary-button {
  flex: 1 1 150px;
  min-height: 44px;
  white-space: normal;
}

/* Saved Scorecard checkpoints remain readable independently of delivery. */
.scorecard-recap-records { margin: 0 0 20px; border: 1px solid #D9E2D7; border-radius: 16px; background: #FFFDF8; padding: 16px; }
.scorecard-recap-records > summary { cursor: pointer; min-height: 32px; color: var(--forest-900); font-size: 14px; font-weight: 700; }
.scorecard-recap-records article { display: grid; justify-items: center; gap: 12px; padding: 18px 0; border-top: 1px solid #D9E2D7; }
.scorecard-recap-records h3 { margin: 0; font-family: var(--serif); color: var(--forest-900); font-size: 21px; }
.scorecard-recap-records img { width: min(100%, 280px); height: auto; border-radius: 50%; }
.scorecard-recap-records p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }

.marker-moment-suggestion.is-scorecard-recap, .marker-moment-delivery.is-scorecard-recap { grid-template-columns: minmax(0, 1fr); }
.marker-moment-suggestion.is-scorecard-recap > img, .marker-moment-delivery.is-scorecard-recap > img { width: min(100%, 280px); height: auto; justify-self: center; }

/* Shared game entry and complete canonical round history. */
.game-skins-rule { display: grid; gap: 6px; padding: 16px 20px; border-radius: 20px; background: var(--green, #183e2c); color: var(--cream, #fbf8f0); }
.game-skins-rule strong { font-size: 21px; }
.game-skins-rule span { font-size: 14px; line-height: 1.5; }
.game-hole-outcome { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid #d9dfd5; font-size: 15px; font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; }
.game-history-missing { margin: 16px 0 0; font-size: 14px; color: #62685f; }
.skins-team-scoreboard li span { display: grid; gap: 5px; overflow-wrap: anywhere; }
.skins-team-scoreboard li span small { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.skins-team-scoreboard .team-blue { border-top: 4px solid #33477e; }
.skins-team-scoreboard .team-red { border-top: 4px solid #c8322d; }

/* Cloud backup (Google) */
.cloud-backup-card {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  margin: var(--space-5) 0 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.cloud-backup-card > div {
  display: grid;
  flex: 1 1 180px;
  gap: 2px;
  min-width: 0;
}

.cloud-backup-card strong {
  color: var(--forest-900);
  font-size: 14px;
}

.cloud-backup-card small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.43;
}

.cloud-backup-card button {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
}

.cloud-restore-link {
  display: block;
  margin: var(--space-4) auto 0;
}

.web-device-note {
  margin: 0 0 var(--space-4);
}
