@font-face {
  font-family: Fredoka;
  src: url(/fonts/fredoka.woff2) format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: Nunito;
  src: url(/fonts/nunito.woff2) format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #16120f;
  --top: #0f0c0a;
  --card: #231d18;
  --field: #1a1512;
  --ink: #f1e7d6;
  --soft: #b9a892;
  --line: #3b3129;
  --wood: #b07a45;
  --teal: #2a7f78;
  --teal-hover: #33968e;
  --link: #74cfc5;
  --rust: #f08a66;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 Nunito, system-ui, sans-serif;
}

a { color: var(--link); }
a:hover { color: var(--ink); }

h1, h2, h3, .brand, .tab { font-family: Fredoka, Nunito, sans-serif; font-weight: 600; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 3px solid var(--wood);
  background: var(--top);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 20px; }
.badge {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1b2838;
  color: #66c0f4;
  font-size: 15px;
}
.who { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.who img { width: 28px; height: 28px; border-radius: 50%; }
.who button { font-size: 14px; }

main { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; }

.intro h1 { font-size: 40px; line-height: 1.1; margin: 32px 0 10px; }
.intro p { margin: 0 0 24px; color: var(--soft); max-width: 640px; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.tab {
  border: 2px solid var(--wood);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 16px;
  cursor: pointer;
}
.tab.on { background: var(--wood); color: #1a120b; }
.progress { margin-left: auto; color: var(--soft); font-size: 15px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.card .pic {
  width: 100%;
  aspect-ratio: 616 / 353;
  object-fit: cover;
  border-radius: 8px;
  background: var(--line);
  display: block;
}
.card .small-art { display: grid; place-items: center; background: var(--field); }
.card .small-art img { width: 231px; max-width: 80%; border-radius: 4px; }

.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 120px)); gap: 8px; margin-top: 10px; }
.shot { padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; line-height: 0; }
.shot img { width: 100%; height: auto; aspect-ratio: 116 / 65; object-fit: cover; border-radius: 4px; background: var(--line); }
.shot:hover, .shot:focus-visible { border-color: var(--wood); outline: none; }

.shot-box { width: min(1100px, calc(100vw - 24px)); padding: 0; overflow: hidden; }
.shot-box img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; }
.shot-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 0; }
.shot-bar span { color: var(--soft); font-size: 15px; margin-right: auto; }
.card h2 { font-size: 28px; line-height: 1.15; margin: 16px 0 6px; }
.card .blurb { margin: 0 0 12px; color: var(--soft); }
.store-link { display: inline-block; margin-bottom: 8px; font-weight: 700; }

.q { border: 0; border-top: 1px dashed var(--line); margin: 16px 0 0; padding: 16px 0 0; }
.q legend { font-weight: 800; padding: 0; margin-bottom: 8px; display: block; }
.q .hint { color: var(--soft); font-size: 15px; margin: -4px 0 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 6px 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  cursor: pointer;
  font-size: 15px;
}
.chip span:hover { border-color: var(--soft); }
.chip input:checked + span { border-color: var(--teal); background: var(--teal); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--wood); outline-offset: 2px; }

.lists { max-height: 220px; overflow: auto; padding: 2px; }
.new-list { margin-top: 10px; width: 100%; max-width: 360px; }

input[type=number], input[type=search], input[type=text], input:not([type]), select, textarea {
  font: inherit;
  color: inherit;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  padding: 8px 10px;
}
input::placeholder, textarea::placeholder { color: #8a7a68; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal-hover); }
textarea { width: 100%; min-height: 70px; resize: vertical; }
.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline input[type=number] { width: 140px; }

.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 20px; }
button { font: inherit; cursor: pointer; }
.go {
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 22px;
  font-weight: 800;
  min-height: 44px;
}
.go:hover { background: var(--teal-hover); }
.go:disabled { opacity: .6; cursor: default; }
.plain { background: none; border: 0; color: var(--soft); text-decoration: underline; padding: 8px; min-height: 44px; }
.plain:hover { color: var(--ink); }

.note { margin: 12px 0 0; color: var(--link); font-weight: 700; }
.error { color: var(--rust); font-weight: 700; margin: 10px 0 0; }
.quiet { color: var(--soft); }

.list-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }
.search { flex: 1 1 240px; }
.search input { width: 100%; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}
.nopic { background: var(--line); }
.rows .nopic { width: 92px; height: 43px; border-radius: 4px; flex: none; }
.rows img { width: 92px; height: 43px; object-fit: cover; border-radius: 4px; background: var(--line); flex: none; }
.rows .name { flex: 1; min-width: 0; font-weight: 700; }
.rows .meta { color: var(--soft); font-size: 14px; font-weight: 400; display: block; }
.rows button { flex: none; background: transparent; border: 2px solid var(--teal); color: var(--link); border-radius: 8px; padding: 6px 12px; font-weight: 700; }
.rows button:hover { background: var(--teal); color: #fff; }
.rows .done { color: var(--link); font-size: 14px; font-weight: 700; flex: none; }

dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  width: min(420px, calc(100vw - 32px));
  background: var(--card);
  color: var(--ink);
}
dialog::backdrop { background: rgba(8, 6, 4, .7); }
dialog h2 { margin: 0 0 6px; }
dialog p { margin: 0 0 12px; }
.field { display: grid; gap: 6px; font-weight: 700; }
.field input { width: 100%; }
.or { margin-top: 16px; color: var(--soft); }

.welcome { width: min(620px, calc(100vw - 32px)); max-height: 88vh; padding: 0; overflow: hidden; }
.welcome .scroll { padding: 28px 28px 8px; overflow: hidden auto; max-height: calc(88vh - 84px); }
.welcome h2 { font-size: 30px; margin-bottom: 14px; }
.welcome h3 { font-size: 21px; margin: 22px 0 8px; }
.welcome ul, .welcome ol { margin: 0 0 12px; padding-left: 22px; }
.welcome li { margin-bottom: 4px; }
.welcome .sig { font-family: Fredoka, Nunito, sans-serif; font-size: 20px; margin-top: 18px; }
.welcome .end { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 16px 28px 20px; border-top: 1px solid var(--line); margin: 0; }
.welcome .define { background: var(--field); border: 1px dashed var(--wood); border-radius: 8px; padding: 12px 16px; margin: 8px 0 12px; }

footer { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; color: var(--soft); font-size: 15px; border-top: 1px solid var(--line); }
footer .small { font-size: 13px; }
footer button { color: var(--link); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 520px) {
  .top { padding: 10px 12px; }
  .brand > span:last-child { display: none; }
  .who { gap: 4px; }
  .who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
  .who .plain { padding: 8px 6px; }
  .intro h1 { font-size: 32px; }
  .card { padding: 14px; }
  .card h2 { font-size: 24px; }
  .rows img { width: 70px; height: 33px; }
  .welcome .scroll { padding: 20px 18px 8px; }
  .welcome .end { padding: 14px 18px 18px; }
}
