.phone-connect {
  width: min(460px, calc(100% - 32px));
  margin: 16px auto;
}

.phone-connect input {
  letter-spacing: .14em;
}

.session-main-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: 1fr;
  flex-basis: 100%;
  gap: 8px;
}

.session-main-actions > :is(button, a) {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 12px 16px;
  background: #b8b62b;
  border-radius: 9px;
  color: #041b1b;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

#accountChoice:not([hidden]) {
  margin-bottom: 16px;
}

#accountChoice button[aria-pressed="false"] {
  background: #41494b;
  color: #fff;
}

#accountStatus.account-greeting {
  color: #d1ce35;
  font-size: clamp(1.625rem, 5vw, 2rem);
  font-weight: 700;
  text-align: center;
  overflow-wrap: anywhere;
}

.account-achievements summary {
  cursor: pointer;
  font-weight: 700;
  margin: 0 0 8px;
  color: #d1ce35;
  font-size: 1rem;
}

.account-achievements ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.account-achievements li + li {
  margin-top: 8px;
}

.account-achievements li,
.achievement-notification {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #426d6a;
  border-radius: 10px;
  background: #0b3433;
}

.achievement-icon {
  display: grid;
  flex: 0 0 44px;
  height: 44px;
  place-items: center;
  border-radius: 9px;
  background: #173c3b;
  font-size: 1.375rem;
}

.account-achievements p {
  margin: 4px 0 0;
  color: #b6d8d5;
  font-size: .875rem;
}

.achievement-notifications {
  position: fixed;
  z-index: 15;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100% - 32px));
  pointer-events: none;
}

.achievement-notification {
  border-color: #b8b62b;
  box-shadow: 0 8px 25px #0008;
}

.achievement-notification .achievement-unlocked {
  margin: 0 0 4px;
  color: #d1ce35;
  font-weight: 700;
}

@media (hover: hover) {
  #accountLogout:hover,
  #openDeleteProfile:hover {
    background: #d84b5b;
    color: #fff;
  }
}

.phone-only,
.phone .admin-only {
  display: none;
}

.phone .phone-only {
  display: flex;
}

.phone main {
  max-width: 620px;
  grid-template-columns: minmax(0, 1fr);
}

.phone .entry button {
  min-width: 44px;
  min-height: 44px;
}

#phoneLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

#phoneLinks figure {
  margin: 0;
}

#phoneLinks img {
  display: block;
  width: min(180px, 100%);
  image-rendering: pixelated;
}

#phoneLinks a {
  display: inline-block;
  margin-top: 5px;
  color: #b6d8d5;
  overflow-wrap: anywhere;
}

#activeCode {
  align-self: center;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: .09em;
}

.session-count {
  right: 16px;
  font-variant-numeric: tabular-nums;
}

.header-account:focus-visible {
  outline: 2px solid #e6e64d;
  outline-offset: 2px;
}

.header-account[hidden],
body:not(:has(#landing:not([hidden]), #phoneConnect:not([hidden]))) .header-account {
  display: none;
}

#joinRoles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 14px 0;
  border: 1px solid #427b78;
  border-radius: 9px;
}

#joinRoles label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 0;
}

#joinName, #joinPassword {
  letter-spacing: normal;
}

#controlPasswordForm {
  margin-top: 16px;
}

.participant-name {
  max-width: 620px;
  margin: 8px auto 0;
  padding: 0 16px;
  text-align: right;
  overflow-wrap: anywhere;
}

.participant-actions {
  justify-content: center;
  margin: 0 16px 24px;
}

header {
  position: relative;
}

.session-count,
.header-account {
  position: absolute;
  top: 16px;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #487974;
  border-radius: 10px;
  background: #0b2b2a;
  color: #e0eeeb;
  box-shadow: 0 4px 14px #0003;
  font-size: .875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.header-account {
  left: 16px;
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  padding: 10px 15px;
  border-color: #b8b62b;
  background: #b8b62b;
  color: #041b1b;
  font-size: .9375rem;
  text-decoration: none;
  transition: background-color .15s, border-color .15s;
}

@media (hover: hover) {
  .header-account:hover {
    border-color: #d1ce35;
    background: #d1ce35;
  }
}

.session-count::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #c8c75a;
  vertical-align: .08em;
}

@media (max-width: 1200px) {
  header:has(.session-count:not([hidden])),
  body:has(#phoneConnect:not([hidden])) header:has(.header-account:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding-top: 12px;
  }

  header > h1,
  header > .subtitle,
  header > p:not(.session-count) {
    grid-column: 1 / -1;
  }

  .header-account,
  .session-count {
    position: static;
    grid-row: 1;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .header-account {
    grid-column: 1;
    justify-self: start;
  }

  .session-count {
    grid-column: 2;
    justify-self: end;
  }
}

#add {
  display: grid;
  flex: none;
  place-items: center;
  text-align: center;
}

