@font-face {
  font-family: "Yibei Display";
  src: url("/fonts/xiao-wei-display.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}
@font-face {
  font-family: "Yibei Table";
  src: url("/fonts/barlow-table-numbers.woff2") format("woff2");
  font-display: swap;
  font-weight: 600;
}
:root {
  color-scheme: dark;
  --night: #17100f;
  --milk: #f8e9d2;
  --muted: #d4b2a4;
  --red: #ed7766;
  --hot: #ff8b74;
  --gold: #ebc190;
  --line: #ffd8bf40;
  --numbers: "Yibei Table", var(--body);
  --serif: "Yibei Display", "Songti SC", "Noto Serif CJK SC", SimSun, serif;
  --body: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; color: var(--milk); background: var(--night); font: 1rem/1.5 var(--body); -webkit-tap-highlight-color: transparent; }
p,h1,h2,ul,blockquote { margin: 0; }
ul { list-style: none; padding: 0; }
button,input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible,input:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
img { display: block; max-width: 100%; }

.landing { min-height: 100svh; max-width: 92rem; margin-inline: auto; background: #160b0a; }
.cover {
  position: relative; isolation: isolate; overflow: hidden; min-height: clamp(23rem, 51svh, 36rem);
  padding: max(1.2rem, env(safe-area-inset-top)) clamp(1.2rem, 6vw, 4rem) 2rem;
  background: radial-gradient(ellipse at 82% 59%, #a23a3b68, transparent 63%), linear-gradient(155deg, #3d1618, #1b0e0c 75%);
}
.cover::before,.cover::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.cover::before {
  z-index: -2;
  background: radial-gradient(circle at 71% 52%, #fe674f15 0 35%, transparent 35.3%),
    radial-gradient(circle at 71% 52%, transparent 0 41%, #ffbc8d54 41.15%, transparent 41.65%),
    radial-gradient(circle at 71% 52%, transparent 0 46%, #ffbc8d27 46.17%, transparent 46.6%);
}
.cover::after {
  z-index: -1;
  background: linear-gradient(90deg, #1b0c0cee, #1b0c0cbb 19%, #1b0c0c23 52%, transparent 77%),
    linear-gradient(0deg, #160b0a 1%, transparent 42%),
    url("/images/cutout-duo-mobile.webp") right -2.1rem bottom / auto 95% no-repeat;
}
.masthead { display: inline-flex; align-items: center; gap: .52rem; white-space: nowrap; color: var(--milk); font-weight: 850; letter-spacing: .09em; }
.mark { display: inline-grid; place-items: center; flex: 0 0 auto; width: 1.65rem; height: 1.65rem; border: 1px solid var(--hot); border-radius: 50%; color: var(--gold); line-height: 1; letter-spacing: 0; }
.cover-copy {
  position: absolute; left: clamp(1.35rem, 8.6vw, 5.65rem); bottom: clamp(3.1rem, 8.4svh, 6.55rem);
  transform: rotate(-6deg); isolation: isolate; text-shadow: 0 3px 15px #120301ef;
  animation: sign-appear .64s cubic-bezier(.12,.59,.28,1) both;
}
.cover-copy h1 { font: 400 clamp(2.05rem, 9vw, 4.1rem)/1.17 var(--serif); letter-spacing: .015em; }
.cover-copy em { color: #ffab89; font-style: normal; }
.cover-copy::before {
  content: ""; position: absolute; z-index: -1; inset: -.65rem -1.9rem -1.15rem -1.2rem;
  background: radial-gradient(ellipse, #1d0809b9, transparent 73%);
}
.cover-copy::after {
  content: ""; display: block; position: absolute; left: 32%; right: 2%; bottom: -.37rem; height: .48rem;
  border-bottom: 2px solid #e47f66c4; border-radius: 50%; transform: rotate(-2deg);
}
@keyframes sign-appear { from { opacity: 0; transform: translateY(.55rem) rotate(-9deg); } to { opacity: 1; transform: rotate(-6deg); } }
.welcome { padding: .2rem clamp(1.2rem, 6vw, 3rem) max(1.35rem, env(safe-area-inset-bottom)); background: linear-gradient(180deg, #160b0a, #21100e); }
.welcome-inner { max-width: 30rem; margin-inline: auto; }
.welcome .lede { margin: 0 0 .95rem; color: var(--milk); }
.open-status { margin-top: .75rem; color: var(--muted); font-size: .82rem; }
.actions { display: grid; gap: .64rem; }
.button {
  display: flex; width: 100%; min-height: 3.08rem; align-items: center; justify-content: center; gap: .62rem;
  padding: .65rem 1rem; border: 1px solid transparent; border-radius: 999px; background: none;
  font-size: 1.04rem; font-weight: 850; line-height: 1.22; text-align: center; transition: transform .13s, background .13s;
}
.button > span { font-size: 1.15em; flex: 0 0 auto; line-height: 1; }
.button:active:not(:disabled) { transform: scale(.974); }
.button.primary { background: var(--red); color: #230d0c; box-shadow: inset 0 1px 0 #ffd6bf6b, 0 8px 28px #9d29222e; }
.button.primary:hover:not(:disabled) { background: var(--hot); }
.button.secondary { border-color: #fdb39f75; background: #ffc2a50c; }
.button.secondary:hover:not(:disabled) { background: #ffc2a524; }
.button:disabled { opacity: .54; box-shadow: none; }
[aria-busy="true"] { opacity: .68; }
.landing-games { display: flex; flex-wrap: wrap; gap: .38rem .7rem; margin-top: 1.16rem; padding-top: .75rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .71rem; }
.game-tag { display: inline-flex; gap: .26rem; align-items: center; white-space: nowrap; }
.game-tag > span { color: var(--hot); font-size: .95rem; line-height: 1; }
.credits { display: flex; gap: .9rem; margin-top: .85rem; color: var(--muted); font-size: .72rem; }
.credits a, .asset-credits a { color: var(--gold); }
.text-button { min-height: 2.45rem; border: 0; border-radius: 999px; padding: .28rem .52rem; color: var(--gold); background: transparent; font-size: .84rem; font-weight: 750; }
.text-button:active { background: #ffd2b322; }
.lede { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.eyebrow { color: var(--hot); font-size: .74rem; font-weight: 800; letter-spacing: .12em; }

.shell { position: relative; isolation: isolate; max-width: 43rem; min-height: 100svh; margin-inline: auto; padding: 0 clamp(.95rem, 5vw, 2rem) max(1rem, env(safe-area-inset-bottom)); }
.shell::before {
  content: ""; position: fixed; z-index: -2; inset: 0 max(0px, calc((100vw - 43rem)/2)); pointer-events: none;
  background: radial-gradient(ellipse at top right, #56211f 1%, transparent 61%), linear-gradient(157deg, #281414, #140c0c 76%);
}
.shell::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0 0 auto auto;
  width: min(18rem, 60%); height: 23rem; opacity: .24; background: url("/images/cutout-manga.webp") right -2.1rem top 1rem / 100% auto no-repeat;
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 52%, transparent 98%);
}
.scene-truth::after { opacity: .13; }
.scene-dice::after,.scene-clink::after { background-image: url("/images/cutout-soft.webp"); opacity: .19; }
.scene-lights::after { opacity: .13; }
.room-header { display: flex; justify-content: space-between; align-items: center; gap: .3rem; min-height: 3.55rem; padding-top: env(safe-area-inset-top); }
.room-tools { display: flex; gap: .15rem; align-items: center; }
.room-header .text-button { color: var(--milk); white-space: nowrap; font-variant-numeric: tabular-nums; }
.room-header .text-button span { color: var(--hot); }
.room-header .room-code { font: 600 1.02rem var(--numbers); letter-spacing: .07em; }
.identity {
  position: sticky; top: .35rem; z-index: 3; display: flex; align-items: center; gap: .53rem; min-height: 3.57rem;
  margin: .06rem 0 .96rem; padding: .32rem .67rem .32rem .42rem;
  border: 1px solid #d36152a0; border-radius: 999px; background: #471d1df4;
  box-shadow: 0 3px 22px #17070685; backdrop-filter: blur(12px);
}
.identity .avatar { --size: 2.43rem; }
.identity > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: .05rem .42rem; min-width: 0; }
.identity p { color: var(--gold); font-size: .73rem; white-space: nowrap; }
.identity strong { color: var(--milk); font-size: 1.13rem; overflow-wrap: anywhere; line-height: 1.22; }
.role { flex: 0 0 auto; margin-left: auto; padding: .1rem .33rem; color: var(--gold); font-size: .73rem; }
.host-away { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: -.45rem 0 .55rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.avatar {
  --size: 2.35rem;
  position: relative; isolation: isolate; display: grid; place-items: center; flex: 0 0 auto;
  width: var(--size); height: var(--size); overflow: hidden;
  border: 1px solid #ffae9ca0; border-radius: 50%; background: #963631; color: var(--milk); font-weight: 900;
}
.avatar > * { grid-area: 1/1; min-width: 0; min-height: 0; }
.avatar img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; }
.stage { display: grid; gap: .88rem; }
.stage-head h1 { font: 750 clamp(1.95rem, 8.7vw, 3.16rem)/1.22 var(--body); letter-spacing: -.02em; }
.stage-head .eyebrow { margin-bottom: .25rem; }
.stage-head .lede { margin-top: .29rem; max-width: 28rem; }
.seats { display: grid; gap: .32rem; padding: .05rem 0 .37rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.section-head h2 { font-size: .82rem; font-weight: 800; }
.section-head > span { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.seat-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem .24rem; }
.seat { position: relative; min-width: 0; display: grid; align-content: start; justify-items: center; gap: .16rem; padding-top: .15rem; }
.seat .avatar { --size: clamp(1.85rem, 8.9vw, 2.8rem); }
.seat-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .71rem; line-height: 1.3; }
.seat small { color: var(--gold); font-size: .6rem; line-height: 1.08; white-space: nowrap; }
.seat.is-self .avatar,.seat.is-holder .avatar { outline: 2px solid var(--hot); outline-offset: 1px; }
.mode-grid { display: grid; }
.mode-card {
  display: grid; grid-template-columns: 2.43rem minmax(0, 1fr) .83rem; align-items: center; gap: .5rem;
  width: 100%; min-height: 3.49rem; padding: .33rem .04rem; text-align: left;
  border: 0; border-bottom: 1px solid var(--line); background: transparent;
}
.mode-card:first-child { border-top: 1px solid var(--line); }
.mode-icon { display: grid; place-items: center; width: 2.18rem; height: 2.18rem; border: 1px solid #a4534b; border-radius: 50%; color: var(--gold); background: #50201e; font-size: 1.13rem; line-height: 1; }
.mode-card.is-selected .mode-icon { background-color: #874138; border-color: var(--gold); }
.mode-icon[class*="mode-icon-"] { color: transparent; background-repeat: no-repeat; background-position: center; background-size: 80% auto; }
.mode-icon-coaster { background-image: url("/images/props/coaster.webp"); }
.mode-icon-clink { background-image: url("/images/props/clink.webp"); }
.mode-icon.mode-icon-lights { background-image: url("/images/props/lantern.webp"); background-size: auto 80%; }
.mode-icon-dice { background-image: url("/images/motion/dice-face-4.webp"); }
.mode-icon-truth { background-image: url("/images/props/cards.webp"); }
.mode-copy { display: grid; }
.mode-copy strong { font-size: 1.01rem; line-height: 1.35; }
.mode-card.is-selected strong { color: var(--gold); }
.mode-copy small { color: var(--muted); font-size: .73rem; line-height: 1.32; }
.mode-arrow { color: var(--hot); text-align: center; }
.invite-band {
  display: flex; justify-content: space-between; align-items: center; gap: .45rem; min-height: 2.7rem; padding: .43rem .89rem;
  border: 1px dashed #faac96a2; border-radius: 999px; background: #bc5f4616; font-size: .89rem; font-weight: 760;
}
.invite-band > span + span { color: var(--gold); font-size: .78rem; }
.room-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.room-footer > span { color: var(--muted); font-size: .69rem; }

.play-card { display: grid; align-content: start; gap: .89rem; min-width: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .66rem .5rem; }
.choice { min-height: 2.72rem; border: 1px solid #f7a08c6b; background: #702d2cce; transition: transform .16s; }
.choice:active:not(:disabled) { transform: scale(.95); }
.coaster-board { padding: .45rem .24rem .3rem; background: radial-gradient(ellipse at center, #68292367, transparent 77%); }
.coaster-choice { display: grid; justify-items: center; gap: .36rem; padding: .12rem; min-width: 0; border: 0; background: transparent; font-size: .76rem; line-height: 1.2; }
.coaster-choice > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coaster-seal {
  display: grid; place-items: center; width: min(100%, 4.9rem); aspect-ratio: 1;
  border-radius: 50%; background: #602622 url("/images/props/coaster.webp") center / 100% no-repeat;
  box-shadow: 0 .26rem .55rem #0d0405ab;
  transform: perspective(260px) rotateX(9deg);
  transition: transform .19s, box-shadow .19s;
}
.coaster-choice:active:not(:disabled) .coaster-seal { transform: perspective(260px) rotateX(18deg) scale(.95); }
.coaster-choice.is-taken .coaster-seal { box-shadow: 0 .12rem .45rem #130807cc; }
.coaster-choice.is-mine .coaster-seal { box-shadow: 0 0 0 2px var(--gold), 0 .18rem .6rem #180804; }
.coaster-seal .coaster-avatar { --size: clamp(1.95rem, 9vw, 2.7rem); }
.play-progress { display: flex; justify-content: space-between; align-items: center; gap: .6rem; color: var(--muted); font-size: .83rem; }
.player-choice-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.player-choice-grid .choice { display: flex; align-items: center; gap: .42rem; min-width: 0; padding: .3rem .55rem .3rem .35rem; border-radius: 999px; text-align: left; }
.player-choice-grid .avatar { --size: 2rem; }
.player-choice-grid .choice > span:last-child { overflow-wrap: anywhere; font-size: .83rem; line-height: 1.22; }
.wait-note,.next-wait,.timing { color: var(--muted); text-align: center; }
.wait-note { padding: .4rem 0; }
.wait-note > span { margin-right: .3rem; color: var(--hot); }
.clink-art {
  display: block; width: min(38vw, 8.25rem); aspect-ratio: 1.34; margin: 0 auto;
  background: url("/images/props/clink.webp") center / contain no-repeat;
  filter: drop-shadow(0 .28rem .68rem #f28a4a55);
}
.clink-impact { position: relative; width: 4.4rem; margin: 0; background: none; }
.clink-impact i { position: absolute; inset: 0; background: url("/images/props/clink.webp") center / contain no-repeat; }
.clink-impact i:first-child {
  clip-path: polygon(0 0,58% 0,57% 27%,55% 62%,52% 100%,0 100%);
  transform-origin: 28% 82%; animation: left-glass .48s cubic-bezier(.18,.6,.32,1) both;
}
.clink-impact i:nth-child(2) {
  clip-path: polygon(57.4% 0,100% 0,100% 100%,51.4% 100%,54.4% 62%,56.4% 27%);
  transform-origin: 73% 80%; animation: right-glass .48s cubic-bezier(.18,.6,.32,1) both;
}
.clink-impact b {
  position: absolute; width: 1.3rem; aspect-ratio: 1; top: 10%; left: 52%;
  background: url("/images/motion/spark.webp") center / contain no-repeat;
  animation: clink-glint .46s .12s ease-out both;
}
@keyframes left-glass { from { transform: perspective(220px) translateX(-.75rem) rotate(-11deg) rotateY(22deg); } 66% { transform: rotate(2deg); } to { transform: none; } }
@keyframes right-glass { from { transform: perspective(220px) translateX(.75rem) rotate(11deg) rotateY(-22deg); } 66% { transform: rotate(-2deg); } to { transform: none; } }
@keyframes clink-glint { 0%, 40% { opacity: 0; transform: scale(.2); } 65% { opacity: 1; } 100% { opacity: 0; transform: scale(1.7); } }
.lights-board {
  padding: 1rem .79rem 1.12rem; border-radius: 3rem 3rem 1.3rem 1.3rem;
  background: url("/images/motion/glow.webp") center -4.3rem / 15rem no-repeat,
    radial-gradient(ellipse at 50% 22%, #692a1d, #2c1414 60%, #1b1110 88%);
  box-shadow: inset 0 1px 0 #f8927e70; text-align: center;
}
.lamp {
  display: block; width: 4.7rem; height: 5.6rem; margin: .12rem auto;
  background: url("/images/props/lantern.webp") center / contain no-repeat;
  filter: drop-shadow(0 0 .95rem #fc772b80);
  transform-origin: 50% 9%; animation: lantern-glow 2.45s ease-in-out infinite alternate;
}
@keyframes lantern-glow {
  from { transform: perspective(320px) rotate(-4deg) rotateY(-7deg); }
  to { transform: perspective(320px) rotate(4deg) rotateY(7deg); filter: drop-shadow(0 0 1.5rem #fb733da0) brightness(1.09); }
}
.held { display: flex; justify-content: center; align-items: center; gap: .46rem; color: var(--gold); font-size: 1.08rem; }
.held .avatar { --size: 2rem; }
.dice-board { text-align: center; justify-items: center; padding: .3rem 0; }
.dice-board .play-progress { width: 100%; }
.dice-board > .button { max-width: 20rem; }
.die {
  display: grid; place-items: center; width: 7rem; aspect-ratio: 1; margin: 0 auto;
  filter: drop-shadow(0 8px 10px #14060588);
}
.die img { width: 100%; height: 100%; object-fit: contain; }
.covered-die::after {
  content: ""; width: 68%; height: 58%; border-radius: 53% 53% 34% 34% / 68% 68% 31% 31%;
  background: radial-gradient(ellipse at 34% 8%,#bd7560,#6e3b36 48%,#38191b 83%);
  border-bottom: 4px solid #b87250; box-shadow: 0 .3rem .72rem #160808a0;
}
.did-roll .die { animation: cover-die .23s ease-out both; }
@keyframes cover-die { from { opacity: .3; transform: translateY(-.35rem); } }

.story-board {
  position: relative; isolation: isolate; min-height: 11.4rem; padding: .9rem .85rem .98rem; border-radius: 2.25rem 2.25rem 1.19rem 1.19rem;
  background: radial-gradient(ellipse at 100% 12%, #7e31377c, transparent 71%), #361a1a; box-shadow: inset 0 1px 0 #f6a5956e;
}
.story-board::after { content: ""; position: absolute; z-index: -1; inset: 0 0 0 auto; width: 54%; opacity: .18; background: url("/images/cutout-story.webp") right bottom / contain no-repeat; mask-image: linear-gradient(90deg,transparent,#000 74%); }
.story-board.is-pick::before {
  content: ""; position: absolute; z-index: -1; top: .35rem; right: 1.15rem;
  width: min(32%, 7.1rem); aspect-ratio: 1.15; opacity: .7;
  background: url("/images/props/cards.webp") center / contain no-repeat;
  transform: perspective(360px) rotateY(-13deg) rotate(-8deg);
}
.story-subject { display: flex; align-items: center; gap: .45rem; color: var(--gold); }
.story-subject .avatar { --size: 1.94rem; }
.story-board.is-pick { min-height: 0; }
.story-board.is-pick .story-subject { min-height: 3.5rem; }
.story-board:not(.is-pick)::before {
  content: ""; position: absolute; z-index: -1; top: .35rem; right: .85rem;
  width: min(28%, 6rem); aspect-ratio: 1.15; opacity: .11;
  background: url("/images/props/cards.webp") center / contain no-repeat;
  animation: card-turn .48s cubic-bezier(.13,.6,.34,1) both;
}
@keyframes card-turn { from { transform: perspective(240px) rotateY(86deg) translateX(.6rem); opacity: .48; } to { transform: rotate(-8deg); opacity: .11; } }
.story-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
.story-actions .button { padding-inline: .46rem; }
.story-options { display: grid; gap: .54rem; }
.story-card { overflow-wrap: break-word; }
.choice.story-card { display: grid; grid-template-columns: 1.72rem minmax(0,1fr) .45rem; align-items: center; gap: .62rem; border: 0; border-bottom: 1px solid var(--line); padding: .65rem .18rem .85rem; background: transparent; text-align: left; }
.choice.story-card:not(:disabled):hover { color: var(--gold); }
.story-card b { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid var(--hot); color: var(--gold); border-radius: 50%; }
.story-card i { color: var(--gold); font-style: normal; }
blockquote.story-card { display: grid; gap: .29rem; padding: .16rem 0 .17rem .68rem; border-left: 2px solid var(--hot); }
blockquote.story-card > span { color: var(--gold); font-size: .77rem; }
blockquote.story-card > p { font: 800 clamp(1.18rem,5.4vw,1.59rem)/1.44 var(--body); }
.story-skip { justify-self: center; }
.result-ticket {
  position: relative; isolation: isolate; display: grid; gap: .37rem; justify-items: center; min-height: 11rem; padding: .94rem .9rem 1.1rem;
  border-radius: 7rem 7rem 1.35rem 1.35rem; text-align: center;
  background: radial-gradient(ellipse at 50% 21%, #aa483b68, transparent 74%), #461e20;
  animation: result-arrive .35s cubic-bezier(.17,.65,.41,1) both;
}
.result-ticket::before { content: ""; position: absolute; z-index: -1; top: .67rem; left: 50%; transform: translateX(-50%); width: 6.7rem; aspect-ratio: 1; border: 1px solid #f9876680; border-radius: 50%; }
.result-lights { background: radial-gradient(ellipse at 50% 23%,#5428218e,transparent 65%),#211312; }
.result-ticket .winner-avatar { --size: 3.68rem; border: 2px solid var(--hot); }
.result-emblem { position: relative; display: flex; align-items: center; justify-content: center; gap: .46rem; }
.red-stamp {
  display: grid; place-items: center; width: 3.25rem; aspect-ratio: 1; margin-left: -.27rem;
  border: 2px solid #ffa086; border-radius: 50%; color: #ffd5aa; background: #bc4036;
  font: 900 1.38rem/1 var(--serif); transform: rotate(-12deg);
  box-shadow: inset 0 0 0 .2rem #a82b2e, 0 .28rem .65rem #20100db7;
  animation: stamp-turn .45s .05s cubic-bezier(.2,.67,.4,1) both;
}
@keyframes stamp-turn { from { opacity: 0; transform: rotateY(88deg) rotate(-22deg) scale(1.2); } to { opacity: 1; transform: rotateY(0) rotate(-12deg) scale(1); } }
.lamp.lamp-out {
  width: 2.85rem; height: 3.25rem; margin: 0;
  filter: brightness(.4) saturate(.25); animation: light-out .42s ease-out both;
}
@keyframes light-out {
  from { filter: brightness(1.07) drop-shadow(0 0 1.1rem #ff732e); }
  to { filter: brightness(.4) saturate(.25); }
}
.clink-pairs { display: grid; gap: .3rem; }
.clink-pairs h2 { font-size: .89rem; color: var(--muted); }
.clink-pair {
  display: flex; align-items: center; justify-content: center; gap: .39rem;
  min-height: 2.4rem; padding: .2rem .05rem; border-bottom: 1px solid var(--line); font-size: .84rem;
}
.clink-pair .avatar { --size: 1.78rem; }
.clink-pair > span:not(.avatar) { min-width: 0; overflow-wrap: anywhere; }
.clink-pair i { color: var(--gold); font-style: normal; animation: clink-tap .42s ease-out both; }
@keyframes clink-tap { 0% { opacity: 0; transform: scale(.45); } 50% { opacity: 1; transform: scale(1.5); } 100% { transform: scale(1); } }
.story-options,.story-board blockquote { animation: card-slide .3s ease-out both; }
@keyframes card-slide { from { opacity: 0; transform: perspective(450px) rotateX(-13deg) translateY(.44rem); } to { opacity: 1; transform: none; } }
.result-ticket .winner-name { font: 600 clamp(1.86rem,9vw,3.1rem)/1.1 var(--body); overflow-wrap: anywhere; }
.result-ticket .eyebrow { color: var(--gold); }
.result-ticket.is-yours { box-shadow: inset 0 0 0 1px #ff8b6aa0,0 0 1.8rem #e747332a; }
.result-ticket > p:not(.eyebrow) { max-width: 28rem; }
.result-ticket > small { color: var(--muted); font-size: .75rem; }
@keyframes result-arrive { from { opacity: 0; transform: translateY(.65rem) scale(.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.story-result-card { margin-top: .35rem; font-size: 1.05rem; line-height: 1.52; }
.scores h2 { color: var(--muted); font-size: .88rem; margin-bottom: .15rem; }
.score-list li { display: flex; align-items: center; gap: .43rem; padding: .27rem .06rem; border-bottom: 1px solid var(--line); font-size: .83rem; }
.score-list .avatar { --size: 1.75rem; }
.score-list strong { display: inline-flex; align-items: center; gap: .2rem; margin-left: auto; white-space: nowrap; color: var(--gold); }
.score-list strong img { width: 1.75rem; height: 1.75rem; }
.score-list strong b { font: 600 1.14rem var(--numbers); }

.dialog {
  width: min(26rem,calc(100% - 1.4rem)); max-height: min(90svh,48rem); overflow: auto; margin: auto; padding: 0;
  border: 1px solid #efb1a383; border-radius: 2.48rem 2.48rem 1.62rem 1.62rem; background: #3e1a1b; color: var(--milk);
  box-shadow: 0 1.4rem 5rem #0d0202ad;
}
.dialog::backdrop { background: #100706ce; backdrop-filter: blur(4px); }
.dialog-content { position: relative; isolation: isolate; display: grid; gap: .85rem; padding: clamp(1.04rem,5vw,1.45rem); background: radial-gradient(ellipse at 100% 5%,#91433765,transparent 54%); }
.dialog-content::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; right: 0; top: 0; width: 9rem; height: 10.4rem;
  background: url("/images/cutout-soft.webp") right center / contain no-repeat; opacity: .16; mask-image: linear-gradient(180deg,#000,transparent);
}
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: .55rem; }
.dialog-head h2 { font: 750 clamp(1.5rem,6.5vw,2.03rem)/1.25 var(--body); }
.dialog-head .eyebrow { margin-bottom: .19rem; }
.dialog-close { display: grid; place-items: center; width: 2.45rem; height: 2.45rem; flex: 0 0 auto; border: 1px solid #ffc5ab85; border-radius: 50%; background: #ffd8c519; font-size: 1.46rem; line-height: 1; }
.dialog form { display: grid; gap: .72rem; }
.avatar-field { margin: 0; padding: 0; min-width: 0; border: 0; }
.avatar-field legend,.field { color: var(--gold); font-size: .84rem; font-weight: 720; }
.avatar-field legend { padding: 0; margin-bottom: .36rem; }
.avatar-picks { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .26rem .19rem; }
.avatar-pick { display: grid; justify-items: center; gap: .13rem; padding: .2rem .1rem; border: 0; border-radius: 1.55rem; background: transparent; }
.avatar-pick .avatar { --size: clamp(2.42rem,11vw,3.34rem); border-width: 2px; border-color: #c5534c; }
.avatar-pick.is-selected .avatar { outline: 2px solid var(--gold); outline-offset: 2px; border-color: var(--red); }
.avatar-pick.is-selected .avatar-label { color: var(--gold); }
.avatar-pick:disabled { opacity: .42; }
.avatar-label { font-size: .74rem; }
.field { display: grid; gap: .29rem; }
.field input,.copy-source,.chat-input { width: 100%; min-height: 2.85rem; padding: .59rem .82rem; border: 1px solid #feb6a28c; border-radius: 999px; background: #1d0e10db; color: var(--milk); font-size: 1rem; font-weight: 500; }
.field input::placeholder,.chat-input::placeholder { color: #cfa69b; }
.form-error { color: #ffab98; font-size: .82rem; }
.qr-frame { display: grid; place-items: center; width: min(90%,15.4rem); aspect-ratio: 1; margin-inline: auto; overflow: hidden; border: .4rem solid var(--red); border-radius: 2.65rem; background: #fff; box-shadow: 0 0 1.5rem #ef654d32; }
.qr-frame img { width: 100%; height: auto; }
.join-code { text-align: center; font: 600 1.7rem var(--numbers); letter-spacing: .23em; }
.invite-help { margin-top: -.53rem; text-align: center; }
.toast { position: fixed; z-index: 9; bottom: max(1rem,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 1.4rem); padding: .58rem .86rem; border-radius: 999px; background: #ffb296; color: #29110f; box-shadow: 0 .35rem 1rem #180706a0; font-size: .9rem; font-weight: 760; }

.chat-list { display: grid; gap: .61rem; align-content: start; min-height: min(26svh,12rem); max-height: 45svh; overflow: auto; overscroll-behavior: contain; padding: .14rem .17rem .18rem 0; }
.chat-list li { display: flex; align-items: flex-start; gap: .43rem; min-width: 0; }
.chat-list .avatar { --size: 1.8rem; }
.chat-list li > div { min-width: 0; }
.chat-list li small { display: block; color: var(--gold); font-size: .73rem; }
.chat-list li p { margin-top: .12rem; padding: .24rem .58rem; border-radius: .35rem .85rem .85rem .85rem; background: #6b3030b3; overflow-wrap: anywhere; font-size: .88rem; }
.chat-list .chat-empty { color: var(--muted); font-size: .89rem; }
.chat-emojis { display: flex; flex-wrap: wrap; gap: .38rem; }
.chat-emoji { min-height: 2.3rem; min-width: 2.3rem; border: 1px solid #f49e8755; border-radius: 50%; background: #682e2d; font-size: 1.06rem; }
.chat-compose { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .4rem; }
.chat-compose .button { min-height: 2.85rem; padding-inline: .78rem; font-size: .88rem; }

.asset-credits { max-width: 34rem; margin: 8vh auto; padding: 1.2rem; }
.asset-credits h1 { margin: .55rem 0; font: 750 2.05rem var(--body); }
.asset-credits li { margin: .77rem 0; }
@media (min-width: 47rem) {
  .landing { display: grid; grid-template-columns: minmax(0,1.47fr) minmax(21rem,1fr); }
  .cover { min-height: 100svh; }
  .cover::after { background: linear-gradient(90deg,#1b0c0cec,#1b0c0cad 22%,#1b0c0c19 61%,transparent 81%), linear-gradient(0deg,#160b0a,transparent 39%), url("/images/cutout-duo.webp") right -1rem bottom / auto 89% no-repeat; }
  .cover-copy { bottom: 14%; }
  .welcome { display: grid; align-content: center; justify-items: stretch; padding-block: 2rem; }
  .welcome .lede { font-size: 1.27rem; margin-bottom: 1.35rem; }
}
@media (max-width: 23rem) {
  .cover { min-height: 21.7rem; }
  .cover::after { background: linear-gradient(90deg,#1b0c0ce8,#1b0c0c9f 22%,#1b0c0c22 54%,transparent 78%),linear-gradient(0deg,#160b0a,transparent 41%),url("/images/cutout-duo-mobile.webp") right -2.8rem bottom / auto 94% no-repeat; }
  .shell { padding-inline: .85rem; }
  .room-tools .text-button { padding-inline: .35rem; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}
