/* 엔트리문제사이트 — 파이썬문제사이트(codingai-yeosu-python)와 같은 틀 */
:root { color: #14213d; font-synthesis: none; background: #fff; font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --navy: #0b1f4b; --blue: #3b82f6; --green: #19a463; --green-soft: #e7f6ec; --line: #e4eaf3; --muted: #7b879c; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline-offset: 2px; outline: 3px solid #66a5ff; }
h1, h2, h3, h4, p { margin-top: 0; }
.loading-initial { padding: 40px; color: var(--muted); }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 50; }
.skip-link:focus { left: 8px; }
.wrap, .header-inner { width: min(1180px, 100% - 48px); margin-inline: auto; }
.wrap.wide { width: min(1560px, 100% - 32px); }

/* 머리줄 */
.site-header { z-index: 10; background: #fff; border-bottom: 1px solid var(--line); height: 74px; position: sticky; top: 0; }
.header-inner { align-items: center; gap: 56px; height: 100%; display: flex; }
.brand { white-space: nowrap; align-items: center; gap: 11px; display: flex; }
.brand-mark { color: #fff; background: var(--navy); border-radius: 12px; place-items: center; width: 42px; height: 42px; display: grid; }
.brand-mark svg { width: 20px; height: 20px; }
.brand strong { letter-spacing: -.035em; font-size: 17px; display: block; }
.brand small { color: var(--muted); margin-top: 2px; font-size: 11px; display: block; }
.site-header nav { align-items: center; gap: 30px; height: 100%; display: flex; }
.site-header nav a { color: #66748d; border-bottom: 2px solid #0000; align-items: center; height: 100%; font-size: 14px; font-weight: 650; display: flex; white-space: nowrap; }
.site-header nav a.active, .site-header nav a:hover { color: var(--navy); border-bottom-color: var(--blue); }
.header-account { align-items: center; gap: 12px; margin-left: auto; font-size: 13px; display: flex; white-space: nowrap; }
.header-score { color: #175bc6; background: #eef5ff; border-radius: 20px; padding: 7px 11px; font-weight: 800; }
.plain-button, .text-button, .login-link { color: #294574; background: 0 0; border: 0; font-weight: 650; }
.menu-button { display: none; margin-left: auto; background: none; border: 1px solid #d5dfef; border-radius: 8px; padding: 8px 10px; color: #12356d; font-weight: 700; }
.site-footer { color: var(--muted); border-top: 1px solid #e7ecf4; justify-content: space-between; padding: 27px max(24px, 50vw - 590px); font-size: 12px; display: flex; gap: 12px; flex-wrap: wrap; }
.site-footer a:hover { color: #175bc6; }

/* 버튼 */
.button { border: 1px solid #0000; border-radius: 9px; justify-content: center; align-items: center; min-height: 44px; padding: 0 20px; font-size: 14px; font-weight: 750; transition: transform .16s, background .16s; display: inline-flex; gap: 6px; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { opacity: .5; cursor: wait; }
.primary { color: #fff; background: var(--navy); }
.primary:hover:not(:disabled) { background: #183b78; }
.secondary { color: #12356d; background: #fff; border-color: #d5dfef; }
.secondary:hover:not(:disabled) { background: #f3f7fc; }
.full { width: 100%; }

/* 첫 화면 */
.hero { grid-template-columns: 1fr 1fr; align-items: center; gap: 75px; min-height: 500px; padding-block: 72px; display: grid; }
.hero-korean { color: #1f9d63; letter-spacing: .08em; font-size: 13px; font-weight: 800; }
.hero h1 { letter-spacing: -.065em; color: var(--navy); margin: 16px 0 24px; font-size: clamp(42px, 5vw, 68px); line-height: 1.12; }
.hero h1 em { color: #19a463; font-style: normal; }
.hero-description { color: #65738b; max-width: 440px; font-size: 16px; line-height: 1.8; }
.hero-actions { gap: 10px; margin-top: 31px; display: flex; flex-wrap: wrap; }
.hero-blocks { background: var(--navy); border-radius: 18px; overflow: hidden; transform: rotate(1deg); box-shadow: 0 28px 55px #0b1f4b24; }
.hb-top { color: #aabbdc; border-bottom: 1px solid #fff2; align-items: center; gap: 14px; height: 49px; padding: 0 20px; font: 12px ui-monospace, monospace; display: flex; }
.hb-dots { gap: 6px; display: flex; }
.hb-dots i { background: #8295b9; border-radius: 50%; width: 8px; height: 8px; }
.hb-dots i:first-child { background: #f77b81; } .hb-dots i:nth-child(2) { background: #e7c16c; } .hb-dots i:nth-child(3) { background: #67c89a; }
.hb-body { padding: 34px 30px 42px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.pb { color: #fff; font-size: 14px; font-weight: 800; padding: 9px 16px; border-radius: 8px; position: relative; white-space: nowrap; }
.pb.hat { border-radius: 18px 18px 8px 8px; padding-top: 12px; }
.pb.in { margin-left: 26px; }
.pb .v { background: #fff; color: #333; border-radius: 10px; padding: 1px 8px; margin: 0 3px; font-weight: 800; }
.pb.start { background: #00b400; } .pb.flow { background: #13b2e8; } .pb.motion { background: #a751e3; } .pb.looks { background: #ff3a61; } .pb.data { background: #dd47d8; } .pb.judge { background: #4562f5; }
.hb-out { color: #83b996; font: 13px ui-monospace, monospace; margin-top: 16px; }

.section-heading { justify-content: space-between; align-items: end; gap: 15px; margin-bottom: 19px; display: flex; }
.section-heading h2 { color: var(--navy); letter-spacing: -.04em; margin: 0; font-size: 25px; }
.section-heading p { color: #7d8a9f; margin: 0; font-size: 14px; }
.level-section { padding: 38px 0 67px; }
.level-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; display: grid; }
.level-card { border: 1px solid #dfe7f2; border-radius: 16px; flex-direction: column; gap: 9px; min-height: 167px; padding: 23px; transition: box-shadow .2s, transform .2s; display: flex; }
.level-card:hover { transform: translateY(-3px); box-shadow: 0 12px 25px #172e5c16; }
.level-name { color: #356dc0; font-size: 13px; font-weight: 800; }
.level-card strong { color: #102451; font-size: 37px; line-height: 1; }
.level-card small { color: #8d99aa; margin-left: 5px; font-size: 14px; }
.level-meta { color: #77859a; font-size: 12px; }
.level-desc { color: #5f6f88; font-size: 13px; line-height: 1.6; }
.progress-track { background: #e8eef8; border-radius: 8px; height: 7px; overflow: hidden; }
.progress-track span { background: var(--blue); border-radius: 8px; height: 100%; display: block; }
.topics-section { padding-bottom: 85px; }
.topic-list { flex-wrap: wrap; gap: 9px; display: flex; }
.topic-chip { color: #405470; background: #f9fbfe; border: 1px solid #dce5f1; border-radius: 999px; padding: 10px 16px; font-size: 13px; font-weight: 600; }
.topic-chip:hover { background: #eff6ff; border-color: #8eb5ed; }

/* 목록 */
.page-content { min-height: calc(100vh - 150px); padding-top: 58px; padding-bottom: 95px; }
.page-head h1, .problem-head h1 { color: var(--navy); letter-spacing: -.05em; margin-bottom: 8px; font-size: 34px; }
.page-head p { color: #79869a; font-size: 15px; }
.filters { background: #f7f9fd; border: 1px solid #e5ebf4; border-radius: 13px; grid-template-columns: 120px 120px 145px minmax(190px, 1.5fr); gap: 10px; margin: 27px 0; padding: 16px; display: grid; }
.filters label, .auth-card label { color: #576782; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 700; display: flex; }
.filters input, .filters select, .auth-card input, .auth-card select { color: #1e2e4b; background: #fff; border: 1px solid #d6e0ec; border-radius: 8px; min-width: 0; height: 43px; padding: 0 12px; }
.list-count { color: #54709c; margin-bottom: 12px; font-size: 13px; font-weight: 700; }
.problem-list { border-top: 2px solid #143062; }
.set-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 8px 8px; border-bottom: 1px solid #e7ecf3; color: #143062; font-weight: 800; font-size: 15px; }
.set-head small { color: #8a96a7; font-weight: 650; font-size: 12px; }
.problem-row { border-bottom: 1px solid #e7ecf3; grid-template-columns: 92px minmax(0, 1fr) 62px 94px 54px; align-items: center; gap: 17px; min-height: 76px; padding: 10px 8px; display: grid; }
.problem-row:hover { background: #f8fbff; }
.problem-id { color: #6992c9; font: 700 12px ui-monospace, monospace; }
.problem-title { min-width: 0; }
.problem-title strong { white-space: nowrap; text-overflow: ellipsis; color: #213553; font-size: 16px; display: block; overflow: hidden; }
.problem-title small { color: #8a96a7; margin-top: 5px; display: block; }
.level-pill, .status-pill { text-align: center; white-space: nowrap; border-radius: 6px; padding: 6px 8px; font-size: 11px; font-weight: 750; }
.level-pill { color: #2768bf; background: #e9f1ff; }
.level-2 { color: #188272; background: #e8f7f5; }
.level-1 { color: #7653a8; background: #f5efff; }
.status-pill { color: #8793a5; background: #f2f4f8; }
.status-pill.done { color: #1c8550; background: var(--green-soft); }
.status-pill.retry { color: #b45309; background: #fff4e5; }
.status-pill.locked { color: #6b7280; background: #eef0f4; }
.problem-row.locked .problem-title strong { color: #8793a5; }
.taste-note { background: #fff8e6; border: 1px solid #f5d98b; color: #7a5a00; border-radius: 8px; padding: 10px 14px; margin: 0 0 14px; font-size: 14px; }
.taste-note a { color: inherit; font-weight: 800; text-decoration: underline; }
.locked-page { padding-top: 48px; }
.locked-page .problem-labels { justify-content: center; margin-bottom: 14px; }
.locked-page .locked-title { font-size: 18px; font-weight: 800; margin: 6px 0 10px; }
.locked-page .hero-actions { justify-content: center; margin-top: 18px; }
.problem-points { text-align: right; color: #6c7d98; font-size: 12px; font-weight: 700; }
.pagination { justify-content: center; align-items: center; gap: 20px; margin: 27px; display: flex; }
.pagination button { color: #334f7c; background: #fff; border: 1px solid #dce5f0; border-radius: 7px; padding: 8px 12px; }
.pagination button:disabled { opacity: .4; cursor: default; }
.pagination span { color: #748299; font-size: 13px; }
.empty-state { color: #8b97a8; text-align: center; padding: 35px; }

/* 문제 풀이 */
.problem-page { min-height: calc(100vh - 150px); padding: 24px 0 70px; }
.problem-breadcrumb { color: #8797ae; gap: 11px; margin-bottom: 18px; font-size: 12px; display: flex; flex-wrap: wrap; }
.problem-breadcrumb a:hover { color: #2369cf; }
.problem-head { border-bottom: 1px solid #e2e8f0; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; padding-bottom: 18px; display: flex; }
.problem-head h1 { margin: 10px 0 0; font-size: 30px; }
.problem-labels { color: #8390a3; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; display: flex; flex-wrap: wrap; }
.head-nav { display: flex; gap: 8px; align-items: center; }
.solve-grid { grid-template-columns: minmax(330px, 400px) minmax(0, 1fr); align-items: start; gap: 20px; display: grid; }
.question-pane { min-width: 0; position: sticky; top: 90px; max-height: calc(100vh - 104px); overflow: auto; padding-right: 6px; }
.q-card { border: 1px solid #f2d5bf; border-radius: 12px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.q-card > h2 { margin: 0; background: #ffe4cf; color: #5a3416; font-size: 14px; padding: 10px 14px; letter-spacing: -.02em; }
.q-card .q-body { padding: 12px 14px; color: #37475f; font-size: 14px; line-height: 1.75; }
.q-card .q-body p { margin: 0 0 6px; }
.q-card.soft > h2 { background: #fff2e8; }
.q-card ol.flow { margin: 0; padding-left: 20px; }
.q-card ol.flow li { margin: 2px 0; }
.q-card ul.sub { list-style: none; margin: 2px 0 4px; padding-left: 4px; }
.q-card ul.sub li::before { content: "→ "; color: #b0703e; }
.run-chip { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid #c8d3e3; border-radius: 6px; padding: 0 8px; font-size: 12px; font-weight: 800; color: #2563eb; }
.var-item b { display: block; color: #24324d; }
.var-item b::before { content: "▶ "; color: #b0703e; }
.var-item span { display: block; margin: 0 0 6px 16px; color: #56657e; }
.obj-card { border: 1px solid #f2d5bf; border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.obj-card .obj-head { display: grid; grid-template-columns: 1fr 1fr; font-size: 14px; font-weight: 800; }
.obj-card .obj-head span:first-child { background: #ffe4cf; color: #5a3416; padding: 10px 14px; }
.obj-card .obj-head span:last-child { background: #fff; color: #1f2d45; padding: 10px 14px; border-bottom: 1px solid #f2d5bf; }
.obj-card .obj-body { padding: 12px 14px; font-size: 14px; line-height: 1.7; color: #37475f; }
.obj-card h3 { color: #ea580c; font-size: 14px; margin: 4px 0 6px; }
.obj-card .lead { margin: 0 0 6px; }
.obj-card .lead b.hat { color: #1f2d45; }
.obj-card ol.instr { margin: 0 0 10px; padding-left: 22px; }
.obj-card ol.instr > li::marker { content: counter(list-item) ") "; color: #6b7a92; font-size: 13px; }
.obj-card ol.instr ol { list-style: none; padding-left: 4px; margin: 2px 0; counter-reset: sub; }
.obj-card ol.instr ol li { counter-increment: sub; }
.obj-card ol.instr ol li::before { content: counter(sub, decimal) ". "; color: #8a6a4e; display: none; }
.obj-card .note { color: #6b7a92; font-size: 12.5px; line-height: 1.6; margin-top: 10px; }
.obj-card .note b { color: #ea580c; display: block; font-size: 13px; }
mark.v { background: #fff3a8; color: #8a4b00; font-weight: 800; padding: 0 3px; border-radius: 3px; }
.figure { margin: 6px 0 2px; }
.figure table { border-collapse: collapse; font-size: 13px; }
.figure th, .figure td { border: 1px solid #d9dee8; padding: 5px 10px; text-align: center; }
.figure th { background: #f3f6fb; }
.figure .list-box { display: flex; gap: 0; align-items: center; flex-wrap: wrap; }
.figure .list-box b { margin-right: 8px; font-size: 13px; }
.figure .list-box span { border: 1px solid #8fa0bb; min-width: 34px; padding: 4px 8px; text-align: center; font-weight: 700; }
.fc { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 8px 0; font-size: 12.5px; }
.fc .n { border: 1.5px solid #4b5b75; background: #fff; padding: 6px 12px; text-align: center; max-width: 260px; border-radius: 3px; }
.fc .n.term { border-radius: 999px; padding: 4px 22px; }
.fc .n.io { transform: skewX(-12deg); } .fc .n.io > span { display: inline-block; transform: skewX(12deg); }
.fc .n.dec { background: #fff8e1; border-color: #b7791f; clip-path: none; border-radius: 6px; }
.fc .ar { width: 1.5px; height: 14px; background: #4b5b75; position: relative; }
.fc .ar::after { content: ""; position: absolute; bottom: -2px; left: -3.5px; border: 4px solid transparent; border-top: 5px solid #4b5b75; border-bottom: 0; }
.fc .br { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.fc .br > div { display: flex; flex-direction: column; align-items: center; border: 1px dashed #c8d2e2; border-radius: 8px; padding: 4px 4px 6px; }
.fc .br > div > em { font-style: normal; font-weight: 800; font-size: 11px; color: #2563eb; }
.fc .br > div:last-child > em { color: #dc2626; }
.hint-toggle { color: #286cc7; background: 0 0; border: 0; padding: 8px 0; font-size: 13px; font-weight: 750; }
.hint-box { color: #455a7b; background: #f5f9ff; border: 1px solid #dceafa; border-radius: 9px; padding: 13px; line-height: 1.7; font-size: 13.5px; }
.editor-pane { min-width: 0; border: 1px solid #dce4ef; border-radius: 13px; padding: 12px; box-shadow: 0 8px 30px #122b5410; background: #fff; }
.editor-heading { justify-content: space-between; align-items: center; display: flex; gap: 10px; margin: 2px 4px 10px; }
.editor-heading h2 { color: #122a58; letter-spacing: -.03em; margin: 0; font-size: 16px; }
.editor-heading span { color: #8c99aa; font-size: 12px; }
.editor-frame { width: 100%; height: max(620px, calc(100vh - 250px)); border: 1px solid #e3e9f2; border-radius: 9px; display: block; background: #f7f9fc; }
.editor-actions { align-items: center; gap: 9px; margin-top: 12px; display: flex; flex-wrap: wrap; }
.editor-actions .save-note { margin-left: auto; color: #8a97ab; font-size: 12px; }
.result-panel { border-top: 1px solid #e8edf4; margin-top: 14px; padding-top: 14px; }
.result-empty { color: #8492a7; background: #f8fafd; border-radius: 8px; padding: 18px; font-size: 13px; }
.result-success, .result-failure { color: #176b3b; background: #eef9f2; border-radius: 9px; gap: 13px; padding: 17px; display: flex; }
.result-success h3, .result-failure h3 { margin-bottom: 5px; font-size: 16px; }
.result-success p, .result-failure p { margin: 0; font-size: 13px; line-height: 1.6; }
.result-symbol { color: #fff; background: #2fa369; border-radius: 50%; place-items: center; width: 25px; height: 25px; display: grid; flex: none; }
.result-failure { color: #9f4935; background: #fff4f1; display: block; }
.case-result { color: #65748c; border-bottom: 1px solid #e9edf3; padding: 12px 2px; font-size: 13px; display: flex; gap: 10px; align-items: baseline; }
.case-result:last-child { border-bottom: 0; }
.case-result strong { color: #344c73; min-width: 0; }
.case-result .ok { color: #1c8550; font-weight: 800; }
.case-result .no { color: #c2410c; font-weight: 800; }
.answer-panel { border: 1px solid #d9e8f6; border-radius: 9px; margin-top: 18px; padding: 16px 18px; }
.answer-panel h4 { color: #1c457e; margin: 0 0 10px; font-size: 13px; }
.answer-panel p { color: #405471; line-height: 1.7; font-size: 13.5px; }
.code-lines { background: #0b1f4b; border-radius: 8px; padding: 12px 14px; color: #f4f7ff; font-size: 13px; line-height: 1.9; overflow: auto; }
.code-lines div { white-space: nowrap; }
.code-lines .hat { color: #8ef0b5; font-weight: 800; }
.code-lines .else { color: #9fb6e0; }
.next-button { margin-top: 14px; }
.success-feedback { margin-top: 12px; color: #355; font-size: 13px; }

/* 로그인 */
.auth-wrap { grid-template-columns: minmax(0, 1fr) 430px; align-items: center; gap: 90px; width: min(980px, 100% - 48px); min-height: calc(100vh - 150px); margin: auto; padding: 55px 0; display: grid; }
.auth-aside h1 { color: var(--navy); letter-spacing: -.06em; font-size: 45px; line-height: 1.2; }
.auth-aside p { color: #718099; line-height: 1.8; }
.auth-pattern { background: var(--navy); border-radius: 13px; margin-top: 35px; padding: 24px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.auth-card { border: 1px solid #e3e9f3; border-radius: 16px; padding: 32px; box-shadow: 0 18px 45px #112c5414; }
.auth-card h2 { color: #102a58; letter-spacing: -.04em; margin-bottom: 6px; font-size: 23px; }
.auth-card > p { color: #8390a5; margin-bottom: 25px; font-size: 13px; }
.auth-card form { gap: 16px; display: grid; }
.auth-card input, .auth-card select { height: 46px; }
.auth-card .button { margin-top: 8px; }
.auth-card .field-note { color: #8a96a7; font-weight: 500; font-size: 11.5px; }
.auth-swap { text-align: center; color: #7a879b; margin: 24px 0 0; font-size: 13px; }
.auth-swap a { color: #276ecc; font-weight: 750; }

/* 내 학습 · 순위 */
.stat-row { border: 1px solid #e0e7f1; border-radius: 13px; grid-template-columns: repeat(3, 1fr); margin: 30px 0; display: grid; overflow: hidden; }
.stat-row > div { border-right: 1px solid #e0e7f1; flex-direction: column; gap: 5px; padding: 27px; display: flex; }
.stat-row > div:last-child { border: 0; }
.stat-row strong { color: #0d316d; font-size: 31px; }
.stat-row span { color: #7f8da0; font-size: 12px; }
.progress-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; display: grid; }
.progress-group { border: 1px solid #e0e7f1; border-radius: 12px; padding: 22px; }
.progress-group h2, .recent-section h2 { color: #153363; font-size: 18px; }
.progress-line { color: #63748f; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 12px; margin: 12px 0; font-size: 12px; display: grid; }
.progress-line strong { text-align: right; }
.progress-line a:hover { color: #175bc6; }
.recent-section { margin-top: 36px; }
.recent-section a { color: #354d72; border-bottom: 1px solid #e9edf3; justify-content: space-between; padding: 14px 3px; font-size: 14px; display: flex; gap: 10px; }
.recent-section a span { color: #6686b5; white-space: nowrap; }
.rank-tabs { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.rank-tabs a { border: 1px solid #dce5f1; border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 700; color: #405470; }
.rank-tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.ranking-me { margin-top: 18px; color: #175bc6; font-weight: 750; font-size: 14px; }
.ranking-list { border-top: 2px solid #143062; margin-top: 20px; }
.ranking-row { border-bottom: 1px solid #e6ebf2; grid-template-columns: 50px 1fr 90px 80px 80px; align-items: center; gap: 20px; padding: 18px 13px; display: grid; }
.ranking-row > strong { color: var(--blue); font-size: 20px; }
.ranking-row span { color: #253b5e; font-weight: 700; }
.ranking-row small { color: #7f8da0; font-size: 12px; text-align: right; }
.ranking-head { color: #8a96a7; font-size: 12px; font-weight: 700; padding: 10px 13px; }

/* 관리자 */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 20px; }
.admin-table th, .admin-table td { border-bottom: 1px solid #e6ebf2; padding: 10px 8px; text-align: left; }
.admin-table th { color: #6b7a92; font-size: 12px; }
.admin-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.admin-note { margin: 12px 0 0; color: var(--muted, #667); font-size: 14px; }
.small-btn { border: 1px solid #d5dfef; background: #fff; border-radius: 7px; padding: 5px 10px; font-size: 12px; color: #294574; font-weight: 700; }
.small-btn.danger { color: #b91c1c; border-color: #f2c4c4; }

/* 알림 */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: #0b1f4b; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; font-weight: 650; z-index: 100; box-shadow: 0 12px 30px #0b1f4b40; max-width: calc(100% - 32px); }
.toast.error { background: #b42318; }
.toast.success { background: #137a46; }
.center-message { text-align: center; }
.offline-note { background: #fff8e6; color: #8a5a00; border: 1px solid #f5dfaa; border-radius: 9px; padding: 10px 14px; font-size: 13px; margin: 0 0 16px; }

@media (max-width: 1100px) {
  .solve-grid { grid-template-columns: 1fr; }
  .question-pane { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 900px) {
  .header-inner { gap: 18px; }
  .site-header nav { gap: 16px; }
  .hero { grid-template-columns: 1fr; gap: 36px; min-height: 0; padding-block: 44px; }
  .level-grid, .progress-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .auth-wrap { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 720px) {
  .wrap, .header-inner { width: calc(100% - 32px); }
  .site-header { height: auto; }
  .header-inner { flex-wrap: wrap; gap: 8px 14px; padding: 12px 0; }
  .site-header nav { order: 3; width: 100%; height: 40px; overflow-x: auto; gap: 18px; }
  .header-account { margin-left: auto; }
  .brand small { display: none; }
  .problem-row { grid-template-columns: 70px minmax(0, 1fr) 70px; }
  .problem-row .level-pill, .problem-row .problem-points { display: none; }
  .stat-row { grid-template-columns: 1fr; }
  .stat-row > div { border-right: 0; border-bottom: 1px solid #e0e7f1; }
  .ranking-row { grid-template-columns: 36px 1fr 70px; gap: 10px; }
  .ranking-row .hide-sm { display: none; }
  .editor-frame { height: 640px; }
  .problem-head { flex-direction: column; align-items: flex-start; }
  .page-head h1, .problem-head h1 { font-size: 26px; }
}
