.panel[data-screen="online-desk"] { width: min(100%, 30rem); padding: 0; }
.panel[data-screen="online-desk"] > .strip { display: none; }
main:has(.panel[data-screen="online-desk"]) {
  padding-block: clamp(1.5rem, 4svh, 3.5rem);
}

#online-desk {
  padding: 1rem clamp(1.25rem, 3vw, 2rem) 1.2rem;
}

.desk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .15rem .7rem;
  padding-bottom: .55rem;
  border-bottom: 2px solid #627164;
}

#online-desk h1 { margin: 0; color: #273936; font-size: clamp(1.55rem, 3vw, 2.15rem); }
#online-desk h1:focus, #online-desk h2:focus { outline: none; }
#online-desk h2 { margin: 0; color: #273936; font-size: 1.15rem; }
#online-desk p { margin: 0; max-width: none; line-height: 1.4; font-size: .925rem; }
.desk-metrics {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: .15rem .9rem;
}
.desk-metrics:not(:has(p:not([hidden]))) { display: none; }
#online-desk .desk-metrics p {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: #415a4d;
  font-size: .8rem;
}
#desk-presence::before { content: ""; width: .45rem; height: .45rem; background: #497654; }
.desk-metrics strong { font-variant-numeric: tabular-nums; }
.desk-section { display: grid; gap: .58rem; padding-top: .8rem; min-width: 0; }
.desk-private-choice, .desk-join {
  border-top: 1px dashed #879080;
  margin-top: .8rem;
}
.desk-join { display: grid; gap: .45rem; padding-top: .7rem; }
#desk-private-form .desk-join { margin-top: .2rem; }
.desk-section label, .desk-section legend { font-weight: 700; }
.desk-section fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.desk-section legend { padding: 0 0 .45rem; }
.desk-formats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; }
.desk-formats label {
  display: flex; align-items: center; gap: .42rem;
  min-width: 0; min-height: 2.55rem; padding: .25rem .48rem;
  border: 1px solid #7e897a; background: #e8dfc3; color: #30483f;
  font-size: .925rem; cursor: pointer;
}
.desk-formats label:has(input:checked) { border-color: #8a592e; background: #dec092; color: #55341d; }
#online-desk input:is([type="radio"],[type="checkbox"]) {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: #7b4a29;
  color-scheme: light;
}
#online-desk input[type="text"] {
  min-height: 2.75rem; height: auto; border: 1px solid #738376;
  color-scheme: light; color: #293838; background: #f6eed7; font-size: 1rem;
}
#online-desk input::placeholder { color: #59675c; }
.desk-actions, .desk-invite { display: flex; align-items: center; gap: .45rem .6rem; flex-wrap: wrap; }
.desk-join .desk-actions { flex-wrap: nowrap; }
.desk-join input { min-width: 0; }
#online-desk .stone-button { justify-self: start; min-height: 2.75rem; }
#online-desk .stone-button:not(.desk-secondary) {
  background: #956137; color: #fff4d4;
  border-color: #ebbf80 #765035 #5c3929 #c19156;
}
#online-desk .stone-button:focus-visible, #online-desk :is(input,button):focus-visible {
  outline: 2px solid #744329; outline-offset: 2px;
}
.desk-back {
  display: inline-flex; align-items: center; width: fit-content; min-height: 2.5rem; padding: .25rem 0;
  border: 0; background: transparent; color: #344d45;
  font-size: .875rem; text-decoration: underline; text-underline-offset: .2em;
}
#desk-private-back { margin-top: .4rem; }
#desk-invite-code { color: #5b371d; font: 700 1.05rem var(--display); user-select: all; }
#desk-players { display: grid; gap: .25rem; padding: .22rem 0; margin: 0; list-style: none; }
#desk-players li { display: flex; align-items: center; gap: .46rem; min-width: 0; overflow-wrap: anywhere; }
#desk-players li::before {
  content: ""; width: .65rem; height: .65rem; background: var(--desk-seat,#97713d); flex: none;
  border: 1px solid #685140;
}
#desk-players [data-seat="2"] { --desk-seat:#5b8a79; }
#desk-players [data-seat="3"] { --desk-seat:#9678af; }
#desk-players [data-seat="4"] { --desk-seat:#c17d69; }
.desk-live { display: inline-flex; align-items: center; gap: .5rem; min-height: 2rem; cursor: pointer; }
#desk-status { color: #6b3d25; font-weight: 700; margin-top: .48rem !important; }
#desk-status:empty { display: none; }

@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  #mine[data-desk-journey] { --mine-play-framing: 1; height: 100svh; height: 100dvh; }
  main:has(.panel[data-screen="online-desk"]) {
    align-items: start;
    margin-top: max(.25rem, calc(38svh - 3.625rem));
    padding: .55rem max(.7rem, env(safe-area-inset-right)) 1rem max(.7rem, env(safe-area-inset-left));
  }
  .panel[data-screen="online-desk"] { width: min(100%, 32rem); margin: 0 auto; }
}
@media (max-width: 405px) {
  #online-desk { padding-inline: 1.18rem; }
}
@media (max-height: 520px) {
  main:has(.panel[data-screen="online-desk"]) { padding-top: 1rem; align-items: start; }
}
