@font-face {
  font-family: Podkova;
  src: url("/camp/Podkova-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f9efd8;
  --ivory: #fff9eb;
  --ink: #272d22;
  --muted: #585747;
  --pine: #243b2e;
  --gold: #d6b879;
  --line: #cdb88e;
  --red: #822c20;
  --title: Podkova, Georgia, serif;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: #eae0c9;
}

* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; }
img { max-width: 100%; }
a { color: #344f35; text-underline-offset: .23em; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid #256584; outline-offset: 3px; }
p { color: var(--muted); line-height: 1.6; margin: .75rem 0 1.15rem; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { font-family: var(--title); font-weight: 600; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.35rem; }

.masthead {
  color: var(--ivory);
  background: var(--pine);
  border-bottom: 2px solid var(--gold);
}
.masthead-inner {
  max-width: 1200px;
  min-height: 4.5rem;
  margin: auto;
  padding: .75rem clamp(1rem, 4vw, 3rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
}
.brand, .masthead form { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.brand { font: 600 clamp(1.05rem, 2.3vw, 1.5rem)/1.1 var(--title); color: inherit; text-decoration: none; }
.brand img { width: 2.25rem; flex: none; }
.identity { max-width: min(21vw, 13rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; color: #f0ddae; }
.masthead form { flex: none; }
.masthead .quiet { color: var(--ivory); border-color: #b19d74; }
.masthead .quiet:hover { background-color: #395342; }
.masthead :focus-visible { outline-color: var(--gold); }

main { max-width: 1200px; margin: auto; padding: clamp(1rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem) 4rem; }
.login-page { background: #22352b; }
.login-spread {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr);
  align-items: stretch;
  max-width: 1080px;
  margin: clamp(0rem, 3vw, 2rem) auto 0;
  box-shadow: 0 18px 55px #101e16a0;
}
.cover {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-start;
  min-height: 34rem;
  overflow: hidden;
  padding: clamp(1.3rem, 4vw, 3rem);
  background: linear-gradient(157deg, #162b21df, #162b2140 54%, transparent 76%), url("/camp/landscape.webp") 53% center / cover;
}
.cover-name {
  z-index: 1;
  color: #fff2cd;
  font: 600 clamp(3.2rem, 7vw, 6.2rem)/.86 var(--title);
  letter-spacing: -.04em;
  text-shadow: 0 3px 14px #13251c;
}
.cover-stop {
  position: absolute;
  bottom: 0;
  right: 1%;
  width: min(90%, 34rem);
  filter: drop-shadow(0 .6rem 1rem #1b2615a0);
}
.entry {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.2rem, 4vw, 2.65rem);
  background: var(--paper);
  border: 12px solid #765b36;
  border-image: url("/camp/paper.webp") 42 fill / 12px stretch;
}
.entry-pass { display: block; width: 3.2rem; height: 4.15rem; object-fit: contain; margin: 0 0 .7rem; }
.entry h1 { font-size: clamp(1.9rem, 3.6vw, 2.85rem); }
.entry .primary { width: 100%; }
.login { display: grid; gap: 1rem; }
label { display: grid; gap: .4rem; min-width: 0; font-size: .9rem; font-weight: 650; }
input {
  width: 100%;
  min-width: 0;
  min-height: 2.8rem;
  padding: .6rem .75rem;
  border: 1px solid #9c8962;
  border-radius: .28rem;
  color: var(--ink);
  background: var(--ivory);
}
input[type="file"] { padding: .3rem; font-size: .88rem; }
input::file-selector-button {
  border: 0;
  padding: .45rem .55rem;
  margin-right: .35rem;
  background: #e5d3ad;
  color: var(--ink);
  border-radius: .2rem;
  cursor: pointer;
}
button {
  font-weight: 650;
  cursor: pointer;
  padding: .6rem .9rem;
  min-height: 2.7rem;
  width: fit-content;
  border: 1px solid currentColor;
  border-radius: .27rem;
}
.primary { color: #fff4d6; background: #812d21 url("/camp/button.webp") center / 100% 100% no-repeat; border-color: #743b23; padding-inline: 1rem; }
.primary:hover { filter: brightness(1.12); }
.quiet { background: transparent; color: #324932; }
.quiet:hover { background: #e9dfc4; }
.danger { color: var(--red); background: transparent; }
.danger:hover { background: #f3dcd0; }
.error { color: var(--red); background: #ffeadc; border-left: .24rem solid var(--red); padding: .65rem .85rem; }

.cabinet-page {
  position: relative;
  isolation: isolate;
}
.cabinet-page::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 30rem;
  background: linear-gradient(#172c21a8, #243b2e63 64%, #eae0c9),
    url("/camp/landscape.webp") center 49% / cover;
}
.heading {
  color: var(--ivory);
  text-shadow: 0 2px 12px #16241b;
  padding: clamp(1.2rem, 3.6vw, 2.5rem) 0 clamp(1.4rem, 4vw, 2.7rem);
}
.heading nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.heading nav a {
  padding: .45rem .75rem;
  border: 1px solid #c3ac79;
  color: inherit;
  background: #243b2e;
  border-radius: .25rem;
  text-decoration: none;
  text-shadow: none;
}
.heading nav a:hover { background: #365441; }
.heading nav a:focus-visible { outline-color: var(--gold); }
main > [role="status"], main > [role="alert"] { padding: .8rem 1rem; background: var(--ivory); }
.board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.board section {
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.95rem);
  background: var(--paper);
  border: 10px solid #765b36;
  border-image: url("/camp/paper.webp") 42 fill / 10px stretch;
}
.section-title { display: flex; align-items: center; gap: .75rem; }
.section-title img { flex: none; width: 3rem; height: 3rem; object-fit: contain; }
.player-board { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.player-board .download { grid-row: span 2; }
.balance > strong { display: block; margin: .6rem 0; font: 600 clamp(2rem, 5vw, 3.3rem)/1 var(--title); font-variant-numeric: tabular-nums; }
meter { width: min(100%, 23rem); height: .95rem; accent-color: #48603f; }
meter::-webkit-meter-optimum-value { background: #48603f; }
.key-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.key-row input { width: min(100%, 29rem); font-family: ui-monospace, monospace; }
.installer-downloads { list-style: none; margin: 1rem 0; padding: 0; }
.installer-downloads li + li { margin-top: .5rem; }
.installer-downloads a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 1.65rem;
  gap: .65rem;
  align-items: center;
  padding: .7rem .8rem;
  background: #fff8e4;
  border: 1px solid var(--line);
  border-radius: .3rem;
  text-decoration: none;
}
.installer-downloads a:hover { background: #fffcf1; border-color: #947341; }
.installer-downloads span { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.installer-downloads .download-arrow {
  display: grid;
  place-items: center;
  height: 1.65rem;
  background: var(--pine);
  color: var(--ivory);
  border-radius: 50%;
  font-size: 1rem;
}

.admin-board .analytics, .admin-board .access { grid-column: 1 / -1; }
.admin-board .login { margin-top: 1rem; }
.usage-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: .85rem;
  margin: 1rem 0 0;
}
.usage-metrics div { background: #fff8e4; border-left: 3px solid #a88852; padding: .75rem .9rem; }
.usage-metrics dt { color: var(--muted); font-size: .9rem; }
.usage-metrics dd { margin: .2rem 0 0; overflow-wrap: anywhere; font: 600 1.65rem var(--title); }
.analytics-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem; }
.report-periods { display: flex; flex-wrap: wrap; gap: .35rem; }
.report-periods a { padding: .35rem .6rem; border: 1px solid var(--line); border-radius: .25rem; text-decoration: none; }
.report-periods a:hover { background: var(--ivory); }
.report-periods a[aria-current="true"] { background: var(--pine); color: var(--ivory); border-color: var(--pine); }
.analytics-breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.analytics-breakdown > div { min-width: 0; padding: .85rem; border: 1px solid var(--line); background: #fff8e4; }
.analytics-breakdown p { margin: .4rem 0; font-size: .85rem; }
.analytics-breakdown .report-table { margin: .5rem 0 0; font-size: .86rem; overflow-wrap: anywhere; }
.report-table td { vertical-align: top; }
.report-table small { display: block; color: var(--muted); margin-top: .2rem; }
.report-table .spend-bar { display: block; width: 100%; height: .5rem; margin-top: .25rem; }
@media (max-width: 920px) {
  .analytics-breakdown { grid-template-columns: minmax(0, 1fr); }
}
.prices { width: 100%; border-collapse: collapse; margin-bottom: 1rem; text-align: left; font-variant-numeric: tabular-nums; }
.prices th, .prices td { border-bottom: 1px solid var(--line); padding: .55rem .35rem .55rem 0; }
.prices th[scope="row"] { font-weight: 500; }
.tester-list { margin-top: 1rem; }
.tester { border-top: 1px solid var(--line); padding: 1rem 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.tester:last-child { padding-bottom: 0; }
.tester h3 { overflow-wrap: anywhere; }
.tester p { margin-top: .45rem; }
.tester-actions, .tester-actions form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .55rem; }
.tester-actions input:not([type="hidden"]) { width: 7.8rem; }
.delete-account { flex-basis: 100%; }
.delete-account summary { color: var(--red); cursor: pointer; width: fit-content; }
.delete-account p { max-width: 32rem; margin: .5rem 0; }
.installer-management { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .8rem; margin-top: 1rem; }
.installer-upload { display: grid; align-content: start; gap: .7rem; min-width: 0; padding: .9rem; background: #fff8e4; border: 1px solid var(--line); }
.installer-upload p { margin: 0; font-size: .9rem; }
.installer-upload progress { width: 100%; accent-color: #48603f; }
.installer-upload button:disabled { opacity: .65; cursor: wait; }

@media (max-width: 720px) {
  .login-spread, .board, .player-board { grid-template-columns: minmax(0, 1fr); }
  .cover { min-height: 18rem; }
  .cover-stop { right: 0; width: min(71%, 23rem); }
  .cover-name { font-size: clamp(2.65rem, 9.2vw, 4.5rem); }
  .player-board .download { grid-row: auto; }
  .entry { border-width: 9px; }
}
@media (max-width: 380px) {
  .brand img { width: 1.7rem; }
  .identity { display: none; }
  .installer-downloads a { padding-inline: .55rem; gap: .4rem; }
  .cover { min-height: 15rem; }
  .board section { padding-inline: .75rem; }
}
