/* Layout: one-screen photo app — header, album chips, scrolling grid, floating dock; sheets slide up for viewer, editor and publishing. */
:root {
  --resorte: linear(0, .09 8%, .29 16%, .51 25%, .7 35%, .84 46%, .93 58%, .98 72%, 1);
  --resorte-rapido: linear(0, .18 10%, .5 25%, .78 45%, .94 70%, 1);
  --salida: cubic-bezier(.32,.72,0,1);
  --mov-corto: 200ms; --mov-medio: 350ms; --mov-largo: 500ms;
  --material: color-mix(in srgb, var(--surface) 82%, transparent);
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --surface-2: #EEF0F4;
  --line: #E3E3E8;
  --fg: #1D1D1F;
  --muted: #6E6E73;
  --accent: #0B57D0;
  --accent-ink: #FFFFFF;
  --coral: #D9553B;
  --danger: #B3261E;
  --ok: #1F7A4D;
  --scrim: rgba(0, 0, 0, .55);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .16);
  --font-display: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 14px;
  --on-dark-accent: #A8C7FA;
  --tono: #D3E3FD; --tono-ink: #041E49;
  --notice-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tono: #0B3A82; --tono-ink: #D3E3FD; --bg: #000000; --surface: #1C1C1E; --surface-2: #2C2C2E; --line: #2C2C2E;
    --fg: #F5F5F7; --muted: #A1A1A8; --accent: #A8C7FA; --accent-ink: #062E6F;
    --coral: #FF8A6E; --danger: #FF7B72; --ok: #5FD39A; --scrim: rgba(0,0,0,.65);
    --shadow: 0 10px 30px -12px rgba(0,0,0,.7); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --tono: #0B3A82; --tono-ink: #D3E3FD; --bg: #000000; --surface: #1C1C1E; --surface-2: #2C2C2E; --line: #2C2C2E;
  --fg: #F5F5F7; --muted: #A1A1A8; --accent: #A8C7FA; --accent-ink: #062E6F;
  --coral: #FF8A6E; --danger: #FF7B72; --ok: #5FD39A; --scrim: rgba(0,0,0,.65);
  --shadow: 0 10px 30px -12px rgba(0,0,0,.7); color-scheme: dark;
}
html, body { height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; -webkit-tap-highlight-color: transparent; overflow: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
* { box-sizing: border-box; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg.i { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
svg.i[fill="currentColor"] { fill: currentColor; }

.app { height: 100%; display: flex; flex-direction: column; }
header.top { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; align-items: center; gap: 12px; }
.brand { flex: 1; min-width: 0; }
.brand h1 { font-family: var(--font-display); letter-spacing: -0.02em; font-weight: 700; font-size: 22px; margin: 0; line-height: 1.1; }
.brand p { margin: 2px 0 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status[data-mode="cloud"] .dot { background: var(--ok); }
.status[data-mode="local"] .dot { background: var(--coral); }

.albums { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); flex: none; }
.albums::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* Padding/gap tuned by MODOS.respiro CSS vars (R2); fallbacks keep Recuerdos safe before modos.js. */
main { flex: 1; overflow-y: auto; padding-left: max(var(--respiro-gutter, 16px), env(safe-area-inset-left, 0px)); padding-right: max(var(--respiro-gutter, 16px), env(safe-area-inset-right, 0px)); padding-bottom: calc(var(--respiro-main-pad-bottom, 96px) + env(safe-area-inset-bottom, 0px)); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--respiro-gap, 5px); }
.card:active { transform: scale(.96); } /* website feel: rounded tiles that answer the finger */
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:active { transform: none; } }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(7, 1fr); } }
/* Scroll stability (idioma-salto) beats paint savings: fixed 120px intrinsic was wrong for 3-col at 320–412 px. */
.card { position: relative; aspect-ratio: 1; max-width: 100%; border: 0; padding: 0; border-radius: 10px; transition: transform .18s var(--resorte); overflow: hidden; background: var(--surface-2); }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .tag { position: absolute; left: 5px; bottom: 5px; display: inline-flex; align-items: center; gap: 3px; background: rgba(0,0,0,.6); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 2px 6px; font-variant-numeric: tabular-nums; }
.card .tag svg.i { width: 11px; height: 11px; }
.card .pro { position: absolute; left: 5px; top: 5px; background: var(--accent); color: var(--accent-ink); font-size: 9.5px; font-weight: 700; letter-spacing: .06em; border-radius: 4px; padding: 2px 5px; text-transform: uppercase; }
.card .local { position: absolute; right: 5px; bottom: 5px; background: var(--coral); color: #fff; border-radius: 50%; width: 18px; height: 18px; display: grid; place-items: center; }
.card .local svg.i { width: 11px; height: 11px; }
.card .tick { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); display: grid; place-items: center; color: transparent; }
.card.sel .tick { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.card.sel img { transform: scale(.9); border-radius: 6px; transition: transform .15s; }
.card .tick svg.i { width: 14px; height: 14px; stroke-width: 3; }

.empty { max-width: 440px; margin: 28px auto 0; text-align: center; padding-inline: 8px; }
.empty h2 { font-family: var(--font-display); letter-spacing: -0.02em; font-weight: 700; font-size: 28px; margin: 0 0 8px; text-wrap: balance; }
.empty p { color: var(--muted); line-height: 1.5; margin: 0 0 18px; }
.steps { display: grid; gap: 10px; text-align: left; margin: 0 0 20px; padding: 0; list-style: none; }
.steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.steps b { display: block; font-size: 14px; }
.steps span { font-size: 13px; color: var(--muted); }
.steps .n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--accent); }
.empty .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); padding: 11px 16px; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--fg); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:active:not(:disabled) { transform: scale(.98); }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding-bottom: calc(var(--respiro-dock-pad-bottom, 8px) + env(safe-area-inset-bottom, 0px)); padding-left: max(var(--respiro-gutter, 16px), env(safe-area-inset-left, 0px)); padding-right: max(var(--respiro-gutter, 16px), env(safe-area-inset-right, 0px)); display: flex; justify-content: center; pointer-events: none; }
.dock-inner { pointer-events: auto; display: flex; align-items: center; gap: var(--respiro-dock-gap, 16px); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: var(--respiro-dock-pad-y, 4px) var(--respiro-dock-pad-x, 16px); box-shadow: var(--shadow); }
.dock-btn { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px; }
.dock-btn svg.i { width: var(--respiro-dock-icon, 20px); height: var(--respiro-dock-icon, 20px); color: var(--fg); }
.dock-main { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--accent); cursor: pointer; margin-top: calc(var(--respiro-dock-lift, 16px) * -1); }
.dock-main .disc { width: var(--respiro-dock-disc, 48px); height: var(--respiro-dock-disc, 48px); border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: var(--shadow); border: var(--respiro-dock-disc-border, 4px) solid var(--surface); }
.dock-main .disc svg.i { width: var(--respiro-dock-icon, 20px); height: var(--respiro-dock-icon, 20px); }
.dock-main input, .vh { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.btn:has(.vh) { position: relative; }

.selbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--surface); border-top: 1px solid var(--line); padding-top: 8px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); box-shadow: 0 -8px 24px -14px rgba(0,0,0,.35); }
/* T-D: album selection bar on home sits above the dock (styles live in events.js) */
#ev-selbar { z-index: 22; }
.selbar .head { display: flex; justify-content: space-between; align-items: center; padding: 0 6px 6px; font-size: 13px; font-weight: 700; }
.selbar .head button { border: 0; background: none; color: var(--accent); font-weight: 700; padding: 4px 6px; }
.selbar .acts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; }
.act { border: 0; background: none; border-radius: 10px; padding: 7px 2px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--fg); }
.act:active { background: var(--surface-2); }
.act.danger { color: var(--danger); }

