/* Shared reading rhythm. Card artwork, poker-table seats and range matrices
   retain their own compact geometry. */
:root{--ui-leading:1.65;--ui-leading-title:1.4}

/* Calculator controls share one compact row at every screen width. */
body:not(.compact-tab)>.appbar{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:16px}
.appbar>.header-actions{grid-column:2;grid-row:1;justify-self:end;margin-left:0;max-width:100%;flex-wrap:wrap;justify-content:flex-end}
.appbar>#equity-capture{grid-column:1;grid-row:1;justify-self:start;display:grid;place-items:center;width:48px;height:48px;padding:10px;color:#f2d39c;border:1px solid #8b73504d;border-radius:10px;background:#302634}
#equity-capture[hidden]{display:none}
#equity-capture svg{width:26px;height:26px}
#equity-capture-status{position:fixed;z-index:50;left:50%;bottom:calc(var(--app-nav-space,80px) + 16px);transform:translateX(-50%);width:max-content;max-width:calc(100vw - 32px);margin:0;padding:12px 18px;border:1px solid #ad8c54;border-radius:10px;background:#251e2bf5;color:#ffe1a3;font-size:15px;line-height:1.5;box-shadow:0 6px 22px #0006;pointer-events:none}
#equity-capture-status:empty{display:none}
/* P1 always uses the Home profile; wrap the nickname inside its existing seat. */
#equity-screen #name-a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:100%;padding:7px 4px}
#equity-screen .equity-own-avatar{display:block;flex:none;width:40px;height:40px;max-width:100%;object-fit:cover;border:1px solid #b99a61;border-radius:50%;background:#17141e}
#equity-screen .equity-own-nickname{display:block;max-width:100%;overflow-wrap:anywhere;word-break:normal;line-height:1.35;color:#f2d39c}
@media(max-width:640px){
 body:not(.compact-tab)>.appbar{column-gap:8px}
}

