:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#183f43;background:#75c4cc;font-synthesis:none;--ink:#183f43;--muted:#687c7c;--paper:#fcfcf8;--line:#e1e8e4;--accent:#1c565b;--shadow:0 6px 30px #194b5720;--radius:16px}
*{box-sizing:border-box}body{margin:0;overflow:hidden}button,input,select{font:inherit}button,a,select,input{ -webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit;border:0;background:transparent}button:disabled{opacity:.3;cursor:default}button:hover:not(:disabled){background-color:#e8eeea}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,canvas:focus-visible{outline:3px solid #d6a249;outline-offset:3px}button,select,a{touch-action:manipulation}button,a{transition:background .16s,transform .16s}button:active:not(:disabled){transform:translateY(1px)}[hidden]{display:none!important}#game{width:100%;height:100dvh;min-height:380px;position:relative;isolation:isolate}#world{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;outline:none}#world:focus-visible{outline-offset:-5px}h1,h2,p{margin:0}h1,h2{font-family:Georgia,'Times New Roman',serif;font-weight:500}h1{font-size:25px;letter-spacing:-1px;line-height:1.15}h2{font-size:25px;letter-spacing:-.6px;line-height:1.15}svg{width:24px;height:24px;stroke:currentColor;stroke-width:1.65;fill:none;stroke-linecap:round;stroke-linejoin:round}.panel{background:var(--paper);box-shadow:var(--shadow);border:1px solid #ffffffb3;border-radius:var(--radius)}.topbar{position:absolute;top:22px;left:26px;right:26px;display:flex;align-items:center;justify-content:space-between;gap:20px;pointer-events:none}.topbar>*{pointer-events:auto}.brand{display:flex;gap:12px;align-items:center}.brand-mark{font-size:45px;line-height:1;transform:rotate(-8deg)}.brand p{font-size:12px;letter-spacing:1.3px;margin-top:5px;text-transform:uppercase}.region-switch{display:flex;padding:5px;background:#fcfcf8e8;border-radius:30px;box-shadow:0 2px 10px #194b5712;gap:2px}.region-switch button{border-radius:25px;padding:11px 18px;font-size:14px;font-weight:600;white-space:nowrap}.region-switch button[aria-pressed=true]{background:var(--accent);color:white}.top-actions{display:flex;gap:10px;align-items:center}.icon-button{border:1px solid #ffffff77;border-radius:50%;height:40px;width:40px;font-family:Georgia,serif;font-size:22px}.primary-button{background:var(--accent);color:#fff;padding:13px 18px;border-radius:10px;font-size:14px;font-weight:600}.primary-button:hover:not(:disabled){background:#123f44}.primary-button span{margin-left:14px}.palette{position:absolute;top:126px;left:26px;width:228px;padding:23px 20px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.6px;margin-bottom:14px}.palette h2{font-size:25px;margin-bottom:10px}.palette p{font-size:14px;line-height:1.55;color:var(--muted);min-height:66px;margin-bottom:24px}.label-row{display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:12px;margin-bottom:12px}.label-row>span:first-child{font-weight:600}.label-row>span:last-child:not(:first-child){color:var(--muted)}.swatches{display:grid;grid-template-columns:repeat(6,1fr);gap:7px;margin-bottom:24px}.swatch{width:26px;height:26px;border-radius:50%;background:var(--swatch);position:relative;border:1px solid #183f4320;padding:0}.swatch:hover:not(:disabled){background:var(--swatch);transform:scale(1.1)}.swatch[aria-pressed=true]:after{content:'';position:absolute;inset:-4px;border:1.5px solid var(--ink);border-radius:50%}.field-label{font-size:12px;display:block;font-weight:600;margin-bottom:9px}select{background:#f2f4ee;border:1px solid var(--line);border-radius:8px;width:100%;color:var(--ink);padding:10px 8px;font-size:13px}.palette-separator{height:1px;background:var(--line);margin:22px 0}input[type=range]{width:100%;accent-color:var(--accent);height:5px;margin:5px 0 12px;cursor:pointer}.range-ends{display:flex;justify-content:space-between;color:var(--muted);font-size:11px}.quiet-button{font-size:12px;padding:10px 0;margin-top:17px;text-align:left;width:100%;border-radius:5px}.quiet-button span{font-size:17px;margin-right:8px}.quiet-button[aria-pressed=true]{color:#077973;font-weight:700}.camera-controls{position:absolute;right:26px;top:40%;display:flex;flex-direction:column;gap:2px;padding:6px;border-radius:30px}.camera-controls button{border-radius:50%;width:37px;height:37px;font-size:25px;font-weight:300}.camera-controls>span{width:22px;height:1px;background:var(--line);margin:3px auto}.island-caption{position:absolute;right:28px;bottom:155px;display:flex;flex-direction:column;text-align:right;gap:7px;pointer-events:none}.island-caption span:first-child{font-size:10px;letter-spacing:2px;font-weight:600}.island-caption span:last-child{font-family:Georgia,serif;font-size:17px;font-style:italic;color:#245961}.bottom-ui{position:absolute;bottom:19px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:14px}.toolbar{padding:8px;display:flex;gap:4px;border-radius:18px}.toolbar button{display:flex;flex-direction:column;align-items:center;gap:7px;padding:12px 15px 10px;min-width:72px;border-radius:11px;position:relative;font-size:12px;font-weight:550}.toolbar button[aria-pressed=true]{background:var(--accent);color:white}.toolbar button>span:first-child{height:25px}.toolbar kbd{position:absolute;right:7px;top:5px;font-size:9px;font-family:inherit;opacity:.45}.tool-divider{width:1px;background:var(--line);margin:12px 4px}.controls-hint{display:flex;align-items:center;gap:10px;font-size:11px;white-space:nowrap;color:#204e55}.controls-hint b{font-weight:400;opacity:.5}.history{position:absolute;bottom:62px;left:26px;display:flex;padding:5px;border-radius:12px}.history button{width:38px;height:37px;font-size:27px;border-radius:8px}.stats{position:absolute;bottom:29px;left:28px;font-size:12px;letter-spacing:.3px}.stats strong{font-weight:650}.stats span{margin:0 7px}.file-panel{position:absolute;top:80px;right:26px;width:270px;padding:9px;z-index:3}.file-panel button,.file-panel a{display:block;width:100%;text-align:left;padding:13px 10px;border-radius:7px;font-size:14px;color:var(--ink);text-decoration:none}.file-panel a:hover{background:#e8eeea}.file-panel hr{border:0;border-top:1px solid var(--line)}.file-panel p{font-size:12px;color:var(--muted);padding:10px;line-height:1.5}#toast{position:absolute;left:50%;bottom:166px;transform:translate(-50%,12px);background:#183f43ed;color:white;padding:12px 19px;border-radius:30px;font-size:14px;box-shadow:var(--shadow);opacity:0;transition:opacity .2s,transform .2s;pointer-events:none;max-width:80%;text-align:center}#toast.visible{opacity:1;transform:translate(-50%,0)}#loading{position:absolute;inset:0;background:#86cbd0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;z-index:5}#loading p{font-family:Georgia,serif;font-size:24px}.loader{height:34px;width:34px;border:2px solid #fff5;border-top-color:var(--ink);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}#failure{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);max-width:450px;width:90%;padding:28px;z-index:6}#failure p{line-height:1.6;margin:18px 0}#failure button{background:var(--accent);color:white;padding:12px;border-radius:8px}dialog{border:0;border-radius:22px;padding:34px;max-width:580px;width:calc(100% - 32px);max-height:85dvh;color:var(--ink);background:var(--paper);box-shadow:0 25px 100px #133c4566}dialog::backdrop{background:#16424b70;backdrop-filter:blur(5px)}dialog h2{font-size:36px;margin-bottom:18px}dialog p{font-size:15px;line-height:1.6;color:var(--muted)}dialog dl{display:grid;grid-template-columns:105px 1fr;gap:15px;margin:26px 0;font-size:14px;line-height:1.55}dt{font-weight:650}dd{margin:0;color:#506768}.close-dialog{position:absolute;right:16px;top:12px;font-size:27px;width:34px;height:34px;border-radius:50%}.fine-print{font-size:12px!important;margin-bottom:22px}.new-options{display:grid;gap:10px;margin-top:23px}.new-options button{border:1px solid var(--line);border-radius:12px;padding:17px;text-align:left}.new-options strong,.new-options span{display:block}.new-options strong{font-size:16px;margin-bottom:7px}.new-options span{font-size:13px;color:var(--muted)}
@media(min-width:1500px){.palette{top:150px;left:36px;width:246px}.topbar{left:36px;right:36px;top:30px}.toolbar button{min-width:84px;padding:14px 17px;font-size:14px}.bottom-ui{bottom:25px}.palette p{font-size:15px}.label-row,.field-label,.quiet-button{font-size:14px}.swatch{width:28px;height:28px}}
@media(max-width:1000px){.topbar{left:18px;right:18px;gap:12px}.brand p{font-size:10px}.brand h1{font-size:22px}.brand-mark{font-size:35px}.region-switch button{padding:10px 12px;font-size:12px}.palette{left:18px;width:200px;padding:18px 16px;top:110px}.palette h2{font-size:22px}.swatches{gap:5px}.swatch{width:23px;height:23px}.history{left:18px;bottom:59px}.stats{left:19px;font-size:11px}.toolbar button{min-width:60px;padding:10px;font-size:11px}.island-caption{bottom:140px}.camera-controls{right:18px}}
@media(max-width:740px){.topbar{top:17px;left:16px;right:16px;align-items:flex-start;flex-wrap:wrap;gap:14px}.brand{gap:8px}.brand h1{font-size:23px}.brand p{font-size:9px;letter-spacing:1px}.brand-mark{font-size:36px}.top-actions{margin-left:auto;gap:5px}.top-actions .primary-button{font-size:12px;padding:11px 12px}.top-actions .icon-button{width:31px;height:34px;font-size:20px}.primary-button span{margin-left:5px}.region-switch{order:3;position:absolute;top:61px;left:0;padding:3px}.region-switch button{padding:8px 13px;font-size:12px}.palette{top:132px;left:16px;width:148px;padding:14px 12px;background:#fcfcf8ed}.palette .eyebrow,.palette h2,.palette>p,.palette-separator,.palette>label,.palette>input,.range-ends,.field-label{display:none}.label-row{font-size:10px;margin-bottom:12px}.label-row>span:last-child{display:none}.swatches{grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:14px}.swatch{width:25px;height:25px;margin:auto}select{font-size:11px;padding:8px 3px}.quiet-button{font-size:10px;line-height:1.4;margin-top:7px;padding:8px 0}.quiet-button span{margin-right:2px}.palette:has(#house-options[hidden]){width:140px;padding:6px 10px}.bottom-ui{bottom:18px;width:calc(100% - 24px);gap:11px}.toolbar{width:100%;justify-content:space-between;gap:0;padding:5px;border-radius:15px}.toolbar button{min-width:0;flex:1;font-size:10px;padding:10px 6px;gap:5px}.toolbar svg{width:23px;height:23px}.toolbar kbd{display:none}.tool-divider{margin:9px 3px}.controls-hint{font-size:10px;gap:6px}.controls-hint span:last-child,.controls-hint b:last-of-type{display:none}.history{left:16px;bottom:136px;padding:3px}.history button{height:32px;width:33px;font-size:24px}.stats{bottom:185px;left:18px;font-size:10px}.camera-controls{right:15px;top:auto;bottom:136px;padding:4px}.camera-controls button{width:32px;height:32px;font-size:24px}.island-caption{right:17px;bottom:315px}.island-caption span:first-child{font-size:8px;letter-spacing:1px}.island-caption span:last-child{display:none}.file-panel{right:16px;top:67px}#toast{bottom:125px;font-size:12px;padding:10px 16px;max-width:75%}dialog{padding:28px 22px}dialog h2{font-size:30px}dialog dl{grid-template-columns:1fr;gap:5px}dialog dd{margin-bottom:13px}}
@media(max-height:620px) and (min-width:741px){.palette{top:95px;padding:14px 16px}.palette .eyebrow,.palette>p,.palette-separator,.range-ends,.palette>.label-row,.palette>input{display:none}.palette h2{font-size:21px;margin-bottom:17px}.swatches{margin-bottom:15px}.bottom-ui{bottom:10px}.toolbar button{padding:8px 10px}.history{bottom:49px}.stats{bottom:21px}.island-caption{display:none}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.palette #tree-options .field-label{display:block;font-size:14px}.palette #tree-options select{font-size:14px}.palette p.tree-note{min-height:0;margin:12px 0 0;font-size:13px;line-height:1.5}.palette:has(#tree-options:not([hidden])){width:228px}
@media(max-width:740px){.palette:has(#tree-options:not([hidden])){width:194px;padding:14px 12px}.palette p.tree-note{font-size:12px}}

.palette #terrain-options .field-label{display:block;font-size:14px}.palette #terrain-options select{font-size:14px}.palette:has(#terrain-options:not([hidden])){width:228px}
@media(max-width:740px){.palette:has(#terrain-options:not([hidden])){width:194px;padding:14px 12px}}

#roof-direction-options{margin-top:15px}.palette #roof-direction-options .field-label{display:block;font-size:14px}.palette #roof-direction-options select{font-size:14px}.palette p.roof-note{min-height:0;margin:8px 0 12px;font-size:12px;line-height:1.45}.roof-only-label{display:flex;align-items:flex-start;gap:7px;font-size:14px;line-height:1.4}.roof-only-label input{width:17px;height:17px;flex-shrink:0;margin:2px 0;accent-color:var(--accent)}.palette:has(#roof-direction-options:not([hidden])){max-height:calc(100dvh - 285px);overflow-y:auto}
@media(max-width:740px){.palette:has(#roof-direction-options:not([hidden])){width:194px;max-height:max(160px,calc(100dvh - 340px));overflow-y:auto}}

.palette:has(#bridge-options:not([hidden])){width:228px}.palette #bridge-options p{margin-top:0}.palette #bridge-options button{width:100%}
@media(max-width:740px){.palette:has(#bridge-options:not([hidden])){width:194px;padding:14px 12px}.toolbar button{padding-left:3px;padding-right:3px}}
@media(min-width:741px) and (max-width:1150px){.history{bottom:155px}.stats{bottom:135px}}

#house-action{margin-bottom:16px}.palette label[for="house-action"],.palette #business-options .field-label{display:block;font-size:13px}#business-options select{font-size:14px;margin-bottom:12px}.palette:has(#business-options:not([hidden])){max-height:calc(100dvh - 285px);overflow-y:auto}
@media(max-width:740px){.palette:has(#business-options:not([hidden])){width:194px;max-height:max(180px,calc(100dvh - 330px))}}

.compass{position:absolute;top:100px;right:22px;width:112px;height:112px;pointer-events:none;z-index:2;stroke:var(--ink);stroke-width:1.5}.compass-background{fill:#fcfcf8eb;stroke:#ffffffb3}.compass-ring{fill:none;stroke:#b2c9c3;stroke-width:1;stroke-dasharray:2 4}.compass-center{fill:var(--accent);stroke:none}.compass text{fill:var(--ink);stroke:none;font:600 14px system-ui,sans-serif;text-anchor:middle;dominant-baseline:central}.compass [data-cardinal="north"]{fill:#b34d36;font-weight:750}.compass [data-compass-arm="north"]{stroke:#b34d36;stroke-width:2}.compass marker path{fill:#b34d36;stroke:none}
@media(max-width:740px){.compass{top:134px;right:10px;width:88px;height:88px}.compass text{font-size:16px}}
@media(max-height:620px) and (min-width:741px){.compass{top:84px;right:18px;width:96px;height:96px}.camera-controls{top:auto;bottom:132px}}

@media(max-height:620px) and (min-width:741px){.camera-controls{flex-direction:row;border-radius:16px}.camera-controls>span{width:1px;height:22px;margin:auto 3px}}
@media(max-height:520px) and (max-width:740px){.compass{top:114px;width:72px;height:72px}.compass text{font-size:16px}.camera-controls{display:grid;grid-template-columns:repeat(2,32px);bottom:120px;border-radius:12px}.camera-controls>span{display:none}}

.palette:has(#market-options:not([hidden])){width:238px}.palette #market-options .field-label{display:block;font-size:13px}.palette #market-options select{font-size:13px;margin-bottom:12px}
@media(max-width:740px){.palette:has(#market-options:not([hidden])){width:194px;padding:14px 12px}.toolbar button{font-size:9px}}
@media(min-width:741px) and (max-width:1300px){.history{bottom:155px}.stats{bottom:135px}}

.dialog-label{display:block;font-size:14px;margin:20px 0 8px}dialog .grid-dialog-note{font-size:13px;margin:12px 0 20px}#grid-size-status{padding:5px 10px;font-size:12px}#expand-grid:disabled{opacity:.5}

/* Compact, translucent tool dock; labels and icons retain full contrast. */
.toolbar.panel{background:rgb(252 252 248 / 78%);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);padding:5px;border-radius:14px}
.toolbar button{padding-top:6px;padding-bottom:6px;gap:4px;min-height:44px;border-radius:9px}
.toolbar button>span:first-child{height:23px}.toolbar svg{width:23px;height:23px}.toolbar .tool-divider{margin-top:6px;margin-bottom:6px}.bottom-ui{gap:9px}
@media(max-width:740px){.toolbar.panel{padding:4px;border-radius:12px}.toolbar button{padding-top:5px;padding-bottom:5px;gap:3px}.toolbar button>span:first-child{height:22px}.toolbar svg{width:22px;height:22px}.bottom-ui{gap:8px}}

/* Courtyard house choices stay readable and scroll within the existing palette. */
.palette label[for="house-type"],.palette #patio-options .field-label{display:block;font-size:14px}
#house-type,#patio-options select{font-size:14px;margin-bottom:14px}
.palette:has(#patio-options:not([hidden])){max-height:calc(100dvh - 285px);overflow-y:auto}
@media(max-width:740px){.palette:has(#patio-options:not([hidden])){width:206px;max-height:max(160px,calc(100dvh - 330px));overflow-y:auto}}

.palette:has(#church-options:not([hidden])){width:238px}.palette #church-options .field-label{display:block;font-size:14px}.palette #church-options select{font-size:14px}
@media(max-width:740px){.palette:has(#church-options:not([hidden])){width:194px;padding:14px 12px}.toolbar{overflow-x:auto;justify-content:flex-start;max-width:100%}.toolbar button{flex:1 0 40px}.toolbar .tool-divider{flex-shrink:0}}

#music-open[data-playing="true"]{background:var(--accent);color:white}#music-dialog{max-width:520px}#music-dialog .music-enabled{display:flex;gap:10px;align-items:center;font-size:16px;font-weight:600}#music-enabled{width:20px;height:20px;accent-color:var(--accent)}#music-dialog .music-note{font-size:13px;margin:10px 0;line-height:1.5}#music-track{font-weight:600;overflow-wrap:anywhere;margin-top:23px}#music-status{font-size:14px;margin:7px 0 16px;min-height:22px}.music-actions{display:flex;flex-wrap:wrap;gap:10px;margin:15px 0}.music-actions button{border:1px solid var(--line);border-radius:9px;padding:11px 14px;font-size:14px;min-height:44px}.music-volume-label{display:flex;justify-content:space-between;font-size:14px;margin:22px 0 12px}#music-volume{height:20px;margin:0}

.palette:has(#townhall-options:not([hidden])){width:238px}.palette #townhall-options .field-label{display:block;font-size:14px}.palette #townhall-options select{font-size:14px;margin-bottom:12px}.toolbar{max-width:calc(100vw - 32px);overflow-x:auto}.toolbar button{flex-shrink:0}.toolbar .tool-divider{flex-shrink:0}
@media(max-width:740px){.palette:has(#townhall-options:not([hidden])){width:194px;padding:14px 12px}.toolbar button[data-tool="townhall"]{flex-basis:64px}}

.palette:has(#custom-options:not([hidden])){width:238px}.palette #custom-options .field-label{display:block;font-size:14px}.palette #custom-options select{font-size:14px;margin-bottom:12px}.editor-link{display:block;margin-top:15px;padding:11px 8px;border-radius:8px;background:#1c565b;color:#fff;text-decoration:none;font-size:14px;text-align:center}.toolbar button[data-tool="custom"]{min-width:102px}
@media(max-width:740px){.palette:has(#custom-options:not([hidden])){width:194px;padding:14px 12px}.toolbar button[data-tool="custom"]{flex-basis:92px;min-width:92px}}

#business-name{display:block;box-sizing:border-box;width:100%;min-height:42px;padding:9px;border:1px solid #b9c9c4;border-radius:7px;background:#fffaf0;color:#244e50;font:inherit;font-size:16px}.palette:has(#business-options:not([hidden])){width:238px}#business-name:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.palette:has(#beachbar-options:not([hidden])){width:238px;max-height:calc(100dvh - 285px);overflow-y:auto}.palette #beachbar-options .field-label{display:block;font-size:14px}#beachbar-options select,#beachbar-name{font:inherit;font-size:16px;width:100%;box-sizing:border-box;padding:9px;border:1px solid #b9c9c4;border-radius:7px;background:#fffaf0;color:#244e50;margin-bottom:12px;min-height:42px}

.palette:has(#landmark-options:not([hidden])){width:238px;max-height:calc(100dvh - 285px);overflow-y:auto}.palette #landmark-options .field-label{display:block;font-size:14px}#landmark-options select{font-size:16px;margin-bottom:12px;min-height:42px;width:100%}.toolbar button[data-tool="playground"]{min-width:90px}
@media(max-width:740px){.palette:has(#landmark-options:not([hidden])){width:194px;padding:14px 12px}}

#diada-toggle{font-size:14px;line-height:1.35;margin-top:4px;padding:9px 6px}#diada-toggle[aria-pressed=true]{background:#e6eddf;box-shadow:inset 3px 0 #bc4c3b;color:#214f4d}

#interface-toggle{display:inline-grid;place-items:center;flex-shrink:0}#interface-toggle svg{width:22px;height:22px}#interface-toggle[aria-pressed=false]{background:#fcfcf8e8;border-color:#1c565b;color:#1c565b}
@media(max-width:520px){.topbar{display:grid;grid-template-columns:1fr;gap:8px}.brand{grid-row:1}.top-actions{grid-row:2;justify-self:end;margin-left:0}.region-switch{position:static;grid-row:3;justify-self:start}.palette{top:178px}.compass{top:176px}}

/* Informació dels elements en mode Navega. */
#element-dialog{width:min(460px,calc(100vw - 24px));max-height:85dvh;overflow:auto}
#element-dialog h2{overflow-wrap:anywhere;padding-right:22px}
#element-facts{display:grid;grid-template-columns:minmax(100px,.8fr) minmax(0,1.2fr);gap:9px 16px;margin:22px 0}
#element-facts dt{font-weight:600}#element-facts dd{margin:0;overflow-wrap:anywhere}
#element-description{line-height:1.5}
#element-copy-status{font-size:13px;line-height:1.5;margin-bottom:0}
#element-copy-status:empty{display:none}
#element-json{width:100%;min-height:160px;margin-top:14px;padding:10px;box-sizing:border-box;font:12px/1.5 monospace;resize:vertical;user-select:text}
