﻿/* 互联网忏悔录 —— 沿用沙雕应用的纸漫画色板，加一层小报印刷感 */

:root {
  --desk: #efe7d6;
  --paper: #fffdf5;
  --ink: #161616;
  --dim: #5f584c;
  --gray: #8d8578;
  --yellow: #ffd23f;
  --yellow-hot: #ffe56a;
  --stamp: #e23b2e;
  --wax: #8c2318;
  --wax-dark: #5e150d;
  --font: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", system-ui, sans-serif;
  --font-display: Impact, "Arial Black", "Haettenschweiler", "Franklin Gothic Heavy",
    "PingFang SC", sans-serif;
  --app-max: 460px;
  --ad-h: 142px; /* 结算页广告块占的高度，fitAd() 会改它 */
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --radius: 3px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 能滚，但不要让我看见滚动条 */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

[hidden] {
  display: none !important;
}

html {
  height: 100%;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  background: var(--desk);
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

body {
  min-height: 100%;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--desk);
  color: var(--ink);
  line-height: 1.5;
  font-weight: 700;
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  overflow-x: hidden;
  background-image: radial-gradient(rgba(0, 0, 0, 0.09) 1px, transparent 1.2px);
  background-size: 7px 7px;
}

@supports (min-height: 100dvh) {
  body {
    min-height: 100dvh;
  }
}

button {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app {
  position: relative;
  z-index: 1;
  max-width: var(--app-max);
  margin: 0 auto;
  min-height: 100vh;
  padding: 14px;
  padding-bottom: 18px;
  display: flex;
  flex-direction: column;
}

@supports (min-height: 100dvh) {
  .app {
    min-height: 100dvh;
  }
}

@supports (padding-top: env(safe-area-inset-top)) {
  .app {
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }
}

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.screen.active {
  display: flex;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* —— 顶栏 —— */
.hud {
  background: var(--yellow);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 8px 11px;
  transform: rotate(-0.6deg);
  margin-bottom: 11px;
  flex-shrink: 0;
}

.hud-in {
  display: flex;
  align-items: center;
  gap: 8px;
  transform: rotate(0.4deg);
}

.hud-main {
  min-width: 0;
}

.hud-title {
  display: block;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1.15;
}

.hud-sub {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  font-weight: 700;
  color: #5a4a00;
  letter-spacing: 0.5px;
}

.hud-sound {
  margin-left: auto;
  flex-shrink: 0;
  width: 38px;
  height: 34px;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 15px;
  line-height: 1;
  box-shadow: 2px 2px 0 var(--ink);
}

.hud-sound:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.hud-sound[aria-pressed="false"] {
  opacity: 0.45;
}

/* —— 01 忏悔亭 —— */
.panel {
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.booth {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 0 10px;
  overflow: hidden;
}

/* 招牌：黄底 + 网点 + 压缩黑体 */
.signboard {
  position: relative;
  width: 100%;
  background: var(--yellow);
  border-bottom: 3px solid var(--ink);
  padding: 8px 10px 0;
  overflow: hidden;
  flex-shrink: 0;
}

.signboard::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(22, 22, 22, 0.34) 1px, transparent 1.4px);
  background-size: 5px 5px;
  opacity: 0.55;
  pointer-events: none;
}

.sign-kicker {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--ink);
  opacity: 0.85;
}

.sign-issue {
  border: 1.5px solid var(--ink);
  padding: 0 4px;
}

.sign-en {
  position: relative;
  margin: 2px 0 0;
  color: var(--ink);
  line-height: 0.9;
}

.sign-line1,
.sign-line2 {
  display: block;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  transform: scaleY(1.08);
  transform-origin: center top;
}

.sign-line1 {
  font-size: 52px;
}

.sign-line2 {
  font-size: 26px;
  letter-spacing: 0.01em;
  margin-top: -2px;
}

.sign-cn {
  position: relative;
  display: block;
  margin: 7px -10px 0;
  padding: 4px 0 5px;
  background: var(--stamp);
  border-top: 3px solid var(--ink);
  color: #fff8e0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-shadow: 1.5px 1.5px 0 rgba(22, 22, 22, 0.55);
}

.title {
  margin-top: 11px;
  padding: 0 14px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1.34;
}

.tagline {
  margin-top: 8px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

/* 忏悔须知：把小字印在纸上，正好填住按钮上方那块空 */
.terms {
  flex: 1;
  min-height: 0;
  width: calc(100% - 28px);
  margin: 10px 14px 0;
  padding: 8px 11px 9px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 5px;
  background: #fff8e0;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-sm);
  transform: rotate(-0.5deg);
  text-align: left;
  overflow: hidden;
}

.terms-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 4px 0;
}

.terms-h {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--dim);
  border-bottom: 1.5px dashed rgba(22, 22, 22, 0.35);
  padding-bottom: 6px;
}

