/* Shared page patterns */
.page { padding-bottom: 72px; }
.page-head {
  background: linear-gradient(180deg, #e8f0e2 0%, #f6e9d8 100%);
  padding: 52px 0 40px; text-align: center;
}
.page-head h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 10px; }
.page-head p { color: var(--ink-soft); max-width: 60ch; margin: 0 auto; }
.page-body { padding: 40px 0 0; }

/* Guide intro block (natural-language link context) */
.guide-intro {
  background: linear-gradient(180deg, #f4efe2 0%, #eef3ea 100%);
  border: 1px solid var(--line); border-left: 4px solid var(--moss);
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 28px;
  max-width: 76ch; color: var(--ink);
}
.guide-intro p { margin: 0 0 10px; line-height: 1.7; }
.guide-intro p:last-child { margin-bottom: 0; }
.guide-intro a { color: var(--moss-deep); font-weight: 600; text-underline-offset: 2px; }
.guide-intro .intro-links { margin-top: 6px; }
.guide-intro .intro-links a { display: inline-block; margin-right: 18px; }
.guide-intro .intro-links a::after { content: " →"; color: var(--ink-soft); }

/* Data provenance note (E-E-A-T) */
.data-note {
  max-width: 76ch; margin: 10px 0 28px; padding: 0;
  font-size: .82rem; color: var(--ink-soft); line-height: 1.6;
}
.data-note a { color: var(--moss-deep); }

/* Filter bar */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 28px; }
.filter-bar input[type="search"] {
  flex: 1 1 220px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-body); font-size: .96rem; background: var(--card); color: var(--ink);
}
.filter-bar input[type="search"]:focus { outline: 2px solid var(--moss); outline-offset: 1px; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-soft);
  font-family: var(--font-display); font-weight: 600; font-size: .88rem; padding: 8px 14px;
  border-radius: 999px; cursor: pointer; transition: .15s;
}
.chip:hover { border-color: var(--moss); color: var(--moss-deep); }
.chip.active { background: var(--moss-deep); border-color: var(--moss-deep); color: var(--paper); }
.switch-label { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--ink-soft); }
.switch-label input { position: absolute; opacity: 0; }
.switch {
  width: 40px; height: 22px; border-radius: 999px; background: #d8cdbb; position: relative; transition: .2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--card); transition: .2s;
}
.switch-label input:checked + .switch { background: var(--moss); }
.switch-label input:checked + .switch::after { left: 21px; }
.switch-label input:focus-visible + .switch { outline: 2px solid var(--moss); outline-offset: 2px; }

