/* Blinds Up
   Blue speed-cloth felt, ivory type, and three chip colours that each mean
   one thing: marigold = the level in play, mint = break, coral = hurry up. */

@font-face {
  font-family: 'Big Shoulders Display';
  src: url('/fonts/big-shoulders-display.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/fonts/schibsted-grotesk.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --felt: #11173a;
  --felt-deep: #0b1029;
  --felt-raised: #1a2250;
  --felt-hover: #232c63;
  --line: rgba(244, 236, 216, 0.13);
  --line-strong: rgba(244, 236, 216, 0.28);
  --ivory: #f4ecd8;
  --ivory-dim: #aab0cf;
  --marigold: #f5b841;
  --coral: #ef5b45;
  --mint: #6fd6b0;

  --display: 'Big Shoulders Display', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --body: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 16px;
  --radius-small: 10px;
  --topbar: 60px;
  --tabbar: 0px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ivory);
  background-color: var(--felt);
  /* a faint cloth weave under a table-light vignette */
  background-image:
    radial-gradient(ellipse 90% 70% at 50% 30%, rgba(60, 78, 170, 0.35), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.05) 0 2px, transparent 2px 4px);
  background-attachment: fixed;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
}

h2 {
  font-size: 1.5rem;
}

p {
  margin: 0;
}

a {
  color: var(--marigold);
  text-underline-offset: 3px;
}

ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.muted {
  color: var(--ivory-dim);
  font-size: 0.92rem;
}

.pad {
  padding: 24px 0;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

/* ------------------------------------------------ buttons and fields */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(244, 236, 216, 0.06);
  color: var(--ivory);
  font: 600 0.95rem var(--body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.08s;
}

.btn:hover {
  background: rgba(244, 236, 216, 0.13);
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: var(--marigold);
  border-color: var(--marigold);
  color: var(--felt-deep);
}

.btn.primary:hover {
  background: #ffc95a;
}

.btn.danger {
  border-color: rgba(239, 91, 69, 0.6);
  color: #ff8f7d;
}

.btn.danger:hover {
  background: rgba(239, 91, 69, 0.16);
}

.dialog .btn.danger {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ivory-dim);
}

.btn.ghost:hover {
  color: var(--ivory);
  background: rgba(244, 236, 216, 0.08);
}

.btn.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.85rem;
}

.btn.big {
  min-height: 54px;
  padding: 0 28px;
  font-size: 1.05rem;
}

.btn:disabled,
.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ivory-dim);
  cursor: pointer;
  list-style: none;
  transition: background-color 0.15s, color 0.15s;
}

.icon-btn::-webkit-details-marker {
  display: none;
}

.icon-btn:hover {
  background: rgba(244, 236, 216, 0.1);
  color: var(--ivory);
}

.icon-btn.on {
  color: var(--marigold);
}

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--felt-deep);
  color: var(--ivory);
  font: 500 1rem var(--body);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--marigold);
  box-shadow: 0 0 0 3px rgba(245, 184, 65, 0.22);
}

input::placeholder {
  color: rgba(170, 176, 207, 0.6);
}

input.num {
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

input.num::-webkit-outer-spin-button,
input.num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type='color'] {
  width: 48px;
  padding: 4px;
  cursor: pointer;
}

input[type='checkbox'] {
  width: 20px;
  min-height: 0;
  height: 20px;
  flex: none;
  accent-color: var(--marigold);
}

.field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.field > span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ivory-dim);
}

.field > span small {
  font-weight: 400;
  opacity: 0.8;
}

.field.grow {
  flex: 1;
}

.check,
.switch {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.check small {
  display: block;
  color: var(--ivory-dim);
}

.switch {
  align-items: center;
  font-weight: 600;
  font-size: 0.92rem;
}

.form-error {
  color: #ff9a8a;
  font-size: 0.92rem;
  min-height: 1.4em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.is-off {
  opacity: 0.4;
}

.tag {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ivory-dim);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
}

.tag.gold {
  border-color: var(--marigold);
  color: var(--marigold);
}

.note {
  padding: 10px 14px;
  border-left: 3px solid var(--coral);
  background: rgba(239, 91, 69, 0.1);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  font-size: 0.92rem;
}

/* ------------------------------------------------ menus, dialog, toasts, banner */

.menu {
  position: relative;
}

.menu[open] {
  z-index: 30;
}

.menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 210px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #242e68;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.menu-list button,
.menu-list a {
  display: block;
  white-space: nowrap;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ivory);
  font: 500 0.95rem var(--body);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu-list a:hover,
.menu-list button:hover:not(:disabled) {
  background: rgba(244, 236, 216, 0.1);
}

.menu-list button.danger {
  color: #ff8f7d;
}

.menu-list button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--felt-raised);
  color: var(--ivory);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.dialog::backdrop {
  background: rgba(6, 9, 26, 0.72);
}

