* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #1b1410; color: #f5ead2;
  font-family: "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", sans-serif; user-select: none; -webkit-user-select: none; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#scene:active { cursor: grabbing; }
.hidden { display: none !important; }
button { font-family: inherit; color: inherit; border: none; background: none; cursor: pointer; }

/* 玻璃质感胶囊 */
.pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 19px;
  background: rgba(30, 22, 16, .52); border: 1px solid rgba(255, 236, 200, .16); backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); font-size: 14px; letter-spacing: .5px; white-space: nowrap; }
.pill.icon { width: 38px; padding: 0; justify-content: center; font-size: 16px; }
.pill.on { background: rgba(214, 160, 70, .78); color: #2a1a0c; border-color: rgba(255, 230, 170, .6); }

#topbar { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 14px; right: 14px; display: flex;
  justify-content: space-between; align-items: center; pointer-events: none; z-index: 4; }
#topbar .left, #topbar .right { display: flex; gap: 8px; pointer-events: auto; }
.room b { font-weight: 600; color: #f7d999; letter-spacing: 2px; }
.room span { opacity: .75; font-variant-numeric: tabular-nums; }
.total { opacity: .9; font-size: 13px; font-variant-numeric: tabular-nums; }

/* 底栏 */
#actions { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px; padding: 6px; border-radius: 30px; background: rgba(30, 22, 16, .55);
  border: 1px solid rgba(255, 236, 200, .16); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); z-index: 4; }
#actions button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 72px; height: 54px; border-radius: 24px; transition: background .15s, transform .08s; }
#actions button i { font-style: normal; font-size: 20px; line-height: 1; display: flex; height: 22px; align-items: center; }
#actions button span { font-size: 12px; letter-spacing: 2px; opacity: .9; }
#actions button:active { transform: scale(.93); }
#actions button.active { background: rgba(214, 160, 70, .85); color: #2a1a0c; }
.fish-ico { width: 22px; height: 18px; border-radius: 50% 50% 46% 46%; background: radial-gradient(circle at 40% 35%, #d9844a, #8a3a16);
  position: relative; display: inline-block; }
.fish-ico::after { content: ''; position: absolute; left: 4px; right: 4px; top: 9px; height: 2px; background: #3a1608; border-radius: 1px; }

#sit { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  height: 40px; padding: 0 26px; border-radius: 20px; font-size: 15px; letter-spacing: 4px; color: #2a1a0c;
  background: linear-gradient(180deg, #f2d08a, #d6a04a); box-shadow: 0 6px 20px rgba(0,0,0,.35); z-index: 4;
  animation: rise .25s ease-out; }
@keyframes rise { from { transform: translate(-50%, 8px); opacity: 0; } }

#nametag { position: fixed; left: 0; top: 0; transform: translate(-50%, -100%); padding: 4px 10px; border-radius: 12px;
  background: rgba(30, 22, 16, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 12px;
  display: flex; gap: 6px; align-items: center; pointer-events: none; z-index: 3; white-space: nowrap; }
#nametag .dot { width: 6px; height: 6px; border-radius: 50%; background: #f2c86a; box-shadow: 0 0 6px #f2c86a; }

#merit { position: fixed; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); font-size: 12px; opacity: .75;
  letter-spacing: 1px; pointer-events: none; z-index: 3; }
#merit b { color: #f7d999; font-weight: 600; font-variant-numeric: tabular-nums; }

#pops { position: fixed; inset: 0; pointer-events: none; z-index: 6; }
.pop { position: absolute; transform: translate(-50%, -50%); font-size: 18px; font-weight: 600; color: #ffe2a0;
  text-shadow: 0 0 12px rgba(255, 190, 80, .8), 0 2px 4px rgba(0,0,0,.5); animation: pop 1.1s ease-out forwards; letter-spacing: 1px; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.8); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -180%) scale(1); } }

#help { position: fixed; bottom: calc(90px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); font-size: 12px; opacity: .55;
  pointer-events: none; white-space: nowrap; text-shadow: 0 1px 3px #000; }

/* 特写 */
#focus { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(64px + env(safe-area-inset-top)) 20px calc(100px + env(safe-area-inset-bottom)); }
.focus-top { display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.focus-title { font-size: 13px; letter-spacing: 6px; opacity: .7; }
.focus-count b { font-size: 46px; font-weight: 300; color: #ffe7b0; font-variant-numeric: tabular-nums; text-shadow: 0 0 20px rgba(255,190,90,.5); }
.focus-count span { font-size: 15px; opacity: .7; margin-left: 6px; }
.focus-hint { text-align: center; font-size: 13px; opacity: .6; letter-spacing: 3px; pointer-events: none; }
.focus-bottom { display: flex; justify-content: center; gap: 12px; }

/* 入口 */
#overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 10;
  background: radial-gradient(ellipse at center, rgba(40,25,15,.45), rgba(10,8,6,.85)); transition: opacity .8s; }
.card { text-align: center; padding: 40px 48px; border: 1px solid rgba(246,215,143,.25); border-radius: 18px;
  background: rgba(30, 18, 12, .55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); max-width: 92vw; }
.card h1 { font-size: 42px; letter-spacing: 18px; color: #f6d78f; font-weight: 400; margin-right: -18px;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif; }
.card .sub { margin-top: 12px; opacity: .72; letter-spacing: 2px; font-size: 14px; }
.card .tip { margin-top: 16px; opacity: .45; font-size: 12px; letter-spacing: 2px; }
#status { margin: 26px 0 20px; font-size: 14px; min-height: 20px; opacity: .9; }
#enter { background: linear-gradient(180deg, #c0532c, #96361c); color: #fbecc8; border-radius: 22px; padding: 11px 52px;
  font-size: 17px; letter-spacing: 10px; box-shadow: 0 8px 24px rgba(150, 50, 20, .35); }
#enter:disabled { opacity: .4; cursor: default; }

#joy { display: none; position: fixed; left: 22px; bottom: calc(100px + env(safe-area-inset-bottom)); width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255, 240, 210, .08); border: 1px solid rgba(255, 230, 190, .3); backdrop-filter: blur(4px);
  touch-action: none; z-index: 4; }
body.entered #joy { display: block; }
body.focused #help, body.focused #joy, body.focused #actions, body.focused #sit, body.focused #nametag, body.focused #merit { display: none !important; }
#joy .knob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px; border-radius: 50%;
  background: rgba(255, 236, 200, .4); pointer-events: none; }

@media (max-width: 600px) {
  #actions button { width: 64px; height: 52px; }
  .total { display: none; }
  #help { display: none; }
  .pill { height: 34px; font-size: 13px; padding: 0 12px; }
  .pill.icon { width: 34px; }
}

