/* =============================================================================
 * 构筑库顶部『交互图文面板』样式
 *   左栏：底图 + 覆盖在图上的多个按钮（圆点，内含 text）
 *   右栏（四行）：标题 / 描述 / 上一个-下一个 / 上一组-下一组
 *
 * 这套样式只服务于 #heroPanel（由 app/library-hero.js 渲染），
 * 不影响其他 poe2_deep 相关组件。配置数据来自 library-hero-panel.json。
 * ============================================================================= */

.hero-panel {
    --hero-info-bg-w: clamp(320px, 34vw, 470px);
    --hero-label-name-left: url("../../../photo/1.png");
    --hero-label-name-mid: url("../../../photo/2.png");
    --hero-label-name-right: url("../../../photo/3.png");
    --hero-label-record-edge: url("../../../photo/a.png");
    --hero-label-record-body: url("../../../photo/b.avif");
    margin-bottom: 20px;
    padding: 16px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.hero-panel__grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 16px;
    align-items: stretch;
    position: relative;
}

.hero-panel__grid--map-only {
    grid-template-columns: minmax(0, 1fr);
}

.hero-panel__grid--map-only .hero-panel__info-col {
    display: none;
}

/* -------- 左栏：图片 + 按钮 -------- */
.hero-panel__image-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hero-chapter-selector {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.hero-chapter-selector.is-open {
    pointer-events: auto;
}

.hero-chapter-selector__drawer {
    width: 100%;
    margin-top: 0;
    border: 1px solid rgba(74, 222, 128, 0.18);
    border-radius: 10px;
    padding: 10px 10px 8px;
    background: rgba(7, 14, 10, 0.86);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(10px);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.hero-chapter-selector.is-open .hero-chapter-selector__drawer {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.hero-chapter-selector__scroller {
    display: flex;
    justify-content: center;
    justify-content: safe center;
    gap: 9px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 222, 128, 0.42) rgba(255, 255, 255, 0.08);
    padding: 2px 2px 5px;
    touch-action: pan-x;
}

.hero-chapter-selector__scroller::-webkit-scrollbar {
    height: 4px;
}

.hero-chapter-selector__scroller::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.hero-chapter-selector__scroller::-webkit-scrollbar-thumb {
    background: rgba(74, 222, 128, 0.42);
    border-radius: 999px;
}

.hero-chapter-chip {
    flex: 0 0 auto;
    position: relative;
    width: 164px;
    height: 94px;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.76);
    color: #e5eefb;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
}

.hero-chapter-chip:hover,
.hero-chapter-chip:focus-visible {
    border-color: rgba(34, 197, 94, 0.72);
    color: #ffffff;
    outline: none;
}

.hero-chapter-chip.is-active {
    border-color: #22c55e;
    background: rgba(22, 163, 74, 0.18);
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.14) inset;
}

.hero-chapter-chip__thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    color: #86efac;
    font-size: 22px;
    font-weight: 800;
}

.hero-chapter-chip__thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-chapter-chip__label {
    position: absolute;
    left: 50%;
    bottom: 7px;
    max-width: calc(100% - 16px);
    transform: translateX(-50%);
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    color: #ffffff;
    font-size: 14px;
    line-height: 1.08;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.78);
}

.hero-chapter-chip__plus {
    color: #86efac;
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
    transform: translateY(-6px);
}

.hero-chapter-chip__check {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 2;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    border: 1px solid rgba(34, 197, 94, 0.72);
    color: #fff;
    background: transparent;
    font-size: 12px;
    line-height: 1;
}

.hero-chapter-chip.is-included .hero-chapter-chip__check {
    background: #22c55e;
    border-color: #22c55e;
}

.hero-chapter-chip.is-prompt {
    border-style: dashed;
    color: #86efac;
}

.hero-panel__image-wrap {
    position: relative;
    --hero-chapter-drawer-offset: 98px;
    width: 100%;
    aspect-ratio: var(--hero-map-aspect-ratio, 1000 / 563);
    border-radius: 12px;
    overflow: hidden;
    background: #050505;
    border: 0;
    user-select: none;
    touch-action: none;
}

.hero-panel__map-layer {
    position: absolute;
    left: var(--hero-map-fit-left, 0);
    top: var(--hero-map-fit-top, 0);
    right: auto;
    bottom: auto;
    width: var(--hero-map-fit-width, 100%);
    height: var(--hero-map-fit-height, 100%);
    --hero-map-ui-scale: 1;
    --hero-tooltip-gap: 14px;
    --hero-tooltip-diag-gap: 10px;
    --hero-tooltip-record-gap: 41px;
    --hero-tooltip-font-size: 12px;
    --hero-tooltip-name-min-h: 32px;
    --hero-tooltip-name-padding: 10px 20px 7px;
    --hero-tooltip-record-min-h: 48px;
    --hero-tooltip-record-padding: 17px 28px 16px;
    --hero-arrow-stroke: 2px;
    --hero-arrow-stroke-strong: 2.35px;
    --hero-arrow-hit-stroke: 18px;
    --hero-arrow-num-size: 22px;
    --hero-arrow-num-stroke: 4.2px;
    transform-origin: 0 0;
    will-change: transform;
    cursor: default;
}

.hero-panel__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    background: #050505;
    pointer-events: none;
}

/* 图片加载失败或尚未配置时的占位 */
.hero-panel__image-wrap.is-empty {
    aspect-ratio: var(--hero-map-aspect-ratio, 1000 / 563);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050505;
    color: var(--muted);
    font-size: 14px;
}

.hero-panel__image-wrap.is-editing-disabled .hero-panel__map-layer {
    cursor: not-allowed;
}

/* -------- 圆点热点（按钮） --------
 *   默认样式：浅蓝色半透明底 + 白色边框 + 白色文字 + 浅蓝发光光晕
 *   选中样式：实心橙色（变量 --hero-dot-fill），白字
 * ---------------------------------------------------------------------------- */
