html,body{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}@-ms-viewport{width:device-width}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}pre,code,kbd,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;text-align:left;caption-side:bottom}input,button,select,optgroup,textarea{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;max-width:100%;margin-bottom:.5em;padding:0;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6}:root{--oi-border: #e5e7eb;--oi-bg-soft: #f5f7fa;--oi-code-bg: #1e1e1e}.app-header{position:sticky;top:0;z-index:100;display:flex;align-items:center;background:#fff!important;border-bottom:1px solid var(--oi-border);padding:0 24px!important;height:64px;line-height:normal}.app-header-inner{display:flex;align-items:center;gap:24px;width:100%;max-width:1680px;margin:0 auto}.brand{display:flex;align-items:baseline;gap:8px;cursor:pointer;flex-shrink:0}.brand-icon{color:#1677ff;font-size:20px}.brand-name{font-size:20px;font-weight:700;letter-spacing:.5px}.brand-slogan{color:#8c8c8c;font-size:12px}.app-menu{flex:1 1 auto;min-width:320px;overflow:hidden;border-bottom:none!important;background:transparent!important}.app-header-right{flex-shrink:0}.language-switch .python-switch-active{background:#722ed1;border-color:#722ed1;box-shadow:none}.language-switch .python-switch-active:hover,.language-switch .python-switch-active:focus{background:#531dab!important;border-color:#531dab!important}.language-switch .java-switch-active{background:#fa8c16;border-color:#fa8c16;box-shadow:none}.language-switch .java-switch-active:hover,.language-switch .java-switch-active:focus{background:#d46b08!important;border-color:#d46b08!important}.language-switch .pro-switch-active{background:#d4380d;border-color:#d4380d;box-shadow:none}.language-switch .pro-switch-active:hover,.language-switch .pro-switch-active:focus{background:#ad2102!important;border-color:#ad2102!important}.header-stat{font-size:12px;color:#595959}@media(max-width:1280px){.brand-slogan{display:none}}@media(max-width:1080px){.header-stat{display:none}}@media(max-width:760px){.language-switch .ant-btn{padding-inline:8px;font-size:12px}}.app-content{padding:20px 24px 8px}.page{max-width:1320px;margin:0 auto}.app-footer{text-align:center;background:transparent!important;padding:12px 24px!important}.hero-card{background:linear-gradient(135deg,#f0f7ff,#fff 60%);border:1px solid #e6f0ff}.python-hero-card{position:relative;overflow:hidden;background:radial-gradient(circle at 88% 18%,rgba(250,173,20,.17),transparent 25%),radial-gradient(circle at 76% 104%,rgba(114,46,209,.13),transparent 34%),linear-gradient(135deg,#f8f5ff,#fff 65%);border:1px solid #e7dcff;box-shadow:0 12px 30px #5220a412}.python-hero-card:after{content:"Py";position:absolute;right:28px;bottom:-42px;color:#722ed10f;font-family:Georgia,serif;font-size:170px;font-weight:700;line-height:1;pointer-events:none}.java-hero-card{position:relative;overflow:hidden;background:radial-gradient(circle at 88% 16%,rgba(250,140,22,.16),transparent 26%),radial-gradient(circle at 74% 104%,rgba(212,107,8,.1),transparent 34%),linear-gradient(135deg,#fff8ef,#fff 65%);border:1px solid #ffe1bd;box-shadow:0 12px 30px #d46b0812}.java-hero-card:after{content:"Jv";position:absolute;right:28px;bottom:-42px;color:#fa8c1614;font-family:Georgia,serif;font-size:170px;font-weight:700;line-height:1;pointer-events:none}.pro-hero-card{position:relative;overflow:hidden;background:radial-gradient(circle at 88% 16%,rgba(212,56,13,.14),transparent 26%),radial-gradient(circle at 72% 104%,rgba(173,33,2,.1),transparent 34%),linear-gradient(135deg,#fff5f2,#fff 65%);border:1px solid #ffd8cc;box-shadow:0 12px 30px #ad210212}.pro-hero-card:after{content:"{ }";position:absolute;right:20px;bottom:-34px;color:#d4380d12;font-family:Consolas,monospace;font-size:150px;font-weight:700;line-height:1;pointer-events:none}.pro-luogu-block{margin-top:8px;padding:8px 10px;border:1px dashed #ffbb96;border-radius:8px;background:#fff7f3;font-size:12px;line-height:1.7}.luogu-hero-card{position:relative;overflow:hidden;background:radial-gradient(circle at 88% 16%,rgba(22,119,255,.14),transparent 26%),radial-gradient(circle at 72% 104%,rgba(19,194,194,.1),transparent 34%),linear-gradient(135deg,#f2f8ff,#fff 65%);border:1px solid #cfe4ff;box-shadow:0 12px 30px #1677ff12}.luogu-hero-card:after{content:"洛谷";position:absolute;right:20px;bottom:-20px;color:#1677ff12;font-size:96px;font-weight:700;line-height:1;pointer-events:none}.luogu-status-card{height:100%}.luogu-panel{padding:10px 12px;border:1px solid #d6e4ff;border-radius:8px;background:#f7faff}.luogu-panel .luogu-result{padding:8px 10px;border:1px solid #b7eb8f;border-radius:6px;background:#f6ffed}.luogu-panel .ant-table-wrapper{background:#fff;border-radius:6px}.luogu-bookmarklet{display:inline-block;padding:6px 16px;border:1px solid #1677ff;border-radius:8px;background:#e6f4ff;color:#0958d9;font-weight:600;cursor:grab;-webkit-user-select:none;user-select:none}.luogu-bookmarklet:hover{background:#bae0ff;color:#003eb3}.python-eyebrow{display:block;margin-bottom:7px;color:#722ed1;font-size:11px;font-weight:700;letter-spacing:.11em}.python-hero-card .ant-typography,.python-hero-card .ant-row{position:relative;z-index:1}.python-hero-stats{padding:14px 16px 10px;border:1px solid rgba(114,46,209,.11);border-radius:12px;background:#ffffffab;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.python-hero-stats .ant-statistic-title{color:#7a6d88;font-size:12px}.python-hero-stats .ant-statistic-content{font-size:25px}.python-progress-caption{display:block;margin-top:5px;color:#8c7a9e;font-size:12px}.python-section-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin:26px 0 14px}.python-section-heading .python-eyebrow{margin-bottom:2px}.python-section-heading .ant-typography{margin:0}.python-stage-card{position:relative;overflow:hidden;min-height:218px;border-color:#ece8f4;background:linear-gradient(160deg,#fff,#fcfbff)}.python-stage-card:before{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,#722ed1,#b37feb 56%,#ffd666);opacity:0;transition:opacity .15s ease}.python-stage-card:hover:before{opacity:1}.python-stage-number{display:inline-flex;align-items:center;justify-content:center;width:34px;height:28px;border-radius:8px;background:#f1ebff;color:#722ed1;font-family:JetBrains Mono,Consolas,monospace;font-size:12px;font-weight:700}.python-stage-title{display:block;margin-top:13px;font-size:16px}.python-stage-subtitle{margin:4px 0 8px!important;min-height:auto!important}.python-stage-focus{display:block;min-height:38px;margin-bottom:11px;color:#80758d;font-size:12px;line-height:1.65}.python-stage-hero{border:1px solid #e7dcff;background:linear-gradient(120deg,#faf7ff,#fff 64%)}.python-stage-progress{display:flex;flex-direction:column;align-items:center;gap:8px;color:#7a6d88;font-size:12px}.python-problem-list{border:1px solid #eeebf3;background:#fdfcff}.python-problem-row{position:relative;overflow:hidden;border-color:#eeebf3;transition:border-color .15s ease,transform .15s ease,box-shadow .15s ease}.python-problem-row:before{content:"";position:absolute;left:0;top:12px;bottom:12px;width:3px;border-radius:0 4px 4px 0;background:#d3adf7;opacity:0}.python-problem-row.is-unlocked:hover{border-color:#d3adf7;box-shadow:0 6px 16px #5220a414}.python-problem-row.is-unlocked:hover:before{opacity:1}.python-problem-index{color:#9a8bab;font-family:JetBrains Mono,Consolas,monospace;font-size:12px;font-weight:700}.python-problem-page .problem-desc-card{border-top:3px solid #9254de}.python-problem-page .problem-desc-card .ant-typography h2{color:#531dab}.python-problem-page .problem-right>.ant-alert:first-child{border-color:#d3adf7;background:#faf7ff}.python-problem-page .editor-wrapper{border-color:#3b3150;box-shadow:0 6px 18px #1f182d1c}.python-problem-page .testcase-panel .ant-table-thead>tr>th{background:#faf7ff;color:#59436c}@media(max-width:768px){.python-section-heading{align-items:start;flex-direction:column;margin-top:22px}.python-hero-stats{padding:12px}.python-stage-card{min-height:0}}.stage-card{height:100%;transition:transform .15s ease,box-shadow .15s ease}.stage-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px #1677ff1f}.problem-page{display:grid;grid-template-columns:minmax(340px,33%) minmax(0,1fr);gap:16px;align-items:start;max-width:1680px;margin:0 auto}.problem-left{position:sticky;top:84px;max-height:calc(100vh - 104px);overflow:auto;padding-right:4px}.problem-right{min-width:0}@media(max-width:1100px){.problem-page{grid-template-columns:minmax(0,1fr)}.problem-left{position:static;max-height:none}}.editor-wrapper{margin-top:12px;border:1px solid #303030;border-radius:8px;overflow:hidden}.markdown-body{font-size:14px;line-height:1.75;color:#262626;word-break:break-word}.markdown-body>*:first-child{margin-top:0}.markdown-body h3{font-size:15px;font-weight:600;margin:20px 0 8px;padding-left:10px;border-left:3px solid #1677ff;line-height:1.4}.problem-desc-card .markdown-body h2{margin:24px 0 10px;padding-left:10px;border-left:3px solid #1677ff;color:#1f1f1f;font-size:17px;font-weight:650;line-height:1.4;scroll-margin-top:96px}.problem-desc-card .markdown-body h2:first-child{margin-top:0}.markdown-body h4{font-size:14px;font-weight:600;margin:16px 0 6px}.markdown-body p{margin:8px 0}.markdown-body ul,.markdown-body ol{margin:8px 0;padding-left:22px}.markdown-body li{margin:4px 0}.markdown-body strong{color:#0958d9}.markdown-body code{background:#f2f4f7;border:1px solid #e6e8eb;border-radius:4px;padding:1px 5px;font-family:JetBrains Mono,Consolas,Courier New,monospace;font-size:12.5px;color:#c41d7f}.markdown-body pre{background:#f7f8fa;border:1px solid #e6e8eb;border-radius:8px;padding:12px 14px;overflow:auto;margin:10px 0}.markdown-body pre code{background:transparent;border:none;padding:0;color:#1f1f1f;font-size:12.5px;line-height:1.6}.markdown-body table{width:100%;border-collapse:collapse;margin:10px 0;font-size:13px}.markdown-body th,.markdown-body td{border:1px solid #e6e8eb;padding:6px 10px;text-align:left}.markdown-body th{background:#fafafa;font-weight:600}.markdown-body blockquote{margin:10px 0;padding:6px 12px;border-left:3px solid #d9d9d9;background:#fafafa;color:#595959}.markdown-body hr{border:none;border-top:1px solid #eee;margin:16px 0}.output-panel{min-height:120px}.panel-placeholder{display:flex;align-items:center;justify-content:center;min-height:160px}.output-block{margin-top:12px}.output-block-title{font-size:12px;color:#8c8c8c;margin-bottom:4px}.output-pre{background:#fafafa;border:1px solid var(--oi-border);border-radius:8px;padding:10px 12px;margin:0;max-height:260px;overflow:auto;font-family:JetBrains Mono,Consolas,Courier New,monospace;font-size:12.5px;line-height:1.6;white-space:pre-wrap;word-break:break-word}.output-pre-error{background:#fff2f0;border-color:#ffccc7;color:#a8071a}.compare-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-top:8px}.diagnostic-line{display:flex;gap:8px;align-items:baseline;padding:4px 6px;border-radius:6px;cursor:pointer;font-size:13px}.diagnostic-line:hover{background:#fff2f0}.compiler-warnings{margin-top:12px;font-size:12px;color:#8c8c8c}.compiler-warnings summary{cursor:pointer}.solution-pre{background:#282c34;color:#abb2bf;border-color:#1f2329;max-height:60vh;font-size:13px}.guide-page{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:16px;align-items:start;max-width:1320px;margin:0 auto}.guide-side{position:sticky;top:84px}@media(max-width:1100px){.guide-page{grid-template-columns:minmax(0,1fr)}.guide-side{display:none}}.guide-page .markdown-body{font-size:15px;line-height:1.85}.guide-page .markdown-body h2{font-size:18px;margin:28px 0 10px;padding-bottom:6px;border-bottom:1px solid #eee;scroll-margin-top:90px}.guide-page .markdown-body blockquote{border-left:3px solid #91caff;background:#f0f7ff;color:#3f4b5b}.beginner-tips{margin-top:12px;background:#fffbe6;border-color:#ffe58f}.beginner-tips .ant-card-head{min-height:40px;border-bottom-color:#ffe58f;color:#874d00;font-weight:600}.beginner-tip+.beginner-tip{margin-top:10px;padding-top:10px;border-top:1px dashed #ffe58f}.beginner-tip-title{font-size:13px;font-weight:600;color:#874d00}.beginner-tip-detail{margin:6px 0 0;padding:0;background:transparent;border:none;font-family:inherit;font-size:12.5px;line-height:1.7;color:#614700;white-space:pre-wrap}.developer-panel{border:1px dashed #d3adf7;background:#fcfaff}.developer-panel .ant-card-head{min-height:40px;border-bottom-color:#efdbff;color:#531dab}.developer-panel .ant-descriptions-item-label{width:84px;font-size:12px}.developer-panel .ant-descriptions-item-content{font-size:12px}.testcase-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;flex-wrap:wrap}.case-detail{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;font-size:12px}.case-detail .output-pre{max-height:140px;margin-top:4px}@media(max-width:600px){.app-header{height:56px;padding:0 12px!important}.app-header-inner{gap:8px}.brand{gap:5px}.brand-icon,.brand-name{font-size:17px}.app-menu,.header-progress,.brand-slogan{display:none}.app-header-right{margin-left:auto}.language-switch .ant-btn{height:30px;padding-inline:7px;font-size:11px}.app-content{padding:12px 12px 6px}.app-footer{padding:12px!important}.app-footer .ant-space{justify-content:center}.hero-card .ant-card-body{padding:20px}.hero-card h2{font-size:24px;line-height:1.35;word-break:normal}.hero-card .ant-typography{font-size:14px!important}.hero-card .ant-btn{margin-bottom:2px}.hero-card .ant-statistic-content{font-size:22px}.page>.ant-card .ant-input-affix-wrapper{width:100%!important}.page>.ant-card .ant-select{width:140px!important}.stage-card{min-height:0}.problem-page{gap:12px}.problem-left{padding-right:0}.problem-desc-card .ant-card-body{padding:18px}.problem-desc-card .ant-typography h2{font-size:17px}.editor-toolbar{gap:8px!important}.editor-toolbar>.ant-space-item{max-width:100%}.editor-toolbar .ant-btn{padding-inline:6px;font-size:12px}.editor-toolbar .ant-space{gap:5px!important}.editor-wrapper>div{height:300px!important}.panel-placeholder{min-height:140px;padding:0 12px;text-align:center}.testcase-panel .ant-table-wrapper,.page .ant-table-wrapper{overflow-x:auto;-webkit-overflow-scrolling:touch}.testcase-panel .ant-table,.page .ant-table{min-width:680px}.testcase-panel .ant-table-cell,.page .ant-table-cell{white-space:nowrap}.case-detail{grid-template-columns:1fr}.guide-page .ant-card-body{padding:18px}.guide-page .markdown-body{font-size:14px}}
