/* Claire's Achievement map (mc-map.js), in the spirit of the classic achievements screen: grey pixel
   stone, chunky bevelled tiles (gold = earned, silver = not yet), thick white connectors, pixel icons.
   A fixed-height viewport you drag and zoom; the same in light and dark site themes.
   Every class starts with mcm_ so nothing meets site.css. No images or game assets – CSS only. */

.mcm_panel {
    position: relative;
    overflow-anchor: none;
    max-width: 100%;
    padding: 8px;
    border: 2px solid #000;
    border-radius: 4px;
    background: #2a2a2a;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.35;
    color-scheme: dark;
    box-shadow: inset 2px 2px 0 #555555, inset -2px -2px 0 #141414;
}
.mcm_empty { margin: 0; padding: 16px 12px; color: #ffffff; text-shadow: 1px 1px 0 #3f3f3f; }

/* the viewport: fixed height, nothing scrolls natively – drag pans, wheel / pinch / buttons zoom */
.mcm_stage { position: relative; }
.mcm_view {
    position: relative;
    height: 520px;
    overflow: hidden;
    overflow-anchor: none;
    border: 2px solid #000;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    cursor: grab;
    /* grey pixel stone: 2 px "pixels" in a few greys, each layer repeating on its own period */
    background-color: #737373;
    background-image:
        conic-gradient(from 270deg at 2px 2px, #8c8c8c 0 25%, transparent 0),
        conic-gradient(from 270deg at 2px 2px, #7e7e7e 0 25%, transparent 0),
        conic-gradient(from 270deg at 2px 2px, #636363 0 25%, transparent 0),
        conic-gradient(from 270deg at 2px 2px, #5b5b5b 0 25%, transparent 0),
        conic-gradient(from 270deg at 2px 2px, #979797 0 25%, transparent 0),
        conic-gradient(from 270deg at 2px 2px, #6a6a6a 0 25%, transparent 0),
        conic-gradient(from 270deg at 2px 2px, #7a7a7a 0 25%, transparent 0),
        conic-gradient(from 270deg at 2px 2px, #858585 0 25%, transparent 0);
    background-size: 10px 6px, 6px 14px, 14px 10px, 18px 22px, 26px 14px, 8px 10px, 12px 8px, 22px 18px;
    background-position: 0 0, 4px 2px, 8px 4px, 12px 10px, 16px 2px, 6px 8px, 10px 2px, 2px 12px;
    box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.35);
}
.mcm_dragging .mcm_view, .mcm_dragging .mcm_tile { cursor: grabbing; }
.mcm_view:has(.mcm_empty) { height: auto; cursor: default; }
@media (max-width: 600px) { .mcm_view { height: 420px; } }

/* the world: the whole map, moved and scaled by one transform; transparent over the viewport's stone */
.mcm_world {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: 0 0;
    will-change: transform;
    overflow-anchor: none;
}

/* captions: the bot's name by the start tile, each tab's name over its root – white, dark shadow */
.mcm_caption {
    position: absolute;
    white-space: nowrap;
    pointer-events: none;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 14px;
    text-shadow: 1px 1px 0 #1e1e1e, 0 0 2px rgba(0, 0, 0, 0.6);
}
.mcm_start_name { font-size: 14px; line-height: 16px; }
.mcm_cap_count { color: #e6e6e6; font-weight: 600; font-size: 11px; font-variant-numeric: tabular-nums; }

/* zoom buttons, bottom-right: grey bevelled buttons like the game's */
.mcm_zoom { position: absolute; right: 8px; bottom: 8px; z-index: 5; display: flex; flex-direction: column; gap: 4px; }
.mcm_zbtn {
    min-width: 32px;
    height: 28px;
    margin: 0;
    padding: 0 6px;
    border: 2px solid #000;
    border-radius: 0;
    background: #6f6f6f;
    box-shadow: inset 2px 2px 0 #a9a9a9, inset -2px -2px 0 #4a4a4a;
    color: #ffffff;
    font: 700 15px/1 system-ui, sans-serif;
    text-shadow: 2px 2px 0 #3f3f3f;
    cursor: pointer;
}
.mcm_zbtn.mcm_zfit { font-size: 11px; }
.mcm_zbtn:hover { background: #7e88bf; box-shadow: inset 2px 2px 0 #b6bfee, inset -2px -2px 0 #4d567f; }
.mcm_zbtn:disabled { cursor: default; background: #4a4a4a; box-shadow: none; color: #a0a0a0; text-shadow: none; }
.mcm_zbtn:focus { outline: none; }
.mcm_zbtn:focus-visible { outline: 2px dashed #ffffff; outline-offset: 2px; }
.mcm_hint { margin: 6px 2px 0; color: #c8c8c8; font-size: 11px; text-shadow: 1px 1px 0 #000; }

/* connectors: thick white lines with a black outline, straight elbows, no arrowheads */
.mcm_lines { position: absolute; left: 0; top: 0; display: block; max-width: none; overflow: visible; }
.mcm_under path { fill: none; stroke: #000000; stroke-width: 7; stroke-linejoin: miter; stroke-linecap: square; shape-rendering: crispEdges; }
.mcm_line { fill: none; stroke: #ffffff; stroke-width: 4; stroke-linejoin: miter; stroke-linecap: square; shape-rendering: crispEdges; }
/* Claire's own prerequisite: a dashed yellow curve, outlined in black the same way */
.mcm_req_under { fill: none; stroke: #000000; stroke-width: 5; stroke-dasharray: 7 5; }
.mcm_req { fill: none; stroke: #ffd84a; stroke-width: 2.5; stroke-dasharray: 7 5; }

/* a tile: the button holds a bevelled frame, a flat face and the pictogram */
.mcm_tile {
    position: absolute;
    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease;
    /* not earned yet: silver */
    --mcm-face: #c6c6c6; --mcm-lt: #ffffff; --mcm-dk: #8b8b8b; --mcm-ring: transparent; --mcm-ring-w: 0px;
}
.mcm_tile:hover { transform: scale(1.06); z-index: 2; }
.mcm_tile:focus { outline: none; }
.mcm_tile:focus-visible { outline: 2px dashed #ffffff; outline-offset: 6px; z-index: 3; }
.mcm_tile > span { pointer-events: none; }
.mcm_frame, .mcm_face { position: absolute; display: block; }
.mcm_frame {
    inset: 0;
    background: var(--mcm-face);
    box-shadow: 0 0 0 1px #000000, inset 3px 3px 0 var(--mcm-lt), inset -3px -3px 0 var(--mcm-dk);
}
.mcm_face {
    inset: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mcm-face);
    box-shadow: inset 0 0 0 var(--mcm-ring-w) var(--mcm-ring);
}
.mcm_pic { display: block; pointer-events: none; }
/* pixel sprite: drawn at 16 px, shown at 32 px with hard pixels */
.mcm_sprite {
    width: 32px;
    height: 32px;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    -webkit-user-drag: none;
    filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.32));
}
/* plain emoji when a canvas can't be used */
span.mcm_pic {
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
    font-size: 24px;
    line-height: 1;
    filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.32));
}
span.mcm_pic.mcm_letter { font: 800 21px/1 ui-monospace, Consolas, monospace; color: #ffffff; text-shadow: 2px 2px 0 #3f3f3f; filter: none; }
.mcm_badge {
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 15px;
    height: 15px;
    border: 1px solid #000;
    border-radius: 50%;
    background: #1a1a1a;
    font-size: 9px;
    font-weight: 800;
    line-height: 13px;
    text-align: center;
}

/* frames: task square, goal rounded, challenge spiky – all bevelled */
.mcm_f_goal, .mcm_f_goal .mcm_frame { border-radius: 14px; }
.mcm_f_goal .mcm_face { border-radius: 11px; }
.mcm_f_challenge { border-radius: 50%; }
.mcm_f_challenge::before, .mcm_f_challenge .mcm_frame {
    clip-path: polygon(50% 0%, 58% 9.8%, 69.1% 3.8%, 72.8% 15.9%, 85.4% 14.6%, 84.1% 27.2%, 96.2% 30.9%, 90.2% 42%,
        100% 50%, 90.2% 58%, 96.2% 69.1%, 84.1% 72.8%, 85.4% 85.4%, 72.8% 84.1%, 69.1% 96.2%, 58% 90.2%,
        50% 100%, 42% 90.2%, 30.9% 96.2%, 27.2% 84.1%, 14.6% 85.4%, 15.9% 72.8%, 3.8% 69.1%, 9.8% 58%,
        0% 50%, 9.8% 42%, 3.8% 30.9%, 15.9% 27.2%, 14.6% 14.6%, 27.2% 15.9%, 30.9% 3.8%, 42% 9.8%);
}
.mcm_f_challenge::before { content: ""; position: absolute; inset: -2px; background: #000000; pointer-events: none; }
.mcm_f_challenge .mcm_frame {
    inset: 0;
    box-shadow: none;
    background: linear-gradient(135deg, var(--mcm-lt) 0%, var(--mcm-lt) 22%, var(--mcm-face) 38%, var(--mcm-face) 62%, var(--mcm-dk) 78%, var(--mcm-dk) 100%);
}
.mcm_f_challenge .mcm_face {
    inset: 6px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), inset 0 0 0 var(--mcm-ring-w) var(--mcm-ring);
}

/* status looks: earned = gold; the rest silver with a small cue */
.mcm_s_done { --mcm-face: #b88a2a; --mcm-lt: #e0b54a; --mcm-dk: #7a5a14; }
.mcm_s_done .mcm_badge { color: #ffe27a; }
.mcm_s_running { filter: drop-shadow(0 0 6px rgba(80, 150, 255, 0.85)); animation: mcm_pulse 1.8s ease-in-out infinite; }
.mcm_s_running .mcm_badge { color: #8fc0ff; font-size: 7px; }
.mcm_s_open { --mcm-ring: #e8a317; --mcm-ring-w: 2px; }
.mcm_s_failed { --mcm-ring: #d42a1e; --mcm-ring-w: 3px; }
.mcm_s_failed .mcm_badge { color: #ff6b5e; }
/* Unearned tiles keep their item in colour, like the game's screen (Trish 27 Nov: all-grey icons were
   unreadable with 100 of 110 planned); planned is only a touch softer. */
.mcm_s_blocked .mcm_pic { filter: saturate(0.9) drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.32)); }
.mcm_s_planned { --mcm-face: #b4b4b4; --mcm-lt: #dcdcdc; --mcm-dk: #7a7a7a; }
.mcm_s_planned .mcm_pic { filter: saturate(0.8) drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.3)); }
.mcm_s_planned span.mcm_pic.mcm_letter { color: #ececec; filter: none; }

/* the start tile (the bot): a gold tile, the map's hub */
.mcm_start { --mcm-face: #b88a2a; --mcm-lt: #e0b54a; --mcm-dk: #7a5a14; cursor: default; }
.mcm_start:hover { transform: none; }

/* the picked one: a white ring between black lines */
.mcm_sel { box-shadow: 0 0 0 2px #000000, 0 0 0 5px #ffffff, 0 0 0 6px #000000; z-index: 2; }
.mcm_f_goal.mcm_sel { border-radius: 14px; }

/* "New today": the same warm gold as the neural and star maps (rgb 255 228 160 + gold glow).
   Done in the window: a pixel NEW tag on the bottom-left corner (the top is the tab caption's, the
   bottom-right the status badge's), a solid gold ring and a slow glow.
   Unlocked by a new / just-learned skill: only a soft dashed gold ring. */
.mcm_new, .mcm_helped { --mcm-new: #ffe4a0; }
.mcm_new::after, .mcm_helped::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: inherit;
    pointer-events: none;
}
.mcm_new::after { border: 3px solid var(--mcm-new); box-shadow: 0 0 0 1px #000000, inset 0 0 0 1px #000000; }
.mcm_helped::after { inset: -4px; border: 2px dashed rgba(255, 228, 160, 0.8); }
.mcm_f_challenge.mcm_new::after, .mcm_f_challenge.mcm_helped::after { border-radius: 50%; }
.mcm_f_goal.mcm_new::after, .mcm_f_goal.mcm_helped::after { border-radius: 18px; }
.mcm_sel.mcm_new::after, .mcm_sel.mcm_helped::after { inset: -9px; } /* outside the picked ring */
.mcm_new { z-index: 1; filter: drop-shadow(0 0 6px rgba(255, 200, 90, 0.85)); animation: mcm_newglow 2.6s ease-in-out infinite; }
.mcm_new_tag {
    position: absolute;
    left: -9px;
    bottom: -8px;
    z-index: 1;
    padding: 2px 3px 1px;
    border: 1px solid #000000;
    background: var(--mcm-new);
    box-shadow: inset 1px 1px 0 #fff6d8, inset -1px -1px 0 #c8962a, 1px 1px 0 rgba(0, 0, 0, 0.55);
    color: #3a2600;
    font: 800 8px/1 ui-monospace, Consolas, monospace;
    letter-spacing: 0.5px;
    text-shadow: none;
}
.mcm_hint_new { margin-left: 8px; color: #ffe4a0; font-weight: 700; }
.mcm_hint_new::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border: 1px solid #000;
    background: #ffe4a0;
    vertical-align: 0;
}
.mcm_tip_new { margin-top: 2px; color: #ffe4a0; font-size: 12px; font-weight: 700; }
.mcm_tip_new.mcm_tip_help { color: #f1d9a0; font-size: 11px; font-weight: 600; }
.mcm_key.mcm_k_new .mcm_swatch { background: #ffe4a0; box-shadow: 0 0 0 1px #000, 0 0 5px rgba(255, 200, 90, 0.9); }

@keyframes mcm_newglow {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 200, 90, 0.6)); }
    50% { filter: drop-shadow(0 0 11px rgba(255, 214, 120, 1)); }
}

@keyframes mcm_pulse {
    0%, 100% { filter: drop-shadow(0 0 3px rgba(80, 150, 255, 0.6)); }
    50% { filter: drop-shadow(0 0 10px rgba(110, 175, 255, 1)); }
}

/* tooltip: dark violet box, like the game's */
.mcm_tip {
    position: absolute;
    z-index: 10;
    max-width: 230px;
    padding: 6px 9px;
    border: 2px solid #2b0f63;
    border-radius: 3px;
    background: rgba(16, 2, 18, 0.95);
    box-shadow: 0 0 0 1px #000, 0 4px 14px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    text-shadow: 1px 1px 0 #000;
}
.mcm_tip[hidden] { display: none; }
.mcm_tip > * { display: block; }
.mcm_tip_title { color: #ffffff; font-size: 13px; font-weight: 700; }
.mcm_tip_status { margin-top: 1px; font-size: 12px; color: #bdbdbd; }
.mcm_tip_status.mcm_t_done { color: #ffd75e; }
.mcm_tip_status.mcm_t_running { color: #a9c8ff; }
.mcm_tip_status.mcm_t_open { color: #ffcf6b; }
.mcm_tip_status.mcm_t_failed { color: #ff8a7c; }
.mcm_tip_status.mcm_t_blocked, .mcm_tip_status.mcm_t_planned { color: #a0a0a0; }
.mcm_tip_more { margin-top: 2px; color: #9a9a9a; font-size: 11px; }

/* legend under the map: hidden – the page shows the same legend above it (set display: flex to show) */
.mcm_legend { display: none; flex-wrap: wrap; gap: 4px 14px; margin: 12px 2px 0; color: #e0e0e0; font-size: 11px; text-shadow: 1px 1px 0 #000; }
.mcm_key {
    display: inline-flex; align-items: center; gap: 6px; animation: none; filter: none;
    --mcm-face: #c6c6c6; --mcm-lt: #ffffff; --mcm-dk: #8b8b8b; --mcm-ring: transparent; --mcm-ring-w: 0px;
}
.mcm_key.mcm_s_done { --mcm-face: #b88a2a; --mcm-lt: #e0b54a; --mcm-dk: #7a5a14; }
.mcm_key.mcm_s_open { --mcm-ring: #e8a317; --mcm-ring-w: 2px; }
.mcm_key.mcm_s_failed { --mcm-ring: #d42a1e; --mcm-ring-w: 3px; }
.mcm_key.mcm_s_planned { --mcm-face: #a9a9a9; --mcm-lt: #d4d4d4; --mcm-dk: #747474; }
.mcm_swatch {
    width: 14px;
    height: 14px;
    background: var(--mcm-face);
    box-shadow: 0 0 0 1px #000, inset 2px 2px 0 var(--mcm-lt), inset -2px -2px 0 var(--mcm-dk), inset 0 0 0 var(--mcm-ring-w) var(--mcm-ring);
}

@media (prefers-reduced-motion: reduce) {
    .mcm_s_running { animation: none; }
    .mcm_new { animation: none; }
    .mcm_tile { transition: none; }
    .mcm_tile:hover { transform: none; }
}

/* one box per source (28 Nov 2026): Minecraft on a dark wash, each mod on its own tint; name on top */
.mcm_pack {
    position: absolute;
    pointer-events: none;
    border: 2px solid rgba(0, 0, 0, 0.55);
    border-radius: 6px;
    background: hsla(var(--pack-hue, 205), 45%, 32%, 0.55);
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.14), inset -2px -2px 0 rgba(0, 0, 0, 0.28);
}
.mcm_pack_game { background: rgba(24, 24, 24, 0.32); }
.mcm_pack_title {
    position: absolute;
    left: 26px;
    top: 7px;
    white-space: nowrap;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    line-height: 16px;
    text-shadow: 1px 1px 0 #1e1e1e, 0 0 2px rgba(0, 0, 0, 0.6);
}