.dialog-body {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.dialog-body p {
  color: var(--ivory-dim);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar) + 20px + env(safe-area-inset-bottom));
  z-index: 60;
  display: grid;
  gap: 8px;
  width: min(440px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--ivory);
  color: var(--felt-deep);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.25s ease-out;
}

.toast.error {
  background: var(--coral);
  color: #fff;
}

.toast.leaving {
  opacity: 0;
  transition: opacity 0.3s;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: clamp(16px, 3vw, 36px) 24px;
  text-align: center;
  color: var(--felt-deep);
  background: var(--marigold);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: banner-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15);
  cursor: pointer;
}

.banner.break {
  background: var(--mint);
}

.banner.warn {
  background: var(--coral);
  color: #fff;
}

.banner-title {
  font: 800 clamp(2.6rem, 8vw, 7rem) / 0.95 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.banner-detail {
  font: 600 clamp(1.4rem, 4vw, 3.4rem) / 1.1 var(--display);
  letter-spacing: 0.03em;
  margin-top: 6px;
}

.banner.warn .banner-title {
  font-size: clamp(1.8rem, 4.5vw, 4rem);
}

.banner.warn .banner-detail {
  font-size: clamp(1.1rem, 2.4vw, 2rem);
}

@keyframes banner-in {
  from {
    transform: translateY(-100%);
  }
}

/* ------------------------------------------------ chrome */

.splash {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  font: 800 2rem var(--display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ivory-dim);
}

.wordmark {
  font: 800 clamp(3rem, 8vw, 4.6rem) / 0.9 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--ivory);
  text-decoration: none;
}

.wordmark em {
  font-style: normal;
  color: var(--marigold);
}

.wordmark.small {
  font-size: 1.7rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--topbar);
  padding: 0 max(16px, env(safe-area-inset-left));
  background: rgba(11, 16, 41, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar.shell {
  justify-content: flex-start;
}

.shell-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.shell-name {
  font: 700 1.35rem var(--display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-clock {
  flex: none;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ivory-dim);
  font: 600 1.05rem var(--display);
  letter-spacing: 0.05em;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.mini-clock.running {
  border-color: var(--marigold);
  color: var(--marigold);
}

.tabs {
  display: flex;
  gap: 2px;
}

.tab {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ivory-dim);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.tab:hover {
  color: var(--ivory);
}

.tab.active {
  background: var(--ivory);
  color: var(--felt-deep);
}

.page {
  display: grid;
  gap: 20px;
  align-content: start;
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 28px 16px calc(var(--tabbar) + 48px + env(safe-area-inset-bottom));
}

.page-head,
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(26, 34, 80, 0.72);
}

.card-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 64px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
}

.empty p {
  color: var(--ivory-dim);
  max-width: 44ch;
  margin-bottom: 8px;
}

.empty.slim {
  padding: 36px 20px;
}

/* ------------------------------------------------ sign in */

.login {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  min-height: 100dvh;
  overflow: hidden;
}

.login-chip {
  justify-self: end;
  width: min(74vh, 58vw);
  margin-left: -12vw;
  margin-right: 4vw;
}

.login-chip .chip {
  width: 100%;
  animation: chip-settle 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes chip-settle {
  from {
    transform: rotate(-70deg) scale(0.9);
    opacity: 0;
  }
}

.login-form {
  display: grid;
  gap: 18px;
  width: min(380px, 100%);
  padding: 32px 24px;
}

.lede {
  color: var(--ivory-dim);
  margin-bottom: 6px;
}

.auth-switch {
  color: var(--ivory-dim);
  font-size: 0.95rem;
}

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--marigold);
  font: 600 inherit;
  font-family: var(--body);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ------------------------------------------------ accounts */

.avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  /* a chip seen from above: dashed rim, solid face */
  border: 3px dashed rgba(244, 236, 216, 0.85);
  background: var(--marigold);
  background-clip: padding-box;
  color: var(--felt-deep);
  font: 800 1rem var(--display);
}

.account-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ivory);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
}

.account-btn::-webkit-details-marker {
  display: none;
}

.account-btn:hover {
  background: rgba(244, 236, 216, 0.08);
}

.account-name {
  max-width: 12ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px dashed var(--marigold);
  border-radius: var(--radius-small);
  background: var(--felt-deep);
}

