.math-page{margin:0;background:#08131f;color:#d7e5ef;font:15px/1.65 system-ui,'Microsoft YaHei',sans-serif}*{box-sizing:border-box}.math-page a{color:#85e4d3}.math-page button,.math-page input,.math-page select,.math-page textarea{font:inherit}.math-page button{cursor:pointer;background:#173448;color:#d8f1f4;border:1px solid #35566b;border-radius:7px;padding:8px 12px}.math-page button:hover{background:#23536a}.math-page button:disabled{opacity:.45;cursor:default}.math-page button.primary,.math-page button[aria-pressed=true]{background:#82ddca;color:#0b282b;border-color:#82ddca}.math-page input,.math-page select,.math-page textarea{background:#0b1c2b;color:#e0edf6;border:1px solid #3a5267;border-radius:6px;padding:6px;max-width:100%;min-width:0}.math-page input[type=range]{padding:0;accent-color:#80dcca}.math-page input[type=checkbox]{accent-color:#80dcca}.math-page :focus-visible{outline:2px solid #90ecdf;outline-offset:3px}.math-skip{position:absolute;left:10px;top:-100px;z-index:10}.math-skip:focus{top:10px;background:#10273a;padding:10px}.math-shell{display:grid;grid-template-columns:205px minmax(0,1fr)}.math-sidebar{padding:24px 16px;border-right:1px solid #22394d;background:#0b1826}.math-sidebar h2{font-size:15px;margin:28px 10px 12px}.math-sidebar nav{display:grid;gap:7px}.math-sidebar nav a{display:flex;flex-direction:column;text-decoration:none;padding:12px;border-radius:8px;color:#afc5d4;border:1px solid transparent}.math-sidebar nav a small{font-size:10px;letter-spacing:.1em;color:#7190aa}.math-sidebar nav a[aria-current]{background:#183746;border-color:#2c685f;color:#9de8d7}.math-back{font-size:14px;text-decoration:none}.sidebar-note{font-size:12px;color:#6f8aa0;padding:20px 10px}.math-work{padding:26px;min-width:0;max-width:1750px;width:100%;margin:auto}.math-heading{display:flex;gap:20px;justify-content:space-between;align-items:start}.math-heading h1{font-size:29px;margin:5px 0}.math-heading p{margin:5px 0;color:#9eb8ca}.math-heading .math-eyebrow{color:#84dbc9}.math-gallery-link{white-space:nowrap;font-size:12px}.math-eyebrow{color:#7bd9cb;font-size:11px;letter-spacing:.12em;text-transform:uppercase}.math-modes{display:flex;gap:8px;margin:20px 0;flex-wrap:wrap}.math-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start}.math-stage,.math-settings,.math-readout,.math-theory,.math-guide{border:1px solid #284055;background:#0d1e2e;border-radius:12px;overflow:hidden}.math-stage-top{display:flex;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #284055;color:#9ab9cc;font-size:12px}#math-host{height:510px;position:relative;overflow:hidden;background:#07121e}#math-host>canvas{display:block;width:100%;height:100%;touch-action:none}.math-transport{display:flex;gap:8px;flex-wrap:wrap;padding:14px;border-top:1px solid #284055}#math-status{font-size:12px;margin:0;padding:0 16px 14px;color:#98b8cb;overflow-wrap:anywhere}.math-settings{padding:17px;max-height:690px;overflow:auto}.math-settings h2,.math-readout h2,.math-theory h2{font-size:16px;margin-top:0}#math-controls{display:grid;gap:12px;font-size:13px}#math-controls label{display:flex;gap:8px;flex-wrap:wrap;align-items:center}#math-controls label>input:not([type=checkbox]),#math-controls label>select{flex:1;min-width:90px}#math-controls fieldset{border:1px solid #355067;border-radius:8px;min-width:0;padding:10px}#math-controls select,#math-controls textarea{width:100%}#math-controls p{font-size:12px;color:#a3b9c9;overflow-wrap:anywhere}#math-controls button{font-size:12px}#math-controls canvas{max-width:100%;touch-action:none}.math-readout{padding:18px;margin-top:18px;overflow:auto}#math-info{font:13px/1.8 system-ui;overflow-wrap:anywhere}#math-info pre{white-space:pre-wrap;overflow-wrap:anywhere}#math-info table{border-collapse:collapse}#math-info td,#math-info th{border:1px solid #35536a;padding:5px 9px}.math-theory{margin-top:18px;padding:24px;display:grid;grid-template-columns:1fr 1fr;gap:28px}.math-theory p{color:#acc2d1}.math-theory pre{font:16px/1.9 ui-monospace,monospace;white-space:pre-wrap;color:#9ce7d9}.math-guide{padding:18px;margin:0 0 18px}.math-guide[hidden]{display:none}.math-guide small{display:block;color:#91acbf;margin-top:10px}.math-reference{margin:22px 0;color:#90acbf;font-size:13px}.math-reference summary{cursor:pointer}.math-gallery{max-width:1390px;padding:36px;margin:auto}.math-intro{display:grid;grid-template-columns:1.2fr 1fr;gap:30px;align-items:center;min-height:440px;padding:30px 0 55px}.math-intro h1{font-size:22px;color:#a4c9dc;font-weight:400}.math-intro h1 span{margin-left:12px}.math-intro h2{font-size:clamp(32px,4vw,60px);line-height:1.3;margin:22px 0}.math-intro p{color:#a1bccc}.math-enter{display:inline-block;margin-top:14px;padding:14px 22px;border-radius:8px;background:#86e1cd;color:#0b292b!important;text-decoration:none;font-weight:600}.math-intro-note{font-size:12px}.math-art{width:320px;height:320px;position:relative;display:grid;place-items:center;margin:auto;background:radial-gradient(circle,#1c485653,transparent 70%)}.math-art>span{font:italic 110px Georgia;color:#a6eee0;text-shadow:0 0 60px #69ccb5}.math-art>small{position:absolute;bottom:0;color:#7293ab;letter-spacing:.15em}.math-orbit{position:absolute;width:230px;height:230px;border:1px solid #478d9188;transform:rotate(30deg);animation:orbit 45s linear infinite}.math-orbit.second{width:275px;height:275px;border-color:#7b75b37a;animation-direction:reverse}.math-scene-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.math-card{border:1px solid #29485c;border-radius:14px;overflow:hidden;text-decoration:none;background:#102335;transition:transform .2s,border-color .2s}.math-card:hover{transform:translateY(-4px);border-color:#82d6cb}.math-card-visual{height:145px;position:relative;display:grid;place-items:center;background:radial-gradient(ellipse at 60% 30%,#34566c80,transparent 75%),repeating-linear-gradient(60deg,transparent 0 29px,#42758b15 30px 31px)}.math-card-visual>span{font:36px Georgia;color:#a6e9da}.math-card-visual small{position:absolute;top:15px;left:18px;letter-spacing:.14em;font-size:10px;color:#809cad}.visual-1,.visual-4{filter:hue-rotate(35deg)}.visual-2,.visual-5{filter:hue-rotate(300deg)}.math-card-copy{padding:22px}.math-card h2{font-size:22px;color:#e2edf7;margin:10px 0}.math-card-copy>p:not(.math-eyebrow){color:#9ab4c7;font-size:14px;min-height:70px}.math-card strong{font-size:13px}.math-roadmap{margin-top:45px;padding:28px;border-top:1px solid #2c4558}.math-roadmap>div{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}.math-roadmap p{color:#98b4c6;font-size:14px}@keyframes orbit{to{transform:rotate(390deg)}}@media(prefers-reduced-motion:reduce){.math-orbit{animation:none}.math-card{transition:none}}@media(max-width:1100px){.math-shell{grid-template-columns:170px 1fr}.math-grid{grid-template-columns:1fr}.math-settings{max-height:none}.math-scene-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.math-shell{display:block}.math-sidebar{padding:12px;border-right:0}.math-sidebar h2,.sidebar-note{display:none}.math-sidebar nav{display:flex;overflow:auto;margin-top:12px}.math-sidebar nav a{min-width:140px}.math-work{padding:16px}.math-heading{display:block}.math-gallery-link{display:inline-block;margin-top:8px}#math-host{height:460px}.math-theory{grid-template-columns:1fr;padding:18px}.math-gallery{padding:20px}.math-intro{grid-template-columns:1fr;padding-top:0}.math-art{width:260px;height:260px}.math-orbit{width:190px;height:190px}.math-orbit.second{width:235px;height:235px}.math-scene-grid,.math-roadmap>div{grid-template-columns:1fr}.math-heading h1{font-size:25px}.math-transport button{font-size:12px}.math-readout{max-width:100%}}
.math-nav-group{border-bottom:1px solid #233c50;padding:7px 0}.math-nav-group summary{cursor:pointer;color:#b8d7e3;font-size:13px;padding:8px 3px;list-style-position:inside}.math-nav-group summary small{float:right;color:#77b6b7}.math-sidebar nav{display:block}.math-sidebar .math-nav-group a{font-size:13px;padding:8px 10px}.math-search-row{display:flex;align-items:center;gap:20px;flex-wrap:wrap}.math-search-row h2{margin-right:auto}.math-search-row label{display:flex;gap:12px;align-items:center;font-size:13px}.math-search-row input{width:260px}.math-search-row>span{font-size:12px;color:#93b6ca}.math-filters{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 28px}.math-filters button{font-size:12px}.math-card[hidden]{display:none}.math-card-copy>small{display:block;font-size:10px;color:#799daf;margin-top:8px}.math-card-visual>span{font-size:22px;max-width:90%;text-align:center;overflow-wrap:anywhere}.math-card-visual>img{width:100%;height:100%;object-fit:cover;display:block}.math-card-visual:has(img)>small{background:#071321b8;padding:3px 8px;border-radius:4px;color:#bcece2}.math-card-visual:has(img){filter:none}@media(max-width:700px){.math-sidebar nav{display:flex;overflow:auto;gap:12px;align-items:flex-start;max-height:230px}.math-nav-group{flex:0 0 180px}.math-nav-group summary{white-space:nowrap}.math-nav-group a{min-width:0!important}.math-search-row label{width:100%}.math-search-row input{flex:1;width:140px}.math-card-visual{height:185px}}

/* Gallery cards: keep the live-preview image and the textual description in
   separate blocks. This prevents portrait previews from expanding over titles. */
.math-gallery .math-card{display:flex;flex-direction:column;min-width:0}
.math-gallery .math-card-visual{height:210px;min-height:210px;flex:0 0 210px;overflow:hidden}
.math-gallery .math-card-visual>img{position:absolute;inset:0;width:100%!important;height:100%!important;max-width:none;min-width:0;min-height:0;object-fit:cover;object-position:center;flex:none}
.math-gallery .math-card-copy{position:relative;z-index:1;display:flex;flex:1;flex-direction:column;gap:0;padding:20px 22px 22px;background:inherit}
.math-gallery .math-card-copy .math-eyebrow{margin:0 0 8px}
.math-gallery .math-card h2{display:block;visibility:visible;margin:0 0 10px;line-height:1.35}
.math-gallery .math-card-copy>p:not(.math-eyebrow){min-height:0;margin:0 0 18px}
.math-gallery .math-card strong{margin-top:auto}
@media(max-width:700px){.math-gallery .math-card-visual{height:195px;min-height:195px;flex-basis:195px}.math-gallery .math-card-copy{padding:18px}.math-gallery .math-card h2{font-size:21px}}
