:root {
  --felt: #07110c;
  --cream: #f7f1e4;
  --cream-2: #f1e8d5;
  --ink: #1c1915;
  --muted: #6a6357;
  --gold: #e0b15c;
  --green: #10241c;
  --line: rgba(243, 234, 215, 0.16);
  --bar-h: 48px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

/* 整页不滚，只有中间的列表区滚：顶部条和底部条一直钉在屏幕上下，
   手机浏览器的地址栏也不会来回收起，页面不会跳 */
body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--cream);
  background:
    radial-gradient(900px 420px at 50% -80px, rgba(224, 177, 92, 0.16), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(28, 92, 64, 0.4), transparent 50%),
    var(--felt);
}

button, input { font: inherit; color: inherit; }

button { cursor: pointer; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.scroller {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.install-top { flex: 0 0 auto; }

.sheet {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 20px 0 84px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--bar-h);
  margin: -20px -12px 0;
  padding: 0 12px;
  background: rgba(7, 17, 12, 0.96);
  backdrop-filter: blur(12px);
}

.topbar-label {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.22em;
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-right time {
  color: #d5cbb8;
  font-size: 12px;
  white-space: nowrap;
}

.account {
  max-width: 150px;
  overflow: hidden;
  border: 1px solid rgba(224, 177, 92, 0.55);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(224, 177, 92, 0.12);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.account:hover { background: rgba(224, 177, 92, 0.2); }

h1 {
  margin: 10px 0 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.lead {
  margin: 8px 0 0;
  color: #efe6d4;
  font-size: 15px;
}

.guarantee {
  margin-top: 10px;
  border: 1px solid rgba(224, 177, 92, 0.4);
  border-radius: 14px;
  background: rgba(224, 177, 92, 0.07);
}

.guarantee summary {
  padding: 10px 14px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.rules {
  margin: 0;
  padding: 0 14px 12px 30px;
  color: #efe6d4;
  font-size: 13px;
  line-height: 1.65;
}

.tools {
  position: sticky;
  top: var(--bar-h);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 14px -12px 0;
  padding: 10px 12px;
  background: rgba(7, 17, 12, 0.95);
  backdrop-filter: blur(12px);
}

.filters { display: flex; gap: 6px; }

.filters button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  background: transparent;
  color: #efe6d4;
  font-size: 14px;
  white-space: nowrap;
}

.filters button span { color: #a99f8c; font-size: 12px; }

.filters button[aria-selected="true"] {
  border-color: transparent;
  background: var(--cream);
  color: #14211a;
  font-weight: 700;
}

.filters button[aria-selected="true"] span { color: #5c564c; }

.search { flex: 1 1 200px; }

.search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--cream);
  font-size: 14px;
}

.search input::placeholder { color: rgba(246, 237, 217, 0.42); }

.note {
  margin: 8px 2px;
  color: #cbbfaa;
  font-size: 12px;
}

.list {
  display: grid;
  gap: 8px;
  align-items: start;
}

.row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-areas:
    "logo main go"
    "bar bar bar"
    "cond cond cond";
  column-gap: 10px;
  row-gap: 8px;
  align-items: center;
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--ink);
  background: linear-gradient(180deg, #fffaf1 0%, var(--cream-2) 100%);
}

.logo {
  grid-area: logo;
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: var(--cream);
  font-family: "Noto Serif SC", serif;
  font-size: 20px;
  font-weight: 700;
}

.logo img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.rank {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: #1c1408;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 11px;
}

.main { grid-area: main; min-width: 0; }

.head {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.head h2 {
  margin: 0;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tag {
  flex: 0 0 auto;
  border-radius: 6px;
  padding: 1px 5px;
  color: #fffaf1;
  font-size: 11px;
  font-weight: 700;
}

.tag.cover { background: #0c6b42; }
.tag.fresh { background: #9d342c; }

.desc {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.go {
  grid-area: go;
  border-radius: 10px;
  padding: 8px 14px;
  background: var(--green);
  color: var(--cream);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.go:hover { background: #1a382c; }

.go.off {
  background: transparent;
  border: 1px dashed rgba(28, 25, 21, 0.3);
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

/* 兑换码最少留 190px；外语的「条件」「推荐」按钮比较长，放不下就换到第二行，码不会被截断 */
.bar {
  grid-area: bar;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  padding-top: 8px;
  border-top: 1px dashed rgba(28, 25, 21, 0.2);
}

.code {
  display: flex;
  flex: 1 1 190px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  border: 1px dashed rgba(16, 36, 28, 0.45);
  border-radius: 8px;
  padding: 5px 8px;
  background: rgba(16, 36, 28, 0.04);
  color: var(--ink);
}

.code-text {
  overflow: hidden;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.code-day {
  flex: 0 0 auto;
  border-radius: 5px;
  padding: 1px 5px;
  background: rgba(16, 36, 28, 0.1);
  color: #5c564c;
  font-size: 11px;
  font-weight: 700;
}

.code-day.on {
  background: #0c6b42;
  color: #fffaf1;
}

.code-text { flex: 1 1 auto; min-width: 0; text-align: left; }

.code.off {
  color: var(--muted);
  font-size: 12px;
}

.code-act {
  flex: 0 0 auto;
  color: #0c6b42;
  font-size: 12px;
  font-weight: 700;
}

.code.done { border-style: solid; border-color: #0c6b42; }

.cond-toggle,
.vote {
  flex: 0 0 auto;
  border: 1px solid rgba(28, 25, 21, 0.18);
  border-radius: 8px;
  padding: 5px 9px;
  background: transparent;
  color: #3f3a32;
  font-size: 12px;
  font-weight: 700;
}

.cond-toggle::after { content: " ▾"; }
.cond-toggle.open::after { content: " ▴"; }
.cond-toggle.open { background: rgba(16, 36, 28, 0.08); }

.vote.on {
  border-color: transparent;
  background: var(--green);
  color: var(--cream);
}

.cond {
  grid-area: cond;
  margin: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(16, 36, 28, 0.06);
  color: #241f18;
  font-size: 13px;
  line-height: 1.6;
}

.mast-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mast-links .act[hidden] { display: none; }

.lang {
  flex: 0 0 auto;
  max-width: 96px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #efe6d4;
  font: inherit;
  font-size: 12px;
}

.lang option { color: var(--ink); background: #fff; }

.act-wa { border-color: rgba(37, 211, 102, 0.55); color: #7df0a8; }
.act-tg { border-color: rgba(34, 158, 217, 0.6); color: #8fd3f5; }

.community {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  border: 1px solid rgba(37, 211, 102, 0.35);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(37, 211, 102, 0.07);
}

.community p { flex: 1 1 200px; min-width: 0; margin: 0; line-height: 1.35; }
.community b { display: block; color: #7df0a8; font-size: 14px; }
.community span { display: block; color: #d5cbb8; font-size: 12px; }
.community-links { display: flex; flex-wrap: wrap; gap: 8px; }

[data-support][hidden],
.community[hidden],
.community-links .act[hidden] { display: none; }

/* 右下角的 WhatsApp 客服按钮，有底部下载条时往上让开 */
.wa-float {
  position: fixed;
  z-index: 4;
  right: 14px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

body.has-install .wa-float { bottom: calc(96px + env(safe-area-inset-bottom)); }

.f-wa {
  display: block;
  background: #25d366;
  color: #fff;
  text-align: center;
}

@media (max-width: 420px) {
  .topbar-label { display: none; }
}

.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.share-btn {
  display: block;
  border: 1px solid rgba(28, 25, 21, 0.18);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.share-btn:hover { border-color: var(--green); }

.share-btn::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--dot, #10241c);
  vertical-align: 1px;
}

.share-btn[data-via="whatsapp"] { --dot: #25d366; }
.share-btn[data-via="telegram"] { --dot: #229ed9; }
.share-btn[data-via="facebook"] { --dot: #1877f2; }
.share-btn[data-via="messenger"] { --dot: #a033ff; }
.share-btn[data-via="x"] { --dot: #111; }
.share-btn[data-via="threads"] { --dot: #555; }
.share-btn[data-via="sms"] { --dot: #0c6b42; }
.share-btn[data-via="email"] { --dot: #c8963e; }
.share-btn[data-via="native"] { --dot: #9d342c; }

.share-tip {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border-radius: 12px;
  padding: 4px;
  background: rgba(16, 36, 28, 0.08);
}

.seg button {
  border: 0;
  border-radius: 9px;
  padding: 8px;
  background: transparent;
  color: #3f3a32;
  font-weight: 700;
}

.seg button[aria-selected="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.tg-login { margin-top: 8px; text-align: center; }

.social-btn {
  display: flex;
  justify-content: center;
  min-height: 44px;
  margin: 6px 0;
}

.social-btn[hidden] { display: none; }

.tg-login[hidden] { display: none; }

.or {
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.pop-wide { width: min(600px, calc(100% - 20px)); }

.me-meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.wallet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--green);
  color: var(--cream);
}

.wallet-label {
  display: block;
  color: #cbbd9a;
  font-size: 12px;
}

.wallet-points {
  font-family: "Noto Serif SC", serif;
  font-size: 30px;
  line-height: 1.1;
}

.seg-4 { grid-template-columns: repeat(4, 1fr); }

.seg-4 button { padding: 8px 4px; font-size: 13px; }

.me-pane { margin-top: 12px; }

.me-pane[hidden] { display: none; }

.earn {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.earn li {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(16, 36, 28, 0.06);
  font-size: 13px;
}

.earn b {
  flex: 0 0 auto;
  min-width: 48px;
  color: #0c6b42;
  font-size: 16px;
}

.inv-count {
  margin: 10px 0 12px;
  color: #3f3a32;
  font-size: 13px;
  font-weight: 700;
}

.shop-item,
.code-item,
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed rgba(28, 25, 21, 0.18);
  padding: 10px 0;
}

.shop-item h4,
.code-item h4 {
  margin: 0;
  font-size: 14px;
}

.shop-item p,
.code-item p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.shop-value {
  flex: 0 0 auto;
  min-width: 72px;
  border-radius: 12px;
  padding: 10px 8px;
  background: var(--green);
  color: var(--gold);
  font-family: "Noto Serif SC", serif;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.shop-info { flex: 1 1 auto; min-width: 0; }

.shop-site { color: #3f3a32 !important; font-weight: 700; }

.shop-site.hidden-site { color: #9d342c !important; }

.code-side {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  text-align: center;
}

.code-side .redeem { display: block; margin-top: 0; }

.shop-side {
  flex: 0 0 auto;
  text-align: right;
}

.shop-cost {
  display: block;
  color: #0c6b42;
  font-size: 15px;
  font-weight: 700;
}

.redeem {
  margin-top: 4px;
  border: 0;
  border-radius: 9px;
  padding: 6px 12px;
  background: var(--green);
  color: var(--cream);
  font-size: 13px;
  font-weight: 700;
}

.redeem:disabled {
  background: rgba(16, 36, 28, 0.15);
  color: var(--muted);
}

.code-item .act {
  flex: 0 0 auto;
  border-color: rgba(28, 25, 21, 0.2);
  background: transparent;
  color: var(--ink);
}

.code-item .code-val {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 16px;
  font-weight: 700;
}

.history-item span { font-size: 13px; }

.history-item small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.history-item b { flex: 0 0 auto; font-size: 15px; }

.history-item b.plus { color: #0c6b42; }

.history-item b.minus { color: #9d342c; }

.pane-empty {
  margin: 0;
  padding: 18px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.pw-change {
  margin-top: 16px;
  border-top: 1px solid rgba(28, 25, 21, 0.12);
  padding-top: 10px;
}

.pw-change[hidden] { display: none; }

.pw-change summary {
  color: #3f3a32;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.logout {
  display: block;
  margin: 14px auto 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
}

.share-url {
  margin: 12px 0 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12px;
}

.mast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 14px;
}

.act {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #efe6d4;
  font-size: 14px;
  font-weight: 700;
}

.act-main {
  border-color: transparent;
  background: var(--gold);
  color: #1c1408;
}

.pop {
  width: min(520px, calc(100% - 20px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  border: 0;
  border-radius: 18px;
  padding: 0;
  background: #fffaf1;
  color: var(--ink);
}

.pop::backdrop { background: rgba(3, 8, 6, 0.72); }

.pop-body { padding: 16px; }

.pop-body[hidden] { display: none; }

.pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pop-head h2 { margin: 0; font-size: 20px; }

.pop-x {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(16, 36, 28, 0.08);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.pop-lead {
  margin: 6px 0 12px;
  color: #4a453c;
  font-size: 13px;
  line-height: 1.6;
}

.f {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  color: #3f3a32;
  font-size: 13px;
  font-weight: 700;
}

.f input,
.f select,
.f textarea {
  width: 100%;
  border: 1px solid rgba(28, 25, 21, 0.22);
  border-radius: 10px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
}

.f textarea { resize: vertical; }

.pw { position: relative; display: block; }

.pw input { padding-right: 60px; }

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  padding: 5px 9px;
  background: rgba(16, 36, 28, 0.08);
  color: #3f3a32;
  font-size: 12px;
  font-weight: 700;
}

.f small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.f-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.f-err {
  margin: 12px 0 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(157, 52, 44, 0.1);
  color: #8a2a22;
  font-size: 13px;
}

.f-err[hidden] { display: none; }

.f-submit {
  width: 100%;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  padding: 12px;
  background: var(--green);
  color: var(--cream);
  font-size: 15px;
  font-weight: 700;
}

.f-submit:disabled { opacity: 0.6; }

.f-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.ticket-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.ticket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.ticket-no {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 22px;
  letter-spacing: 0.04em;
}

.ticket-row .act {
  border-color: rgba(28, 25, 21, 0.2);
  background: transparent;
  color: var(--ink);
}

.pop-note {
  margin: 12px 0 0;
  color: #4a453c;
  font-size: 13px;
  line-height: 1.6;
}

.track-result {
  margin-top: 14px;
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(16, 36, 28, 0.06);
  font-size: 13px;
  line-height: 1.6;
}

.track-result[hidden] { display: none; }

.track-result p { margin: 0; }

.track-status {
  color: #0c6b42;
  font-size: 16px;
  font-weight: 700;
}

.track-reply {
  margin-top: 6px !important;
  padding-top: 6px;
  border-top: 1px dashed rgba(28, 25, 21, 0.2);
}

.cond[hidden] { display: none; }

.empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 24px 16px;
  color: #d9d0c0;
  text-align: center;
}

.more {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.04);
  color: #efe6d4;
  font-size: 14px;
}

.more[hidden] { display: none; }

.foot {
  margin-top: 20px;
  color: #b7ad9c;
  font-size: 12px;
  line-height: 1.7;
}

.foot p { margin: 0; }

.toast {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 9px 16px;
  background: var(--cream);
  color: #14211a;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.toast.on { opacity: 1; }

.install-top,
.install-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  background: var(--cream);
}

.install-top[hidden],
.install-bottom[hidden] { display: none; }

.install-top {
  padding: 8px max(12px, calc((100% - 1180px) / 2));
  border-bottom: 1px solid rgba(28, 25, 21, 0.12);
}

.install-top img,
.install-bottom img { flex: 0 0 auto; border-radius: 9px; }

.install-top p,
.install-bottom p {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  line-height: 1.3;
}

.install-top b,
.install-bottom b {
  display: block;
  font-size: 14px;
}

.install-top span,
.install-bottom span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.install-btn {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--green);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

/* 底部条放在页面最下面一行，不跟着手机浏览器工具栏伸缩跳动 */
.install-bottom {
  flex: 0 0 auto;
  width: min(560px, calc(100% - 20px));
  margin: 8px auto calc(8px + env(safe-area-inset-bottom));
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.35);
}

body.has-install .toast[popover] { bottom: 96px; }

.rate-line {
  display: block;
  margin-top: 3px;
  border: 0;
  padding: 0;
  background: none;
  color: #8a5a12;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.rate-line.empty { color: var(--muted); font-weight: 400; text-decoration: underline; }

.rv-summary {
  margin: 4px 0 10px;
  color: #3f3a32;
  font-size: 14px;
  font-weight: 700;
}

.stars { display: flex; gap: 4px; margin: 2px 0 4px; }

.stars button {
  border: 0;
  padding: 0 2px;
  background: none;
  color: rgba(28, 25, 21, 0.2);
  font-size: 30px;
  line-height: 1;
}

.stars button.on { color: #e0a32e; }

.rv-speed[hidden],
#review-form[hidden],
.rv-login[hidden] { display: none; }

.rv-item {
  border-top: 1px dashed rgba(28, 25, 21, 0.18);
  padding: 10px 0;
  font-size: 13px;
}

.rv-item b { color: #e0a32e; letter-spacing: 1px; }

.rv-item p { margin: 4px 0 0; color: #241f18; line-height: 1.6; }

.rv-item small { color: var(--muted); }

.notify-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  border: 1px solid rgba(224, 177, 92, 0.45);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(224, 177, 92, 0.1);
}

.notify-card[hidden] { display: none; }

.notify-card p {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  line-height: 1.35;
}

.notify-card b {
  display: block;
  color: var(--gold);
  font-size: 14px;
}

.notify-card span {
  display: block;
  color: #d5cbb8;
  font-size: 12px;
}

.install-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 14px;
}

.install-hero img { flex: 0 0 auto; border-radius: 14px; }

.install-hero ul {
  margin: 0;
  padding-left: 18px;
  color: #3f3a32;
  font-size: 13px;
  line-height: 1.7;
}

.steps {
  margin: 0 0 4px;
  padding-left: 20px;
  color: #241f18;
  font-size: 14px;
  line-height: 1.8;
}

[data-install-pane][hidden] { display: none; }

/* 用 popover 放进顶层，弹窗打开时提示也不会被遮罩盖住 */
.toast[popover] {
  inset: auto auto 22px 50%;
  margin: 0;
  border: 0;
  overflow: visible;
}

@media (min-width: 720px) {
  .list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1080px) {
  .list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}
