:root{--navy:#063370;--navy2:#174e9c;--ink:#091936;--muted:#4b607f;--blue:#1975f3;--light-blue:#eaf4ff;--border:#c7d8f1;--bg:#edf4ff;--good:#137854;--bad:#b83c50}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,"Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--ink)}body{min-height:100vh;display:flex;flex-direction:column}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.topbar{min-height:80px;padding:9px clamp(12px,1.6vw,30px);background:linear-gradient(105deg,#0e4a9a,#072e68 78%);display:flex;align-items:center;justify-content:space-between;gap:18px;color:#fff;box-shadow:0 2px 5px #17366a22;z-index:2}.identity{display:flex;align-items:center;gap:14px;flex-shrink:0}.header-logo{width:96px;height:57px;display:flex;align-items:center;justify-content:center}.header-logo img{width:100%;height:100%;object-fit:contain}.brand{white-space:nowrap}.brand strong{font-size:clamp(21px,2.05vw,34px);font-weight:850;line-height:1.1;letter-spacing:-.8px}.brand-description{font-size:14px;line-height:1.43;border-left:1px solid #a9cbfa;padding-left:20px;color:#e7f2ff;white-space:nowrap;margin-left:7px}.tabs{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}.tab{height:47px;display:flex;align-items:center;justify-content:center;gap:9px;white-space:nowrap;background:#ffffff07;border:1px solid #789cd0;color:#f5f9ff;border-radius:10px;padding:0 13px;font-weight:750;font-size:13px;box-shadow:0 1px 2px #0b285a40;transition:background .15s,border-color .15s}.tab:hover{background:#ffffff20}.tab.active{border:2px solid #49c0ff;background:linear-gradient(125deg,#056acc,#084b9e);box-shadow:0 0 0 2px #4bc9ff12,0 2px 8px #04286280}.tab-icon{font-size:24px;line-height:1;font-weight:400;min-width:20px;text-align:center}
.shell{display:grid;grid-template-columns:minmax(320px,379px) minmax(0,1fr);gap:10px;padding:14px 8px 18px;flex:1;min-height:calc(100vh - 80px - 97px)}.sidebar,.map-frame{border:1px solid var(--border);box-shadow:0 2px 9px #335c8b15;border-radius:16px;background:#fff}.sidebar{padding:20px 14px 17px;min-width:0;overflow:auto;max-height:calc(100vh - 80px - 109px);scrollbar-width:thin}.panel{width:100%}.section-intro{padding:0 10px 18px}.section-title{display:flex;align-items:center;gap:12px}.section-title h1{font-size:26px;letter-spacing:-.8px;margin:0;font-weight:850}.book-icon{width:34px;height:34px;color:#2186f6;flex-shrink:0}.section-symbol{font-size:34px;color:var(--blue)}.section-intro p{margin:12px 0 0;font-size:16px;line-height:1.46;color:#182d50}.search-wrap{position:relative;margin-bottom:18px}.search-icon{position:absolute;left:13px;top:7px;font-size:29px;color:#365c91;line-height:1;pointer-events:none}.search{width:100%;min-height:45px;background:#fff;border:1px solid #b7cae6;box-shadow:0 1px 2px #a1b9d420;border-radius:11px;padding:11px 13px;outline:0;color:#14294c;font-size:14px}.search-wrap .search{padding-left:45px}.search:focus,.select:focus{border-color:#4096ff;box-shadow:0 0 0 3px #2286ff1a}.search::placeholder{color:#526a91}.study-card{border:1px solid #c6daf3;border-radius:13px;overflow:hidden;background:linear-gradient(150deg,#edf5ff,#fff);margin-bottom:20px;min-height:170px}.study-card.open{box-shadow:0 1px 3px #87a9d420}.study-empty{padding:26px 18px;font-size:14px;color:#6c7f9c;line-height:1.6}.study-card-header{display:flex;align-items:center;gap:12px;padding:12px 13px 11px;background:linear-gradient(105deg,#dfedff,#f1f7ff)}.study-card-header h3{font-size:18px;margin:0;line-height:1.28;letter-spacing:-.25px}.study-code{display:grid;place-items:center;min-width:60px;height:50px;padding:0 7px;border-radius:12px;background:linear-gradient(145deg,#2389ff,#0962d8);color:#fff;box-shadow:0 2px 5px #2069cb39;font-size:27px;font-weight:850}.study-facts{padding:4px 13px 10px;margin:0}.study-facts div{display:grid;grid-template-columns:50% 50%;align-items:start;gap:4px;border-bottom:1px solid #c8d7ea;padding:9px 0;font-size:13.5px}.study-facts div:last-child{border:0}.study-facts dt{font-weight:700;color:#213657}.study-facts dd{margin:0;color:#0a1831;overflow-wrap:anywhere}.options-card{border:1px solid #bdd1ed;border-radius:13px;overflow:hidden;background:linear-gradient(115deg,#fff,#f5f9ff);box-shadow:0 1px 4px #c9daef36}.option-row{min-height:54px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 13px;font-weight:650;font-size:14px;line-height:1.3;cursor:pointer}.option-row+.option-row{border-top:1px solid #d4e1f5}.option-label{display:flex;align-items:center;gap:11px}.option-icon{color:#143a79;font-size:24px;min-width:25px;text-align:center}.switch{appearance:none;-webkit-appearance:none;position:relative;width:46px;height:26px;background:#b6c5da;border-radius:20px;border:1px solid #b0bed3;flex-shrink:0;cursor:pointer;transition:background .2s}.switch:checked{background:linear-gradient(100deg,#448eff,#0968e7);border-color:#1971f4}.switch:after{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #10254c45;transition:transform .2s}.switch:checked:after{transform:translateX(19px)}.switch:focus-visible{outline:3px solid #84baff;outline-offset:2px}
.btn{border:1px solid transparent;border-radius:10px;padding:11px 13px;min-height:43px;font-weight:750;font-size:14px;transition:background .16s,filter .16s;display:inline-flex;gap:10px;align-items:center;justify-content:center}.btn:hover:not(:disabled){filter:brightness(.97)}.btn.primary{background:linear-gradient(115deg,#2286fb,#0961d5);color:#fff}.btn.secondary{background:linear-gradient(115deg,#e1e8f4,#f1f5fc);border-color:#c9d5eb;color:#153167}.btn.outline{background:linear-gradient(#fff,#f5f9ff);border:1px solid #8bb0ed;color:#163a79}.reset-selection,.toggle-list{display:flex;width:100%;margin-top:25px;min-height:52px}.reset-selection span,.toggle-list span{font-size:23px;line-height:1}.toggle-list{margin-top:28px}.region-list{margin-top:10px;max-height:255px;overflow:auto;border:1px solid #cbd9ef;border-radius:10px}.region-item{display:flex;gap:10px;width:100%;text-align:left;align-items:center;padding:8px 11px;border:0;border-bottom:1px solid #e4edf9;background:#fff;color:#273d60;font-size:13px}.region-item:hover,.region-item.active{background:#edf5ff}.region-item:last-child{border:0}.region-code{display:grid;place-items:center;min-width:34px;height:28px;border-radius:7px;background:#e2efff;color:#1562c5;font-weight:800}.region-item span:last-child{line-height:1.35}.extra-settings,.details{font-size:12px;color:#58708e;line-height:1.5;border-top:1px solid #e1e9f3;margin-top:22px;padding:15px 6px 2px}.extra-settings summary,.details summary{cursor:pointer;font-weight:750;color:#5372a1}.checkline{display:flex;gap:8px;align-items:center;margin:12px 0;cursor:pointer}.checkline input{accent-color:var(--blue);height:17px;width:17px}.action-grid{display:flex;gap:6px;margin-top:13px}.action-grid .btn{font-size:12px;flex:1;min-height:38px;padding:8px 6px}
.field-label{display:block;font-size:13px;font-weight:750;color:#3b557c;margin:18px 0 9px}.select{width:100%;min-height:44px;border:1px solid #bed0e7;border-radius:10px;background:#fff;color:#15345d;padding:9px 12px;outline:none}.muted{font-size:13px;color:#617896;line-height:1.55}.small{margin-top:15px}.wide{width:100%;margin-top:14px}.quiz-metrics{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:#526b91}.quiz-metrics strong{color:#147b5b}.progress{height:8px;background:#e6eefb;border-radius:10px;overflow:hidden;margin:11px 0}.progress span{display:block;width:0;height:100%;background:linear-gradient(90deg,#2275e8,#55b6fa);transition:width .2s}.question{margin:22px 0;background:#edf5ff;border:1px solid #c9ddfa;border-radius:14px;text-align:center;padding:23px 12px}.question strong{display:block;font-size:50px;color:#154ea4;overflow-wrap:anywhere;line-height:1.3}.question strong.is-name{font-size:25px}.question p{font-size:13px;color:#506d93;margin:5px 0 0}.eyebrow{letter-spacing:.08em;font-size:10px;color:#4e78a7;font-weight:850}.answer-row{display:flex;gap:8px}.answer-row input{min-width:0;flex:1}.feedback{padding:14px;border-radius:10px;font-size:13px;line-height:1.5}.feedback.good{background:#e5f7ef;color:#146b4b}.feedback.bad{background:#fff1ee;color:#9c4050}.result-big{font-size:60px;font-weight:850;color:#1469e8;margin-top:10px}.summary-card{padding:17px;margin-top:24px;border-radius:12px;background:#ecf5ff;border:1px solid #cbdffa;color:#345275;font-size:15px;line-height:1.6}
.map-area{min-width:0;display:flex;flex-direction:column;gap:7px}.map-frame{position:relative;flex:1;min-height:480px;overflow:hidden;background:radial-gradient(ellipse at 50% 42%,#fff 20%,#f4faff 80%,#eaf3ff 100%);touch-action:none;overscroll-behavior:contain;isolation:isolate}.map-frame svg{position:absolute;inset:0;width:100%;height:100%;display:block;user-select:none;touch-action:none;cursor:grab}.map-frame svg.dragging{cursor:grabbing}.region{fill:#d7e9ff;stroke:#263e62;stroke-width:1.35;vector-effect:non-scaling-stroke;cursor:pointer;transition:fill .12s,stroke .12s}.map-frame:not(.disable-hover) .region:hover{fill:#a6cefa!important;stroke:#1175e5;stroke-width:2.1}.region.selected,.map-frame:not(.disable-hover) .region.selected:hover{fill:#176dea!important;stroke:#E73C43;stroke-width:3.6}.region.correct,.map-frame:not(.disable-hover) .region.correct:hover{fill:#28ad82!important;stroke:#086a4c;stroke-width:3}.region.wrong,.map-frame:not(.disable-hover) .region.wrong:hover{fill:#f07b89!important;stroke:#ae354b;stroke-width:3}.region.target,.map-frame:not(.disable-hover) .region.target:hover{fill:#1779ed!important;stroke:#ffc400;stroke-width:3.5}.map-label{font-size:14px;font-weight:850;fill:#0d1d37;stroke:#ffffff;stroke-width:3px;stroke-linejoin:round;paint-order:stroke;pointer-events:none;text-anchor:middle;dominant-baseline:middle}.map-label.text-name{font-size:11px}.map-label.highlight{fill:#fff;stroke:#1259bf;stroke-width:2.5}.hit-area{stroke:none;pointer-events:all}.hit-area:hover{fill:#008aff33!important}
.map-controls{position:absolute;z-index:5;top:15px;right:16px;display:flex;gap:14px;align-items:center}.map-control,.scale-buttons{height:41px;border:1px solid #bed0eb;border-radius:10px;background:#ffffffeb;box-shadow:0 2px 6px #2a548824;color:#16335e;font-weight:750}.map-control{padding:0 13px;font-size:13px}.home-btn span{font-size:24px;line-height:1;margin-right:5px;vertical-align:-2px}.scale-buttons{display:flex;align-items:center;overflow:hidden}.scale-buttons button{border:0;background:transparent;color:#123b82;width:42px;height:100%;font-size:24px;line-height:1}.scale-buttons button:hover,.map-control:hover{background:#e9f3ff}.scale-buttons span{font-size:13px;min-width:68px;text-align:center}.map-status{position:absolute;top:16px;left:20px;z-index:2;display:none;pointer-events:none}.map-status strong{font-size:14px}.map-status span{font-size:12px}.map-tooltip{position:absolute;z-index:10;padding:9px 12px;background:#173c79;color:#fff;border-radius:9px;box-shadow:0 3px 15px #0b387545;font-size:12px;pointer-events:none;max-width:235px}.map-tooltip b{display:block}.map-tooltip span{font-size:11px;color:#d9e6ff}.map-tip{position:absolute;left:17px;bottom:13px;color:#547093;font-size:11px;pointer-events:none;background:#f7fbffce;padding:6px 9px;border-radius:7px}.map-meta{display:flex;justify-content:space-between;gap:12px;padding:0 8px;color:#8092ad;font-size:10px}.loadnotice{position:absolute;top:49%;left:50%;transform:translate(-50%,-50%);background:#ffffffed;color:#475e7d;padding:18px 24px;border:1px solid #cbdff7;border-radius:14px;box-shadow:0 9px 30px #15386820;font-size:13px;text-align:center;max-width:min(88%,460px);line-height:1.55;z-index:9}.loadnotice strong{display:block;color:#1255a3;margin-bottom:6px}
.project-credit{min-height:68px;margin:0 12px 13px;border:1px solid #d8e6fb;border-radius:14px;display:flex;align-items:center;justify-content:center;gap:14px;background:linear-gradient(115deg,#d2e3fa,#b9d3f6 55%,#d7e7fc);font-size:clamp(13px,1.2vw,19px);font-weight:750;line-height:1.4;color:#102c64;text-align:center;padding:10px 22px}.project-credit strong{font-weight:850}.credit-emoji{font-size:34px;flex-shrink:0}
@media(max-width:1460px){.brand strong{font-size:25px}.header-logo{width:73px}.brand-description{font-size:12px;padding-left:13px;margin-left:2px}.topbar{gap:8px}.tabs{gap:5px}.tab{font-size:11.5px;padding:0 10px;gap:6px}.tab-icon{font-size:20px}.shell{grid-template-columns:335px minmax(0,1fr)}.section-title h1{font-size:23px}}
@media(max-width:1100px){.topbar{flex-wrap:wrap;padding:11px 15px;min-height:115px}.tabs{width:100%;justify-content:flex-start;overflow:auto;scrollbar-width:thin}.tab{flex-shrink:0;height:39px}.shell{min-height:calc(100vh - 115px - 90px);grid-template-columns:310px minmax(0,1fr)}.sidebar{max-height:calc(100vh - 115px - 108px)}.map-controls{gap:6px}.home-btn{font-size:12px}.scale-buttons span{min-width:51px}}
@media(max-width:780px){.topbar{gap:8px}.brand strong{font-size:23px}.brand-description{font-size:11px}.header-logo{width:60px;height:46px}.shell{display:flex;flex-direction:column;min-height:0}.sidebar{max-height:none;overflow:visible}.map-frame{height:clamp(370px,65vw,640px);flex:none}.map-status{display:none}.map-controls{top:10px;right:10px}.map-tip{font-size:10px}.project-credit{margin:1px 8px 10px;padding:14px;font-size:12px}.credit-emoji{font-size:26px}}
@media(max-width:450px){.brand-description{display:none}.identity{gap:8px}.brand strong{font-size:23px}.map-controls{transform:scale(.86);transform-origin:top right}.map-tip{max-width:230px}.section-title h1{font-size:23px}}

/* Высота панели без нижнего блока авторства */
@media (min-width: 1101px) {
  .sidebar {
    max-height: calc(100vh - 112px);
  }
}

@media (min-width: 781px) and (max-width: 1100px) {
  .sidebar {
    max-height: calc(100vh - 147px);
  }
}

.tabs .tab svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    flex-shrink: 0;
}

/* Кнопка "Весь вид" */
#resetView {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;

    min-width: 135px;
    height: 42px;
    padding: 0 14px;
    box-sizing: border-box;
    white-space: nowrap;
}

/* Принудительно сбрасываем позиционирование SVG */
#resetView svg {
    position: static !important;
    inset: auto !important;
    transform: none !important;

    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0 !important;
    padding: 0 !important;
    align-self: center;
    vertical-align: middle;
}

.select {
    appearance: none;
    -webkit-appearance: none;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23153a70' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;

    /* Расположение стрелки */
    background-position: right 15px top calc(50% + 2px);
    background-size: 16px;

    padding-right: 42px;
}