:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
  --felt: #0e2a1f;
  --felt-2: #143627;
  --felt-3: #1b4432;
  --rail: #3a2a1c;
  --ivory: #f3ecda;
  --ivory-dim: #bfb7a3;
  --ivory-mute: #8a8472;
  --red: #c8393b;
  --blue: #2e63b0;
  --black: #1c1c1e;
  --purple: #7b4fa6;
  --amber: #e3a93a;
  --line: rgba(243, 236, 218, 0.14);
  --display:
    'Barlow Condensed', 'Avenir Next Condensed', 'Roboto Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Barlow', 'Avenir Next', -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
:root:not([data-theme='light']) {
  color-scheme: dark;
}
:root[data-theme='dark'] {
  color-scheme: dark;
}
html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
  height: 100%;
}
* {
  box-sizing: inherit;
}
body {
  margin: 0;
  height: 100%;
  background: var(--felt);
  color: var(--ivory);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--felt);
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.05;
}
h2 {
  font-size: 22px;
  line-height: 1.1;
  margin-bottom: 10px;
}
h3 {
  font-size: 18px;
  color: var(--ivory-dim);
}
p {
  margin: 0 0 10px;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
input,
select,
textarea {
  font: inherit;
  color: var(--ivory);
  background: var(--felt-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  width: 100%;
  min-height: 42px;
}
input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}
input[type='number'] {
  -moz-appearance: textfield;
}
input[type='checkbox'] {
  width: 22px;
  height: 22px;
  min-height: 0;
  accent-color: var(--amber);
  margin: 0;
}
select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ivory-dim) 50%),
    linear-gradient(135deg, var(--ivory-dim) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
textarea {
  min-height: 150px;
  resize: vertical;
}

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 16px 48px;
}
.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.topbar .sub {
  color: var(--ivory-dim);
  font-size: 14px;
}
section.view {
  display: none;
}
section.view.active {
  display: block;
}
.block {
  padding: 14px 0 18px;
  border-top: 1px solid var(--line);
}
.block:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.field {
  display: grid;
  grid-template-columns: 1fr 130px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.field label {
  font-size: 15px;
}
.field small {
  display: block;
  color: var(--ivory-mute);
  font-size: 13px;
}
.field.wide {
  grid-template-columns: 1fr;
}
.field.check {
  grid-template-columns: 1fr 32px;
}
.seg {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.seg button {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 9px 6px;
  color: var(--ivory-dim);
}
.seg button.on {
  background: var(--felt-3);
  color: var(--ivory);
  font-weight: 600;
}
.btn {
  background: var(--felt-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 600;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.02em;
  min-height: 46px;
}
.btn.primary {
  background: var(--amber);
  color: #2a1e08;
  border-color: transparent;
}
.btn.danger {
  background: var(--red);
  border-color: transparent;
}
.btn.quiet {
  background: transparent;
}
.btn.small {
  font-size: 15px;
  padding: 7px 10px;
  min-height: 36px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.row.end {
  justify-content: flex-end;
}
.stack {
  display: grid;
  gap: 10px;
}
.note {
  color: var(--ivory-dim);
  font-size: 14px;
}
.warn {
  color: var(--amber);
}
.hint {
  background: var(--felt-2);
  border-left: 3px solid var(--amber);
  padding: 10px 12px;
  border-radius: 0 6px 6px 0;
  margin: 10px 0;
  font-size: 15px;
}
.hint.calm {
  border-left-color: var(--blue);
}
.empty {
  color: var(--ivory-dim);
  padding: 24px 0;
  text-align: center;
}

/* chips */
.chipset {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  gap: 6px;
  margin: 8px 0 4px;
}
.chiprow {
  display: grid;
  grid-template-columns: 38px minmax(60px, 1fr) 66px 74px auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}
.chiprow input[type='color'] {
  width: 38px;
  height: 38px;
  min-height: 0;
  padding: 2px;
  border-radius: 50%;
  cursor: pointer;
}
.chiprow input {
  padding: 6px 8px;
  min-height: 38px;
}
.chiprow .sugg {
  font-family: var(--display);
  font-size: 18px;
  color: var(--amber);
  text-align: right;
  padding-right: 4px;
}
.chiprow .acts {
  display: flex;
  gap: 4px;
}
.chiprow .acts button {
  min-width: 32px;
  padding: 4px 6px;
  min-height: 34px;
  font-size: 15px;
}
.chiphead {
  display: grid;
  grid-template-columns: 38px minmax(60px, 1fr) 66px 74px auto;
  gap: 6px;
  font-size: 12px;
  color: var(--ivory-dim);
  margin: 10px 0 4px;
}
@media (max-width: 440px) {
  .chiprow,
  .chiphead {
    grid-template-columns: 34px minmax(56px, 1fr) 72px 70px;
  }
  .chiprow .acts {
    grid-column: 2 / -1;
    justify-content: flex-end;
  }
  .chiphead span:last-child {
    display: none;
  }
}
.chip {
  text-align: center;
}
.chip .coin {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  margin: 0 auto 6px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  border: 5px dashed rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, 0.18),
    0 2px 0 rgba(0, 0, 0, 0.4);
}
.chip .coin.c-red {
  background: var(--red);
}
.chip .coin.c-blue {
  background: var(--blue);
}
.chip .coin.c-black {
  background: var(--black);
}
.chip .coin.c-purple {
  background: var(--purple);
}
.chip .coin.c-yellow {
  background: #e8c547;
  color: #2a1e08;
  border-color: rgba(70, 50, 0, 0.5);
}
.chip .count {
  font-family: var(--display);
  font-size: 20px;
}
.chip .lbl {
  font-size: 13px;
  color: var(--ivory-dim);
}
.chip input {
  text-align: center;
  padding: 6px;
  min-height: 36px;
  margin-top: 4px;
}

/* level table */
table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ivory-dim);
  font-size: 15px;
}
td.num,
th.num {
  text-align: right;
}
tr.current td {
  background: var(--felt-3);
}
tr.break td {
  color: var(--ivory-dim);
  font-style: italic;
  background: rgba(0, 0, 0, 0.12);
}
tr.done td {
  color: var(--ivory-mute);
}
.lvl-edit input {
  padding: 5px 6px;
  min-height: 34px;
  text-align: right;
  width: 72px;
}
.lvl-edit input.min {
  width: 56px;
}
.tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--felt-3);
  color: var(--ivory-dim);
  margin-left: 6px;
  white-space: nowrap;
}
.tag.up {
  background: var(--purple);
  color: #fff;
}
.tscroll {
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px;
}