.sheet { position: fixed; inset: 0; z-index: 40; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; }
.panel { background: var(--surface); width: 100%; max-width: 640px; max-height: 94%; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; overflow: hidden; animation: up .22s var(--salida); }
@media (prefers-reduced-motion: reduce) { .panel { animation: none; } }
@keyframes up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.panel-head h3 { flex: 1; margin: 0; font-family: var(--font-display); letter-spacing: -0.02em; font-weight: 700; font-size: 20px; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; flex: none; }
.icon-btn.danger { color: var(--danger); }
.panel-body { overflow-y: auto; padding: 14px 16px; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; }
.panel-body > * { flex-shrink: 0; }
.label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.note { font-size: 13px; color: var(--muted); line-height: 1.45; margin: 0; }

/* T-B: organize sheet thumbs scroll with the finger; drag sets touch-action none via .prod-rev.dragging */
.prod-rev .pt { touch-action: pan-y; }
.prod-rev.dragging .pt { touch-action: none; }

.stage { position: relative; background: #000; border-radius: 14px; overflow: hidden; display: grid; place-items: center; min-height: 220px; touch-action: none; user-select: none; -webkit-user-select: none; }
.stage img, .stage video, .stage canvas { max-width: 100%; max-height: 58vh; display: block; }
#viewer-img, #viewer-before { grid-area: 1 / 1; }
#viewer-before { position: absolute; z-index: 1; }
#viewer-stage .busy { z-index: 5; }
#viewer-cmp { top: auto; bottom: 8px; left: 8px; right: auto; width: auto; min-height: 44px; padding: 0 12px; border-radius: 12px; } /* bottom-left: never covers the «Editada» label */
/* HDR originals (Ultra HDR / gain maps) glow next to the SDR edit and look washed: compare both in standard range. */
#viewer-img, #viewer-before, .fsv img { dynamic-range-limit: standard; }
#viewer-stage .fs-btn, #viewer-stage .hint { z-index: 4; }
.cmp-handle { position: absolute; z-index: 3; width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; color: white; touch-action: none; cursor: ew-resize; }
.cmp-handle:focus-visible { outline: 2px solid white; outline-offset: -2px; }
.cmp-line { position: absolute; z-index: 2; width: 2px; background: white; box-shadow: 0 0 4px #000; pointer-events: none; }
.cmp-nub { position: absolute; z-index: 3; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 3px #000; pointer-events: none; }
.cmp-before, .cmp-after { position: absolute; z-index: 3; font-size: 11px; font-weight: 700; background: rgba(0,0,0,.6); color: #fff; border-radius: 4px; padding: 3px 5px; pointer-events: none; white-space: nowrap; }
#fsv-before { pointer-events: none; }
.fsv-bar, .fsv-foot, .fsv .nav, .fsv .zoomtag { z-index: 4; }
@media (prefers-reduced-motion: reduce) { #fsv-img, #fsv-before, .cmp-handle, .cmp-line, .cmp-nub { transition: none !important; animation: none !important; } }
.stage .hint { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 3px 8px; }
.busy { position: absolute; inset: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; text-align: center; font-weight: 600; font-size: 14px; }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin .8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

.presets { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.preset { flex: none; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 9px 13px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.preset[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.actions-4 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.nets { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.net { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.net b { font-size: 14px; }
.net span { font-size: 12px; color: var(--muted); }
.net[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--surface-2); }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 9px; font-size: 13px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
textarea, input[type=text], select, input[type=number] { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; font-size: 15px; }
textarea { min-height: 84px; resize: vertical; line-height: 1.4; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags button { border: 1px dashed var(--line); background: none; border-radius: 999px; padding: 5px 10px; font-size: 12.5px; color: var(--accent); font-weight: 600; }
.stepline { display: flex; gap: 12px; align-items: center; }
.stepline .n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: 13px; }
.stepline > div { flex: 1; min-width: 0; }
.stepline .btn { width: 100%; }
.preview-strip { display: flex; gap: 6px; overflow-x: auto; }
.preview-strip img { height: 72px; width: auto; border-radius: 6px; flex: none; background: var(--surface-2); }

.clips { display: flex; flex-direction: column; gap: 8px; }
.clip { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: var(--surface); }
.clip img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.clip .meta { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.clip .meta b { font-size: 13px; }
.clip .trim { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.clip .trim input { width: 70px; padding: 6px 8px; font-size: 14px; }
.clip .trim select { width: auto; padding: 6px 8px; font-size: 14px; }
.clip .ord { display: flex; flex-direction: column; gap: 4px; }
.clip .ord button { width: 32px; height: 28px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; display: grid; place-items: center; }
.clip .ord svg.i { width: 16px; height: 16px; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.formgrid > label, .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; min-width: 0; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.toggle small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.toggle input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.total { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.meter { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.modal { position: fixed; inset: 0; z-index: 90; background: var(--scrim); display: grid; place-items: center; padding: 16px; }
.modal .box { background: var(--surface); border-radius: 18px; width: 100%; max-width: 360px; padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.modal h4 { margin: 0; font-family: var(--font-display); letter-spacing: -0.02em; font-weight: 700; font-size: 21px; }
.modal p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.modal .row { display: flex; gap: 8px; flex-wrap: wrap; }
.modal .row .btn { flex: 1; }
.album-list { display: flex; flex-wrap: wrap; gap: 6px; }

.toast { position: fixed; left: 50%; bottom: var(--notice-bottom); text-align: center; overflow-wrap: anywhere; transform: translateX(-50%); z-index: 95; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.progress { position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 39; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; width: min(360px, calc(100% - 32px)); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 600; }
.loading { text-align: center; color: var(--muted); padding: 60px 0; }

.fs-btn { position: absolute; right: 8px; bottom: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
.actions-4.four { grid-template-columns: repeat(4, 1fr); }
.actions-4.four .btn { flex-direction: column; gap: 4px; padding: 10px 4px; font-size: 12.5px; }

/* Fullscreen viewer */
.fsv { position: fixed; inset: 0; z-index: 70; background: #000; color: #fff; touch-action: none; overflow: hidden; user-select: none; -webkit-user-select: none; }
.fsv img { position: absolute; left: 50%; top: 50%; max-width: 100vw; max-height: 100vh; transform-origin: center center; will-change: transform; -webkit-user-drag: none; }
.fsv-bar { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-bottom: 24px; padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px)); background: linear-gradient(rgba(0,0,0,.6), transparent); transition: opacity var(--mov-corto); }
.fsv-bar .count { flex: 1; text-align: center; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.fsv .ghost { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; }
.fsv .nav { position: absolute; top: 50%; transform: translateY(-50%); }
.fsv .nav.prev { left: max(10px, env(safe-area-inset-left, 0px)); }
.fsv .nav.next { right: max(10px, env(safe-area-inset-right, 0px)); }
.fsv-foot { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 10px; padding-top: 24px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, rgba(0,0,0,.6)); transition: opacity var(--mov-corto); }
.fsv-foot .pill { border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.14); color: #fff; border-radius: 999px; padding: 10px 16px; font-weight: 600; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.fsv.clean .fsv-bar, .fsv.clean .fsv-foot, .fsv.clean .nav { opacity: 0; pointer-events: none; }
.fsv .zoomtag { position: absolute; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: rgba(0,0,0,.6); border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Photo editor */
.ped { position: fixed; inset: 0; z-index: 65; background: var(--bg); display: flex; flex-direction: column; }
.ped-top { display: flex; align-items: center; gap: 8px; background: var(--surface); border-bottom: 1px solid var(--line); padding-top: calc(8px + env(safe-area-inset-top, 0px)); padding-bottom: 8px; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
.ped-top h3 { flex: 1; margin: 0; font-family: var(--font-display); letter-spacing: -0.02em; font-weight: 700; font-size: 19px; }
.ped-top .btn { padding: 9px 14px; min-height: 44px; box-sizing: border-box; }
@media (max-width: 480px) {
  .ped-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; flex-shrink: 0; }
  .ped-top h3 { grid-column: 1 / -1; grid-row: 1; }
  .ped-top .btn { padding-inline: 8px; }
  #ped-reset { justify-self: center; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* never wider than its track, whatever the font */
}

/* Fade only edges with hidden content; keep native touch scrolling. */
.hs-more, .hs-start { --hs-left: #000; --hs-right: #000; mask-image: linear-gradient(to right, var(--hs-left), #000 28px, #000 calc(100% - 28px), var(--hs-right)); -webkit-mask-image: linear-gradient(to right, var(--hs-left), #000 28px, #000 calc(100% - 28px), var(--hs-right)); }
.hs-more { --hs-right: transparent; }
.hs-start { --hs-left: transparent; }
.ped-view { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; padding: 10px; background-color: #1b1f1f; background-image: linear-gradient(45deg, #262b2b 25%, transparent 25%), linear-gradient(-45deg, #262b2b 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #262b2b 75%), linear-gradient(-45deg, transparent 75%, #262b2b 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; touch-action: none; }
.ped-view canvas { max-width: 100%; max-height: 100%; display: block; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.ped-view .busy { border-radius: 0; }
.ped-float { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.ped-float button { min-width: 44px; min-height: 44px; width: 44px; height: 44px; box-sizing: border-box; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; padding: 0; }
.ped-float button:disabled { opacity: .35; }
.ped-view { overflow: hidden; }
.ped-float button[aria-pressed="true"] { background: var(--accent, #0B57D0); outline: 2px solid #fff; }
#ped-compare { width: auto; border-radius: 999px; padding: 0 12px; }
/* Retocar covers the stage: hide floats so their boxes do not overlap the brush bar (E1). */
.ped-view:has(.retoque) .ped-float,
.ped-view:has(.retoque) #ped-split-handle,
.ped-view:has(.retoque) .ped-split-before,
.ped-view:has(.retoque) .ped-split-after { display: none !important; }
#ped-split-handle { position: absolute; z-index: 2; width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; color: #fff; touch-action: none; cursor: ew-resize; }
#ped-split-handle::before { content: ''; position: absolute; left: var(--split-line, 22px); top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: #fff; box-shadow: 0 0 3px #000; }
/* Small fixed nub at vertical center — does not follow pointer Y. */
#ped-split-handle::after { content: ''; position: absolute; left: var(--split-line, 22px); top: 50%; transform: translate(-50%, -50%); width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 3px #000; }
#ped-split-handle:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.ped-split-before, .ped-split-after { position: absolute; z-index: 2; top: 8px; padding: 4px 7px; border-radius: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { #ped-split-handle, #ped-split-handle::before, #ped-split-handle::after, #ped-split { animation: none; transition: none; } }
.ped-tip { position: absolute; left: 12px; top: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 600; border-radius: 8px; padding: 5px 10px; max-width: calc(100% - 24px); }
.ped-tools { background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.ped-panel { height: 34vh; max-height: 300px; overflow-y: auto; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 12px; }
.ped-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.ped-tabs button { border: 0; background: none; min-height: 44px; min-width: 44px; box-sizing: border-box; padding: 6px 2px; font-size: 12.5px; font-weight: 700; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.ped-tabs button[aria-selected="true"] { color: var(--accent); box-shadow: inset 0 2px 0 var(--accent); }
.sl { display: grid; grid-template-columns: 92px 1fr 40px; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.sl output { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
.sl output.on { color: var(--accent); }
.sl input[type=range] { width: 100%; accent-color: var(--accent); height: 28px; }
#ped .sl input[type=range], #ped .retoque input[type=range] { min-height: 44px; height: 44px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
#ped .preset { min-height: 44px; min-width: 44px; box-sizing: border-box; padding: 10px 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); }
#ped .swatch { width: 44px; height: 44px; min-width: 44px; min-height: 44px; box-sizing: border-box; }
.swatch[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.row2 { display: flex; gap: 8px; flex-wrap: wrap; }
.row2 .btn { flex: 1; min-width: 120px; }
#ped .row2 .btn { min-height: 44px; box-sizing: border-box; }

/* p53: dialogs fit any screen */
.modal { grid-template-columns: minmax(0, 1fr); }
.modal > .box { min-width: 0; box-sizing: border-box; }
.modal:not(.fxlb):not(.findm):not(.pplm):not(.ordm):not(.snd):not(.shs):not(.shub):not(.cmtm):not(.stm):not(.errs) > .box { max-height: calc(100dvh - 32px); overflow-y: auto; overflow-x: hidden; }
.modal .field input, .modal .field select, .modal .field textarea, .modal input[type=date], .modal input[type=text] { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
.modal .row .btn { min-width: 0; }
input[type=date] { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 15px; min-height: 44px; }
.covers .cvup { position: relative; overflow: hidden; flex: none; width: 58px; height: 58px; border-radius: 10px; border: 2px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: var(--accent); cursor: pointer; background: var(--surface); }
.covers .cvup small { font-size: 10px; font-weight: 700; }
.covers .cvup svg.i { width: 18px; height: 18px; }
.install-steps{margin:8px 0 0;padding-left:20px;text-align:left;font-size:.92em;line-height:1.45}.install-steps li{margin:4px 0}

/* R5a: Publicar is a single primary control; leaf actions live in the Publicar sheet. */
body[data-rama="ventas"] .evacts.vta .btn[data-v-pub] {
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.2;
  padding: 8px 12px;
  flex-direction: row;
}
#menu .menu-gh { user-select: none; }
#menu .menu-hoja button { width: 100%; }

#toast { border-radius: 20px; width: max-content; max-width: min(460px, calc(100% - 32px)); line-height: 1.35; } /* pill for one line, card for long text (never a round blob) */
#viewer.viewer-personal #viewer-publish, #vviewer.viewer-personal #vviewer-publish { display: none !important; }
#viewer.viewer-personal .actions-4 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
body[data-opinion-pending] [data-menu-id="opinion"]::after { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--accent); }
body:has(.sheet:not([hidden]), .modal:not([hidden]), #ped:not([hidden]), #fsv:not([hidden]), #toast:not([hidden])) .faceask { display: none; }

/* Compact album chrome; original controls retain their event delegation. */
header.top { gap: 6px; }
#cloud-status { position:relative; flex:none; width:36px; height:40px; padding:6px; }
#cloud-status span { position:absolute; right:0; bottom:0; font-size:13px; background:var(--surface); border-radius:50%; }
#cloud-status[data-state="pending"] span { color:#df8500; font-size:22px; line-height:14px; }
#cloud-status[data-state="busy"] span { animation:cloud-turn 1s linear infinite; }
@keyframes cloud-turn { to { transform:rotate(360deg); } }
body[data-rama="recuerdos"] #evbar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px; }
/* Highlights insert a full-width sibling between title and actions. Pin both to row one. */
body[data-rama="recuerdos"] #evbar .evbar-top { min-width:0; grid-area:1/1; }
body[data-rama="recuerdos"] #evbar .evacts { gap:4px; overflow:visible; grid-area:1/2; }
body[data-rama="recuerdos"] #evbar .evacts [data-share],body[data-rama="recuerdos"] #evbar .evacts [data-mas-album] { width:40px; height:40px; padding:8px; justify-content:center; position:relative; }
body[data-rama="recuerdos"] #evbar .album-action-label { display:none; }
#evbar .nbadge { position:absolute; top:-4px; right:0; }
#evbar .shbanner { grid-column:1/-1; }
#filtwrap { min-width:0; }
body[data-rama="recuerdos"] #filtwrap #findrow,body[data-rama="recuerdos"] #filtwrap #acts { display:contents; }
#filtwrap .chip { flex:none; }
#filtwrap #acts > * { order:3; }
#filtwrap #acts > :first-child { order:0; }
#filtwrap #acts > [data-fx="best"] { order:1; }
#filtwrap #findrow > * { order:2; }
#filtwrap #findrow > [data-aif] { order:3; }
#filtwrap #findrow > [data-find] { order:4; }
#viewer #facv-i,#viewer #vcm { display:none!important; }
.viewer-details { margin:8px 0; min-width:0; }
.viewer-details > summary,.ai-request > summary { cursor:pointer; padding:10px 12px; border-radius:999px; background:var(--surface-2); color:var(--fg); font-weight:600; }
#viewer-presets { flex-wrap:nowrap; overflow-x:auto; }
#viewer-presets > * { flex:none; }
#ped { font-family:var(--font-body,system-ui,sans-serif); color:var(--fg); animation:editor-enter .25s var(--resorte); }
#ped .ped-top h3 { font-family:inherit; }
#ped .ped-view { background:var(--surface-2); }
#ped .ped-float button { background:var(--surface); color:var(--fg); border:1px solid var(--line); }
#ped .btn { border-radius:999px; }
.ai-chat-body { display:flex; flex-direction:column; gap:8px; padding-top:8px; min-width:0; }
.ai-in textarea { min-width:0; }
@keyframes editor-enter { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@media(max-width:360px) { header.top .brand h1 { font-size:18px; } header.top .langsw { margin-right:0; } header.top .langsw button { padding:6px; } }
@media(prefers-reduced-motion:reduce) { #ped,#cloud-status[data-state="busy"] span { animation:none; } #ped *,#sypill { transition:none!important; } }
/* E9: no motion inside the editor when the person asks for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  #ped, #ped *, #ped *::before, #ped *::after {
    animation: none !important; animation-duration: 0s !important; animation-delay: 0s !important;
    transition: none !important; transition-duration: 0s !important; transition-delay: 0s !important;
  }
}

body[data-rama="recuerdos"] #evbar > :not(.evbar-top):not(.evacts) { grid-column:1/-1; }

/* Motion describes navigation, never decorates a list. */
body .sheet > .panel { animation: hoja-entra 420ms var(--salida); }
body .sheet:not([hidden]) { animation: fondo-entra 420ms linear; }
body #viewer > .panel { animation: fondo-entra 150ms linear; }
.sheet > .panel::before { content: ''; width: 36px; height: 4px; margin: 8px auto 0; flex: none; border-radius: 4px; background: var(--muted); opacity: .4; }
.sheet .panel-head { touch-action: none; }
@keyframes hoja-entra { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fondo-entra { from { opacity: 0; } to { opacity: 1; } }
body button, body [role="button"], body label.btn, body .card { transition: scale 120ms var(--resorte-rapido), opacity 120ms linear; }
body button:active, body [role="button"]:active, body label.btn:active, body .card:active { scale: .97; opacity: .8; }
body .card:active, body .evcard:active { transform: none; }
body .top, body .dock-inner { background: var(--material); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-color: transparent; box-shadow: none; }
body.contenido-debajo .top { border-bottom: 1px solid var(--line); }
body.contenido-debajo .dock-inner { border-color: var(--line); }
body .label { text-transform: none; letter-spacing: normal; font-size: 13px; font-weight: 400; }
body .evbar-top h2 { font-size: 28px; white-space: normal; overflow-wrap: anywhere; }
body .panel-head h3 { font-size: 22px; }
body #viewer .panel-head { flex-wrap: wrap; gap: 8px; }
body #viewer-title { order: 2; flex: 0 0 100%; white-space: normal; overflow: visible; overflow-wrap: anywhere; text-overflow: clip; font-size: 22px; }
body #viewer .panel-head > button { width: 38px; height: 38px; flex: none; border-radius: 50%; padding: 0; display: grid; place-items: center; background: var(--surface-2); border: 0; }
body #viewer .panel-head .vw-send { font-size: 0; gap: 0; }
body #viewer .panel-head .vw-send svg { font-size: 18px; }
body #viewer-stage { touch-action: none; overflow: hidden; }
body .evcard.mosaico { box-shadow: none; }
body .evcard.empty-cover .shade { background: none; }
body .evcard.new { border-width: 1px; }
body .evgrid.entra .evcard { animation: none; }
#mov-titulo { display: none; font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.titulo-plegado .top .brand > :not(#mov-titulo) { display: none; }
body.titulo-plegado #mov-titulo { display: block; animation: fondo-entra 150ms linear; }
@media (prefers-reduced-motion: reduce) {
  body *, body *::before, body *::after { scroll-behavior: auto !important; transition-property: opacity !important; transition-duration: 150ms !important; animation: none !important; }
  body .sheet:not([hidden]), body #viewer > .panel { animation: fondo-entra 150ms linear !important; }
  body button:active, body [role="button"]:active, body label.btn:active, body .card:active { scale: 1; transform: none; }
}

/* the photo handles its own gestures (swipe down to close, sideways to change photo); pinch still zooms */
#viewer-stage { touch-action: pinch-zoom; }
#viewer-stage img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
/* drag handles and sliders never shrink on press: they must stay under the finger */
body [role="slider"], body #ped-split-handle, body .cmp-handle, body .cmp-nub { scale: none !important; opacity: 1 !important; }

/* Delivery 1: the reference navigation, owner app only. */
.tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
.tabs button { border:0; padding:0; min-width:0; font-family:inherit; }
body[data-pestana] #menu-btn { display:none; }
body[data-pestana]:not([data-pestana="albumes"]) #main > :not(.tab-panel),
body[data-pestana]:not([data-pestana="albumes"]) #selbar,
body[data-pestana]:not([data-pestana="albumes"]) #ev-selbar { display:none!important; }
body[data-pestana] #main { padding-bottom:calc(100px + env(safe-area-inset-bottom,0px)); }
.album-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; padding:4px 16px; flex:none; }
.album-actions .btn,.album-actions .icon-btn { min-height:44px; min-width:44px; }
.album-actions #dock-upload { position:relative; cursor:pointer; background:var(--accent); color:var(--accent-ink); }
body[data-pestana] .evhead h2,.tab-panel > h2 { font-size:34px; font-weight:800; letter-spacing:-.03em; margin:8px 0 16px; line-height:1.1; }
body[data-pestana] .evgrid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
body[data-pestana] .evcard.mosaico { border-radius:20px; padding:0; background:transparent; box-shadow:none; }
body[data-pestana] .evcard.mosaico .mos { border-radius:20px; }
body[data-pestana] .evcard.mosaico .info { padding:8px 0; }
body[data-pestana] .evcard.mosaico .info b { font-size:14px; font-weight:600; overflow-wrap:anywhere; }
body[data-pestana] .evcard.mosaico .info span { font-size:12px; }
body[data-pestana] .evcard .info b .evi { display:none; }
body[data-pestana] .evhead button,body[data-pestana] .ev-options summary,body[data-pestana] .evbar-top .back { min-height:44px; min-width:44px; }
.ev-options summary { display:flex; align-items:center; color:var(--accent); cursor:pointer; }
.ev-options .field { margin-block:12px; }
.tab-empty { text-align:left; padding:24px 0; align-items:flex-start; }
.tab-panel { max-width:680px; margin-inline:auto; min-width:0; padding:12px 0; }
.tab-panel h3 { font-size:17px; margin:0 0 12px; display:flex; justify-content:space-between; gap:8px; }
.tab-note { color:var(--muted); font-size:13px; line-height:1.5; }
.tab-findings { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.tab-datum { padding:20px; border-radius:20px; background:var(--surface); display:flex; flex-direction:column; gap:4px; margin-bottom:12px; }
.tab-datum:last-child { grid-column:1/-1; background:var(--tono); color:var(--tono-ink); }
.tab-datum .cifra { font-size:34px; font-weight:800; font-variant-numeric:tabular-nums; line-height:1.1; }
.tab-datum span { font-size:17px; }
.tab-datum small { font-size:13px; }
.tab-card { background:var(--surface); border-radius:20px; padding:16px; margin-block:16px; min-width:0; }
.tab-card > input { width:100%; min-width:0; min-height:44px; font-size:17px; font-weight:600; border:0; border-bottom:1px solid var(--line); background:transparent; border-radius:0; }
.tab-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:12px 0; }
.tab-strip button { position:relative; border:0; border-radius:12px; padding:0; min-width:44px; min-height:64px; aspect-ratio:1; background:var(--surface-2); overflow:hidden; }
.tab-strip img { width:100%; height:100%; object-fit:cover; display:block; }
.tab-strip button span { position:absolute; bottom:0; left:0; right:0; font-size:11px; padding:4px 0; color:#fff; background:#0009; }
.tab-strip button:not(.excluded) span { clip-path:inset(100%); }
.tab-strip .excluded img { opacity:.35; }
.tab-panel .btn { min-height:44px; white-space:normal; overflow-wrap:anywhere; }
.tab-panel .primary { min-height:54px; }
.tab-link { border:0!important; background:none!important; color:var(--accent)!important; padding-inline:0; }
.tab-settings { border-radius:16px; background:var(--surface); overflow:hidden; }
.tab-setting { display:flex; align-items:center; gap:12px; width:100%; min-height:52px; padding:12px 16px; border:0; border-bottom:1px solid var(--line); background:transparent; text-align:left; }
.tab-setting > span { flex:1; min-width:0; overflow-wrap:anywhere; font-size:17px; }
.tab-setting small { display:none; }
.tab-setting > svg { width:22px; height:22px; flex:none; color:var(--accent); }
.tab-setting > svg:last-child { width:16px; color:var(--muted); }
.tab-setting .langsw { margin:0; }
.tab-setting .langsw button { min-height:44px; min-width:44px; }
body[data-pestana] .top { background:var(--material); backdrop-filter:saturate(180%) blur(20px); }
@media (min-width:390px) { body[data-pestana] #main { padding-inline:20px; } .album-actions { padding-inline:20px; } }
@media (min-width:700px) { body[data-pestana] .evgrid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (prefers-reduced-motion:reduce) { .tabs button::before { transition:none!important; } }

/* Bottom tab bar = the prototype shown on tidymoments.com (icon over label, pill on the active tab, translucent material). */
.tabs { position:fixed; left:0; right:0; bottom:0; z-index:30; margin:0; padding:6px 8px calc(8px + env(safe-area-inset-bottom,0px));
  border-top:1px solid var(--line); background:var(--material, color-mix(in srgb, var(--surface) 86%, transparent));
  -webkit-backdrop-filter:saturate(180%) blur(20px); backdrop-filter:saturate(180%) blur(20px); }
.tabs button { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-height:56px;
  background:none; color:var(--muted); font:600 12px/1.2 var(--font-body, system-ui); -webkit-tap-highlight-color:transparent; }
.tabs button i { position:relative; display:grid; place-items:center; width:56px; height:30px; border-radius:999px; transition:background-color .25s var(--resorte-rapido, ease); }
.tabs button i svg { width:22px; height:22px; }
.tabs button[aria-selected="true"] { color:var(--fg); }
.tabs button[aria-selected="true"] i { background:var(--tono, #D3E3FD); color:var(--tono-ink, #041E49); }
.tabs button:active i { background:var(--line); }
.tabs button:focus-visible { outline:none; } .tabs button:focus-visible i { box-shadow:0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
/* actions live in the header, like Photos on iOS: + always, Seleccionar only inside an album */
.top .album-actions { padding:0; margin-left:auto; gap:8px; }
.top .album-actions #dock-upload { border-radius:50%; width:44px; height:44px; display:grid; place-items:center; }
body.tab-album-open #dock-video, body[data-pestana]:not([data-pestana="albumes"]) .album-actions { display:none; }
.top .album-actions #dock-select, .top .album-actions #dock-video { width:44px; height:44px; border-radius:50%; display:grid; place-items:center; }
@media (min-width:900px) { .tabs { left:50%; right:auto; bottom:16px; transform:translateX(-50%); width:min(520px, calc(100% - 32px)); border:1px solid var(--line); border-radius:24px; padding:6px; } }
@media (max-width:360px) { .top .album-actions { gap:4px; } .top .album-actions .icon-btn, .top .album-actions #dock-upload { width:44px; height:44px; min-width:44px; } .top .status { min-width:44px; } }
/* home: Video only inside an album, Seleccionar only when there are albums; the title never wraps */
body.tab-album-open .top .album-actions #dock-video, body:has(#evhome:not([hidden]) .tab-empty) .top .album-actions #dock-select { display:none; }
.top .brand { min-width:0; } .top .brand h1 { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* Phone: never show «TU …» — full name, or hide the brand if the header is crowded. */
@media (max-width: 412px) {
  .top .brand h1 { font-size: 17px; letter-spacing: -0.03em; overflow: visible; text-overflow: clip; }
  .top .status #status-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .top .status { position: relative; min-width: 44px; justify-content: center; padding: 6px; }
}
@media (max-width: 360px) {
  body[data-pestana] .top .brand h1 { font-size: 0; line-height: 0; overflow: hidden; }
  body[data-pestana] .top .brand { flex: 0 0 auto; min-width: 0; width: 0; overflow: hidden; }
}
.onb.tab-empty { max-width:none; margin:0; padding:8px 0 24px; display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.onb.tab-empty p { margin:0 0 8px; font-size:17px; color:var(--muted); }

/* ── Una sola superficie (ficha 0034): como apple.com y tidymoments.com, nada se siente en cajas sueltas ── */
body[data-pestana] { background:var(--surface); }
body[data-pestana] .top { border-bottom:1px solid transparent; transition:border-color .2s, background-color .2s; background:transparent; -webkit-backdrop-filter:none; backdrop-filter:none; }
body[data-pestana].contenido-debajo .top { background:var(--material); -webkit-backdrop-filter:saturate(180%) blur(20px); backdrop-filter:saturate(180%) blur(20px); border-bottom-color:var(--line); }
body[data-pestana] #main, body[data-pestana] .tab-panel { background:transparent; }
body[data-pestana] .tabs { border-top-color:transparent; }
body[data-pestana].contenido-debajo .tabs, body[data-pestana] .tabs.con-borde { border-top-color:var(--line); }
/* inicio vacío = la portada de la página: fotos reales, una frase, una acción */
.onb.tab-empty { align-items:center; text-align:center; max-width:560px; margin:0 auto; padding:8px 0 32px; gap:12px; }
.onb.tab-empty h3 { margin:16px 0 0; font:800 34px/1.08 var(--font-display, system-ui); letter-spacing:-.03em; text-wrap:balance; }
.onb.tab-empty p { margin:0 0 8px; font-size:17px; line-height:1.45; color:var(--muted); max-width:420px; text-wrap:pretty; }
.onb.tab-empty .primary { min-width:220px; min-height:52px; border-radius:999px; font-size:17px; }
.onb.tab-empty .tab-link { min-height:44px; font-size:15px; }
.vacio-mosaico { display:grid; grid-template-columns:1.15fr 1fr; grid-template-rows:1fr 1fr; gap:8px; width:min(100%, 440px); aspect-ratio:5/4; }
.vacio-mosaico img { width:100%; height:100%; object-fit:cover; border-radius:20px; display:block; background:var(--surface-2); }
.vacio-mosaico img:first-child { grid-row:1 / 3; }
.vacio-mas { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:4px 16px; margin-top:4px; padding-top:16px; border-top:1px solid var(--line); width:min(100%, 440px); }
.vacio-mas .sync { border:0; background:none; color:var(--muted); font-size:15px; min-height:44px; gap:6px; box-shadow:none; }
body[data-pestana] .evhead:has(+ .onb.tab-empty) h2 { text-align:left; }
/* portadas: la foto manda, sin cajas */
body[data-pestana] .evcard.new { border:0; background:var(--bg); border-radius:20px; color:var(--accent); }
body[data-pestana] .evcard.mosaico .mos { box-shadow:none; }
body[data-pestana] .evgrid { gap:24px 16px; }
@media (min-width:1100px) { body[data-pestana] .evgrid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (min-width:1500px) { body[data-pestana] .evgrid { grid-template-columns:repeat(5,minmax(0,1fr)); } }
/* aparecer al llegar (cada portada por sí sola, sin escalonar) */
.revela { opacity:0; transform:translateY(16px) scale(.985); }
.revela.visto { opacity:1; transform:none; transition:opacity .5s ease, transform .55s cubic-bezier(.32,.72,0,1); }
@media (prefers-reduced-motion:reduce) { .revela { opacity:1; transform:none; } }
/* computadora: barra lateral como Fotos en Mac; el contenido usa todo el ancho */
@media (min-width:900px) {
  body[data-pestana] .tabs { left:0; right:auto; top:0; bottom:0; transform:none; width:232px; border:0; border-right:1px solid var(--line); border-radius:0;
    display:flex; flex-direction:column; gap:2px; padding:76px 12px 24px; background:var(--bg); -webkit-backdrop-filter:none; backdrop-filter:none; }
  body[data-pestana] .tabs button { flex-direction:row; justify-content:flex-start; gap:10px; min-height:44px; padding:0 10px; border-radius:12px; font-size:15px; font-weight:500; color:var(--fg); }
  body[data-pestana] .tabs button i { width:24px; height:24px; background:none!important; color:var(--accent); }
  body[data-pestana] .tabs button i svg { width:20px; height:20px; }
  body[data-pestana] .tabs button[aria-selected="true"] { background:var(--tono, #D3E3FD); color:var(--tono-ink, #041E49); font-weight:600; }
  body[data-pestana] .tabs button[aria-selected="true"] i { color:inherit; }
  body[data-pestana] .tabs button:hover:not([aria-selected="true"]) { background:var(--line); }
  body[data-pestana] .app { margin-left:232px; }
  body[data-pestana] .top { position:relative; z-index:31; }
  body[data-pestana] .top .brand { position:fixed; left:28px; top:18px; z-index:32; }
  body[data-pestana] .top .brand p { display:none; }
  body[data-pestana] .top { min-height:64px; }
  body[data-pestana] #main { padding-inline:40px; padding-bottom:48px; }
  body[data-pestana] .evhead h2 { font-size:34px; }
}
/* cabecera limpia: el contador vive en cada pantalla, no arriba; dentro de un álbum manda su nombre (como Fotos) */
body[data-pestana] .top .brand p { display:none; }
@media (max-width:899px) { body[data-pestana].tab-album-open .top .brand { visibility:hidden; } }
@media (min-width:900px) { body[data-pestana] .grid { grid-template-columns:repeat(auto-fill, minmax(180px, 1fr)); gap:4px; } }
.ev-tools-row { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.ev-new { display:inline-flex; align-items:center; gap:6px; min-height:44px; font-weight:600; font-size:15px; }
.ev-new svg { width:18px; height:18px; }
.ev-sueltas { display:flex; flex-direction:column; align-items:flex-start; gap:12px; padding:20px; border-radius:20px; background:var(--bg); max-width:560px; }
.ev-sueltas p { margin:0; font-size:17px; line-height:1.4; color:var(--muted); } .ev-sueltas b { color:var(--fg); font-weight:600; }
/* Por ordenar / Limpiar / Más con el lenguaje de la página (ficha 0035): bloques grises que se tocan sobre una sola superficie */
body[data-pestana] .tab-datum, body[data-pestana] .tab-card, body[data-pestana] .tab-settings { background:var(--bg); }
body[data-pestana] .tab-datum:last-child { background:var(--tono); }
.tab-datum { margin-bottom:0; padding:24px 20px; }
.tab-findings { margin-bottom:24px; }
.tab-datum .cifra { font-size:48px; letter-spacing:-.03em; }
.tab-panel > h2, .tab-panel .tab-title { font-size:34px; letter-spacing:-.03em; }
@media (min-width:900px) {
  body[data-pestana] .tab-panel { max-width:1040px; }
  .tab-findings { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .tab-datum:last-child { grid-column:auto; }
  .tab-proposals { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
  .tab-proposals .tab-card { margin:0; }
  .tab-proposals + .btn { margin-top:24px; max-width:360px; }
}
