:root {
  --paper: #f7f2ec;
  --paper-deep: #eee4da;
  --ink: #292521;
  --muted: #7a7068;
  --line: rgba(64, 51, 41, 0.11);
  --brown: #8b634b;
  --brown-dark: #684633;
  --white: rgba(255, 255, 255, 0.82);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 5% 2%, rgba(181, 137, 106, 0.14), transparent 28%),
    radial-gradient(circle at 95% 18%, rgba(255, 255, 255, 0.95), transparent 26%),
    var(--paper);
}

button, a { -webkit-tap-highlight-color: transparent; }

.page-shell {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 18px max(38px, env(safe-area-inset-bottom));
}

.hero { text-align: center; padding: 20px 8px 24px; }

.eyebrow {
  color: var(--brown);
  font-family: Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.25em;
  margin-bottom: 18px;
}

.camera-mark {
  width: 48px;
  height: 36px;
  margin: 0 auto 18px;
  border: 1.7px solid var(--brown);
  border-radius: 7px;
  position: relative;
}

.camera-mark::before {
  content: "";
  position: absolute;
  left: 9px;
  top: -6px;
  width: 13px;
  height: 6px;
  border: 1.7px solid var(--brown);
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.camera-mark span {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1.7px solid var(--brown);
  border-radius: 50%;
  inset: 0;
  margin: auto;
}

h1 { font-family: "Songti SC", "STSong", serif; font-size: 30px; font-weight: 600; letter-spacing: .08em; margin: 0 0 10px; }
.hero > p { color: var(--muted); font-size: 14px; margin: 0; }

.gift-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(139, 99, 75, .2);
  border-radius: 999px;
  color: var(--brown-dark);
  background: rgba(255, 255, 255, .48);
  font-size: 13px;
}

.gift-chip strong { margin-right: 4px; }

.card {
  padding: 21px;
  margin-bottom: 14px;
  background: var(--white);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 22px;
  box-shadow: 0 12px 35px rgba(75, 57, 43, .07);
  backdrop-filter: blur(12px);
}

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-head > div { display: flex; align-items: center; gap: 10px; }
.step { color: var(--brown); font: italic 18px Georgia, serif; }
h2 { margin: 0; font-size: 17px; font-weight: 600; }
.helper { margin: 8px 0 15px 34px; color: #948a82; font-size: 12px; }

.text-button {
  padding: 7px 10px;
  border: 0;
  color: var(--brown);
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}

blockquote {
  min-height: 116px;
  margin: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(247, 242, 236, .58);
  color: #534b45;
  font-size: 14px;
  line-height: 1.85;
}

.copy-button {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 13px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #9a725a, #75503a);
  box-shadow: 0 8px 18px rgba(104, 70, 51, .18);
  font-size: 15px;
  cursor: pointer;
}

.copy-button:active { transform: translateY(1px); }
.copy-button.copied { background: #637a65; }

.platform-list { display: grid; gap: 10px; }
.platform {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: inherit;
  background: rgba(255,255,255,.65);
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.platform.active { border-color: rgba(255, 194, 0, .5); box-shadow: 0 5px 16px rgba(255, 194, 0, .10); }
.platform.active { cursor: pointer; }
.platform.disabled { cursor: pointer; opacity: .62; }
.platform-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #222;
  background: #ffd62c;
  font-size: 18px;
  font-weight: 700;
}
.platform-logo.dianping { color: #fff; background: #ff7058; }
.platform-logo.redbook { color: #fff; background: #ff2442; }
.platform-logo.douyin { color: #fff; background: #19191b; text-shadow: 2px 0 #ff245d, -2px 0 #20e7e1; }
.platform-info { display: grid; gap: 4px; flex: 1; }
.platform-info strong { font-size: 15px; }
.platform-info small { color: #968c84; font-size: 11px; }
.platform-action { color: #9a6800; font-size: 12px; white-space: nowrap; }
.platform-action b { font-size: 21px; font-weight: 400; vertical-align: -2px; }
.platform-action.muted { color: #9e958e; }
.dianping-active { border-color: rgba(255, 112, 88, .38) !important; box-shadow: 0 5px 16px rgba(255, 112, 88, .09) !important; }
.dianping-action { color: #d84f3c; }
.redbook-active { border-color: rgba(255, 36, 66, .3) !important; box-shadow: 0 5px 16px rgba(255, 36, 66, .07) !important; }
.redbook-action { color: #e71f3d; }
.douyin-active { border-color: rgba(25, 25, 27, .2) !important; box-shadow: 0 5px 16px rgba(25, 25, 27, .07) !important; }
.douyin-action { color: #343438; }

footer { text-align: center; color: var(--muted); padding: 18px 8px 4px; }
footer .heart { display: block; color: var(--brown); font-size: 22px; margin-bottom: 7px; }
footer p { margin: 0 0 7px; font-family: "Songti SC", "STSong", serif; font-size: 14px; }
footer small { font-size: 10px; color: #a49a91; }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  z-index: 10;
  transform: translate(-50%, 20px);
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(35, 31, 28, .9);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: .22s ease;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

body.modal-open { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal.open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 20, 17, .56);
  backdrop-filter: blur(4px);
}

.modal-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px 20px max(24px, env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: #fffaf5;
  text-align: center;
  box-shadow: 0 -18px 50px rgba(37, 28, 22, .2);
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #7b7068;
  background: #efe8e1;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.modal-kicker {
  color: #d7a900;
  font: 11px Georgia, serif;
  letter-spacing: .2em;
}

.dianping-kicker { color: #f05b45; }

.modal-sheet h2 { margin: 8px 36px 7px; font-size: 19px; }
.modal-sheet > p { margin: 0 auto 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }

.modal-sheet img {
  display: block;
  width: min(100%, 360px);
  height: auto;
  margin: 0 auto;
  border-radius: 15px;
  box-shadow: 0 10px 26px rgba(50, 41, 35, .12);
  -webkit-touch-callout: default;
  user-select: auto;
}

.modal-tip {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 12px;
  color: #756a62;
  background: #f3ece5;
  font-size: 11px;
}

.app-launch-button {
  width: min(100%, 360px);
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px auto 16px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #ff735c, #ef4e36);
  box-shadow: 0 9px 20px rgba(239, 78, 54, .2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.launch-logo {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ef4e36;
  background: #fff;
  font-size: 14px;
}

.fallback-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 5px 0 10px;
  color: #a0968e;
  font-size: 10px;
}
.fallback-divider::before,
.fallback-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.fallback-text { margin-bottom: 12px !important; }

.browser-fallback-button {
  width: min(100%, 360px);
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #6f655e;
  background: rgba(255,255,255,.75);
  font-size: 13px;
  text-decoration: none;
}

#social-modal.redbook-theme .modal-kicker { color: #ff2442; }
#social-modal.redbook-theme .social-launch-button { background: linear-gradient(135deg, #ff4b65, #e81838); }
#social-modal.redbook-theme .launch-logo { color: #ff2442; }
#social-modal.douyin-theme .modal-kicker { color: #252529; }
#social-modal.douyin-theme .social-launch-button { background: linear-gradient(135deg, #343438, #151517); }
#social-modal.douyin-theme .launch-logo { color: #151517; }

@media (max-width: 360px) {
  .page-shell { padding-left: 12px; padding-right: 12px; }
  .card { padding: 17px; }
  h1 { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
