/* Start anywhere, grow both ways (onboarding, owner's picks 2026-11-10):
   New Map's ladder picker, the zoom ladder, the level list, the welcome and
   guided first run, the Help menu, What's new and "New" pips. */

/* ---- New Map: "Where do you want to start?" (S2, the ladder picker) -------- */
.new-map-start {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.new-map-start-title {
    margin: 0;
    font-size: 18px;
    font-weight: var(--font-semibold, 600);
    color: var(--text-primary);
}

.new-map-start-lead,
.new-map-advanced-note {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.45;
}

.new-map-start-ladder {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 16px;
    align-items: start;
    margin-top: 6px;
}

.new-map-start-rungs {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.new-map-start-rung {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 5px 12px 5px 8px;
    border-radius: 10px;
    border: 1px dashed rgba(138, 153, 180, 0.28);
    background: rgba(8, 11, 18, 0.45);
    color: var(--text-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--transition-fast, .15s), background var(--transition-fast, .15s);
}

.new-map-start-rung:hover {
    border-color: rgba(124, 92, 255, 0.55);
}

.new-map-start-rung[data-state="in"] {
    border-style: solid;
    border-color: rgba(124, 92, 255, 0.35);
    background: rgba(124, 92, 255, 0.08);
}

.new-map-start-rung.active {
    border-style: solid;
    border-color: var(--accent-primary);
    background: rgba(124, 92, 255, 0.55);
}

.new-map-start-rung:focus-visible,
.new-map-advanced-summary:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.new-map-start-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    color: #b9b2ff;
}

.new-map-start-rung.active .new-map-start-icon {
    color: #fff;
}

.new-map-start-icon svg {
    width: 19px;
    height: 19px;
}

.new-map-start-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    font-weight: var(--font-semibold, 600);
}

.new-map-rung-direction {
    flex: 0 0 auto;
    color: var(--text-secondary);
    font-size: 11.5px;
    white-space: nowrap;
}

.new-map-start-rung[data-state="in"] .new-map-rung-direction {
    color: #c4b5fd;
}

.new-map-start-rung.active .new-map-rung-direction {
    color: #fff;
    font-weight: 600;
}

.new-map-start-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.025);
}

.new-map-start-panel[hidden] {
    display: none;
}

.new-map-start-panel-title {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
}

.new-map-start-panel-lead,
.new-map-start-way {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.5;
}

.new-map-start-way {
    display: flex;
    gap: 9px;
}

.new-map-start-way strong {
    color: var(--text-primary);
}

.new-map-start-arrow {
    flex: 0 0 auto;
    color: #f5c451;
    font-weight: 700;
}

.new-map-start-panel .form-group {
    margin: 4px 0 0;
}