/* Villager grid */
.villager-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px;
}
.villager-card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); transition: transform .15s;
}
.villager-card:hover { transform: translateY(-3px); }
.villager-card.dateable { border-color: rgba(201,111,116,.45); }
.badge {
  position: absolute; top: 14px; right: 14px; background: var(--rose); color: var(--paper);
  font-family: var(--font-display); font-weight: 700; font-size: .72rem; padding: 4px 10px; border-radius: 999px;
}
.avatar {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--paper-deep);
  margin-bottom: 12px; border: 2px solid var(--line);
}
.avatar-empty {
  display: flex; align-items: center; justify-content: center; width: 64px; height: 64px;
  border-radius: 50%; background: var(--mint); color: var(--moss-deep);
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; margin-bottom: 12px;
}
.villager-card h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin: 0 0 2px; color: var(--dusk-deep); }
.occupation { color: var(--ink-soft); margin: 0 0 14px; font-size: .92rem; }
.facts { margin: 0 0 12px; display: grid; gap: 6px; }
.facts div { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.season { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .78rem; font-family: var(--font-display); font-weight: 700; }
.season.spring { background: #dcead2; color: #3f6b3a; }
.season.summer { background: #fde3c8; color: #a85f1e; }
.season.fall { background: #f3d9c8; color: #93491f; }
.season.winter { background: #d8e8f0; color: #2c5a75; }
.more { font-family: var(--font-display); font-weight: 700; font-size: .88rem; }
.loading, .empty { color: var(--ink-soft); font-style: italic; grid-column: 1 / -1; text-align: center; padding: 40px 0; }

/* Data tables (fish, museum, crops) */
.data-table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 640px; }
.data-table th {
  text-align: left; font-family: var(--font-display); font-weight: 700; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft);
  padding: 14px 16px; border-bottom: 2px solid var(--line); background: var(--paper-deep);
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: rgba(95,122,90,.06); }
.data-table .item-name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.data-table .item-name img { width: 34px; height: 34px; object-fit: contain; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-family: var(--font-display); font-weight: 700; background: var(--paper-deep); color: var(--ink-soft); }
.tag.rare { background: #fde3c8; color: #a85f1e; }
.tag.epic { background: #e3dcf5; color: #5e4a9e; }

/* Museum */
.museum-wing { margin-bottom: 36px; }
.museum-wing > h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; display: flex; align-items: center; gap: 10px; color: var(--dusk-deep); }
.museum-wing > h2 img { width: 40px; height: 40px; object-fit: contain; }
.museum-progress { height: 10px; background: var(--paper-deep); border-radius: 999px; overflow: hidden; margin: 10px 0 18px; }
.museum-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--moss), var(--peach)); border-radius: 999px; transition: width .3s; }
.museum-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.museum-set { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: none; }
.museum-set h3 { font-family: var(--font-display); font-weight: 700; font-size: .98rem; margin: 0 0 8px; color: var(--dusk-deep); }
.museum-set .set-items { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.museum-set .gift-tag { font-size: .78rem; }

/* Gift guide */
.gift-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.gift-sidebar { position: sticky; top: 84px; }
.gift-sidebar input[type="search"] {
  width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-body); font-size: .92rem; background: var(--card); color: var(--ink);
  margin-bottom: 12px;
}
.gift-sidebar input[type="search"]:focus { outline: 2px solid var(--moss); outline-offset: 1px; }
.gift-hint { font-size: .82rem; color: var(--ink-soft); margin: 0 0 12px; }
.gift-sidebar .filter-chips { flex-direction: column; }
.gift-sidebar .chip { text-align: left; }
.gift-result { display: grid; gap: 14px; }
.gift-person {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.gift-person-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.gift-person-head img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--paper-deep); }
.gift-person-head h3 { font-family: var(--font-display); font-weight: 700; margin: 0; color: var(--dusk-deep); }
.gift-person-head .birthday { font-size: .85rem; color: var(--ink-soft); }
.gift-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); }
.gift-row .level { font-family: var(--font-display); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.gift-row .level.loved { color: var(--rose); }
.gift-row .level.liked { color: var(--moss-deep); }
.gift-row .level.disliked { color: var(--ink-soft); }
.gift-row .level.hated { color: #9a4a4e; }
.gift-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.gift-tag { font-size: .82rem; background: var(--paper-deep); border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px; }
.gift-result-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--dusk-deep); margin: 0 0 14px; }
.gift-hit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--shadow); }
.gift-hit + .gift-hit { margin-top: 10px; }
.gift-hit .level { font-family: var(--font-display); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; min-width: 56px; }
.gift-hit .gift-hit-name { font-family: var(--font-display); font-weight: 700; color: var(--dusk-deep); min-width: 90px; }

/* Crops */
.crop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.crop-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.crop-card img { width: 56px; height: 56px; object-fit: contain; margin-bottom: 10px; }
.crop-card h3 { font-family: var(--font-display); font-weight: 700; margin: 0 0 4px; color: var(--dusk-deep); }
.crop-card .meta { font-size: .86rem; color: var(--ink-soft); display: grid; gap: 3px; }

@media (max-width: 900px) {
  .gift-layout { grid-template-columns: 1fr; }
  .gift-sidebar { position: static; }
  .gift-sidebar .filter-chips { flex-direction: row; }
}
