/* Original court portraits, with the rules and touch controls kept in the foreground. */
.court-portrait { display:block; width:100%; height:100%; object-fit:cover; object-position:center 32%; }
.playing-card.illustrated-card { padding:6px; min-height:252px; border-radius:12px; background:#f5e9d4; border:1px solid #c9aa73; color:#4c302e; gap:0; box-shadow:0 10px 24px #110b195c; }
.playing-card.illustrated-card::before { inset:3px; border:1px solid #9671458c; border-radius:9px; z-index:2; }
.card-picture { display:block; position:relative; width:100%; height:164px; overflow:hidden; border-radius:7px 7px 0 0; background:#3e2b29; }
.card-picture::after { content:""; position:absolute; inset:0; box-shadow:inset 0 0 20px #39271c30; pointer-events:none; }
.illustrated-card .card-rank { position:absolute; top:11px; left:11px; z-index:3; display:grid; place-items:center; width:30px; height:39px; border:1px solid #e0c286; border-radius:5px 5px 13px 13px; background:#412d2df2; color:#ffebbf; font-size:1.8rem; box-shadow:0 2px 8px #1a111754; }
.card-title { position:relative; display:flex; align-items:center; justify-content:space-between; padding:7px 9px 6px; gap:5px; background:linear-gradient(90deg,#ead6b0,#fff0d5,#ead6b0); border-top:1px solid #b39060; border-bottom:1px solid #cbb48f; }
.card-title .icon { width:15px; height:15px; color:#805445; }
.card-title .card-type { font-family:"Songti SC","SimSun",serif; font-weight:700; letter-spacing:.12em; font-size:1rem; }
.illustrated-card .card-bottom { display:block; padding:7px 9px 5px; border:0; flex:1; }
.illustrated-card .card-tag { display:block; color:#965344; font-size:.69rem; margin-bottom:3px; font-weight:700; letter-spacing:.1em; }
.illustrated-card .card-effect { display:block; font-size:.76rem; line-height:1.55; color:#55413b; }
.illustrated-card .card-action-tag { top:12px; right:11px; left:auto; z-index:4; padding:3px 7px; border-radius:4px; background:#812f47; color:#fff4d6; font-size:.7rem; }
.hand-cards .playing-card.illustrated-card { width:196px; min-height:284px; padding:6px; }
.hand-cards .illustrated-card .card-picture { height:177px; }
.hand-cards .illustrated-card .card-rank { font-size:1.8rem; }
.hand-cards .illustrated-card .card-type { font-size:1.06rem; }
.hand-cards .illustrated-card .card-effect { font-size:.83rem; }
.hand-cards .playing-card.playable { border:2px solid #edbc85; box-shadow:0 0 0 3px #dab37919,0 12px 22px #08051360; }
.hand-cards .playing-card.blocked { opacity:.62; filter:saturate(.5); }
.card-fan { height:292px; }
.card-fan .playing-card.illustrated-card { height:260px; min-height:260px; padding:6px; }
.card-fan .card-picture { height:160px; }
.create-table .card-fan { margin-top:10px; }
.chancellor-cards .playing-card.illustrated-card { width:100%; min-height:192px; padding:4px; }
.chancellor-cards .card-picture { height:126px; }
.chancellor-cards .card-title { padding:6px 4px; }
.chancellor-cards .illustrated-card .card-rank { width:25px; height:31px; top:8px; left:8px; font-size:1.4rem; }
.chancellor-cards .illustrated-card .card-bottom { padding:5px 4px; }
.chancellor-cards .illustrated-card .card-tag { font-size:.65rem; margin:0; }
.chancellor-cards .card-title .icon { display:none; }
.chancellor-cards .playing-card.selected { outline:2px solid #edbc85; outline-offset:2px; }
.reference-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.reference-card.illustrated-reference { display:grid; grid-template-columns:110px minmax(0,1fr); padding:0; overflow:hidden; border-color:#695349; background:#2b2230; gap:0; }
.reference-portrait { min-height:180px; position:relative; }
.reference-portrait::after { content:""; position:absolute; inset:0; box-shadow:inset -12px 0 22px #1c172521; }
.reference-copy { padding:20px; min-width:0; }
.illustrated-reference .reference-card-head { flex-wrap:wrap; gap:9px; }
.illustrated-reference .reference-card-head .rank-square { width:27px; height:35px; font-size:1.3rem; }
.illustrated-reference .badge { margin:0; padding:2px 6px; font-size:.7rem; }
.selected-card-summary { align-items:flex-start; gap:15px; }
.selected-card-summary .summary-portrait { width:80px; height:109px; border:1px solid #b98c61; border-radius:7px; flex-shrink:0; overflow:hidden; position:relative; }
.summary-portrait .summary-rank { position:absolute; left:5px; top:5px; background:#37272aed; color:#ffe8b5; border-radius:4px; padding:0 5px; font:1.25rem Georgia,serif; }
.selected-card-summary p { line-height:1.8; }
.config-role .role-thumb { width:34px; height:45px; border-radius:4px; border:1px solid #947349; flex-shrink:0; }

.game-page { max-width:900px; padding-top:18px; padding-bottom:30px; }
.game-toolbar { margin-bottom:8px; }
.game-status { gap:10px; font-size:.83rem; color:#cbb9b8; }
.practice-label { color:#d7b083; font-size:.72rem; }
.game-toolbar .btn { border:0; background:transparent; min-height:40px; padding:6px 10px; }
.game-table { background:#30252f; border:1px solid #73595666; border-radius:18px; min-height:0; padding:18px 20px 8px; }
.game-table::before { display:none; }
.opponents { gap:10px; }
.opponents.one-opponent { grid-template-columns:1fr; max-width:230px; margin:0 auto; }
.opponents.two-opponents { grid-template-columns:repeat(2,minmax(0,1fr)); max-width:490px; margin:0 auto; }
.opponent { background:transparent; border:1px solid transparent; border-radius:9px; padding:7px 9px; }
.opponent.active { background:#c9a4720b; border-color:#c1a06b80; }
.opponent.out { opacity:.64; }
.opponent.recent-actor { background:#d5b08412; }
.opponent.recent-target { border-color:#a18bbc80; }
.opponent.protected-seat { border-color:#72aa8b80; }
.opponent-main { gap:8px; }
.opponent-main > div { min-width:0; }
.opponent-name { max-width:100%; color:#e9d7cf; }
.opponent-score { font-size:.72rem; color:#c6a881; }
.opponent-score .icon { width:11px; height:11px; }
.opponent-state { min-height:0; margin:4px 0 0; font-size:.66rem; color:#d0b99b; }
.opponent.protected-seat .opponent-state { color:#abd4bb; }
.opponent.out .opponent-state { color:#ecafbb; }
.offline-dot { display:inline-block; width:5px; height:5px; margin-left:5px; border-radius:50%; background:#91888e; vertical-align:middle; }
.discard-row { min-height:0; margin-top:5px; gap:4px; }
.discard-token.named-discard { min-width:0; width:auto; height:auto; border-radius:3px; padding:2px 4px; font-size:.65rem; line-height:1.3; color:#d8c6bd; border:0; background:#d9b78c0c; }
.named-discard b { color:#e6bd7e; font-family:Georgia,serif; margin-right:3px; font-size:.77rem; }
.table-center { display:flex; flex-direction:column; min-height:0; padding:12px 0 4px; align-items:stretch; gap:8px; }
.table-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:.76rem; color:#b4a2a5; }
.table-center .turn-announcement { margin:0; font-size:inherit; color:#e1c392; }
.table-supply { font-size:inherit; white-space:nowrap; }
.latest-play { position:relative; width:100%; }
.no-play-yet { display:grid; place-items:center; min-height:130px; color:#a9989f; font-size:.82rem; }
.public-removed { margin:0; display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:5px; font-size:.65rem; color:#bca9a4; }
.public-removed .discard-token { margin:0; }
.hand-section { margin-top:16px; max-width:100%; }
.hand-head { margin:0 0 10px; line-height:1.4; }
.hand-head h3 { display:flex; align-items:center; gap:12px; font-size:.87rem; font-weight:400; color:#c9b6b7; }
.own-score { display:inline-flex; align-items:center; gap:4px; color:#d6b17c; font-size:.76rem; }
.own-score .icon { width:12px; height:12px; }
.hand-instruction { font-size:.74rem; }
.own-discards { margin:-3px 0 9px; }
.hand-cards { gap:16px; flex-wrap:wrap; padding:0; }
.hand-cards .playing-card.illustrated-card { min-height:260px; }
.table-tools { display:flex; align-items:center; justify-content:center; gap:18px; margin-top:14px; }
.table-tools .btn { min-height:44px; padding:7px 9px; border:0; background:transparent; color:#c6b3b9; font-size:.8rem; }
.table-tools .icon { width:15px; height:15px; }
.out-message { padding:20px; border:0; font-size:.83rem; }

.play-effect { display:grid; grid-template-columns:122px minmax(0,1fr); gap:24px; align-items:center; position:relative; padding:8px 0; max-width:600px; margin:0 auto; text-align:left; }
.playing-card.illustrated-card.played-card { width:122px; height:auto; min-height:198px; padding:4px; border-radius:9px; cursor:default; box-shadow:0 6px 16px #09061240; }
.played-card .card-picture { height:120px; flex-shrink:0; border-radius:5px 5px 0 0; }
.played-card .card-rank { width:22px; height:29px; top:8px; left:8px; font-size:1.35rem; border-radius:4px 4px 9px 9px; }
.played-card .card-title { padding:5px 6px 4px; line-height:1.3; }
.played-card .card-title .card-type { font-size:.78rem; letter-spacing:.1em; }
.played-card.illustrated-card .card-bottom { padding:5px 6px 4px; }
.played-card.illustrated-card .card-effect { font-size:.63rem; line-height:1.4; }
.effect-copy { min-width:0; display:flex; align-items:center; gap:8px; position:relative; }
.effect-caption { margin:0; color:#eddbbc; font-size:1rem; line-height:1.8; overflow-wrap:anywhere; flex:1; }
.effect-who { display:block; font-size:.82rem; color:#cbb7a8; }
.effect-summary { display:block; }
.effect-danger .effect-caption { color:#efbdc5; }
.effect-replay { flex-shrink:0; width:40px; height:44px; padding:0; border:0; background:transparent; color:#bfa17b; font:1.5rem Georgia,serif; cursor:pointer; }
.replay-hint { position:absolute; top:-20px; left:0; color:#b9a390; font-size:.65rem; }
.action-timeline { display:flex; flex-direction:column; gap:9px; }
.action-timeline .play-effect { width:100%; grid-template-columns:78px minmax(0,1fr); gap:15px; padding:6px 0 12px; border-bottom:1px solid #84646833; }
.action-timeline .playing-card.illustrated-card.played-card { width:78px; height:auto; min-height:142px; }
.action-timeline .played-card .card-picture { height:72px; }
.action-timeline .played-card .card-title { padding:4px; }
.action-timeline .played-card .card-title .card-type { font-size:.68rem; }
.action-timeline .played-card .card-rank { width:17px; height:23px; font-size:1rem; top:7px; left:7px; }
.action-timeline .played-card .card-bottom { padding:3px; }
.action-timeline .played-card .card-effect { font-size:.53rem; line-height:1.3; }
.action-timeline .effect-caption { font-size:.84rem; }
.round-divider { color:#bda9b6; text-align:center; font-size:.72rem; padding:6px; }
.text-log-details { margin-top:16px; padding-top:10px; }
.text-log-details summary { color:#c9b3c9; cursor:pointer; font-size:.8rem; padding:8px 0; }
.note-card.has-portrait { display:grid; grid-template-columns:60px minmax(0,1fr); gap:12px; }
.note-card .note-portrait { height:80px; border-radius:5px; border:1px solid #a28459; }

#play-feedback { position:fixed; inset:0; z-index:65; pointer-events:none; }
.feedback-caption { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.flying-card { position:absolute; transform-origin:center; }
.flying-card .playing-card.illustrated-card.played-card { width:100%; height:100%; min-height:0; }
.receiving-card { visibility:hidden; }

@media (max-width:760px) {
  .game-page { padding:12px 14px 24px; }
  .game-table { padding:10px 11px 6px; border-radius:14px; }
  .opponents { gap:5px; }
  .opponent { padding:5px 4px; }
  .opponent-main { gap:6px; }
  .opponent .avatar { width:27px; height:27px; border-radius:9px; font-size:.82rem; }
  .opponent-name { max-width:70px; font-size:.78rem; }
  .opponent-score { font-size:.64rem; }
  .opponent-state { font-size:.62rem; }
  .discard-token.named-discard { font-size:.59rem; padding:2px 3px; }
  .named-discard b { font-size:.69rem; }
  .table-center { padding:9px 0 3px; gap:5px; }
  .table-meta { font-size:.72rem; }
  .play-effect { grid-template-columns:110px minmax(0,1fr); gap:15px; padding:8px 0; }
  .playing-card.illustrated-card.played-card { width:110px; height:auto; min-height:190px; }
  .played-card .card-picture { height:112px; }
  .played-card .card-title .card-type { font-size:.75rem; }
  .effect-caption { font-size:.9rem; line-height:1.85; }
  .effect-copy { gap:2px; }
  .effect-replay { width:34px; }
  .hand-section { margin-top:12px; }
  .hand-head { margin-bottom:9px; }
  .hand-cards { gap:12px; }
  .hand-cards .playing-card.illustrated-card { width:min(184px,calc(50% - 6px)); min-height:218px; padding:5px; }
  .hand-cards .illustrated-card .card-picture { height:138px; }
  .hand-cards .illustrated-card .card-rank { font-size:1.65rem; top:10px; left:10px; }
  .hand-cards .illustrated-card .card-type { font-size:1rem; }
  .hand-cards .card-title { line-height:1.3; padding:6px 7px; }
  .hand-cards .illustrated-card .card-effect { font-size:.75rem; line-height:1.5; }
  .hand-cards .illustrated-card .card-bottom { padding:6px 6px 5px; }
  .table-tools { margin-top:9px; gap:20px; }
  .reference-grid { grid-template-columns:1fr; gap:14px; }
  .reference-card.illustrated-reference { grid-template-columns:104px minmax(0,1fr); }
  .reference-copy { padding:16px 14px; }
  .reference-portrait { min-height:168px; }
  .illustrated-reference .reference-card-head { gap:8px; margin-bottom:9px; }
  .illustrated-reference p { font-size:.8rem; line-height:1.75; }
  .selected-card-summary .summary-portrait { width:70px; height:100px; }
  .chancellor-cards { gap:8px; }
  .chancellor-cards .playing-card.illustrated-card { min-height:175px; padding:4px; }
  .chancellor-cards .card-picture { height:112px; }
  .chancellor-cards .card-title .card-type { font-size:.76rem; letter-spacing:.02em; }
}
@media (max-width:380px) {
  .opponents:not(.one-opponent):not(.two-opponents) .opponent-main { gap:4px; }
  .opponents:not(.one-opponent):not(.two-opponents) .avatar { width:23px; height:23px; font-size:.75rem; }
  .opponents:not(.one-opponent):not(.two-opponents) .opponent-name { max-width:46px; font-size:.72rem; }
  .hand-cards .illustrated-card .card-picture { height:130px; }
  .hand-cards .playing-card.illustrated-card { min-height:210px; }
  .chancellor-cards .card-picture { height:102px; }
  .chancellor-cards .playing-card.illustrated-card { min-height:164px; }
  .reference-card.illustrated-reference { grid-template-columns:96px minmax(0,1fr); }
}
@media (prefers-reduced-motion:reduce) {
  .playing-card { transition:none; }
  .hand-cards .playing-card.playable:hover { transform:none; }
}