/* Long Korean titles wrap at word boundaries; long names/URLs still fit. */
:is(.home-row-copy,.study-prompt,.study-hand-title,.study-option,.study-history-item,.rp-saved-summary,.rp-saved-note,.rp-public-memo,.rp-comment,.gallery-photo-info,.swap-link-copy,.swap-card,.entry) :is(h2,h3,p,strong,dd),
:is(#study-explanation,#study-takeaway,#rp-share-name,.rp-help,.icm-intro,.icm-explanation,.music-track){word-break:keep-all;overflow-wrap:anywhere}
:is(.home-heading,.study-header,.rp-heading,.gallery-heading) h1{line-height:var(--ui-leading-title);letter-spacing:-.025em}

/* Main navigation and ordinary controls share legible, even label spacing. */
body>.calculator-tabs :is(button,a){gap:4px;line-height:1.25;letter-spacing:0}
body>.calculator-tabs :is(button,a) span{line-height:1.25;white-space:normal}
:is(.tour-home-tabs,.study-modes,.rp-library-tabs,.swap-tabs) button{line-height:1.4;min-height:44px}
:is(.rp-saved-buttons,.rp-dialog-actions,.gallery-actions,.brand-actions,.heading-actions,.dialog-actions){gap:8px}
:is(.rp-saved-buttons,.rp-dialog-actions,.gallery-actions,.brand-actions,.heading-actions,.dialog-actions) button{line-height:1.4;white-space:normal;overflow-wrap:anywhere}

/* Home: keep dates together and give titles/venues a consistent rhythm. */
#home-catalog .tour-home-tabs{gap:6px}
#home-catalog .tour-home-tabs button{min-height:44px;padding:8px 6px;line-height:1.4}
.home-row-copy{gap:6px}
.home-row-copy>strong{line-height:1.45;letter-spacing:-.015em}
.home-row-copy>span{line-height:1.5}
.home-row-copy>small{line-height:1.45}
.home-row-date{gap:3px}
#home-catalog .home-profile #poker-quote{line-height:1.55;margin-top:4px}
.home-options-menu{padding:8px;min-width:170px}
.home-options-menu :is(button,a),#home-catalog #music-open{line-height:1.4;padding:10px 12px}
.study-header{flex-wrap:wrap}
.study-header .study-header-actions{display:flex;align-items:center;gap:8px;flex:none;flex-wrap:wrap}
.study-header .home-options{flex:none}
.study-header .home-options>summary{width:44px;height:44px;cursor:pointer}
#study-screen>.home-account-line{min-height:64px;margin:0;padding:0 0 10px;border-color:#cba76a2b}
#study-screen .home-profile{flex:1;min-width:0;gap:12px}
#study-screen .home-profile .mascot-frame{width:56px;height:64px;border-radius:12px;flex:none}
#study-screen .home-profile .brand-copy{min-width:0}
#study-screen .home-profile .brand-copy h2{margin:0;font-size:22px;font-weight:800;line-height:1.35;color:#ffe5ad}
#study-screen .home-profile #edit-brand{min-height:44px;max-width:100%}
#study-screen .home-profile #brand-name{overflow-wrap:anywhere;word-break:keep-all}
#study-screen .home-profile #poker-quote{margin:2px 0 0;min-height:0;font-size:15px;line-height:1.55;color:#e9c783}
#study-screen .rg-home-account{flex:none}
#study-screen .account-open{background:transparent;border-color:#76634766}
#study-screen .home-options-menu #music-open{width:100%;padding:10px 12px;justify-content:flex-start}
#study-screen .home-options-menu #music-open span{font-size:16px}
@media(max-width:600px){
 #study-screen .home-profile{gap:8px}
 #study-screen .home-profile .mascot-frame{width:48px;height:56px}
 #study-screen .home-profile .brand-copy h2{font-size:20px}
 #study-screen .home-profile #poker-quote{font-size:14px}
}
@media(orientation:landscape) and (max-height:550px){
 #study-screen>.home-account-line{min-height:44px;padding-bottom:6px}
 #study-screen .home-profile .mascot-frame{width:36px;height:42px}
 #study-screen .home-profile #poker-quote{display:none}
}
.home-list-tools,.tour-feed-tools{gap:12px}
:is(.home-detail-body,.tour-event-dialog) :is(p,li,dd){line-height:var(--ui-leading)}

/* Calculator: separate labels from the numeric result without resizing cards. */
#equity-screen .player-stats>div{gap:4px}
#equity-screen .player-stats span{line-height:1.35}
#equity-screen .player-stats strong{line-height:1.25;letter-spacing:0}
#equity-screen .status-strip:not(:has(#mode:empty)){padding-block:8px;line-height:1.5}
#equity-screen .result-note:empty,#equity-screen #error:empty{display:none}

/* A compact entry below the calculator opens a readable, independently scrolling guide. */
:is(#equity-theory-open,#equity-terms-open,#equity-history-open,#fold-equity-open){display:flex;align-items:center;gap:12px;width:100%;min-height:56px;margin:24px 0 4px;padding:14px 18px;border:1px solid #967a4f;border-radius:12px;background:linear-gradient(120deg,#35293e,#251f2a);color:#f5d493;font-size:18px;font-weight:750;text-align:left}
:is(#equity-theory-open,#equity-terms-open,#equity-history-open,#fold-equity-open) svg{flex:none;width:24px;height:24px}
:is(#equity-theory-open,#equity-terms-open,#equity-history-open,#fold-equity-open)>span:last-child{margin-left:auto;font-size:28px;line-height:1}
:is(#equity-theory-dialog,#equity-terms-dialog,#equity-history-dialog,#fold-equity-dialog){width:min(760px,calc(100vw - 24px));max-height:90dvh;padding:0;border:1px solid #a58b5e;border-radius:18px;background:#1e1926;color:#f5eee1;overflow:hidden}
:is(#equity-theory-dialog,#equity-terms-dialog,#equity-history-dialog,#fold-equity-dialog)[open]{display:flex;flex-direction:column}
:is(#equity-theory-dialog,#equity-terms-dialog,#equity-history-dialog,#fold-equity-dialog)::backdrop{background:#09070dcc}
body:has(:is(#equity-theory-dialog,#equity-terms-dialog,#equity-history-dialog,#fold-equity-dialog)[open]){overflow:hidden}
:is(#equity-theory-dialog,#equity-terms-dialog,#equity-history-dialog,#fold-equity-dialog) .equity-theory-header{display:flex;align-items:center;justify-content:space-between;flex:none;gap:12px;padding:18px 20px;border-bottom:1px solid #7b674047;background:#251e2e}
:is(#equity-theory-title,#equity-terms-title,#equity-history-title,#fold-equity-title){margin:0;color:#ffe1a3;font-size:22px;line-height:1.35;word-break:keep-all}
:is(#equity-theory-close,#equity-terms-close,#equity-history-close,#fold-equity-close){flex:none;min-width:56px;min-height:44px;padding:8px 12px;border:1px solid #87724e;background:transparent;color:#f5d493;border-radius:9px;font-size:16px}
:is(#equity-theory-dialog,#equity-terms-dialog,#equity-history-dialog,#fold-equity-dialog) .equity-theory-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:18px 20px 24px;scrollbar-gutter:stable}
:is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-topic{margin-bottom:12px;border:1px solid #71604480;border-radius:12px;background:#241e2d;overflow:hidden}
:is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-topic>summary{display:flex;align-items:center;gap:12px;list-style:none;min-height:76px;padding:14px;color:#f5e3bf;font-size:18px;font-weight:750;line-height:1.4;cursor:pointer}
:is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-topic>summary::-webkit-details-marker{display:none}
:is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-topic>summary::after{content:'+';margin-left:auto;flex:none;color:#d7b579;font-size:25px;font-weight:400}
:is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-topic[open]>summary::after{content:'−'}
:is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-topic[open]>summary{background:#3d2f234d;border-bottom:1px solid #71604480}
:is(#equity-theory-dialog,#equity-terms-dialog) .theory-number{display:grid;place-items:center;flex:none;width:34px;height:34px;border:1px solid #937744;border-radius:10px;background:#493621;color:#ffdfa0;font-size:15px;font-variant-numeric:tabular-nums}
:is(#equity-theory-dialog,#equity-terms-dialog) summary small{display:block;margin-top:4px;color:#bcb1c7;font-size:14px;font-weight:400}
:is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-copy{padding:16px 18px;font-size:17px;line-height:1.8;word-break:keep-all;overflow-wrap:anywhere}
:is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-copy p{margin:0 0 16px}
:is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-copy strong{color:#ffe0a2;font-weight:750}
:is(#equity-theory-dialog,#equity-terms-dialog) .theory-key{padding-left:12px;border-left:3px solid #d1a960;color:#ffe7ba;font-weight:650}
:is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-copy dl{margin:0 0 18px}
:is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-copy dt{margin:16px 0 4px;color:#e9c88e;font-weight:750}
:is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-copy dd{margin:0;color:#e7deec}
:is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-copy h3{margin:24px 0 8px;font-size:18px;line-height:1.5;color:#f5d493}
:is(#equity-theory-dialog,#equity-terms-dialog) .theory-example,:is(#equity-theory-dialog,#equity-terms-dialog) .theory-board-example{padding:12px 14px;border:1px solid #5f695457;border-radius:10px;background:#172c28;color:#e3eee7}
:is(#equity-theory-dialog,#equity-terms-dialog) .theory-note{color:#bfb4cc;font-size:15px;line-height:1.7}
:is(#equity-theory-dialog,#equity-terms-dialog) .theory-board-example{margin:0 0 12px}
:is(#equity-theory-dialog,#equity-terms-dialog) .theory-board-example>strong{display:block;font-size:23px;letter-spacing:.05em;margin-bottom:8px;color:#f8f3e6}
:is(#equity-theory-dialog,#equity-terms-dialog) .theory-board-example p{margin:0}
:is(#equity-theory-dialog,#equity-terms-dialog) .theory-odds{width:100%;border-collapse:collapse;margin:18px 0 12px;table-layout:fixed;font-size:16px}
:is(#equity-theory-dialog,#equity-terms-dialog) .theory-odds caption{text-align:left;margin-bottom:10px;font-size:15px;color:#d5c6ad}
:is(#equity-theory-dialog,#equity-terms-dialog) .theory-odds :is(th,td){padding:10px 8px;border-bottom:1px solid #67523f;text-align:left;vertical-align:middle}
:is(#equity-theory-dialog,#equity-terms-dialog) .theory-odds th{background:#392d23;color:#f1d8ab;font-size:14px;font-weight:650}
:is(#equity-theory-dialog,#equity-terms-dialog) .theory-odds td:last-child{font-weight:750;color:#ffe0a2;text-align:right;font-variant-numeric:tabular-nums}
:is(#equity-theory-dialog,#equity-terms-dialog) .theory-odds th:last-child{text-align:right}
:is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-sources{padding:8px 2px 0;color:#aaa0b7;font-size:14px}
:is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-sources a{display:block;padding:8px 0;color:#d5bf95;text-underline-offset:3px}
@media(max-width:480px){
 :is(#equity-theory-dialog,#equity-terms-dialog,#equity-history-dialog,#fold-equity-dialog) .equity-theory-header{padding:14px}
 :is(#equity-theory-title,#equity-terms-title,#equity-history-title,#fold-equity-title){font-size:20px}
 :is(#equity-theory-dialog,#equity-terms-dialog,#equity-history-dialog,#fold-equity-dialog) .equity-theory-body{padding:12px 12px 20px;scrollbar-gutter:auto}
 :is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-topic>summary{gap:9px;padding:12px;font-size:17px}
 :is(#equity-theory-dialog,#equity-terms-dialog) .equity-theory-copy{padding:14px;font-size:17px}
 :is(#equity-theory-dialog,#equity-terms-dialog) .theory-number{width:30px;height:32px}
 :is(#equity-theory-dialog,#equity-terms-dialog) .theory-odds{font-size:15px}
}
.icm-settings label{gap:8px;line-height:1.45}
.icm-panel h2{line-height:1.4;margin-bottom:12px}
.icm-explanation p{margin:10px 0;line-height:var(--ui-leading)}

/* Study: wider middle tab, comfortable answer text and a clear explanation gap. */
.study-modes{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr);gap:6px}
.study-modes button{padding:8px 6px;line-height:1.4;word-break:keep-all}
.study-prompt{gap:10px;padding:12px 14px}
.study-prompt h2{line-height:1.55}
.study-hand-title{gap:6px 10px;margin-bottom:12px}
.study-hand-title h2{line-height:1.5}
.study-facts{gap:8px;margin-block:12px}
.study-facts div{padding:8px 10px}
.study-facts dt{line-height:1.45;font-size:13px}
.study-facts dd{margin-top:4px;line-height:1.5}
.study-actions{line-height:var(--ui-leading)}
.study-actions li+li{margin-top:6px}
.study-assumptions{font-size:13px;line-height:1.6;margin-top:12px}
#study-options{gap:10px;margin-bottom:12px}
.study-option{align-items:flex-start;gap:10px;padding:12px;line-height:1.55;font-size:16px}
.study-option-letter{margin-top:1px}
.study-option>span:last-child{min-width:0;word-break:keep-all;overflow-wrap:anywhere}
#study-answer{margin-top:16px;padding-top:16px}
#study-correct{line-height:1.5;margin:10px 0}
#study-explanation{font-size:17px;line-height:1.75;margin:12px 0}
#study-takeaway{font-size:15px;line-height:1.7;padding:12px;margin:12px 0 16px}
.study-history-item{padding:14px 12px;gap:12px;line-height:1.5}
.study-history-item>span:first-child{min-width:0}
.study-history-item small{margin-bottom:6px;line-height:1.4}
.study-history-item strong{font-size:16px;line-height:1.5}
.pf-context{gap:12px;align-items:flex-start}
.pf-context>div{min-width:0}
.pf-context p{line-height:1.55}

/* Hand history: distinguish titles, metadata and notes. */
.rp-saved-item{padding:16px}
.rp-saved-item h3{line-height:1.45;margin:0 0 6px}
.rp-saved-summary p{line-height:1.6;margin-top:0}
.rp-saved-content{margin-bottom:16px}
.rp-saved-note>p{line-height:1.7;margin-top:8px}
.rp-saved-buttons{gap:8px}
.rp-saved-buttons button{padding:9px 12px;min-height:44px}
#rp-public-list .rp-public-memo p,.rp-comment>p,.rp-note-text{line-height:1.7}
.rp-public-memo{padding:14px 0;margin-bottom:12px}
.rp-public-cardsets{gap:16px 24px}
.rp-comment-top{gap:6px 10px;line-height:1.5}
.rp-comment>p{margin-top:10px}
.rp-help{line-height:var(--ui-leading)}

/* Captions and standard dialogs have a consistent label-to-control gap. */
.gallery-photo-info{padding:12px 14px 14px}
.gallery-photo strong{line-height:1.55;margin-bottom:6px}
#gallery-view-caption{line-height:1.65}
:is(#account-dialog,#music-dialog,#brand-dialog,#rp-share-dialog,.gallery-dialog,.tour-event-dialog){padding:20px}
:is(#account-dialog,#music-dialog,#brand-dialog,#rp-share-dialog,#rp-social-dialog,.gallery-dialog,.tour-event-dialog) :is(h2,h3){line-height:1.4;word-break:keep-all;overflow-wrap:anywhere}
:is(#account-dialog,#rp-share-dialog,#rp-social-dialog,.gallery-dialog) :is(p,label){line-height:var(--ui-leading)}
#account-dialog label{margin:16px 0 8px}
#brand-form>label{margin:16px 0 8px;line-height:1.5}
:is(#rp-save-dialog,#rp-social-dialog) .rp-field{gap:8px;line-height:1.5}
#rp-share-dialog .rp-section-top{align-items:flex-start;gap:12px}
#rp-share-close{flex:none}
#rp-share-name{line-height:1.5;margin-bottom:10px}
#rp-share-status{margin:12px 0;line-height:1.65}
.music-heading{margin-bottom:20px}
.music-meta{margin:8px 0 20px;line-height:1.5}
.member-availability strong,.member-free strong{margin-bottom:4px}

/* Tournament editing uses the same form and explanatory-copy rhythm. */
.tour-editor label{margin-bottom:16px;line-height:1.5}
.tour-editor label>input,.tour-editor label>select,.tour-editor label>textarea{margin-top:8px}
.tour-editor :is(.tour-muted,.tour-check,pre){line-height:1.65;overflow-wrap:anywhere}
.tour-editor :is(.tour-toolbar,.tour-managed-row){gap:12px}

/* Bankroll and action swap use the same rhythm in their standalone pages. */
:is(.bankroll-page,.swap-page) :is(h1,h2,h3){line-height:1.4;word-break:keep-all;overflow-wrap:anywhere}
:is(.bankroll-page,.swap-page) :is(.heading,.list-heading,.chart-heading){flex-wrap:wrap;row-gap:12px}
:is(.bankroll-page,.swap-page) .heading-actions{flex-wrap:wrap;min-width:0}
:is(.bankroll-page,.swap-page) .heading-actions button{font-size:15px}
:is(.bankroll-page,.swap-page) :is(.muted,.privacy,.intro,.terms,.detail-meta){line-height:1.7;word-break:keep-all;overflow-wrap:anywhere}
:is(.bankroll-page,.swap-page) :is(.muted,.privacy,.entry .meta){font-size:14px}
:is(.bankroll-page,.swap-page) label{gap:8px;margin:16px 0;font-size:15px;line-height:1.45}
:is(.bankroll-page,.swap-page) .dialog-heading{align-items:flex-start;gap:12px}
:is(.bankroll-page,.swap-page) .dialog-heading button{flex:none}
:is(.bankroll-page,.swap-page) .top{height:auto;min-height:76px;padding-block:12px}
:is(.bankroll-page,.swap-page) .top>a{line-height:1.4;white-space:nowrap;min-height:44px;display:flex;align-items:center}
:is(.bankroll-page,.swap-page) .top>span{line-height:1.4;word-break:keep-all}
.bankroll-page .totals{gap:12px}
.bankroll-page .totals strong{margin-top:8px;line-height:1.3}
.bankroll-page .entry{grid-template-columns:minmax(0,1fr) auto;gap:10px 16px;padding-block:16px}
.bankroll-page .entry h3{margin:6px 0;line-height:1.5}
.bankroll-page .entry .note{margin-top:4px;line-height:1.7;font-size:15px}
.bankroll-page .entry-right .result{margin-bottom:8px}
.swap-link-title{gap:8px;line-height:1.45}
.swap-link-description{line-height:1.6;margin-top:6px}
.swap-page .swap-tabs{gap:6px}
.swap-page .swap-card h3{line-height:1.5;margin:12px 0 6px}
.swap-page .swap-card .card-footer{gap:12px;flex-wrap:wrap}
.swap-page .member-card{gap:16px}
.swap-page .member-card strong{line-height:1.5;overflow-wrap:anywhere}
.swap-page .member-card p{margin-top:6px;line-height:1.6}

@media(max-width:760px){
 .study-content{gap:12px}.study-hand,.study-question{padding:12px}
 .study-prompt h2{font-size:18px}
 .study-facts dd{font-size:15px}
 .study-header{gap:10px;flex-wrap:wrap;row-gap:8px}
 .study-header .study-header-actions{margin-left:auto}
}
@media(max-width:600px){
 #home-catalog .home-row-copy{gap:6px}
 .home-event-row{padding:14px 12px}
 .home-row-copy>strong{line-height:1.45}
 .rp-saved-content.has-note{gap:14px}
 .rp-saved-item{padding:14px}
 .rp-saved-note{padding-top:14px}
 .gallery-photo-info{padding:12px}
 :is(.bankroll-page,.swap-page) .top{gap:8px}
 :is(.bankroll-page,.swap-page) .top img{width:clamp(104px,34vw,150px);max-width:40%;height:auto;max-height:45px}
 :is(.bankroll-page,.swap-page) .fields{gap:10px}
 .swap-page .member-card{flex-wrap:wrap;gap:12px}
 .swap-page .member-card>div{min-width:0;flex:1 1 160px}
}
@media(max-width:420px){
 body>.calculator-tabs :is(button,a){font-size:12px;gap:4px;letter-spacing:-.01em}
 body>.calculator-tabs :is(button,a) span{white-space:normal;line-height:1.25}
 .study-modes button{font-size:14px;padding:8px 4px}
 .study-history-dialog header{gap:10px}
 .study-history-dialog header>div{min-width:0}
 .study-history-dialog header button{flex:none}
 :is(.bankroll-page,.swap-page) .heading-actions{gap:8px}
 .bankroll-page .entry{grid-template-columns:minmax(0,1fr)}
 .bankroll-page .entry-right{display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left}
 .bankroll-page .entry-right .result{white-space:normal;overflow-wrap:anywhere;margin:0}
 :is(.bankroll-page,.swap-page) .fields{grid-template-columns:minmax(0,1fr);gap:0}
 :is(.bankroll-page,.swap-page) .dialog-actions{flex-wrap:wrap}
}
/* Short screens scroll the learning content instead of compressing the copy. */
@media(max-height:650px){
 body.study-active{overflow:auto}
 #study-screen:not(.quotes-active){height:auto;min-height:calc(100dvh - var(--app-nav-space));padding-bottom:16px}
 #study-screen:not(.quotes-active) .study-content{flex:none;overflow:visible}
}

/* The rank stays directly below the nickname. */
#study-screen .home-profile .brand-copy{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
#study-screen .home-profile .brand-copy h2{min-width:0;max-width:100%}
#study-screen .home-profile .home-reward-link{margin-top:0;max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere}
@media(max-width:520px){#study-screen .home-profile{flex-basis:100%}}

#equity-terms-open{margin-top:10px}
#equity-terms-dialog [hidden]{display:none!important}
.equity-terms-search{display:grid;gap:8px;font-size:15px;color:#d9c9ac}.equity-terms-search input{box-sizing:border-box;width:100%;min-height:48px;padding:10px 14px;border:1px solid #806a49;border-radius:10px;background:#17131e;color:#f5eee1;font:inherit;font-size:17px}
.equity-terms-group h3{font-size:16px;color:#d9bc7e;margin:24px 0 12px}.equity-terms-group dl{margin:0}.equity-terms-entry{padding:15px 0;border-bottom:1px solid #71604455}.equity-terms-entry dt{font-size:18px;font-weight:750;color:#ffe1a2}.equity-terms-entry dd{margin:6px 0 0;font-size:16px;line-height:1.75;color:#dbd1e2;word-break:keep-all;overflow-wrap:anywhere}

/* Local equity history uses the same accessible sheet as the learning guides. */
#equity-history-open{margin-bottom:0}
#equity-history-dialog .equity-history-note{margin:0 0 16px;color:#c2b7cd;font-size:14px;line-height:1.6}
.equity-history-toolbar,.equity-history-item-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.equity-history-toolbar{margin-bottom:16px;color:#e9c88e}
#equity-history-dialog button.outline{min-height:44px;padding:9px 14px;font-size:15px}
#equity-history-status{color:#e9c88e;font-size:15px;line-height:1.6}
#equity-history-status:empty{display:none}
.equity-history-empty{padding:38px 8px;text-align:center;color:#c2b7cd;font-size:16px;line-height:1.8}
.equity-history-item{padding:16px;margin-bottom:16px;border:1px solid #71604480;border-radius:14px;background:#241e2d;min-width:0}
.equity-history-item-head{margin-bottom:14px;color:#bfb4cc;font-size:13px}
.equity-history-board{display:flex;align-items:center;gap:12px;padding-bottom:12px;color:#e9c88e;font-size:14px}
.equity-history-cards{display:flex;flex-wrap:wrap;gap:4px;align-items:center;min-width:0;max-height:100px;overflow-y:auto;overflow-wrap:anywhere;white-space:normal;font-size:14px;line-height:1.6}
.equity-history-card{position:relative;display:block;flex:none;width:32px;height:43px;overflow:hidden;border-radius:3px}
.equity-history-player{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;border-top:1px solid #71604440;padding:12px 0}
.equity-history-player-info{min-width:0}
.equity-history-player-info>strong{display:block;margin:0 0 6px;font-size:15px;overflow-wrap:anywhere}
.equity-history-stats{text-align:right;font-variant-numeric:tabular-nums}
.equity-history-stats>strong{display:block;color:#ffe1a3;font-size:24px}
.equity-history-stats>span{display:block;color:#bfb4cc;font-size:12px;margin-top:5px}
.equity-history-actions{display:flex;gap:10px;margin-top:6px}
.equity-history-actions>button{flex:1;min-width:0}
#equity-history-dialog .equity-history-actions>button{padding:9px 8px;font-size:14px}
.equity-history-actions>button:first-child{color:#ffe1a3;background:#493621}
.equity-history-capture-status{margin:12px 0 0;color:#e9c88e;font-size:13px;line-height:1.6}
.equity-history-capture-status:empty{display:none}
@media(max-width:390px){.equity-history-item{padding:12px}.equity-history-player{gap:8px}.equity-history-stats>span{max-width:98px;line-height:1.6}.equity-history-stats>strong{font-size:22px}}

/* Keep the prepared dashboard in place across main-tab changes. */
body.bankroll-active{overflow:hidden}
#bankroll-screen{position:fixed;inset:0 0 var(--app-nav-space,80px);margin:0;padding:0;max-width:none;background:#17141e;overflow:hidden}
#bankroll-panel-frame{width:100%;height:100%;border:0;display:block;background:#17141e}
.bankroll-panel-status{margin:28px 20px;color:#e9c88e;font-size:16px}
.bankroll-panel-fallback{display:inline-flex;margin:0 20px;padding:12px 16px;border:1px solid #967a4f;border-radius:10px;color:#f5d493}
body>.calculator-tabs #bankroll-tab[aria-current=page]{background:transparent;color:#ffe1a3}
html body.bankroll-embedded{padding-bottom:0!important;min-height:100dvh}
body.bankroll-embedded>.bankroll-nav{display:none!important}

/* Fold-equity inputs and results stay independent of the hand calculator. */
#fold-equity-dialog{width:min(680px,calc(100vw - 24px))}
#fold-equity-dialog [hidden]{display:none!important}
.fold-equity-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:13px;color:#d4bd93}
.fold-equity-toolbar>div{display:flex;gap:8px}
.fold-equity-toolbar button{min-height:44px;padding:8px 12px;font-size:14px;border:1px solid #806a49;border-radius:9px;background:#2a2332;color:#ffe1a3}
#fold-equity-dialog .fold-equity-intro{font-size:14px;color:#c5bacd;margin:10px 0 18px}
.fold-equity-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 16px}
#fold-equity-dialog label{display:flex;flex-direction:column;gap:7px;min-width:0;margin:0;color:#f4e5c8;font-size:16px;font-weight:650;line-height:1.5;word-break:keep-all}
#fold-equity-dialog input{box-sizing:border-box;width:100%;min-width:0;min-height:52px;padding:10px 13px;border:1px solid #806a49;border-radius:10px;background:#141019;color:#fff3db;font:inherit;font-size:21px;font-variant-numeric:tabular-nums}
#fold-equity-dialog input:focus{outline:2px solid #eac57f;outline-offset:2px}
#fold-equity-dialog input[aria-invalid=true]{border-color:#f0a7ae}
#fold-equity-dialog small{color:#bfb4ca;font-size:12px;font-weight:400;line-height:1.5;min-height:36px}
#fold-equity-dialog .fold-equity-error{color:#ffb5ba;font-size:14px;line-height:1.6;margin:12px 0}
#fold-equity-dialog .fold-equity-error:empty{display:none}
.fold-equity-answer{padding:22px 18px;margin:20px 0;border:1px solid #ad8c54;border-radius:14px;background:linear-gradient(130deg,#443222,#28212f);text-align:center}
.fold-equity-answer>span{font-size:16px;color:#e8c98e}
#fold-equity-required{display:block;margin:5px 0;color:#ffe1a3;font-size:42px;font-weight:800;line-height:1.3;font-variant-numeric:tabular-nums}
#fold-equity-message{margin:10px 0 0;color:#e7d9bd;font-size:14px;line-height:1.6}
.fold-equity-meter{height:7px;margin-top:18px;background:#17121c;border-radius:20px;overflow:hidden}
#fold-equity-meter-fill{display:block;width:0;height:100%;background:linear-gradient(90deg,#bc9149,#ffe1a3);border-radius:inherit}
.fold-equity-details{border-top:1px solid #806a494d;padding:14px 0;color:#d6cadf;font-size:14px;line-height:1.7}
.fold-equity-details>summary{cursor:pointer;font-size:16px;color:#f5d493;min-height:44px;display:flex;align-items:center;gap:10px;list-style:none}
.fold-equity-details>summary::-webkit-details-marker{display:none}
.fold-equity-details>summary::after{content:'+';margin-left:auto;font-size:24px}
.fold-equity-details[open]>summary::after{content:'−'}
#fold-equity-dialog .fold-equity-details label{margin-top:12px}
.fold-equity-ev-result{padding:16px;margin:16px 0 0;background:#17131f;border-radius:12px;text-align:center}
.fold-equity-ev-result output{display:block;font-size:30px;font-weight:750;font-variant-numeric:tabular-nums;color:#ffe1a3;overflow-wrap:anywhere}
#fold-equity-ev.is-positive{color:#98dfbc}#fold-equity-ev.is-negative{color:#f0a7ae}
#fold-equity-ev-message{margin:6px 0 0;font-size:14px}
.fold-equity-help p{margin:12px 0;color:#bfb4cc;overflow-wrap:anywhere}
@media(max-width:430px){#fold-equity-dialog .equity-theory-header{padding:14px}#fold-equity-dialog .equity-theory-body{padding:14px 14px 20px}#fold-equity-title{font-size:19px}.fold-equity-fields{gap:14px 12px}#fold-equity-dialog label{font-size:14px}#fold-equity-dialog input{font-size:19px}.fold-equity-answer{padding:18px 12px}#fold-equity-required{font-size:36px}}
@media(max-width:340px){.fold-equity-fields{grid-template-columns:minmax(0,1fr)}#fold-equity-dialog small{min-height:0}}

/* Compact, readable account/profile headings and activity toolbars. */
#brand-dialog .profile-dashboard-heading{align-items:center;gap:8px;margin-bottom:14px}
#brand-dialog .profile-dashboard-heading>div:first-child{min-width:0}
#brand-dialog .profile-dashboard-heading h2{font-size:21px;line-height:1.35;margin:0;word-break:keep-all}
#brand-dialog .profile-heading-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}
#brand-dialog .profile-heading-actions button{min-height:40px;padding:8px 10px;font-size:14px;line-height:1.35}
#brand-dialog .profile-heading-actions #reward-refresh{width:40px;min-width:40px;padding:9px}
#brand-dialog .reward-hero{padding:16px;margin-bottom:12px}
#brand-dialog .reward-identity{gap:12px}
#brand-dialog .profile-name-row h2{font-size:21px;line-height:1.4}
#brand-dialog .reward-muted{line-height:1.55}
#brand-dialog .profile-edit-panel{padding:0 14px}
:is(.study-practice-tools,.pro-group-toolbar,.reward-guide-toolbar){gap:8px}
:is(.study-practice-tools,.pro-group-toolbar,.reward-guide-toolbar) button{line-height:1.35}
:is(.pro-contribution-body,.reward-info-content) :is(p,small){word-break:keep-all;overflow-wrap:anywhere;line-height:1.6}
.pro-contribution-dialog form{gap:14px}
@media(max-width:380px){#brand-dialog .profile-dashboard-heading h2{font-size:19px}#brand-dialog .profile-heading-actions{gap:4px}#brand-dialog .profile-heading-actions button{padding:8px}#brand-dialog .reward-hero{padding:14px 12px}}
