:root {
  --bg: #f3ebe1;
  --bg-spot: #ead7c4;
  --ink: #1f1712;
  --mute: #6e5e52;
  --paper: #fffaf4;
  --line: #e4d4c6;
  --accent: #c45c26;
  --accent-2: #9a451c;
  --soft: #f8ebe0;
  --well: #f7f0e8;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Manrope", "Helvetica Neue", "Segoe UI", sans-serif;
  --space: clamp(1rem, 4vw, 1.7rem);
  --measure: 42rem;
  --radius: 1.35rem;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  background:
    radial-gradient(120% 52% at 50% -8%, var(--bg-spot) 0%, transparent 58%),
    var(--bg);
  padding-bottom: env(safe-area-inset-bottom);
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.45rem 0.75rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
}

.skip:focus {
  top: 1rem;
}

.hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.top,
.hero,
.stage,
.how,
.uses,
.facts,
.faq {
  width: min(100% - 2 * var(--space), var(--measure));
  margin-left: auto;
  margin-right: auto;
}

.top {
  display: flex;
  align-items: center;
  padding: 1.15rem 0 0.7rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.62rem;
  flex-shrink: 0;
}

.hero {
  padding: 0.55rem 0 1.25rem;
}

h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.85rem, 7vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.lead {
  margin: 0;
  max-width: 32rem;
  color: var(--mute);
  font-size: 1.05rem;
  line-height: 1.45;
}

.stage {
  padding: 0.7rem 0.7rem 1.2rem;
  background: var(--paper);
  border: 1px solid rgba(31, 23, 18, 0.06);
  border-radius: var(--radius);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 40px rgba(31, 23, 18, 0.06);
}

.modes {
  display: flex;
  gap: 0.2rem;
  margin-bottom: 0.85rem;
  padding: 0.22rem;
  background: #efe6db;
  border-radius: 999px;
}

.modes button {
  flex: 1;
  min-width: 0;
  min-height: 2.35rem;
  padding: 0.35rem 0.5rem;
  border: 0;
  background: transparent;
  color: var(--mute);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.modes button.is-on {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(31, 23, 18, 0.08);
}

button,
.btn,
a.btn,
.uses button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn:focus-visible,
.btn-ghost:focus-visible,
.modes button:focus-visible,
.linkish:focus-visible,
.uses button:focus-visible,
.file-act:focus-visible,
.cookie-ok:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.drop {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: 2.1rem 1.1rem 1.7rem;
  background: var(--well);
  border: 1px dashed #d9c4b0;
  border-radius: 1.05rem;
  text-align: center;
  cursor: pointer;
}

.drop.is-over {
  border-color: var(--accent);
  background: var(--soft);
}

.chest {
  position: relative;
  width: 4.6rem;
  height: 4.1rem;
  margin-bottom: 0.45rem;
}

.chest-lid,
.chest-body,
.chest-lock {
  position: absolute;
  display: block;
}

.chest-lid {
  left: 0.35rem;
  right: 0.35rem;
  top: 0.15rem;
  height: 1.15rem;
  background: #f3dcc6;
  clip-path: polygon(12% 100%, 22% 12%, 78% 12%, 88% 100%);
  border-radius: 0.2rem;
}

.chest-body {
  left: 0.2rem;
  right: 0.2rem;
  top: 1.2rem;
  height: 2.55rem;
  background: #fff;
  border: 2px solid #c45c26;
  border-radius: 0.45rem;
}

.chest-lock {
  left: 50%;
  top: 1.95rem;
  width: 0.72rem;
  height: 0.58rem;
  border: 2px solid #c45c26;
  border-radius: 0.16rem;
  transform: translateX(-50%);
  background: #fff3e6;
}

.chest-lock::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.42rem;
  width: 0.38rem;
  height: 0.38rem;
  border: 2px solid #c45c26;
  border-bottom: 0;
  border-radius: 0.4rem 0.4rem 0 0;
  transform: translateX(-50%);
}

.chest-lock::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.14rem;
  width: 0.16rem;
  height: 0.22rem;
  background: #c45c26;
  border-radius: 999px;
  transform: translateX(-50%);
}

.chest.is-pack .chest-lid {
  transform: translateY(-0.12rem);
}

.drop-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.drop-meta {
  margin: 0 0 0.35rem;
  max-width: 22rem;
  color: var(--mute);
  font-size: 0.88rem;
}

.fmt {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  margin: 0.15rem 0 0.45rem;
}