.code-box code {
  font: 600 1.25rem ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color: var(--marigold);
  overflow-wrap: anywhere;
  user-select: all;
}

.tag.live {
  border-color: var(--mint);
  color: var(--mint);
}

.tag.bad {
  border-color: var(--coral);
  color: #ff8f7d;
}

.tag .icon {
  width: 1em;
  height: 1em;
  margin-right: 4px;
  vertical-align: -0.12em;
}

.shell-owner {
  flex: none;
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-head.sub {
  margin-top: 12px;
}

.u-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(26, 34, 80, 0.72);
}

.u-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 10px 12px 16px;
}

.u-row + .u-row {
  border-top: 1px solid var(--line);
}

.u-main {
  flex: 1;
  min-width: 0;
}

.u-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-weight: 700;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.u-meta {
  color: var(--ivory-dim);
  font-size: 0.88rem;
}

.u-row.blocked .avatar {
  background: var(--ivory-dim);
}

.u-row.blocked .u-name {
  color: var(--ivory-dim);
}

.share-form {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.share-form .field {
  min-width: 150px;
}

.share-form .btn {
  min-height: 44px;
}

.share-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.share-row + .share-row {
  border-top: 1px solid var(--line);
}

.share-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.share-row select {
  width: auto;
  min-height: 40px;
}

/* ------------------------------------------------ tournaments list */

.t-list {
  display: grid;
  gap: 12px;
}

.t-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(26, 34, 80, 0.72);
  transition: border-color 0.15s, background-color 0.15s;
}

.t-card:hover {
  border-color: var(--line-strong);
  background: var(--felt-hover);
}

.t-link {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
  padding: 18px 8px 18px 22px;
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius);
}

.t-name {
  font: 700 1.7rem / 1.05 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.t-meta {
  color: var(--ivory-dim);
  font-size: 0.9rem;
}

.t-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.status {
  justify-self: start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}

.status::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status.running {
  color: var(--marigold);
}

.status.paused {
  color: var(--coral);
}

.status.finished {
  color: var(--mint);
}

/* ------------------------------------------------ the clock */

.page.view-clock {
  width: 100%;
  max-width: 1500px;
  padding-top: 12px;
}

.clock {
  display: grid;
  grid-template-rows: 1fr auto auto auto;
  gap: clamp(14px, 2.4vh, 28px);
  min-height: calc(100dvh - var(--topbar) - var(--tabbar) - 72px);
}

.clock-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 5vw, 90px);
  padding: 0 clamp(0px, 3vw, 48px);
}

.chip {
  --chip: var(--marigold);
  position: relative;
  width: min(42vw, 60vh);
  aspect-ratio: 1;
  container-type: inline-size;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.5));
}

.chip.is-break {
  --chip: var(--mint);
}

.chip.is-warn {
  --chip: var(--coral);
}

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

.chip-rim,
.chip-inlay,
.chip-ticks {
  fill: none;
}

.chip-rim {
  stroke: var(--chip);
  stroke-width: 26;
  transition: stroke 0.4s;
}

.chip-inlay {
  stroke: var(--ivory);
  stroke-width: 26;
}

.chip-well {
  fill: var(--felt-deep);
  stroke: rgba(0, 0, 0, 0.45);
  stroke-width: 3;
}

.chip-ticks {
  stroke: var(--chip);
  stroke-width: 14;
  transition: stroke 0.4s;
}

.chip-ticks.dim {
  opacity: 0.15;
}

.chip.is-stopped .chip-ticks.lit {
  opacity: 0.5;
}

.chip-face {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  font-family: var(--display);
  text-transform: uppercase;
}

.chip-label {
  font-size: 6.2cqw;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--chip);
  transition: color 0.4s;
}

.chip-time {
  font-size: 29cqw;
  font-weight: 800;
  line-height: 0.95;
  white-space: nowrap;
}

.chip-time.long {
  font-size: 20cqw;
}

.chip-time .digit {
  display: inline-block;
  width: 0.5em;
  text-align: center;
}

.chip-time .colon {
  display: inline-block;
  width: 0.24em;
  text-align: center;
  color: var(--chip);
  transform: translateY(-0.06em);
}

.chip.is-stopped .chip-time {
  color: var(--ivory-dim);
}

.chip.is-warn .chip-time {
  color: var(--coral);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.55;
  }
}

.chip-sub {
  font-size: 4.6cqw;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ivory-dim);
}

.blinds-panel {
  display: grid;
  gap: clamp(4px, 1vh, 12px);
  align-content: center;
  min-width: 0;
}

