:root{color-scheme:dark;--bg:#0c1827;--surface:#15263a;--surface2:#1d344a;--ink:#f0f4f8;--muted:#bac8d8;--blue:#a9d2f3;--green:#a5e6bc;--red:#ffc0c0;--line:#334d62}
[hidden]{display:none!important}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:radial-gradient(circle at 70% 0,#203d54 0,transparent 35%),var(--bg);color:var(--ink);font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px;line-height:1.55}
button,input,select{font:inherit}button{cursor:pointer;border:0}button:disabled{cursor:not-allowed;opacity:.45}a{color:inherit}.skip{position:absolute;top:-100px}.skip:focus{top:8px;left:8px;z-index:20;background:var(--blue);color:#09131f;padding:8px}
.site-head{max-width:1400px;margin:0 auto;padding:22px clamp(18px,4vw,52px);display:flex;justify-content:space-between;gap:14px;align-items:center}.back{color:var(--blue);font-weight:800;text-decoration:none}.back:hover{text-decoration:underline}.edition{color:#b5c5d7;font-size:11px;letter-spacing:.14em;font-weight:800;text-align:right}
main{max-width:1400px;margin:auto;padding:0 clamp(16px,4vw,52px)}.hero{text-align:center;max-width:790px;margin:20px auto 40px}.hero-icon{height:70px;width:70px;margin:0 auto 10px;display:grid;place-items:center;background:linear-gradient(120deg,#68bad4,#b4d7e4);border-radius:20px;color:#0d2337;box-shadow:0 10px 50px #152e50}.hero-mosaic{font-size:50px;line-height:1}.eyebrow{margin:0;color:#8ecfe3;font-size:11px;font-weight:900;letter-spacing:.2em}.hero h1{font-size:clamp(54px,11vw,96px);letter-spacing:.08em;line-height:.95;margin:8px 0 18px;font-weight:950}.period{color:#80d4da}.lead{font-size:clamp(20px,4vw,30px);font-weight:800;margin:0 0 10px}.intro{max-width:690px;margin:auto;color:var(--muted);font-size:16px}
.workbench{display:grid;grid-template-columns:minmax(310px,440px) minmax(0,1fr);gap:22px;align-items:start}.controls,.preview-pane,.bottom{border:1px solid var(--line);background:linear-gradient(145deg,#162a3e,#102237);border-radius:22px;padding:clamp(17px,2vw,26px);box-shadow:0 15px 36px #0002}.controls h2,.preview-pane h2,.bottom h2{font-size:21px;line-height:1.2;margin:4px 0 20px}.upload{display:flex;align-items:center;gap:13px;border:1px dashed #7194ab;background:#1a334b;border-radius:14px;padding:14px 12px;margin:10px 0 6px;cursor:pointer}.upload:hover,.upload:focus-within{border-color:var(--blue);background:#23435c}.upload-icon{font-size:28px;color:#a8dbdd;flex:0 0 30px;text-align:center}.upload>span:nth-child(2){min-width:0;flex:1}.upload strong{display:block;font-size:15px}.upload small{display:block;color:var(--muted);font-size:12px}.upload-action{background:var(--blue);color:#071521;border-radius:10px;padding:8px 12px;font-weight:900}input[type=file]{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}.upload-summary{font-size:13px;color:#b9cbdf;margin:4px 0 10px}.file-line{display:flex;gap:8px;justify-content:space-between;align-items:center}.text-button{background:none;color:#b9daf5;text-decoration:underline;font-size:12px;padding:8px}.tile-strip{display:flex;overflow-x:auto;gap:5px;min-height:0;max-height:58px;scrollbar-width:thin}.tile-strip img{height:52px;width:52px;object-fit:cover;border-radius:8px;flex:0 0 52px}.section-divider{height:1px;background:var(--line);margin:25px 0}.field-label{display:block;font-weight:900;margin:18px 0 8px}.field-note{font-size:12px;font-weight:400;color:var(--muted);display:block}
select{background:#20394f;color:#f7fbff;border:1px solid #648399;border-radius:10px;padding:12px;width:100%;max-width:100%;outline-offset:2px}.range-label{display:flex;justify-content:space-between;gap:10px;font-weight:900;margin-top:20px}.range-label output{color:#b0def0}input[type=range]{width:100%;accent-color:#8bceea;cursor:pointer}.range-ends{display:flex;justify-content:space-between;color:#a0b6c7;font-size:11px;gap:8px}.hint{color:#b8c9d8;font-size:12px;margin:7px 0 18px}.controls .hint{margin-bottom:14px}
.primary,.save-btn,.delete-btn,.quiet{display:inline-flex;justify-content:center;align-items:center;border-radius:11px;padding:13px 17px;font-weight:900;transition:transform .12s,filter .12s}.primary{width:100%;background:#a9d2f3;color:#061622}.save-btn{background:var(--green);color:#082415}.delete-btn{background:var(--red);color:#391414}.quiet{background:#294159;color:#eaf2fb;border:1px solid #607a91}.primary:hover,.quiet:hover,.save-btn:hover,.delete-btn:hover{filter:brightness(1.08)}.primary:active,.quiet:active,.save-btn:active,.delete-btn:active{transform:scale(.99)}#stop{margin-top:8px;width:100%}#status{min-height:24px;color:#bad9ea;font-size:13px}
.preview-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.preview-head h2{margin:3px 0 14px}.privacy-pill{padding:6px 9px;border:1px solid #547b85;background:#193c48;color:#b1e7db;border-radius:100px;font-size:11px;font-weight:700;text-align:center}
.viewport{height:clamp(360px,63vh,750px);width:100%;overflow:auto;display:flex;align-items:flex-start;justify-content:flex-start;background:radial-gradient(circle at center,#1b374c 2px,transparent 2px) 0 0/19px 19px,#0b1b2a;border-radius:15px;border:1px solid #34536a;scrollbar-width:thin;position:relative;touch-action:pan-x pan-y}.empty-state{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;text-align:center;margin:auto;padding:24px;max-width:310px}.empty-state strong{font-size:18px}.empty-state span:last-child{color:var(--muted)}.empty-graphic{font-size:90px;color:#96bcd4;line-height:1}
#mosaic{display:block;max-width:none;cursor:crosshair;user-select:none}#mosaic[hidden],#result-tools[hidden],#empty-state[hidden]{display:none}.result-tools{margin-top:16px}.zoombar{display:flex;gap:8px;align-items:center}.zoombar label{font-size:13px;white-space:nowrap;font-weight:800}.zoombar>button{min-width:35px;background:#29455f;color:#fff;font-size:20px;border-radius:9px;padding:7px 11px}.zoombar .small{font-size:12px;min-width:unset}.zoombar input{min-width:40px}.grid-info{font-size:13px;color:#b8c9d8;margin:12px 0 0}.export-row{display:grid;grid-template-columns:auto 1fr auto 1fr;gap:8px;align-items:center;margin-bottom:12px}.export-row label{color:#d9e9f6;font-weight:800;font-size:12px}.export-row select{padding:10px 6px;font-size:13px}.bottom{margin:22px 0;display:flex;align-items:center;justify-content:space-between;gap:25px}.bottom p{color:var(--muted);margin:0;max-width:700px}.bottom h2{margin:0 0 8px}.bottom-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end;min-width:310px}.bottom-actions button{font-size:13px;padding:11px 12px}
footer{display:flex;justify-content:space-between;gap:10px;padding:12px 0 38px;color:#abbfd0;font-size:12px}footer a{color:var(--blue)}
dialog{border:1px solid #55768a;background:#15283b;border-radius:18px;color:#f2f6fb;width:min(92vw,570px);max-height:90vh;padding:15px;box-shadow:0 20px 65px #0009}dialog::backdrop{background:#020914cc}.dialog-bar{display:flex;align-items:center;justify-content:space-between;gap:12px}.dialog-bar button{border-radius:8px;color:#fff;background:#38556e;padding:8px 12px}#detail-photo{width:100%;max-height:68vh;object-fit:contain;margin-top:12px;border-radius:10px;background:#102033}#detail-title{text-align:center;font-size:13px;color:var(--muted)}
@media(max-width:930px){.workbench{grid-template-columns:1fr}.preview-pane{grid-row:1}.controls{grid-row:2}.viewport{height: min(59vh,660px)}.bottom{flex-direction:column;align-items:stretch}.bottom-actions{justify-content:flex-start;min-width:0}}
@media(max-width:520px){.site-head{padding:14px 17px}.edition{max-width:150px;font-size:9px}.hero{margin:18px auto 25px}.hero-icon{height:56px;width:56px}.hero-mosaic{font-size:40px}.hero h1{font-size:56px}.lead{font-size:20px}.intro{font-size:14px}.controls,.preview-pane,.bottom{border-radius:16px;padding:15px}.privacy-pill{max-width:130px}.viewport{height:51vh;min-height:320px}.zoombar{flex-wrap:wrap}.zoombar label{width:100%}.zoombar input{flex:1}.export-row{grid-template-columns:1fr 1fr}.export-row label{grid-row:1}.export-row select{grid-row:2}.bottom-actions{display:grid;grid-template-columns:1fr 1fr}.bottom-actions .save-btn{grid-column:1/-1}footer{flex-direction:column}}


/* Fotogramas v2: advanced controls remain local to this application. */
.hero h1{font-size:clamp(30px,6.5vw,78px);letter-spacing:.035em;overflow-wrap:anywhere}
#mosaic-stage{position:relative;flex:none;line-height:0}#secret-overlay{position:absolute;inset:0;pointer-events:none;overflow:hidden}.secret-marker{position:absolute;display:grid;place-items:center;line-height:1;font-size:12px;color:#081623;border:2px solid #96e9e0;box-shadow:0 0 0 1px #06131e;background:#b8f4e966;min-width:3px;min-height:3px}.secret-marker[data-selected=true]{border-color:#ffa9d1;background:#ffa9d166}
details{border:1px solid var(--line);border-radius:12px;padding:12px;margin:16px 0}summary{cursor:pointer;font-weight:850;line-height:1.5}summary span{display:block;font-size:12px;color:var(--muted);font-weight:500}.secret-card{border-top:1px solid var(--line);padding:15px 0 5px;min-width:0}.secret-head{display:flex;align-items:center;gap:9px}.secret-head img{width:52px;height:52px;border-radius:8px;object-fit:cover}.secret-head strong{min-width:0;flex:1;overflow-wrap:anywhere;font-size:13px}.small{font-size:12px;padding:9px!important;min-height:40px}.secret-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.secret-fields>label:last-child{grid-column:1/-1}.secret-fields label,.export-fields label{font-size:12px;font-weight:800;min-width:0}.secret-fields input[type=number]{width:100%;border:1px solid #648399;border-radius:10px;background:#20394f;color:var(--ink);padding:12px}.secret-fields select{font-size:13px}.secret-card details{font-size:12px;padding:10px;margin:12px 0}.secret-card details label{display:flex;align-items:center;gap:10px;margin-top:10px}.secret-card>button{margin:3px 5px 3px 0}.editing-tools{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.editing-tools label{font-weight:800;font-size:13px}input[type=checkbox]{accent-color:var(--blue);min-width:20px;min-height:20px;vertical-align:middle}.notice{padding:12px;background:#24445d;border-left:3px solid var(--blue);border-radius:6px;font-size:13px}.export-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.export-info{font-size:14px;font-weight:800;color:#b9e8df;background:#143b43;padding:12px;border-radius:10px;overflow-wrap:anywhere}.export-settings{margin-top:20px}.operation{position:fixed;z-index:50;bottom:12px;left:50%;transform:translateX(-50%);width:min(600px,calc(100% - 24px));background:#1e374c;border:1px solid #81aac6;border-radius:14px;box-shadow:0 5px 40px #0009;padding:14px;display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}.operation span{font-size:13px;grid-column:1}.operation progress{width:100%;height:10px;grid-column:1}.operation button{grid-column:2;grid-row:1/3}.confirmation-actions{display:flex;gap:12px;justify-content:flex-end}#lower-resolution{margin-top:10px;width:100%}.quiet,.zoombar>button{background:var(--blue);color:#091521;font-weight:800}.text-button{color:var(--red)}#close-detail{background:var(--red);color:#301212;font-weight:900}.save-btn.primary{background:var(--green)}
@media(max-width:930px){.controls{grid-row:1}.preview-pane{grid-row:2;scroll-margin-top:12px}}
@media(max-width:520px){.hero h1{font-size:clamp(29px,8.3vw,44px)}.secret-section{padding:10px}.secret-head{flex-wrap:wrap}.secret-fields{grid-template-columns:1fr}.secret-fields>label:last-child{grid-column:auto}.operation{bottom:max(10px,env(safe-area-inset-bottom))}#secret-list .secret-card .quiet{width:100%}.export-fields{grid-template-columns:1fr 1fr}.confirmation-actions button{flex:1}}
.controls,.preview-pane{min-width:0}
@media(max-width:930px){.workbench{grid-template-columns:minmax(0,1fr)}}
