@import url("./tokens.css");
@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@500;600;700&family=Material+Symbols+Outlined:wght@400;600;700&display=swap");

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: clip; }
body {
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid var(--color-tertiary); outline-offset: 3px; }
.material-symbols-outlined { font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal; line-height: 1; vertical-align: middle; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 50; background: oklch(100% 0 0 / 0.9);
  backdrop-filter: blur(16px); border-bottom: var(--rule-thin) solid oklch(84% 0.035 205 / 0.55);
}
.nav { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); }
.brand { display: inline-flex; align-items: center; gap: var(--space-sm); min-width: 0; }
.brand img { height: 48px; width: auto; }
.nav-links { display: flex; gap: var(--space-xl); align-items: center; font-weight: 700; color: var(--color-muted); }
.nav-links a:hover { color: var(--color-primary); }
.menu-toggle { display: none; }
.search-shell { position: relative; width: min(360px, 36vw); }
.search-shell input {
  width: 100%; height: 46px; border: 2px solid var(--color-paper-blue); border-radius: var(--radius-pill);
  padding: 0 44px; background: var(--color-paper-soft); color: var(--color-ink);
}
.search-toggle {
  position: absolute; left: 7px; top: 50%; transform: translateY(-50%); z-index: 2; width: 34px; height: 34px;
  border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-primary);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.search-shell .search-icon { color: var(--color-primary); }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--color-paper);
  border: var(--rule-thin) solid var(--color-line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lift);
  padding: var(--space-xs); display: none; max-height: 390px; overflow: auto;
}
.search-results.is-open { display: block; }
.search-result { display: grid; gap: 2px; padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); }
.search-result + .search-result { border-top: var(--rule-thin) solid oklch(84% 0.035 205 / 0.55); border-top-left-radius: 0; border-top-right-radius: 0; }
.search-result:hover { background: var(--color-paper-soft); }
.search-result small { color: var(--color-primary); font-weight: 800; }
.hero {
  position: relative; isolation: isolate; padding: var(--space-3xl) 0; overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary-soft), var(--color-surface) 55%, var(--color-secondary-soft));
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.18;
  background-image: radial-gradient(var(--color-primary) 1.2px, transparent 1.2px), radial-gradient(var(--color-secondary) 1.2px, transparent 1.2px);
  background-size: 42px 42px; background-position: 0 0, 21px 21px;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr); gap: var(--space-2xl); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-xs); border-radius: var(--radius-pill);
  padding: 8px 14px; background: var(--color-paper); color: var(--color-primary); font-size: var(--text-sm);
  font-weight: 800; border: var(--rule-thin) solid oklch(46% 0.094 194 / 0.18);
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0; overflow-wrap: anywhere; }
h1 { font-size: var(--text-display); max-width: 820px; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
.lead { font-size: var(--text-lg); color: var(--color-muted); max-width: 670px; }
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: var(--space-md); align-items: center; }
.btn {
  border: 0; border-radius: var(--radius-pill); padding: 13px 22px; min-height: 48px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  font-weight: 800; transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { background: var(--color-primary); color: white; box-shadow: 0 10px 24px oklch(46% 0.094 194 / 0.22); }
.btn-secondary { background: var(--color-secondary); color: white; box-shadow: 0 10px 24px oklch(58% 0.178 20 / 0.22); }
.btn-ghost { background: var(--color-paper); color: var(--color-ink); border: 2px solid var(--color-paper-blue); }
.hero-image {
  border: 8px solid var(--color-paper); border-radius: var(--radius-xl); min-height: 330px; background: var(--color-paper-blue);
  overflow: hidden; box-shadow: var(--shadow-lift); transform: rotate(1.5deg);
}
.hero-image img { width: 100%; height: 100%; min-height: 330px; object-fit: cover; }
.section { padding: var(--space-3xl) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--space-lg); margin-bottom: var(--space-xl); }
.muted { color: var(--color-muted); }
.grid { display: grid; gap: var(--space-lg); }
.theme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.article-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.article-archive { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.article-card { padding: var(--space-xl); display: grid; gap: var(--space-md); align-content: start; transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out); }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.article-card h2 { font-size: var(--text-xl); margin-top: var(--space-sm); }
.article-card time { color: var(--color-muted); font-size: var(--text-sm); font-weight: 800; }
.card, .theme-card, .product-card {
  background: var(--color-paper); border: var(--rule-thin) solid oklch(84% 0.035 205 / 0.7);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); overflow: hidden;
}
.theme-card { padding: 10px; transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out); }
.theme-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.theme-card__image { aspect-ratio: 1.45; border-radius: var(--radius-md); background: var(--color-paper-blue); overflow: hidden; }
.theme-card__image img { width: 100%; height: 100%; object-fit: cover; }
.theme-card__body { padding: var(--space-lg); display: grid; gap: var(--space-xs); }
.badge { width: fit-content; border-radius: var(--radius-pill); padding: 4px 10px; font-size: var(--text-xs); font-weight: 800; background: var(--color-tertiary-soft); color: var(--color-ink); }
.product-card { display: grid; grid-template-rows: auto 1fr; transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out); }
.product-card { border: 0; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.product-media { width: 100%; aspect-ratio: 1; border: 0; background: var(--color-paper-soft); padding: 0; cursor: zoom-in; }
.product-media img { width: 100%; height: 100%; object-fit: contain; }
.product-body { padding: var(--space-md); display: grid; gap: var(--space-xs); }
.store-name { color: var(--color-muted); font-size: var(--text-xs); font-weight: 800; text-transform: uppercase; }
.sponsored-note { color: var(--color-muted); font-size: var(--text-xs); font-weight: 700; margin: 0; }
.product-title {
  font-size: var(--text-md); line-height: 1.25; min-height: 2.5em; max-height: 2.5em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.price-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-top: auto; }
.price { color: var(--color-primary); font-size: var(--text-xl); font-weight: 800; white-space: nowrap; }
.icon-btn {
  width: 42px; height: 42px; border-radius: var(--radius-pill); border: 0; background: var(--color-primary); color: white;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.filter-bar { position: sticky; top: 79px; z-index: 30; background: oklch(98.8% 0.012 292 / 0.92); backdrop-filter: blur(14px); border-block: var(--rule-thin) solid oklch(84% 0.035 205 / 0.7); }
.filters { display: flex; gap: var(--space-sm); overflow-x: auto; padding: var(--space-md) 0; }
.filter-chip { flex: 0 0 auto; border-radius: var(--radius-pill); padding: 10px 16px; background: var(--color-paper); border: var(--rule-thin) solid var(--color-line); font-weight: 800; }
.filter-chip.is-active { background: var(--color-primary); color: white; border-color: var(--color-primary); }
.tips { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--space-xl); align-items: start; }
.tip-list { display: grid; gap: var(--space-md); }
.tip { padding: var(--space-lg); }
.tip-card {
  --tip-tint: var(--color-primary-soft);
  --tip-accent: var(--color-primary);
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-md);
  align-items: start; background: linear-gradient(135deg, var(--tip-tint), var(--color-paper) 62%);
}
.tip-card p { grid-column: 2; margin: 0; }
.tip-card__media {
  width: 72px; height: 72px; border-radius: var(--radius-md); background: var(--color-paper);
  display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 0 0 1px oklch(20% 0.075 260 / 0.08);
}
.tip-card__media img { width: 100%; height: 100%; object-fit: cover; }
.tip-card__media .material-symbols-outlined { color: var(--tip-accent); font-size: 2.1rem; }
.tip-card__label { color: var(--tip-accent); font-size: var(--text-xs); font-weight: 900; text-transform: uppercase; }
.tip-card h3 { margin-top: 4px; }
.tip-color-secondary { --tip-tint: var(--color-secondary-soft); --tip-accent: var(--color-secondary); }
.tip-color-tertiary { --tip-tint: var(--color-tertiary-soft); --tip-accent: oklch(58% 0.12 82); }
.tip-color-blue { --tip-tint: var(--color-paper-blue); --tip-accent: oklch(50% 0.12 250); }
.tip-color-green { --tip-tint: oklch(91% 0.08 145); --tip-accent: oklch(48% 0.12 145); }
.color-dots { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-md); }
.color-dots-inline { margin-top: var(--space-sm); }
.color-dot { display: inline-flex; align-items: center; gap: var(--space-xs); border-radius: var(--radius-pill); background: var(--color-paper); padding: 6px 10px; border: var(--rule-thin) solid var(--color-line); font-weight: 800; }
.color-dot::before { content: ""; width: 16px; height: 16px; border-radius: var(--radius-pill); background: var(--dot-color, var(--color-primary)); border: var(--rule-thin) solid oklch(20% 0.075 260 / 0.2); }
.footer { background: var(--color-ink); color: white; padding: var(--space-2xl) 0; margin-top: var(--space-3xl); }
.footer a { color: oklch(91% 0.058 190); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--space-xl); align-items: start; }
.footer-links { justify-self: end; min-width: 180px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: oklch(20% 0.075 260 / 0.56); display: none; padding: var(--space-md); }
.modal-backdrop.is-open { display: grid; place-items: center; }
.modal { width: min(900px, 100%); max-height: min(760px, calc(100vh - 32px)); overflow: auto; background: var(--color-paper); border-radius: var(--radius-xl); box-shadow: var(--shadow-lift); }
.modal-content { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--space-xl); padding: var(--space-xl); }
.modal-media { background: var(--color-paper-soft); border-radius: var(--radius-lg); padding: var(--space-md); }
.modal-media img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.modal-close { position: sticky; top: var(--space-lg); margin-left: auto; transform: translateY(var(--space-lg)); margin-right: var(--space-lg); background: var(--color-paper-soft); color: var(--color-ink); }
.store-box { display: flex; gap: var(--space-md); align-items: center; padding: var(--space-md); border-radius: var(--radius-lg); background: var(--color-paper-soft); }
.store-box img { max-width: 96px; max-height: 42px; object-fit: contain; }
.article-body { max-width: 760px; font-size: var(--text-lg); }
.article-body > * + * { margin-top: var(--space-md); }
.article-body h2, .article-body h3, .article-body h4 { color: var(--color-ink); margin-top: var(--space-xl); }
.article-body h2 { font-size: var(--text-2xl); }
.article-body h3 { font-size: var(--text-xl); }
.article-body h4 { font-size: 1.25rem; }
.article-body p { margin-bottom: 0; }
.article-body a { color: var(--color-primary); font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.article-body ul, .article-body ol { padding-left: 1.35em; }
.article-body li + li { margin-top: var(--space-xs); }
.article-body ul.default-list, .article-body ul:not([class]) { list-style: none; padding-left: 0; }
.article-body ul.default-list li, .article-body ul:not([class]) li { position: relative; padding-left: 1.65em; }
.article-body ul.default-list li::before, .article-body ul:not([class]) li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 0.62em; height: 0.62em; border-radius: var(--radius-pill);
  background: var(--color-primary-bright); box-shadow: inset 0 0 0 2px var(--color-paper);
}
.article-body ul.balloon-list { list-style: none; padding-left: 0; }
.article-body ul.balloon-list li { position: relative; padding-left: 2em; }
.article-body ul.balloon-list li::before {
  content: ""; position: absolute; left: 0; top: 0.34em; width: 0.9em; height: 1.08em; border-radius: 50% 50% 48% 48%;
  background: var(--color-secondary); box-shadow: inset -2px -3px 0 oklch(20% 0.075 260 / 0.12);
}
.article-body ul.balloon-list li::after {
  content: ""; position: absolute; left: 0.38em; top: 1.28em; width: 1px; height: 0.72em; background: var(--color-line);
}
.article-body ul.check-list { list-style: none; padding-left: 0; }
.article-body ul.check-list li { position: relative; padding-left: 1.9em; }
.article-body ul.check-list li::before { content: "check_circle"; position: absolute; left: 0; top: 0.18em; color: var(--color-primary); font-family: "Material Symbols Outlined"; line-height: 1; }
.article-body .compact-list li + li { margin-top: var(--space-2xs); }
.empty { padding: var(--space-xl); text-align: center; background: var(--color-paper); border-radius: var(--radius-lg); border: var(--rule-thin) dashed var(--color-line); }
.load-more-row { display: flex; justify-content: center; margin-top: var(--space-xl); }
@media (max-width: 900px) {
  .nav { position: relative; gap: var(--space-sm); }
  .nav-links {
    display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
    background: var(--color-paper); border: var(--rule-thin) solid var(--color-line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lift); padding: var(--space-sm); color: var(--color-ink);
  }
  .nav-links.is-open { display: grid; gap: 2px; }
  .nav-links a { padding: 12px 14px; border-radius: var(--radius-md); }
  .nav-links a:hover { background: var(--color-paper-soft); }
  .menu-toggle {
    display: inline-flex; width: 46px; height: 46px; flex: 0 0 auto; align-items: center; justify-content: center;
    border: 2px solid var(--color-paper-blue); border-radius: var(--radius-pill); background: var(--color-paper); color: var(--color-primary);
  }
  .search-shell { width: min(300px, 48vw); margin-left: auto; }
  .hero-grid, .tips, .modal-content { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-self: start; }
  .theme-grid, .product-grid, .article-grid, .article-archive { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { align-items: start; flex-direction: column; }
}
@media (max-width: 560px) {
  .wrap { width: min(100% - 24px, 1180px); }
  .brand img { height: 40px; }
  .nav { height: auto; min-height: 70px; gap: var(--space-sm); }
  .search-shell { width: 46px; }
  .search-shell .search-toggle { left: 0; width: 46px; height: 46px; border: 2px solid var(--color-paper-blue); background: var(--color-paper); }
  .search-shell.is-expanded .search-toggle, .search-shell:focus-within .search-toggle { left: 7px; width: 34px; height: 34px; border: 0; background: transparent; }
  .search-shell input { opacity: 0; pointer-events: none; }
  .search-shell.is-expanded, .search-shell:focus-within { position: absolute; left: 0; right: 56px; top: calc(100% + 8px); width: auto; z-index: 70; }
  .search-shell.is-expanded input, .search-shell:focus-within input { opacity: 1; pointer-events: auto; background: var(--color-paper); box-shadow: var(--shadow-soft); }
  .search-results { top: calc(100% + 6px); }
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.65rem; }
  .hero { padding: var(--space-2xl) 0; }
  .theme-grid, .article-grid, .article-archive { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); }
  .tip-card { grid-template-columns: 56px minmax(0, 1fr); }
  .tip-card p { grid-column: 1 / -1; }
  .tip-card__media { width: 56px; height: 56px; }
  .product-body { padding: var(--space-sm); }
  .product-title { min-height: 2.5em; max-height: 2.5em; font-size: var(--text-sm); }
  .price { font-size: var(--text-md); }
  .icon-btn { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
