/* Customer revision 2026-09-15. Shared font files also ship in the native APK. */
.client-phone,.client-tv,.client-phone button,.client-phone input,.client-phone select,.client-tv button,.client-tv input,.client-tv select {font-family:"Score UI",sans-serif;font-weight:700}
.client-tv .tv-title {width:min(88%,1200px);max-width:1200px;min-height:64px;height:auto;margin:0 auto 4px;padding:10px 24px 6px;background:none;font-family:"Score UI",sans-serif;font-style:normal;font-weight:900;color:#eefaff;text-shadow:0 2px 3px #021023;font-size:clamp(22px,3.5vw,56px)}
.client-tv[data-screen=home] .tv-title {color:#fff0c3;text-shadow:0 2px 3px #210818}.client-tv[data-brightness=light] .tv-title {color:#182b42;text-shadow:none}
.client-tv .home-module,.client-tv .home-module:not(:disabled):hover,.client-tv .home-module:not(:disabled):active {background:transparent url('/assets/mahjong-tile-alpha.png') center/100% 100% no-repeat;border-radius:16%;height:44vh;width:auto;max-height:430px;aspect-ratio:803/1024}
.client-tv .home-module span {font-family:"Home Label",serif;font-weight:400}
.client-tv .home-module:focus-visible {outline:6px solid #fff9bd;outline-offset:8px;filter:brightness(1.12);box-shadow:0 0 0 12px #0b1730}
.client-tv button:focus-visible,.client-tv select:focus-visible {outline:4px solid #fff1a0;outline-offset:4px}
.client-tv #tvScoreView {position:relative}
.client-tv .score-footer {min-height:40px;padding:4px 6px}
.client-tv .dealer-notice {position:absolute;right:1%;top:56px;max-width:28%;background:transparent;padding:0 4px;gap:0;z-index:1}
.client-tv .dealer-notice span {font-size:clamp(18px,1.7vw,28px)}
.client-tv .dealer-notice strong {font-size:clamp(21px,2vw,34px)}
.client-tv #compassBoard .compass-player {width:calc(100% + clamp(40px,4.5vw,80px));padding:8px 16px}
.client-tv .compass-name {font-family:"Score UI",sans-serif;font-weight:900;font-style:italic;transform:skewX(-7deg);line-height:1.12}
.client-tv #compassBoard .equipment-wind {font-family:"Score UI",sans-serif;font-weight:900;font-size:clamp(20px,2vw,32px);line-height:1.1}
.client-tv .compass-score {font-family:"Score UI",sans-serif;font-weight:900;font-style:italic;font-synthesis:style;font-size:clamp(42px,10vh,128px)}
.client-tv .score-compact .compass-score {font-size:clamp(23px,5.7vh,72px)}
.client-tv .score-extra-compact .compass-score {font-size:clamp(12px,2.8vh,36px)}
.dealer-orbit {width:clamp(120px,22vh,240px);height:clamp(120px,22vh,240px)}
.dealer-fa {position:absolute;left:22%;top:22%;width:56%;height:56%;object-fit:contain}
.dealer-character {font-family:"Score UI",sans-serif;font-weight:900;left:84%;top:34%;font-size:clamp(25px,4.5vh,55px)}
.dealer-pointer {position:absolute;left:76%;top:46%;width:10%;height:10%;background:#ffe09a;clip-path:polygon(0 0,100% 50%,0 100%)}
[data-seat=N] .dealer-character {left:34%;top:-16%}[data-seat=N] .dealer-pointer {left:45%;top:13%;transform:rotate(-90deg)}
[data-seat=W] .dealer-character {left:-16%;top:34%}[data-seat=W] .dealer-pointer {left:13%;top:46%;transform:rotate(180deg)}
[data-seat=S] .dealer-character {left:34%;top:84%}[data-seat=S] .dealer-pointer {left:45%;top:77%;transform:rotate(90deg)}
.waiting-compass {position:relative}
.referee-qr {position:absolute;top:0;left:1%;width:clamp(80px,16vh,160px);display:flex;flex-direction:column;align-items:center;gap:3px;text-align:center}
.referee-qr a {display:block;width:100%;background:white;padding:4px;line-height:0}
.referee-qr img {width:100%;height:auto}.referee-qr small {font-size:12px}.referee-qr strong {font-size:clamp(14px,1.5vw,23px)}
.client-phone .join-fields {gap:8px}.client-phone .join-field input {min-width:0;width:100%}
.client-phone .round-heading h3 {color:#f1ac7a;font-weight:800}
.client-phone .result-person .positive {color:#ff8585}.client-phone .result-person .negative {color:#72dca3}.client-phone .result-person .zero {color:#fff}
.client-phone[data-brightness=light] .round-heading h3 {color:#965117}.client-phone[data-brightness=light] .result-person .positive {color:#b62935}.client-phone[data-brightness=light] .result-person .negative {color:#137144}.client-phone[data-brightness=light] .result-person .zero {color:#182b42}
.referee-recipients {padding:12px 0;border-top:1px solid var(--line)}.referee-recipients p {margin:0 0 8px}
.referee-recipient-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.referee-recipient {display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 4px;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:8px;overflow-wrap:anywhere}
.referee-recipient .avatar {width:42px;height:42px}#settleWinnerLabel {display:block;margin:12px 0}#settleWinner {width:100%;margin-top:8px;padding:12px}
@media(max-width:800px){
 .client-tv .tv-title {width:92%;min-height:56px;height:auto;font-size:clamp(20px,4vw,32px);padding:8px 16px 4px}
 .client-tv .dealer-notice {position:static;max-width:48%;margin-left:auto}.client-tv #compassBoard .compass-player {width:100%;padding:6px 4px}
 .client-tv #compassBoard .equipment-wind {font-size:16px}.client-tv .compass-score {font-size:clamp(20px,5vw,40px)}.client-tv .score-compact .compass-score {font-size:clamp(12px,2.8vw,23px)}.client-tv .score-extra-compact .compass-score {font-size:clamp(7px,1.4vw,12px)}
 .dealer-orbit {width:80px;height:80px}.dealer-character {font-size:24px}.referee-qr {width:76px}.referee-qr small {display:none}
 .client-tv .home-module {height:auto;width:30vw}
}

@font-face {font-family:"Home Label";src:url("/assets/fonts/home-label.woff") format("woff");font-weight:400;font-display:swap}

/* rc.5: restore an existing phone session without resetting the table. */
#resumeDialog {width:min(540px,92vw);max-height:92vh;padding:22px;overflow:auto}
#resumeDialog h2 {font-size:clamp(22px,3vh,30px);margin:0 0 8px}
#resumeDialog p,#resumeDialog label {font-size:16px;line-height:1.5}
#resumeDialog select {display:block;width:100%;padding:10px 12px;margin:8px 0 12px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:8px}
#resumeIdentity {display:block;text-align:center;font-size:22px;overflow-wrap:anywhere;margin-bottom:8px}
#resumeQrLink {display:block;width:clamp(160px,36vh,280px);max-width:100%;margin:0 auto;background:white;line-height:0}
#resumeQr {display:block;width:100%;height:auto}
#resumeDialog .resume-help,.phone-return-help {color:var(--muted);font-size:14px;line-height:1.6}
.phone-return-help {margin:24px 0 8px;padding-top:12px;border-top:1px solid var(--line)}
@media(max-width:800px){.score-tools {flex-wrap:wrap;gap:4px}#resumeDialog {padding:16px}}

/* rc.10: shared TV geometry, large fitted title and three full-height score rows. */
.client-tv .tv-title {width:96%;max-width:none;height:16vh;min-height:0;margin:0 auto;padding:2px 12px 4px;font-size:14vh;line-height:1.08;flex:0 0 16vh;white-space:nowrap}
.client-tv #tvTitleText {flex:none;display:block;max-width:none;white-space:nowrap}
.client-tv .tv-stage {width:96%;max-width:none}
.client-tv[data-screen=home] {height:100vh;display:flex;flex-direction:column;overflow:hidden}
.client-tv[data-screen=home] .tv-stage {flex:1;min-height:0;margin:0 auto;display:flex;flex-direction:column}
.client-tv[data-screen=home] .tv-home {flex:1;min-height:0;padding:0 0 2vh}
.client-tv[data-screen=score] .score-meta {min-height:38px;margin-bottom:2px;gap:10px}
.client-tv[data-screen=score] .score-tools {gap:6px}
.client-tv[data-screen=score] .score-tools .text-button {min-height:34px;padding:4px 9px;border:1px solid #8bb0a877;border-radius:5px;background:#123b3559;font-size:clamp(13px,1vw,18px);line-height:1.25}
.client-tv[data-screen=score] .score-tools .text-button:hover {background:#215049b0}
.client-tv[data-brightness=light] .score-tools .text-button {background:#edf2f5;color:#075776;border-color:#879fac}
.client-tv[data-brightness=light] .score-tools .text-button:hover {background:#dce8ef}
.client-tv[data-screen=score] {overflow:hidden;padding-bottom:8px}
.client-tv[data-screen=score] #tvScoreView {grid-template-rows:auto minmax(0,1fr)}
.client-tv[data-screen=score] #compassBoard {gap:clamp(5px,.7vh,10px);margin:0 auto}
.client-tv[data-screen=score] .score-footer {position:absolute;left:0;bottom:0;width:28%;max-width:28%;min-height:0;padding:4px;margin:0;pointer-events:none}
.client-tv[data-screen=score] .score-bottom {display:flex;flex-direction:column;align-items:flex-start;max-width:100%;gap:0;font-size:clamp(11px,1.15vw,20px);line-height:1.4}
.client-tv[data-screen=score] .dealer-notice {position:absolute;right:0;top:48px;max-width:28%;padding:0 4px;margin:0}
.client-tv[data-screen=score] #compassBoard .compass-player {width:calc(120% + clamp(5px,.7vh,10px)*.8);padding:clamp(6px,1.2vh,14px) 16px}
.client-tv[data-screen=score] .compass-person .avatar {width:clamp(36px,8.4vh,90px);height:clamp(36px,8.4vh,90px)}
.client-tv[data-screen=score] .compass-score {font-size:clamp(46px,12.6vh,152px)}
.client-tv[data-screen=score] .score-compact .compass-score {font-size:clamp(27px,7.8vh,94px)}
.client-tv[data-screen=score] .score-extra-compact .compass-score {font-size:clamp(14px,3.9vh,48px)}
.client-tv .dealer-center {transform:none}
.dealer-orbit {width:var(--dealer-size,80px);height:var(--dealer-size,80px);flex:none}
.dealer-fa {left:32%;top:32%;width:36%;height:36%}
.dealer-character {left:80%;top:40%;width:20%;height:20%;font-size:var(--dealer-font,14px);line-height:1}
.dealer-pointer {left:72%;top:47%;width:6%;height:6%}
[data-seat=N] .dealer-character {left:40%;top:0}[data-seat=N] .dealer-pointer {left:47%;top:24%}
[data-seat=W] .dealer-character {left:0;top:40%}[data-seat=W] .dealer-pointer {left:22%;top:47%}
[data-seat=S] .dealer-character {left:40%;top:80%}[data-seat=S] .dealer-pointer {left:47%;top:70%}
@media(max-width:800px){
 .client-tv[data-screen=score] .score-meta {min-height:34px}
 .client-tv[data-screen=score] .score-tools {gap:3px}
 .client-tv[data-screen=score] .score-tools .text-button {min-height:30px;padding:3px 5px;font-size:12px}
 .client-tv[data-screen=score] #compassBoard .compass-player {padding:4px}
 .client-tv[data-screen=score] .compass-score {font-size:12.6vh}
 .client-tv[data-screen=score] .score-compact .compass-score {font-size:7.8vh}
 .client-tv[data-screen=score] .score-extra-compact .compass-score {font-size:3.9vh}
 .client-tv[data-screen=score] .compass-name {font-size:clamp(16px,2.8vw,24px)}
 .client-tv[data-screen=score] .long-name .compass-name {font-size:clamp(12px,1.55vw,18px)}
 .client-tv[data-screen=score] .dealer-notice {top:40px}
 .client-tv[data-screen=score] .dealer-notice span {font-size:16px}
 .client-tv[data-screen=score] .dealer-notice strong {font-size:19px}
}

/* Waiting actions stay in the same top toolbar as the score screen. */
.client-tv[data-screen=waiting] {height:100vh;display:flex;flex-direction:column;overflow:hidden;padding-bottom:8px}
.client-tv[data-screen=waiting] .tv-stage {flex:1;min-height:0;margin:0 auto;display:flex;flex-direction:column}
.client-tv #tvWaiting:not([hidden]) {flex:1;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);position:relative}
.client-tv[data-screen=waiting] .screen-heading {min-height:38px;height:auto;margin:0 0 2px;padding:0 6px;gap:10px}
.client-tv[data-screen=waiting] .screen-heading .score-tools {gap:6px;flex:none;flex-wrap:nowrap}
.client-tv[data-screen=waiting] .screen-heading button {min-height:34px;padding:4px 9px;border:1px solid #8bb0a877;border-radius:5px;font-size:clamp(13px,1vw,18px);line-height:1.25}
.client-tv[data-brightness=light][data-screen=waiting] .screen-heading .text-button {border-color:#879fac}
.client-tv[data-screen=waiting] #waitingMode {margin:0;width:auto;min-width:0;order:initial;font-size:clamp(12px,1.2vw,20px);text-align:right}
.client-tv[data-screen=waiting] .screen-heading #directStart {margin-left:0}
.client-tv[data-screen=waiting] .waiting-compass {height:100%;min-height:0;max-height:none;gap:clamp(5px,.7vh,10px)}
.client-tv[data-screen=waiting] .waiting-seat {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:8px;gap:8px}
.client-tv[data-screen=waiting] .seat-qr-link {width:clamp(60px,18vh,150px);max-width:100%}
.client-tv[data-screen=waiting] .seat-qr {display:block;width:100%;height:auto}
.client-tv[data-screen=waiting] .equipment-statusbar {position:absolute;left:0;bottom:0;width:28%;min-height:0;margin:0;padding:4px;display:block;font-size:clamp(10px,1.1vw,18px);line-height:1.4}
.client-tv[data-screen=waiting] #networkNote {display:none}
.client-tv[data-screen=waiting] .direct-start-note {font-size:inherit}
@media(max-width:800px){
 .client-tv[data-screen=waiting] .screen-heading {flex-wrap:nowrap;min-height:34px;gap:4px}
 .client-tv[data-screen=waiting] .screen-heading .score-tools {gap:3px}
 .client-tv[data-screen=waiting] .screen-heading button {min-height:30px;padding:3px 5px;font-size:12px}
}