.terms p:not(.terms-h):not(.terms-more) {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  color: #322f28;
}

.terms b {
  color: var(--stamp);
  font-weight: 900;
  margin-right: 2px;
}

.terms p.terms-more {
  margin-top: auto;
  padding-top: 7px;
  border-top: 1.5px dashed rgba(22, 22, 22, 0.28);
  font-size: 11px;
  font-weight: 700;
  color: rgba(22, 22, 22, 0.45);
  letter-spacing: 0.02em;
  text-align: center;
}

/* 按住时的计分板 */
.charge-feed {
  display: none;
  width: 100%;
  padding: 4px 14px 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  text-align: left;
}

.booth.is-charging .charge-feed {
  display: flex;
  flex-direction: column;
}

.booth.is-charging .title,
.booth.is-charging .tagline,
.booth.is-charging .terms,
.booth.is-charging .decline {
  display: none;
}

.booth.is-charging .sign-line1 {
  font-size: 30px;
}

.booth.is-charging .sign-line2 {
  font-size: 15px;
}

.booth.is-charging .sign-cn {
  font-size: 16px;
}

.booth.is-charging .signboard {
  padding-bottom: 0;
}

.feed-num {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.feed-num span {
  font-size: 54px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--stamp);
}

.feed-num em {
  font-style: normal;
  font-size: 16px;
  font-weight: 900;
  color: var(--dim);
}

.feed-label {
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 0.16em;
}

.feed-list {
  list-style: none;
  margin-top: 8px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
  overflow: hidden;
}

.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 6px 8px;
  background: #fff8e0;
  border: 2px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  animation: feedIn 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.feed-item:nth-child(even) {
  transform: rotate(-0.7deg);
  background: #fffdf5;
}

.feed-item:nth-child(odd) {
  transform: rotate(0.5deg);
}

.feed-item em {
  flex-shrink: 0;
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
  color: #fff8e0;
  background: var(--stamp);
  border: 1.5px solid var(--ink);
  padding: 1px 4px;
  letter-spacing: 0.06em;
  margin-top: 1px;
}

.feed-item span {
  min-width: 0;
}

@keyframes feedIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
}

.feed-note {
  margin-top: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  color: var(--stamp);
  min-height: 20px;
  letter-spacing: 0.04em;
}