.eyebrow {
  font-size: clamp(0.8rem, 1.3vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}

.blinds-now {
  font: 800 clamp(4rem, 10.5vw, 11.5rem) / 0.9 var(--display);
  letter-spacing: 0.005em;
  text-transform: uppercase;
  white-space: nowrap;
}

.blinds-now .slash {
  display: inline-block;
  margin: 0 0.16em;
  color: var(--marigold);
  font-size: 0.62em;
  font-weight: 600;
  transform: translateY(-0.18em);
}

.winner-name {
  font: 800 clamp(3.2rem, 8vw, 8rem) / 0.95 var(--display);
  text-transform: uppercase;
  color: var(--marigold);
  overflow-wrap: anywhere;
}

.ante-now {
  font: 600 clamp(1.6rem, 3.6vw, 3.8rem) / 1.05 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--marigold);
}

.ante-now small {
  font: 500 0.4em var(--body);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ivory-dim);
}

.callout {
  justify-self: start;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--felt-deep);
  font-weight: 700;
}

.next-line {
  margin-top: clamp(6px, 1.6vh, 20px);
  padding-top: clamp(8px, 1.6vh, 18px);
  border-top: 1px solid var(--line-strong);
  font-size: clamp(1rem, 1.9vw, 1.9rem);
  color: var(--ivory-dim);
}

.next-line b {
  color: var(--ivory);
  font-weight: 700;
}

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

.controls-gap {
  width: 20px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 16, 41, 0.55);
  overflow: hidden;
}

.stats > div {
  padding: 14px 18px;
  box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line);
}

.stats dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}

.stats dd {
  font: 700 clamp(1.6rem, 2.6vw, 2.6rem) / 1.1 var(--display);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.stats dd small {
  font: 500 0.85rem var(--body);
  letter-spacing: 0;
  color: var(--ivory-dim);
}

.stats.compact {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.stats.compact dd {
  font-size: 1.7rem;
}

.chipset {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 22px;
  font: 600 1.15rem var(--display);
  letter-spacing: 0.05em;
  color: var(--ivory-dim);
}

.chipset li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chipset i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c);
  border: 3px dashed rgba(244, 236, 216, 0.9);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.chipset .gone {
  opacity: 0.35;
  text-decoration: line-through;
}

/* full screen: nothing but the clock, sized for the far end of the room */
body.tv {
  --topbar: 0px;
  --tabbar: 0px;
}

body.tv .topbar {
  display: none;
}

body.tv .page.view-clock {
  max-width: none;
  padding: 3vh 3vw;
}

body.tv .clock {
  min-height: 94dvh;
}

body.tv .chip {
  width: min(44vw, 68vh);
}

body.tv .controls {
  opacity: 0.25;
  transition: opacity 0.3s;
}

body.tv .controls:hover,
body.tv .controls:focus-within {
  opacity: 1;
}

/* ------------------------------------------------ players */

.add-player {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.add-player .btn {
  min-height: 44px;
}

.p-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(26, 34, 80, 0.72);
}

.p-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 18px;
}

.p-row + .p-row {
  border-top: 1px solid var(--line);
}

.p-seat {
  width: 2.6rem;
  flex: none;
  font: 700 1.3rem var(--display);
  letter-spacing: 0.03em;
  color: var(--ivory-dim);
}

.p-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.p-name .tag {
  margin-left: 4px;
}

.p-row.out .p-name {
  color: var(--ivory-dim);
  text-decoration: line-through;
  text-decoration-color: rgba(170, 176, 207, 0.5);
}

.p-row.out .p-name .tag {
  text-decoration: none;
  display: inline-block;
}

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

.log ol {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--ivory-dim);
  font-size: 0.92rem;
}

.log time {
  display: inline-block;
  min-width: 3.6rem;
  font-variant-numeric: tabular-nums;
  color: rgba(170, 176, 207, 0.7);
}

/* ------------------------------------------------ blinds */

.lv-head,
.lv-row {
  display: grid;
  grid-template-columns: 2.2rem repeat(3, minmax(0, 1fr)) 4.6rem 4.8rem 42px;
  align-items: center;
  gap: 8px;
}

.lv-head {
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}

.lv-list {
  display: grid;
  gap: 4px;
}