.hero-dot {
    position: absolute;
    z-index: 36;
    transform: translate(-50%, -50%) scale(var(--hero-map-ui-scale, 1));
    transform-origin: center;
    width: var(--hero-dot-size, 32px);
    height: var(--hero-dot-size, 32px);
    padding: 0;
    overflow: visible;
    border-radius: 50%;
    border: 2px solid var(--hero-dot-ring, #ffffff);
    background: color-mix(in srgb, var(--hero-dot-glow, #60a5fa) 35%, transparent);
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.35),
        0 0 12px color-mix(in srgb, var(--hero-dot-glow, #60a5fa) 65%, transparent),
        inset 0 0 8px color-mix(in srgb, var(--hero-dot-glow, #60a5fa) 30%, transparent);
    cursor: pointer;
    transition:
        background 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: var(--hero-dot-ring, #ffffff);
    font-size: var(--hero-dot-font-size, 13px);
    font-weight: 800;
    font-family: inherit;
    --hero-dot-ring: #ffffff;           /* 边框 + 文字：白色 */
    --hero-dot-glow: #60a5fa;           /* 背景/光晕/箭头主色：浅蓝 (blue-400) */
    --hero-dot-fill: #f97316;           /* 选中实心：橙 (orange-500) */
}

.hero-dot--official {
    --hero-dot-ring: #eff6ff;
    --hero-dot-glow: #60a5fa;
    --hero-dot-fill: #2563eb;
}

.hero-dot--custom {
    --hero-dot-ring: #eff6ff;
    --hero-dot-glow: #60a5fa;
    --hero-dot-fill: #2563eb;
}

.hero-dot--route-group-0,
.hero-dot--route-group-1,
.hero-dot--route-group-2,
.hero-dot--route-group-3,
.hero-dot--route-group-4,
.hero-dot--route-group-5 {
    --hero-dot-ring: #eff6ff;
    --hero-dot-glow: #60a5fa;
    --hero-dot-fill: #2563eb;
}

.hero-dot--unplanned {
    --hero-dot-ring: #f8fafc;
    --hero-dot-glow: #94a3b8;
    --hero-dot-fill: #64748b;
    border-width: 3px;
    border-style: dashed;
    background: rgba(15, 23, 42, 0.34);
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.46),
        0 0 16px rgba(148, 163, 184, 0.42),
        inset 0 0 10px rgba(148, 163, 184, 0.16);
}

.hero-dot--editing-disabled {
    opacity: 0.58;
    cursor: not-allowed;
    filter: grayscale(0.45);
}

.hero-panel.is-map-editing .hero-dot {
    width: var(--hero-dot-edit-size, 40px);
    height: var(--hero-dot-edit-size, 40px);
    cursor: pointer;
}

.hero-panel.is-map-editing .hero-dot::before {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    pointer-events: auto;
}

.hero-panel.is-map-editing .hero-dot:hover {
    cursor: pointer;
    border-color: #fed7aa;
    box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.42),
        0 0 0 6px rgba(249, 115, 22, 0.34),
        0 0 24px rgba(249, 115, 22, 0.72),
        inset 0 0 8px rgba(255, 255, 255, 0.18);
}

.hero-panel.is-map-editing .hero-dot.is-active {
    cursor: grab;
}

.hero-panel.is-map-editing .hero-dot.is-active:active {
    cursor: grabbing;
}

.hero-panel.is-point-placement .hero-panel__map-layer {
    cursor: crosshair;
}

.hero-point-placement-preview {
    position: absolute;
    inset: 0;
    z-index: 35;
    pointer-events: none;
}

.hero-point-placement-preview__svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.hero-point-placement-preview__line {
    stroke: #f97316;
    stroke-width: 2.4px;
    stroke-dasharray: 7 6;
    stroke-linecap: round;
    filter: drop-shadow(0 0 7px rgba(249, 115, 22, 0.75));
}

.hero-point-placement-preview__dot {
    position: absolute;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(var(--hero-map-ui-scale, 1));
    transform-origin: center;
    border: 2px dashed #ffedd5;
    background: rgba(249, 115, 22, 0.22);
    box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.34),
        0 0 20px rgba(249, 115, 22, 0.82),
        inset 0 0 10px rgba(249, 115, 22, 0.42);
}

.hero-point-placement-preview.is-snapped .hero-point-placement-preview__dot {
    width: 48px;
    height: 48px;
    border-style: solid;
    background: rgba(34, 197, 94, 0.2);
    border-color: #bbf7d0;
    box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.34),
        0 0 24px rgba(34, 197, 94, 0.86),
        inset 0 0 10px rgba(34, 197, 94, 0.4);
}

.hero-panel.is-point-placement .hero-dot.is-placement-snap-target {
    --hero-dot-ring: #bbf7d0;
    --hero-dot-glow: #22c55e;
    --hero-dot-fill: #16a34a;
    border-color: #bbf7d0;
    box-shadow:
        0 0 0 4px rgba(34, 197, 94, 0.28),
        0 0 24px rgba(34, 197, 94, 0.88),
        inset 0 0 10px rgba(34, 197, 94, 0.42);
}

.hero-dot__text {
    position: relative;
    z-index: 2;
    pointer-events: none;
    line-height: 1;
    letter-spacing: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    max-width: 90%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;
    text-align: center;
}

.hero-dot__tooltip {
    position: absolute;
    z-index: 82;
    width: max-content;
    min-width: 46px;
    max-width: 230px;
    min-height: 30px;
    padding: 8px 22px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #efd49c;
    box-shadow: none;
    font-size: var(--hero-tooltip-font-size, 12px);
    font-weight: 800;
    line-height: 1.32;
    letter-spacing: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    text-align: center;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.58), 0 0 2px rgba(217, 171, 88, 0.2);
    pointer-events: none;
    opacity: 0;
    isolation: isolate;
    /* 标签始终落在最终位置，只在出现/消失时淡入淡出，
     *   不再做"从远处滑过来"的位移动画——避免用户切点位时一整片地名抖来抖去。 */
    transform: var(--hero-tooltip-visible, translate(-50%, calc(-100% - var(--hero-tooltip-gap, 14px))));
    transform-origin: center;
    transition: opacity 0.12s ease;
}

.hero-dot-cluster {
    display: contents;
}

.hero-dot__tooltip--top {
    --hero-tooltip-visible: translate(-50%, calc(-100% - var(--hero-tooltip-gap, 14px)));
}

.hero-dot__tooltip--bottom {
    --hero-tooltip-visible: translate(-50%, var(--hero-tooltip-gap, 14px));
}

.hero-dot__tooltip--left {
    --hero-tooltip-visible: translate(calc(-100% - var(--hero-tooltip-gap, 14px)), -50%);
}

.hero-dot__tooltip--right {
    --hero-tooltip-visible: translate(var(--hero-tooltip-gap, 14px), -50%);
}

/* 斜角方位：用于 JS 在 adjustHeroLabels() 里挑出"既不挡路、又不盖点"的最佳落位。 */
.hero-dot__tooltip--top-left {
    --hero-tooltip-visible: translate(calc(-100% - var(--hero-tooltip-diag-gap, 10px)), calc(-100% - var(--hero-tooltip-diag-gap, 10px)));
}

.hero-dot__tooltip--top-right {
    --hero-tooltip-visible: translate(var(--hero-tooltip-diag-gap, 10px), calc(-100% - var(--hero-tooltip-diag-gap, 10px)));
}

.hero-dot__tooltip--bottom-left {
    --hero-tooltip-visible: translate(calc(-100% - var(--hero-tooltip-diag-gap, 10px)), var(--hero-tooltip-diag-gap, 10px));
}

.hero-dot__tooltip--bottom-right {
    --hero-tooltip-visible: translate(var(--hero-tooltip-diag-gap, 10px), var(--hero-tooltip-diag-gap, 10px));
}

.hero-dot__tooltip--record {
    max-width: min(310px, 36vw);
    min-height: var(--hero-tooltip-record-min-h, 48px);
    padding: var(--hero-tooltip-record-padding, 17px 28px 16px);
    background: var(--hero-label-record-body) center / 100% calc(100% - 18px) no-repeat;
    color: #ff3b30;
    box-shadow: none;
    font-weight: 700;
    text-align: left;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.78),
        0 0 5px rgba(127, 29, 29, 0.5),
        0 0 1px rgba(255, 226, 205, 0.32);
}

.hero-dot__tooltip--name {
    min-height: var(--hero-tooltip-name-min-h, 32px);
    padding: var(--hero-tooltip-name-padding, 10px 20px 7px);
    background: none;
}

.hero-dot__tooltip--name::before,
.hero-dot__tooltip--name::after,
.hero-dot__tooltip--record::before,
.hero-dot__tooltip--record::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.hero-dot__tooltip--name::after {
    display: none;
}

.hero-dot__tooltip--name::before {
    display: block;
    inset: 0;
    z-index: -1;
    width: auto;
    background:
        var(--hero-label-name-left) left center / 18px 100% no-repeat,
        var(--hero-label-name-right) right center / 18px 100% no-repeat,
        var(--hero-label-name-mid) center / auto 100% repeat-x;
    opacity: 0.64;
}

.hero-dot__tooltip--record::before,
.hero-dot__tooltip--record::after {
    left: 18px;
    right: 18px;
    z-index: 0;
    height: 13px;
    background: var(--hero-label-record-edge) center / 100% 100% no-repeat;
}

.hero-dot__tooltip--record::before {
    top: 3px;
}

.hero-dot__tooltip--record::after {
    bottom: 3px;
    transform: scaleY(-1);
}

.hero-dot__label-editor--record {
    max-width: 260px;
    color: #ff3b30;
    text-align: left;
    font-weight: 700;
}

.is-hero-display-records .hero-dot__tooltip--name:not(.hero-dot__tooltip--manual-pos) {
    --hero-tooltip-visible: translate(-50%, calc(-100% - var(--hero-tooltip-gap, 14px)));
}

.is-hero-display-records .hero-dot__tooltip--record:not(.hero-dot__tooltip--manual-pos) {
    --hero-tooltip-visible: translate(-50%, calc(-100% - var(--hero-tooltip-record-gap, 41px)));
}

.hero-dot-cluster:has(> .hero-dot.is-active.hero-dot--has-talent-label) > .hero-dot__tooltip--record:not(.hero-dot__tooltip--manual-pos) {
    --hero-tooltip-visible: translate(-50%, calc(-100% - var(--hero-tooltip-record-gap, 41px)));
}

.hero-dot__tooltip--editable {
    min-width: 72px;
    max-width: 240px;
    filter: drop-shadow(0 0 7px rgba(217, 171, 88, 0.24));
    pointer-events: auto;
}

.hero-dot__name-editor,
.hero-dot__label-editor {
    position: relative;
    z-index: 1;
    display: block;
    min-width: 28px;
    max-width: 196px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: var(--hero-tooltip-font-size, 12px);
    font-weight: 700;
    line-height: 1.28;
    outline: none;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    text-align: center;
    cursor: inherit;
}

.hero-dot__tooltip--has-talent-marker .hero-dot__label-editor {
    padding-left: 8px;
}

.hero-dot__talent-marker {
    position: absolute;
    left: -10px;
    top: -8px;
    z-index: 2;
    width: 13px;
    height: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffd166;
    filter:
        drop-shadow(0 1px 1px rgba(0, 0, 0, 0.86))
        drop-shadow(0 0 4px rgba(255, 193, 7, 0.46));
    pointer-events: none;
}

.hero-dot__talent-marker svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.hero-dot__label-editor.is-empty::before {
    content: "\00a0";
}

.hero-dot__label-editor[contenteditable="true"] {
    cursor: text;
    padding: 2px 3px;
    border-radius: 6px;
    background: rgba(0, 122, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.18);
}

.hero-dot__name-editor:focus,
.hero-dot__label-editor:focus {
    box-shadow:
        0 0 0 2px rgba(0, 122, 255, 0.24),
        inset 0 0 0 1px rgba(255, 255, 255, 0.66);
}

/* -------- 关闭所有原 ::before 小三角指示 --------
 *   旧版每个方位画一个三角形指向圆点；中间一版改成粗 leader 线；
 *   现在彻底去掉两种指示 —— 标签就是一个孤立的小标牌，自动布局给默认位置，用户不满意自己拖。 */
.hero-dot__tooltip:not(.hero-dot__tooltip--name):not(.hero-dot__tooltip--record)::before {
    content: none;
}

.hero-dot-cluster:has(> .hero-dot:focus-visible) > .hero-dot__tooltip,
.hero-dot-cluster:has(> .hero-dot:hover) > .hero-dot__tooltip,
.hero-dot-cluster:has(> .hero-dot.is-active) > .hero-dot__tooltip--editable,
.hero-dot__tooltip--editable:focus-within {
    z-index: 98;
    opacity: 1;
}

/* pinned 标签（normal 模式的当前/下一步、names/records 模式的全部点）必须画在箭头和
 *  圆点之上。直接 opacity:1 即可，连过渡都不要，避免切点位时整片地名"鬼影叠加"。 */
.hero-dot-cluster:has(> .hero-dot.is-tooltip-pinned) > .hero-dot__tooltip {
    z-index: 95;
    opacity: 1;
    transition: none;
}

/* -------- 指引箭头（按钮→按钮）--------
 *   - 用一个铺满 image-wrap 的 SVG 容器统一画所有箭头
 *   - JS 根据图片实际尺寸把百分比点位换成 CSS 像素路径
 *   - vector-effect=non-scaling-stroke 让线宽不跟随容器拉伸
 *   - pointer-events:none 不影响圆点点击
 *   - fill=context-stroke 让箭头头自动取 path 的 stroke 颜色（SVG2 特性，主流浏览器都支持）
 */
.hero-arrows {
    position: absolute;
    z-index: 34;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.hero-map-display-toggle {
    position: static;
    z-index: 70;
    width: 100%;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(248, 227, 173, 0.38);
    border-radius: 7px;
    background: rgba(15, 12, 8, 0.42);
    color: #ffe8b5;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.9), 0 0 8px rgba(245, 158, 11, 0.28);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(6px);
    transition: transform 0.12s ease, filter 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.hero-map-display-toggle:hover,
.hero-map-display-toggle:focus-visible {
    outline: none;
    transform: translateY(-1px);
    color: #fff3d0;
    border-color: rgba(248, 227, 173, 0.68);
    background: rgba(15, 12, 8, 0.62);
    filter: brightness(1.08);
}

.hero-image-nav {
    position: absolute;
    inset: 12px;
    z-index: 68;
    pointer-events: none;
}

.hero-panel.is-map-editing .hero-arrows {
    pointer-events: auto;
}

.hero-image-nav__story-action {
    position: absolute;
    left: 0;
    top: 54px;
    display: inline-flex;
    pointer-events: auto;
    transition: top 0.14s ease;
}

.hero-map-fullscreen-btn {
    position: absolute;
    left: auto;
    right: 0;
    top: 0;
    z-index: 124;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(248, 227, 173, 0.42);
    border-radius: 8px;
    background: rgba(15, 12, 8, 0.52);
    color: #f8e3ad;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.82);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(6px);
    transition: transform 0.12s ease, filter 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.hero-map-fullscreen-btn:hover,
.hero-map-fullscreen-btn:focus-visible {
    outline: none;
    transform: translateY(-1px);
    border-color: rgba(248, 227, 173, 0.72);
    background: rgba(15, 12, 8, 0.72);
    filter: brightness(1.08);
}

#heroPanel:fullscreen .hero-map-fullscreen-btn,
#heroPanel:-webkit-full-screen .hero-map-fullscreen-btn {
    top: 0;
    right: 0;
}

.hero-panel__info-map-toolbar {
    position: relative;
    z-index: 6;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    min-height: 42px;
    margin: -14px -20px 4px;
}

.hero-panel__map-control-btn,
.hero-panel__info-map-toolbar .hero-map-display-toggle {
    position: static;
    width: 100%;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid rgba(248, 227, 173, 0.38);
    border-radius: 7px;
    background: rgba(15, 12, 8, 0.42);
    color: #f8e3ad;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.9), 0 0 8px rgba(245, 158, 11, 0.28);
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(6px);
    transition: transform 0.12s ease, filter 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.hero-panel__map-control-btn > span,
.hero-panel__info-map-toolbar .hero-map-display-toggle > span {
    display: block;
    transform: none;
    white-space: nowrap;
}

.hero-panel__map-control-btn:hover,
.hero-panel__map-control-btn:focus-visible,
.hero-panel__info-map-toolbar .hero-map-display-toggle:hover,
.hero-panel__info-map-toolbar .hero-map-display-toggle:focus-visible {
    outline: none;
    transform: translateY(-1px);
    border-color: rgba(248, 227, 173, 0.68);
    background: rgba(15, 12, 8, 0.62);
    filter: brightness(1.08);
}

.hero-panel__info-step-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin-top: auto;
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: -14px;
    padding-top: 6px;
}

.hero-panel__info-step-nav .hero-image-nav-btn {
    width: 100%;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(248, 227, 173, 0.38);
    border-radius: 7px;
    background: rgba(15, 12, 8, 0.42);
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(6px);
}

.hero-panel__info-step-nav .hero-image-nav-btn__label {
    transform: none;
}

#heroPanel:fullscreen,
#heroPanel:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #050505;
}

#heroPanel:fullscreen .hero-panel__grid,
#heroPanel:-webkit-full-screen .hero-panel__grid {
    width: 100%;
    height: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

#heroPanel:fullscreen .hero-panel__image-col,
#heroPanel:-webkit-full-screen .hero-panel__image-col {
    height: 100%;
    min-height: 0;
}

#heroPanel:fullscreen .hero-panel__image-wrap,
#heroPanel:-webkit-full-screen .hero-panel__image-wrap {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    background: #050505;
}

