body[data-surface=mini] .reader-point-tools>.reader-map-open{display:inline-flex;align-items:center;justify-content:center;flex-direction:column;gap:1px;flex:none;width:44px;height:44px;min-width:44px;min-height:44px;padding:4px;border:0;border-radius:10px;background:transparent;color:var(--reader-ink,#526c80);cursor:pointer}
body[data-surface=mini] .reader-point-tools>.reader-map-open svg{width:22px;height:22px;flex:none}
.reader-map-open:focus-visible{outline:2px solid #2865dc;outline-offset:-2px}.reader-map-open:active{background:#e7effb!important}
@media(hover:hover){.reader-map-open:hover{color:#2865dc!important;background:#edf5ff!important}}
@media(max-height:700px){body[data-surface=pc] .reader-desktop-rail{top:calc(50% + 60px);gap:8px;max-height:calc(100dvh - 160px)}body[data-surface=pc] .reader-desktop-rail button,body[data-surface=pc] .reader-desktop-rail .dr-resource-icon{width:52px;height:52px;min-height:52px;flex:none}body[data-surface=pc] .reader-desktop-rail :is(.reader-point-tools,.reader-resource-actions){gap:8px}}

body[data-surface=mini] .reader-point-tools>.reader-map-open span{font-size:10px;line-height:12px;white-space:nowrap}

body.reader-map-context[data-view=mindmap] .kg-viewport{height:var(--reader-map-height,420px);min-height:0}
body.reader-map-context .kg-canvas-help{display:none}

body[data-surface=mini].reader-map-context .kg-mind-topic text:not(.kg-mind-state){font-size:16px}

/* Keep the original XMind canvas; only the surrounding mobile controls change. */
body[data-surface=mini].rm-map-active #note-launcher-slot{display:none}
body[data-surface=mini].rm-map-active .kg-workspace{padding:0!important;margin:0!important;max-width:none!important}
body[data-surface=mini].rm-map-active .kg-toolbar{display:flex;align-items:center;margin:0 0 12px;gap:10px}
body[data-surface=mini].rm-map-active .kg-toolbar>.kg-select{display:flex;align-items:center;gap:12px;margin:0;width:100%;font-size:13px;color:oklch(50% .035 250)}
body[data-surface=mini].rm-map-active .kg-select select{min-width:0;min-height:44px;flex:1;font:inherit;font-size:15px}
body[data-surface=mini].rm-map-active .kg-layout{margin:0}
body[data-surface=mini].rm-map-active .kg-canvas{position:relative;padding:0!important;border-radius:16px;overflow:hidden}
body[data-surface=mini].rm-map-active .kg-viewport{height:var(--reader-map-height,520px)!important;min-height:0!important;border:0;border-radius:16px}
body[data-surface=mini].rm-map-active .kg-diagram-tools{position:absolute;right:10px;bottom:10px;z-index:2;display:flex;flex-wrap:nowrap;justify-content:center;gap:0;margin:0;padding:3px;border:1px solid oklch(90% .02 250);border-radius:13px;background:oklch(99.5% .003 250);box-shadow:0 3px 14px #294c7410}
body[data-surface=mini].rm-map-active .rm-canvas-tool{display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:9px;background:transparent;color:oklch(46% .055 250);cursor:pointer}
body[data-surface=mini].rm-map-active .rm-canvas-tool svg{width:20px;height:20px}
body[data-surface=mini].rm-map-active .rm-canvas-tool:hover{background:oklch(95% .022 250)}body[data-surface=mini].rm-map-active .rm-canvas-tool:active{background:oklch(92% .035 250)}body[data-surface=mini].rm-map-active .rm-canvas-tool:focus-visible{outline:2px solid oklch(53% .17 260);outline-offset:-2px}
body[data-surface=mini].rm-map-active .kg-canvas-help{display:none}
body[data-surface=mini] .reader-mobile-dock>.reader-map-open{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;padding:8px 0;border:0;background:transparent;color:inherit;min-height:52px;min-width:44px;font:inherit;cursor:pointer}body[data-surface=mini] .reader-mobile-dock>.reader-map-open svg{width:24px;height:24px;stroke-width:1.75}body[data-surface=mini] .reader-mobile-dock>.reader-map-open span{font-size:11px;line-height:1.4}
body[data-surface=mini] .dr-reader #reader-options.u-panel-open{display:flex!important;flex-direction:column;position:fixed!important;inset:auto 0 0!important;top:auto!important;z-index:80!important;max-height:70dvh!important;width:100%!important;box-sizing:border-box;border:0!important;border-radius:24px 24px 0 0!important;background:oklch(99.5% .003 250)!important;padding-bottom:env(safe-area-inset-bottom,0px)}.rm-options-body{padding:12px 22px 24px;overflow:auto}.rm-options-body fieldset{border:0;margin:0 0 22px;padding:0}.rm-options-body legend{font-size:14px;font-weight:600;color:oklch(42% .045 250);margin-bottom:10px}.rm-options-body fieldset>div{display:flex;gap:12px}.rm-options-body button{min-height:48px;display:flex;align-items:center;justify-content:center;gap:8px;flex:1;border:1px solid oklch(89% .025 250);border-radius:11px;background:oklch(98% .007 250);color:oklch(45% .06 250);font:inherit;font-size:14px;cursor:pointer}.rm-options-body button[aria-pressed=true]{background:oklch(93% .035 250);border-color:oklch(68% .12 255);color:oklch(46% .16 260)}.rm-options-body button:focus-visible{outline:2px solid oklch(55% .17 260);outline-offset:2px}.rm-options-body i{width:20px;height:20px;border:1px solid oklch(85% .015 250);border-radius:50%}.rm-paper-normal{background:oklch(98% .007 250)}.rm-paper-warm{background:oklch(96% .04 85)}

body[data-surface=mini] .reader-mobile-dock button>svg{width:24px;height:24px;flex:none;stroke-width:1.75}body[data-surface=mini] .reader-mobile-dock [data-reader=font]>b{font-size:24px;line-height:24px;min-height:24px}

/* Contextual desktop map returns from the title position. */
body[data-surface=pc].reader-map-context .kg-workspace h1{display:flex;align-items:center;margin:0}
body[data-surface=pc].reader-map-context .kg-workspace h1>.rm-title-back{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:6px 10px 6px 0;border:0;border-radius:8px;background:transparent;box-shadow:none;color:#46658a;font:inherit;font-size:18px;font-weight:600;line-height:1.5;cursor:pointer}
body[data-surface=pc].reader-map-context .rm-title-back svg{display:block;width:22px;height:22px;flex:none}
body[data-surface=pc].reader-map-context .rm-title-back:hover{color:#245fbc;background:#edf3fc}
body[data-surface=pc].reader-map-context .rm-title-back:active{background:#e2ecfa}
body[data-surface=pc].reader-map-context .rm-title-back:focus-visible{outline:2px solid #2865dc;outline-offset:3px}

/* Fit the complete diagram in the available window on both learner surfaces. */
body[data-view=mindmap] .kg-viewport{height:var(--reader-map-height,520px);min-height:0}