.new-map-advanced {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.new-map-advanced-summary {
    padding: 10px 14px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
}

.new-map-advanced[open] .new-map-advanced-summary {
    color: var(--text-primary);
}

.new-map-advanced > :not(summary) {
    margin: 0 14px 12px;
}

@media (max-width: 760px) {
    .new-map-start-ladder {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .new-map-start-rung {
        min-height: 38px;
    }
}

/* ---- A: the zoom ladder (between + and −) -------------------------------- */
.zoom-stack--ladder {
    width: 46px;
    overflow: visible;
}

.zoom-stack__readout--ladder {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    padding: 0 !important;
}

/* The level chip above the stack repeats what the ladder's tag says. */
.zoom-tier-tag--ladder {
    display: none !important;
}

.level-ladder {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.level-ladder--wide {
    width: 236px;
    margin-left: -190px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(20, 27, 38, 0.97) 0%, rgba(11, 16, 23, 0.97) 100%);
    box-shadow: var(--shadow-md, 0 8px 24px rgba(0, 0, 0, .35));
    z-index: 2;
}

.level-rung {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 36px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--text-secondary, #a0aec0);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.level-rung:hover,
.level-rung:focus-visible {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary, #fff);
    outline: none;
}

.level-rung:focus-visible {
    box-shadow: 0 0 0 2px var(--accent-primary) inset;
}

.level-rung-icon {
    display: inline-flex;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.level-rung-icon svg {
    width: 19px;
    height: 19px;
}

.level-rung-text {
    display: none;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.level-ladder--wide .level-rung-text {
    display: flex;
}

.level-rung-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.level-rung-name {
    overflow: hidden;
    max-width: 170px;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.level-rung--current {
    color: #fff;
}

.level-rung--current .level-rung-icon {
    border-radius: 8px;
    background: var(--accent-primary, #667eea);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.22);
}

.level-rung-marker {
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #facc15;
}

.level-rung--ghost {
    opacity: .38;
}

.level-rung--add {
    opacity: .6;
    color: #c4b5fd;
}

.level-rung--add .level-rung-name {
    color: #c4b5fd;
}

.level-rung--target .level-rung-icon {
    animation: level-rung-target 0.9s ease-in-out infinite;
}

@keyframes level-rung-target {
    50% { color: #facc15; transform: scale(1.12); }
}

.level-ladder-tag {
    position: absolute;
    right: 56px;
    top: calc(var(--rung-top, 100px) + 38px);
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    max-width: 260px;
    padding: 6px 12px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(13, 17, 25, 0.9);
    color: #fff;
    font-size: 13px;
    white-space: nowrap;
    transform: translateY(-50%);
    pointer-events: none;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: top 160ms ease;
}

.zoom-dock:has(.level-ladder--wide) .level-ladder-tag,
.canvas-container:has(> .grow-card) .level-ladder-tag {
    opacity: 0;
}

.level-ladder-tag-level {
    color: #c4b5fd;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.level-ladder-tag-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

.level-ladder-tip {
    position: absolute;
    right: 76px;
    bottom: 96px;
    z-index: 13;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 250px;
    max-width: 260px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(250, 204, 21, 0.45);
    background: rgba(13, 17, 25, 0.96);
    color: var(--text-secondary, #cbd5e1);
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.level-ladder-tip strong {
    color: #fff;
}

.level-ladder-tip-close {
    align-self: flex-end;
    min-height: 28px;
    margin-top: 4px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font: inherit;
    cursor: pointer;
}

/* Phones: a slim strip on the right edge; a tap opens the list as a sheet. */
.level-strip {
    display: none;
}

@media (max-width: 767px) {
    .level-strip {
        position: fixed;
        right: 8px;
        top: 50%;
        z-index: 60;
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 6px 4px;
        border-radius: 18px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(13, 17, 25, 0.86);
        transform: translateY(-50%);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
    .level-strip .level-rung {
        justify-content: center;
        width: 36px;
        min-height: 30px;
        padding: 0;
    }
    .level-strip .level-rung-marker {
        display: none;
    }
    .level-strip .level-rung--current .level-rung-icon {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
        border-radius: 999px;
    }
    .level-strip-tag {
        position: absolute;
        right: 48px;
        top: 50%;
        padding: 6px 12px;
        border-radius: 999px;
        background: var(--accent-primary, #667eea);
        color: #fff;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        transform: translateY(-50%);
        pointer-events: none;
        animation: level-strip-tag 3.2s ease forwards;
    }
    @keyframes level-strip-tag {
        0%, 70% { opacity: 1; }
        100% { opacity: 0; }
    }
}

/* ---- B: the level list (breadcrumb popover, phone sheet) ------------------ */
.level-crumb-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: 4px;
    padding: 0;
    border: 1px solid rgba(124, 92, 255, 0.45);
    border-radius: 7px;
    background: rgba(124, 92, 255, 0.12);
    color: #c4b5fd;
    vertical-align: middle;
    cursor: pointer;
}

.level-crumb-button:hover,
.level-crumb-button[aria-expanded="true"] {
    background: rgba(124, 92, 255, 0.3);
    color: #fff;
}

.level-crumb-button:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.level-crumb-button svg {
    width: 15px;
    height: 15px;
}

/* The list's button stays inside the current crumb's clip: the counts give
   way first, then the name. (Clipped, focusing it would scroll the crumb and
   cut the start of the name.) Narrow screens keep their one-line crumb. */
@media (min-width: 1025px) {
    .breadcrumb #viewName > .nav-crumb--current:not([data-level="interior"]) {
        display: flex;
        align-items: center;
        gap: 0.3em;
    }

    .breadcrumb #viewName > .nav-crumb--current:not([data-level="interior"]) > * {
        flex: none;
        min-width: 0;
    }

    /* Not shrunk with the counts (a fraction of a pixel would ellipsise it):
       capped so the level tag and the button still fit beside it. */
    .breadcrumb #viewName > .nav-crumb--current:not([data-level="interior"]) > :is(.breadcrumb-title, strong) {
        max-width: min(32ch, calc(100% - 9rem));
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .breadcrumb #viewName > .nav-crumb--current:not([data-level="interior"]) > .breadcrumb-stats {
        flex-shrink: 100;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* The current level is never cut off; a long trail folds its middle. */
.breadcrumb #viewName > .nav-crumb--current .nav-crumb-tier {
    white-space: nowrap;
    flex-shrink: 0;
}

.breadcrumb-trail--long > .nav-crumb--link:not(:first-child):not(:nth-last-child(-n+3)) {
    display: none;
}

.breadcrumb-trail--long > .nav-crumb--link:first-child + .breadcrumb-sep::after {
    content: ' … ›';
}

.level-list {
    position: fixed;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: min(360px, calc(100vw - 24px));
    max-height: min(70vh, 640px);
    overflow-y: auto;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: #121826;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
    color: var(--text-primary, #fff);
}

.level-list--sheet {
    left: 0 !important;
    right: 0;
    top: auto !important;
    bottom: 0;
    width: 100%;
    max-height: 78vh;
    padding: 6px 12px max(14px, env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
}

.level-list-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1199;
    background: rgba(2, 6, 14, 0.5);
}

.level-list-grab {
    align-self: center;
    width: 42px;
    height: 4px;
    margin: 4px 0 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.22);
}

.level-list-heading {
    margin: 8px 8px 4px;
    color: var(--text-secondary, #a0aec0);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.level-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

button.level-list-row:hover,
button.level-list-row:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    outline: none;
}

.level-list-row--current {
    border-color: rgba(124, 92, 255, 0.6);
    background: rgba(124, 92, 255, 0.16);
}

.level-list-row--hint {
    cursor: default;
    opacity: .8;
}

.level-list-row--add .level-list-name {
    color: #c4b5fd;
}

.level-list-icon {
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #b9b2ff;
}

.level-list-row--current .level-list-icon {
    background: var(--accent-primary, #667eea);
    color: #fff;
}

.level-list-icon--add {
    border: 1px dashed rgba(255, 255, 255, 0.25);
    background: transparent;
    font-size: 20px;
}

.level-list-icon svg {
    width: 20px;
    height: 20px;
}

.level-list-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.level-list-name {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.level-list-sub {
    color: var(--text-secondary, #a0aec0);
    font-size: 12px;
}

.level-list-check {
    color: #c4b5fd;
    font-size: 16px;
}

.level-list-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 8px 6px 2px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-secondary, #a0aec0);
    font-size: 12px;
    line-height: 1.4;
}

/* Phones: the header names the level beside the map's name and opens the
   list (the breadcrumb's own list button is left out there). */
.mobile-level-button {
    display: none;
}

@media (max-width: 767px) {
    .mobile-level-button {
        display: inline-flex;
        flex: none;
        align-items: center;
        gap: 1px;
        min-height: 40px;
        padding: 0 2px 0 6px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        color: #c4b5fd;
        font: inherit;
        cursor: pointer;
    }
    .mobile-level-button svg {
        width: 14px;
        height: 14px;
    }
    .mobile-level-button-level {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .06em;
        text-transform: uppercase;
    }
    /* The wordmark gives way to the level and the map name; the name takes
       the room up to the chip (sized to its content, the crumb's negative
       margins left it a few pixels short). */
    .topbar-left:has(.mobile-level-button) .mobile-logo-wordmark {
        display: none !important;
    }
    .topbar-left:has(.mobile-level-button) .breadcrumb #viewName {
        flex: 1 1 auto;
        padding-right: 0;
    }
    .topbar-left:has(.mobile-level-button) .breadcrumb .nav-crumb--current {
        flex: 1 1 auto;
    }
}

/* Narrow screens show only the current crumb: the name gives way (one
   ellipsis, its own) and the list button stays. */
@media (max-width: 1024px) {
    .topbar-left .breadcrumb .nav-crumb--current:has(.level-crumb-button) {
        display: flex;
        align-items: center;
        gap: 4px;
    }
    .topbar-left .breadcrumb .nav-crumb--current:has(.level-crumb-button) > .breadcrumb-title {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* Over style.css's narrow-crumb "everything inline" rule. */
    .topbar-left .breadcrumb .nav-crumb--current .level-crumb-button {
        display: inline-flex;
        flex: none;
    }
}

@media (max-width: 767px) {
    .topbar-left .breadcrumb .nav-crumb--current .level-crumb-button {
        display: none;
    }
}

/* ---- The welcome, guided tours and empty states (quickstart.js) ------------- */
.quickstart .quickstart-eyebrow { padding-right: 28px; }

.quickstart .quickstart-label {
    margin: 10px 0 6px;
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #9aa7bb;
}

.quickstart-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.quickstart .quickstart-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #ffffff26;
    border-radius: 999px;
    background: #ffffff0d;
    color: #eaf0f8;
    font-size: 13px;
}

.quickstart .quickstart-chip:hover {
    border-color: #ab9aea;
    background: #6557b433;
}

.quickstart-chip-icon,
.quickstart-chip-icon svg {
    display: inline-flex;
    width: 16px;
    height: 16px;
}

.quickstart .quickstart-links {
    margin-top: 10px;
}

.quickstart .quickstart-body {
    color: #d3dbe8;
}

.quickstart .quickstart-fine {
    font-size: 12px;
    color: #9aa7bb;
}

.quickstart-dots {
    display: flex;
    gap: 5px;
    margin: 4px 0 2px;
}

.quickstart-dot {
    width: 18px;
    height: 4px;
    border-radius: 2px;
    background: #ffffff1f;
}

.quickstart-dot.seen { background: #8676b8; }
.quickstart-dot.active { background: #f5c542; }

.quickstart-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.quickstart .quickstart-primary--inline {
    width: auto;
    margin: 0;
    padding: 8px 18px;
}

.quickstart-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 2px;
}

.quickstart-progress[hidden] { display: none; }

.quickstart-progress-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #f5c542 var(--progress, 0%), #ffffff1f var(--progress, 0%));
}

.quickstart-progress-text {
    font-size: 12px;
    color: #b8c4d6;
    font-variant-numeric: tabular-nums;
}

.quickstart-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 10px 0 0;
    font-size: 12px;
    color: #9aa7bb;
}

.quickstart-field input {
    padding: 9px 11px;
    border: 1px solid #ffffff2e;
    border-radius: 8px;
    background: #0e141df0;
    color: #eaf0f8;
    font: 15px/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.quickstart-field input:focus {
    outline: 2px solid #ab9aea;
    outline-offset: 1px;
}

.quickstart-styles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.quickstart .quickstart-style {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px;
    border: 1px solid #ffffff1f;
    border-radius: 10px;
    background: #ffffff08;
    color: #eaf0f8;
    text-align: left;
}

.quickstart .quickstart-style img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 7px;
    background: #0e141d;
}

.quickstart .quickstart-style.active {
    border-color: #f5c542;
    box-shadow: 0 0 0 1px #f5c542 inset;
}

.quickstart-style-name {
    padding: 0 4px 2px;
    font-size: 12px;
}

.quickstart-style-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #18202cdd;
    color: #f5d27a;
    font-size: 10px;
}

.quickstart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.quickstart .quickstart-action {
    padding: 8px 14px;
    border: 1px solid #ab9aea;
    border-radius: 8px;
    background: #6557b4;
    color: #fff;
}

.quickstart .quickstart-action--ghost {
    background: transparent;
    color: #d7cdfc;
    border-color: #ffffff33;
}

.quickstart-showme {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 10px;
}

.quickstart .quickstart-showme-item {
    padding: 8px 10px;
    border: 1px solid #ffffff26;
    border-radius: 8px;
    background: #ffffff0a;
    color: #eaf0f8;
    font-size: 13px;
    text-align: left;
}

.quickstart .quickstart-showme-item:hover { border-color: #ab9aea; }

/* The control a step points at. */
.quickstart-target {
    position: relative;
    outline: 2px solid #f5c542 !important;
    outline-offset: 2px;
    border-radius: 8px;
    animation: quickstart-target-pulse 1.6s ease-in-out infinite;
}

@keyframes quickstart-target-pulse {
    0%, 100% { box-shadow: 0 0 0 0 #f5c54266; }
    50% { box-shadow: 0 0 0 6px #f5c54200; }
}

@media (prefers-reduced-motion: reduce) {
    .quickstart-target { animation: none; }
}

.sidebar-right--guide .quickstart--docked {
    border-color: #f5c54266;
}

/* Phones: one short card above the tool shelf, and no second empty-map hint. */
@media (max-width: 1024px) {
    body.quickstart-open .m-empty-hint { display: none !important; }
    .quickstart--floating.quickstart--guide,
    .quickstart--floating.quickstart--empty {
        max-height: calc(100dvh - 300px);
    }
    .quickstart--floating .quickstart-styles {
        grid-template-columns: repeat(3, 1fr);
    }
    .quickstart--floating .quickstart-body { margin: 4px 0; }
}

/* A one-step "Show me" line beside the control it is about. */
.quickstart-coach {
    position: fixed;
    z-index: 1200;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 300px;
    max-width: calc(100vw - 24px);
    padding: 10px 12px;
    border: 1px solid #f5c54266;
    border-radius: 10px;
    background: #18202cf5;
    color: #eaf0f8;
    font: 13px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-shadow: 0 12px 36px #0008;
}

.quickstart-coach--center {
    left: 50%;
    top: 84px;
    transform: translateX(-50%);
}

.quickstart-coach button {
    margin-left: auto;
    border: 0;
    background: none;
    color: #c9c6dd;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.quickstart-coach-new,
.new-pip {
    flex: none;
    padding: 1px 6px;
    border-radius: 999px;
    background: #f5c542;
    color: #1b1406;
    font: 700 10px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* "New" pips: on a tool the first few visits, gone after one use. */
.has-new-pip { position: relative; }

.new-pip {
    position: absolute;
    top: -6px;
    right: -6px;
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 1px 4px #0006;
}

/* ---- The Help menu ------------------------------------------------------------ */
.help-dropdown .header-btn-icon { position: relative; }

.help-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #f5c542;
    color: #1b1406;
    font: 700 10px/16px -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-align: center;
}

.help-badge[hidden] { display: none; }

.help-menu { min-width: 280px; }

.help-menu-item {
    width: 100%;
    border: 0;
    background: none;
    font: inherit;
    text-align: left;
}

.help-menu-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.help-menu-sub {
    color: var(--text-secondary);
    font-size: 12px;
}

.help-menu-badge {
    min-width: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f5c542;
    color: #1b1406;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

@media (max-width: 767px) {
    .help-dropdown { display: none !important; }
}

/* ---- What's new ---------------------------------------------------------------- */
.whats-new {
    position: fixed;
    top: 64px;
    right: 16px;
    z-index: 1150;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 96px);
    overflow: auto;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 18px 50px #0007;
}

.whats-new-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.whats-new-head h2 {
    margin: 0;
    font: 500 20px/1.2 Georgia, serif;
}

.whats-new-close {
    border: 0;
    background: none;
    color: var(--text-secondary);
    font-size: 22px;
    cursor: pointer;
}

.whats-new-list {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.whats-new-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
}

.whats-new-item div {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}

.whats-new-item span { color: var(--text-secondary); }

.whats-new-item--unseen strong::after {
    content: 'New';
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f5c542;
    color: #1b1406;
    font-size: 10px;
    text-transform: uppercase;
    vertical-align: 2px;
}

.whats-new-show {
    flex: none;
    padding: 6px 10px;
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
}

@media (max-width: 767px) {
    .whats-new {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: auto;
        max-width: none;
        border-radius: 16px 16px 0 0;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
}

/* ---- Growing a map: the edge card, its ring, Rename and Undo (level-growth.js) -- */
.grow-card {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 840;
    width: 380px;
    max-width: calc(100% - 32px);
    padding: 16px 18px;
    transform: translateX(-50%);
    border: 1px solid #8676b86b;
    border-radius: 16px;
    background: #18202cf5;
    color: #eaf0f8;
    font: 14px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-shadow: 0 16px 60px #0007;
}

.grow-card h2 {
    margin: 4px 0 6px;
    font: 500 20px/1.2 Georgia, serif;
}

.grow-card-eyebrow {
    margin: 0;
    color: #bbaaf4;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.grow-card-line,
.grow-card-fine {
    margin: 4px 0;
    color: #b8c4d6;
}

.grow-card-fine { font-size: 12px; color: #9aa7bb; }

.grow-card-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 0;
    background: none;
    color: #c9c6dd;
    font-size: 20px;
    cursor: pointer;
}

.grow-card-choices {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0 6px;
}

.grow-card-primary,
.grow-card-option,
.grow-card-map {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border-radius: 9px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.grow-card-primary {
    border: 1px solid #ab9aea;
    background: #6557b4;
    color: #fff;
}

.grow-card-option,
.grow-card-map {
    border: 1px solid #ffffff26;
    background: #ffffff0a;
    color: #eaf0f8;
}

.grow-card-option:hover,
.grow-card-map:hover { border-color: #ab9aea; }

.grow-card button:focus-visible {
    outline: 3px solid #c1adff;
    outline-offset: 2px;
}

.grow-ring {
    --grow-progress: 0;
    flex: none;
    width: 24px;
    height: 24px;
}

.grow-ring svg {
    width: 24px;
    height: 24px;
    transform: rotate(-90deg);
}

.grow-ring circle {
    fill: none;
    stroke-width: 3;
}

.grow-ring-track { stroke: #ffffff40; }

.grow-ring-fill {
    stroke: #f5c542;
    stroke-linecap: round;
    stroke-dasharray: calc(var(--grow-progress) * 100) 100;
    transition: stroke-dasharray 120ms linear;
}

.grow-card-picker[hidden] { display: none; }

.grow-card-label {
    margin: 8px 0 4px;
    font-size: 12px;
    color: #9aa7bb;
}

.grow-card-maps {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 180px;
    margin: 0;
    padding: 0;
    overflow: auto;
    list-style: none;
}

.grow-card-map span {
    margin-left: auto;
    color: #9aa7bb;
    font-size: 12px;
}

/* Text on the first line, Rename and Undo under it ('.notification button'
   sizes every button as the 24 px close cross, so these are sized here). */
.grow-toast { flex-wrap: wrap; max-width: 420px; }
.grow-toast .notification-text { flex: 1 1 calc(100% - 60px); }
.grow-toast .notification-action-btn {
    width: auto;
    height: auto;
    min-height: 30px;
    padding: 5px 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
}
.grow-toast .notification-action-btn:first-of-type { margin-left: 20px; }
.grow-toast .notification-action-btn[data-grow-undo] { border-color: var(--accent-primary); }
.grow-toast > button:last-child { order: -1; margin-left: auto; }
.grow-toast::before { order: -3; }
.grow-toast .notification-text { order: -2; }

@media (max-width: 767px) {
    .grow-card {
        bottom: calc(150px + env(safe-area-inset-bottom, 0px));
        width: auto;
        left: 12px;
        right: 12px;
        max-width: none;
        transform: none;
    }
}
