/* The first study tab gives each quote and its author a single reading surface. */
#study-screen>.home-account-line{display:grid;grid-template-columns:minmax(0,1fr) clamp(140px,30vw,360px) minmax(0,1fr);align-items:center;gap:10px 14px;flex:none;padding-bottom:10px}
#study-screen>.home-account-line .home-profile{flex:1 1 12rem;min-width:0;max-width:100%}
#study-screen .home-profile .brand-copy{min-width:0;max-width:100%}
#study-screen .home-profile #edit-brand{height:auto;min-height:44px;overflow:visible}
#study-screen .home-profile #brand-name{white-space:normal;word-break:normal;overflow-wrap:anywhere;overflow:visible;text-overflow:clip;line-height:1.4}
#study-screen .rg-home-account{flex-wrap:wrap;gap:8px;margin-left:auto;max-width:100%;justify-content:flex-end}
#study-screen .rg-home-account>.account-open{min-height:44px;flex:none}
#study-screen .rg-home-account>.account-open span{max-width:none;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.4}
#study-screen .home-options>summary{width:44px;height:44px;cursor:pointer}
/* The date and disclosure share a compact row above the reading. */
.poker-quote-toolbar{display:flex;justify-content:flex-end;align-items:center;gap:4px;min-height:40px}
#poker-quote-card .quote-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#poker-quote-card .home-options{flex:none;margin:0;max-width:100%}
#poker-quote-card .home-options>summary{width:44px;height:40px;border:0;background:transparent;font-size:23px;border-radius:50%}
#study-screen #poker-quote-card .home-options-menu{position:absolute;right:0;top:calc(100% + 4px);box-sizing:border-box;width:min(260px,calc(100vw - 56px));min-width:0;margin:0;max-height:min(480px,60dvh)}
#poker-quote-card .home-options-menu :is(button,a){white-space:normal;overflow-wrap:anywhere}
#poker-quote-card .home-options>summary:focus-visible{outline:2px solid #ffe1a2;outline-offset:2px}
/* Transparent artwork sits between the profile and account actions, with no banner row. */
#study-screen .regulars-home-banner{display:flex;align-items:center;justify-content:center;min-width:0;width:100%;--home-banner-height:clamp(48px,8vw,84px);height:var(--home-banner-height);pointer-events:none}
.regulars-home-banner img{display:block;width:100%;height:100%;object-fit:contain;object-position:center}
#banner-dialog{width:min(780px,94vw);max-height:88dvh;max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 32px);overflow:auto;padding:22px;background:#211c29;border:1px solid #ac8c55;border-radius:18px;color:#f6ecd9}
#banner-dialog::backdrop{background:#000b}#banner-dialog>header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}#banner-dialog h2{margin:0;color:#f4d592;font-size:22px}#banner-close{min-height:44px}
.banner-choices{display:grid;grid-template-columns:1fr 1fr;gap:14px}.banner-choice{padding:0;overflow:hidden;border:2px solid #61513b;border-radius:12px;background:#16131c;text-align:left;color:#eee0c8;cursor:pointer}.banner-choice img{display:block;width:100%;height:auto;aspect-ratio:3/1;object-fit:contain}.banner-choice-label{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 12px}.banner-choice-label strong{font-size:15px}.banner-choice-state{font-size:12px;color:#f6d594}.banner-choice[aria-pressed=true]{border-color:#f2cb7d;background:#392d20}.banner-choice:focus-visible{outline:3px solid #ffe3a1;outline-offset:3px}#banner-status{font-size:14px;color:#efcfa5;margin:12px 0 0}#banner-status:empty{display:none}@media(max-width:520px){#banner-dialog{padding:16px}.banner-choices{grid-template-columns:1fr;gap:12px}}
.study-modes{grid-template-columns:repeat(3,minmax(0,1fr))}
.study-modes button{padding:8px 5px;word-break:keep-all}
#study-screen.quotes-active>.study-daybar,#study-screen.quotes-active>.study-prompt,#study-screen.quotes-active>.study-content,#study-screen.quotes-active>.study-practice-nav,#study-screen.quotes-active #study-history{display:none}
#study-quotes{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:2px 2px 12px}
#study-quotes[hidden]{display:none}
#study-screen .poker-quote-card{display:flex;flex-direction:column;max-width:780px;min-height:0;margin:0 auto;padding:12px 24px 18px;border:0;border-radius:18px;background:radial-gradient(ellipse at 100% 0,#59402e55,transparent 65%),linear-gradient(135deg,#292230,#19171f);color:#f6ead6}
.poker-quote-top{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px 16px}
.poker-quote-top h2{font-size:17px;font-weight:650;line-height:1.5;margin:0;color:#e7c990}
.poker-quote-top time{font-size:12px;line-height:1.5;font-variant-numeric:tabular-nums;color:#c7b7ca}
.poker-quote-emblem{display:block;width:44px;height:44px;object-fit:contain;margin:2px auto 8px}
.poker-quote-reading{display:flex;flex-direction:column;justify-content:center;flex:none;margin:0;padding:8px 0 4px;text-align:center}
.poker-quote-install-prompt{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;flex:1;min-height:0;padding:12px 0 18px}
.poker-quote-install{max-width:640px;margin:0;text-align:center;color:#ffedc2;font-size:clamp(21px,3.1vw,28px);font-weight:750;line-height:1.5;letter-spacing:-.025em;word-break:keep-all;overflow-wrap:anywhere;text-wrap:balance}
#poker-quote-install-open{width:min(100%,300px);min-height:52px;padding:12px 24px;border-radius:12px;font-size:19px;font-weight:750}
#poker-quote-card :is(#poker-quote-top,#poker-quote-reading,#poker-quote-install,#poker-quote-install-prompt,#poker-quote-install-open)[hidden],#poker-quote-card.install-required :is(#poker-quote-sync-status,#poker-quote-sync-retry){display:none!important}
#study-screen #poker-quote{display:block;max-width:640px;min-width:0;min-height:0;margin:0 auto;color:#ffedc2;font-size:clamp(21px,3.1vw,28px);font-weight:750;line-height:1.5;letter-spacing:-.025em;word-break:keep-all;overflow-wrap:anywhere;text-wrap:pretty}
.poker-quote-reading figcaption{display:flex;justify-content:center;align-items:center;gap:6px 12px;flex-wrap:wrap;margin-top:10px;line-height:1.5}
#poker-quote-author{font-size:16px;font-weight:650;color:#e7c990}
#study-screen .community-like{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 14px;border:1px solid #927747;border-radius:999px;background:#1a1620;color:#e9c98d;font-size:15px;font-weight:650;line-height:1.4;white-space:nowrap}
.community-like-icon{display:flex;width:20px;height:20px;flex:none}
.community-like-icon svg{width:100%;height:100%}
#study-screen .community-like[aria-pressed="true"]{border-color:#e5bd70;background:#4a3820;color:#ffe1a2}
.community-like[aria-pressed="true"] svg{fill:currentColor}
.community-like-count{font-variant-numeric:tabular-nums;min-width:1ch}
#study-screen .community-like:disabled{opacity:.65;cursor:wait}
#study-screen .community-like:focus-visible{outline:2px solid #ffe1a2;outline-offset:3px}
.community-like-status{margin:10px 0 0;text-align:center;font-size:14px;line-height:1.5;color:#efd39f}
.community-like-status:empty{display:none}
@media(max-width:600px){#study-screen>.home-account-line{gap:8px 10px;padding-bottom:8px}#study-screen .poker-quote-card{padding:10px 16px 16px;border-radius:14px}.poker-quote-top time{font-size:12px}.poker-quote-emblem{width:40px;height:40px;margin-top:0}.poker-quote-reading{padding:6px 0 2px}.study-modes button{font-size:14px}}
@media(min-width:600px) and (max-width:1100px){#study-quotes{flex:none;overflow:visible;padding-bottom:4px}#study-screen .poker-quote-card{max-width:780px;min-height:0;padding:12px 24px 18px}#poker-quote-author{font-size:17px}}
@media(max-height:650px){#study-screen.quotes-active{height:auto;min-height:calc(100dvh - var(--app-nav-space))}#study-quotes{flex:none;overflow:visible}#study-screen .poker-quote-card{min-height:0}.poker-quote-emblem{width:36px;height:36px;margin-top:0}}

/* Safari/PWA safe areas follow the current viewport, including landscape.
   Keep the inset inside the screen box, so it is not counted twice in its height. */
body.study-active #study-screen{
 --home-edge:18px;--home-top:16px;
 padding-top:calc(var(--home-top) + env(safe-area-inset-top,0px));
 padding-left:max(var(--home-edge),env(safe-area-inset-left,0px));
 padding-right:max(var(--home-edge),env(safe-area-inset-right,0px));
 -webkit-text-size-adjust:100%;text-size-adjust:100%;
}
@media(max-width:760px){body.study-active #study-screen{--home-edge:12px;--home-top:10px}}
/* Let the entire Home page scroll when a small viewport or enlarged text
   makes the profile taller; never crop it to reserve room for the quote. */
@media(max-width:1100px){
 body.study-active{overflow:auto;min-height:100dvh}
 body.study-active #study-screen{height:auto;min-height:calc(100vh - var(--app-nav-space));min-height:calc(100dvh - var(--app-nav-space))}
 #study-screen.quotes-active #study-quotes{flex:none;overflow:visible}
}
/* Scoped manager: large controls stay usable on a phone and Fold cover screen. */
#poker-quote-sync-retry{min-height:44px;padding:8px 16px;font-size:16px;border:1px solid #907447;border-radius:10px;background:#211c26;color:#edcd94}
#poker-quote-sync-retry{align-self:center;margin-top:10px}
#poker-quote-edit-dialog{box-sizing:border-box;width:min(620px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:22px;border:1px solid #9c7c49;border-radius:16px;background:#211c26;color:#f6ead6;overflow:auto}
#poker-quote-edit-dialog::backdrop{background:#09060bc9}
#poker-quote-edit-form{display:flex;flex-direction:column;gap:14px;text-align:left}
#poker-quote-edit-form header{display:flex;align-items:center;justify-content:space-between;gap:12px}
#poker-quote-edit-form h2{margin:0;font-size:22px}
#poker-quote-edit-fields{display:flex;flex-direction:column;gap:10px;border:0;margin:0;padding:0;min-width:0}
#poker-quote-edit-fields label{font-size:16px;font-weight:650;margin-top:6px}
#poker-quote-edit-form button{min-height:44px;flex-shrink:0;font-size:16px;padding:10px 14px;border:1px solid #907447;border-radius:9px;background:#302737;color:#ffe1a2}
#poker-quote-edit-form :is(select,textarea,input){box-sizing:border-box;width:100%;min-width:0;min-height:46px;padding:11px;border:1px solid #706077;border-radius:9px;background:#17131c;color:#fff3df;font:inherit;font-size:17px;line-height:1.55}
#poker-quote-edit-form textarea{resize:vertical;min-height:154px}
.poker-quote-choose{display:flex;gap:8px;min-width:0}
#poker-quote-edit-note,#poker-quote-edit-error{margin:0;font-size:15px;line-height:1.6;overflow-wrap:anywhere}
#poker-quote-edit-note{color:#ccbcd0}#poker-quote-edit-error{color:#ffb4b4}#poker-quote-edit-error:empty{display:none}
#poker-quote-edit-form #poker-quote-edit-save{background:#d9b36e;border-color:#d9b36e;color:#21180c;font-weight:750}
.poker-quote-edit-actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-end}
.poker-quote-edit-actions #poker-quote-edit-save{flex:1}
#poker-quote-edit-form #poker-quote-edit-delete{color:#ffc3c3;border-color:#a65e65;background:#3d222b}
#poker-quote-edit-delete[hidden]{display:none}
#poker-quote-edit-form :disabled{opacity:.55}
#poker-quote-edit-form :focus-visible{outline:2px solid #ffe1a2;outline-offset:3px}
#poker-quote{white-space:pre-line}
@media(max-width:400px){#poker-quote-edit-dialog{padding:16px}.poker-quote-choose{flex-wrap:wrap}.poker-quote-choose select{flex-basis:100%}}
/* Keep all account actions beside the profile on mobile, without a second row. */
@media(max-width:760px){
 #study-screen>.home-account-line{gap:8px}
 #study-screen>.home-account-line .home-profile{min-width:0;gap:9px;align-items:center}
 #study-screen .home-profile .mascot-frame{width:44px;height:54px;flex:none}
 #study-screen .home-profile .brand-copy{flex:1;min-width:0;gap:4px;justify-content:center}
 #study-screen .home-profile .brand-copy h2{width:100%;margin:0;line-height:1.3}
 #study-screen .home-profile .home-reward-link{min-height:26px;margin:0;padding:2px 8px;font-size:12px;line-height:1.4;align-self:flex-start}
 #study-screen .home-profile #edit-brand{display:flex;align-items:center;min-height:28px;height:auto;padding:0;max-width:100%;width:100%;line-height:1.3}
 #study-screen .home-profile #brand-name{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:18px;line-height:1.3}
 #study-screen .home-profile .brand-name-line{display:block;min-width:0;width:100%}
 #study-screen .home-profile .brand-name-line>small{display:none}
 #study-screen .rg-home-account{flex-wrap:nowrap;gap:5px;margin:0}
 #study-screen .rg-home-account>.account-open{min-height:44px;padding:8px;font-size:13px;white-space:nowrap;gap:4px}
 #study-screen .rg-home-account>.account-open span{white-space:nowrap;font-size:13px}
 #study-screen .rg-home-account>.account-open svg{width:16px;height:16px}
 #study-screen .home-options>summary{width:44px;height:44px}
}
/* Keep the logo between the profile and account on cover screens as well. */
@media(max-width:480px){
 #study-screen>.home-account-line{grid-template-columns:minmax(130px,1fr) clamp(88px,30vw,144px) minmax(0,1fr);gap:6px}
 #study-screen .regulars-home-banner{grid-column:2;grid-row:1;justify-self:center;width:100%;max-width:144px;--home-banner-height:48px;height:var(--home-banner-height)}
 #study-screen>.home-account-line .home-profile{grid-column:1;grid-row:1}
 #study-screen>.home-account-line .rg-home-account{grid-column:3;grid-row:1;justify-self:end;flex-wrap:wrap}
}
@media(max-width:350px){#study-screen .home-profile .mascot-frame{width:34px;height:40px}#study-screen .home-profile #brand-name{font-size:16px}#study-screen .rg-home-account>.account-open svg{display:none}#study-screen>.home-account-line{grid-template-columns:minmax(110px,1fr) clamp(88px,30vw,144px) minmax(0,1fr);gap:6px}}

#study-screen>.home-account-line .home-profile{position:relative;flex-direction:row;align-items:center;gap:0}
#study-screen .home-profile-tier{position:absolute;right:0;bottom:0;display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;min-height:0;padding:0;box-sizing:border-box;border:1px solid currentColor;border-radius:50%;background:#211b29;color:var(--reward-tier-color,#d9c7a0);font-size:0;line-height:1;pointer-events:none}
#study-screen .home-profile-tier::before{content:'◆';font-size:10px}
#study-screen .home-profile-tier[hidden]{display:none!important}

/* The artwork doubles as a quiet, keyboard-accessible notepad entrance. */
a.poker-quote-emblem{text-decoration:none;cursor:pointer;border:0;padding:0;background:transparent}
a.poker-quote-emblem img{display:block;width:100%;height:100%;object-fit:contain}
/* Show only the shield from the existing transparent banner (590px square at 110,45). */
a.poker-quote-emblem--shield{position:relative;overflow:hidden}
a.poker-quote-emblem--shield img{position:absolute;left:-18.644068%;top:-7.627119%;width:368.135593%;max-width:none;height:122.711864%;object-fit:fill}
a.poker-quote-emblem:focus-visible{outline:2px solid #ffdda0;outline-offset:4px;border-radius:8px}

.home-options-menu #poker-quote-manage[hidden]{display:none!important}

#memo-panel-dialog{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;background:#121016;color:#f6ecd9}
#memo-panel-dialog::backdrop{background:#121016}
#memo-panel-dialog>iframe{display:block;width:100%;height:100%;border:0;background:#121016}
#memo-panel-dialog>[hidden]{display:none!important}
.memo-panel-status{margin:24px 20px;font-size:16px}
.memo-panel-close,.memo-panel-fallback{margin:0 20px;padding:10px 14px;color:#f4d592}

/* Profile at the left and account management at the right. */
#study-screen .home-profile #edit-photo{flex:none;width:44px;height:44px;padding:0;border-radius:50%}
#study-screen .home-profile #edit-photo img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}
#study-screen .home-profile #edit-photo img[data-profile-pending]{visibility:hidden}
#study-screen .home-profile{grid-column:1;grid-row:1;justify-self:start}
#study-screen .regulars-home-banner{grid-column:2;grid-row:1}
#study-screen .rg-home-account{grid-column:3;grid-row:1;justify-self:end}
#study-screen .rg-home-account>.home-account-open{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:56px;min-height:48px;padding:4px 6px;border:0;background:transparent;box-shadow:none;color:#ffe1a2}
#study-screen .rg-home-account>.home-account-open svg{display:block;width:22px;height:22px}
#study-screen .rg-home-account>.home-account-open span{font-size:12px;line-height:1.3;white-space:nowrap}
#study-screen .rg-home-account>.home-account-open:focus-visible{outline:2px solid #ffe1a2;outline-offset:3px}
@media(max-width:480px){
 #study-screen>.home-account-line{grid-template-columns:minmax(0,1fr) clamp(88px,30vw,144px) minmax(0,1fr);gap:8px}
 #study-screen .home-profile #edit-photo{width:44px;height:44px}
}

/* Update bell beside the account button. */
.rg-home-account #app-updates-open{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;min-width:44px;min-height:44px;padding:8px;border:0;border-radius:10px;background:transparent;color:#ffe1a2;box-shadow:none}
#app-updates-open svg{width:23px;height:23px;display:block}
#app-updates-open .app-updates-dot{position:absolute;right:6px;top:6px;width:7px;height:7px;border-radius:50%;background:#ffcc74;box-shadow:0 0 0 2px #211b29}
#app-updates-open .app-updates-dot[hidden]{display:none}
#app-updates-panel{box-sizing:border-box;position:static;flex:none;width:100%;min-width:0;margin:0 0 24px;padding:24px 0;border-block:1px solid #74634566;color:#f4eee7;font:16px/1.65 system-ui,sans-serif;text-align:left}
#app-updates-panel[hidden]{display:none!important}
body.study-active:has(#app-updates-panel:not([hidden])){overflow:auto}
#study-screen:has(>#app-updates-panel:not([hidden])){height:auto;min-height:calc(100dvh - var(--app-nav-space))}
#study-screen:has(>#app-updates-panel:not([hidden])) #study-quotes{flex:none;overflow:visible}
#app-updates-panel header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}
#app-updates-panel h2{margin:0;font-size:23px;color:#ffe1a2}
#app-updates-close{min-height:44px;padding:8px 14px;border:1px solid #806a45;border-radius:10px;background:#29222f;color:#ffe1a2;font:inherit;cursor:pointer}
#app-updates-list article+article{border-top:1px solid #76604366;margin-top:24px;padding-top:24px}
#app-updates-list time{font-size:13px;color:#c7b596}
#app-updates-list h3{margin:4px 0 12px;font-size:19px;line-height:1.5;color:#ffe1a2}
#app-updates-list ul{margin:0;padding-left:22px}#app-updates-list li+li{margin-top:10px}#app-updates-list li{word-break:keep-all;overflow-wrap:anywhere}
#app-updates-panel button:focus-visible{outline:2px solid #ffe1a2;outline-offset:3px}
@media(max-width:600px){#app-updates-panel{padding:20px 0}#study-screen .rg-home-account{gap:6px}}

/* Keep the English lettering, excluding the shield and Korean subtitle below it. */
.banner-wordmark-canvas{display:block;position:relative;width:100%;aspect-ratio:3/1;overflow:hidden}
.regulars-home-banner>.banner-wordmark-canvas{flex:none;max-width:calc(var(--home-banner-height) * 3)}
.banner-wordmark-canvas>img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;object-position:center;clip-path:var(--wordmark-clip);transform:translate(var(--wordmark-x),var(--wordmark-y)) scale(1.08);transform-origin:50% 50%}
.banner-wordmark-canvas[data-banner="black-gold"]{--wordmark-clip:polygon(32.09024% 23.48066%,95.99448% 23.48066%,95.99448% 72.51381%,86.55617% 72.51381%,84.94475% 66.98895%,76.42726% 64.91713%,76.42726% 63.53591%,50.64457% 63.53591%,47.65193% 66.29834%,47.65193% 70.71823%,32.09024% 70.71823%);--wordmark-x:-15.16575%;--wordmark-y:2.16298%;}
.banner-wordmark-canvas[data-banner="emerald"]{--wordmark-clip:polygon(34.34622% 26.24309%,93.37017% 26.24309%,93.37017% 73.61878%,86.55617% 73.61878%,84.94475% 69.06077%,76.42726% 66.98895%,76.42726% 65.60773%,50.64457% 65.60773%,47.65193% 68.37017%,47.65193% 72.09945%,34.34622% 72.09945%);--wordmark-x:-14.96685%;--wordmark-y:0.07459%;}
.banner-wordmark-canvas[data-banner="burgundy"]{--wordmark-clip:polygon(33.10313% 24.30939%,94.93554% 24.30939%,94.93554% 73.75691%,86.55617% 73.75691%,84.94475% 69.06077%,76.42726% 66.98895%,76.42726% 65.60773%,50.64457% 65.60773%,47.65193% 68.37017%,47.65193% 72.79006%,33.10313% 72.79006%);--wordmark-x:-15.14088%;--wordmark-y:1.04420%;}
.banner-wordmark-canvas[data-banner="midnight"]{--wordmark-clip:polygon(34.30018% 24.03315%,95.76427% 24.03315%,95.76427% 72.51381%,86.55617% 72.51381%,84.94475% 67.67956%,76.42726% 65.60773%,76.42726% 64.22652%,50.64457% 64.22652%,47.65193% 66.98895%,47.65193% 72.37569%,34.30018% 72.37569%);--wordmark-x:-16.23481%;--wordmark-y:1.86464%;}
.banner-wordmark-canvas[data-banner="white-gold"]{--wordmark-clip:polygon(31.90608% 25.13812%,95.67219% 25.13812%,95.67219% 75.96685%,86.55617% 75.96685%,84.94475% 71.13260%,76.42726% 69.06077%,76.42726% 67.67956%,50.64457% 67.67956%,47.65193% 70.44199%,47.65193% 74.86188%,31.90608% 74.86188%);--wordmark-x:-14.89227%;--wordmark-y:-0.59669%;}
