:root {
  --bg: #f7f4ed;
  --surface: #fffdf8;
  --text: #1c1b18;
  --muted: #6f6a61;
  --gold: #b78b36;
  --gold-soft: rgba(183, 139, 54, .48);
  --button: #eae2d3;
  --button-hover: #dbceb8;
  --recommend: #2e7151;
  --recommend-hover: #245c41;
}

html[data-color-scheme="dark"] {
  --bg: #161713;
  --surface: #1e201b;
  --text: #f5f0e6;
  --muted: #b9b3a8;
  --gold: #d7ad5d;
  --gold-soft: rgba(215, 173, 93, .52);
  --button: #30332c;
  --button-hover: #41453b;
  --recommend: #4d9a70;
  --recommend-hover: #62ac83;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
  transition: background .25s ease, color .25s ease;
}

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.content { width: min(100% - 40px, 1000px); margin: 0 auto; padding: clamp(96px, 14vh, 154px) 0 44px; flex: 1; }
.theme-switcher { position: fixed; z-index: 10; top: 18px; right: 18px; display: flex; gap: 3px; padding: 4px; border: 1px solid var(--gold-soft); border-radius: 999px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); }
.theme-button { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 17px; cursor: pointer; }
.theme-button:hover, .theme-button.is-active { background: var(--button); color: var(--text); }

.home-header { text-align: center; }
.avatar { width: clamp(82px, 12vw, 112px); aspect-ratio: 1; margin: 0 auto 27px; border: 1px solid var(--gold); border-radius: 50%; overflow: hidden; background: var(--button); display: grid; place-items: center; color: var(--muted); font-size: .75rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.project-title { margin: 0; font-size: clamp(2rem, 6vw, 4.8rem); font-weight: 700; line-height: .95; letter-spacing: -.075em; overflow-wrap: anywhere; }
.divider { border: 0; border-top: 1px solid var(--gold-soft); margin: 34px 0; }
.socials { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 3vw, 24px); }
.social-link { color: var(--text); display: grid; place-items: center; transition: color .2s, transform .2s; }
.social-link:hover { color: var(--gold); transform: translateY(-2px); }
.social-link svg { width: 25px; height: 25px; fill: currentColor; }

.link-list, .recommendation-list { width: min(100%, 620px); margin: 0 auto; display: grid; gap: 12px; }
.link-button { display: block; width: 100%; padding: 17px 22px; border: 1px solid transparent; border-radius: 8px; background: var(--button); color: var(--text); text-align: center; font: 500 .88rem "DM Mono", monospace; letter-spacing: .08em; text-decoration: none; cursor: pointer; transition: transform .2s, background .2s, border-color .2s; }
.link-button:hover { background: var(--button-hover); border-color: var(--gold-soft); transform: translateY(-2px); }
.link-button.recommendation { background: var(--recommend); color: white; }
.link-button.recommendation:hover { background: var(--recommend-hover); }
.ad-slot { margin: 4px auto 0; width: min(100%, 728px); }
.ad-slot:empty { display: none; }
.footer { width: min(100% - 40px, 1000px); margin: auto auto 0; padding: 22px 0 25px; border-top: 1px solid var(--gold-soft); color: var(--muted); text-align: center; font-size: .8rem; }

.subpage { width: min(100%, 690px); margin: 0 auto; }
.breadcrumb { color: var(--muted); font: .75rem "DM Mono", monospace; letter-spacing: .04em; }
.subpage-title { margin: 22px 0 13px; font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.06em; line-height: 1; }
.subpage-intro, .product-description { max-width: 62ch; margin: 0; color: var(--muted); line-height: 1.65; }
.back-button { margin-top: 34px; background: transparent; border-color: var(--gold-soft); }
.product-site { margin-top: 29px; color: var(--text); font: .85rem "DM Mono", monospace; word-break: break-all; }
.product-site a { color: inherit; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.discount { margin-top: 28px; padding: 18px; border: 1px solid var(--gold-soft); border-radius: 8px; background: var(--surface); }
.discount-label { margin: 0 0 9px; color: var(--muted); font: .7rem "DM Mono", monospace; letter-spacing: .1em; }
.discount-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.discount-code { font: 500 1rem "DM Mono", monospace; letter-spacing: .08em; overflow-wrap: anywhere; }
.copy-button { flex: 0 0 auto; padding: 8px 10px; border: 1px solid var(--gold-soft); border-radius: 5px; background: transparent; color: var(--text); cursor: pointer; font: .7rem "DM Mono", monospace; }
.copy-button:hover { background: var(--button); }

@media (max-width: 480px) { .content { width: min(100% - 28px, 1000px); } .footer { width: min(100% - 28px, 1000px); } }
