/* VocabLab hub + semantic maps */

/* ---------- hub: two big square buttons */
.hub { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.hub-btn { position: relative; aspect-ratio: 1 / 1; width: 100%; border: 0; border-radius: 24px; color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; text-align: center; box-shadow: 0 6px 0 rgba(0,0,0,.2), 0 12px 24px rgba(0,0,0,.1); transition: transform .08s, box-shadow .08s; }
.hub-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.2); }
.hub-btn.decks { background: linear-gradient(155deg, #93d658, #4d982a); }
.hub-btn.maps { background: linear-gradient(155deg, #6ca6ea, #335fa5); }
.hub-ic .ic { width: clamp(52px, 17vw, 84px); height: clamp(52px, 17vw, 84px); stroke-width: 1.6; }
.hub-title { font-size: clamp(17px, 5vw, 23px); font-weight: 800; line-height: 1.1; }
.hub-sub { font-size: 13px; opacity: .92; }
.hub-badge { position: absolute; top: 12px; right: 12px; background: var(--gold); color: #5a3c00; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }

/* ---------- library */
.map-list { display: grid; gap: 8px; }
.map-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer; width: 100%; }
.map-thumb { height: 120px; border-radius: 10px; border: 1px solid var(--line); background-color: #f7faf3; background-image: radial-gradient(circle, #d3dfca 1px, transparent 1.3px); background-size: 16px 16px; overflow: hidden; }
.map-thumb svg { width: 100%; height: 100%; display: block; }

/* ---------- editor */
.mapedit { height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.mapedit .page-head { padding: max(10px, env(safe-area-inset-top)) 12px 8px; }
.map-title { flex: 1; min-width: 0; background: none; border: 0; text-align: left; font-size: 20px; font-weight: 700; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 2px; }
.mapwrap { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; background-color: #f7faf3; background-image: radial-gradient(circle, #c9d8bf 1.3px, transparent 1.6px); background-size: 28px 28px; border-top: 1px solid var(--line); }
.mapsvg { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', Arial, sans-serif; }
.mapwrap .mapsvg { cursor: grab; }
.mapsvg text { pointer-events: none; }
.mapsvg .nd { cursor: pointer; }
.mapsvg .nd .shape { filter: drop-shadow(0 2px 2px rgba(0,0,0,.12)); }
.mapsvg .nd.sel .shape { stroke: #ffc83d; stroke-width: 4.5; }
.mapsvg .nd.from .shape { stroke: #ffc83d; stroke-width: 5; animation: mapPulse 1s ease-in-out infinite; }
.mapsvg .lk { cursor: pointer; }
@keyframes mapPulse { 50% { stroke-opacity: .35; } }
.maphint { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); max-width: calc(100% - 24px); background: rgba(34,51,32,.88); color: #fff; font-size: 13px; padding: 7px 14px; border-radius: 999px; text-align: center; pointer-events: none; }
.maphint.armed { background: #d99a00; color: #2c1d00; font-weight: 700; }
.mapbar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; padding: 8px 10px max(10px, env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); min-height: 58px; }
.mapbar .btn { white-space: nowrap; }
.mapbar .ic { width: 18px; height: 18px; }
.sel-name { font-weight: 700; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-basis: 100%; text-align: center; }
.armed-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.pill.lt { padding: 4px 8px; display: inline-flex; }
.glyph { display: block; flex: none; }
.lt-list { display: flex; flex-direction: column; gap: 6px; }
.lt-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; width: 100%; }
.lt-row:not(.static):hover { border-color: var(--green); background: #f4fbec; }
.lt-row.static { cursor: default; }
.help { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.swatches { display: flex; gap: 8px; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.sw.on { box-shadow: 0 0 0 3px var(--ink); }
textarea.input { resize: vertical; min-height: 90px; }
