*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --accent: #f7941d;
  --bg: #0f2a47;
  --bg2: #163556;
  --panel: #0e1b2e;
  --border: #1e3a5c;
  --text: #ffffff;
  --muted: #a9b8cc;
  --ink: #102033;
  --hero: none;
}

@font-face {
  font-family: "FbShigur";
  src: url("../../FbShigur-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background-color: #061018;
  background-image: url("../../background.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: Assistant, "Segoe UI", "Arial Hebrew", Arial, sans-serif;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: rgba(4, 10, 22, 0.72);
}

body > * { position: relative; z-index: 1; }

button, input, label { font: inherit; }

button, .cta, .btn-tiny { cursor: pointer; -webkit-tap-highlight-color: transparent; }

img { max-width: 100%; }

.skip {
  position: absolute;
  top: -48px;
  right: 12px;
  background: var(--accent);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 5;
  font-weight: 800;
}

.skip:focus { top: 8px; }

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 18px 8px;
  background: transparent;
}

.hero-inner { width: min(680px, 100%); }

.brand-row { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.logo { height: 76px; width: auto; }

.kicker { margin: 0; color: var(--accent); font-weight: 800; font-size: 1.2rem; }

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 8px;
  color: var(--accent);
  font-weight: 700;
}

.eyebrow .line {
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.headline {
  margin: 8px 0 0;
  font-family: Assistant, "Segoe UI", "Arial Hebrew", Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(2.05rem, 7.4vw, 4.6rem);
  line-height: 1.22;
}

.headline span {
  background: var(--accent);
  color: var(--ink);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 0.18em 0.04em;
}

.rule {
  height: 2px;
  width: min(420px, 72%);
  margin: 18px auto;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.sub {
  margin: 0 auto;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  padding: 16px 28px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(247, 148, 29, 0.25);
}

.bullets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 0;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.bullets li { display: inline-flex; align-items: center; }

.bullets li + li::before {
  content: "•";
  color: var(--accent);
  margin: 0 8px;
}

.counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 8px 16px;
  border: 1px solid rgba(247, 148, 29, 0.75);
  border-radius: 999px;
  color: var(--text);
}

.counter strong { color: var(--accent); font-size: 1.25rem; }
.counter svg { color: var(--accent); }

.hero-ballot { display: flex; justify-content: center; margin-top: 8px; }

.ballot {
  position: relative;
  width: 150px;
  height: 208.5px;
  margin: 22px auto 0;
  background: #fff;
  border-radius: 6.75px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 30px 60px -20px rgba(0, 0, 0, 0.9);
  transform: rotate(-8deg) skewX(-2.3deg);
  font-family: Assistant, "Segoe UI", "Arial Hebrew", Arial, sans-serif;
  direction: rtl;
  text-align: center;
  color: #000;
  user-select: none;
}

.ballot span { position: absolute; left: 5px; right: 5px; }
.ballot .letter { left: 0; right: 0; top: 25px; font-size: 65px; font-weight: 700; line-height: 1; }
.ballot .name { top: 125px; font-size: 13px; font-weight: 700; line-height: 1.2; }
.ballot .subline { top: 150px; font-size: 10px; font-weight: 400; line-height: 1.2; color: #1a1a1a; }

.ballot-mini { position: relative; width: 58px; height: 82px; }
.ballot-mini .ballot,
.ballot-mini .ballot-img {
  position: absolute;
  top: 0;
  left: 50%;
  margin: 0 0 0 -75px;
  transform: rotate(-8deg) skewX(-2.3deg) scale(0.36);
  transform-origin: top center;
}

.ballot-img {
  width: 150px;
  height: 208.5px;
  object-fit: contain;
  display: block;
  margin: 22px auto 0;
  transform: rotate(-8deg) skewX(-2.3deg);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45));
}

main { padding: 6px 14px 36px; }

.editor-card {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 26px 16px 20px;
  background: rgba(14, 27, 46, 0.9);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.85);
}

.editor-head { text-align: center; margin-bottom: 16px; }
.editor-head h2 {
  margin: 0 0 8px;
  font-family: "FbShigur", Assistant, "Segoe UI", "Arial Hebrew", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
}
.editor-head .accent { color: var(--accent); }
.editor-head p { margin: 0; color: var(--muted); }

.stage { display: flex; justify-content: center; }

canvas {
  width: min(100%, 460px);
  height: auto;
  display: block;
  border-radius: 20px;
  background: #0b1726;
  touch-action: none;
  user-select: none;
}