body:not(.phone) .session-owner-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(115px, calc((100% - 8px) / 2)), 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
}

.session-back-button {
  display: grid;
  box-sizing: border-box;
  place-items: center;
  padding: 10px 13px;
  border-radius: 9px;
  background: #b8b62b;
  color: #041b1b;
  font: 700 13.333px Arial, sans-serif;
  text-align: center;
  text-decoration: none;
}

.session-back-button:hover {
  filter: brightness(1.12);
}

.session-file-actions {
  display: grid;
  grid-column: span 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.entry-controls,
.entry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.entry-controls {
  justify-content: space-between;
}

.entry .score {
  width: max-content;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.start-points-row {
  flex-wrap: wrap;
}

#initialPoints,
#editPoints {
  flex: none;
  width: max(72px, calc(var(--point-characters, 1) * 1ch + 44px));
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}

.table .rank-name {
  overflow-wrap: anywhere;
}

.table .pts {
  width: 1%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
  .table :is(td, th) {
    padding-inline: 6px;
  }

  .table .rank {
    width: 38px;
  }

  .table .pts {
    font-size: 14px;
  }
}

#pointsDialog {
  width: min(360px, calc(100% - 32px));
  background: #062729;
  color: #f7f8f4;
}

#pointsDialog::backdrop {
  background: #0009;
}

#pointsEntryName {
  overflow-wrap: anywhere;
}

#pointsFeedback:empty {
  display: none;
}

#codeCountdown {
  font-variant-numeric: tabular-nums;
}

#codeCountdown:empty {
  display: none;
}

#tvJoin {
  position: fixed;
  right: clamp(12px, 2vw, 32px);
  bottom: clamp(12px, 2vw, 32px);
  z-index: 1;
  padding: 10px;
  border: 1px solid #487974;
  border-radius: 10px;
  background: #062729;
  color: #f7f8f4;
  text-align: center;
  font-weight: 700;
}

#tvJoin img {
  display: block;
  width: clamp(96px, 14vw, 180px);
  height: auto;
  margin: 0 auto 6px;
  image-rendering: pixelated;
}

.tv #tvview {
  padding-bottom: clamp(154px, 18vw, 246px);
}

#deleteProfileDialog {
  width: min(440px, calc(100% - 32px));
  color: var(--white);
}

#deleteProfileDialog::backdrop {
  background: #0009;
}