/* 按住按钮 */
.hold-wrap {
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.hold-btn {
  position: relative;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--yellow);
  box-shadow: 6px 6px 0 var(--ink);
  display: grid;
  place-items: center;
  touch-action: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.hold-btn:active,
.hold-btn.is-down {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* 静止时只留一圈呼吸的红边，提示这里可以按住 */
.hold-btn::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 3px solid var(--stamp);
  opacity: 0;
  animation: holdPulse 2.6s ease-out infinite;
  pointer-events: none;
}

.booth.is-charging .hold-btn::after {
  display: none;
}

@keyframes holdPulse {
  0% {
    transform: scale(0.98);
    opacity: 0;
  }
  35% {
    opacity: 0.42;
  }
  100% {
    transform: scale(1.16);
    opacity: 0;
  }
}

.hold-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: conic-gradient(
    var(--stamp) calc(var(--p, 0) * 1%),
    rgba(22, 22, 22, 0.09) 0
  );
  -webkit-mask: radial-gradient(
    farthest-side,
    transparent calc(100% - 7px),
    #000 calc(100% - 6px)
  );
  mask: radial-gradient(
    farthest-side,
    transparent calc(100% - 7px),
    #000 calc(100% - 6px)
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.booth.is-charging .hold-ring {
  opacity: 1;
}

.booth.is-charging .hold-btn {
  background: var(--stamp);
  border-color: var(--ink);
}

.booth.is-charging .hold-ring {
  background: conic-gradient(
    rgba(255, 248, 224, 0.9) calc(var(--p, 0) * 1%),
    rgba(255, 248, 224, 0.18) 0
  );
}

.hold-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}

.hold-label {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  line-height: 1.1;
}

.booth.is-charging .hold-label {
  color: #fff8e0;
  font-size: 24px;
}

.hold-sub {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: rgba(22, 22, 22, 0.55);
}

.booth.is-charging .hold-sub {
  color: rgba(255, 248, 224, 0.85);
}

.hold-hint {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 0.08em;
}

.decline {
  margin-top: 5px;
  font-size: 14px;
  font-weight: 700;
  color: var(--dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 4px 10px;
}

.fineprint {
  margin-top: 7px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 0.02em;
}

/* 拉帘：不同意 */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s;
}

.curtain.is-closed {
  opacity: 1;
  visibility: visible;
}

.curt {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 56%;
  background: repeating-linear-gradient(
    90deg,
    var(--wax-dark) 0 6px,
    var(--wax) 6px 16px,
    #a12a1c 16px 22px,
    var(--wax) 22px 32px
  );
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transition: transform 0.42s cubic-bezier(0.3, 0.9, 0.2, 1);
}

.curt-l {
  left: -6%;
  border-right: 3px solid var(--ink);
  transform: translateX(-104%);
}

.curt-r {
  right: -6%;
  border-left: 3px solid var(--ink);
  transform: translateX(104%);
}

.curtain.is-closed .curt-l,
.curtain.is-closed .curt-r {
  transform: translateX(0);
}

.curt-note {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 84%;
  transform: translate(-50%, -50%) scale(0.94);
  padding: 22px 18px 18px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease 0.3s, transform 0.3s ease 0.3s;
}

.curtain.is-closed .curt-note {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.curt-note p {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.7;
}

.curt-note .ghost {
  margin-top: 16px;
}

/* —— 通用按钮 —— */
.bigbtn {
  width: 100%;
  padding: 16px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  font-family: inherit;
  letter-spacing: 1.5px;
  background: var(--yellow);
  box-shadow: var(--shadow);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.bigbtn:active {
  transform: translate(5px, 5px);
  box-shadow: 1px 1px 0 var(--ink);
}

.ghost {
  width: 100%;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 900;
  font-family: inherit;
  padding: 12px 10px;
  box-shadow: 3px 3px 0 var(--ink);
  letter-spacing: 0.04em;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.ghost:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

/* —— 02 年度报告 —— */
.rep-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-bottom: 10px;
}

.rep-step {
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  border: 2.5px solid var(--ink);
  background: var(--paper);
  padding: 2px 8px;
}

.rep-track {
  flex: 1;
  height: 9px;
  border: 2px solid var(--ink);
  background: var(--paper);
  overflow: hidden;
}

.rep-bar {
  height: 100%;
  width: 12.5%;
  background: var(--stamp);
  transition: width 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.rep-stage {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 0;
}

.rep-card {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  min-height: 440px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 24px 20px 66px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.rep-card.is-out {
  transform: translateX(-118%) rotate(-5deg);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.rep-card.is-in {
  animation: cardIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}

@keyframes cardIn {
  from {
    transform: translateX(26px) rotate(1.6deg);
    opacity: 0;
  }
}

.rep-ghost {
  position: absolute;
  right: -10px;
  top: 46%;
  transform: translateY(-50%);
  font-size: 150px;
  font-weight: 900;
  line-height: 1;
  color: rgba(22, 22, 22, 0.06);
  letter-spacing: -0.05em;
  pointer-events: none;
}

.rep-card::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 34px;
  border-top: 1.5px dotted rgba(22, 22, 22, 0.22);
}

.rep-kicker {
  position: relative;
  display: inline-block;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.16em;
  padding: 3px 9px;
  background: var(--yellow);
  border: 2.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-1.2deg);
}

.rep-big {
  position: relative;
  margin-top: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.rep-big span {
  font-size: 84px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.rep-card.is-word .rep-big span {
  font-size: 46px;
  letter-spacing: 0.02em;
}

.rep-big em {
  font-style: normal;
  font-size: 21px;
  font-weight: 900;
  color: var(--dim);
}

.rep-tail {
  position: relative;
  margin-top: 20px;
}

.rep-say {
  position: relative;
  margin: 0;
  padding-left: 15px;
  border-left: 4px solid var(--stamp);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.65;
  color: #1f1f1f;
}

.rep-aside {
  position: relative;
  margin-top: 11px;
  padding-left: 19px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--dim);
}

.rep-stamp {
  position: absolute;
  right: 14px;
  top: 15px;
  padding: 5px 9px;
  border: 3px double var(--stamp);
  color: var(--stamp);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  transform: rotate(-11deg);
  opacity: 0.9;
  mix-blend-mode: multiply;
  background: rgba(255, 253, 245, 0.4);
}

.rep-stamp:empty {
  display: none;
}

.rep-foot {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 14px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: rgba(22, 22, 22, 0.4);
  font-variant-numeric: tabular-nums;
}

#screen-report .bigbtn {
  margin-top: 12px;
  flex-shrink: 0;
}

/* 结算页不要顶栏，把高度让给海报和广告 */
.app.is-settlement .hud {
  display: none;
}

/* —— 03 忏悔证书 —— */
.poster-frame {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 2px 0 8px;
}

/* 宽度同时受屏宽和「剩给海报的高度」限制：矮屏整张缩进去，不把按钮和广告顶出屏幕 */
.poster-frame canvas {
  display: block;
  width: clamp(140px, calc((100vh - 200px - var(--ad-h, 142px)) * 0.694), 100%);
  height: auto;
  max-width: 100%;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  background: var(--desk);
}

@supports (height: 100dvh) {
  .poster-frame canvas {
    width: clamp(140px, calc((100dvh - 200px - var(--ad-h, 142px)) * 0.694), 100%);
  }
}

.poster-note {
  flex-shrink: 0;
  margin-bottom: 9px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--dim);
  text-align: center;
}

.poster-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.action-row {
  display: flex;
  gap: 9px;
}

.action-row .ghost {
  flex: 1;
}

/* —— 结算页广告：100px 横条，样式对齐 city-purity-ads / dannmaku —— */
.result-ad {
  position: relative;
  flex-shrink: 0;
  margin: 14px 0 2px;
  padding: 10px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
}

.result-ad .ad-label {
  position: absolute;
  top: -11px;
  left: 9px;
  font-size: 9.5px;
  font-weight: 900;
  padding: 0 7px;
  border: 2.5px solid var(--ink);
  border-radius: 2px;
  background: var(--paper);
  letter-spacing: 1px;
  color: var(--gray);
}

.ad-slot {
  /* 100px 只是没素材时的占位；有素材时由 fitAd() 写成素材高度 */
  min-height: 100px;
  overflow: visible;
}

/* 一直没填出来就整块不显示，别留一个空框在页面底部 */
.result-ad.is-empty {
  display: none;
}

.ad-slot .adsbygoogle {
  display: block;
  width: 100%;
  height: 100px;
  max-width: 100%;
  margin: 0 auto;
}

/* —— 提示 —— */
.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 60;
  transform: translate(-50%, 12px);
  width: max-content;
  max-width: 86vw;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-align: center;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 微信里存图：长按预览 */
.shotview {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  background: rgba(12, 12, 12, 0.9);
  padding: 18px;
  overflow-y: auto;
}

.shotview.is-on {
  display: block;
}

.shotview-in {
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
}

.shotview-in img {
  display: block;
  max-width: 100%;
  border: 3px solid var(--ink);
}

.shotview-in p {
  margin: 12px 0 14px;
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
}

.shotview-in .ghost {
  max-width: 240px;
  margin: 0 auto;
}

/* 复制失败时：给一段能长按选中的字 */
.copysheet {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: none;
  background: rgba(12, 12, 12, 0.82);
  padding: 22px 18px;
  overflow-y: auto;
}

.copysheet.is-on {
  display: flex;
  align-items: center;
  justify-content: center;
}

.copysheet-in {
  width: 100%;
  max-width: 420px;
  padding: 18px 16px 16px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
}

.copysheet-h {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

#copysheet-text {
  display: block;
  width: 100%;
  padding: 10px;
  border: 2px solid var(--ink);
  background: #fff8e0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  resize: none;
  -webkit-user-select: text;
  user-select: text;
}

.copysheet-in .ghost {
  margin-top: 12px;
}

/* —— 小屏：只压缩留白和招牌，字号不降太多 —— */
@media (max-height: 740px) {
  .app {
    padding: 10px;
  }
  .hud {
    padding: 6px 10px;
    margin-bottom: 8px;
  }
  .hud-title {
    font-size: 17px;
  }
  .hud-sub {
    font-size: 11px;
  }
  .sign-line1 {
    font-size: 42px;
  }
  .sign-line2 {
    font-size: 21px;
  }
  .sign-cn {
    font-size: 18px;
  }
  .title {
    margin-top: 10px;
    font-size: 22px;
  }
  .tagline {
    margin-top: 5px;
    font-size: 13px;
  }
  .terms {
    margin-top: 8px;
    padding: 8px 10px;
    gap: 4px;
  }
  .terms-h {
    font-size: 10.5px;
    padding-bottom: 5px;
  }
  .terms p:not(.terms-h):not(.terms-more) {
    font-size: 12px;
    line-height: 1.5;
  }
  .terms p.terms-more {
    font-size: 10px;
  }
  .hold-btn {
    width: 132px;
    height: 132px;
  }
  .hold-label {
    font-size: 24px;
  }
  .hold-hint {
    margin-top: 9px;
    font-size: 12px;
  }
  .decline {
    margin-top: 4px;
    font-size: 13px;
  }
  .fineprint {
    margin-top: 6px;
    font-size: 10.5px;
  }
  .rep-big span {
    font-size: 62px;
  }
  .rep-big em {
    font-size: 18px;
  }
  .rep-say {
    font-size: 15px;
    margin-top: 18px;
  }
  .rep-aside {
    font-size: 12.5px;
  }
  .rep-ghost {
    font-size: 130px;
  }
  .rep-card {
    padding: 18px 16px 40px;
  }
  .bigbtn {
    padding: 13px;
    font-size: 16px;
  }
}

@media (max-height: 700px) {
  .sign-kicker {
    display: none;
  }
  .signboard {
    padding-top: 6px;
  }
  .sign-line1 {
    font-size: 36px;
  }
  .sign-line2 {
    font-size: 18px;
  }
  .sign-cn {
    font-size: 15px;
    padding: 2px 0 3px;
  }
  .title {
    font-size: 19px;
    margin-top: 8px;
  }
  .tagline {
    font-size: 12px;
    margin-top: 4px;
  }
  .terms {
    margin-top: 7px;
    padding: 6px 9px 7px;
  }
  .terms-h {
    font-size: 9.5px;
    padding-bottom: 4px;
  }
  .terms p:not(.terms-h):not(.terms-more) {
    font-size: 11px;
    line-height: 1.45;
  }
  .terms p.terms-more {
    display: none;
  }
  .hold-btn {
    width: 118px;
    height: 118px;
  }
  .hold-label {
    font-size: 21px;
  }
  .hold-sub {
    font-size: 10px;
  }
  .hold-hint {
    margin-top: 8px;
    font-size: 11px;
  }
  .decline {
    margin-top: 2px;
    font-size: 12px;
  }
  .fineprint {
    margin-top: 5px;
    font-size: 10px;
  }
  .rep-card {
    min-height: 380px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .feed-item {
    animation: none;
  }
}