canvas[data-format="story"] { width: min(78%, 380px); }

.size-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.size-note i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.drop {
  position: relative;
  margin-top: 16px;
  padding: 20px 14px;
  text-align: center;
  border: 1.5px dashed rgba(169, 184, 204, 0.45);
  border-radius: 18px;
  background: rgba(8, 18, 32, 0.35);
  color: var(--muted);
}

.drop.is-over { border-color: var(--accent); background: rgba(247, 148, 29, 0.08); }
.drop-icon { color: var(--accent); }
.drop-title { margin: 6px 0 0; color: var(--text); font-weight: 800; }
.drop-hint { margin: 4px 0 0; }

.drop-actions { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }

.btn-tiny {
  background: rgba(247, 148, 29, 0.12);
  color: var(--text);
  border: 1px solid rgba(247, 148, 29, 0.55);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 800;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

fieldset.plain { border: 0; margin: 16px 0 0; padding: 0; min-inline-size: 0; }
legend { font-weight: 800; padding: 0; margin-bottom: 8px; }

.choices, .format-row { display: flex; flex-direction: column; gap: 10px; }

.choice {
  width: 100%;
  text-align: center;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 13px 12px;
  font-weight: 800;
  font-size: 1.05rem;
}

.choice b, .choice small { display: block; }
.choice small { margin-top: 2px; font-size: 0.82rem; font-weight: 650; opacity: 0.8; }
.choice.is-active { background: var(--accent); color: var(--ink); border-color: var(--accent); }

.adjust-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.adjust-head h3 {
  margin: 0;
  font-family: Assistant, "Segoe UI", "Arial Hebrew", Arial, sans-serif;
  font-size: 1.25rem;
}

.linkish {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  color: var(--muted);
  font-weight: 800;
  padding: 6px 0;
}

.slider-row {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  color: var(--muted);
  font-weight: 700;
}

.slider-row input[type="range"] { width: 100%; accent-color: var(--accent); }
.slider-row .val { color: var(--text); text-align: left; }

.hint {
  margin: 8px 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

.gesture-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 8px;
  padding: 10px 18px;
  border: 1px solid rgba(169, 184, 204, 0.12);
  border-radius: 999px;
  background: rgba(8, 18, 32, 0.22);
  color: rgba(169, 184, 204, 0.55);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
}

.gesture-note svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: currentColor;
}

.actions { display: flex; flex-direction: column; gap: 10px; }

.btn-primary, .btn-ghost {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  padding: 15px 16px;
  font-weight: 800;
  font-size: 1.08rem;
}

.btn-primary { background: var(--accent); color: var(--ink); border: 0; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid rgba(255, 255, 255, 0.18); }

button:disabled, .linkish:disabled { opacity: 0.45; cursor: not-allowed; }

.status { min-height: 1.4em; margin: 14px 0 6px; text-align: center; color: var(--accent); font-weight: 800; }
.fine { margin: 0; text-align: center; color: var(--muted); font-size: 0.85rem; }

.site-footer { padding: 8px 16px 28px; text-align: center; }
.site-footer p { margin: 0 0 6px; color: var(--muted); }
.site-footer .who { color: var(--text); font-weight: 800; }

.ticker {
  overflow: hidden;
  background: var(--accent);
  color: var(--ink);
  font-weight: 800;
  padding: 9px 0;
  direction: ltr;
}

.ticker-track { display: flex; width: max-content; animation: ticker 32s linear infinite; }
.ticker span { padding-inline-end: 8px; white-space: nowrap; }

@keyframes ticker {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.consent, .toast {
  position: fixed;
  z-index: 40;
  left: 12px;
  right: 12px;
  bottom: 12px;
  margin: 0 auto;
  max-width: 520px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.consent p { margin: 0 0 10px; }
.consent .row { display: flex; gap: 8px; }
.consent .row button { flex: 1; }
.toast a { color: var(--accent); font-weight: 800; }
body.has-consent { padding-bottom: 150px; }
body.has-consent .toast { bottom: 148px; }

.noscript { margin: 0; background: var(--accent); color: var(--ink); text-align: center; padding: 10px 12px; font-weight: 800; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--ink); }

@media (hover: hover) {
  .cta:hover, .btn-primary:hover, .choice.is-active:hover { filter: brightness(1.06); }
  .choice:hover, .btn-ghost:hover { border-color: var(--accent); }
}

@media (min-width: 640px) {
  .format-row { display: grid; grid-template-columns: 1fr 1fr; }
  .editor-card { padding: 28px 22px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; }
}