body {
  isolation: isolate;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(110deg, rgba(0, 12, 14, .24), rgba(0, 24, 26, .12)), url("shotbar-background.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

@media (max-aspect-ratio: 1/1) {
  body::before {
    background-position: 82% center;
  }
}

body.has-club-background::before {
  background-image: linear-gradient(110deg, rgba(0, 12, 14, .76), rgba(0, 48, 48, .5)), var(--club-background);
  background-position: center;
}

.club-background-form {
  margin-bottom: 18px;
}

.club-background-form h3 {
  margin: 0 0 8px;
  color: #d1ce35;
  font-size: 1rem;
}

.club-settings { margin: 14px 0; padding: 12px; }
.club-settings h3 { margin: 0 0 10px; }
.club-settings li + li { margin-top: 10px; }
.club-color { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
#shotbarTitle {
  color: #fff;
  font-size: clamp(2.25rem, 7vw, 4.75rem);
  text-transform: none;
}
.custom-session-title > :not(#customSessionTitle) { display: none; }
body.has-club-design,
body.has-club-design :is(h1 span,h2,h3,.subtitle,.status,.hint,.table th,.rank,.pts) {
  color: var(--club-text);
}
body.has-club-design button:not(.danger, .ghost, #endSession, [aria-pressed="false"]),
body.has-club-design .session-main-actions > a {
  background: var(--club-specific-button, var(--club-button));
  color: #041b1b;
}
body.has-club-design :is(#accountLogout,#openDeleteProfile):hover { background: #d84b5b; color: #fff; }

body.club-session-themed :is(#admin, #participantView, #pointsDialog) button:not(#endSession),
body.club-session-themed .session-back-button {
  background: var(--club-specific-button, var(--club-button));
  color: #041b1b;
}

#clubSessionEditor {
  width: min(820px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  color: var(--white);
}

#clubSessionEditor::backdrop {
  background: #0009;
}

#clubSessionPreview {
  padding: 12px;
  border: 1px solid #426d6a;
  border-radius: 10px;
  background: #032b29;
}

#clubSessionPreviewTitle {
  text-align: center;
  color: inherit;
  overflow-wrap: anywhere;
}

.club-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.club-preview-panel {
  padding: 12px;
  border: 1px solid #426d6a;
  border-radius: 9px;
  background: #0b3433;
}

.club-preview-panel h4 { margin: 10px 0; }
.club-preview-panel p span { float: right; }
.club-preview-panel .actions { margin-top: 8px; }

#clubSessionEditor #clubSessionPreview button[data-preview-button],
.club-preview-end {
  background: var(--preview-button-color, #d84b5b);
  color: #041b1b;
}

.club-preview-end {
  padding: 10px 13px;
  border-radius: 9px;
  font: 700 13px Arial, sans-serif;
  color: #fff;
}

#clubSessionPreview button[aria-pressed="true"] {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 620px) {
  .club-preview-grid { grid-template-columns: 1fr; }
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 460px);
  justify-content: center;
  align-items: start;
  gap: 16px;
  max-width: 1220px;
  margin: 16px auto;
  padding: 0 16px;
}

.account-layout:not(:has(#accountPage:not([hidden]))),
.account-left:not(:has(> section:not([hidden]))),
.account-left [hidden],
.account-admin[hidden] {
  display: none;
}

.account-layout > #accountPage,
.account-layout > .account-left,
.account-layout > .account-admin {
  width: 100%;
  margin: 0;
}

.account-left {
  display: grid;
  gap: 16px;
}

.account-left > section {
  min-width: 0;
  margin: 0;
}

@media (min-width: 1040px) {
  .account-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px) minmax(0, 1fr);
  }

  .account-layout > #accountPage {
    grid-area: 1 / 2;
  }

  .account-layout > .account-left {
    grid-area: 1 / 1;
    max-width: 340px;
    justify-self: end;
  }

  .account-layout > .account-admin {
    grid-area: 1 / 3;
    max-width: 340px;
    justify-self: start;
  }
}

#accountPage button:not(dialog *, #accountChoice *),
.account-design button:not(dialog *),
.account-memberships button,
.account-admin button {
  width: 100%;
  min-height: 46px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
}

.profile-score-row form.row {
  display: grid;
  gap: 8px;
}

.profile-scoreboard {
  list-style: none;
  margin: 0;
  padding: 0;
}

.profile-scoreboard > li {
  border: 1px solid #255a57;
  border-radius: 9px;
  background: #0b3433;
}

.profile-score-row > summary {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) .6rem;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  min-height: 46px;
  padding: 8px 12px;
}

.profile-score-row > summary::after {
  content: '';
  width: .4rem;
  height: .4rem;
  border-bottom: 2px solid #b6d8d5;
  border-right: 2px solid #b6d8d5;
  transform: rotate(45deg);
}

.profile-score-row[open] > summary::after {
  transform: rotate(225deg);
}

.profile-score-row > summary::-webkit-details-marker {
  display: none;
}

.profile-score-number {
  color: #d1ce35;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.profile-score-name {
  overflow-wrap: anywhere;
}

.profile-score-row form.row {
  margin: 0 12px 12px;
}

#clubMembershipStatus:empty {
  display: none;
}

.profile-score-row > summary:focus-visible {
  outline: 2px solid #e6e64d;
  outline-offset: 2px;
}

#bugDescription {
  resize: vertical;
  font-family: inherit;
}

#adminUsers .profile-score-row p {
  margin: 0 12px 8px;
  overflow-wrap: anywhere;
}

.admin-filters:not([hidden]) {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.admin-filters input,
.admin-filters select {
  width: 100%;
}

.admin-item-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.admin-item-list:empty,
.account-admin p[role="status"]:empty {
  display: none;
}

.admin-item-list > li {
  min-width: 0;
  padding: 10px;
  border: 1px solid #487974;
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.admin-bug-description {
  white-space: pre-wrap;
}

.admin-item-list form.row {
  flex-wrap: wrap;
}

.session-close-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 16px;
}

.session-close-preview dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

#leaveClubActions[hidden] {
  display: none;
}

#leaveClub:disabled {
  background: #41494b;
  color: #e0e5e5;
  opacity: 1;
}

.club-membership-choice {
  overflow-wrap: anywhere;
  text-align: left;
}

.club-membership-choice[aria-pressed="true"] {
  border-color: #b8b62b;
  box-shadow: inset 0 0 0 1px #b8b62b;
}

.desktop-install {
  margin-top: 16px;
}

.desktop-install #windowsDownload[hidden] {
  display: none;
}

.desktop-download-pending {
  position: relative;
}

