:root {
  color: #000000;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: 18px;
  line-height: 1.45;
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background-color: #f4efe6;
  background-image: url("background.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

main {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
  background: rgba(244, 239, 230, 0.4);
}

main:has(#admin:not([hidden])) {
  max-width: 72rem;
}

.table-scroll {
  overflow-x: auto;
}

h1,
h2 {
  font-weight: 600;
  line-height: 1.1;
}

h1 {
  margin: 0 0 1.25rem;
  font-size: 2.4rem;
}

h2 {
  margin: 0;
  font-size: 1.35rem;
}

h2.section-label {
  margin: 0.25rem 0 -0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #5c564c;
}

.mark {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.nav {
  display: flex;
  gap: 1.25rem;
  margin: 0 0 0.25rem;
}

.nav a {
  color: inherit;
  min-height: 44px;
  line-height: 44px;
}

.nav a[aria-current="page"] {
  font-weight: 600;
  text-decoration: none;
}

.stack,
.card,
.pair,
.actions {
  min-width: 0;
}

.stack {
  display: grid;
  gap: 1rem;
}

.pair {
  display: grid;
  gap: 1rem;
}

.card {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  margin: 0;
  padding: 1rem 1.05rem 1.15rem;
  background: rgba(255, 253, 248, 0.5);
  border: 1px solid #ddd4c6;
}

.card p {
  margin: 0;
}

.card-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
}

.card-heading button.solid {
  width: auto;
  justify-self: start;
}

.field-error {
  color: #8f1d1d;
  font-weight: 600;
}

label {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

input,
select,
button {
  font: inherit;
  max-width: 100%;
}

input:not([type="checkbox"]),
select,
button.solid {
  min-height: 44px;
}

input:not([type="checkbox"]),
select {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid #1c1915;
  background: #fff;
}

button,
.linkish {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
}

button.solid {
  background: #1f3d32;
  color: #f4efe6;
  text-decoration: none;
  padding: 0.55rem 0.8rem;
  justify-self: stretch;
  text-align: center;
}

.actions {
  display: grid;
  gap: 0.75rem;
}

.actions #logout,
#admin-logout {
  min-height: 44px;
  text-align: center;
}

.notice {
  min-height: 1.5rem;
  margin: 0;
}

.busy {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.45);
}

.busy-card {
  width: min(22rem, 100%);
  display: grid;
  gap: 0.9rem;
  justify-items: center;
  padding: 1.25rem;
  text-align: center;
  background: rgba(255, 253, 248, 0.96);
  border-radius: 0.8rem;
}

.busy-card p {
  margin: 0;
}

#busy-save {
  display: grid;
  gap: 0.9rem;
  justify-items: center;
  width: 100%;
}

#busy-password-text {
  font-family: ui-monospace, monospace;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
}

#busy-warning {
  color: #8f1d1d;
  font-weight: 700;
}

.spinner {
  width: 2.4rem;
  height: 2.4rem;
  border: 3px solid #ddd4c6;
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.pay {
  display: grid;
  gap: 0.7rem;
}

.pay > p {
  margin: 0;
}

.pay .pay-kode {
  color: #8f1d1d;
  font-weight: 700;
}

.pay-media {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  margin: 0.15rem 0.9rem 0.85rem;
}

.pay-video {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: auto;
  margin: 0;
  border-radius: 0.5rem;
  background: #111;
}

.info summary {
  cursor: pointer;
  list-style: none;
  min-height: 44px;
  font-size: 1.35rem;
  font-weight: 600;
}

.info summary::-webkit-details-marker {
  display: none;
}

.info summary::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.55rem;
  border-right: 2px solid #1f3d32;
  border-bottom: 2px solid #1f3d32;
  transform: translateY(-0.15rem) rotate(-45deg);
}

.info[open] summary::before {
  transform: translateY(-0.05rem) rotate(45deg);
}

.info-scroll {
  height: 70vh;
  overflow: auto;
  border: 1px solid #ddd4c6;
  border-radius: 0.65rem;
  background: #fff;
}

#info-status {
  margin: 0 0 0.5rem;
}

.info-scroll iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.pay details {
  border: 1px solid #ddd4c6;
  border-radius: 0.65rem;
  background: #f4efe6;
}

.pay summary {
  cursor: pointer;
  list-style: none;
  padding: 0.7rem 0.9rem;
  min-height: 44px;
  font-weight: 600;
}

.pay summary::-webkit-details-marker {
  display: none;
}

.pay summary::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.55rem;
  border-right: 2px solid #1f3d32;
  border-bottom: 2px solid #1f3d32;
  transform: translateY(-0.05rem) rotate(-45deg);
}

.pay details[open] summary::before {
  transform: translateY(0.05rem) rotate(45deg);
}

.pay .qr {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0.4rem;
  background: #fff;
  border-radius: 0.5rem;
}

.pay .qr img {
  display: block;
  width: 100%;
  height: auto;
}

.pay details a:not(.qr) {
  color: #1f3d32;
}

.pay strong {
  color: #1f3d32;
}

.pay ol {
  margin: 0 0.9rem;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.55rem;
}

.pay details p {
  margin: 0.85rem 0.9rem 0.95rem;
  color: #5c564c;
}

.row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-height: 44px;
}

.row input {
  width: 1.15rem;
  height: 1.15rem;
}

.person {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #ddd4c6;
}

.person > span:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
}

#companions {
  margin: 0;
  padding-left: 1.25rem;
}

#signup-counts {
  display: grid;
  gap: 0.15rem;
}

#signup-counts p {
  margin: 0;
}

#tipi-by-size {
  display: grid;
  gap: 0.15rem;
}

#tipi-by-size p {
  margin: 0;
}

#size-row,
#kaptain-row {
  display: grid;
  gap: 0.5rem;
}

.companion-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: end;
}

.companion-add label {
  flex: 1;
  min-width: 0;
}

.companion-add button.solid {
  flex: 0 0 auto;
}

.companion-add button.solid:disabled {
  opacity: 0.45;
  cursor: default;
}

#companion-matches {
  display: grid;
  max-height: 14rem;
  overflow: auto;
}

#companion-matches button {
  min-height: 44px;
  padding: 0.35rem 0;
  text-decoration: none;
  border-bottom: 1px solid #ddd4c6;
}

.no-match {
  margin: 0;
  color: #8a8175;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.35rem 0.4rem 0.35rem 0;
  border-bottom: 1px solid #ddd4c6;
  vertical-align: top;
  overflow-wrap: anywhere;
}

#members {
  table-layout: fixed;
}

#members td {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#members th {
  white-space: normal;
  overflow-wrap: normal;
  vertical-align: bottom;
}

#members tbody tr {
  cursor: pointer;
}

#members tbody tr:hover td {
  background: rgba(0, 0, 0, 0.08);
}

#members tr.member-detail:hover td {
  background: transparent;
}

#members tr.member-detail,
#members tr.member-detail td {
  cursor: default;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
}

.member-box {
  display: grid;
  gap: 0.55rem;
  margin: 0.35rem 0 0.6rem;
  padding: 0.85rem 0.9rem;
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid #1c1915;
  border-radius: 0.65rem;
}

.member-box p {
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.member-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

@media (min-width: 700px) {
  .pair {
    grid-template-columns: 1fr 1fr;
  }

  .actions {
    grid-template-columns: auto auto;
    justify-content: start;
    align-items: center;
  }

  button.solid {
    justify-self: start;
  }

  .actions #logout,
  #admin-logout {
    text-align: left;
  }
}
