@font-face { font-family: 'MJSongB'; src: url('/mj-song-b.woff2') format('woff2'); font-weight: 400 900; font-display: block; }
@font-face { font-family: 'MJSong'; src: url('/mj-song.woff2') format('woff2'); font-weight: 400 900; font-display: block; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none;
  background: radial-gradient(ellipse at center, #1b6b45 0%, #0f4d32 70%, #0a3a25 100%);
  color: #f3efe2; font-family: -apple-system, "PingFang TC", "Heiti TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
body { position: fixed; inset: 0; }
button { font: inherit; }
.hidden { display: none !important; }

.screen { position: absolute; inset: 0; display: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.screen.active { display: flex; }

/* ---------- cards / buttons ---------- */
.btn.big { font-size: 20px; padding: 14px 16px; }
.voicepick { display: flex; align-items: center; gap: 8px; font-size: 14px; opacity: .95; }
.vbtn { border: 1px solid rgba(255,255,255,.3); background: transparent; color: #f3efe2; border-radius: 16px; padding: 4px 14px; font-size: 14px; }
.vbtn.on { background: #ffcc4d; color: #3a2a00; border-color: #ffcc4d; }
.toggle { flex-direction: row; align-items: center; gap: 8px; font-size: 15px; }
.toggle input[type=checkbox] { width: 20px; height: 20px; }
.toggle input[type=range] { flex: 1; }
.card { background: rgba(10, 40, 26, .92); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px;
  padding: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
#home, #lobby { align-items: center; justify-content: center; overflow-y: auto; }
.home-card, .lobby-card { width: min(92vw, 420px); display: flex; flex-direction: column; gap: 12px; margin: auto; }
h1 { margin: 0; font-size: 30px; letter-spacing: 4px; text-align: center; color: #ffd76a; }
.sub { margin: -6px 0 4px; text-align: center; opacity: .75; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; opacity: .9; }
input { font-size: 18px; padding: 10px 12px; border-radius: 10px; border: 1px solid #3c7a5a; background: #fdfbf3; color: #222;
  -webkit-user-select: text; user-select: text; min-width: 0; }
.row { display: flex; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row input { flex: 1; }
.or { text-align: center; font-size: 13px; opacity: .65; }
.hint { font-size: 12px; opacity: .65; margin: 0; line-height: 1.5; }
.btn { border: 0; border-radius: 10px; padding: 11px 16px; font-size: 16px; font-weight: 600; cursor: pointer;
  background: #e9e1c8; color: #1c3b2b; }
.btn:active { transform: scale(.97); }
.btn.primary { background: #ffcc4d; color: #3a2a00; flex: 1; }
.btn.danger { background: #d9534f; color: #fff; }
.btn.ghost { background: transparent; color: #f3efe2; border: 1px solid rgba(255, 255, 255, .25); }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn:disabled { opacity: .4; }
.iconbtn { background: rgba(0, 0, 0, .25); color: #fff; border: 0; border-radius: 8px; padding: 2px 10px; font-size: 16px; }

.lobby-head { display: flex; justify-content: space-between; align-items: center; font-size: 18px; }
.code { font-size: 28px; font-weight: 800; letter-spacing: 4px; color: #ffd76a; margin-left: 6px; }
.seats { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.seats li { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .06); border-radius: 10px; padding: 8px 10px; min-height: 44px; }
.seats .wind { width: 28px; height: 28px; border-radius: 50%; background: #e9e1c8; color: #1c3b2b; display: grid; place-items: center; font-weight: 800; }
.seats .nm { flex: 1; }
.seats .empty { opacity: .45; }
.tag { font-size: 11px; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .15); margin-left: 6px; }
.tag.host { background: #ffcc4d; color: #3a2a00; }
.tag.off { background: #7a3030; }

/* ---------- tiles (flat, face up: white face, green body) ---------- */
.tile { --w: 40px; width: var(--w); height: calc(var(--w) * 1.36); flex: none; position: relative; display: inline-block; overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f3f3ef 100%); border-radius: calc(var(--w) * .12);
  box-shadow: 0 calc(var(--w) * .09) 0 #2e9a4b, 0 calc(var(--w) * .13) 0 #1f7536, 0 calc(var(--w) * .17) calc(var(--w) * .14) rgba(0, 0, 0, .35); }
.tile svg { display: block; width: 100%; height: 100%; }
.tile.back { background: linear-gradient(180deg, #4cc06c 0%, #2a8a45 100%);
  box-shadow: 0 calc(var(--w) * .09) 0 #f4f4ef, 0 calc(var(--w) * .13) 0 #cfcfc6, 0 2px 3px rgba(0, 0, 0, .35); }
.tile.last { outline: 2px solid #ff5252; outline-offset: 1px; }
.rw { position: relative; width: calc(var(--w) * 1.36 + 3px); height: calc(var(--w) + 1px); flex: none; }
.rw .tile { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(var(--rot)); }

/* ---------- table: fixed 844x390 stage scaled to the screen ---------- */
#table { background: linear-gradient(180deg, #123c3d 0%, #1b5556 40%, #163f40 100%); overflow: hidden; padding: 0; }
#table.active { display: block; }
.insets { position: fixed; visibility: hidden; pointer-events: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.stage { position: absolute; left: 0; top: 0; width: 844px; height: 390px; transform-origin: 0 0; }
.plane { position: absolute; left: 42px; top: -226px; width: 760px; height: 540px; transform-style: preserve-3d;
  transform-origin: 50% 100%; transform: perspective(860px) rotateX(38deg) scale(0.93); }
.cloth { position: absolute; top: -420px; bottom: -160px; left: -150px; right: -150px;
  border-left: 46px solid #5a3420; border-right: 46px solid #5a3420;
  box-shadow: inset 4px 0 0 #2e170b, inset -4px 0 0 #2e170b, inset 10px 0 14px rgba(0, 0, 0, .45), inset -10px 0 14px rgba(0, 0, 0, .45), 0 0 40px rgba(0, 0, 0, .6);
  background: radial-gradient(ellipse at 50% 62%, #58c0bc 0%, #35a09d 45%, #25807e 100%); }
.plane .layer { position: absolute; inset: 0; transform-style: preserve-3d; }
.plane .abs { position: absolute; }
.face { position: absolute; }
/* opponents' standing tiles */
.f-top { background: linear-gradient(90deg, #fbfbf6 0 52%, #e9e9e0 52% 58%, #3aa95c 58%); border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.f-top.r { background: linear-gradient(270deg, #fbfbf6 0 52%, #e9e9e0 52% 58%, #3aa95c 58%); }
.f-top.t { background: linear-gradient(0deg, #fbfbf6 0 52%, #e9e9e0 52% 58%, #3aa95c 58%); }
.f-back { background: linear-gradient(180deg, #56c977, #2e9a4b); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
/* walls: two stacked tiles */
.wtop { background: linear-gradient(180deg, #4fbf63 0%, #3aaa52 70%, #7fdc8e 88%, #2f9447 100%); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.wtop.L { background: linear-gradient(90deg, #2f9447 0%, #3aaa52 12%, #4fbf63 60%, #7fdc8e 88%, #3aaa52 100%); }
.wtop.R { background: linear-gradient(270deg, #2f9447 0%, #3aaa52 12%, #4fbf63 60%, #7fdc8e 88%, #3aaa52 100%); }
.wfront { background: linear-gradient(180deg, #2f9447 0 22%, #f2f2ee 22% 50%, #3aaa52 50% 64%, #7fdc8e 64% 68%, #e9e9e4 68% 100%); border-radius: 0 0 3px 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }
.wfront.one { background: linear-gradient(180deg, #2f9447 0 28%, #7fdc8e 28% 34%, #f2f2ee 34% 100%); }
.wside { border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }
.wside.L { background: linear-gradient(270deg, #2f9447 0 22%, #f2f2ee 22% 50%, #3aaa52 50% 64%, #7fdc8e 64% 68%, #e9e9e4 68% 100%); }
.wside.R { background: linear-gradient(90deg, #2f9447 0 22%, #f2f2ee 22% 50%, #3aaa52 50% 64%, #7fdc8e 64% 68%, #e9e9e4 68% 100%); }
.wside.L.one { background: linear-gradient(270deg, #2f9447 0 28%, #7fdc8e 28% 34%, #f2f2ee 34% 100%); }
.wside.R.one { background: linear-gradient(90deg, #2f9447 0 28%, #7fdc8e 28% 34%, #f2f2ee 34% 100%); }
/* rivers */
.river { display: flex; flex-wrap: wrap; gap: 3px 2px; align-content: flex-start; }
/* melds on the table */
.mrow { display: flex; gap: 0; align-items: flex-end; }
.mrow.rot180 { transform: rotate(180deg); transform-origin: 50% 50%; }
.mrow.rot180 .mg { margin-left: 6px; }
.mg { display: flex; }
.mcol { display: flex; flex-direction: column; }
.zbadge { background: #c62828; color: #fff; font-weight: 900; font-size: 20px; padding: 4px 6px; border-radius: 5px; box-shadow: 0 3px 0 #7d1111; }
/* compass */
.compass { position: relative; border-radius: 12px; background: linear-gradient(160deg, #1f5f63, #123c40); border: 3px solid #d8b24a; }
.compass .cw { position: absolute; font-weight: 800; font-size: 20px; opacity: .5; color: #fff; }
.compass .cw.on { opacity: 1; color: #ffcc4d; text-shadow: 0 0 8px #ffcc4d; }
.compass .c0 { bottom: 3px; left: 50%; transform: translateX(-50%); }
.compass .c2 { top: 3px; left: 50%; transform: translateX(-50%); }
.compass .c3 { left: 6px; top: 50%; transform: translateY(-50%); }
.compass .c1 { right: 6px; top: 50%; transform: translateY(-50%); }
.compass .cmid { position: absolute; inset: 24px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; }
.compass .dice { display: flex; gap: 4px; }
.compass .ct { font-size: 13px; color: #fff; line-height: 1; min-height: 13px; margin-top: 2px; }
.die { width: 20px; height: 20px; background: #fff; border-radius: 5px; display: inline-grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 3px; box-shadow: 0 2px 0 #bbb; }
.die b { width: 4.5px; height: 4.5px; border-radius: 50%; background: #222; place-self: center; }
.die b.red { background: #d32f2f; width: 6px; height: 6px; }

/* avatars */
#avatars .pl { position: absolute; display: flex; align-items: center; gap: 6px; z-index: 4; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; color: #fff;
  border: 2px solid #fff; position: relative; flex: none; box-shadow: 0 2px 4px rgba(0, 0, 0, .4); }
.avatar .wb { position: absolute; right: -7px; bottom: -5px; background: #fdf6e3; color: #1d2b4a; border-radius: 50%; width: 17px; height: 17px;
  font-size: 11px; display: grid; place-items: center; border: 1px solid #1d2b4a; }
.avatar .db { position: absolute; left: -8px; top: -6px; background: #c62828; color: #fff; border-radius: 4px; padding: 0 3px; font-size: 10px; }
.avatar .tp { position: absolute; right: -14px; top: -10px; background: radial-gradient(circle at 35% 30%, #6ab7ff, #1f5fae); color: #fff;
  border: 2px solid #fff; border-radius: 50%; width: 22px; height: 22px; font-size: 12px; display: grid; place-items: center; box-shadow: 0 0 8px #6ab7ff; }
.avatar.turn { box-shadow: 0 0 0 3px #ffcc4d, 0 0 14px 4px rgba(255, 204, 77, .8); }
.avatar.off { filter: grayscale(1) brightness(.7); }
.pnm { font-size: 11px; background: rgba(0, 0, 0, .45); padding: 1px 6px; border-radius: 8px; white-space: nowrap; max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.psc { font-size: 11px; color: #ffe08a; }

.roundbar { position: absolute; top: 4px; right: 6px; display: flex; gap: 6px; align-items: center; font-size: 12px; z-index: 6; }
.roundbar #roundInfo { background: rgba(0, 0, 0, .4); padding: 3px 10px; border-radius: 10px; color: #ffe08a; white-space: nowrap; }
.iconbtn { background: rgba(0, 0, 0, .35); color: #fff; border: 0; border-radius: 8px; padding: 2px 9px; font-size: 15px; }
.iconbtn.off { opacity: .45; text-decoration: line-through; }

/* my hand: 3D standing tiles */
.hand3d { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); display: flex; align-items: flex-end; z-index: 5; }
.hand3d .ht { transition: transform .08s; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .35)); }
.hand3d .ht.sel { transform: translateY(-16px); }
.hand3d .gap { width: 12px; flex: none; }
.hand3d.can .ht { cursor: pointer; }

/* action buttons */
.actions { position: absolute; right: 14px; bottom: 84px; display: flex; gap: 10px; align-items: center; z-index: 7; }
.act { border: 3px solid #fff; border-radius: 50%; width: 58px; height: 58px; padding: 0; font-size: 22px; font-weight: 900; color: #fff;
  background: radial-gradient(circle at 35% 30%, #5fa0e8, #1f5fae); box-shadow: 0 4px 8px rgba(0, 0, 0, .45);
  display: inline-flex; flex-direction: column; gap: 2px; align-items: center; justify-content: center; }
.act .tiles { display: flex; gap: 1px; }
.act .tile { --w: 11px; }
.act.hu { background: radial-gradient(circle at 35% 30%, #ff7a6b, #c62828); width: 66px; height: 66px; font-size: 24px; }
.act.pong, .act.kong { background: radial-gradient(circle at 35% 30%, #ffc04d, #e07b00); }
.act.chi { background: radial-gradient(circle at 35% 30%, #6fd394, #1f8a4c); }
.act.pass { background: radial-gradient(circle at 35% 30%, #9a9a9a, #555); width: 48px; height: 48px; font-size: 18px; }

.toast { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, .72); padding: 8px 18px;
  border-radius: 20px; font-size: 18px; font-weight: 800; opacity: 0; pointer-events: none; transition: opacity .2s; white-space: nowrap; z-index: 8; }
.toast.show { opacity: 1; }

/* ---------- modals ---------- */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 10px; }
.result-card { width: min(96vw, 640px); max-height: 92vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.result-card h2 { margin: 0; color: #ffd76a; text-align: center; }
.result-card .wh { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; align-items: flex-end; }
.result-card .wh .tile { --w: 26px; }
.result-card .wh .gap { width: 8px; }
.tai { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tai span { background: rgba(255, 255, 255, .1); border-radius: 8px; padding: 3px 8px; font-size: 14px; }
.tai .tot { background: #ffcc4d; color: #3a2a00; font-weight: 800; }
.pays { width: 100%; border-collapse: collapse; font-size: 14px; }
.pays td { padding: 4px 6px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.pays .plus { color: #7ee08a; } .pays .minus { color: #ff8a80; }
.menu-card { width: min(90vw, 340px); display: flex; flex-direction: column; gap: 10px; }
.menu-card h3 { margin: 0; }

.conn { position: fixed; top: env(safe-area-inset-top); left: 50%; transform: translateX(-50%); background: #b23b3b; color: #fff;
  padding: 4px 14px; border-radius: 0 0 10px 10px; z-index: 30; font-size: 13px; }
.errmsg { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #b23b3b; color: #fff; padding: 8px 16px; border-radius: 10px; z-index: 40; }
.rotate { display: none; position: fixed; top: 46px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, .7);
  padding: 6px 14px; border-radius: 16px; z-index: 15; font-size: 14px; pointer-events: none; }
@media (orientation: portrait) {
  body.playing .rotate { display: block; }
}
@media (max-height: 500px) {
  .home-card, .lobby-card { gap: 8px; padding: 12px 16px; }
  .seats li { min-height: 34px; padding: 4px 10px; }
  .code { font-size: 22px; }
  h1 { font-size: 24px; }
  .btn { padding: 8px 14px; }
}

/* v0.13 */
.mcol { display: flex; flex-direction: column; }
.mcg { display: flex; flex-direction: column; margin-bottom: 6px; }
.mg { display: flex; margin-right: 5px; }
.frow { display: flex; gap: 1px; }
.rot180 { transform: rotate(180deg); }
.compass .cmid { inset: 22px 24px; gap: 3px; }
.compass .ct { font-family: 'Courier New', ui-monospace, monospace; font-size: 34px; font-weight: 900; line-height: 1; color: #6ff3ff;
  text-shadow: 0 0 6px #22d3ee, 0 0 12px #0891b2; letter-spacing: 1px; min-height: 34px; margin: 0; }
.compass .die { width: 15px; height: 15px; padding: 2px; border-radius: 3px; }
.compass .die b { width: 3px; height: 3px; } .compass .die b.red { width: 4px; height: 4px; }
.bigtile { position: absolute; z-index: 6; pointer-events: none; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.bigtile.show { opacity: 1; transform: scale(1); }
.bigtile .bt3 { filter: drop-shadow(0 0 3px rgba(255, 215, 90, 1)) drop-shadow(0 0 12px rgba(255, 200, 60, .9)) drop-shadow(0 4px 4px rgba(0,0,0,.35)); }
.bigtile.p2 { left: 400px; top: 34px; }
.bigtile.p3 { left: 196px; top: 120px; }
.bigtile.p1 { left: 600px; top: 120px; }
.bigtile.p0 { left: 400px; top: 196px; }
/* wooden rail: highlight stripe on the thick edge */
.cloth::before, .cloth::after { content: ''; position: absolute; top: 0; bottom: 0; width: 46px; pointer-events: none;
  background: linear-gradient(90deg, #3b2012 0%, #6e4128 30%, #8a5534 48%, #6e4128 66%, #43261a 100%); }
.cloth::before { left: -46px; } .cloth::after { right: -46px; transform: scaleX(-1); }
#table { background: linear-gradient(180deg, #2a160c 0%, #3a2114 50%, #24130a 100%); }
/* flat tiles rotated toward their owner: keep the green body + shadow on the screen-bottom side */
.tile.sh90  { box-shadow: calc(var(--w) * .09) 0 0 #2e9a4b, calc(var(--w) * .13) 0 0 #1f7536, calc(var(--w) * .17) 0 calc(var(--w) * .14) rgba(0, 0, 0, .35); }
.tile.sh-90 { box-shadow: calc(var(--w) * -.09) 0 0 #2e9a4b, calc(var(--w) * -.13) 0 0 #1f7536, calc(var(--w) * -.17) 0 calc(var(--w) * .14) rgba(0, 0, 0, .35); }
.tile.sh180 { box-shadow: 0 calc(var(--w) * -.09) 0 #2e9a4b, 0 calc(var(--w) * -.13) 0 #1f7536, 0 calc(var(--w) * -.17) calc(var(--w) * .14) rgba(0, 0, 0, .35); }
.river .tile.last { outline: 2px solid #ff5252; }
/* end face of opponents' standing tiles (white face side + green back side) */
.f-end { border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.f-end.L { background: linear-gradient(90deg, #f4f4ee 0 46%, #dcdcd2 46% 52%, #34a356 52% 100%); }
.f-end.R { background: linear-gradient(270deg, #f4f4ee 0 46%, #dcdcd2 46% 52%, #34a356 52% 100%); }
/* my melds + flowers: 3D blocks lying face-up */
.mymelds { position: absolute; left: 8px; bottom: 6px; display: flex; align-items: flex-end; gap: 7px; z-index: 5; }
.myflowers { position: absolute; left: 252px; bottom: 96px; display: flex; gap: 1px; z-index: 4; }
.lg { position: relative; display: flex; gap: 0; }
.lg .lt, .myflowers .lt { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }
.lg .ontop { position: absolute; }
.mymelds .zbadge { align-self: center; margin-right: 4px; font-size: 17px; padding: 3px 5px; }
/* short end faces of wall stacks (seen when the wall is broken) */
.wend { border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }
.wend.a { background: linear-gradient(90deg, #2f9447 0 22%, #f2f2ee 22% 50%, #3aaa52 50% 64%, #7fdc8e 64% 68%, #e9e9e4 68% 100%); }
.wend.b { background: linear-gradient(270deg, #2f9447 0 22%, #f2f2ee 22% 50%, #3aaa52 50% 64%, #7fdc8e 64% 68%, #e9e9e4 68% 100%); }
.wend.c { background: linear-gradient(0deg, #2f9447 0 22%, #f2f2ee 22% 50%, #3aaa52 50% 64%, #7fdc8e 64% 68%, #e9e9e4 68% 100%); }
.wend.a.one { background: linear-gradient(90deg, #2f9447 0 28%, #7fdc8e 28% 34%, #f2f2ee 34% 100%); }
.wend.b.one { background: linear-gradient(270deg, #2f9447 0 28%, #7fdc8e 28% 34%, #f2f2ee 34% 100%); }
.wend.c.one { background: linear-gradient(0deg, #2f9447 0 28%, #7fdc8e 28% 34%, #f2f2ee 34% 100%); }
/* right player's melds/flowers: real 3D lying tiles */
.ltop { background: #fff; border-radius: 3px; box-shadow: inset 0 0 0 1px #c3ccc7; overflow: hidden; }
.lface-in { position: absolute; transform: rotate(-90deg); }
.lface-in svg { display: block; width: 100%; height: 100%; }
.lside { border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.lfront { background: linear-gradient(180deg, #2a8a45 0 46%, #ffffff 46% 52%, #eef0ec 52% 100%); }
.lleft  { background: linear-gradient(90deg, #eef0ec 0 48%, #ffffff 48% 54%, #2a8a45 54% 100%); }
.lface-in.r180 { transform: rotate(180deg); }
.ltop.lback { background: linear-gradient(180deg, #4cc06c, #2a8a45); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.lface-in.l90 { transform: rotate(90deg); }
.lright { background: linear-gradient(270deg, #eef0ec 0 48%, #ffffff 48% 54%, #2a8a45 54% 100%); }
/* last discard marker: a down arrow that taps down once per second */
.darrow { pointer-events: none; }
.darrow i { position: absolute; left: 0; bottom: 6px; width: 20px; height: 24px; animation: tapdown 1s ease-in-out infinite;
  filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
.darrow svg { display: block; }
.dglow { pointer-events: none; border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 255, 255, .95) 0%, rgba(255, 240, 190, .6) 40%, rgba(255, 240, 190, 0) 72%);
  animation: glowpulse 1s ease-in-out infinite; }
@keyframes glowpulse { 0%, 100% { opacity: .55; } 45% { opacity: 1; } }
@keyframes tapdown { 0%, 100% { transform: translateY(-10px); } 45% { transform: translateY(0); } 60% { transform: translateY(-3px); } }
.notice { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); background: rgba(160, 30, 30, .92); color: #fff;
  padding: 8px 18px; border-radius: 18px; font-size: 16px; font-weight: 800; opacity: 0; pointer-events: none; transition: opacity .2s;
  white-space: nowrap; z-index: 9; box-shadow: 0 3px 10px rgba(0, 0, 0, .4); }
.notice.show { opacity: 1; }
.waits { position: absolute; left: 132px; top: 300px; display: none; align-items: center; gap: 3px; z-index: 6; padding: 4px 8px 6px;
  background: rgba(10, 40, 50, .78); border: 1px solid rgba(106, 183, 255, .7); border-radius: 10px; box-shadow: 0 0 10px rgba(106, 183, 255, .5); }
.waits.show { display: flex; }
.waits span { color: #8fd0ff; font-weight: 900; font-size: 15px; margin-right: 4px; }
/* 天聽 / 地聽 */
.act.ting { background: radial-gradient(circle at 35% 30%, #6ab7ff, #1f5fae); font-size: 17px; }
.act.ting.on { background: radial-gradient(circle at 35% 30%, #b0b8c0, #5b6670); font-size: 13px; }
.hand3d .ht.dim { filter: brightness(.55); }
.avatar .tp.decl { width: auto; padding: 0 5px; border-radius: 9px; font-size: 11px; background: radial-gradient(circle at 35% 30%, #ff8a7a, #c62828); }