/* clock summary */
.clock-card {
  text-align: center;
  padding: 10px 0 6px;
}
.clock-card .time {
  font-family: var(--display);
  font-weight: 700;
  font-size: 104px;
  line-height: 0.95;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.clock-card .time.warn {
  color: var(--amber);
}
.clock-card .blinds {
  font-family: var(--display);
  font-weight: 600;
  font-size: 44px;
  line-height: 1;
  margin-top: 6px;
}
.clock-card .lvl {
  color: var(--ivory-dim);
  font-size: 16px;
  margin-top: 6px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}
.stat {
  background: var(--felt-2);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}
.stat .v {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
}
.stat .k {
  font-size: 12px;
  color: var(--ivory-dim);
  margin-top: 4px;
}
.clock-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* players */
.player {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.player .name {
  font-weight: 500;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.namebtn {
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  font-weight: 500;
  font-size: 17px;
}
.player.out .namebtn {
  color: var(--ivory-mute);
  text-decoration: line-through;
}
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.stepper b {
  min-width: 22px;
  text-align: center;
  font-family: var(--display);
  font-size: 20px;
}
.stepper .btn {
  min-width: 40px;
}
.seat {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--felt-3);
  border: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ivory-dim);
  flex: none;
}
.player .meta {
  color: var(--ivory-dim);
  font-size: 13px;
}
.player.out .name {
  color: var(--ivory-mute);
  text-decoration: line-through;
}
.player .acts {
  display: flex;
  gap: 6px;
}
.player .acts button {
  min-width: 40px;
}
.tablehead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 14px 0 2px;
}
.tablehead h3 {
  color: var(--ivory);
}
.pill {
  background: var(--felt-3);
  border-radius: 10px;
  padding: 2px 9px;
  font-size: 13px;
  color: var(--ivory-dim);
}

