:root {
  --ink: #10221f;
  --muted: #60706c;
  --line: #dce5e1;
  --soft: #f5f8f7;
  --softer: #eef4f1;
  --white: #ffffff;
  --green: #17a873;
  --green-dark: #0c7650;
  --coral: #ef5c50;
  --amber: #f4b740;
  --shadow: 0 24px 70px rgba(16, 34, 31, 0.13);
  --radius: 8px;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(23, 168, 115, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(239, 92, 80, 0.08), transparent 32%),
    #fbfcfc;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.screen::-webkit-scrollbar,
.score-inputs::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html,
body,
.screen,
.score-inputs {
  scrollbar-width: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

.prototype-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1fr);
  gap: 0;
  align-items: center;
  justify-items: center;
  padding: clamp(8px, 3vw, 24px);
}

.brand-panel {
  display: flex;
  flex-direction: column;
  gap: 26px;
  max-width: 390px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.large-lockup {
  align-items: flex-start;
}

.brand-mark {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: grid;
  place-items: center;
  box-shadow: none;
}

.brand-mark svg {
  width: 52px;
  height: 52px;
}

.brand-mark.xl {
  width: 92px;
  height: 92px;
}

.brand-mark.xl svg {
  width: 76px;
  height: 76px;
}

.brand-mark.mini {
  width: 44px;
  height: 44px;
}

.brand-mark.mini svg {
  width: 42px;
  height: 42px;
}

.brand-latin {
  margin: 0 0 4px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  display: block;
  height: auto;
  object-fit: contain;
}

.brand-logo-main {
  width: min(100%, 372px);
  margin: 0 auto;
  filter: drop-shadow(0 16px 24px rgba(16, 34, 31, 0.08));
}

.brand-logo-strip {
  width: min(100%, 252px);
  margin: 0 auto;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.08;
}

.identity-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 18px 44px rgba(16, 34, 31, 0.08);
}

.identity-block h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.color-system {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.color-system span {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.color-system span::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(16, 34, 31, 0.08);
}

.identity-note {
  display: grid;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.6;
}

.identity-note strong {
  color: var(--ink);
}

.prototype-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.tab {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--muted);
  font-weight: 800;
}

.tab.active {
  border-color: rgba(23, 168, 115, 0.5);
  background: rgba(23, 168, 115, 0.1);
  color: var(--green-dark);
}

.phone-stage {
  width: 100%;
  display: grid;
  place-items: center;
}

.phone {
  width: min(100%, 430px);
  height: 844px;
  max-height: calc(100vh - 18px);
  min-height: 680px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 34, 31, 0.1);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 22px 54px rgba(16, 34, 31, 0.14);
  font-size: 14px;
}

.screen {
  display: none;
  height: 100%;
  overflow: auto;
  padding: 14px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7faf9 48%, #f2f7f5 100%);
}

.screen.active {
  display: block;
  animation: screenIn 180ms ease;
}

.splash-screen {
  padding: 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(23, 168, 115, 0.08), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #ffffff 58%, #f4fbf8 100%);
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.splash-content {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(18px, 3.2vh, 30px);
  text-align: center;
  padding: clamp(54px, 9vh, 86px) 26px 28px;
}

.centered-lockup {
  flex-direction: column;
  gap: 12px;
}

.centered-lockup h2 {
  margin: 0;
  color: #062f29;
  font-size: clamp(41px, 10.5vw, 52px);
  font-weight: 950;
  line-height: 1.16;
  text-shadow: 0 8px 18px rgba(6, 47, 41, 0.13);
}

.splash-lines {
  display: grid;
  justify-items: end;
  gap: 14px;
  margin: 0 auto;
  width: min(100%, 268px);
}

.splash-lines span {
  display: block;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 6px 12px rgba(16, 34, 31, 0.09);
}

.splash-lines span:nth-child(1) {
  width: 100%;
  background: var(--green);
}

.splash-lines span:nth-child(2) {
  width: 80%;
  background: var(--coral);
}

.splash-lines span:nth-child(3) {
  width: 60%;
  background: var(--amber);
}

.lead {
  margin: 0 auto;
  max-width: 330px;
  color: #455f5a;
  line-height: 2.05;
  font-size: clamp(19px, 5vw, 24px);
  font-weight: 700;
}

.splash-actions {
  display: grid;
  gap: 20px;
  width: min(100%, 360px);
  margin: 0 auto;
}

.splash-actions .primary-action {
  min-height: 74px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, #19c892 0%, #07986d 100%);
  font-size: 28px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.24),
    inset 0 -4px 0 rgba(0, 91, 67, 0.2),
    0 18px 34px rgba(23, 168, 115, 0.24);
}

