/* ---- start page ---- */
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 9px; }
.player {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--mute);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
}
.player span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.player:not(.on) .tile { background: var(--used); color: var(--mute); }
.player.on { color: var(--ink); }
.player b { flex: none; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; background: var(--key); font-size: 13px; font-weight: 600; }
.player.add { justify-content: center; background: none; border: 2px dashed var(--mute); }
[data-theme='paper'] .player:not(.add) { box-shadow: inset 0 0 0 1.5px var(--ink); }
.rule { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.4; }
.rule span { flex: 1; }
.go { margin-top: auto; flex: none; min-height: 60px; border-radius: 16px; font-size: 20px; }
[data-theme='paper'] .go { border-radius: 4px; }
.tiles { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- match ---- */
.match { height: 100%; display: flex; flex-direction: column; }
.match > .side { display: none; }
.match.show-overview > .side { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.match.show-overview > .turn { display: none; }
.turn { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 12px 12px 16px;
  background: var(--pc);
  color: #fff;
}
.head .who { flex: 1; min-width: 0; }
.head .tools { display: contents; }
.head h1 { font-size: 24px; font-weight: 600; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head p { font-size: 13px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head .total { font-size: 32px; font-weight: 700; line-height: 1; }
.head .score { flex: none; min-width: 0; min-height: 44px; padding: 0 2px; display: grid; justify-items: end; gap: 2px; }
.head .score small { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 400; line-height: 1; white-space: nowrap; }
.totals { display: flex; align-items: center; gap: 8px; min-height: 30px; font-weight: 700; }
.totals svg { color: var(--mute); }
.head button:not(.score) { min-height: 44px; min-width: 44px; border-radius: 12px; background: rgb(255 255 255 / .2); font-weight: 500; }
.head .menu { display: grid; place-items: center; }
.head .all + .menu { margin-left: -4px; }
.watching .head { padding-left: 12px; }
.head .all { padding: 0 13px; font-size: 14px; }
[data-theme='paper'] .head { background: var(--bg); color: var(--ink); border-bottom: 5px solid var(--pc); }
[data-theme='paper'] .head h1, [data-theme='paper'] .head .total { font-family: var(--hand); color: var(--pc); }
[data-theme='paper'] .head button:not(.score) { background: none; box-shadow: inset 0 0 0 1.5px var(--ink); border-radius: 4px; }

.rows { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.row {
  flex: 1 0 27px;
  max-height: 64px; /* with few rows left they do not need the whole screen */
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.row .icon { width: 30px; display: flex; color: var(--mute); }
.row .name { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .value { min-width: 60px; text-align: right; font-size: 18px; font-weight: 600; }
/* What can be picked stands out from what is already used: bigger names, points in the colours of the dice below. */
.row.open .name { font-size: 17px; font-weight: 600; }
.row.open .value, .row.chosen .value { font-size: 21px; font-weight: 700; line-height: 26px; }
.row.open:not(.zero, .gold) .value:not(:empty) {
  flex: none;
  min-width: 54px;
  margin-right: -8px;
  border-radius: 9px;
  text-align: center;
  background: color-mix(in oklab, var(--surface) 84%, var(--pc));
  color: var(--pc);
}
[data-theme='dark'] .row.open:not(.zero, .gold) .value:not(:empty) { background: color-mix(in oklab, var(--surface) 52%, var(--pc)); color: #fff; }
[data-theme='paper'] .row.open:not(.zero, .gold) .value:not(:empty) { margin: 0; border-radius: 0; }
.row.zero .name { font-weight: 500; }
/* A dash in line with the points above and below. */
.row.zero .value { flex: none; min-width: 54px; margin-right: -8px; text-align: center; color: var(--behind); }
[data-theme='paper'] .row.zero .value { margin: 0; }
.row.used { background: var(--used); color: var(--used-ink); }
.row.used .value { font-weight: 500; }
.row.used .name { font-weight: 400; }
.row.used .icon { opacity: .55; }
.row.struck .name { text-decoration: line-through; }
.row.gold { background: var(--gold); color: var(--gold-ink); }
.row.gold .name { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.row.gold .value { color: inherit; font-weight: 700; }
.row.gold.chosen, [data-theme='paper'] .row.gold.chosen { background: var(--gold); color: var(--gold-ink); box-shadow: inset 0 0 0 3px var(--pc); }
[data-theme='paper'] .row.gold .value { color: var(--gold-ink); }
.row.locked { color: var(--mute); background: var(--bg); }
.row.locked .name { font-weight: 400; }
.row.locked > * { opacity: .75; }
.row.chosen { background: var(--pc); color: #fff; }
[data-theme='paper'] .row.chosen { background: #fff3bd; color: var(--ink); }
.row.chosen .icon { color: inherit; }
.row.sum { flex: 0 0 30px; line-height: normal; background: var(--bg); color: var(--ink); }
.row.sum .name { font-size: 14px; }
.diff { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.row .diff { margin-right: 4px; }
.row .diff + .value { min-width: 78px; }
[data-theme='paper'] .row .diff { margin-right: 9px; }
@media (max-width: 350px) { .head .score small { font-size: 0; gap: 0; } }
:is(.diff, .badge).ahead { color: var(--ahead); }
:is(.diff, .badge).behind { color: var(--behind); }
:is(.diff, .badge).even { color: var(--mute); }
.row.chosen .diff { color: inherit; }
.row.sum.done { background: var(--go); color: #fff; }
.row.sum.done .name, .row.sum.lost .name { font-weight: 600; }
.row.sum.done .badge { color: #fff; background: rgb(255 255 255 / .22); }
.row.sum.lost { color: var(--behind); }
.tag { flex: none; padding: 2px 9px; border-radius: 12px; background: var(--key); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.tag.gives { background: var(--go); color: #fff; }
.tag.loses { background: #b3283a; color: #fff; }
.row .tag { margin-right: 6px; }
.row.chosen .tag { box-shadow: 0 0 0 1.5px #fff; }
[data-theme='paper'] .row .tag { margin-right: 9px; }
.badge { flex: none; min-width: 40px; padding: 2px 9px; border-radius: 12px; background: color-mix(in srgb, currentColor 14%, transparent); font-size: 15px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
[data-theme='paper'] .row.sum { padding-right: 14px; }
.row:focus-visible { outline-offset: -3px; }

/* Maxi has 20 rows: open ones stay easy to hit, used ones give up height. */
.maxi .row { flex: 1.55 0 33px; }
.maxi .row.used, .maxi .row.locked { flex: .8 0 21px; }
.maxi .row.used.gold { flex: 1 0 28px; }
.maxi .row.used:not(.gold) .name { font-size: 14px; }
.maxi .row.used:not(.gold) .value { font-size: 15px; }
.maxi .row.sum { flex: 0 0 30px; }

[data-theme='paper'] .row { padding-right: 0; }
[data-theme='paper'] .row .value {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  border-left: 1.5px solid var(--ink);
}
[data-theme='paper'] .row.used .value, [data-theme='paper'] .row.chosen .value { font-family: var(--hand); color: var(--pencil); }
[data-theme='paper'] .row.struck .name { text-decoration: none; }
[data-theme='paper'] .row.struck .value {
  color: transparent;
  background: linear-gradient(to top right, transparent calc(50% - 1px), var(--pencil) calc(50% - 1px), var(--pencil) calc(50% + 1px), transparent calc(50% + 1px));
}

.slots { display: flex; align-items: center; gap: 5px; padding: 8px 14px; background: var(--bg); }
.slot { flex: 0 1 40px; min-width: 0; height: 40px; border-radius: 10px; background: var(--used); display: grid; place-items: center; }
.slot.filled { background: color-mix(in oklab, var(--surface) 80%, var(--pc)); color: var(--pc); }
[data-theme='dark'] .slot.filled { background: color-mix(in oklab, var(--surface) 52%, var(--pc)); color: #fff; }
[data-theme='paper'] .slot:not(.filled) { background: none; box-shadow: inset 0 0 0 1px var(--line); }
.throws { flex: none; margin-left: auto; padding-left: 4px; display: flex; align-items: center; gap: 2px; }
.throws span { min-width: 54px; text-align: center; line-height: 1.15; }
.throws b { display: block; font-size: 15px; font-weight: 600; }
.throws em { display: block; font-style: normal; font-size: 12px; color: var(--mute); }
.throws button { position: relative; width: 36px; height: 40px; border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 20px; font-weight: 600; }
.throws button::after { content: ''; position: absolute; inset: -6px -2px; }
.throws button:disabled { opacity: .35; }
[data-theme='paper'] .throws button { box-shadow: inset 0 0 0 1.5px var(--ink); border-radius: 4px; }
/* Too narrow for six dice, the throws and the row switch on one line: the throws go below. */
@media (max-width: 459px) {
  .slots.six:has(.throws) { flex-wrap: wrap; }
  .slots.six .throws { flex: 1 0 100%; order: 1; margin-left: 0; padding-left: 0; }
  .slots.six .throws span { flex: 1; }
  .slots.six .throws ~ .show-rows { margin-left: auto; }
}

.pad { display: flex; gap: 8px; padding: 0 14px 6px; }
.pad button { flex: 1; height: 50px; border-radius: 12px; background: var(--pc, var(--ink)); color: #fff; display: grid; place-items: center; }
.sheet .pad, .sheet .slots { padding-inline: 0; background: none; }
.sheet .slot.filled, [data-theme='dark'] .sheet .slot.filled { background: var(--key); color: var(--ink); }
.sheet .slot { flex-basis: 48px; height: 48px; }
.sheet .pad button { background: var(--ink); color: var(--surface); }

.foot { display: flex; gap: 10px; padding: 8px 14px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); }
.foot .strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.foot.wrap { flex-wrap: wrap; }
.foot.wrap .btn { flex: 1 1 40%; }
.foot.wrap .strong { flex-basis: 100%; }
.pending { padding: 6px 16px; font-size: 14px; background: var(--used); color: var(--ink); text-align: center; }

/* ---- standings ---- */
.bar { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; }
.bar h1 { font-size: 22px; }
.bar p { font-size: 13px; color: var(--mute); margin-top: 1px; }
.overview { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.table { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom); }
.table table { width: 100%; min-height: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.table thead td, .table thead th { position: sticky; top: 0; z-index: 2; background: var(--bg); }
.table thead th {
  min-width: 44px;
  max-width: 110px;
  padding: 7px 4px;
  border-left: 3px solid var(--bg);
  border-radius: 15px 12px 0 0;
  background: var(--c) padding-box;
  color: #fff;
  font-size: 18px;
  line-height: 1.15;
  white-space: nowrap;
}
.table thead th small { display: block; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.table tbody th, .table tfoot th, .table thead td { position: sticky; left: 0; z-index: 1; width: 34%; min-width: 116px; }
.table thead td { z-index: 3; }
.table tbody th, .table tfoot th { padding: 3px 6px 3px 14px; text-align: left; font-weight: 500; white-space: nowrap; background: var(--surface); border-bottom: 1px solid var(--line); }
.table.few table { table-layout: fixed; }
.table.few tbody td, .table.few thead th { min-width: 0; }
.table .label { display: flex; align-items: center; gap: 9px; }
.table .label svg { color: var(--mute); }
.table tbody td { min-width: 44px; padding: 0; text-align: center; font-size: 16px; font-weight: 500; background: var(--surface); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.table tbody td.struck { color: var(--mute); }
.table tbody td button { width: 100%; height: 100%; min-height: 27px; }
.table tbody td.current:not(.gold) { background: color-mix(in oklab, var(--surface) 88%, var(--c)); }
[data-theme='dark'] .table tbody td.current:not(.gold) { background: color-mix(in oklab, var(--surface) 66%, var(--c)); }
.table tbody td.gold { background: var(--gold); color: var(--gold-ink); font-weight: 700; }
.table tr.sum th, .table tr.sum td { background: var(--bg); color: var(--mute); border-left-color: var(--bg); border-bottom-color: var(--bg); }
.table tr.sum th { font-weight: 400; }
.table tr.sum td { font-size: 15px; font-weight: 600; color: var(--ink); }
.table tr.sum td.current { background: color-mix(in oklab, var(--bg) 88%, var(--c)); }
[data-theme='dark'] .table tr.sum td.current { background: color-mix(in oklab, var(--bg) 66%, var(--c)); }
/* The same green as the bonus line on the player's own page. */
.table tr.sum td.bonus, [data-theme] .table tr.sum td.bonus { background: var(--go); color: #fff; font-weight: 700; }
/* The last move. */
.table tbody td.last { --ring: var(--c); box-shadow: inset 0 0 0 3px var(--ring); font-weight: 700; }
[data-theme='dark'] .table tbody td.last { --ring: color-mix(in oklab, var(--c) 55%, #ffffff); }
.table tfoot th, .table tfoot td { position: sticky; bottom: 0; background: var(--bg); padding-block: 9px; font-size: 19px; font-weight: 700; text-align: center; border-top: 2px solid var(--ink); border-left: 0; }
.table tfoot th { text-align: left; z-index: 2; border-bottom: 0; }
.lead-total { display: inline-block; min-width: 40px; padding: 2px 7px; border-radius: 10px; background: var(--c); color: #fff; }
[data-theme='paper'] .table tbody td, [data-theme='paper'] .table tbody th { border-right: 1px solid var(--line); border-left: 0; }
[data-theme='paper'] .table tr.sum :is(th, td) { border-color: var(--line); }
[data-theme='paper'] .table tbody td, [data-theme='paper'] .table tfoot td { font-family: var(--hand); color: var(--pencil); font-size: 17px; }
[data-theme='paper'] .table tbody td.gold { color: var(--gold-ink); }
[data-theme='paper'] .table thead th { background: var(--bg); color: var(--c); font-family: var(--hand); font-size: 22px; border-left: 0; border-bottom: 4px solid var(--c); border-radius: 0; }
[data-theme='paper'] .table thead th.current { background: #fff3bd; }
[data-theme='paper'] .table thead th small { font-family: Rubik, sans-serif; }
[data-theme='paper'] .lead-total { background: none; color: var(--c); box-shadow: inset 0 -4px var(--c); border-radius: 0; }

/* ---- result ---- */
.podium { flex: 1; min-height: 0; overflow-y: auto; padding: calc(16px + env(safe-area-inset-top)) 16px 20px; }
.podium > * { max-width: 620px; margin: 0 auto; }
/* Room for two lines, so that the list stays where it is when the headline changes. */
.podium h1 { position: relative; display: flex; align-items: flex-end; min-height: 2.4em; font-size: 34px; line-height: 1.2; margin-bottom: 22px; overflow-wrap: anywhere; }
.podium h1[data-before]::before { content: attr(data-before); position: absolute; left: 0; bottom: 0; opacity: 0; animation: until var(--in) step-end; }
.podium ol { display: grid; gap: 9px; }
.podium li { position: relative; display: grid; min-height: 56px; border-radius: var(--radius); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--mute) 35%, transparent); }
.podium li.first { min-height: 76px; }
.podium li::before { content: attr(data-place); position: absolute; top: 0; bottom: 0; left: 14px; display: flex; align-items: center; color: var(--mute); font-size: 20px; font-weight: 700; opacity: .75; }
.podium li > div { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: inherit; background: var(--surface); }
.podium li b { font-size: 20px; min-width: 22px; }
.podium li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.podium li em { font-style: normal; font-weight: 700; white-space: nowrap; }
.podium li.first > div { background: var(--c); color: #fff; font-size: 19px; padding-block: 18px; }
.podium li.first .tile { background: rgb(255 255 255 / .22); }
[data-theme='paper'] .podium li:not(.first) > div { box-shadow: inset 0 0 0 1.5px var(--ink); }
.podium ol.more { cursor: pointer; }
@media (max-width: 350px) {
  .podium h1 { font-size: 28px; }
  .podium li > div { gap: 9px; padding-inline: 11px; }
  .podium li.first > div { font-size: 16px; }
  .podium li::before { left: 11px; }
}
/* A revealed player drops in from above. What tells who won waits until everybody has landed. */
.podium .card-in { z-index: 1; animation: drop-in .6s var(--in) cubic-bezier(.3, 1.25, .5, 1) backwards; }
.late { animation: late .35s var(--in) backwards; }
@keyframes drop-in { from { transform: translateY(-75vh); opacity: 0; } 40% { opacity: 1; } }
@keyframes until { from { opacity: 1; } }
@keyframes late { from { opacity: 0; visibility: hidden; } }
.confetti { position: fixed; inset: 0; z-index: 5; overflow: hidden; pointer-events: none; }
.confetti i {
  position: absolute;
  top: -20px;
  left: var(--x);
  width: 9px;
  height: 14px;
  border-radius: 2px;
  background: var(--c);
  opacity: 0;
  animation: confetti var(--time) calc(var(--in) + var(--wait)) linear;
}
@keyframes confetti {
  from { opacity: 1; transform: none; }
  80% { opacity: 1; }
  to { opacity: 0; transform: translate(var(--drift), 105vh) rotate3d(1, .6, .8, var(--turn)); }
}

/* ---- tablets: the turn and the standings side by side ---- */
@media (min-width: 900px) and (min-height: 501px) and (orientation: landscape) {
  .match:not(.watching):not(.result) { flex-direction: row; }
  .match > .turn, .match.show-overview > .turn { display: flex; flex: 1 1 46%; }
  .match > .side, .match.show-overview > .side { display: flex; flex-direction: column; flex: 1 1 54%; min-width: 0; min-height: 0; border-left: 4px solid var(--bg); }
  .match:not(.result) > .side .bar .round, .turn .head .all { display: none; }
}
@media (min-width: 620px) and (orientation: portrait) {
  .row .name { font-size: 18px; }
  .row .value { font-size: 21px; }
  .row.open .name { font-size: 19px; }
  .row.open .value, .row.chosen .value { font-size: 25px; line-height: 32px; }
  .table table { font-size: 18px; }
}

/* ---- with all rows or only the open ones ---- */
/* A switch at the end of the dice line; filled while only the open rows show. */
.show-rows { flex: none; width: 40px; height: 40px; margin-left: auto; border-radius: 10px; display: grid; place-items: center; color: var(--mute); }
.throws ~ .show-rows { margin-left: 2px; }
.show-rows[aria-pressed='true'] { background: color-mix(in oklab, var(--surface) 80%, var(--pc)); color: var(--pc); }
[data-theme='dark'] .show-rows[aria-pressed='true'] { background: color-mix(in oklab, var(--surface) 52%, var(--pc)); color: #fff; }
[data-theme='paper'] .show-rows[aria-pressed='true'] { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); border-radius: 4px; }

/* ---- how the match went, with the phone lying down ---- */
.chart { flex: 1; min-height: 0; display: flex; gap: 14px; padding: 6px 12px calc(8px + env(safe-area-inset-bottom)) 4px; }
.chart .graph { flex: 1; min-width: 0; display: grid; grid-template: minmax(0, 1fr) auto auto / auto minmax(0, 1fr); }
.chart .ys { grid-area: 1 / 1; position: relative; width: 38px; }
.chart .ys span { position: absolute; right: 7px; top: var(--y); transform: translateY(-50%); font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
.chart .area { grid-area: 1 / 2; position: relative; margin: 8px 6px 0 0; }
.chart .plot { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .grid { stroke: var(--used); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--c); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart .bar { fill: var(--c); }
.chart .dot { position: absolute; left: var(--x); top: var(--y); width: 11px; height: 11px; margin: -5.5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--bg); }
.chart .area .hint { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; }
.chart .xs { grid-area: 2 / 2; position: relative; height: 20px; margin-right: 6px; }
.chart .xs span { position: absolute; top: 4px; left: var(--x); transform: translateX(-50%); font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
.chart .axis { grid-area: 3 / 2; font-size: 12px; color: var(--mute); text-align: center; }
.chart-side { flex: none; width: clamp(175px, 30%, 250px); min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.chart-side .seg.track button { min-height: 36px; padding: 2px 3px; font-size: 14px; white-space: nowrap; }
@media (max-width: 700px) { .chart-side .seg.track button { font-size: 12.5px; } }
.legend { min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 4px; }
.legend li { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 3px 10px; border-radius: 10px; background: var(--surface); font-size: 15px; }
.legend .chip { flex: none; width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.legend span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend b { font-variant-numeric: tabular-nums; }
.detail .chart { flex: none; height: max(200px, calc(100dvh - 205px - var(--bar-room))); padding: 0; }

/* ---- the focus of the round, with the phone lying down during the own turn ---- */
.focus { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* Lying down the bar cannot reach the rounded screen edges, so it is a rounded card with the name in the middle. */
.focus .head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(0, 1fr); margin: calc(8px + env(safe-area-inset-top)) 12px 0; padding: 8px 16px; border-radius: 16px; }
.focus .head .who { grid-column: 2; text-align: center; }
.focus .head .total { grid-column: 3; justify-self: end; }
.focus .head h1 { font-size: 21px; }
[data-theme='paper'] .focus .head { border-radius: 0; }
.focus .cards { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; gap: 10px; padding: 10px 12px 0; }
.focus .card { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 11px 13px; }
.focus .card h2 { width: 100%; display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 15px; font-weight: 600; }
.focus .card h2 .dice { display: flex; gap: 3px; margin-left: auto; color: var(--ink); }
.focus .col { display: grid; gap: 10px; }
.focus .card .big { font-size: 31px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.focus .card p { font-size: 16px; }
.focus .card .hint { font-size: 15px; }
.focus ol { width: 100%; display: grid; gap: 6px; }
.focus li { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 3px 12px; border-radius: 10px; background: var(--bg); font-size: 17px; font-weight: 500; }
.focus li > span:first-child { flex: 1; min-width: 0; }
.focus li b { min-width: 34px; font-size: 20px; text-align: right; font-variant-numeric: tabular-nums; }
.focus .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.focus .chips li { min-height: 31px; padding: 3px 11px; border-radius: 17px; font-size: 16px; }
.focus .chips li b { min-width: 0; font-size: 16px; }
.focus li.chosen { box-shadow: inset 0 0 0 2px var(--pc); }
.focus .turn-back { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); color: var(--mute); font-size: 14px; }
@media (max-height: 340px) {
  .focus .head { margin-top: 6px; padding-block: 5px; }
  .focus .cards { gap: 8px; padding-top: 8px; }
  .focus .card .big { font-size: 26px; }
  .focus .chips li { min-height: 28px; font-size: 14.5px; }
  .focus .turn-back { padding-top: 5px; }
}

/* ---- a phone lying down: overviews only (the graph and the focus of the round are below); the result keeps its buttons to the right ---- */
@media (orientation: landscape) and (min-width: 480px) and (max-height: 500px) {
  .foot { gap: 8px; padding: 8px 12px calc(9px + env(safe-area-inset-bottom)); }
  .foot .btn { min-height: 46px; padding: 5px 12px; font-size: 16px; }

  /* As in the focus view: a rounded card clear of the screen edges, with the text in the middle. */
  .watching .head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(0, 1fr); margin: 8px 12px 0; padding: 6px 8px; border-radius: 16px; }
  .watching .head .menu { justify-self: start; }
  .watching .head .who { text-align: center; }
  .watching .head .all { justify-self: end; }
  .watching .head h1 { font-size: 19px; }
  [data-theme='paper'] .watching .head { border-radius: 0; }

  .bar { padding: 6px 12px 4px; }
  .bar .round { width: 40px; height: 40px; }
  .bar h1 { font-size: 19px; }

  .match.result:has(> .podium) { display: grid; grid-template: minmax(0, 1fr) auto / minmax(0, 1fr) clamp(190px, 33%, 270px); }
  .match.result > .podium { grid-row: 1 / 3; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
  .podium h1 { min-height: 1.2em; font-size: 27px; margin-bottom: 12px; }
  .podium ol { gap: 7px; }
  .podium li { min-height: 48px; }
  .podium li > div { padding-block: 7px; }
  .podium li.first { min-height: 60px; }
  .podium li.first > div { padding-block: 11px; }
  .match.result > .pending { grid-area: 1 / 2; align-self: start; }
  .match.result > .foot { grid-area: 2 / 2; flex-direction: column; background: none; }
  .match.result > .foot .btn { flex: none; width: 100%; }
}

[data-theme='dark'] .slot:not(.filled), [data-theme='dark'] .btn:not(.primary, .strong, .danger) { background: #34495a; }