/* payouts */
.payrow {
  display: grid;
  grid-template-columns: 64px 1fr 90px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.payrow .amt {
  font-family: var(--display);
  font-size: 22px;
  text-align: right;
}
.choprow {
  display: grid;
  grid-template-columns: 1fr 110px 90px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.choprow .amt {
  font-family: var(--display);
  font-size: 22px;
  text-align: right;
  color: var(--amber);
}
.bountyrow {
  display: grid;
  grid-template-columns: 1fr 110px 80px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.settlerow {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.bountyrow .amt,
.settlerow .amt {
  font-family: var(--display);
  font-size: 22px;
  text-align: right;
}

/* tabs */
nav.tabs {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  margin: 0 -16px 14px;
  background: var(--felt);
  border-bottom: 1px solid var(--line);
  display: flex;
  z-index: 20;
}
nav.tabs button {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 11px 2px 9px;
  color: var(--ivory-dim);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  min-height: 44px;
}
nav.tabs button.on {
  color: var(--amber);
  box-shadow: inset 0 -3px 0 var(--amber);
}

/* display mode */
#display {
  position: fixed;
  inset: 0;
  background: var(--felt);
  z-index: 100;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: env(safe-area-inset-top, 0px) 16px env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  overflow: hidden;
}
#display.on {
  display: flex;
}
/* sizes are fitted to whichever dimension is tighter, so the whole clock fits in portrait or landscape */
#display .d-level {
  font-family: var(--display);
  font-size: min(5vw, 5vh);
  color: var(--ivory-dim);
}
#display .d-time {
  font-family: var(--display);
  font-weight: 700;
  font-size: min(36vw, 40vh);
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
#display .d-time.warn {
  color: var(--amber);
}
#display .d-time.paused {
  color: var(--ivory-mute);
}
#display .d-blinds {
  font-family: var(--display);
  font-weight: 600;
  font-size: min(14vw, 15vh);
  line-height: 1;
  margin-top: 0.5vh;
}
#display .d-next {
  color: var(--ivory-dim);
  font-family: var(--display);
  font-size: min(5.5vw, 6vh);
  margin-top: 0.5vh;
}
#display .d-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 900px;
  margin-top: 3vh;
}
#display .d-stats .v {
  font-family: var(--display);
  font-weight: 600;
  font-size: min(8vw, 8vh);
  line-height: 1;
}
#display .d-stats .k {
  color: var(--ivory-dim);
  font-size: min(3vw, 3vh);
  margin-top: 2px;
}
#display .d-ctl {
  position: absolute;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
}
#display .d-ctl .btn {
  opacity: 0.75;
}
/* chip legend in display mode: a row under the blinds in portrait, a column beside the clock in landscape */
#display .d-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2vh 3vw;
  margin-top: 2vh;
}
#display .d-legend:empty {
  display: none;
}
.lg {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--display);
}
.lg-chip {
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  background: var(--chip);
  border: 0.17em dashed rgba(255, 255, 255, 0.85);
  box-shadow:
    0 0 0 0.07em rgba(255, 255, 255, 0.35),
    inset 0 0 0 0.22em var(--chip);
  flex: none;
}
.lg-v {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.lg-n {
  color: var(--ivory-dim);
  font-size: 0.6em;
}
.lg.up {
  opacity: 0.55;
}
.lg.up .lg-v {
  text-decoration: line-through;
}
.lg.up .lg-n {
  color: var(--amber);
  opacity: 1;
}
#display .lg {
  font-size: min(5vw, 3.6vh);
}
.hist {
  border-top: 1px solid var(--line);
  padding: 8px 0;
}
.hist.open {
  padding-bottom: 12px;
}
.hist-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 4px 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
/* payout board: a row under the blinds in portrait, the left-hand column in landscape (the chip legend has the right) */
#display .d-payouts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6vh 3vw;
  margin-top: 1.5vh;
  font-family: var(--display);
  font-size: min(4.4vw, 3.2vh);
}
#display .d-payouts:empty {
  display: none;
}
.pb-head {
  width: 100%;
  color: var(--ivory-dim);
  font-size: 0.75em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pb {
  display: flex;
  align-items: baseline;
  gap: 0.45em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pb-place {
  color: var(--ivory-dim);
  min-width: 2.6em;
}
.pb-amt {
  font-weight: 700;
}
.pb-name {
  color: var(--ivory-dim);
  font-size: 0.75em;
}
.pb.done {
  opacity: 0.5;
}
.pb.done .pb-amt {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.pb.pb-next .pb-place,
.pb.pb-next .pb-amt,
.pb.pb-next .pb-name {
  color: var(--amber);
  opacity: 1;
}
/* PKO in display mode: the biggest bounty amounts and who holds each, a row under the blinds */
#display .d-bounties {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.5vh 3vw;
  margin-top: 1vh;
  max-width: 100%;
  font-family: var(--display);
  font-size: min(4.2vw, 3.6vh);
}
#display .d-bounties:empty {
  display: none;
}
.bt-head {
  color: var(--ivory-dim);
  font-size: 0.7em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.bt {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bt-amt {
  font-weight: 700;
  color: var(--amber);
}
.bt-name {
  color: var(--ivory-dim);
  font-size: 0.85em;
}
/* a rotating name and its "2 of 5": kept together, with room for the longest name so the line doesn't shift */
.bt-rot {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
}
.bt-name.rot {
  animation: bt-fade 0.6s ease-out;
}
.bt-of {
  color: var(--ivory-dim);
  font-size: 0.55em;
  opacity: 0.8;
}
@keyframes bt-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bt-name.rot {
    animation: none;
  }
}
@media (orientation: landscape) {
  #display .d-legend {
    position: absolute;
    right: 3vw;
    top: 46%;
    transform: translateY(-50%);
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    gap: 1.6vh;
  }
  #display .lg {
    font-size: min(2.6vw, 5.2vh);
  } /* sized by width too, so on a 4:3 tablet the legend stays inside its column, clear of the clock */
  #display.has-legend {
    padding-right: 20vw;
    box-sizing: border-box;
  } /* the legend gets its own column; the clock centers in the rest */
  #display .d-payouts {
    position: absolute;
    left: 2.5vw;
    top: 46%;
    transform: translateY(-50%);
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    gap: 1vh;
    font-size: min(2.8vw, 4.4vh);
    width: 19vw;
  }
  #display.has-payouts {
    padding-left: 21vw;
    padding-right: 20vw;
    box-sizing: border-box;
  }
  #display .d-time {
    font-size: min(34vw, 38vh);
  }
  /* bounties sit in the middle column, between the payouts and the chip legend, sized to the width that's left */
  #display .d-bounties {
    font-size: min(2.4vw, 3.6vh);
    gap: 0.4vh 2vw;
  }
  #display.has-payouts .d-bounties,
  #display.has-legend .d-bounties {
    font-size: min(2vw, 3.4vh);
  }
  /* the bounty line takes a row: the clock digits give up a little height for it */
  #display.has-bounties .d-time {
    font-size: min(32vw, 35vh);
  }

  /* a bounty line that needs two rows takes its room from the clock digits, so nothing leaves the screen */
  #display.bounties-wrap .d-time {
    font-size: min(30vw, 33vh);
  }
  /* from the final table, the payouts and the chip legend take both sides, leaving the middle about 59% of the width:
     the clock and the stats are sized to fit it (on a 4:3 tablet they would otherwise run under the side columns) */
  #display.has-payouts .d-time {
    font-size: min(21vw, 30vh);
  }
  #display.has-payouts .d-stats {
    gap: 8px;
  }
  #display.has-payouts .d-stats .v {
    font-size: min(3.6vw, 7vh);
    white-space: nowrap;
  }
  #display.has-payouts .d-stats .k {
    font-size: min(1.8vw, 3vh);
  }
  #display .d-stats {
    margin-top: 1.5vh;
    max-width: 1100px;
  }
  #display .d-ctl {
    justify-content: flex-end;
    right: 16px;
    left: auto;
  }
  #display .d-ctl .btn {
    padding: 6px 12px;
    min-height: 34px;
    font-size: 15px;
  }
}
/* a short landscape phone (an iPhone SE): the bounty line needs a little more of the height, clear of the buttons */
@media (orientation: landscape) and (max-height: 400px) {
  #display.has-bounties:not(.has-payouts) .d-time {
    font-size: min(30vw, 31vh);
  }
  #display.has-bounties .d-stats {
    margin-top: 0.8vh;
  }
}
.sr {
  position: absolute;
  left: -9999px;
}
@media (prefers-reduced-motion: no-preference) {
  .clock-card .time.warn,
  #display .d-time.warn {
    animation: pulse 1s ease-in-out infinite;
  }
}
@keyframes pulse {
  50% {
    opacity: 0.55;
  }
}
/* QR codes */
#qrBox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 160;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#qrBox.on {
  display: flex;
}
#qrBox .box {
  background: var(--felt-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  max-width: 380px;
  width: 100%;
  text-align: center;
}
#qrImg {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  display: inline-block;
  margin: 6px 0 8px;
}
#qrImg svg {
  display: block;
  width: min(280px, 70vw);
  height: auto;
}
#qrLink {
  font-size: 12px;
  color: var(--ivory-mute);
  word-break: break-all;
  margin: 4px 0 10px;
}
/* another phone has taken over */
#replaced {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#replaced.on {
  display: flex;
}
#replaced .box {
  background: var(--felt-2);
  border: 1px solid var(--red);
  border-radius: 10px;
  padding: 18px;
  max-width: 380px;
  width: 100%;
}
#replaced p {
  color: var(--ivory-dim);
}
/* in-app dialog */
#modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#otherTab {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#otherTab.on {
  display: flex;
}
#otherTab .box {
  background: var(--felt-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  max-width: 360px;
  width: 100%;
}
#otherTab .msg {
  font-size: 17px;
  margin-bottom: 16px;
}
#otherTab .row {
  justify-content: flex-end;
}
#modal.on {
  display: flex;
}
#modal .box {
  background: var(--felt-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  max-width: 360px;
  width: 100%;
}
#modal .msg {
  font-size: 17px;
  margin-bottom: 16px;
}
#modal .row {
  justify-content: flex-end;
}
