/* Open Sans (licencia OFL), alojada aquí para que el banner se vea igual en todos los equipos */
@font-face { font-family: "Open Sans"; font-weight: 300; font-style: normal; font-display: swap; src: url(fonts/OpenSans-Light.ttf) format("truetype"); }
@font-face { font-family: "Open Sans"; font-weight: 300; font-style: italic; font-display: swap; src: url(fonts/OpenSans-LightItalic.ttf) format("truetype"); }
@font-face { font-family: "Open Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/OpenSans-Regular.ttf) format("truetype"); }
@font-face { font-family: "Open Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/OpenSans-SemiBold.ttf) format("truetype"); }
@font-face { font-family: "Open Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/OpenSans-Bold.ttf) format("truetype"); }

:root {
  --bg: #0e0e10;
  --bg2: #1b1b1f;
  --card: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .14);
  --ink: #121214;
  --text: #fff;
  --muted: rgba(255, 255, 255, .72);
  --accent: #f0473a;
  --accent2: #ff6a5c;
  --maxh: 74vh;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Open Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg2), var(--bg));
  min-height: 100vh;
}
[hidden] { display: none !important; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(14px, 4vw, 40px);
}
.brand img { display: block; height: 34px; width: auto; }
.langs { display: flex; gap: 4px; }
.langs button {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  padding: 6px 10px; border-radius: 8px; font: 600 13px inherit; cursor: pointer;
}
.langs button[aria-pressed="true"] { background: #fff; color: var(--ink); border-color: #fff; }

.app {
  display: grid; gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  max-width: 1100px; margin: 0 auto; padding: 8px clamp(14px, 4vw, 40px) 60px;
  align-items: start;
}
.preview { position: sticky; top: 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tabs { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.tabs button {
  border: 0; background: transparent; color: var(--muted); padding: 8px 18px;
  border-radius: 999px; font: 600 14px inherit; cursor: pointer;
}
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); }

.stage {
  position: relative; width: min(100%, calc(var(--maxh) * var(--ar, .5625)));
  aspect-ratio: var(--ar, .5625);
  border-radius: 14px; overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  background: #26262b;
}
.stage canvas { display: block; width: 100%; height: 100%; }
.handle { position: absolute; border-radius: 50%; touch-action: none; cursor: grab; outline-offset: 3px; }
.handle.has-photo:active { cursor: grabbing; }
.hint { margin: 0; font-size: 13px; color: var(--muted); text-align: center; max-width: 420px; }

.panel h1 { font-size: clamp(22px, 3.4vw, 30px); line-height: 1.15; margin: 4px 0 8px; }
.sub { margin: 0 0 18px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.card h2 { display: flex; align-items: center; gap: 10px; font-size: 16px; margin: 0 0 12px; }
.num {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); font-size: 13px; font-weight: 700;
}
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 5px; }
input[type="text"] {
  width: 100%; padding: 12px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(0, 0, 0, .25); color: #fff; font: 16px inherit;
}
input[type="text"]::placeholder { color: rgba(255, 255, 255, .4); }
input[type="text"].error { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(240, 71, 58, .3); }
.zoom { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.zoom input { flex: 1; accent-color: var(--accent); }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.4; margin: 10px 0 14px; cursor: pointer; }
.consent input { margin-top: 3px; accent-color: var(--accent); flex: none; width: 18px; height: 18px; }
.consent a { color: #fff; }
#tagWrap { margin-bottom: 14px; }
.btn {
  border: 1px solid var(--line); background: rgba(255, 255, 255, .12); color: #fff;
  padding: 12px 18px; border-radius: 10px; font: 600 15px inherit; cursor: pointer;
}
.btn:hover { background: rgba(255, 255, 255, .2); }
.btn.primary { background: var(--accent); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent2); }
.btn.big { width: 100%; padding: 16px 18px; font-size: 18px; }
.btn.error { animation: shake .35s; }
.nets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.net { padding: 14px 6px; }
.link {
  background: none; border: 0; color: var(--muted); text-decoration: underline;
  cursor: pointer; font: 14px inherit; padding: 4px 0;
}
.link.small { display: block; margin: 12px auto 0; font-size: 13px; }
.privacy-note { margin: 12px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.privacy-note a { color: inherit; }
.note { margin: 10px 0 0; font-size: 13px; color: var(--muted); min-height: 1em; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0;
  background: #fff; color: var(--ink); padding: 11px 18px; border-radius: 10px; font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .4); transition: .25s; pointer-events: none; max-width: 90vw; text-align: center; z-index: 10;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.closed { text-align: center; padding: 80px 20px; font-size: 18px; }

@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

@media (max-width: 820px) {
  :root { --maxh: 60vh; }
  .app { grid-template-columns: 1fr; gap: 18px; }
  .preview { position: static; }
}
