/* Persistent game controls, readable calls and personal profile. */
.quick-play-card { margin: 12px 0; padding: 15px; border: 1px solid #b8cbb5; border-radius: 12px; background: #edf3e8; }
.online-modal { padding: 24px; max-height: calc(100dvh - 24px); scrollbar-width: none; }
.online-modal::-webkit-scrollbar { display: none; }
.online-modal > .modal-symbol, .online-modal > .section-label { display: none; }
.online-modal > h2 { margin: 0 28px 8px 0; font-size: 28px; line-height: 1.15; }
.online-modal > .online-description { font-size: 12px; line-height: 1.4; margin: 0 0 10px !important; }
.online-modal:has(#online-room-view:not([hidden])) > .online-description,
.online-modal:has(#online-room-view:not([hidden])) #back-to-online-lobby { display: none; }
.online-modal .room-code-row { padding: 8px 10px; margin-top: 8px; }
.online-modal .room-code-row strong { font-size: 18px; letter-spacing: 3px; margin-top: 2px; }
.online-modal .room-status { margin: 10px 0; font-size: 12px; line-height: 1.35; }
.online-modal .room-player { min-height: 34px; padding: 7px 8px; font-size: 12px; }
.online-modal .room-player strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-modal .room-seat { flex-shrink: 0; letter-spacing: 0; font-size: 9px; }
.online-modal .online-error:empty { display: none; }
.quick-play-card > div > strong { font: 600 21px 'Cormorant Garamond', serif; color: #244c3c; }
.quick-play-card .online-field { font-size: 12px; }
.quick-play-card p { font-size: 12px; line-height: 1.45; margin: 5px 0 10px; }
.quick-play-actions { display: flex; align-items: end; gap: 10px; }
.quick-play-actions .online-field { flex: 1; margin: 0; }
.quick-play-actions .quick-match-button { flex: 1.5; margin: 0; min-height: 42px; }
.quick-play-card .online-entry-fee-row { display: block; margin: 10px 0 0; color: #3e5846; }
.custom-room-options { margin: 10px 0; font-size: 12px; }
.custom-room-options > summary { cursor: pointer; padding: 6px 0; }
.custom-room-options .online-create-row { margin-top: 8px; }
.custom-room-options .online-create-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.room-ready-progress { font-size: 13px; font-weight: 600; text-align: center; color: #31573f; margin: 8px 0; }
.room-ready-button { width: 100%; min-height: 44px; }
.room-ready-button[aria-pressed="true"] { background: #e6eee0; color: #31573f; border: 1px solid #8ca684; }
.leave-waiting-button { display: block; width: 100%; margin-top: 8px; padding: 10px; border: 1px solid #d8cfba; border-radius: 8px; background: transparent; color: #645a46; cursor: pointer; }
.room-player.is-ready { background: #edf5e8; }
.room-player.is-ready .room-seat { color: #286143; font-weight: 700; }
@media (max-height: 450px) {
  .online-modal { padding: 12px 18px; }
  .online-modal > h2 { font-size: 20px; margin-bottom: 5px; }
  .online-modal .room-code-row { margin-top: 0; padding: 5px 8px; }
  .online-modal .room-code-row small { display: none; }
  .online-modal .room-status { margin: 5px 0; font-size: 11px; }
  .online-modal .room-player-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .online-modal .room-player { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; min-height: 34px; padding: 3px 5px; font-size: 11px; }
  .online-modal .room-dot { display: none; }
  .online-modal .room-seat { margin-left: 0; font-size: 8px; }
  #online-room-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 8px; }
  #online-room-view > * { grid-column: 1 / -1; }
  #online-room-view > #ready-room { grid-column: 1; }
  #online-room-view > #leave-waiting-room { grid-column: 2; margin-top: 0; }
  .online-modal .room-ready-progress { margin: 6px 0; font-size: 12px; }
  .online-modal .room-footnote { margin: 5px 0 0; font-size: 9px; }
  .quick-play-card { padding: 10px; margin: 6px 0; }
  .quick-play-card > div > strong { font-size: 18px; }
  .room-ready-button, .leave-waiting-button { min-height: 34px; padding: 7px; }
}
@media (max-width: 400px) {
  .online-modal { padding: 18px 14px; }
  .online-modal > h2 { font-size: 25px; }
  .quick-play-card { padding: 12px; }
  .quick-play-actions { gap: 6px; }
  .quick-play-actions .quick-match-button { font-size: 11px; padding: 8px; }
  .quick-play-actions .online-field { font-size: 11px; }
}
.topbar .table-music, .topbar .table-music-next { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.topbar .table-music-next { width: 28px; min-width: 28px; font-size: 13px; border-color: transparent; background: transparent; }
.topbar .table-music[aria-pressed="false"] { opacity: .55; }
.topbar .messenger-toggle { display: inline-flex; visibility: visible; }
.contract-summary { padding: 9px 12px; border: 1px solid #bba268; background: #fff7df; min-height: 64px; }
.contract-summary-player, .contract-summary-call { min-width: 0; }
.contract-summary-copy strong { font-size: 17px; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; }
.contract-summary-copy small { font-size: 11px; line-height: 1.3; }
.contract-summary-label { font-size: 10px; letter-spacing: .06em; color: #73591d; }
.called-card-marker { display: flex; width: 40px; height: 52px; flex: 0 0 40px; border: 1px solid #a89b7a; background: #fffefa; border-radius: 5px; }
.called-card-marker b { font-size: 15px; }
.called-card-marker > span { font-size: 25px; }
.action-dock[data-phase="call-king"] { padding: 10px; }
.action-dock[data-phase="call-king"] .call-actions:not([style*="none"]) { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.call-actions .call-action-intro { display: block; grid-column: 1 / -1; font-size: 12px; line-height: 1.4; }
.call-actions .call-button { min-height: 88px; height: auto; padding: 9px; gap: 9px; }
.call-actions .call-card-preview { display: block; flex: 0 0 42px; height: 64px; }
.call-actions .call-card-preview > .card { width: 42px; height: 64px; }
.call-actions .call-card-copy strong { font-size: 14px; }
.call-button-solo .call-card-copy strong::after { content: ' · solo'; font-size: 10px; color: #89621e; }
.call-actions .call-card-copy small { display: block; font-size: 10px; line-height: 1.35; }
.player-photo { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar, .account-avatar { overflow: hidden; flex-shrink: 0; }
.profile-photo-controls, #profile-photo-draft { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.profile-photo button, .profile-achievement button, .loyalty-achievement button { padding: 8px 10px; border: 1px solid #cfc6b0; border-radius: 8px; background: #fffdf7; color: #254c3e; cursor: pointer; font: inherit; }
#profile-photo-preview { border-radius: 50%; object-fit: cover; margin-top: 10px; }
#profile-photo-status { font-size: 12px; min-height: 1em; }
.topbar > .top-actions > #account-button { display: grid; place-items: center; flex: none; width: 36px; height: 36px; max-width: 36px; padding: 0; overflow: hidden; border-radius: 50%; background: #e8dfc8; color: #35543e; font: 700 11px 'DM Sans', sans-serif; }
.topbar > .top-actions > #account-button::before { content: none; }
.welcome-brand .profile-shortcut { flex: none; padding: 0; overflow: hidden; border: 1px solid #c9af75; border-radius: 50%; background: #e8dfc8; color: #35543e; font: 700 11px 'DM Sans', sans-serif; cursor: pointer; }
.welcome-brand .profile-shortcut:hover, .topbar #account-button:hover { border-color: #987944; box-shadow: 0 0 0 3px #d6bf8438; }
.welcome-brand .profile-shortcut:focus-visible, .topbar #account-button:focus-visible { outline: 2px solid #987944; outline-offset: 2px; }
#account-backdrop .account-user-card .account-avatar { display: grid; width: 52px; height: 52px; flex: 0 0 52px; overflow: hidden; font-size: 16px; }
.messenger-author-avatar, .chat-author-avatar, .league-player-avatar { display: inline-grid; place-items: center; flex: none; width: 25px; height: 25px; overflow: hidden; border-radius: 50%; background: #dce8d3; color: #35543e; font: 700 10px 'DM Sans', sans-serif; vertical-align: middle; }
.messenger-message header { align-items: center; }
.messenger-message header .messenger-author-avatar { margin-right: -3px; }
.chat-message .chat-author-avatar { float: left; margin: -3px 7px 2px 0; }
.chat-message > div { clear: both; }
.league-player-avatar { width: 26px; height: 26px; border: 1px solid #b7c9ad; }
.room-player-photo { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; overflow: hidden; border-radius: 50%; background: #dce8d3; color: #35543e; font: 700 9px 'DM Sans', sans-serif; }
@media (max-width: 520px) {
  .topbar > .top-actions > #account-button { width: 28px; height: 28px; max-width: 28px; font-size: 9px; }
  .league-player-avatar { width: 22px; height: 22px; }
}
@media (max-height: 450px) {
  .online-modal .room-player { display: flex; align-items: center; gap: 4px; }
  .online-modal .room-player-photo { width: 18px; height: 18px; font-size: 8px; }
  .online-modal .room-player .room-seat { min-width: 0; font-size: 8px; }
}
.profile-achievement > strong { display: block; color: #8a6728; font-size: 17px; }
.friends-manager { display: flex; flex-direction: column; width: min(680px, 100%); max-height: calc(100dvh - 28px); padding: 24px; }
.friends-manager > h2 { margin: 0 35px 6px 0; font-size: 27px; }
.friends-manager > p { font-size: 12px; line-height: 1.5; margin: 0 0 12px; }
#friends-manager-content { min-height: 0; overflow: auto; scrollbar-width: none; }
#friends-manager-content::-webkit-scrollbar { display: none; }
.friends-manager .friends-panel { display: block; }
.friends-manager .friend-list { max-height: none; }
.achievement-goal { background: #f5edd8; border-left: 3px solid #bb9348; border-radius: 8px; padding: 12px; margin: 12px 0; font-size: 12px; }
.achievement-goal p { line-height: 1.5; margin-bottom: 0; }
.loyalty-achievement { display: flex; flex-direction: column; gap: 7px; padding: 12px; }
.loyalty-achievement progress { width: 100%; height: 8px; accent-color: #32624c; }
.loyalty-achievement button { margin-top: auto; font-size: 11px; }
.loyalty-achievement button[aria-pressed="true"] { background: #254c3e; color: #fffdf5; }
.loyalty-achievement.is-unlocked { border-color: #b79b60; background: #fcf7e9; }
@media (max-width: 760px) {
  .topbar .brand { display: none; }
  .topbar .top-actions { width: 100%; justify-content: space-between; gap: 3px; }
  .topbar #rules-button { display: inline-flex; }
  .contract-summary { min-height: 66px; padding: 7px 8px; gap: 7px; }
  .contract-summary-copy strong { font-size: 14px; }
  .contract-summary-copy small { font-size: 10px; }
  .contract-summary-label { font-size: 9px; }
  .contract-summary-call { padding-left: 7px; }
  .called-card-marker { width: 34px; flex-basis: 34px; height: 48px; }
  .table-area:has(#action-dock[data-phase="call-king"]) .felt-table,
  .table-area:has(#action-dock[data-phase="call-king"]) .player-bar { display: none; }
  .action-dock[data-phase="call-king"] { padding: 8px; min-height: 0; flex: 1; align-items: center; }
  .action-dock[data-phase="call-king"] .call-actions:not([style*="none"]) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .call-actions .call-action-intro { font-size: 11px; }
  .call-actions .call-button { min-height: 68px; padding: 5px; gap: 6px; }
  .call-actions .call-card-preview { flex-basis: 34px; height: 52px; }
  .call-actions .call-card-preview > .card { width: 34px; height: 52px; }
  .call-actions .call-card-copy strong { font-size: 12px; }
  .call-actions .call-card-copy small { font-size: 9px; }
}
@media (max-width: 760px) and (max-height: 650px) {
  .action-dock[data-phase="call-king"] .call-actions { align-items: stretch; }
  .call-actions .call-button { min-height: 54px; padding: 4px; }
  .call-actions .call-card-copy small { display: none; }
  .call-actions .call-card-preview { flex-basis: 28px; height: 43px; }
  .call-actions .call-card-preview > .card { width: 28px; height: 43px; }
  .table-area:has(#action-dock[data-phase="call-king"]) .hand-hint { display: none; }
}
@media (max-height: 450px) and (min-width: 480px) {
  .contract-summary { min-height: 46px; padding: 4px 8px; }
  .contract-summary-copy strong { font-size: 13px; }
  .contract-summary-copy small { font-size: 9px; }
  .called-card-marker { height: 36px; width: 28px; flex-basis: 28px; }
  .called-card-marker > span { font-size: 20px; }
  .table-area:has(#action-dock[data-phase="call-king"]) { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .table-area:has(#action-dock[data-phase="call-king"]) .contract-summary,
  .table-area:has(#action-dock[data-phase="call-king"]) .table-topline { grid-column: 1 / -1; }
  .table-area:has(#action-dock[data-phase="call-king"]) .contract-summary { grid-row: 1; }
  .table-area:has(#action-dock[data-phase="call-king"]) .table-topline { grid-row: 2; }
  .table-area:has(#action-dock[data-phase="call-king"]) .hand-area { grid-column: 1; grid-row: 3; align-self: center; }
  .table-area:has(#action-dock[data-phase="call-king"]) .felt-table,
  .table-area:has(#action-dock[data-phase="call-king"]) .player-bar { display: none; }
  .action-dock[data-phase="call-king"] { grid-column: 2; grid-row: 3; min-height: 0; padding: 4px; }
  .call-actions .call-action-intro, .call-actions .call-card-copy small { display: none; }
  .action-dock[data-phase="call-king"] .call-actions:not([style*="none"]) { gap: 4px; }
  .call-actions .call-button { min-height: 38px; padding: 3px; }
  .call-actions .call-card-preview { height: 30px; flex-basis: 21px; }
  .call-actions .call-card-preview > .card { height: 30px; width: 21px; }
  .friends-manager { padding: 15px; }
  .friends-manager > p { display: none; }
}