#heroPanel:fullscreen .hero-panel__image,
#heroPanel:-webkit-full-screen .hero-panel__image {
    object-fit: fill;
}

#heroPanel:fullscreen .hero-panel__map-layer,
#heroPanel:-webkit-full-screen .hero-panel__map-layer {
    --hero-map-ui-scale: clamp(1.34, 1.7vw, 1.82);
    --hero-tooltip-gap: clamp(19px, 2.4vw, 26px);
    --hero-tooltip-diag-gap: clamp(13px, 1.8vw, 18px);
    --hero-tooltip-record-gap: clamp(55px, 7vw, 74px);
    --hero-tooltip-font-size: clamp(16px, 1.55vw, 22px);
    --hero-tooltip-name-min-h: clamp(43px, 4.2vw, 58px);
    --hero-tooltip-name-padding: clamp(13px, 1.35vw, 18px) clamp(27px, 2.8vw, 38px) clamp(9px, 1vw, 14px);
    --hero-tooltip-record-min-h: clamp(64px, 6vw, 88px);
    --hero-tooltip-record-padding: clamp(23px, 2.35vw, 32px) clamp(37px, 3.9vw, 52px) clamp(21px, 2.2vw, 30px);
    --hero-arrow-stroke: clamp(2.8px, 0.28vw, 3.4px);
    --hero-arrow-stroke-strong: clamp(3.2px, 0.34vw, 4px);
    --hero-arrow-hit-stroke: clamp(24px, 2.2vw, 34px);
    --hero-arrow-num-size: clamp(30px, 2.75vw, 40px);
    --hero-arrow-num-stroke: clamp(5px, 0.52vw, 7px);
}

