/* Shared foundations. Component styles live in catalog.css. */
:root {
  --paper: #fffcf7;
  --surface: #fff;
  --ink: #382b25;
  --brown: #79472f;
  --muted: #71655d;
  --line: #e5ded2;
  --gold: #e2b23d;
  --sage: #e4ece7;
  --red: #a8453a;
  --font:
    "Hiragino Maru Gothic ProN", "Hiragino Kaku Gothic ProN", "Yu Gothic",
    Meiryo, sans-serif;
  --radius: 18px;
  --shadow: 0 2px 4px #382b2504, 0 12px 28px #382b2508;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --motion-fast: 160ms;
  --motion-state: 220ms;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 800;
  line-height: 1.5;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
p {
  text-wrap: pretty;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
input,
select,
a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: #e2b23d26;
}
button {
  border: 0;
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button {
  transition:
    transform var(--motion-fast) var(--ease-out),
    background-color var(--motion-state),
    border-color var(--motion-state),
    color var(--motion-state);
}
button:not(:disabled):active {
  transform: scale(0.97);
}
:focus-visible {
  outline: 3px solid var(--brown);
  outline-offset: 4px;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 30;
  background: var(--brown);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}
.section-wrap {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 40px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
}
.section-heading h2 {
  font-size: 30px;
  letter-spacing: 0.015em;
}
.section-note {
  font-size: 13px;
  color: var(--brown);
  margin-bottom: 6px;
}
.primary-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}
.primary-button {
  background: var(--brown);
  color: white;
}
.outline-button {
  border: 1px solid #ad9481;
  color: var(--brown);
}
.theme-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}
.site-header {
  height: 86px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.header-inner {
  max-width: 1240px;
  padding-inline: 40px;
  margin: auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--brown);
  font-size: 29px;
  font-weight: 900;
  letter-spacing: -0.09em;
  line-height: 1.05;
  white-space: nowrap;
}
.brand small {
  font-size: 9px;
  letter-spacing: 0.16em;
  display: block;
  text-align: center;
  margin-top: 5px;
}
.brand-mark {
  color: var(--gold);
  transform: rotate(-12deg);
}
.brand-mark svg {
  width: 34px;
  height: 34px;
}
.header-inner nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
}
.header-inner nav a {
  padding-block: 10px;
}
.saved-link {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.saved-link svg {
  width: 20px;
  height: 20px;
}
.save-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  box-shadow: 0 2px 8px #382b2508;
  z-index: 2;
}
.save-button svg {
  width: 19px;
  height: 19px;
  transition:
    transform var(--motion-state) var(--ease-out),
    fill var(--motion-state);
  fill: transparent;
}
.save-button[aria-pressed="true"] {
  color: var(--red);
  border-color: #dba49b;
  background: #fff0ed;
}
.save-button[aria-pressed="true"] svg {
  fill: var(--red);
  transform: scale(1.08);
}
footer {
  border-top: 1px solid var(--line);
  padding: 40px 40px 20px;
  background: #f4f1ea;
}
.footer-inner,
.footer-bottom,
.affiliate-footer {
  max-width: 1160px;
  margin-inline: auto;
}
.footer-inner,
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.footer-inner p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
}
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
}
.footer-links a {
  padding-block: 8px;
}
.affiliate-footer {
  font-size: 12px;
  color: var(--muted);
  margin-top: 24px;
}
.footer-bottom {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
}
.toast {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 13px;
  z-index: 20;
  transition:
    opacity var(--motion-state),
    transform var(--motion-state) var(--ease-out);
  width: max-content;
  max-width: calc(100% - 32px);
  text-align: center;
  box-shadow: var(--shadow);
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.info-page {
  max-width: 880px;
  padding-top: 48px;
  padding-bottom: 80px;
}
.info-page > .section-note {
  margin-top: 32px;
}
.info-page h1 {
  font-size: 34px;
  margin: 12px 0 36px;
}
.info-page section {
  margin: 32px 0;
}
.info-page section h2 {
  font-size: 22px;
  margin-bottom: 12px;
}
.info-page p {
  line-height: 2;
}
.info-page p a {
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
.info-mascot {
  width: 160px;
  object-fit: contain;
  float: right;
  margin: 0 0 24px 24px;
}
.error-page {
  text-align: center;
  padding-top: 48px;
  padding-bottom: 80px;
}
.error-page img {
  margin: 0 auto 20px;
  object-fit: contain;
}
.error-page h1 {
  font-size: 28px;
}
.error-page p {
  margin: 16px 0;
  color: var(--muted);
}
.error-page .primary-button {
  margin-top: 20px;
}
@media (hover: hover) and (pointer: fine) {
  .header-inner nav a:hover,
  .footer-links a:hover,
  .saved-link:hover {
    color: var(--brown);
    text-decoration: underline;
    text-underline-offset: 5px;
  }
  .save-button:hover {
    border-color: var(--red);
    color: var(--red);
  }
  .outline-button:hover {
    background: white;
  }
  .primary-button:hover {
    background: #603521;
  }
}
@media (max-width: 1000px) {
  .section-wrap,
  .header-inner {
    padding-inline: 28px;
  }
  .header-inner {
    gap: 20px;
  }
  .header-inner nav {
    gap: 18px;
  }
  .footer-inner {
    align-items: flex-start;
  }
  .footer-links {
    max-width: 440px;
  }
}
@media (max-width: 700px) {
  .section-wrap,
  .header-inner {
    padding-inline: 20px;
  }
  .site-header {
    height: 72px;
  }
  .header-inner nav {
    display: none;
  }
  .brand {
    font-size: 26px;
  }
  .brand-mark svg {
    width: 30px;
    height: 30px;
  }
  .saved-link {
    margin-left: auto;
    border: 0;
    padding: 10px;
    background: #f2ede4;
    border-radius: 50%;
  }
  .saved-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .section-heading {
    gap: 12px;
    align-items: center;
  }
  .section-heading h2 {
    font-size: 24px;
  }
  .section-note {
    font-size: 12px;
  }
  footer {
    padding: 32px 20px 24px;
  }
  .footer-inner {
    flex-direction: column;
  }
  .footer-links {
    gap: 4px 18px;
  }
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .info-page {
    padding-top: 32px;
  }
  .info-page h1 {
    font-size: 28px;
  }
  .info-page section h2 {
    font-size: 20px;
  }
  .info-mascot {
    width: 110px;
  }
  .theme-icon {
    width: 40px;
    height: 40px;
  }
}
@media (max-width: 360px) {
  .section-wrap,
  .header-inner {
    padding-inline: 16px;
  }
  .section-heading h2 {
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