.fmt span {
  padding: 0.12rem 0.5rem;
  background: #fff;
  color: var(--accent-2);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pass-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.pass-row input {
  flex: 1 1 10rem;
  min-height: 2.6rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.pass-row .btn {
  min-width: 7.5rem;
}

.drop-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

#panelPack .drop {
  padding: 1.05rem 0.95rem 0.95rem;
}

#panelPack .chest {
  width: 3.35rem;
  height: 3rem;
  margin-bottom: 0.15rem;
}

#panelPack .chest-lid {
  top: 0.08rem;
  height: 0.85rem;
}

#panelPack .chest-body {
  top: 0.88rem;
  height: 1.9rem;
}

#panelPack .chest-lock {
  top: 1.42rem;
  width: 0.55rem;
  height: 0.42rem;
}

#panelPack .chest-lock::before {
  top: -0.32rem;
  width: 0.3rem;
  height: 0.3rem;
}

#panelPack .drop-title {
  font-size: 1.02rem;
}

#panelPack .drop-meta {
  margin-bottom: 0.2rem;
  font-size: 0.82rem;
}

#panelPack .drop .btn {
  min-width: 6.8rem;
  min-height: 2.45rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.88rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.55rem 1.3rem;
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.drop .btn {
  min-width: 9.5rem;
}

.btn:hover {
  background: var(--accent-2);
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--well);
}

.btn-ghost.is-on {
  border-color: var(--accent);
  color: var(--accent-2);
  background: var(--soft);
}