#heroPanel:fullscreen .hero-dot__tooltip,
#heroPanel:-webkit-full-screen .hero-dot__tooltip {
    max-width: min(380px, 42vw);
}

#heroPanel:fullscreen .hero-dot__tooltip--record,
#heroPanel:-webkit-full-screen .hero-dot__tooltip--record {
    max-width: min(430px, 46vw);
}

#heroPanel:fullscreen .hero-dot__label-editor,
#heroPanel:fullscreen .hero-dot__name-editor,
#heroPanel:-webkit-full-screen .hero-dot__label-editor,
#heroPanel:-webkit-full-screen .hero-dot__name-editor {
    max-width: 280px;
}

#heroPanel:fullscreen .hero-dot__label-editor--record,
#heroPanel:-webkit-full-screen .hero-dot__label-editor--record {
    max-width: 340px;
}

.hero-panel .hero-image-nav-btn {
    position: relative;
    z-index: 10;
    width: 100%;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid rgba(248, 227, 173, 0.38);
    border-radius: 7px;
    background: rgba(15, 12, 8, 0.42);
    color: #f8e3ad;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.9), 0 0 8px rgba(245, 158, 11, 0.28);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(6px);
    pointer-events: auto;
    transition: transform 0.12s ease, filter 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.hero-image-nav-btn__label,
.hero-map-display-toggle > span {
    display: inline-block;
    transform: none;
}

.hero-panel .hero-image-nav-btn:hover:not([disabled]) {
    color: #fff3ce;
    transform: translateY(-1px);
    border-color: rgba(248, 227, 173, 0.68);
    background: rgba(15, 12, 8, 0.62);
    filter: brightness(1.08);
}

.hero-panel .hero-image-nav-btn[disabled] {
    color: rgba(248, 227, 173, 0.68);
    filter: grayscale(0.28) brightness(0.82);
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.75);
}