.share-app-action {
  position: relative;
  min-height: 132px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  overflow: hidden;
  border: 2px solid rgba(23, 168, 115, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(237, 253, 247, 0.88), rgba(255, 255, 255, 0.96));
  color: var(--ink);
  padding: 18px 22px;
  text-align: center;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.8),
    0 18px 32px rgba(23, 168, 115, 0.12);
}

.share-app-action::before {
  content: "";
  position: absolute;
  left: -34px;
  bottom: -34px;
  width: 190px;
  height: 72px;
  border-radius: 50%;
  background: rgba(23, 168, 115, 0.13);
  transform: rotate(11deg);
}

.share-app-action::after {
  content: "";
  position: absolute;
  left: 28px;
  top: 30px;
  width: 62px;
  height: 48px;
  opacity: 0.75;
  background:
    radial-gradient(circle at 18px 12px, #18c98d 0 4px, transparent 5px),
    radial-gradient(circle at 38px 31px, #18c98d 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 8px 37px, #18c98d 0 2px, transparent 3px);
}

.share-app-action strong,
.share-app-action small {
  position: relative;
  display: block;
  z-index: 1;
}

.share-app-action strong {
  color: #062f29;
  font-size: 25px;
  font-weight: 950;
  line-height: 1.25;
}

.share-app-action small {
  margin-top: 8px;
  color: #455f5a;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.share-app-icon {
  position: relative;
  z-index: 1;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background:
    linear-gradient(180deg, #18c98d 0%, #07986d 100%);
  color: var(--white);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    inset 0 -4px 0 rgba(0, 91, 67, 0.18),
    0 14px 24px rgba(23, 168, 115, 0.25);
}

.share-app-icon svg {
  width: 35px;
  height: 35px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.screen-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 2px 0 12px;
  padding: 4px 0;
  color: var(--ink);
}

.screen-logo.logo-only {
  margin: 0 0 10px;
  padding: 0;
}

.top-chrome {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: -14px -14px 10px;
  padding: 8px 14px 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 250, 0.94) 100%);
  border-bottom: 1px solid rgba(220, 229, 225, 0.62);
  box-shadow: 0 12px 24px rgba(16, 34, 31, 0.06);
  backdrop-filter: blur(12px);
}

.top-chrome .screen-logo.logo-only {
  margin: 0 0 6px;
}

.top-chrome .app-header {
  margin-bottom: 0;
}

.screen-logo strong,
.screen-logo span {
  display: block;
  text-align: right;
}

.screen-logo strong {
  font-size: 17px;
  font-weight: 950;
  line-height: 1.25;
}

.screen-logo span {
  color: var(--green-dark);
  font-size: 12.5px;
  font-weight: 900;
}

.app-header {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid rgba(220, 229, 225, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(16, 34, 31, 0.07);
}

.screen[data-screen="individual"] .standings-panel {
  position: sticky;
  top: 138px;
  z-index: 24;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.screen[data-screen="baloot"] .team-scoreboard {
  position: sticky;
  top: 138px;
  z-index: 24;
  background: rgba(247, 250, 249, 0.92);
  padding-bottom: 6px;
  backdrop-filter: blur(12px);
}

.app-header.compact {
  grid-template-columns: 36px minmax(0, 1fr) auto;
}

.app-header p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.app-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
  color: var(--ink);
}

.icon-button svg,
.ghost-action svg,
.lock-chip svg,
.header-share svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-share {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(23, 168, 115, 0.34);
  border-radius: var(--radius);
  background: rgba(23, 168, 115, 0.09);
  color: var(--green-dark);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 950;
}

.game-list {
  display: grid;
  gap: 10px;
  padding-bottom: 86px;
}

.game-card {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  text-align: right;
}

.game-card.selected {
  border-color: rgba(23, 168, 115, 0.55);
  background: rgba(23, 168, 115, 0.08);
  box-shadow: 0 12px 26px rgba(23, 168, 115, 0.12);
}

.game-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #ffffff;
  color: var(--green-dark);
  box-shadow:
    inset 0 0 0 1px rgba(16, 34, 31, 0.05),
    0 8px 18px rgba(16, 34, 31, 0.08);
}

.game-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.game-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.game-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 17px;
}

.game-card small {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 800;
}

.mode-tag {
  min-width: 54px;
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--softer);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.game-card.selected .mode-tag {
  background: var(--green);
  color: var(--white);
}

