:root {
  --void: #f3ebe1;
  --ink: #1f1712;
  --dim: #6e5e52;
  --accent: #c45c26;
  --go: #c45c26;
  --go-ink: #fff;
  --sheet: #fffaf4;
  --line: #e4d4c6;
  --paper: #fffaf4;
  --well: #f7f0e8;
  --sans: "Manrope", "Helvetica Neue", sans-serif;
  --pad: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right));
}

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

html {
  color-scheme: light;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  min-height: 100svh;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(120% 52% at 50% -8%, #ead7c4 0%, transparent 58%),
    var(--void);
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 8;
  padding: 0.4rem 0.7rem;
  background: var(--go);
  color: var(--go-ink);
  text-decoration: none;
  border-radius: 0.4rem;
}

.skip:focus {
  top: 1rem;
}

.frame {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
}

.bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: calc(0.85rem + env(safe-area-inset-top)) var(--pad) 0.4rem;
}

.bar-mark {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.45rem;
  flex-shrink: 0;
  display: block;
}

.bar-name {
  font-weight: 800;
  letter-spacing: -0.04em;
}

.view {
  display: grid;
  align-content: center;
  align-items: center;
  justify-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 0;
  min-width: 0;
  padding: 0.35rem var(--pad) 0.85rem;
}

.hint {
  margin: 0;
  color: var(--dim);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.35;
  max-width: 22rem;
}

h1.hint {
  font-size: 0.92rem;
}

.pack {
  width: min(100%, 20.5rem);
  overflow: hidden;
  border: 1px solid rgba(31, 23, 18, 0.06);
  border-radius: 1.35rem;
  background: var(--paper);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 40px rgba(31, 23, 18, 0.06);
}

.pack-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem 0.7rem;
  border-bottom: 1px solid var(--line);
  background: var(--well);
}

.pack-kind {
  margin: 0 0 0.12rem;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.pack-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.pack-count {
  margin: 0;
  color: var(--dim);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.files {
  margin: 0;
  padding: 0.35rem 0.45rem 0.5rem;
  list-style: none;
}

.files li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 0.5rem;
  border-radius: 0.75rem;
  color: var(--dim);
}

.files li i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #d9c4b0;
}

.files li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 700;
}

.files li b {
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 600;
}

.files li.is-on {
  background: #f8ebe0;
  color: var(--ink);
}

.files li.is-on i {
  background: var(--accent);
}

.sheet {
  min-width: 0;
  padding: 1.2rem var(--pad) calc(1.2rem + env(safe-area-inset-bottom));
  background: var(--sheet);
  border-top: 1px solid var(--line);
  border-radius: 1.4rem 1.4rem 0 0;
}

.got {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.val {
  margin: 0.28rem 0 0.2rem;
  font-size: clamp(1.45rem, 6vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.meta {
  margin: 0 0 1rem;
  color: var(--dim);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}

.go,
body.is-dl .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.5rem;
  border-radius: 999px;
  background: var(--go);
  color: var(--go-ink);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  touch-action: manipulation;
}

.go:hover,
body.is-dl .btn:hover {
  background: #9a451c;
}

.go:active,
body.is-dl .btn:active {
  transform: translateY(1px);
}

.go:focus-visible,
body.is-dl .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 0.22rem 0.55rem;
  background: #fff;
  color: #9a451c;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

body.is-dl {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: var(--pad);
}

body.is-dl .hero {
  text-align: center;
  width: min(100%, 28rem);
}

body.is-dl h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

body.is-dl .lead {
  margin: 0;
  color: var(--dim);
}

body.is-dl .hero-dl {
  display: flex;
  justify-content: center;
  margin: 1.4rem 0 0;
}

body.is-dl .btn {
  min-width: min(22rem, 100%);
  padding: 0.9rem 2rem;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

@media (min-width: 720px) {
  html,
  body {
    height: 100%;
  }

  body {
    display: grid;
    place-items: center;
    background: #e8d9c8;
  }

  .frame {
    width: min(calc(100% - 2rem), 24.75rem);
    min-height: 0;
    height: min(calc(100dvh - 2rem), 52rem);
    max-height: calc(100dvh - 2rem);
    border: 1px solid rgba(31, 23, 18, 0.06);
    border-radius: 1.8rem;
    overflow: hidden;
    background: var(--void);
    box-shadow: 0 24px 60px rgba(31, 23, 18, 0.12);
  }
}

@media (max-height: 700px) {
  .hint {
    font-size: 0.82rem;
  }

  .pack {
    width: min(100%, 17.5rem);
  }

  .sheet {
    padding-top: 0.95rem;
    padding-bottom: calc(0.95rem + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .go:active,
  body.is-dl .btn:active {
    transform: none;
  }
}