.hero-image-nav__story-action .story-guide-map-comment-toggle {
    position: relative;
    inset: auto;
    width: 100%;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    padding: 0 14px;
}

.story-guide-map-comment-toggle__badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, #c084fc 72%, transparent);
    background: #0ea5ff;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 0 0 2px rgba(2, 6, 23, 0.84);
}

.story-guide-map-comment-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
}

.hero-arrow {
    fill: none;
    stroke: var(--hero-dot-glow, #60a5fa);
    stroke-width: var(--hero-arrow-stroke, 2px);
    stroke-linecap: round;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.65));
}

.hero-arrow-hit {
    fill: none;
    stroke: transparent;
    stroke-width: var(--hero-arrow-hit-stroke, 18px);
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.hero-arrow--dashed {
    stroke-dasharray: 6 5;
    /* 虚线永远在流动 —— 用 dashoffset 周期性平移，给视觉上"箭头沿着虚线在走"的感觉，
     * 不依赖任何 SMIL 节点，跟激活/选中无关，读者一进图就能看出哪些线段是虚线。
     * 11 = 6 + 5（一个 dash + 一个 gap），保证循环回到同相位、动画无缝。 */
    animation: hero-arrow-flow 0.9s linear infinite;
}

.hero-arrow--curved {
    stroke-width: var(--hero-arrow-stroke-strong, 2.35px);
}

.hero-arrow--bidirectional {
    stroke-width: var(--hero-arrow-stroke-strong, 2.35px);
}

/* 箭头激活态 —— 只有从"当前选中按钮出发"的箭头会被加 .is-active，
 *   并表现为：
 *     · 线条本身变橙色（与选中点配色一致），
 *     · 实线：保持完整实线，由叠加的 .hero-arrow-runner（小三角）沿线滑动；
 *     · 虚线：marching ants 一直在流（与未激活时一致，只是颜色变橙）。
 *   所有动效均为 SVG 原生 SMIL 或 CSS keyframes，浏览器合成层处理，几乎零 CPU。
 */
.hero-arrow.is-active {
    stroke: var(--hero-dot-fill, #f97316);
}

.hero-arrow.is-active.hero-arrow--selected-incoming {
    stroke: #a855f7;
    filter:
        drop-shadow(0 0 3px rgba(0, 0, 0, 0.68))
        drop-shadow(0 0 7px rgba(168, 85, 247, 0.56));
}

.hero-panel.is-map-editing .hero-arrow[data-route-id] {
    pointer-events: none;
    cursor: default;
}

.hero-panel.is-map-editing .is-hero-display-normal .hero-arrow[data-route-id],
.hero-panel.is-map-editing .is-hero-display-normal .hero-arrow-hit[data-route-id] {
    pointer-events: stroke;
    cursor: pointer;
}

@keyframes hero-arrow-flow {
    to { stroke-dashoffset: -11; }
}

/* 沿 active 实线移动的小三角形箭头。
 *   形状以 (0,0) 为几何中心，顶点指向 +X，由 <animateMotion rotate="auto"> 自动沿线段方向旋转。
 *   path 属性由 JS 在 adjustHeroArrows() 里写成与对应 line 完全相同的端点。 */
.hero-arrow-runner {
    fill: var(--hero-dot-fill, #f97316);
    filter: drop-shadow(0 0 3px rgba(249, 115, 22, 0.75));
}

.hero-arrow-runner--dashed {
    fill: #fb923c;
    filter: drop-shadow(0 0 4px rgba(251, 146, 60, 0.82));
}

.hero-arrow-runner--selected-incoming,
.hero-arrow-runner--dashed.hero-arrow-runner--selected-incoming {
    fill: #c084fc;
    filter: drop-shadow(0 0 5px rgba(192, 132, 252, 0.86));
}

/* -------- 路线徽章（hero-arrow-handle）= 序号 + 编辑器态可拖把改曲度 --------
 * .hero-arrows 本身 pointer-events: none，要单独把徽章开成可交互；
 * 读者态只显示 active 路线序号；进入编辑器 + active 时配色变亮、cursor: grab 表明可拖。
 * 配色：黄系（amber-300 ~ amber-500）—— 让线段中点的标签和地名/挂载点拖把
 *      （已经是橙/黄色调）形成连续的暖色族，避免再多塞一个色相。
 *
 * 注意：徽章上不要有任何 transition。每次点新点位时整张 SVG 是被重渲染的，
 * <g> 节点的 transform 从初始的 translate(0,0) 跳到 adjustHeroArrows() 算出的中点，
 * 一旦给 transform 加过渡，所有徽章会从 (0,0) 飞到中点，看上去非常抖。
 */
.hero-arrow-handle {
    pointer-events: auto;
    cursor: default;
}

.hero-arrow-handle--passive {
    pointer-events: none;
}

.hero-arrow-handle__bg {
    fill: transparent;
    stroke: transparent;
    stroke-width: 0;
    filter: none;
}

.hero-arrow-handle__num {
    fill: #fef3c7;                              /* amber-100 */
    stroke: rgba(30, 18, 4, 0.82);
    stroke-width: var(--hero-arrow-num-stroke, 4.2px);
    paint-order: stroke;
    font-size: var(--hero-arrow-num-size, 22px);
    font-weight: 900;
    font-family: inherit;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.72));
}

.hero-arrow-handle.is-active .hero-arrow-handle__bg {
    fill: transparent;
    stroke: transparent;
    stroke-width: 0;
    filter: none;
}

.hero-arrow-handle.is-active .hero-arrow-handle__num {
    fill: #fbbf24;
    stroke: rgba(30, 18, 4, 0.86);
}

.hero-arrow-handle.is-active.hero-arrow-handle--selected-incoming .hero-arrow-handle__num {
    fill: #e9d5ff;
    stroke: rgba(47, 17, 82, 0.9);
}

/* 编辑器态 + active：徽章本身就是曲度拖把 */
.hero-panel.is-map-editing .hero-arrow-handle.is-active {
    cursor: grab;
}

.hero-panel.is-map-editing .hero-arrow-handle.is-active:hover .hero-arrow-handle__bg {
    fill: transparent;
    stroke-width: 0;
}

.hero-arrow-handle.is-dragging {
    cursor: grabbing;
}

.hero-arrow-handle.is-dragging .hero-arrow-handle__bg {
    fill: transparent;
    filter: none;
}

/* -------- 圆周挂载点拖把（hero-arrow-anchor-cycle）--------
 * 编辑器态下，每条 active 路线在起点/终点附近提供一个隐形命中区。
 * 鼠标靠近或拖拽时只出现小紫点，不再显示图标。
 *
 * 交互：抓住命中区拖动 → 挂载点沿圆周走（updateAnchorDrag）。
 * 因此用 cursor: grab / grabbing 而不是 pointer。 */
.hero-arrow-anchor-cycle {
    display: none;
    pointer-events: auto;
    cursor: grab;
    z-index: 120;
}

.hero-arrow-anchor-cycle.is-dragging {
    cursor: grabbing;
}

.hero-panel.is-map-editing .hero-arrow-anchor-cycle {
    display: inline;
}

.hero-arrow-anchor-cycle__bg {
    fill: transparent;
    stroke: none;
    /* SVG 默认 pointer-events: visiblePainted 会忽略全透明像素，
     * 这里强制全部命中，保证用户拖到圆形区域而不仅是 ↻ 的字形像素。 */
    pointer-events: all;
}

.hero-arrow-anchor-cycle__dot {
    fill: #facc15;
    stroke: rgba(88, 55, 8, 0.88);
    stroke-width: 1.4;
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease, transform 120ms ease;
    filter:
        drop-shadow(0 0 5px rgba(250, 204, 21, 0.88))
        drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}

.hero-arrow-anchor-cycle:hover .hero-arrow-anchor-cycle__dot,
.hero-arrow-anchor-cycle.is-dragging .hero-arrow-anchor-cycle__dot {
    opacity: 1;
}

.hero-arrow-anchor-cycle.is-dragging .hero-arrow-anchor-cycle__dot {
    transform: scale(1.35);
}

/* -------- 编辑器态下让 pinned 标签变成可拖拽 --------
 * 默认 tooltip 是 pointer-events: none（避免遮挡圆点点击），
 * 只在 .hero-panel.is-map-editing 下、并且是 pinned 且非编辑器子节点时，把它打开成可抓的状态。 */
.hero-panel.is-map-editing .hero-dot-cluster:has(> .hero-dot.is-tooltip-pinned) > .hero-dot__tooltip {
    pointer-events: auto;
    cursor: grab;
}

.hero-panel.is-map-editing .hero-dot-cluster:has(> .hero-dot.is-tooltip-pinned) > .hero-dot__tooltip.is-dragging {
    cursor: grabbing;
    opacity: 1;
}

/* 编辑器态：当前激活点位（is-active）的地名标签换成醒目的橙色描边，
 * 让作者一眼能找到「我刚点的这个点对应哪个地名」，方便去拖位置 / 改名字。
 * 用更强的 box-shadow 和 border 颜色覆盖默认绿色主题。 */
.hero-panel.is-map-editing .hero-dot-cluster:has(> .hero-dot.is-active) > .hero-dot__tooltip:not(.hero-dot__tooltip--editable),
.hero-panel.is-map-editing .hero-dot-cluster:has(> .hero-dot.is-active) > .hero-dot__tooltip--record {
    color: #fff0c7;
    filter: brightness(1.14) drop-shadow(0 0 8px rgba(217, 171, 88, 0.5));
    box-shadow: none;
    z-index: 99;
}

/* 手动布局过的标签：让 z-index 略高一点，方便用户在密集区域抓到它 */
.hero-dot__tooltip--manual-pos {
    z-index: 96;
}

/* ------------------------------------------------------------------
 *  地名 / 记录模式：鼠标悬浮高亮
 *  ------------------------------------------------------------------
 *  user 需求：在 names 和 records 这两种模式下，鼠标移到点位、或者移到点位对应的
 *  标签上时，"点 + 它的标签" 要一起高亮，让作者/读者一眼看出"这两个是一对"。
 *
 *  实现要点：
 *  1) 这两种模式下 pinned tooltip 默认是 pointer-events:none，悬浮不到上面 →
 *     单独打开 pointer-events:auto（编辑器模式下原本就开着以便拖动，这里只是把
 *     reader 模式下的也打开）。
 *  2) 悬浮 dot   → dot 自身已有 .hero-dot:hover 的发光；这里再附带让相邻标签变橙。
 *  3) 悬浮标签   → 用 :has(+ tooltip:hover) 反推到 dot 上，让 dot 也亮起来。
 *  4) 颜色统一走橙系（与编辑器激活标签一致），但 hover 仅是临时强调，不修改 box-shadow
 *     里的"激活态"那一档强光，避免和真正"被选中"的视觉混淆。
 */
.is-hero-display-records .hero-dot-cluster:has(> .hero-dot.is-tooltip-pinned) > .hero-dot__tooltip {
    pointer-events: auto;
    cursor: pointer;
}

.hero-panel.is-map-editing .is-hero-display-records .hero-dot-cluster:has(> .hero-dot.is-tooltip-pinned) > .hero-dot__tooltip {
    cursor: grab;
}

.hero-panel.is-map-editing .is-hero-display-records .hero-dot-cluster:has(> .hero-dot.is-tooltip-pinned) > .hero-dot__tooltip.is-dragging {
    cursor: grabbing;
}

.is-hero-display-records .hero-dot-cluster:has(> .hero-dot:hover) > .hero-dot__tooltip,
.is-hero-display-records .hero-dot-cluster:has(> .hero-dot__tooltip:hover) > .hero-dot__tooltip,
/* 只读天赋模式下，选中态只高亮点位本身，不再把天赋标签改成选中高亮色。
 * 编辑器态保留标签高亮，方便作者拖动和确认当前点位。 */
.hero-panel.is-map-editing .is-hero-display-records .hero-dot-cluster:has(> .hero-dot.is-active) > .hero-dot__tooltip {
    z-index: 99;
    color: #fff0c7;
    filter: brightness(1.14) drop-shadow(0 0 8px rgba(217, 171, 88, 0.5));
    box-shadow: none;
}

.hero-panel.is-map-editing .hero-dot-cluster:has(> .hero-dot.is-active) > .hero-dot__tooltip--record {
    color: #fff0c7;
    filter: brightness(1.14) drop-shadow(0 0 8px rgba(217, 171, 88, 0.5));
    box-shadow: none;
}

/* 标签 hover 反向高亮 dot：用 :has 反推父级状态。
 * 注：放在前一组规则后面，避免被同一文件里更早的 .hero-dot:hover 覆写。 */
.is-hero-display-records .hero-dot-cluster:has(> .hero-dot__tooltip:hover) > .hero-dot {
    z-index: 76;
    --hero-dot-glow: #fb923c;
    --hero-dot-ring: #fed7aa;
    transform: translate(-50%, -50%);
    background: color-mix(in srgb, var(--hero-dot-fill) 55%, transparent);
    border-color: var(--hero-dot-ring);
    box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.42),
        0 0 0 6px rgba(249, 115, 22, 0.34),
        0 0 24px rgba(249, 115, 22, 0.72);
}

