/* Scope this layout: lessons and openings also use puzzles.css. */
.puzzle-workspace .topbar{height:60px;padding:0 max(20px,calc((100vw - 1200px)/2))}
.puzzle-workspace .mode-shell{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:14px}
.puzzle-workspace .mode-shell>p{display:none}
.puzzle-workspace .mode-button{padding:7px 12px}
.puzzle-workspace .mode-button small{display:none}
.puzzle-workspace .score-links{gap:6px 12px}
.puzzle-workspace .layout{grid-template-columns:minmax(280px,min(660px,calc(100dvh - 360px))) minmax(310px,390px);gap:24px;justify-content:center;padding-top:18px;padding-bottom:28px}
.puzzle-workspace .heading{margin-bottom:9px;align-items:center}
.puzzle-workspace .heading h1{font-size:clamp(26px,3vw,34px)}
.puzzle-workspace .heading .eyebrow{display:none}
.puzzle-workspace .heading p:not(.eyebrow){font-size:12px;margin-top:4px}
.puzzle-workspace .turn-badge{margin:0}
.puzzle-workspace .board-hud{gap:8px;font-size:11px}
.puzzle-workspace .board-hud>span:last-child{font-size:9px;color:var(--muted)}
.puzzle-workspace .board-feedback{font-size:12px;margin-bottom:7px;min-height:18px}
.puzzle-workspace .board-wrap{padding:6px}
.puzzle-workspace .square .piece{position:absolute;inset:5%;width:90%;height:90%}
.puzzle-workspace .board-tip{font-size:10px;margin-top:2px}
.puzzle-workspace .board-footer{font-size:11px}
.puzzle-workspace .sidebar.puzzle-rail{display:flex;flex-direction:column;gap:0;min-width:0;max-height:calc(100dvh - 140px);border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--card)}
.puzzle-rail-head{display:flex;align-items:center;gap:6px;padding:8px;border-bottom:1px solid var(--line);flex:none}
.puzzle-rail-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));flex:1;gap:4px}
.puzzle-rail-tabs button,.puzzle-help-button{min-height:42px;border:0;border-radius:8px;background:transparent;color:var(--muted);padding:7px 8px;font-size:12px;font-weight:700}
.puzzle-rail-tabs button[aria-selected="true"]{background:#a8dfbf22;color:#dff3e4;box-shadow:inset 0 0 0 1px #a8dfbf55}
.puzzle-help-button{font-size:16px;min-width:38px;border:1px solid #a8dfbf33}
.puzzle-rail-body{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#65846e transparent}
.puzzle-tab-panel{padding:17px}
.puzzle-tab-panel[hidden]{display:none!important}
@media(max-width:850px){.puzzle-workspace[data-puzzle-panel="scores"] #play-area,.puzzle-workspace[data-puzzle-panel="community"] #play-area{display:none}}
.puzzle-workspace .puzzle-tab-panel>.card{padding:0;border:0;border-radius:0;background:none;margin:0;box-shadow:none;height:auto}
.puzzle-workspace .puzzle-tab-panel>.card+.card{margin-top:18px;padding-top:18px;border-top:1px solid #ffffff1b}
.puzzle-workspace .puzzle-card .card-top h2{font:500 23px Georgia,serif}
.puzzle-workspace .puzzle-card .clock-line{display:none}
.puzzle-workspace .puzzle-card .message{font-size:13px;line-height:1.5;min-height:40px;margin:16px 0}
.puzzle-workspace .actions button{min-height:44px}
.puzzle-workspace .practice-card h2{font:500 18px Georgia,serif}
.puzzle-workspace .practice-copy{font-size:12px;margin:10px 0}
.puzzle-workspace .rating-line strong{font-size:37px}
.puzzle-workspace .rating-line span{font-size:11px}
.puzzle-workspace .rating-card .muted{font-size:11px;margin-bottom:10px}
.score-rating-detail{margin-top:10px;border-top:1px solid #ffffff1b;padding-top:6px}
.score-rating-detail>summary{min-height:36px;cursor:pointer;font-size:12px;color:var(--accent);align-content:center}
.puzzle-workspace .rating-trend{margin-bottom:10px}
.puzzle-workspace .stats{padding-top:10px}
.puzzle-workspace .record-hero{margin-top:10px;padding:10px}
.puzzle-workspace .record-grid{gap:10px 14px;margin-top:12px}
.puzzle-workspace .record-details{margin-top:12px;padding-top:6px}
.puzzle-workspace .record-details>summary{min-height:40px}
.puzzle-workspace .records-pause-note{font-size:10px;line-height:1.4}
.puzzle-workspace .history-list{margin-top:8px}
.puzzle-workspace .history-list li{padding:8px 0}
.score-eligibility{padding:13px;border:1px solid #789f6c77;border-radius:10px;background:#a8dfbf0b;margin:12px 0 16px}
.score-eligibility-heading{display:flex;justify-content:space-between;gap:8px;align-items:baseline;font-size:12px}
.score-eligibility-heading strong{font-size:19px;font-variant-numeric:tabular-nums;color:#d4efd9}
.score-eligibility progress{display:block;width:100%;height:7px;margin:9px 0;accent-color:#a8dfbf}
.score-eligibility p{font-size:11px;color:var(--muted);margin:0}
.puzzle-workspace .community-entry{margin-top:0;display:block;padding:0;border:0}
.puzzle-workspace .community-entry button{width:100%;font-size:12px;margin-top:10px}
.puzzle-workspace .auto-sharing{padding:0;border:0;margin-top:18px}
.puzzle-workspace .auto-sharing>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;color:var(--accent);cursor:pointer;font-size:12px;font-weight:700}
.puzzle-workspace .auto-sharing>summary::marker{content:''}
.puzzle-workspace .auto-sharing>summary::after{content:'⌄';font-size:16px;flex:none}
.puzzle-workspace .auto-sharing[open]>summary::after{content:'⌃'}
.puzzle-workspace .auto-sharing>summary .sharing-badge{margin-left:auto}
.puzzle-workspace .auto-sharing[open]>summary{margin-bottom:10px}
.puzzle-workspace .auto-sharing label{font-size:11px;color:var(--muted)}
.puzzle-workspace .auto-sharing input{margin-top:5px;padding:9px;font-size:14px;background:#111c20}
.puzzle-workspace .auto-sharing-actions{gap:6px}
.puzzle-workspace .auto-sharing-actions button{font-size:11px;padding:8px 10px}
.sharing-heading{display:flex;justify-content:space-between;gap:8px;align-items:center}
.sharing-heading h2{font-size:16px}
.sharing-badge{font-size:10px;border:1px solid #769b7d66;border-radius:20px;padding:3px 7px;color:#c4e6cc}
.sharing-badge[data-state="off"]{color:var(--muted);border-color:#71817c66}
.sharing-rules{font-size:11px;color:var(--muted);margin-top:12px}
.sharing-rules>summary{min-height:36px;cursor:pointer;color:#c4e6cc;align-content:center}
.sharing-rules p{line-height:1.5;margin:5px 0}
.puzzle-workspace #puzzle-help{width:min(560px,calc(100vw - 28px));max-height:calc(100dvh - 34px);padding:22px;overflow:auto}
.puzzle-help-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:15px}
.puzzle-help-head h2{font:500 24px Georgia,serif}
.puzzle-help-head button{min-height:40px;border:1px solid #789584;border-radius:8px;background:none;color:var(--text);padding:7px 12px}
.puzzle-workspace #puzzle-help .about{padding:0;border:0;background:none}
.puzzle-workspace #puzzle-help .about>details{display:block}
.puzzle-workspace #puzzle-help .about>details>summary{display:none}
.puzzle-workspace #puzzle-help p{font-size:13px}
@media(max-width:850px){.puzzle-workspace .layout{grid-template-columns:minmax(0,1fr);max-width:640px;gap:14px;padding:14px 14px 65px}.puzzle-workspace .sidebar.puzzle-rail{max-height:none}.puzzle-workspace .puzzle-rail-body{max-height:460px}.puzzle-workspace .mode-shell{max-width:640px;padding:12px 14px 0;flex-wrap:wrap;gap:5px}.puzzle-workspace .mode-switch{flex:1}.puzzle-workspace .mode-button{justify-content:center;padding:7px 9px}.puzzle-workspace .score-links{gap:6px 10px}.puzzle-workspace .score-links .records-jump{min-height:36px}.puzzle-workspace .community-top{min-height:36px;padding:6px 9px}.puzzle-workspace .study-links summary{min-height:36px}.puzzle-workspace .mobile-actions{display:grid;margin-top:10px}.puzzle-workspace .puzzle-card .actions #next,.puzzle-workspace .puzzle-card .actions #hint{display:none}.puzzle-workspace .puzzle-card .message{display:none}.puzzle-workspace .heading h1{font-size:28px}.puzzle-workspace .board-tip{display:none}.puzzle-workspace .puzzle-rail-tabs button{min-height:44px}.puzzle-workspace .puzzle-tab-panel{padding:15px}}
@media(min-width:851px) and (max-height:740px){.puzzle-workspace .layout{grid-template-columns:minmax(280px,min(520px,calc(100dvh - 340px))) minmax(310px,390px)}.puzzle-workspace .mode-shell{padding-top:10px}.puzzle-workspace .layout{padding-top:12px}.puzzle-workspace .heading h1{font-size:26px}.puzzle-workspace .sidebar.puzzle-rail{max-height:calc(100dvh - 126px)}}
@media(max-width:410px){.puzzle-workspace .mode-shell{display:block}.puzzle-workspace .mode-switch{display:flex}.puzzle-workspace .score-links{margin-top:4px}.puzzle-workspace .board-hud{gap:6px;font-size:10px}.puzzle-workspace .board-best{font-size:10px}.puzzle-workspace .heading h1{font-size:25px}.puzzle-workspace .turn-badge{font-size:10px;padding:5px 7px}.puzzle-workspace .topbar{padding:0 14px}.puzzle-workspace .brand-mark{width:33px;height:33px;font-size:23px}.puzzle-workspace .brand{gap:8px}.puzzle-workspace .brand small{font-size:9px}}

/* Keep secondary settings in disclosures and give mobile one scroll surface. */
.puzzle-workspace .puzzle-rail-tabs button,.puzzle-workspace .puzzle-help-button,.puzzle-workspace .record-details>summary,.puzzle-workspace .score-rating-detail>summary,.puzzle-workspace .sharing-rules>summary{min-height:44px}
.puzzle-workspace .puzzle-help-button{min-width:44px}
.puzzle-workspace .record-grid>div{min-width:0}.puzzle-workspace .record-grid strong{line-height:1.35}
.puzzle-workspace .auto-sharing .sharing-badge{font-weight:500;flex:none}
@media(max-width:850px){.puzzle-workspace .puzzle-rail-body{max-height:none;overflow:visible}.puzzle-workspace .score-links .records-jump,.puzzle-workspace .community-top,.puzzle-workspace .study-links summary{min-height:44px}.puzzle-workspace .puzzle-tab-panel{scroll-margin-top:12px}}
