@font-face{font-family:'DM Sans';src:url('/fonts/dm-sans-latin.woff2') format('woff2');font-weight:400 700;font-display:swap}@font-face{font-family:'Fraunces';src:url('/fonts/fraunces-latin.woff2') format('woff2');font-weight:600 700;font-display:swap}
:root{--bg:#f7f8f5;--ink:#25302d;--muted:#65736d;--line:#dfe5df;--teal:#237e72;--teal-soft:#e3f3ee;--orange:#e8925c;--red:#b55342;--sidebar:320px;--top:62px}
*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden}body{font:14px/1.4 'DM Sans',sans-serif;color:var(--ink);background:var(--bg)}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid var(--teal);outline-offset:2px}::selection{background:#b3e3d5;color:var(--ink)}.app{height:100dvh;display:flex;flex-direction:column}.topbar{height:var(--top);flex:none;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 22px;background:#fff;z-index:10}.identity,.top-actions{display:flex;align-items:center;gap:13px}.brand{font-family:'Fraunces',Georgia,serif;font-size:22px;font-weight:700;letter-spacing:-.03em}.title-rule{height:21px;width:1px;background:var(--line)}.subtitle{font-weight:600;color:var(--muted)}.world-label{font-weight:700;color:var(--teal);white-space:nowrap}.icon-button{width:34px;height:34px;border:0;background:transparent;color:var(--muted);display:grid;place-items:center;border-radius:6px;font-size:25px}.icon-button:hover,.canvas-tools button:hover{background:#edf2ed;color:var(--ink)}svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.main{display:flex;min-height:0;flex:1}.canvas-area{flex:1;min-width:0;position:relative;background-color:var(--bg);background-image:radial-gradient(#cbd5cd 0.85px,transparent .85px);background-size:22px 22px;overflow:hidden}.canvas-viewport{position:absolute;inset:0;touch-action:none;cursor:grab}.canvas-viewport.panning{cursor:grabbing}.graph-stage{position:absolute;left:0;top:0;transform-origin:0 0;will-change:transform}.graph-edges,.graph-nodes{position:absolute;left:0;top:0;overflow:visible}.graph-edges{pointer-events:none}.graph-edge{stroke:#9dc5b7;stroke-width:2.5;fill:none;opacity:.85}.graph-edge.new{stroke:var(--teal);stroke-width:3.3;stroke-dasharray:8 5;animation:dash .9s linear 2}.graph-edge.bridge{stroke:#bdc9c3;stroke-dasharray:4 6}.graph-node{position:absolute;transform:translate(-50%,-50%);border:1px solid #c8d6cc;border-radius:8px;background:#fff;color:var(--ink);padding:9px 13px;white-space:nowrap;font-weight:600;box-shadow:0 4px 12px rgba(27,56,44,.08);user-select:none;touch-action:none;cursor:grab;transition:box-shadow .2s,border-color .2s,background .2s;max-width:260px;overflow:hidden;text-overflow:ellipsis}.graph-node:hover{border-color:var(--teal);box-shadow:0 6px 18px rgba(27,56,44,.15)}.graph-node.current{background:var(--teal);border-color:var(--teal);color:#fff;box-shadow:0 6px 22px rgba(35,126,114,.25)}.graph-node.seed{border-color:#d0a66d}.graph-node.just-added{animation:node-arrive .55s cubic-bezier(.2,.8,.2,1) both}.canvas-topline{position:absolute;top:22px;left:24px;right:24px;display:flex;justify-content:space-between;gap:20px;color:var(--muted);pointer-events:none;font-size:12px}.canvas-topline span:first-child{font-weight:700;color:var(--teal)}.first-hint{position:absolute;left:50%;top:48%;transform:translate(-50%,-50%);width:min(290px,70vw);text-align:center;pointer-events:none;color:var(--muted);font-size:15px}.first-hint strong{display:block;font-family:'Fraunces',Georgia,serif;color:var(--ink);font-size:23px;margin-bottom:6px}.event-banner{position:absolute;top:60px;left:50%;transform:translateX(-50%);min-width:200px;max-width:min(600px,90%);padding:11px 17px;border-radius:8px;background:var(--ink);color:#fff;text-align:center;box-shadow:0 9px 23px rgba(25,45,37,.18);font-weight:600;z-index:5}.event-banner.error{background:#7f3d32}.canvas-tools{position:absolute;left:24px;bottom:138px;display:flex;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 5px 14px rgba(25,45,37,.07)}.canvas-tools button{width:36px;height:36px;border:0;border-right:1px solid var(--line);background:transparent;color:var(--muted);font-size:19px;display:grid;place-items:center}.canvas-tools button:last-child{border-right:0}.word-form{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);width:min(640px,calc(100% - 48px));background:#fff;border:1px solid #d6e1d9;border-radius:12px;padding:12px 14px 9px;box-shadow:0 12px 35px rgba(27,56,44,.13);z-index:3}.word-form label{display:block;font-weight:700;font-size:12px;margin:0 0 7px 3px}.word-row{display:flex;gap:8px}.word-row input{flex:1;min-width:0;height:42px;border:1px solid var(--line);background:#f9fbf8;border-radius:7px;padding:0 13px;color:var(--ink);font-size:15px}.word-row input::placeholder,.collection-search::placeholder{color:#819089}.word-row button{border:0;border-radius:7px;background:var(--teal);color:#fff;padding:0 19px;font-weight:700;white-space:nowrap}.word-row button:hover{background:#17675d}.word-row button:disabled{opacity:.55;cursor:wait}.word-row button span{margin-left:6px}.word-feedback{margin:7px 3px 0;color:var(--muted);font-size:11px}.word-feedback.error{color:var(--red)}.sidebar{width:var(--sidebar);flex:none;background:#fff;border-left:1px solid var(--line);display:flex;flex-direction:column;min-height:0;z-index:8}.sidebar-head{padding:21px 21px 16px;display:flex;justify-content:space-between;gap:10px}.sidebar-head strong{display:block;font-family:'Fraunces',Georgia,serif;font-size:22px}.sidebar-head span{display:block;font-size:11px;color:var(--muted);margin-top:2px}.score-strip{display:grid;grid-template-columns:1fr 1fr 1fr;padding:11px 18px 16px;border-bottom:1px solid var(--line);gap:7px}.score-strip>div{min-width:0}.score-strip strong{display:block;font-size:18px;font-variant-numeric:tabular-nums;letter-spacing:-.03em}.score-strip span{font-size:10px;color:var(--muted);white-space:nowrap}.tabs{display:grid;grid-template-columns:1fr 1fr 1fr;border-bottom:1px solid var(--line);padding:0 12px}.tab{border:0;background:transparent;padding:13px 2px 11px;color:var(--muted);font-size:12px;font-weight:700;border-bottom:2px solid transparent}.tab.active{color:var(--teal);border-color:var(--teal)}.tab-panel{min-height:0;overflow:auto;flex:1;padding:19px 18px 10px}.tab-panel[hidden]{display:none}.panel-intro{margin:0 1px 15px}.panel-intro strong{display:block;font-size:13px}.panel-intro span{display:block;font-size:11px;color:var(--muted);margin-top:3px}.collection-search{height:36px;width:100%;border:1px solid var(--line);border-radius:6px;padding:0 10px;background:#f9fbf8;margin-bottom:12px}.word-collection,.unique-collection{display:flex;flex-wrap:wrap;align-content:flex-start;gap:7px}.collection-word,.unique-word{border:1px solid var(--line);background:#f7f9f5;color:var(--ink);padding:7px 9px;border-radius:6px;font-weight:600;font-size:12px;max-width:100%;overflow:hidden;text-overflow:ellipsis}.collection-word:hover{border-color:var(--teal);background:var(--teal-soft)}.collection-word.current{background:var(--teal-soft);border-color:var(--teal);color:#125b51}.unique-word.found{background:#fce6d9;border-color:#efb48f;color:#8d4628}.island-row{display:block;width:100%;text-align:left;background:#fff;border:1px solid var(--line);border-radius:7px;padding:12px;margin-bottom:8px;color:var(--ink)}.island-row:hover,.island-row.active{border-color:var(--teal);background:#f0f8f3}.island-row strong,.island-row small{display:block}.island-row strong{font-size:13px}.island-row small{font-size:11px;color:var(--muted);margin-top:3px}.sidebar-footer{border-top:1px solid var(--line);padding:12px 18px;display:flex;justify-content:space-between;align-items:center;gap:10px}.sidebar-footer button{border:0;background:none;color:var(--muted);font-size:11px;text-decoration:underline;text-underline-offset:3px;padding:5px 0}.sidebar-footer span{color:#849188;font-size:10px}.mobile-only{display:none}@keyframes node-arrive{from{opacity:.3;scale:.55;filter:blur(4px)}to{opacity:1;scale:1;filter:blur(0)}}@keyframes dash{to{stroke-dashoffset:-26}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(max-width:760px){:root{--top:55px}.topbar{padding:0 12px}.brand{font-size:18px}.subtitle,.title-rule{display:none}.mobile-only{display:grid}.world-label{font-size:12px}.sidebar{position:absolute;right:0;top:var(--top);bottom:0;width:min(350px,100vw);box-shadow:-10px 0 25px rgba(28,52,40,.12);transform:translateX(105%);transition:transform .25s ease}.sidebar.open{transform:translateX(0)}.canvas-topline{top:13px;left:14px;right:14px}.canvas-topline span:last-child{display:none}.canvas-tools{left:14px;bottom:124px}.word-form{bottom:max(12px,env(safe-area-inset-bottom));width:calc(100% - 24px);padding:10px}.word-feedback{display:none}.word-row input{font-size:16px}.word-row button{padding:0 12px}.graph-node{font-size:13px;padding:9px 11px}.event-banner{top:45px;font-size:12px}.first-hint{top:42%}}
.tabs{grid-template-columns:repeat(4,1fr)}.tab{font-size:11px}.last-move{position:absolute;left:24px;bottom:168px;max-width:min(650px,calc(100% - 70px));background:#fff;border:1px solid var(--line);border-radius:9px;padding:11px 14px;box-shadow:0 7px 22px rgba(27,56,44,.09);z-index:2}.last-move>strong{display:block;font-size:11px;color:var(--muted);margin-bottom:4px}.last-path{display:flex;flex-wrap:wrap;align-items:center;gap:5px;font-size:13px;font-weight:700;line-height:1.5}.path-unknown{color:var(--teal);font-size:18px}.path-arrow{color:#a3b1a9;font-weight:400}.last-move>span{display:block;color:var(--teal);font-size:11px;font-weight:700;margin-top:5px}.name-form{padding:12px;background:#f7f9f5;border-radius:7px;margin:0 0 20px}.name-form label{display:block;font-size:11px;font-weight:700;margin-bottom:6px}.name-form>div{display:flex;gap:6px}.name-form input{flex:1;min-width:0;border:1px solid var(--line);border-radius:5px;padding:7px 9px;background:#fff}.name-form button{border:0;border-radius:5px;background:var(--teal);color:#fff;padding:0 10px;font-size:11px;font-weight:700}.leaderboard{padding:0;margin:0;list-style:none}.ranking-row{display:flex;gap:9px;align-items:center;border-bottom:1px solid var(--line);padding:10px 0;font-size:12px}.rank-position{color:var(--teal);font-family:'Fraunces',Georgia,serif;font-size:18px}.rank-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rank-points{font-variant-numeric:tabular-nums}.accent-choices{padding:8px 3px 1px;font-size:12px;color:var(--red)}.accent-choices button{margin:0 3px;border:0;background:#fbe8dc;color:#9a482b;border-radius:4px;padding:3px 6px;font-weight:700;text-decoration:underline;text-underline-offset:2px}.word-feedback.error{display:block}.canvas-tools{bottom:208px}@media(max-width:760px){.last-move{left:12px;bottom:137px;max-width:calc(100% - 24px);padding:8px 10px}.last-path{font-size:11px}.last-move>strong,.last-move>span{font-size:10px}.canvas-tools{bottom:215px}.accent-choices{font-size:11px}.tab{font-size:11px}}
.first-hint{top:58%}
.main{position:relative}.graph-regions{position:absolute;left:0;top:0;overflow:visible;pointer-events:none}.graph-node:not(.current):not(.seed){border-color:var(--community-color,#c8d6cc)}.collection-word{border-color:var(--community-color,var(--line))}.community-heading{font-size:12px;letter-spacing:.02em;margin:24px 2px 9px}.community-row{width:100%;display:grid;grid-template-columns:12px minmax(0,1fr) auto;align-items:center;gap:9px;min-height:44px;padding:8px 4px;border:0;border-bottom:1px solid var(--line);background:transparent;text-align:left;color:var(--ink)}.community-row:hover{background:#f4f8f5}.community-row strong{font-size:12px}.community-row small{font-size:10px;color:var(--muted)}.community-swatch{width:11px;height:11px;border-radius:50%;background:var(--community-color)}.sidebar-backdrop{position:absolute;inset:0;z-index:7;background:rgba(20,38,31,.24)}.sidebar-backdrop[hidden]{display:none}.last-move{bottom:calc(var(--dock-height,108px) + 60px)}.canvas-tools{bottom:calc(var(--dock-height,108px) + 102px)}
@media(max-width:760px){:root{--top:56px}.topbar{padding:0 9px}.brand{font-size:17px}.top-actions{gap:2px}.icon-button{width:44px;height:44px}.sidebar{left:0;right:0;top:auto;bottom:0;width:100%;height:min(82dvh,720px);border-left:0;border-top:1px solid var(--line);border-radius:16px 16px 0 0;box-shadow:0 -12px 40px rgba(20,38,31,.19);transform:translateY(105%)}.sidebar.open{transform:translateY(0)}.sidebar-head{padding:16px 18px 12px}.sidebar-head strong{font-size:21px}.tabs .tab{min-height:44px}.tab-panel{padding:16px 18px 20px}.collection-word,.island-row{min-height:44px}.graph-node{min-height:44px;display:flex;align-items:center;justify-content:center}.canvas-tools{bottom:calc(var(--dock-height,94px) + 122px)}.canvas-tools button{width:44px;height:44px}.last-move{bottom:calc(var(--dock-height,94px) + 25px)}.word-form{bottom:max(8px,env(safe-area-inset-bottom));width:calc(100% - 16px)}.word-row input,.word-row button{min-height:46px}.word-feedback.error{font-size:14px}.community-row small{font-size:11px}}
@media(max-width:370px){.brand{font-size:16px}.topbar{padding:0 6px}.world-label{font-size:11px}.word-row button{padding:0 9px}.word-row button span{display:none}.word-row input{padding:0 9px}.score-strip{padding-left:13px;padding-right:13px}}
@media(max-height:540px) and (max-width:900px){.first-hint{display:none}.canvas-tools{bottom:calc(var(--dock-height,94px) + 15px)}.last-move{left:155px;bottom:calc(var(--dock-height,94px) + 13px)}.sidebar{height:95dvh}}

/* La ruta puntuable del último movimiento queda localizada en el mapa. */
.graph-edge.last-route{stroke:#d66b37;stroke-width:5;stroke-dasharray:10 7;stroke-linecap:round;opacity:1;filter:drop-shadow(0 1px 3px rgba(151,70,31,.28));animation:route-trace .72s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(var(--route-order,0) * 90ms)}
.graph-node.last-route-node:not(.current){border-color:#d66b37;box-shadow:0 0 0 3px rgba(214,107,55,.16),0 5px 16px rgba(151,70,31,.16)}
.graph-node.current.last-route-node{outline:3px solid #d66b37;outline-offset:3px}
.graph-node.revealed:not(.current){background:#25302d;color:#fff;border-color:#25302d;box-shadow:0 5px 16px rgba(27,35,32,.24)}
.graph-node.revealed.last-route-node:not(.current){border-color:#d66b37;box-shadow:0 0 0 3px rgba(214,107,55,.22),0 5px 16px rgba(27,35,32,.24)}
.collection-word.revealed{background:#25302d;color:#fff;border-color:#25302d}
.collection-word.revealed:hover{background:#111916;color:#fff;border-color:#d66b37}
@keyframes route-trace{from{stroke-dashoffset:48;opacity:.25}to{stroke-dashoffset:0;opacity:1}}
@media(prefers-reduced-motion:reduce){.graph-edge.last-route{animation:none}}
.word-feedback.error{display:block;font-size:13px;line-height:1.35;background:#fff0ec;border:1px solid #df9c91;border-radius:6px;color:#7c3027;padding:8px 10px;margin-top:9px}

/* Atlántica: controles de exploración */
.help-link{border:0;background:transparent;color:var(--teal);font-weight:700;text-decoration:underline;text-underline-offset:3px;white-space:nowrap;padding:8px 4px}.help-link:hover{color:#155f56}
.canvas-tools{max-width:calc(100% - 20px);overflow-x:auto;z-index:4;bottom:calc(var(--dock-height,108px) + 150px)}.canvas-tools button{width:auto;min-width:42px;padding:0 10px;font-size:12px;font-weight:700;white-space:nowrap}.canvas-tools button.active{background:var(--teal-soft);color:#125b51}.canvas-tools button[hidden]{display:none}
.canvas-viewport.selecting{cursor:crosshair}.canvas-viewport.selecting .graph-node{cursor:move}.graph-node.selected{outline:3px solid var(--teal);outline-offset:3px;z-index:2}
.selection-box{position:absolute;border:1.5px dashed var(--teal);background:rgba(35,126,114,.13);pointer-events:none;z-index:2}.selection-box[hidden],.reveal-panel[hidden]{display:none}
.reveal-panel{position:absolute;z-index:6;width:260px;background:#fff;border:1px solid #b8d8cc;border-radius:12px;box-shadow:0 12px 30px rgba(25,45,37,.18);padding:14px;display:grid;gap:8px}.reveal-panel strong{font-family:'Fraunces',Georgia,serif;font-size:17px}.reveal-panel span{font-size:13px;color:var(--muted);line-height:1.4}.reveal-panel>div{display:flex;gap:8px;justify-content:flex-end}.reveal-panel button{min-height:38px;border:1px solid var(--line);border-radius:7px;background:#fff;padding:0 10px;font-size:12px;font-weight:700}.reveal-panel button:last-child{background:var(--teal);color:#fff;border-color:var(--teal)}.reveal-panel button:disabled{background:#e9ede9;color:#63706a;border-color:#d7ded7;cursor:not-allowed}
.sort-label{display:block;font-size:12px;font-weight:700;margin-bottom:5px}.collection-sort{width:100%;height:40px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);padding:0 8px;margin-bottom:10px}.collection-group{flex-basis:100%;font-size:12px;margin:11px 0 2px;color:var(--teal)}
.ranking-switch{display:flex;gap:6px;margin-bottom:10px}.ranking-switch button{flex:1;min-height:40px;border:1px solid var(--line);background:#fff;border-radius:7px;font-weight:700;color:var(--muted)}.ranking-switch button.active{border-color:var(--teal);background:var(--teal-soft);color:#125b51}
.sidebar-footer{flex-wrap:wrap}.sidebar-footer button{font-size:12px}.sidebar-footer span{font-size:11px}
.help-dialog{width:min(620px,calc(100vw - 24px));max-height:min(84dvh,760px);padding:0;border:0;border-radius:16px;box-shadow:0 22px 70px rgba(18,43,34,.27);color:var(--ink);background:#fff}.help-dialog::backdrop{background:rgba(15,34,29,.48)}.help-head{display:flex;align-items:center;justify-content:space-between;padding:20px 24px 14px;border-bottom:1px solid var(--line)}.help-head h2{font:700 27px/1.1 'Fraunces',Georgia,serif;margin:0}.help-head button{width:40px;height:40px;border:0;border-radius:8px;background:#f1f5f1;font-size:25px;color:var(--ink)}.help-body{max-height:calc(84dvh - 145px);overflow:auto;padding:20px 24px 10px;font-size:15px;line-height:1.5}.help-body h3{margin:23px 0 6px;font:700 17px/1.2 'Fraunces',Georgia,serif}.help-body p{margin:0 0 12px}.help-body .help-lead{font-size:18px;line-height:1.35;font-weight:600}.help-body a{color:#166d61}.help-actions{padding:14px 24px 20px;border-top:1px solid var(--line)}.help-actions button{width:100%;min-height:44px;border:0;border-radius:8px;background:var(--teal);color:#fff;font-weight:700}
@media(max-width:760px){.help-link{font-size:12px}.top-actions{gap:3px}.world-label{display:none}.canvas-tools{left:8px;max-width:calc(100% - 16px);bottom:calc(var(--dock-height,94px) + 122px)}.canvas-tools button{min-width:44px;min-height:44px;padding:0 8px}.help-dialog{max-height:92dvh}.help-body{max-height:calc(92dvh - 145px);padding:16px 18px}.help-head,.help-actions{padding-left:18px;padding-right:18px}.reveal-panel{width:min(260px,calc(100vw - 16px))}}
.word-row input::placeholder,.collection-search::placeholder{color:#596b61}.sidebar-footer span{color:#53675b}.score-strip span{font-size:11px}.last-move>strong,.last-move>span{font-size:11px}