.lv-row {
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.lv-row.current {
  border-color: var(--marigold);
  background: rgba(245, 184, 65, 0.08);
}

.lv-row.break {
  background: rgba(111, 214, 176, 0.08);
}

.lv-row.break.current {
  border-color: var(--mint);
}

.lv-n {
  font: 700 1.25rem var(--display);
  color: var(--ivory-dim);
  text-align: center;
}

.lv-break {
  grid-column: span 3;
  font-weight: 600;
  color: var(--mint);
}

.lv-break .tag {
  margin-left: 6px;
}

.lv-start {
  font-size: 0.88rem;
  color: var(--ivory-dim);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.lv-head .lv-start {
  font-size: inherit;
  color: inherit;
}

.lv-note {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 4px;
}

.lv-row input {
  min-height: 40px;
  padding: 0 10px;
}

/* ------------------------------------------------ prizes */

.pool {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 40px;
}

.pool-total {
  font: 800 clamp(3.4rem, 9vw, 5.5rem) / 0.9 var(--display);
  color: var(--marigold);
}

.pool-parts {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 240px;
  color: var(--ivory-dim);
}

.pool-parts li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.pool-parts b {
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
}

.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.seg button {
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ivory-dim);
  font: 600 0.88rem var(--body);
  cursor: pointer;
}

.seg button.active {
  background: var(--ivory);
  color: var(--felt-deep);
}

.pay-row {
  display: grid;
  grid-template-columns: 3.4rem 6.5rem minmax(5rem, auto) 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.pay-row + .pay-row {
  border-top: 1px solid var(--line);
}

.pay-place {
  font: 700 1.5rem var(--display);
}

.pay-row:first-child .pay-place {
  color: var(--marigold);
}

.pay-pct {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ivory-dim);
}

.pay-pct i {
  font-style: normal;
}

.pay-amount {
  font: 700 1.5rem var(--display);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.pay-who {
  color: var(--ivory-dim);
  overflow-wrap: anywhere;
}

/* ------------------------------------------------ setup */

.chip-rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 20px;
}

.chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ------------------------------------------------ small screens */

@media (max-width: 860px) {
  :root {
    --tabbar: 62px;
  }

  .tabs {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 40;
    justify-content: space-around;
    height: calc(var(--tabbar) + env(safe-area-inset-bottom));
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    background: rgba(11, 16, 41, 0.94);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
  }

  /* backdrop-filter would make the top bar the anchor for the fixed tab bar */
  .topbar {
    backdrop-filter: none;
    background: var(--felt-deep);
  }

  .form-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 14px 12px;
  }

  .controls .btn.big {
    order: -1;
    flex-basis: 100%;
  }

  .account-name,
  .account-btn .icon {
    display: none;
  }

  .account-btn {
    padding: 3px;
    border-color: transparent;
  }

  .shell-title {
    gap: 8px;
  }

  .shell-owner {
    max-width: 9ch;
  }

  .share-form .field,
  .share-form .btn {
    flex: 1 1 100%;
  }

  .share-row select {
    max-width: 9.5rem;
    padding: 0 8px;
  }

  .u-row {
    align-items: flex-start;
    padding-left: 12px;
    gap: 10px;
  }

  .tab {
    display: grid;
    place-items: center;
    flex: 1;
    padding: 0 4px;
    font-size: 0.88rem;
  }

  body.tv .tabs {
    display: none;
  }

  .login {
    grid-template-columns: 1fr;
    align-content: center;
    justify-items: center;
    gap: 8px;
    padding: 24px 0;
  }

  .login-chip {
    justify-self: center;
    width: min(56vw, 30vh);
    margin: 0;
  }

  .clock-main {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 22px;
  }

  .chip,
  body.tv .chip {
    width: min(78vw, 44vh);
  }

  .blinds-panel {
    justify-items: center;
  }

  .blinds-now {
    font-size: clamp(3.6rem, 17vw, 7rem);
  }

  .callout {
    justify-self: center;
  }

  .next-line {
    width: 100%;
  }

  .controls-gap {
    flex-basis: 100%;
    height: 0;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats.compact {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats.compact > div {
    padding: 10px 12px;
  }

  .card {
    padding: 18px 14px;
  }

  .p-row {
    flex-wrap: wrap;
    padding-left: 14px;
  }

  .p-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .lv-head,
  .lv-row {
    grid-template-columns: 1.5rem repeat(3, minmax(0, 1fr)) 3.2rem 36px;
    gap: 5px;
  }

  .lv-head,
  .lv-row {
    padding-left: 2px;
    padding-right: 0;
  }

  .lv-start {
    display: none;
  }

  .lv-row input {
    padding: 0 6px;
    font-size: 0.95rem;
  }

  .lv-row .icon-btn {
    width: 36px;
    height: 36px;
  }

  .pay-row {
    grid-template-columns: 2.8rem 5.4rem 1fr auto;
  }

  .pay-who {
    grid-column: 2 / -1;
    grid-row: 2;
    margin-top: -8px;
  }

  .pay-who:empty {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
