@import './whisper-picker.css';
:root {color-scheme:dark;font:15px/1.55 "Microsoft YaHei",system-ui,sans-serif;color:#f3e4ce;background:#16131a}
* {box-sizing:border-box}
body {margin:0;min-width:320px;min-height:100dvh;background:radial-gradient(ellipse at 56% 20%,#32222c,#17131bf5 72%)}
[hidden] {display:none!important}
h1,h2,h3,p,dl {margin:0}
h1,h2,.brand {font-family:"Songti SC",SimSun,serif;font-weight:600}
h1 {font-size:clamp(25px,3vw,40px)}
h2 {font-size:25px}
h3 {font-size:16px}
a {color:#ebca98;text-decoration:none}
input,select,button {font:inherit;color:inherit;background:#28202a;border:1px solid #6c584e;border-radius:4px;padding:.46em .67em}
button,summary {cursor:pointer}
button:hover:not(:disabled),button:focus-visible,a:focus-visible {border-color:#cfaa75;outline:1px solid #c8a978;outline-offset:1px}
button:disabled {opacity:.48;cursor:default}
button.primary {background:#74504d;border-color:#c3916a;color:#fff2df}
label {display:flex;align-items:center;gap:.5em;flex-wrap:wrap}
form {display:flex;align-items:center;flex-wrap:wrap;gap:8px}
small,.notes {color:#c8ae91}
.site-header {display:flex;gap:16px;align-items:center;justify-content:space-between;padding:14px max(18px,calc((100vw - 1290px)/2));border-bottom:1px solid #6d574a80;background:#18131b}
.brand {font-size:21px;letter-spacing:.08em}
nav {display:flex;gap:13px;align-items:center;font-size:.89em}
#audio-settings {position:relative;white-space:nowrap}
#audio-settings div {position:absolute;top:100%;right:0;display:grid;gap:5px;padding:7px;background:#18131b;border:1px solid #6d574a}
#gesture-toggle {white-space:nowrap}
#gesture-toggle kbd,#gesture-wheel kbd {font:600 .83em ui-monospace,monospace;color:#e7c692}
#gesture-toggle[aria-expanded="true"] {border-color:#d7b47e;background:#513330}
#gesture-wheel {
 position:fixed;z-index:4;top:calc(env(safe-area-inset-top,0px) + 55px);
 right:max(14px,env(safe-area-inset-right));width:205px;aspect-ratio:1;
 border:1px solid #a78056;border-radius:50%;
 background:radial-gradient(circle,#483036 0 14%,#c79f6b 14.5% 15%,#241a22 15.5% 65%,#37262b 66% 100%);
 box-shadow:0 12px 28px #0b080ccc,inset 0 0 0 5px #0f0c105c;
}
#gesture-wheel button {
 position:absolute;display:grid;place-items:center;gap:1px;min-width:62px;min-height:48px;padding:3px 7px;
 border:1px solid #795a46;border-radius:8px;background:#34262e;color:#f4ddbb;white-space:nowrap;touch-action:manipulation;
}
#gesture-wheel button:is(:hover,:focus-visible) {background:#563832;border-color:#dbb47c}
#gesture-wheel button:nth-child(1) {top:12px;left:50%;transform:translateX(-50%)}
#gesture-wheel button:nth-child(2) {right:10px;top:50%;transform:translateY(-50%)}
#gesture-wheel button:nth-child(3) {bottom:12px;left:50%;transform:translateX(-50%)}
#gesture-wheel button:nth-child(4) {left:10px;top:50%;transform:translateY(-50%)}
@media (any-pointer:coarse) {
 #gesture-toggle kbd {display:none}
 #gesture-wheel {width:min(205px,calc(100dvh - 68px - env(safe-area-inset-top,0px)))}
}
main {position:relative;width:100%;margin:auto}
.notice {position:fixed;right:3vw;bottom:22px;max-width:94vw;z-index:6;padding:8px 12px;color:#ffdbaf;border-left:3px solid #b58569;background:#412a30}
.surface {background:#211a23;border:1px solid #725b4e;border-radius:5px;padding:clamp(14px,2vw,24px);box-shadow:0 12px 32px #10081042}
.section-heading {display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:15px}
.section-heading p {color:#dbc09e;font-size:.92em}
.room-code {display:flex;align-items:center;gap:8px;font-size:.85em;font-variant-numeric:tabular-nums}
.room-code span {letter-spacing:.12em;font-family:ui-monospace,monospace}
.seats {display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:6px}
.seat {min-width:0;padding:8px;background:#2b222b;border:1px solid #604d4788;border-radius:4px}
.seat.active {border-color:#d3a76f;background:#3e2c32}
.seat.inactive {background:#211b25;color:#bca78d}
.seat strong {display:block;overflow-wrap:anywhere}
.seat small {display:block;font-size:.78em}
#tabletop {margin:0 0 8px;text-align:left}
.board-heading {display:flex;justify-content:center;gap:14px;flex-wrap:wrap;color:#f2dab7;font-variant-numeric:tabular-nums}
.cards {display:flex;justify-content:center;gap:5px;min-height:41px;margin:.4em 0}
.playing-card {display:inline-grid;place-items:center;width:35px;height:47px;font:bold 17px Georgia,serif;color:#25302c;background:#ede0c7;border:1px solid #a98d65;border-radius:4px}
.playing-card.red {color:#882538}
.seat-cards {display:flex;flex-wrap:wrap;gap:3px;margin-top:4px}
.seat-cards .playing-card {width:auto;height:24px;padding:0 5px;font-size:12px}
#private-zone {border-top:1px solid #b59a704b;margin:8px 12px 0;padding:6px 0 0}
.notes {font-size:.85em}
#decision {display:grid;gap:8px;margin-top:10px}
.action-row {display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.action-row input[type=number] {width:86px}
.leave {margin-left:auto}
.character-select .site-header {justify-content:flex-end;background:none;border:0}
.character-select .brand {display:none}
#gallery {position:fixed;inset:0;text-align:center;pointer-events:none}
#gallery header,#gallery footer {position:absolute;inset-inline:0}
#gallery header {top:6.5%}
#gallery header small {color:#dbac79;letter-spacing:.16em}
#gallery h1 {margin-top:.18em;font-size:clamp(28px,3.7vw,54px);letter-spacing:.15em;text-shadow:0 3px 18px #18131c}
#gallery footer {bottom:5%;pointer-events:none}
#gallery button {pointer-events:auto}
#characters {display:grid;grid-template-columns:repeat(3,var(--card-spacing, min(30vw,150px)));justify-content:center;justify-items:center;margin:0 0 10px}
#characters button {min-width:min(20vw,6em);padding-inline:.4em}
#gallery-status,#role-result {margin:.4em 0;color:#dfc4a6;font-size:.88em}
#match-screen {width:min(760px,calc(100% - 32px));margin:clamp(34px,10vh,115px) auto 40px}
.match-back,.create-link {background:transparent;color:#e4bb8d}
.match-tools {display:flex;justify-content:space-between;align-items:center;gap:8px}
#match-screen header {display:flex;align-items:center;gap:15px;margin:24px 0}
#picked-avatar {width:62px;aspect-ratio:1;object-fit:cover;border:1px solid #9e7556;border-radius:5px}
#picked-character {color:#dbb58c}
#match-title {line-height:1.22}
.match-options {display:grid;grid-template-columns:1fr 1fr;gap:12px}
.random-option,.join-option {padding:clamp(16px,3vw,32px);border:1px solid #725b4e;border-radius:5px;background:#211a23}
.random-option {display:grid;align-content:center;gap:9px;text-align:center}
#random-match {min-height:50px;font-size:1.1em}
#seating-form,#create-form {display:grid;gap:10px;align-items:start}
#seating-form label,#create-form label {display:grid;gap:4px}
#seating-form input[name=room] {text-transform:uppercase;letter-spacing:.09em;font-family:ui-monospace,monospace}
.create-link {margin-top:13px;padding:.25em 0;border-color:transparent;text-decoration:underline;text-underline-offset:4px;font-size:.86em}
.avatar-frame {display:grid;width:45px;aspect-ratio:1;padding:2px;border:1px solid #a7845e;border-radius:5px;overflow:hidden;background:#241a23}
.avatar-frame img {display:block;width:100%;height:100%;object-fit:cover;border-radius:2px}
.avatar-choices {display:flex;gap:7px;margin:0 0 12px}
.avatar-frame[aria-pressed=true] {outline:1px solid #e6bb7d;outline-offset:2px}
#auth form {margin:.65em 0}
#auth input {width:100%}
#switch-account {margin-top:12px}
.stats {display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
.stats>div {padding:7px 8px;background:#322630;border:1px solid #70594b7a;border-radius:4px;font-variant-numeric:tabular-nums}
.stats dt {font-size:.79em;color:#d5b997}
.stats dd {margin:0;font-size:1.17em}
.history,.key-section {border-top:1px solid #785f527d;padding-top:12px;margin-top:12px}
.history ul,.history ol {padding-left:1.4em;margin:.35em 0;font-size:.82em;max-height:180px;overflow:auto}
.graph-label {margin:.45em 0;font-size:.84em}
#graph {display:block;width:100%;height:auto;border:1px solid #715b4d;background:#1a151e;border-radius:3px}
.key-section p {font-size:.8em;color:#d3b798;margin:.4em 0}
#account-key {width:100%;margin-bottom:4px}
dialog {width:min(430px,calc(100% - 30px));border:1px solid #a48666;border-radius:5px;background:#281f2a;color:#f3e4ce;padding:20px}
dialog::backdrop {background:#100b15ba}
#fullscreen-help p,#fullscreen-help ul {margin:.65rem 0;color:#dcc3a6}
#fullscreen-help ul {padding-inline-start:1.35rem}
#fullscreen-help li+li {margin-top:.35rem}
#fullscreen-help form {justify-content:flex-end;margin-top:.85rem}
#save-account-key {width:min(470px,calc(100% - 28px))}
#save-account-key p {margin:.55rem 0 .85rem;color:#dcc3a6}
#save-account-key input,#account-key {width:100%;font-family:ui-monospace,monospace}
#save-account-key input {margin-top:.25rem}
#save-account-key form {justify-content:flex-end;margin-top:.8rem}
#sponsor-toggle {color:#f29b9e;font-size:1.05rem;line-height:1;min-width:2.25rem;min-height:2.25rem}
#sponsor-dialog p {margin:.55rem 0;color:#dcc3a6}
.sponsor-display {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(6px,2vw,16px);margin:.8rem 0}
.sponsor-display figure {margin:0;min-width:0;text-align:center;color:#ead2a4;font-size:.85em}
.sponsor-display img {display:block;width:min(220px,100%,48dvh);height:auto;aspect-ratio:1;margin:0 auto .45em}
#sponsor-code {image-rendering:pixelated;background:#fff}
#gold-mask-preview {background:radial-gradient(ellipse at 45% 40%,#605034,#211922 76%);border:1px solid #94764e}
#sponsor-dialog form {justify-content:flex-end;margin-top:.8rem}
#mask-wardrobe button[aria-pressed="true"] {border-color:#deb06c;color:#ffdc9d}
#save-key-status {color:#f0cb9a}
.key-section button {margin-top:.45rem}
#confirmation h2,#confirmation p {width:100%;margin-bottom:5px}
#confirmation form {justify-content:flex-end}
#create-form div {display:flex;justify-content:flex-end;gap:8px}
#room-create-error {color:#ffbcab}
@media(max-width:540px) {.match-options {grid-template-columns:1fr}.brand{font-size:17px}.leave{margin-left:0}}
@media(max-height:520px) and (min-aspect-ratio:1/1) {
 #gallery header {top:2%}#gallery h1 {font-size:24px}#gallery footer {bottom:1%}
}

#live-table {position:fixed;inset:0;width:100%;height:100%;touch-action:none}
.site-header {position:relative;z-index:3}
#veil {position:fixed;z-index:5}
#whisper-leave {margin-top:5px;font-size:.8em;background:#201720b8}
.live-table-view .site-header {
 z-index:3;
 background:linear-gradient(#18131be8,#18131b43);
 border:0;
}
.live-table-view main {width:100%;padding:0 3vw;pointer-events:none}
.live-table-view #room {padding:4px 0 0;background:none;border:0;box-shadow:none}
.live-table-view .section-heading {margin-bottom:5px}
.live-table-view .section-heading h1 {font-size:clamp(18px,2vw,25px)}
.live-table-view .room-code,.live-table-view .table-footer :is(button,input,select,textarea,summary,a,label) {pointer-events:auto}
.live-table-view .table-footer {pointer-events:none}
.live-table-view .seats {
 width:min(100%,1050px);
 grid-template-columns:repeat(auto-fit,minmax(95px,1fr));
 margin:auto;
}
.live-table-view .seat {padding:5px 7px;background:#1a141ed4;line-height:1.35}
.live-table-view .seat.active {background:#442f38eb}
.live-table-view .table-footer {
 position:fixed;
 inset:auto 0 0;
 padding:8px 3vw 13px;
 background:linear-gradient(transparent,#170f1bea 35%);
}
.live-table-view .table-footer:has(#tabletop[hidden]) {background:#170f1bc4}
.live-table-view #tabletop {display:flex;flex-wrap:wrap;align-items:center;gap:3px 11px;margin:0}
.live-table-view #tabletop .cards {min-height:0;margin:0}
.live-table-view .playing-card {width:auto;height:auto;min-width:18px;background:none;border:0;color:#f2dfc1}
.live-table-view .playing-card.red {color:#ff929d}
.live-table-view #private-zone {display:flex;align-items:center;gap:8px;border:0;margin:0;padding:0}
.live-table-view #decision {margin-top:4px}
.live-table-view #decision:empty {display:none}
.profile {
 position:fixed;z-index:4;top:58px;right:3vw;
 width:min(310px,94vw);max-height:calc(100dvh - 70px);overflow:auto;pointer-events:auto;
}
.live-table-view .notice {position:fixed;right:3vw;bottom:115px;z-index:6}
.scene-status {color:#ead0aa;text-shadow:0 2px 6px #140b14}
.seat-switch {display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:3px;font-size:.84em}
.seat-switch button {padding:.25em .5em}
@media(max-width:560px){
 .live-table-view .site-header {gap:4px;padding:5px 8px}
 .live-table-view nav {gap:4px;font-size:.74em}
 .live-table-view nav button {padding:.35em .42em}
 .live-table-view nav .avatar-frame {width:35px;padding:2px}
 .live-table-view .seats {grid-template-columns:repeat(3,minmax(0,1fr))}
 .live-table-view .table-footer {padding-inline:8px}
}


.table-controls {
  --wager-actions-width:min(65%,15rem);
  --wager-actions-columns:minmax(0,1.55fr) minmax(0,1fr);
  --wager-actions-gap:6px;
}
#wager-tray:not([hidden]) {pointer-events:auto;}
#chip-palette {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));}
#prepare-wager {
  display:grid;grid-template-columns:minmax(0,1fr) var(--wager-actions-width);
  align-items:center;gap:5px;margin:.35em 0;
}
#prepare-wager label {display:flex;justify-content:flex-end;align-items:center;gap:9px;white-space:nowrap;}
#prepare-wager input {min-width:0;width:6em;}
.table-controls .wager-actions,.live-table-view #decision .bet-actions {
  display:grid;grid-template-columns:var(--wager-actions-columns);gap:var(--wager-actions-gap);
}
#prepare-wager .raise-group {
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;
}
#prepare-wager .raise-group > button {padding-inline:4px;white-space:nowrap;}
#prepare-wager .raise-group > #fill-wager {font-size:.78em;padding-inline:5px;}
.live-table-view .table-controls #decision:has(.bet-actions) {
  display:grid;grid-template-columns:minmax(0,1fr);justify-items:end;
}
.live-table-view #decision .bet-actions {width:var(--wager-actions-width);}
.live-table-view #decision .bet-actions button {white-space:nowrap;}
#opponent-inspect {position:fixed;z-index:4;pointer-events:none;transform:translate(-50%,-50%);}
#inspect-trigger {pointer-events:auto;width:38px;height:38px;padding:0;border-radius:50%;}
#opponent-card {
  position:absolute;top:0;left:calc(100% + 8px);display:flex;gap:8px;
  width:max-content;padding:8px;background:#201a20;color:#f5dfb4;
}
#opponent-inspect.dock-left #opponent-card {left:auto;right:calc(100% + 8px);}
#opponent-card[hidden],#opponent-inspect[hidden] {display:none;}
#opponent-avatar img {display:block;width:32px;height:32px;object-fit:cover;}
#opponent-card :is(strong,small,span) {display:block;}
.reading-board :is(.seat-cards,#whisper-vision) {display:none;}

#tutorial-heading {
  position:fixed;z-index:8;top:max(9px,env(safe-area-inset-top));left:50%;
  transform:translateX(-50%);margin:0;white-space:nowrap;pointer-events:none;
  color:#f6e4c6;font:700 clamp(1.4rem,4vw,2.1rem)/1.15 var(--serif,serif);
  text-shadow:0 2px 5px #160e12,0 1px 16px #120a0e;
}
.tutorial-active #veil {
  box-sizing:border-box;
  padding-block-start:calc(max(9px,env(safe-area-inset-top)) + 2.5rem);
}
#tutorial-skip {
  position:fixed;z-index:9;
  top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));
  min-height:40px;
}
#tutorial-guide {
  position:fixed;z-index:8;
  left:max(14px,env(safe-area-inset-left));top:max(4.15rem,env(safe-area-inset-top));
  width:min(25rem,calc(100vw - 32px));box-sizing:border-box;padding:.7rem .95rem;
  background:#20171af0;color:#eed7b4;border:1px solid #9c8059;
  pointer-events:none;text-align:left;line-height:1.45;
}
#tutorial-guide p {margin:.25rem 0 0;}
#tutorial-guide button {pointer-events:auto;margin-top:.5rem;}
#tutorial-own-cards:not([hidden]) {display:flex;gap:8px;margin-top:.5rem;}
#tutorial-own-cards .readable-card {width:clamp(44px,12vh,76px);}
.tutorial-scene-focused #tutorial-guide {
  top:var(--scene-guide-top);left:var(--scene-guide-left);right:auto;bottom:auto;
  width:min(19rem,38vw);
}
.tutorial-scene-focused #tutorial-guide::after {
  content:"";position:absolute;
  border:8px solid transparent;
}
.tutorial-scene-focused #tutorial-guide:is([data-guide-side="right"],[data-guide-side="left"])::after {
  top:var(--scene-guide-arrow);transform:translateY(-50%);
}
.tutorial-scene-focused #tutorial-guide[data-guide-side="right"]::after {right:100%;border-right-color:#9c8059;}
.tutorial-scene-focused #tutorial-guide[data-guide-side="left"]::after {left:100%;border-left-color:#9c8059;}
.tutorial-scene-focused #tutorial-guide:is([data-guide-side="above"],[data-guide-side="below"])::after {
  left:var(--scene-guide-arrow);transform:translateX(-50%);
}
.tutorial-scene-focused #tutorial-guide[data-guide-side="above"]::after {top:100%;border-top-color:#9c8059;}
.tutorial-scene-focused #tutorial-guide[data-guide-side="below"]::after {bottom:100%;border-bottom-color:#9c8059;}
#tutorial-guide.tutorial-inline {
  position:relative;inset:auto;width:min(31rem,calc(100% - 1.5rem));margin:.45rem auto .8rem;
}
#tutorial-spotlight {
  position:fixed;inset:0;z-index:18;
  pointer-events:none;
  background:rgba(26,26,26,.36);
  backdrop-filter:grayscale(1) brightness(.56);
  clip-path:polygon(evenodd,0 0,100% 0,100% 100%,0 100%,0 0,
    var(--spot-left) var(--spot-top),var(--spot-left) var(--spot-bottom),
    var(--spot-right) var(--spot-bottom),var(--spot-right) var(--spot-top),
    var(--spot-left) var(--spot-top));
}
.tutorial-actions-focused :is(#tutorial-heading,#tutorial-skip) {z-index:19;}
.tutorial-actions-focused #tutorial-guide {
  z-index:20;top:auto;left:auto;right:var(--hint-right);bottom:var(--hint-bottom);
}
.tutorial-actions-focused #tutorial-guide::after {
  content:"";position:absolute;top:100%;
  right:clamp(1rem,var(--hint-arrow-right,2rem),calc(100% - 2rem));
  width:0;height:0;border:8px solid transparent;border-top-color:#9c8059;
}
@media (max-height:540px) {
  #tutorial-heading {font-size:1.4rem;}
  .tutorial-active #veil {padding-block-start:calc(max(9px,env(safe-area-inset-top)) + 1.6rem);}
  #tutorial-guide {top:max(2.9rem,env(safe-area-inset-top));width:min(20rem,40vw);font-size:.83rem;padding:.4rem .65rem;}
  #tutorial-skip {min-height:34px;padding:3px 8px;}
}