/* 这里的 transform 必须显式写回，
 * 因为 poe2-deep.css 里有 `button:hover { transform: translateY(-1px) }` 全局规则，
 * 会把 .hero-dot 的居中 translate(-50%,-50%) 盖掉，导致 hover 时圆点向左上角位移。 */
.hero-dot:hover {
    z-index: 76;
    transform: translate(-50%, -50%) scale(var(--hero-map-ui-scale, 1));
    background: color-mix(in srgb, var(--hero-dot-glow) 55%, transparent);
    border-color: var(--hero-dot-ring);
}

.hero-dot:focus-visible {
    z-index: 76;
    transform: translate(-50%, -50%) scale(var(--hero-map-ui-scale, 1));
    outline: none;
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.4),
        0 0 0 4px var(--hero-dot-glow),
        0 0 16px color-mix(in srgb, var(--hero-dot-glow) 75%, transparent);
}

/* 选中态：维持和默认态一致的"半透明圆"风格，只是把中心填充透明度提到 60%（默认 35%），
 *  让用户一眼分辨"我点中的就是它"，但不实心化、不挡住其下方的地图细节。
 *  之前的设计是 background: var(--hero-dot-fill) 直接画成实心橙圆，用户嫌闷。 */
.hero-dot.is-active {
    z-index: 38;
    --hero-dot-ring: #ffedd5;
    --hero-dot-glow: #fb923c;
    --hero-dot-fill: #f97316;
    transform: translate(-50%, -50%) scale(var(--hero-map-ui-scale, 1));
    background: color-mix(in srgb, var(--hero-dot-fill) 60%, transparent);
    border-color: color-mix(in srgb, var(--hero-dot-fill) 70%, #ffffff);
    color: #ffffff;
    box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.45),
        0 0 22px color-mix(in srgb, var(--hero-dot-fill) 85%, transparent),
        inset 0 0 8px rgba(255, 255, 255, 0.22);
}

