#secondaryDialog{box-sizing:border-box;width:min(800px,96vw);max-height:94dvh;border:1px solid #bdcbd0;border-radius:20px;padding:24px;color:#263d48;background:#fcfcfa;font:17px/1.5 system-ui;overflow:auto}
#secondaryDialog::backdrop{background:#20353b99}#secondaryDialog header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}#secondaryDialog h2{margin:4px 0 18px;font-size:25px}#secondaryDialog h3{font-size:21px}#secondaryDialog small{letter-spacing:.08em;color:#486572}#secondaryDialog button,#secondaryDialog input,#secondaryDialog select{font:inherit;padding:12px;border:1px solid #9fb7c0;border-radius:9px;min-height:48px;max-width:100%;color:inherit;background:#fff}#secondaryDialog button{cursor:pointer}#secondaryDialog button:disabled{opacity:.65;cursor:default}#secondaryDialog button:focus-visible,#secondaryDialog input:focus-visible{outline:3px solid #d58b32;outline-offset:2px}#secondaryDialog label{display:block;margin-top:18px}#secondaryDialog progress{width:100%;accent-color:#2c8393}#secondaryDialog .sec-cover{width:100%;height:190px;object-fit:contain}#secondaryDialog .sec-prompt{white-space:pre-line}#secondaryDialog .sec-example,#secondaryDialog .sec-feedback{padding:18px;background:#edf3f2;border-left:4px solid #2c8393;margin:18px 0}#secondaryDialog .sec-choices{display:grid;gap:10px;margin:18px 0}#secondaryDialog .sec-choices button{text-align:left}#secondaryDialog .sec-primary{background:#236274;color:white}#secondaryDialog .sec-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px}#secondaryDialog .sec-note{font-size:14px;color:#536774}#secondaryDialog details{margin:15px 0;white-space:pre-line}#secondaryDialog[data-grade="5"]{background:#fffbf1;border-radius:24px}#secondaryDialog[data-grade="6"]{border-radius:10px}
@media(max-width:550px){#secondaryDialog{width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;margin:0;border-radius:0!important;padding:18px}#secondaryDialog h2{font-size:22px}#secondaryDialog .sec-cover{height:150px}}
#gamesSubjectButtons{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}#friendDialog #gamesSubjectButtons button{min-height:68px;background:#f4f0e6;color:#37474c;border:2px solid transparent;font-size:18px}#friendDialog #gamesSubjectButtons button[aria-pressed="true"]{background:#dceff2;border-color:#2c8393;color:#174d5b}#friendDialog #gamesSubjectButtons button:focus-visible{outline:3px solid #d58b32;outline-offset:2px}

.sec-topic-cover{display:block;width:100%;overflow:hidden;border-radius:12px}.sec-topic-cover img{display:block;width:100%;height:auto;max-height:150px;object-fit:contain}

#secondaryDialog header>div{min-width:0}#secondaryDialog header>button{flex-shrink:0}#secondaryDialog .sec-passage{white-space:pre-line;line-height:1.65;padding:14px;background:#edf3f2;border-radius:8px}#secondaryDialog .sec-entry{display:flex;flex-wrap:wrap;gap:10px}#secondaryDialog .sec-entry label{flex-basis:100%}#secondaryDialog .sec-entry input{min-width:0;flex:1}

.sec-year-picker{padding:12px 16px;background:#f4f7f6;border-radius:12px;margin-bottom:12px}.sec-year-picker label{display:block;font-weight:700;margin-bottom:8px}.sec-year-picker select{font:inherit;max-width:100%;padding:10px;border:1px solid #b9cbc4;border-radius:8px;background:white}.sec-year-picker p{margin:8px 0 0;font-size:.9rem}
.sec-language-topics.subject-paper-fan{height:auto}.sec-language-topics.subject-paper-fan .subject-starters{height:auto;align-items:stretch;gap:10px;padding:12px 6px 20px;touch-action:pan-x pan-y}.sec-language-topics.subject-paper-fan .subject-starter:nth-child(n){flex:0 0 145px;width:145px;min-width:145px;height:auto;min-height:180px;padding:12px 10px;transform:none;animation:none;overflow:visible}.sec-language-topics.subject-paper-fan .starter-label{font-size:.85rem;line-height:1.35;overflow-wrap:normal;hyphens:none}.sec-language-topics.subject-paper-fan .starter-small{display:block;font-size:.7rem;line-height:1.3;margin-top:8px}.sec-language-topics .sec-topic-cover img{height:85px}

#secondaryDialog .sec-intro summary{cursor:pointer;font-weight:700;min-height:48px;padding:12px 0}#secondaryDialog .sec-check-start{width:100%;margin-bottom:12px}#secondaryDialog .round-setup button:disabled{opacity:1}