.primary-action,
.secondary-action {
  width: 100%;
  min-height: 43px;
  border: 0;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 900;
}

.primary-action {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 14px 26px rgba(23, 168, 115, 0.24);
}

.secondary-action {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.docked {
  position: absolute;
  right: 20px;
  left: 20px;
  bottom: 22px;
  width: auto;
}

.setup-panel,
.entry-panel,
.history-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 10px;
}

.setup-panel {
  padding-bottom: 12px;
  margin-bottom: 84px;
}

.stepper-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  font-weight: 900;
}

.stepper {
  display: inline-grid;
  grid-template-columns: 36px 42px 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.stepper button {
  width: 36px;
  height: 36px;
  border: 0;
  background: var(--soft);
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.stepper strong {
  text-align: center;
  font-size: 16px;
}

.player-fields {
  display: grid;
  gap: 8px;
}

.text-field,
.team-input-grid label,
.score-cell {
  display: grid;
  gap: 6px;
}

.text-field span,
.team-input-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.player-fields .text-field {
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfa;
}

.player-fields .text-field span {
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  padding-inline-start: 4px;
}

.player-fields .text-field input {
  min-height: 34px;
  background: var(--white);
}

input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  padding: 0 8px;
  font-size: 14.5px;
  font-weight: 800;
  outline: none;
}

input[type="number"] {
  text-align: center;
}

input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 168, 115, 0.13);
}

.standings-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 10px;
  box-shadow: 0 14px 30px rgba(16, 34, 31, 0.06);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 950;
}

.section-heading small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.score-total-list {
  display: grid;
  gap: 6px;
}

.total-row {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
  color: var(--ink);
  font: inherit;
  text-align: right;
  overflow: hidden;
}

.total-row::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background: #cfd8d5;
}

.rank {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--muted);
  font-weight: 900;
}

.total-row.winner {
  border-color: rgba(244, 183, 64, 0.65);
  background: linear-gradient(180deg, rgba(244, 183, 64, 0.17), rgba(255, 255, 255, 0.92));
}

.total-row.dealer {
  border-color: rgba(23, 168, 115, 0.55);
  box-shadow: inset 0 0 0 1px rgba(23, 168, 115, 0.18);
}

.total-row.dealer::after,
.score-cell.dealer::after,
.team-box.dealer::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(23, 168, 115, 0.42);
  border-radius: 6px;
  pointer-events: none;
}

.total-row.winner::before {
  background: var(--amber);
}

.total-row.winner .rank {
  background: var(--amber);
  color: var(--ink);
}

.total-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 950;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.score-value {
  direction: ltr;
  font-size: 18px;
  font-weight: 900;
  color: var(--green-dark);
}

.score-value.negative {
  color: var(--coral);
}

.entry-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 9px;
  box-shadow: 0 14px 30px rgba(16, 34, 31, 0.06);
}

.panel-title {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
}

.panel-title small {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.ghost-action {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(23, 168, 115, 0.08);
  color: var(--green-dark);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
}

.score-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  gap: 6px;
}

.score-cell {
  position: relative;
  min-width: 0;
  min-height: 54px;
  padding: 7px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfa;
  align-content: center;
  justify-items: center;
}

.score-cell.dealer {
  border-color: rgba(23, 168, 115, 0.55);
  background: linear-gradient(180deg, rgba(23, 168, 115, 0.09), #f8fbfa);
}

.score-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfa;
}

.score-player {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.player-dot {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--white);
  color: var(--green-dark);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 950;
}

.score-cell strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 950;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 3px;
}

.dealer-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 18px;
  padding: 0 5px;
  border: 1px solid rgba(23, 168, 115, 0.34);
  border-radius: 6px;
  background: rgba(23, 168, 115, 0.1);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.score-field {
  display: block;
  align-items: center;
  justify-content: center;
}

.score-field input {
  width: 45px;
  min-height: 28px;
  padding: 0 3px;
  font-size: 13px;
  font-weight: 950;
}

.history-panel {
  min-height: 104px;
  box-shadow: 0 14px 30px rgba(16, 34, 31, 0.06);
}

.history-list {
  display: grid;
  gap: 6px;
}

.history-empty {
  min-height: 52px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--soft);
  border-radius: var(--radius);
  font-weight: 800;
  text-align: center;
}

.history-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 7px 8px;
  background: #f8fbfa;
  border: 1px solid rgba(220, 229, 225, 0.75);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
}

.history-row strong {
  color: var(--ink);
}

.history-table {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(220, 229, 225, 0.82);
  border-radius: var(--radius);
  background: var(--white);
}