.hero-dot.is-active:hover,
.hero-dot.is-active:focus-visible {
    z-index: 76;
    transform: translate(-50%, -50%) scale(var(--hero-map-ui-scale, 1));
}

.hero-panel:not(.is-map-editing) .is-hero-display-records .hero-dot--has-talent-label {
    --hero-dot-ring: #fff7cc;
    --hero-dot-glow: #facc15;
    --hero-dot-fill: #facc15;
    background: #facc15;
    border-color: #fff7cc;
    color: #422006;
    box-shadow:
        0 0 0 2px rgba(0, 0, 0, 0.42),
        0 0 16px rgba(250, 204, 21, 0.78),
        inset 0 0 7px rgba(255, 255, 255, 0.28);
}

.hero-panel:not(.is-map-editing) .is-hero-display-records .hero-dot--has-talent-label.is-active {
    background: #facc15;
    border-color: #fffbeb;
    color: #422006;
    box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.46),
        0 0 0 6px rgba(250, 204, 21, 0.28),
        0 0 26px rgba(250, 204, 21, 0.95),
        inset 0 0 8px rgba(255, 255, 255, 0.34);
}

.hero-dot.is-tooltip-pinned {
    z-index: 38;
}

/* -------- 右栏：标题 / 描述 / 翻单 / 翻组 -------- */
.hero-panel__info-col {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: clamp(300px, 34vw, 460px);
    padding: clamp(18px, 2.4vw, 28px);
    background:
        linear-gradient(180deg, rgba(22, 18, 13, 0.92), rgba(11, 10, 9, 0.88)),
        color-mix(in srgb, var(--panel, #111827) 86%, transparent);
    border: 1px solid rgba(226, 188, 111, 0.32);
    border-radius: 12px;
    min-width: 0;
    overflow: visible;
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.hero-panel.is-map-editing .hero-panel__info-col:not([data-hero-floating-info]) {
    height: var(--hero-info-edit-height, auto);
    min-height: var(--hero-info-edit-height, clamp(300px, 34vw, 460px));
    max-height: var(--hero-info-edit-height, none);
}

.hero-panel__info-col::before {
    content: none;
}

.hero-panel__info-col > * {
    position: relative;
    z-index: 1;
}

/* 标题：字号翻倍、左右居中 */
.hero-panel__info-main {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
}

.hero-panel__info-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    min-height: 38px;
    margin-top: 0;
    margin-bottom: 4px;
}

.hero-panel__info-head[data-hero-info-drag-handle] {
    cursor: move;
    user-select: none;
}

.hero-panel.is-map-editing .hero-panel__info-head[data-hero-info-drag-handle] {
    cursor: default;
}

.hero-panel__info-col.is-dragging {
    cursor: grabbing;
}

.hero-panel__info-head .hero-panel__info-title {
    flex: 0 1 auto;
    min-width: 0;
}

.hero-panel__info-title-actions {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-panel__info-title-actions .build-feed-card__action-btn {
    width: 38px;
    height: 38px;
}

.hero-panel__info-title-actions .build-feed-card__action-icon {
    width: 25px;
    height: 25px;
}

.hero-panel__info-head .story-guide-hero-comment-mode {
    flex: 0 0 auto;
    justify-content: flex-start;
    margin: 0;
}

.hero-panel__info-head .story-guide-hero-comment-mode .story-guide-mode-segmented {
    height: 30px;
}

.hero-panel__info-title {
    font-size: 32px;
    font-weight: 700;
    color: #f2dfad;
    line-height: 1.2;
    text-align: center;
    padding: 0;
    border-bottom: 0;
    min-height: 1.2em;
    word-break: break-word;
}

.hero-panel__info-title.is-empty {
    color: var(--muted);
    font-weight: 600;
    font-size: 18px;
}

/* 行 2：描述 */
.hero-panel__info-desc {
    flex: 1;
    min-height: 80px;
    padding-inline: 4px;
    font-size: 15px;
    line-height: 1.72;
    color: #e9dcc2;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb, rgba(255, 255, 255, 0.2)) transparent;
}

.hero-panel__info-title + .hero-panel__info-desc {
    margin-top: 0;
}

.hero-panel__info-head + .hero-panel__info-desc {
    margin-top: 0;
}

.hero-panel__info-desc--combined {
    display: flex;
    flex-direction: column;
    gap: 12px;
    white-space: normal;
}

.hero-panel__info-title + .hero-panel__info-desc--combined {
    margin-top: 2px;
}

.hero-panel__info-head + .hero-panel__info-desc--combined {
    margin-top: 2px;
}

.hero-panel__info-desc-block {
    white-space: pre-wrap;
}

.hero-panel__info-desc-block--rich {
    white-space: normal;
}

.hero-panel__info-desc-block.is-empty {
    color: var(--muted);
    opacity: 0.75;
    font-style: italic;
}

.hero-panel__info-desc-divider {
    flex: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        color-mix(in srgb, var(--line-bright, #7ea7ff) 58%, transparent) 18%,
        color-mix(in srgb, var(--line-bright, #7ea7ff) 58%, transparent) 82%,
        transparent 100%);
}

.hero-panel__info-mode {
    --story-guide-segment-w: 64px;
    align-self: center;
    height: 30px;
    margin: -6px 0 -4px;
    padding: 3px;
    border-radius: 8px;
}

.hero-panel__info-mode .story-guide-mode-segmented__thumb {
    top: 3px;
    left: 3px;
    height: calc(100% - 6px);
    border-radius: 6px;
}

.hero-panel__info-mode .story-guide-mode-segment {
    border-radius: 6px;
    font-size: 12px;
}

.hero-panel__info-desc::-webkit-scrollbar {
    width: 4px;
}

.hero-panel__info-desc::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb, rgba(255, 255, 255, 0.2));
    border-radius: 2px;
}

.hero-panel__info-desc.is-empty {
    color: var(--muted);
    opacity: 0.75;
    font-style: italic;
}

/* 翻按钮组：
 *   --group   ——『上一章/下一章』，置于右栏最顶部（切图）
 *   默认       ——『上一个/下一个』，置于最底部（同一图内按钮翻动）
 */
.hero-nav-btn {
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    color: #f8e3ad;
    background: rgba(15, 12, 8, 0.42);
    border: 1px solid rgba(248, 227, 173, 0.38);
    border-radius: 7px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(6px);
    cursor: pointer;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.9), 0 0 8px rgba(245, 158, 11, 0.28);
    transition:
        filter 0.15s ease,
        transform 0.05s ease;
}

.hero-nav-btn:hover:not([disabled]) {
    color: #fff3ce;
    background: rgba(15, 12, 8, 0.62);
    border-color: rgba(248, 227, 173, 0.68);
    filter: brightness(1.08);
    outline: none;
}

.hero-nav-btn:active:not([disabled]) {
    transform: translateY(1px);
}

.hero-nav-btn[disabled] {
    opacity: 0.72;
    cursor: not-allowed;
    color: rgba(248, 227, 173, 0.68);
    filter: grayscale(0.28) brightness(0.82);
}

/* -------- 响应式 -------- */
@media (max-width: 900px) {
    .hero-panel__grid {
        grid-template-columns: 1fr;
    }

    .hero-panel__info-col {
        min-height: 300px;
        padding: 18px;
    }

    .hero-panel__info-col::before {
        content: none;
    }

    .hero-panel__info-desc {
        max-height: 220px;
    }
}

@media (max-width: 520px) {
    .hero-panel {
        --hero-info-bg-w: clamp(300px, 88vw, 380px);
        padding: 12px;
    }

    .hero-chapter-selector__scroller {
        gap: 8px;
        padding-bottom: 6px;
    }

    .hero-chapter-chip {
        width: 138px;
        height: 81px;
        font-size: 13px;
    }

    .hero-chapter-chip__thumb {
        width: 100%;
        height: 100%;
    }

    .hero-panel__image-wrap {
        --hero-chapter-drawer-offset: 94px;
    }

    .hero-image-nav {
        inset: 8px;
    }

    .hero-image-nav__story-action {
        top: 44px;
    }

    .hero-dot__tooltip--record {
        max-width: min(220px, 58vw);
    }

    .hero-dot {
        width: var(--hero-dot-mobile-size, var(--hero-dot-size, 26px));
        height: var(--hero-dot-mobile-size, var(--hero-dot-size, 26px));
        font-size: var(--hero-dot-font-size, 11px);
    }
}