.desktop-install #windowsDownloadUnavailable[aria-disabled="true"] {
  width: 100%;
  min-height: 46px;
  padding: 12px 16px;
  background: #414b4e;
  color: #e5e8e9;
  cursor: not-allowed;
  font: inherit;
  font-weight: 700;
  transform: none;
  filter: none;
}

#windowsDownloadHint {
  position: absolute;
  z-index: 3;
  inset: 100% 0 auto;
  visibility: hidden;
  margin: 6px 0 0;
  padding: 9px 12px;
  border: 1px solid #487974;
  border-radius: 8px;
  background: #122727;
  color: #eff6f4;
  font-size: 14px;
  line-height: 1.4;
  pointer-events: none;
}

@media (hover: hover) {
  #windowsDownloadUnavailable:hover + #windowsDownloadHint {
    visibility: visible;
  }
}

#windowsDownloadUnavailable:focus-visible + #windowsDownloadHint {
  visibility: visible;
}

.mobile-release {
  display: none;
}

#landing:not([hidden]) ~ .mobile-release {
  display: block;
  width: min(260px, calc(100% - 32px));
  margin: 16px 16px 0 auto;
  padding: 16px;
  border: 1px solid #487974;
  border-radius: 12px;
  background: #0b2b2a;
  color: #e0eeeb;
}

.mobile-release h2 {
  margin: 0;
  font-size: 17px;
}

.mobile-release p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.4;
}

.mobile-store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-store-links a:not([hidden]) {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #b8b62b;
  color: #041b1b;
  font-weight: 700;
}

@media (min-width: 1180px) {
  #landing:not([hidden]) ~ .mobile-release {
    position: absolute;
    top: 182px;
    right: max(24px, calc((100vw - 1450px) / 2));
    margin: 0;
  }
}

.account-session {
  margin: 18px 0;
  padding: 12px;
  border: 1px solid #487974;
  border-radius: 9px;
}

.account-session h3 {
  margin: 0 0 10px;
}

#accountSessionStatus:empty,
#accountSessionFeedback:empty {
  display: none;
}

.landing-utilities {
  display: none;
}

#landing:not([hidden]) ~ .landing-utilities {
  position: fixed;
  z-index: 2;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100% - 32px);
}

body:has(#landing:not([hidden])) {
  padding-bottom: 70px;
}

@media (max-width: 390px) {
  body:has(#landing:not([hidden])) {
    padding-bottom: 120px;
  }
}

.landing-utilities a {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #487974;
  border-radius: 9px;
  background: #0b2b2a;
  color: #e0eeeb;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s;
}

#welcomeTour {
  width: min(31rem, calc(100% - 2rem));
  color: #e0eeeb;
  background: #071f20;
}

#welcomeTour::backdrop {
  background: rgb(0 15 17 / 52%);
}

#welcomeTour [hidden],
#resumeTour[hidden] {
  display: none;
}

#resumeTour {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(76px, calc(env(safe-area-inset-bottom) + 60px));
  z-index: 4;
}

.tour-target {
  outline: 3px solid #e6e64d;
  outline-offset: 4px;
}

@media (hover: hover) {
  .landing-utilities a:hover {
    border-color: #b8b62b;
    background-color: #b8b62b;
    color: #041b1b;
  }
}

.credits-developer dd {
  margin: 5px 0 0;
  font-weight: 700;
}

.credits-developer {
  display: grid;
  gap: 12px;
}

.credits-developer dd {
  overflow-wrap: anywhere;
}

.credits-images {
  display: grid;
  gap: 10px;
}

.credits-images img:not([hidden]) {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 8px;
}

#creditsEditor,
.credits-image-input {
  margin: 14px 0;
}

.credits-image-input > input {
  display: block;
  width: 100%;
  margin: 5px 0;
  letter-spacing: normal;
}

#creditsText {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#creditsInput {
  resize: vertical;
  font-family: inherit;
}

.admin-account-option {
  margin: 0 12px 12px;
}

.admin-account-option summary {
  cursor: pointer;
  padding: 6px 0;
}

.profile-score-row .admin-account-option form.row {
  margin: 8px 0 0;
}

.admin-account-option textarea {
  resize: vertical;
  font-family: inherit;
}

.profile-admin-badge {
  width: fit-content;
  margin: -12px auto 16px;
  padding: 4px 10px;
  border: 1px solid #b8b62b;
  border-radius: 8px;
  color: #e6e64d;
  font-weight: 700;
}
.join-help {
  margin: 8px 0 16px;
}

.join-help summary {
  width: fit-content;
  cursor: pointer;
}

.join-help a {
  color: #fff1a7;
}

.account-provider-options {
  margin: 16px 0;
}

#showPasswordReset {
  margin-top: 8px;
}
