:root {
  --yellow: #ffd200;
  --yellow-dk: #e6b800;
  --ink: #1e1b16;
  --paper: #fff9e8;
  --muted: #7a7366;
  --card: #ffffff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #14120e; color: var(--ink); }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; overscroll-behavior: none; }
#app { position: relative; max-width: 480px; height: 100%; margin: 0 auto; background: var(--paper); overflow: hidden; }

.mute { position: absolute; z-index: 50; top: calc(env(safe-area-inset-top) + 8px); right: 8px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(30, 27, 22, .55); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.screen { position: absolute; inset: 0; display: none; flex-direction: column; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.screen.active { display: flex; }

.btn { border: 0; border-radius: 999px; padding: 14px 28px; font-size: 17px; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center; }
.btn.primary { background: var(--yellow); color: var(--ink); box-shadow: 0 4px 0 var(--yellow-dk); }
.btn.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--yellow-dk); }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); }

#s-cover { justify-content: center; padding: 24px; background: linear-gradient(160deg, #ffe566, var(--yellow) 55%, #f2b800); }
.cover-card { text-align: center; }
.eyebrow { letter-spacing: 3px; font-size: 12px; font-weight: 700; margin: 0 0 18px; }
#s-cover h1 { font-size: 46px; line-height: 1.2; margin: 0 0 18px; }
.lead { font-size: 16px; line-height: 1.7; margin: 0 0 36px; }

.screen-title { margin: 28px 20px 4px; font-size: 26px; }
.screen-sub { margin: 0 20px 14px; color: var(--muted); font-size: 14px; }
.pick-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px 16px; overflow-y: auto; }
.pick-card { background: var(--card); border: 2px solid transparent; border-radius: 18px; padding: 12px; text-align: center; cursor: pointer; box-shadow: 0 3px 10px rgba(0, 0, 0, .08); }
.pick-card:active { border-color: var(--yellow); }
.pick-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: #f1e7c8; }
.pick-card b { display: block; margin-top: 8px; font-size: 17px; }
.pick-card span { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }

#s-chat { background: #ededed; }
.chat-head { padding: 14px; text-align: center; font-weight: 700; background: #f7f7f7; border-bottom: 1px solid #ddd; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px 12px; }
.msg { display: flex; gap: 8px; margin-bottom: 14px; animation: pop .25s ease; }
.msg img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: #ddd; flex: none; }
.msg p { margin: 0; max-width: 72%; padding: 10px 12px; background: #fff; border-radius: 6px; font-size: 16px; line-height: 1.5; }
.chat-go { margin: 12px 24px 20px; }
.msg.me { flex-direction: row-reverse; }
.msg.me p { background: #95ec69; }
.msg.sys { justify-content: center; }
.msg.sys p { max-width: 90%; background: transparent; color: #888; font-size: 13px; text-align: center; padding: 2px; }
/* 心里想的：虚线气泡，和嘴上说的区分开 */
.msg.os p { background: transparent; border: 1.5px dashed #c98a00; color: #8a5a00; font-size: 15px; font-style: italic; }
.msg.os p::before { content: "心里想："; font-style: normal; font-weight: 700; margin-right: 2px; }
.reply-box { display: flex; flex-direction: column; gap: 8px; padding: 10px 16px 18px; background: #f7f7f7; border-top: 1px solid #ddd; }
.reply-box[hidden], .chat-go[hidden] { display: none; }
.reply-btn { display: block; width: 100%; padding: 10px 14px; border: 0; border-radius: 10px; background: #fff; text-align: left; font: inherit; font-size: 15px; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); cursor: pointer; }
.reply-btn:active { background: #95ec69; }
.reply-btn small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }

#s-door { background: #ededed; }
.door-knock { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #14120e; color: #fff; text-align: center; }
.door-knock[hidden] { display: none; }
.door-knock b { font-size: 44px; letter-spacing: 8px; color: var(--yellow); animation: shake .5s ease infinite; }
.door-knock p { margin: 0 0 18px; color: #cfc8b8; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

#s-final { align-items: center; padding: 16px; background: #14120e; overflow-y: auto; }
.poster { width: 100%; max-width: 380px; border-radius: 14px; background: #2a2620; min-height: 200px; }
.poster-tip { color: #cfc8b8; font-size: 14px; margin: 12px 0; }
.final-actions { display: flex; gap: 12px; padding-bottom: 20px; }
#s-final .btn.ghost { color: #fff; border-color: #fff; }
