:root {
  color-scheme: light;
  --paper: #fffaf0;
  --paper-deep: #f7e7c6;
  --ink: #2b251d;
  --muted: #736651;
  --line: #dfc895;
  --shelf: #fff4d9;
  --green: #4f8f63;
  --green-deep: #2f6844;
  --blue: #4b7eac;
  --yellow: #f2c75c;
  --shadow: 0 18px 44px rgba(101, 75, 32, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(180deg, rgba(79, 143, 99, 0.14), transparent 340px),
    repeating-linear-gradient(90deg, rgba(223, 200, 149, 0.18) 0 1px, transparent 1px 76px),
    var(--paper);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  line-height: 1.7;
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site-header {
  background: rgba(255, 250, 240, 0.94);
  border-bottom: 1px solid rgba(115, 102, 81, 0.2);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner,
.footer-inner {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1560px;
  padding: 14px 24px;
}

.brand {
  display: inline-grid;
  text-decoration: none;
}

.brand strong {
  font-size: 18px;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.nav,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.nav a,
.button {
  align-items: center;
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  text-decoration: none;
}

button.button {
  cursor: pointer;
}

.nav a:hover,
.button:hover,
.mode-card:hover,
.recommend-card:hover,
.plain-links a:hover {
  border-color: var(--green);
}

.button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.button.small {
  min-height: 36px;
  white-space: nowrap;
}

.page-shell {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(110px, 150px) minmax(0, 1fr) minmax(110px, 150px);
  margin: 0 auto;
  max-width: 1560px;
  padding: 22px 24px 44px;
}

main {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.ad-rail {
  min-width: 0;
}

.ad-box {
  align-items: center;
  background: rgba(255, 253, 250, 0.75);
  border: 1px dashed rgba(115, 102, 81, 0.28);
  border-radius: var(--radius);
  color: var(--muted);
  display: flex;
  font-size: 12px;
  justify-content: center;
  min-height: 240px;
  position: sticky;
  top: 76px;
}

.hero,
.panel,
.shelf-section {
  background: rgba(255, 253, 250, 0.92);
  border: 1px solid rgba(115, 102, 81, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}

.hero {
  padding: clamp(28px, 5vw, 56px);
}

.eyebrow {
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.12;
  margin-bottom: 10px;
}

h2 {
  font-size: clamp(22px, 3vw, 31px);
  line-height: 1.25;
  margin-bottom: 8px;
}

h3 {
  font-size: 18px;
  line-height: 1.35;
  margin-bottom: 8px;
}

.tagline {
  font-size: clamp(19px, 2.8vw, 28px);
  font-weight: 900;
  margin-bottom: 12px;
}

.lead {
  color: var(--muted);
  font-size: 16px;
  max-width: 820px;
}

.lead span {
  display: block;
}

.hero-actions,
.shelf-random-grid,
.plain-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.panel,
.shelf-section {
  padding: 22px;
}

.section-head,
.shelf-header {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-head p,
.shelf-header p,
.mode-card p,
.recommend-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.recommend-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recommend-card,
.mode-card,
.plain-links a {
  background: #fffdfa;
  border: 1px solid rgba(115, 102, 81, 0.18);
  border-radius: var(--radius);
  text-decoration: none;
}

.recommend-card {
  display: block;
  padding: 16px;
}

.recommend-card span,
.mode-card span {
  background: rgba(79, 143, 99, 0.12);
  border: 1px solid rgba(79, 143, 99, 0.22);
  border-radius: 999px;
  color: var(--green-deep);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 10px;
  padding: 3px 8px;
}

.shelf-section {
  overflow: hidden;
}

.shelf-section::before {
  background: linear-gradient(90deg, var(--green), var(--yellow));
  content: "";
  display: block;
  height: 4px;
  margin: -22px -22px 18px;
}

.mode-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mode-card {
  display: grid;
  min-height: 184px;
  padding: 16px;
}

.mode-card strong {
  align-self: end;
  color: var(--green-deep);
  font-size: 14px;
  margin-top: 16px;
}

.plain-links a {
  font-weight: 800;
  padding: 10px 12px;
}

.site-footer {
  border-top: 1px solid rgba(115, 102, 81, 0.18);
}

.site-footer p {
  color: var(--muted);
  margin-bottom: 0;
}

@media (max-width: 1100px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .ad-rail {
    display: none;
  }

  .mode-grid,
  .recommend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  h1,
  h2,
  h3,
  p {
    line-break: anywhere;
    word-break: break-all;
  }

  .header-inner,
  .footer-inner,
  .section-head,
  .shelf-header {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
    width: 100%;
  }

  .nav a {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

  .page-shell {
    padding: 14px 12px 32px;
    width: 100%;
  }

  .hero,
  .panel,
  .shelf-section {
    max-width: 100%;
    padding: 18px;
    width: 100%;
  }

  .shelf-section::before {
    margin: -18px -18px 16px;
  }

  .mode-grid,
  .recommend-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions .button,
  .shelf-random-grid .button,
  .plain-links a {
    width: 100%;
  }

  .mode-card {
    min-height: auto;
  }
}
