@font-face {
  font-family: Bitter;
  src: url('/assets/fonts/bitter.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --paper: #000000;
  --surface: #12100c;
  --raised: #211a10;
  --ink: #f4b41b;
  --accent: #f47e1b;
  --accent-surface: #2b1a0d;
  --line: #493017;
  --highlight: #f4b41b;
  --muted: #c8ab7e;
  --button: #f4b41b;
  --radius: 3px;
  color-scheme: dark;
  font-family: Bitter, Georgia, serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 104px; }
body { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .55; }
a, button, input { outline-offset: 5px; }
:focus-visible { outline: 2px solid var(--highlight); }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
.wrap { max-width: 1180px; margin-inline: auto; padding-inline: 32px; }
.skip { position: fixed; top: -100px; left: 12px; background: var(--raised); padding: 12px; z-index: 99; }
.skip:focus { top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 0; }
.header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: block; max-width: 235px; flex-shrink: 0; }
.brand .brand-logo { width: 235px; height: auto; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 13px; padding-block: 12px; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--highlight); }
.cart-toggle { border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 12px; background: var(--surface); white-space: nowrap; font-size: 12px; display: flex; align-items: center; gap: 10px; }
.cart-toggle:hover { border-color: var(--accent); }
.cart-toggle svg { flex-shrink: 0; }
.cart-count { color: var(--highlight); min-width: 16px; font-size: 12px; }

