/* 多欢文旅图库 — palette and type follow duohuan.net.cn (warm paper, ink, orange accent, serif headings). */
:root {
  --paper: #f2eee5;
  --paper-2: #e7e1d4;
  --card: #faf8f3;
  --ink: #15140f;
  --ink-2: #55514a;
  --ink-3: #8b867b;
  --line: rgba(21, 20, 15, .14);
  --line-2: rgba(21, 20, 15, .08);
  --accent: #d6542a;
  --accent-ink: #b8441f;
  --ok: #2f7a4b;
  --warn: #a8611a;
  --bad: #b3261e;
  --img: #e2dccd;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --radius: 10px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.65 var(--sans); }
img { max-width: 100%; display: block; }
a { color: inherit; }
a:hover { color: var(--accent-ink); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 6px 12px; border-radius: 6px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 640px; padding-top: 40px; padding-bottom: 64px; }

/* ---------- buttons, tags, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .2s var(--ease), color .2s var(--ease); }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn.light:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.small { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: progress; }
.link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.link.strong { color: var(--accent-ink); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; font-size: 12px; line-height: 20px; padding: 0 8px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.tag.ok { background: #dcebdf; color: var(--ok); }
.tag.warn { background: #f3e2cc; color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--ink-2); background: transparent; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- header / footer ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(242, 238, 229, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; }
.brand-name { font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: .04em; }
.brand-sub { font-size: 13px; color: var(--accent-ink); font-weight: 600; letter-spacing: .1em; }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 20px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.who { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.who-name { font-size: 14px; font-weight: 600; text-decoration: none; max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-name::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.notice-bar { background: #f3e2cc; color: #6b3f11; font-size: 13px; padding: 8px 0; }
.notice-bar a { margin-left: 6px; font-weight: 600; }
.foot { margin-top: 64px; background: var(--ink); color: #f0ece2; padding: 48px 0 28px; }
.foot .muted { color: #a19c90; }
.foot a { color: #f0ece2; }
.foot a:hover { color: #f07a45; }
.foot-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; }
.foot-brand { font-family: var(--serif); font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.foot-contact { display: grid; grid-template-columns: 48px 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.foot-contact dt { color: #a19c90; }
.foot-contact dd { margin: 0; }
.foot-legal { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(240, 236, 226, .14); font-size: 12px; }

/* ---------- home ---------- */
.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 14px; font-size: 13px; letter-spacing: .14em; color: var(--accent-ink); font-weight: 600; }
.hero-title { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 5.2vw, 60px); line-height: 1.18; letter-spacing: .01em; }
.hero-lead { max-width: 36em; margin: 20px 0 28px; font-size: clamp(15px, 1.4vw, 17px); color: var(--ink-2); }
.hero-stats { margin: 16px 0 0; font-size: 14px; }
.hero-stats strong { color: var(--ink); font-size: 18px; font-family: var(--serif); }
.search { display: flex; flex-direction: row; gap: 8px; max-width: 560px; }
.search input { flex: 1; width: auto; min-width: 0; height: 48px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font: inherit; color: var(--ink); }
.search input:focus { outline: none; border-color: var(--ink); }
.search .btn { height: 48px; padding: 0 24px; }
.search.compact { margin-top: 20px; }
.search.compact input, .search.compact .btn { height: 42px; }
.section { padding: clamp(40px, 6vw, 72px) 0 0; }
.section.tight { padding-top: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-title { margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; }
.section-title.small { font-size: 20px; margin: 32px 0 14px; }
.more { font-size: 14px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.band { margin-top: clamp(48px, 7vw, 88px); background: var(--accent); color: #fff; padding: 36px 0; }
.band-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.band-title { margin: 0 0 4px; font-family: var(--serif); font-size: 26px; }
.band p { margin: 0; opacity: .9; }

/* ---------- lists ---------- */
.page-head { padding: 40px 0 8px; }
.page-title { margin: 0 0 6px; font-family: var(--serif); font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; }
.result-line { margin: 0 0 16px; font-size: 14px; }
.grid { display: grid; gap: clamp(12px, 1.6vw, 20px); }
.grid.singles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid.packages { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card { display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); overflow: hidden; text-decoration: none; box-shadow: 0 0 0 1px var(--line-2); transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.card:hover { color: inherit; box-shadow: 0 0 0 1px var(--line), 0 10px 28px rgba(21, 20, 15, .1); transform: translateY(-2px); }
.card-img { background: var(--img); overflow: hidden; display: grid; place-items: center; }
.card-img.square { aspect-ratio: 1; }
.card-img.wide { aspect-ratio: 16 / 9; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-img img { transform: scale(1.03); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.card-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.no-img { font-size: 13px; color: var(--ink-3); }
.empty { padding: 56px 0; text-align: center; color: var(--ink-2); }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 36px 0 0; font-size: 14px; }
.pager a, .pager span { min-width: 36px; height: 36px; padding: 0 10px; display: grid; place-items: center; border-radius: 999px; text-decoration: none; }
.pager a { border: 1px solid var(--line); }
.pager a:hover { border-color: var(--ink); }
.pager .on { background: var(--ink); color: var(--paper); }
.pager .gap { color: var(--ink-3); }

/* ---------- details ---------- */
.crumbs { display: flex; gap: 8px; padding-top: 22px; padding-bottom: 14px; font-size: 13px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }
.crumbs span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.viewer { position: relative; aspect-ratio: 4 / 3; background: var(--img); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; }
.viewer.wide { aspect-ratio: 16 / 9; }
.viewer.fit { aspect-ratio: auto; min-height: 240px; }
.viewer.fit img { height: auto; max-height: 82vh; }
.viewer img { width: 100%; height: 100%; object-fit: contain; }
[data-viewer] img { cursor: zoom-in; }
.locked-viewer img { object-fit: cover; filter: blur(2px) saturate(.9); transform: scale(1.04); }
.zoom { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.zoom img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.thumbs button { width: 72px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--img); cursor: pointer; }
.thumbs button.on { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-media .small { margin: 10px 0 0; }
.detail-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 88px; }
.detail-title { margin: 0; font-family: var(--serif); font-size: clamp(24px, 2.8vw, 34px); line-height: 1.3; font-weight: 700; }
.specs { display: grid; grid-template-columns: 76px 1fr; gap: 10px 14px; margin: 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 15px; }
.specs dt { color: var(--ink-3); }
.specs dd { margin: 0; min-width: 0; }
.specs .tag { margin-left: 8px; vertical-align: 1px; }
.locked { padding: 24px; border-radius: var(--radius); background: var(--card); box-shadow: 0 0 0 1px var(--line-2); }
.locked-title { margin: 0 0 4px; font-family: var(--serif); font-size: 20px; }
.locked p { margin: 0 0 16px; }
.locked-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fav { align-self: flex-start; }
.fav-icon { color: var(--ink-3); transition: color .2s var(--ease), transform .2s var(--ease); }
.fav[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-ink); }
.fav[aria-pressed="true"] .fav-icon { color: var(--accent); }
.fav[aria-pressed="true"]:hover { background: var(--accent); color: #fff; }
.fav[aria-pressed="true"]:hover .fav-icon { color: #fff; }
.grid.saved { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-bottom: 14px; }
.grid.packages.saved { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.contact-box { padding: 20px; border-radius: var(--radius); background: var(--ink); color: #f0ece2; }
.contact-box .muted { color: #a19c90; margin: 4px 0 14px; font-size: 14px; }
.contact-title { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.contact-box .btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.contact-box .btn:hover { background: #f07a45; border-color: #f07a45; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.products.hero { grid-template-columns: minmax(0, 320px); }
.product { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line-2); }
.product-img { aspect-ratio: 1; background: var(--img); display: grid; place-items: center; }
.product-img .zoom img { object-fit: cover; }
.product-body { padding: 10px 12px 12px; }
.product-name { font-weight: 600; font-size: 14px; line-height: 1.4; }

/* ---------- account / forms ---------- */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line-2); padding: 22px; margin: 20px 0; }
.panel-title { margin: 0 0 14px; font-size: 17px; }
.panel .specs { border: 0; padding: 0; }
.row-actions { margin-top: 16px; }
form { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
label .opt { font-weight: 400; color: var(--ink-3); margin-left: 6px; }
input { width: 100%; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: 15px var(--sans); color: var(--ink); }
input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21, 20, 15, .08); }
input[aria-invalid="true"] { border-color: var(--bad); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { margin: -6px 0 0; font-size: 12px; color: var(--ink-3); }
.form-error { margin: 0; color: var(--bad); font-size: 13px; }
.form-done { color: var(--ok); }

/* ---------- dialog / toast / lightbox ---------- */
.auth { width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 30px 28px 24px; border: 0; border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(21, 20, 15, .35); }
.auth::backdrop { background: rgba(21, 20, 15, .5); backdrop-filter: blur(3px); }
.auth[open] { animation: rise .3s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.auth-close { position: absolute; right: 12px; top: 10px; width: 34px; height: 34px; border: 0; background: none; font-size: 24px; line-height: 1; color: var(--ink-3); cursor: pointer; border-radius: 50%; }
.auth-close:hover { background: var(--paper-2); color: var(--ink); }
.auth-title { margin: 0 0 18px; font-family: var(--serif); font-size: 26px; }
.auth-lead { margin: 0 0 6px; font-size: 13px; color: var(--accent-ink); font-weight: 600; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--ink-2); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 60; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(14, 13, 11, .92); display: grid; place-items: center; padding: 24px; cursor: zoom-out; border: 0; width: 100%; height: 100%; max-width: none; max-height: none; }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 48px); object-fit: contain; border-radius: 6px; }

/* ---------- 自选出图 ---------- */
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.narrow-left { max-width: 720px; margin-left: 0; margin-right: auto; }
.steps-intro { list-style: none; counter-reset: s; margin: 8px 0 24px; padding: 0; display: grid; gap: 12px; }
.steps-intro li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; align-items: baseline; }
.steps-intro li::before { content: counter(s); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 14px; }
.diy { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(20px, 3vw, 40px); align-items: start; padding-top: 16px; }
.diy-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.diy-step + .diy-step { margin-top: 36px; }
.step-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 18px; }
.step-no { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 14px; flex: none; }
.diy-filter { margin-bottom: 16px; }
.diy-filter input { max-width: 360px; border-radius: 999px; padding: 0 16px; }
.pick-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pick { cursor: pointer; position: relative; }
.pick .card-img { position: relative; }
.pick-mark { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(250, 248, 243, .9); color: transparent; font-weight: 700; box-shadow: 0 0 0 1px var(--line); transition: background .2s var(--ease); }
.pick:has(input:checked) { box-shadow: 0 0 0 2px var(--accent); }
.pick:has(input:checked) .pick-mark { background: var(--accent); color: #fff; box-shadow: none; }
.pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick[hidden] { display: none; }
select, textarea { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: 15px var(--sans); color: var(--ink); }
select { height: 42px; padding: 0 10px; }
textarea { resize: vertical; line-height: 1.5; }
select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21, 20, 15, .08); }
input[type=file] { height: auto; padding: 8px; background: var(--card); }
.photo-preview { display: flex; align-items: flex-end; gap: 12px; }
.photo-preview img { max-width: 220px; max-height: 150px; border-radius: 8px; object-fit: cover; }
.quote { margin: 0; }
.quote.flat { padding: 18px; }
.quote-lines { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.quote-lines li { display: flex; align-items: center; gap: 8px; }
.q-name { flex: 1; min-width: 0; }
.q-price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button { width: 26px; height: 26px; border: 0; background: none; cursor: pointer; border-radius: 50%; font-size: 15px; line-height: 1; }
.qty button:hover { background: var(--paper-2); }
.qty span { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.q-remove { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 2px; }
.q-remove:hover { color: var(--bad); }
.quote-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0 4px; border-top: 1px solid var(--line); }
.quote-total strong { font-family: var(--serif); font-size: 22px; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.quote .btn { margin-top: 14px; }
.center { text-align: center; }
.notice { margin: 14px 0 0; padding: 10px 12px; border-radius: 8px; background: #f3e2cc; color: #6b3f11; }
.gen-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; text-align: center; max-width: 30em; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 860px) {
  .diy { grid-template-columns: 1fr; }
  .diy-side { position: static; }
}
@media (max-width: 640px) {
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .foot-row { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  .top-row { gap: 14px; height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 0; }
  .brand-name { font-size: 18px; }
  .who { margin-left: auto; }
  .nav { order: 3; width: 100%; gap: 20px; }
  .nav a { padding: 8px 0 10px; }
  .grid.singles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.packages { grid-template-columns: 1fr; }
  .card-body { padding: 10px 11px 12px; }
  .card-title { font-size: 14px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search .btn { padding: 0 18px; }
  .two { grid-template-columns: 1fr; }
  .band-row .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