.history-table-row {
  display: grid;
  grid-template-columns: var(--history-grid);
  align-items: center;
  min-height: 34px;
  border-top: 1px solid rgba(220, 229, 225, 0.72);
}

.history-table-row:first-child {
  border-top: 0;
}

.history-table-head {
  min-height: 30px;
  background: #f2f7f5;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 950;
}

.history-table-row > * {
  min-width: 0;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 5px 4px;
  border-inline-start: 1px solid rgba(220, 229, 225, 0.72);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-table-row > *:first-child {
  border-inline-start: 0;
}

.history-table-row strong {
  color: var(--ink);
  font-size: 12px;
}

.history-table-row strong small {
  display: block;
  margin-top: 2px;
  color: var(--green-dark);
  font-size: 10.5px;
  font-weight: 900;
}

.history-table-row b {
  direction: ltr;
  color: var(--green-dark);
  font-size: 13px;
  line-height: 1;
}

.history-table-row b.negative {
  color: var(--coral);
}

.history-grid-row {
  align-items: stretch;
}

.history-score-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(220, 229, 225, 0.7);
  border-radius: 7px;
  background: var(--white);
}

.history-score-grid span {
  display: grid;
  place-items: center;
  gap: 1px;
  min-height: 36px;
  padding: 4px;
  border-inline-start: 1px solid rgba(220, 229, 225, 0.85);
}

.history-score-grid span:first-child {
  border-inline-start: 0;
}

.history-score-grid small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.history-score-grid b {
  direction: ltr;
  color: var(--green-dark);
  font-size: 13px;
  line-height: 1;
}

.history-score-grid b.negative {
  color: var(--coral);
}

.team-scoreboard {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.team-box {
  position: relative;
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--white);
  cursor: pointer;
}

.team-box.dealer {
  box-shadow: inset 0 0 0 1px rgba(23, 168, 115, 0.24);
}

.team-box span {
  font-size: 15px;
  font-weight: 900;
}

.team-box strong {
  font-size: 46px;
  line-height: 1;
}

.team-box.ours {
  border-color: rgba(23, 168, 115, 0.45);
  background: rgba(23, 168, 115, 0.08);
}

.team-box.theirs {
  border-color: rgba(239, 92, 80, 0.42);
  background: rgba(239, 92, 80, 0.08);
}

.team-box.ours strong {
  color: var(--green-dark);
}

.team-box.theirs strong {
  color: var(--coral);
}

.team-input-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.viewer-header {
  margin-bottom: 12px;
}

.lock-chip {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--green-dark);
  background: rgba(23, 168, 115, 0.1);
}

.readonly-banner {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(244, 183, 64, 0.65);
  border-radius: var(--radius);
  background: rgba(244, 183, 64, 0.12);
  margin-bottom: 12px;
  line-height: 1.5;
}

.readonly-banner span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.viewer-body {
  display: grid;
  gap: 12px;
  padding-bottom: 86px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  min-width: 150px;
  text-align: center;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(16, 34, 31, 0.22);
  transition: 180ms ease;
}

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

@media (max-width: 860px) {
  .prototype-shell {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .phone {
    width: min(100%, 440px);
    height: calc(100vh - 20px);
    min-height: 620px;
    border-radius: 18px;
  }
}

@media (max-width: 430px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .prototype-shell {
    padding: 0;
    min-height: 100vh;
    overflow: hidden;
  }

  .phone {
    width: 100vw;
    height: 100vh;
    max-height: none;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .screen {
    padding: 12px;
    height: 100vh;
  }

  .top-chrome {
    margin: -12px -12px 10px;
    padding: 6px 12px 7px;
  }

  .top-chrome .brand-logo-strip {
    width: min(100%, 230px);
  }

  .screen[data-screen="individual"] .standings-panel,
  .screen[data-screen="baloot"] .team-scoreboard {
    top: 128px;
  }

  .splash-screen {
    padding: 0;
  }

  .splash-content {
    padding: 48px 22px 24px;
    gap: 18px;
  }

  .brand-mark.xl {
    width: 84px;
    height: 84px;
  }

  .brand-mark.xl svg {
    width: 72px;
    height: 72px;
  }

  .brand-logo-main {
    width: min(100%, 350px);
  }

  .splash-actions {
    gap: 16px;
  }

  .splash-actions .primary-action {
    min-height: 68px;
  }

  .share-app-action {
    min-height: 116px;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .share-app-icon {
    width: 66px;
    height: 66px;
  }

  .share-app-action strong {
    font-size: 22px;
  }

  .share-app-action small {
    font-size: 13.5px;
  }
}