.linkish {
  margin-top: 0.35rem;
  border: 0;
  background: none;
  color: var(--accent-2);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.cam-err {
  margin: 0.35rem 0 0;
  color: #a33a22;
  font-size: 0.88rem;
  font-weight: 700;
}

.stage-msg {
  margin-top: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.9rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.stage-msg.is-err {
  background: #fdeceb;
  color: #a33a22;
  border: 1px solid #f3c7bf;
}

.stage-msg.is-ok {
  background: #eef7ea;
  color: #2d6a32;
  border: 1px solid #cfe6c8;
}

.pack-done {
  display: grid;
  gap: 0.2rem;
  flex: 1 1 100%;
  padding: 0.75rem 0.85rem;
  background: #eef7ea;
  border: 1px solid #cfe6c8;
  border-radius: 0.9rem;
  color: #2d6a32;
}

.pack-done strong {
  font-size: 0.92rem;
}

.pack-done p {
  margin: 0;
  color: #3f6b42;
  font-size: 0.82rem;
  font-weight: 600;
}

.file.is-click {
  cursor: pointer;
}

.file.is-click:hover {
  background: var(--well);
}

.work-tools a.btn {
  text-decoration: none;
  display: inline-grid;
  place-items: center;
}

.progress {
  margin-top: 0.9rem;
}

.progress p {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.bar {
  height: 0.45rem;
  overflow: hidden;
  background: #efe6db;
  border-radius: 999px;
}

.bar span {
  display: block;
  height: 100%;
  width: 8%;
  background: var(--accent);
  border-radius: inherit;
  transition: width 0.25s var(--ease);
}

.notice {
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  background: #fff6ea;
  border: 1px solid #edd4b3;
  border-radius: 1rem;
  color: #5c4634;
  font-size: 0.92rem;
}

.notice strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ink);
}

.work {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.75rem;
}

.work-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.work-kicker {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-head h2 {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.work-meta {
  margin: 0;
  color: var(--mute);
  font-size: 0.82rem;
  text-align: right;
}

.work-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.work-tools .btn,
.work-tools .btn-ghost {
  min-height: 2.45rem;
  padding: 0.4rem 0.95rem;
  font-size: 0.86rem;
}

.pack-opts {
  display: grid;
  flex: 1 1 100%;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem;
  background: var(--well);
  border-radius: 0.9rem;
}

.pack-opts label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--mute);
}

.pack-opts input,
.pack-opts select {
  min-height: 2.5rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}

.pack-check {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem !important;
  color: var(--ink) !important;
}

.pack-check input {
  min-height: 0;
  width: 1.05rem;
  height: 1.05rem;
}

.files {
  display: grid;
  max-height: 22rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
}

.file {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px dashed #efe3d6;
}

.file:last-child {
  border-bottom: 0;
}

.file-ico {
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--accent-2);
  border-radius: 0.45rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.file.is-dir .file-ico {
  background: #efe6db;
  color: #6e5e52;
}

.file-name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.file-sub {
  margin: 0.1rem 0 0;
  color: var(--mute);
  font-size: 0.75rem;
  font-weight: 600;
}

.file-act {
  display: flex;
  gap: 0.3rem;
}

.file-act button {
  min-height: 2rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.file-act button:hover {
  border-color: var(--accent);
  color: var(--accent-2);
}

.preview {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(31, 23, 18, 0.45);
}

.preview-card {
  width: min(100%, 40rem);
  max-height: min(88vh, 44rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--paper);
  border-radius: 1.2rem;
  overflow: hidden;
}

.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

.preview-top p {
  margin: 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.preview-body {
  overflow: auto;
  padding: 0.9rem;
}

.preview-body img {
  margin: 0 auto;
  max-height: 70vh;
}

.preview-body pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}

.uses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 1.1rem 0 0.3rem;
}

.uses button {
  min-height: 2.2rem;
  padding: 0.25rem 0.8rem;
  border: 1px solid var(--line);
  background: #fffaf4;
  color: var(--ink);
  border-radius: 999px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.uses button:hover {
  border-color: var(--accent);
}

.how,
.facts,
.faq {
  padding: 1.6rem 0 0.2rem;
}

.how h2,
.facts h2,
.faq h2 {
  margin: 0 0 0.9rem;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.how ol {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.how li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  align-items: start;
}

.how li span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  background: var(--soft);
  color: var(--accent-2);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.how h3 {
  margin: 0.15rem 0 0.2rem;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.how p {
  margin: 0;
  color: var(--mute);
  font-size: 0.92rem;
}

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

.facts h2 {
  grid-column: 1 / -1;
}

.facts article {
  padding: 1rem 1.05rem;
  background: #fffaf4;
  border: 1px solid rgba(31, 23, 18, 0.06);
  border-radius: 1.05rem;
}

.facts h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.facts p {
  margin: 0;
  color: var(--mute);
  font-size: 0.92rem;
}

.faq details {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
}

.faq p {
  margin: 0.45rem 0 0;
  color: var(--mute);
}

.foot {
  width: 100%;
  margin-top: 1.6rem;
  padding: 2.1rem var(--space) calc(1.5rem + env(safe-area-inset-bottom));
  background: #1c1612;
  color: #d4c7bb;
  font-size: 0.86rem;
  line-height: 1.55;
}

.foot-inner {
  width: min(100%, 64rem);
  margin: 0 auto;
}

.foot-grid {
  display: grid;
  gap: 1.6rem 2rem;
}

.foot-name {
  margin: 0;
  color: #f7efe6;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.foot h2 {
  margin: 0 0 0.55rem;
  color: #9a8b7d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.foot p,
.foot ul {
  margin: 0 0 0.45rem;
}

.foot ul {
  padding: 0;
  list-style: none;
}

.foot-grid ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.foot a {
  color: #eadccc;
  text-decoration: none;
}

.foot a:hover {
  color: #fff;
  text-decoration: underline;
}

.foot-ad {
  margin-top: 1.4rem;
  padding-top: 1.15rem;
  border-top: 1px solid #3a3028;
}

.foot-ad-mark {
  margin: 0 0 0.75rem;
  color: #f7efe6;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.foot-ad-grid {
  display: grid;
  gap: 0.9rem 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
}

.foot-ad-grid strong {
  display: block;
  margin-bottom: 0.15rem;
  color: #9a8b7d;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.foot-ad-grid span {
  color: #f0e4d8;
}

.foot-copy {
  margin: 1.2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid #3a3028;
  color: #9a8b7d;
  font-size: 0.8rem;
}

.cookie-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 30;
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem var(--space) calc(0.75rem + env(safe-area-inset-bottom));
  background: #fff;
  color: var(--ink);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 32px rgba(31, 23, 18, 0.08);
}

.cookie-bar[hidden] {
  display: none !important;
}

.cookie-bar p {
  margin: 0;
  max-width: 42rem;
  font-size: 0.88rem;
}

.cookie-bar a {
  color: var(--accent-2);
}

.cookie-ok {
  justify-self: start;
  min-height: 2.5rem;
  padding: 0.35rem 1.1rem;
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

html.cookie-open body {
  padding-bottom: 7rem;
}

@media (max-width: 520px) {
  .work-head {
    flex-direction: column;
    gap: 0.25rem;
  }

  .work-meta {
    text-align: left;
  }

  .drop .btn {
    min-width: min(100%, 16rem);
    width: min(100%, 16rem);
  }

  .file {
    grid-template-columns: 1.7rem minmax(0, 1fr);
  }

  .file-act {
    grid-column: 2;
    justify-self: start;
    flex-wrap: wrap;
  }

  .file-act button {
    min-height: 2.45rem;
    padding: 0.35rem 0.8rem;
    font-size: 0.82rem;
  }

  .uses button {
    min-height: 2.45rem;
  }
}

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

  .foot-grid {
    grid-template-columns: 1.4fr 0.8fr 1fr;
  }

  .foot-ad-grid {
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .bar span {
    transition: none;
  }
}
