:root {
  color-scheme: light;
  --page: #f7f8f3;
  --surface: #fffefa;
  --ink: #173d36;
  --muted: #536a60;
  --line: #d6ded3;
  --teal: #175347;
  --pale: #e4eee5;
  --accent: #f59a6d;
  font-family: "DM Sans", "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; }
body, button, input, select { font-size: 1rem; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; cursor: pointer; }
button, a, input, select { touch-action: manipulation; }
button:disabled { opacity: .58; cursor: progress; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #318374; outline-offset: 3px;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
button { border: 0; }
button, .button { font-weight: 650; }
.skip { position: fixed; left: 12px; top: -6rem; background: white; padding: 12px; z-index: 100; }
.skip:focus { top: 12px; }
.app-head { border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.head-inner { max-width: 1256px; min-height: 80px; padding: 0 48px; margin: auto; display: flex; align-items: center; gap: 36px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 780; font-size: 1.5rem; letter-spacing: -.065em; }
.brand-period { color: #bf5f36; }
.brand-mark { position: relative; width: 33px; height: 35px; display: inline-block; }
.brand-mark::before { content: ""; position: absolute; left: 10px; top: 0; width: 13px; height: 11px; border: 3px solid var(--teal); border-radius: 6px; }
.brand-mark::after { content: ""; position: absolute; inset: 6px 1px 1px; background: var(--teal); border-radius: 10px 10px 8px 8px; transform: rotate(-5deg); }
.brand-mark span { position: absolute; width: 16px; height: 7px; left: 9px; bottom: 7px; z-index: 1; border-radius: 2px 2px 4px 4px; background: var(--accent); transform: rotate(-5deg); }
.account-tools { margin-left: auto; }
.account-button { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: .91rem; font-weight: 600; background: transparent; min-height: 44px; padding: 0 5px; }
.account-button:hover, .text-button:hover { color: var(--ink); text-decoration: underline; }
.icon { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
main:focus { outline: none; }
.auth-wrap { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 24px; }
.auth-body { display: grid; justify-items: center; gap: 12px; width: min(100%, 20rem); }
.passkey-button {
  appearance: none; display: grid; place-items: center; width: 56px; height: 56px; padding: 0;
  color: var(--ink); background: transparent; border-radius: 50%;
}
.passkey-button .icon { width: 42px; height: 42px; stroke-width: 1.4; }
@media (hover: hover) { .passkey-button:hover { background: var(--pale); } }
.passkey-button:active { background: var(--pale); }
.auth-body .auth-form { width: 100%; }
.auth-body .form-error { margin: 0; text-align: center; }
.setup-link { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 8px; font-size: .94rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.home-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(#526e5a27 .75px, transparent .9px); background-size: 6px 6px; opacity: .55;
}
.hero-title, .page-title { font-weight: 720; font-size: clamp(2.25rem, 4.3vw, 3.7rem); letter-spacing: -.068em; line-height: 1.06; overflow-wrap: anywhere; }
.dialog-copy { color: var(--muted); line-height: 1.55; }
.auth-form, .edit-form { display: grid; gap: 17px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: var(--ink); font-size: .91rem; font-weight: 650; }
.field small { color: var(--muted); font-size: .87rem; font-weight: 450; }
.field input, .field select {
  width: 100%; min-width: 0; min-height: 49px; border: 1px solid #bfcbbf; border-radius: 9px; padding: 11px 13px;
  color: var(--ink); background: #fff; font-weight: 450; font-size: 1rem; line-height: 1.45;
}
.field input::placeholder { color: #758176; opacity: 1; }
.field input:focus, .field select:focus { border-color: #237764; }
.field select { appearance: none; padding-right: 38px; }
.select-wrap { position: relative; }
.select-wrap::after { position: absolute; right: 16px; top: 19px; content: ""; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
.password-wrap { display: block; position: relative; }
.password-wrap input { padding-right: 49px; }
.eye-button { position: absolute; background: transparent; right: 1px; top: 1px; bottom: 1px; width: 45px; display: grid; place-items: center; color: var(--muted); border-radius: 8px; }
.button { min-height: 48px; padding: 12px 19px; border-radius: 10px; display: inline-flex; gap: 9px; justify-content: center; align-items: center; font-size: 1rem; text-align: center; line-height: 1.35; transition: background .15s, border-color .15s; }
.primary { color: white; background: var(--teal); border: 1px solid var(--teal); }
.primary:hover { background: #103d34; }
.secondary { color: var(--ink); background: var(--surface); border: 1px solid #bbc8bc; }
.secondary:hover { background: #eef2e9; border-color: #91a997; }
.form-error { margin: 12px 0; padding: 10px 12px; background: #fff1e6; color: #85411f; font-size: .93rem; line-height: 1.5; border-radius: 7px; }
.form-error:empty { display: none; }
.text-button { background: transparent; min-height: 44px; padding: 8px; color: var(--teal); }
.loading { padding: 55px 24px; text-align: center; color: var(--muted); }
.load-error { padding: 70px 25px; text-align: center; }
.load-error p { margin-bottom: 18px; }
/* The pack, checklist and stamp are drawn in CSS so the illustration stays crisp offline. */
.pack-art { position: relative; width: 100%; isolation: isolate; pointer-events: none; }
.art-grid { position: absolute; width: 68%; height: 66%; left: 16%; top: 18%; border-radius: 50%; background-image: linear-gradient(#68877612 1px,transparent 1px),linear-gradient(90deg,#68877612 1px,transparent 1px); background-size: 19px 19px; transform: rotate(-12deg); }
.art-halo { position: absolute; width: 238px; height: 238px; background: #f2f3d8; border-radius: 48% 52% 55% 45%; top: calc(50% - 117px); left: calc(50% - 110px); transform: rotate(-17deg); }
.bag-scene { position: absolute; width: 217px; height: 235px; top: calc(50% - 114px); left: calc(50% - 116px); transform: rotate(-10deg); z-index: 2; }
.bag-scene > div { position: absolute; }
.bag-handle { width: 53px; height: 30px; border: 8px solid #214b41; left: 82px; top: 3px; border-radius: 22px 22px 3px 3px; background: transparent; transform: rotate(3deg); }
.bag-strap { border: 8px solid #224f43; width: 32px; height: 125px; left: 11px; top: 70px; border-radius: 80% 5px 10px 45%; transform: rotate(8deg); }
.bag-body { width: 173px; height: 203px; top: 22px; left: 26px; background: #4e8974; border: 2.5px solid #264f43; border-radius: 49px 53px 23px 27px; box-shadow: inset -10px -5px 0 #3b715f; }
.bag-gusset { width: 40px; height: 169px; top: 51px; left: 27px; background: #376b5b; border: 2px solid #294f42; transform: rotate(3deg); border-radius: 65% 20% 9px 20px; }
.bag-trim { width: 130px; height: 7px; background: #264e41; bottom: 19px; left: 61px; border-radius: 2px 6px 6px 7px; opacity: .7; }
.bag-cap { width: 146px; height: 82px; left: 54px; top: 24px; background: #69a088; border: 2.5px solid #2b5546; border-radius: 39px 50px 19px 15px; box-shadow: 0 4px 0 #366b56; transform: rotate(2deg); }
.bag-cap::after { content: ""; position: absolute; inset: 7px; border: 1.5px dashed #366f57; border-radius: 35px 40px 14px 11px; }
.bag-patch { width: 29px; height: 30px; top: 46px; left: 112px; background: #eda36e; border: 2px solid #6b6145; border-radius: 6px; transform: rotate(45deg); display: flex; gap: 4px; align-items: center; justify-content: center; }
.bag-patch i { width: 3px; height: 12px; background: #775c3d; border-radius: 2px; transform: rotate(-45deg); }
.bag-pocket { left: 75px; top: 142px; width: 101px; height: 57px; background: #e89163; border: 2px solid #584f37; border-radius: 12px 11px 15px 12px; box-shadow: 3px 4px 0 #376b53; transform: rotate(2deg); }
.bag-pocket::before { position: absolute; content: ""; height: 2px; background: #765f40; top: 12px; left: 6px; right: 6px; }
.bag-pocket::after { content: ""; border: 1px dashed #98633d; border-top: none; border-radius: 0 0 10px 10px; position: absolute; inset: 17px 5px 4px; }
.bag-band { left: 109px; top: 92px; height: 44px; width: 17px; background: #e39a62; border: 2px solid #625339; border-radius: 1px 1px 5px 5px; transform: rotate(2deg); }
.bag-buckle { left: 106px; top: 107px; width: 24px; height: 11px; border: 3px solid #254b3d; border-radius: 3px; transform: rotate(2deg); }
.bag-side { width: 30px; height: 50px; left: 22px; top: 147px; border: 2px solid #2a5646; border-top: 5px solid #b4c7a0; border-radius: 5px 4px 12px 12px; background: #477d65; transform: rotate(1deg); }
.art-shadow { position: absolute; width: 221px; height: 14px; background: #344d3d23; border-radius: 50%; top: calc(50% + 108px); left: calc(50% - 111px); transform: rotate(-3deg); }
.paper-slip { position: absolute; left: calc(50% + 62px); top: calc(50% + 59px); z-index: 3; height: 78px; width: 62px; padding: 16px 10px; border: 1.6px solid #7f8d73; background: #fff9e8; transform: rotate(13deg); border-radius: 3px; box-shadow: 3px 4px 0 #596e5726; }
.paper-slip i { position: relative; display: block; height: 7px; width: 7px; border: 1px solid #84957c; border-radius: 1px; margin-bottom: 9px; }
.paper-slip i::after { content: ""; position: absolute; left: 11px; top: 2px; width: 22px; height: 1.5px; background: #9daa8c; }
.paper-slip i:first-child::before, .paper-slip i:nth-child(2)::before { position: absolute; content: ""; width: 7px; height: 4px; left: 0; top: -1px; border: solid #315f4d; border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg); }
.art-stamp { position: absolute; left: calc(50% - 145px); top: calc(50% - 101px); width: 50px; height: 50px; border: 1.5px dashed #668a71; border-radius: 50%; transform: rotate(-13deg); }
.art-stamp::before { position: absolute; content: ""; inset: 4px; border: 1px solid #799b7e; border-radius: 50%; }
.art-stamp span { position: absolute; left: 14px; top: 15px; height: 12px; width: 21px; border: solid #6f9274; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.art-spark { width: 14px; height: 14px; background: #748a65; clip-path: polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%); position: absolute; }
.spark-a { left: calc(50% + 125px); top: calc(50% - 64px); }
.spark-b { left: calc(50% - 140px); top: calc(50% + 63px); width: 10px; height: 10px; }
/* Authenticated views */
#navigation { display: flex; align-items: center; gap: 4px; }
.nav-link { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; color: var(--muted); font-weight: 600; font-size: .94rem; border-radius: 9px; }
.nav-link[aria-current] { color: var(--ink); background: #e5ece2; }
.nav-link:hover { background: #edf1e9; }
.app-wrap { max-width: 1056px; margin: auto; padding: clamp(30px, 6vh, 64px) 48px 72px; }
.home-hero { position: relative; isolation: isolate; min-height: 215px; overflow: hidden; display: flex; align-items: center; background: #dcece2; border: 1px solid #c7d7c9; border-radius: 22px; padding: 35px 40px; }
.home-hero .pack-art { position: absolute; width: 320px; height: 300px; right: 1%; top: calc(50% - 150px); transform: scale(.66); }
.home-hero .hero-copy { z-index: 1; max-width: 70%; }
.home-date { color: var(--muted); font-weight: 600; margin: 0 0 13px; font-size: .94rem; }
.page-head { display: flex; justify-content: space-between; gap: 15px; align-items: center; }
.home-hero .button { min-height: 44px; margin-top: 19px; padding: 9px 14px; }
.group-title { font-size: 1.24rem; letter-spacing: -.025em; font-weight: 700; }
.collection-grid, .list-items { list-style: none; padding: 0; margin: 0; }
.collection-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 20px; }
.collection-card { display: flex; gap: 17px; align-items: center; min-height: 89px; height: 100%; padding: 17px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-weight: 670; font-size: 1.19rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
.collection-card:hover { border-color: #96ac9d; background: #fcfdf8; }
.folder-tile, .title-tile { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: #f8e2ca; color: #8a5637; }
.folder-tile .icon, .title-tile .icon { width: 26px; height: 26px; }
.collection-grid li:nth-child(3n + 2) .folder-tile { background: #dceadd; color: #3c6b51; }
.collection-grid li:nth-child(3n) .folder-tile { background: #e6e1ed; color: #715f7a; }
.page-head { align-items: center; margin: 16px 0 32px; flex-wrap: wrap; }
.page-head .page-title { font-size: clamp(2.3rem,4vw,3.3rem); }
.title-group { display: flex; align-items: center; min-width: 0; gap: 15px; }
.crumb { font-size: .94rem; font-weight: 600; color: var(--muted); display: inline-block; padding: 10px 0; text-decoration: underline; text-underline-offset: 3px; }
.group { margin: 28px 0; }
.group-title { margin: 0 0 12px; }
.list-items { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.list-row { display: flex; align-items: center; padding: 2px 9px 2px 0; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.check-item { cursor: pointer; min-width: 0; flex: 1; min-height: 65px; padding: 12px 13px 12px 17px; text-align: left; display: flex; gap: 13px; align-items: center; }
.check-item input { appearance: none; flex: none; width: 23px; height: 23px; margin: 0; border: 1.5px solid #929f92; border-radius: 7px; background: transparent; display: grid; place-content: center; }
.check-item input:checked { background: var(--teal); border-color: var(--teal); }
.check-item input:checked::after { content: ""; width: 11px; height: 7px; border: solid white; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.item-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.item-name { overflow-wrap: anywhere; font-size: 1.04rem; font-weight: 550; line-height: 1.4; }
.check-item input:checked + .item-copy .item-name { color: var(--muted); text-decoration: line-through; }
.item-collection { color: var(--muted); font-size: .87rem; }
.date-label { margin-left: auto; flex: none; color: #715138; background: #f9ecd9; border-radius: 6px; padding: 4px 7px; font-size: .875rem; line-height: 1.4; font-variant-numeric: tabular-nums; }
.icon-button { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; color: var(--muted); background: transparent; border-radius: 9px; }
.icon-button:hover { background: var(--pale); }
.empty { margin-top: 21px; padding: 35px 24px; background: var(--surface); border: 1px dashed #aebfb1; border-radius: 15px; text-align: center; }
.empty .icon { color: #688776; width: 30px; height: 30px; margin-bottom: 8px; }
.empty p { font-weight: 600; }
.empty .hint { font-size: .94rem; line-height: 1.5; color: var(--muted); margin-top: 6px; font-weight: 450; }
dialog { width: min(455px,calc(100% - 32px)); border: 1px solid var(--line); padding: 25px; color: var(--ink); background: var(--surface); border-radius: 19px; max-height: 87vh; max-height: 87dvh; overflow-y: auto; box-shadow: 0 18px 62px #123c3026; }
dialog::backdrop { background: #12372d56; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-header { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin: -4px -7px 16px 0; }
.dialog-header h2 { font-size: 1.42rem; font-weight: 700; letter-spacing: -.04em; }
.dialog-copy { margin: 0 0 19px; overflow-wrap: anywhere; }
.field-pair { display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px; }
.edit-form .form-error { margin: 0; }
.danger { color: #984728; }
.danger-solid { color: white; background: #95462c; }
.dialog-actions { display: flex; flex-direction: column; gap: 8px; }
.status:not(:empty) { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom)); border-radius: 11px; background: #183b33; color: white; padding: 12px 18px; max-width: min(90%,420px); width: max-content; z-index: 20; line-height: 1.4; }
@media (max-width: 850px) {
  .head-inner, .app-wrap { padding-left: 26px; padding-right: 26px; }
}
@media (max-width: 650px) {
  .head-inner { min-height: 63px; padding: 0 19px; gap: 16px; }
  .brand { font-size: 1.33rem; gap: 8px; }
  .brand-mark { transform: scale(.9); transform-origin: left center; margin-right: -2px; }
  #navigation { position: fixed; justify-content: center; gap: 5px; bottom: 0; left: 0; right: 0; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); z-index: 9; }
  .nav-link { flex: 1; justify-content: center; padding: 10px 8px; font-size: .9rem; }
  .app-wrap { padding: 19px 15px calc(85px + env(safe-area-inset-bottom)); }
  .home-hero { min-height: 140px; padding: 22px; border-radius: 16px; }
  .home-hero .hero-copy { max-width: 63%; }
  .home-hero .pack-art { right: -87px; transform: scale(.43); }
  .hero-title { font-size: clamp(1.72rem,7.3vw,2.75rem); }
  .home-date { font-size: .875rem; margin-bottom: 8px; }
  .home-hero .button { margin-top: 13px; padding: 8px 11px; font-size: .9rem; }
  .collection-grid { grid-template-columns: 1fr; }
  .collection-card { min-height: 77px; padding: 13px 16px; }
  .page-head { margin: 12px 0 23px; }
  .page-head .button { min-height: 45px; }
  .title-group { gap: 10px; }
  .title-tile { width: 40px; height: 40px; border-radius: 10px; }
  .group { margin-top: 20px; }
  .check-item { display: grid; grid-template-columns: 23px minmax(0,1fr); gap: 5px 11px; padding-left: 13px; }
  .check-item input { grid-row: 1 / span 2; }
  .date-label { grid-column: 2; margin: 0; justify-self: start; }
  .status:not(:empty) { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  .home-hero .pack-art { right: -110px; transform: scale(.33); }
  .field-pair { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; } }