.home-banner { position: relative; width: 100%; background: #000; }
.home-banner::after { content: ""; position: absolute; inset: auto 0 0; height: 14%; background: linear-gradient(transparent,#000); pointer-events: none; }
.home-banner img { width: 100%; max-width: none; height: auto; border: 0; }
.eyebrow { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--highlight); margin: 0 0 14px; line-height: 1.6; }
h1, h2 { font-family: Bitter, Georgia, serif; font-weight: 400; }
h2 { font-size: 38px; line-height: 1.12; letter-spacing: -.6px; margin: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 20px; padding: 13px 20px; border-radius: var(--radius); border: 1px solid var(--accent); font-size: 13px; text-decoration: none; line-height: 1.5; }
.primary { background: var(--button); color: #000; border-color: var(--button); }
.primary:hover:not(:disabled) { background: #ffcc54; }
.secondary { background: transparent; color: var(--accent); }
.secondary:hover { background: var(--accent-surface); }
.text-link { color: var(--accent); font-size: 13px; line-height: 1.6; }

.shop-section { padding-top: 38px; padding-bottom: 54px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; }
.small-note { font-size: 12px; line-height: 1.6; text-align: right; color: var(--muted); margin: 0; }
.shop-toolbar { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filter { background: var(--surface); border: 1px solid var(--line); padding: 9px 15px; border-radius: var(--radius); font-size: 12px; }
.filter:hover { border-color: var(--accent); }
.filter.active { background: #352610; border-color: var(--highlight); color: var(--ink); }
.filter span { font-size: 10px; color: var(--highlight); margin-left: 4px; }
.search input { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); padding: 9px 13px; font-size: 12px; width: 210px; }
.search input::placeholder { color: var(--muted); }
.shop-status { font-size: 12px; color: var(--muted); margin: 0 0 22px; line-height: 1.6; }
.product-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 28px 18px; }
.product-card { min-width: 0; }
.product-image { display: block; position: relative; overflow: hidden; aspect-ratio: 1; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.product-image .alternate { position: absolute; inset: 0; opacity: 0; }
@media (hover:hover) { .product-image:hover .alternate { opacity: 1; } }
.product-category { font-size: 9px; color: var(--highlight); text-transform: uppercase; letter-spacing: 1.2px; margin: 14px 0 7px; }
.product-card h3 { font-size: 13px; font-weight: 400; line-height: 1.5; margin: 0 0 11px; min-height: 39px; }
.product-card h3 a { text-decoration: none; }
.product-card h3 a:hover { text-decoration: underline; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-size: 15px; }
.add-button { border: 1px solid var(--accent); color: var(--accent); background: transparent; border-radius: var(--radius); padding: 7px 11px; font-size: 12px; }
.add-button:hover:not(:disabled) { background: var(--accent-surface); }
.badge { position: absolute; left: 10px; top: 10px; background: var(--surface); padding: 5px 9px; border: 1px solid var(--line); font-size: 10px; z-index: 1; }

.site-footer { border-top: 1px solid var(--line); padding-top: 24px; padding-bottom: 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.site-footer p { margin: 0; }
.site-footer .footer-name { font-family: Georgia,serif; font-size: 20px; color: var(--accent); text-decoration: none; }

.about-page { max-width: 790px; padding-top: 28px; padding-bottom: 56px; }
.about-copy { display: flow-root; font-size: 16px; line-height: 1.85; }
.about-copy p { margin: 0 0 28px; }
.about-copy p:last-child { margin-bottom: 0; }
.about-ofuda { float: left; width: clamp(80px,18vw,116px); height: auto; margin: 0 24px 16px 0; }
.almanac-page { padding-top: 28px; padding-bottom: 42px; }
.almanac-pages { max-width: 1100px; margin-inline: auto; }
.almanac-pages img { display: block; width: 100%; height: auto; margin: 0; border: 0; }
.page-heading { margin-bottom: 36px; }
.page-heading h1 { font-size: 46px; color: var(--ink); line-height: 1.1; margin: 0; }
.page-heading .eyebrow { margin-bottom: 9px; }
.quiz-page { padding-top: 36px; padding-bottom: 42px; }
.quiz-frame { border: 1px solid var(--line); background: #15121a; }
.quiz-frame iframe { width: 100%; height: clamp(640px,85svh,960px); display: block; border: 0; }
.embed-note { margin: 16px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.embed-note a { color: var(--accent); }

/* Cart and product pages share the same surfaces and spacing rules. */
dialog { border: none; padding: 0; color: var(--ink); background: var(--surface); }
dialog::backdrop { background: #000000b3; }
.cart-dialog { margin: 0 0 0 auto; width: min(460px,100%); height: 100dvh; max-height: 100dvh; max-width: 100%; border-left: 1px solid var(--line); }
.cart-shell { display: flex; flex-direction: column; height: 100%; padding: 24px; }
.cart-heading { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.cart-heading h2 { font-size: 30px; }
.icon-button { border: 1px solid var(--line); border-radius: var(--radius); background: transparent; width: 34px; height: 34px; display: grid; place-items: center; font-size: 21px; line-height: 1; }
.cart-items { overflow: auto; flex: 1; padding-top: 10px; }
.cart-line { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-line img { border-radius: var(--radius); width: 72px; aspect-ratio: 1; object-fit: cover; }
.cart-line h3 { font-size: 13px; font-weight: 400; margin: 0 0 8px; line-height: 1.5; }
.cart-line p { font-size: 12px; margin: 0 0 10px; color: var(--muted); }
.quantity-row { display: flex; align-items: center; gap: 9px; }
.qty-button { width: 27px; height: 27px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); font-size: 16px; }
.quantity-row output { min-width: 16px; text-align: center; font-size: 12px; }
.remove-button { margin-left: auto; border: 0; background: transparent; text-decoration: underline; color: var(--muted); font-size: 11px; }
.cart-empty { padding: 45px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.cart-summary { padding-top: 22px; }
.subtotal { display: flex; justify-content: space-between; font-size: 16px; }
.cart-summary .button { width: 100%; margin-top: 8px; }
.cart-fineprint { font-size: 12px; color: var(--muted); line-height: 1.6; }
.cart-error { color: #f0a8b3; font-size: 12px; line-height: 1.6; }
.cart-summary .continue { display: block; border: 0; background: transparent; margin: 12px auto 0; text-decoration: underline; font-size: 12px; color: var(--muted); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%,12px); z-index: 10; background: var(--raised); border: 1px solid var(--accent); color: var(--ink); padding: 12px 20px; font-size: 13px; border-radius: var(--radius); opacity: 0; pointer-events: none; transition: opacity .15s,transform .15s; max-width: calc(100% - 32px); width: max-content; }
.toast.visible { opacity: 1; transform: translate(-50%,0); }
body.cart-open { overflow: hidden; }
.product-page { padding-top: 34px; padding-bottom: 64px; }
.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 28px; display: block; }
.product-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 54px; align-items: start; }
.detail-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius); }
.thumbnail-row { display: flex; gap: 10px; margin-top: 12px; }
.thumbnail { border: 2px solid transparent; background: transparent; border-radius: var(--radius); padding: 3px; width: 70px; }
.thumbnail.active { border-color: var(--accent); }
.thumbnail img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.detail-copy { padding-top: 18px; }
.detail-copy h1 { font-size: 44px; line-height: 1.1; letter-spacing: -.6px; margin: 0 0 22px; }
.detail-price { font-size: 24px; margin: 0 0 20px; }
.detail-price small { font-size: 12px; color: var(--muted); }
.description { line-height: 1.8; font-size: 15px; margin-bottom: 24px; }
.detail-copy .button { width: 100%; margin-bottom: 12px; }
.detail-note { font-size: 12px; color: var(--muted); line-height: 1.6; }
.return-page { padding-top: 65px; padding-bottom: 85px; max-width: 720px; min-height: 65vh; }
.return-page h1 { font-size: 44px; color: var(--accent); }
.return-page p { line-height: 1.8; font-size: 14px; }
.return-page .button { margin-top: 20px; }

@media (max-width: 950px) {
  .header-inner { gap: 16px; }
  .brand { max-width: 205px; }
  .nav { gap: 16px; }
  .nav a { font-size: 12px; }
  .cart-label { display: none; }
  .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .product-detail { gap: 30px; }
  .detail-copy h1 { font-size: 35px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 130px; }
  .header-inner { display: grid; grid-template-columns: 1fr auto; gap: 0 16px; padding-top: 16px; padding-bottom: 0; }
  .brand { max-width: 210px; }
  .cart-toggle { grid-column: 2; grid-row: 1; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; gap: 26px; margin: 10px 0 0; padding-bottom: 5px; }
  .nav a { font-size: 12px; padding-block: 10px; }
}
@media (max-width: 680px) {
  .wrap { padding-inline: 20px; }
  .shop-section { padding-top: 28px; }
  .section-heading { align-items: start; margin-bottom: 20px; }
  h2 { font-size: 30px; }
  .small-note { display: none; }
  .shop-toolbar { gap: 14px; }
  .filter { padding: 8px 12px; font-size: 11px; }
  .search { width: 100%; }
  .search input { width: 100%; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 14px; }
  .product-card h3 { font-size: 12px; min-height: 37px; }
  .product-category { font-size: 8px; }
  .price { font-size: 14px; }
  .add-button { font-size: 11px; padding: 7px 9px; }
  .site-footer { align-items: start; flex-wrap: wrap; gap: 12px; }
  .site-footer .footer-name { width: 100%; }
  .product-detail { grid-template-columns: 1fr; gap: 10px; }
  .detail-copy h1 { font-size: 37px; }
  .product-page { padding-top: 25px; }
  .cart-shell { padding: 20px; }
  .about-page, .almanac-page, .quiz-page { padding-top: 28px; }
  .about-copy { font-size: 15px; }
  .about-ofuda { margin-right: 18px; }
  .page-heading h1 { font-size: 38px; }
  .quiz-frame iframe { height: max(640px,80svh); }
}
@media (max-width: 375px) {
  .nav { gap: 18px; }
  .nav a { font-size: 11px; }
  .brand { max-width: 185px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
