/* ====== Színek: itt állíthatod a logó színeire ====== */
:root {
  --blue: #1d5fa8; /* fő kék (logó) */
  --blue-d: #163f6e; /* sötét kék – eszköztár */
  --orange: #1279bd; /* gombok */
  --orange-d: #0b639b;
  --bg: #eef2f7;
  --panel: #fff;
  --rail: #f4f6f9;
  --ink: #1f2633;
  --muted: #6b7585;
  --line: #dde3ec;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    Roboto,
    Arial,
    sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
.app {
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

/* Fejléc */
.top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  min-height: 58px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--blue);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.brand img {
  height: 42px;
  width: auto;
  display: block;
}
.brand svg {
  width: 30px;
  height: 30px;
}
.top .tt {
  margin-left: auto;
  text-align: right;
  line-height: 1.15;
}
.top .tt small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}
.top .tt b {
  font-size: 15px;
  color: var(--ink);
}

/* Eszköztár */
.tool {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--blue-d);
  color: #fff;
  padding: 7px 14px;
  min-height: 50px;
}
.prod {
  font-weight: 700;
  font-size: 14.5px;
  white-space: nowrap;
}
.tabs {
  display: flex;
  margin-left: 16px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 3px;
}
.tabs button {
  border: 0;
  background: transparent;
  color: #dfe8f3;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.tabs button.on {
  background: var(--orange);
  color: #fff;
}
.actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  font-size: 13.5px;
}
.btn:hover {
  border-color: #b9c3d1;
}
.btn.orange {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.btn.orange:hover {
  background: var(--orange-d);
  border-color: var(--orange-d);
}
.btn.blue {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.btn.blue:hover {
  background: var(--blue-d);
}
.btn.onDark {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.btn.onDark:hover {
  background: rgba(255, 255, 255, 0.2);
}
.btn.full {
  width: 100%;
}
.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
.btn svg {
  width: 16px;
  height: 16px;
}

/* Törzs */
.body {
  display: grid;
  grid-template-columns: 76px 300px minmax(0, 1fr);
  min-height: 0;
}
.rail {
  background: var(--rail);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 8px 6px;
  gap: 4px;
}
.rail button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 9px 2px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: #4a5466;
  font-size: 11px;
}
.rail button svg {
  width: 22px;
  height: 22px;
}
.rail button:hover {
  background: #e8edf4;
}
.rail button.on {
  background: #e6f3fc;
  color: var(--orange-d);
}
.panel {
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow: auto;
  min-height: 0;
}
.pane {
  padding: 16px 18px 24px;
}
.pane[hidden] {
  display: none;
}
.pane h3 {
  margin: 0 0 14px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-d);
}
.pane h4 {
  margin: 18px 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
label.f {
  display: block;
  margin: 0 0 12px;
  font-size: 13px;
}
label.f span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(29, 95, 168, 0.25);
  border-color: var(--blue);
}
textarea {
  min-height: 120px;
  resize: vertical;
  font-size: 12.5px;
  font-family: ui-monospace, Consolas, monospace;
}
.chk {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
  font-size: 13px;
  cursor: pointer;
}
input[type="checkbox"] {
  accent-color: var(--orange);
  width: 16px;
  height: 16px;
}
input[type="range"] {
  accent-color: var(--orange);
}
.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 8px 0 0;
}
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Képeim */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 26px 6px 14px;
  font-size: 15px;
  line-height: 1.4;
}
.lib {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 14px;
}
.li {
  position: relative;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: #e9edf3;
  border: 2px solid transparent;
}
.li:hover {
  border-color: var(--orange);
}
.li img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.li .used {
  position: absolute;
  left: 3px;
  bottom: 3px;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 3px;
  padding: 1px 5px;
}
.li .del {
  position: absolute;
  right: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  padding: 0;
  cursor: pointer;
  display: none;
}
.li:hover .del {
  display: block;
}
.bt {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bt[hidden],
.libtools[hidden],
.lib:empty {
  display: none;
}
.libtools {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.libtools .btn {
  flex: 1;
  padding: 7px 8px;
  font-size: 12px;
}

/* Elrendezés kártyák */
.lays {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
}
.lay {
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 5px;
  cursor: pointer;
  background: #fff;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
}
.lay canvas {
  width: 100%;
  aspect-ratio: var(--ar, 4/3);
  object-fit: contain;
  display: block;
  margin-bottom: 4px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.lay.on {
  border-color: var(--orange);
  color: var(--ink);
}
.sw {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
}
.sw button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
  padding: 0;
}
.sw button.on {
  box-shadow: 0 0 0 2px var(--ink);
}
.sw input[type="color"] {
  width: 36px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px;
  background: #fff;
  cursor: pointer;
}

/* Munkaterület */
.work {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-height: 0;
  position: relative;
}
.stage {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#preview {
  display: block;
  background: #fff;
  box-shadow:
    0 8px 28px rgba(22, 63, 110, 0.22),
    0 2px 6px rgba(0, 0, 0, 0.08);
  touch-action: none;
  cursor: grab;
}
#preview.dragging {
  cursor: grabbing;
}
.stage.dropping #preview {
  outline: 4px dashed var(--orange);
  outline-offset: 6px;
}
.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  border: 0;
  background: transparent;
  color: #8794a7;
  font-size: 54px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.nav:hover {
  color: var(--orange);
}
.nav.prev {
  left: 6px;
}
.nav.next {
  right: 6px;
}
.pagebar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: #fff;
  border-top: 1px solid var(--line);
}
.pagebar .pt {
  font-weight: 700;
  color: var(--blue-d);
  min-width: 120px;
}
.pagebar label.z {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.pagebar input[type="range"] {
  width: 140px;
}
.badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef1f5;
  color: #5b6576;
}
.badge.ok {
  background: #e1f3e4;
  color: #22683a;
}
.badge.mid {
  background: #fdf0d8;
  color: #8a5f0d;
}
.badge.bad {
  background: #fbe1de;
  color: #9b2c25;
}
.film {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 14px 12px;
  background: #f7f9fc;
  border-top: 1px solid var(--line);
}
.th {
  flex: 0 0 auto;
  width: calc(98px * var(--arn, 1.333) + 30px);
  max-width: 150px;
  cursor: pointer;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
}
.th canvas {
  width: 100%;
  aspect-ratio: var(--ar, 4/3);
  display: block;
  border: 2px solid #fff;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  background: #fff;
}
.th.on canvas {
  border-color: var(--orange);
}
.th.on {
  color: var(--ink);
  font-weight: 600;
}
.th.drop canvas {
  border-color: var(--blue);
}
.th span {
  display: block;
  margin-top: 4px;
}
.gridview {
  overflow: auto;
  padding: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  align-content: start;
  min-height: 0;
}
.gridview .th {
  width: auto;
}
.gridview[hidden],
.editview[hidden],
.film[hidden] {
  display: none;
}
.editview {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}
.msg {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  max-width: min(620px, 92%);
  z-index: 5;
  background: #fbe1de;
  color: #8a2a23;
  border-radius: 8px;
  padding: 10px 34px 10px 14px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-line;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
.msg.info {
  background: #e1f3e4;
  color: #22683a;
}
.msg::after {
  content: "×";
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 16px;
  opacity: 0.6;
}
.evst {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.evst button {
  border: 2px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 8px 4px 6px;
  font-size: 11.5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.evst button.on {
  border-color: var(--orange);
  color: var(--ink);
}
.pv {
  display: block;
  width: 44px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 3px;
  position: relative;
  background: #fff;
}
.pv::before {
  content: "8";
  position: absolute;
  left: 4px;
  top: 2px;
  font:
    700 10px Georgia,
    serif;
  color: #222;
}
.pv.circ::before,
.pv.both::before {
  left: 3px;
  top: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--evc, #2b74c7);
  color: #fff;
  text-align: center;
  line-height: 13px;
  font-size: 8px;
}
.pv.pill::after,
.pv.both::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  height: 7px;
  border-radius: 3px;
  background: var(--evc, #2b74c7);
}
/* Kezdőoldal */
.app.home {
  grid-template-rows: auto minmax(0, 1fr);
}
.app.home .tool,
.app.home .body {
  display: none;
}
.app:not(.home) #home {
  display: none;
}
#home {
  overflow: auto;
  min-height: 0;
}
.hero {
  background: linear-gradient(135deg, var(--blue-d), var(--blue));
  color: #fff;
  padding: 46px 24px 54px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}
.hero h1 {
  margin: 0 auto 12px;
  font-size: clamp(26px, 3.4vw, 40px);
  max-width: 820px;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.hero p {
  margin: 0 auto;
  max-width: 640px;
  font-size: 16px;
  line-height: 1.55;
  color: #dbe7f5;
}
.steps {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
  position: relative;
  z-index: 1;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 8px 18px 8px 8px;
  font-size: 14px;
}
.step b {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange);
  display: grid;
  place-items: center;
  font-size: 14px;
}
.prods {
  max-width: 1240px;
  margin: -26px auto 0;
  padding: 0 24px 40px;
  position: relative;
  z-index: 2;
}
.prods h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  margin: 0 0 14px;
  text-align: center;
  opacity: 0.9;
}
.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(22, 63, 110, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(22, 63, 110, 0.2);
}
.card .pv2 {
  background: linear-gradient(180deg, #eef3f9, #e2e9f2);
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  position: relative;
}
.card .pv2 canvas {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  background: #fff;
}
.card .kind {
  position: absolute;
  left: 12px;
  top: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 4px;
  padding: 3px 8px;
}
.card .cb {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card h3 {
  margin: 0;
  font-size: 17px;
  color: var(--ink);
}
.card .meta {
  font-size: 12.5px;
  color: var(--muted);
}
.card .desc {
  font-size: 13.5px;
  color: #4b5565;
  line-height: 1.45;
  flex: 1;
}
.card .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 10px;
}
.card .price {
  font-weight: 800;
  color: var(--blue-d);
  font-size: 17px;
  white-space: nowrap;
}
.feats {
  max-width: 1000px;
  margin: 10px auto 0;
  padding: 0 24px 50px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.feat {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13.5px;
  color: #4b5565;
  line-height: 1.45;
}
.feat i {
  flex: 0 0 36px;
  height: 36px;
  border-radius: 9px;
  background: #e6f3fc;
  color: var(--orange-d);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 18px;
}
.feat b {
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}
.back {
  margin-right: 4px;
}
.seg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.seg button {
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 8px 0;
  font-weight: 700;
  cursor: pointer;
}
.seg button:last-child {
  border-right: 0;
}
.seg button.on {
  background: var(--orange);
  color: #fff;
}
.btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
.vrs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.vr {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
  padding: 0;
}
.vr.on {
  box-shadow: 0 0 0 2px var(--orange);
}
.vr.auto {
  width: auto;
  padding: 0 10px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.vr.auto.on {
  color: var(--orange-d);
}
.prs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.pr {
  border: 2px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 3px;
  cursor: pointer;
}
.pr canvas {
  width: 100%;
  display: block;
}
.pr.on {
  border-color: var(--orange);
}
.prog {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 8px;
  min-height: 18px;
}
.big {
  font-size: 15px;
  padding: 13px 16px;
}

@media (max-width: 900px) {
  .app {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto auto auto;
  }
  .top .tt {
    display: none;
  }
  .tool {
    flex-wrap: wrap;
  }
  .tabs {
    margin-left: 0;
  }
  .body {
    grid-template-columns: 1fr;
  }
  .work {
    order: 1;
  }
  .rail {
    order: 2;
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .rail button {
    flex: 1 0 64px;
  }
  .panel {
    order: 3;
    border-right: 0;
  }
  .stage {
    height: calc(100vw * 0.75 + 24px);
  }
  .nav {
    display: none;
  }
}

@font-face {
  font-family: "DM Sans";
  font-weight: 100 1000;
  font-display: swap;
  src: url("assets/fonts/dm-sans.woff");
}
@font-face {
  font-family: "Manrope";
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/fonts/manrope.woff");
}
:root {
  --blue: #3099dc;
  --blue-d: #1279bd;
  --orange: #1279bd;
  --orange-d: #0b639b;
  --bg: #edf5fa;
  --rail: #f7fbfd;
  --ink: #173348;
  --muted: #657986;
  --line: #dce8ee;
}
body {
  font-family: "DM Sans", Arial, sans-serif;
}
h1,
h2,
h3,
h4,
.prod {
  font-family: "Manrope", Arial, sans-serif;
}
button:focus-visible,
a:focus-visible,
.lay:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.top {
  min-height: 48px;
  height: 48px;
  padding: 3px 14px;
  gap: 10px;
}
.brand img {
  height: 43px;
  width: 54px;
  object-fit: contain;
}
.brand-sub {
  font-size: 7px;
  letter-spacing: 1.3px;
  line-height: 1.6;
  color: #54758a;
  font-weight: 700;
}
.top .tt {
  display: flex;
  gap: 10px;
  align-items: center;
}
.top .tt small {
  font-size: 11px;
}
.top .tt b {
  font-size: 13px;
  color: #52758c;
}
.demo-mark {
  font-size: 8px;
  color: #1279bd;
  padding: 3px 6px;
  background: #eaf5fc;
  border-radius: 3px;
  margin-left: 5px;
}
.app {
  height: 100dvh;
}
.tool {
  background: #fff;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  min-height: 46px;
  padding: 5px 12px;
  gap: 12px;
}
.prod {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  white-space: nowrap;
}
.tabs {
  background: #edf5fa;
  margin-left: auto;
  flex-shrink: 0;
}
.tabs button {
  color: #6f8b9d;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  padding: 6px 12px;
}
.tabs button.on {
  background: var(--blue-d);
  color: white;
}
.actions {
  margin-left: 5px;
  flex-shrink: 0;
}
.btn {
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 12px;
  border-radius: 6px;
  padding: 8px 12px;
}
.btn.orange {
  color: #ffffff;
  text-transform: none;
  letter-spacing: 0;
}
.btn.blue {
  background: var(--blue-d);
  border-color: var(--blue-d);
}
.btn.onDark {
  background: #f4f8fb;
  border-color: var(--line);
  color: #54788e;
}
.btn.onDark:hover {
  background: #e7f2fa;
}
.body {
  grid-template-columns: 62px 270px minmax(0, 1fr);
}
.rail {
  padding: 7px 4px;
  gap: 5px;
}
.rail button {
  font-size: 10px;
  padding: 10px 2px 8px;
  color: #6e8797;
}
.rail button.on {
  background: #e6f3fc;
  color: #1279bd;
}
.rail button svg {
  width: 22px;
  height: 22px;
}
.pane {
  padding: 14px 15px 18px;
}
.pane h3 {
  font-size: 16px;
  margin-bottom: 14px;
  color: var(--ink);
}
.pane h4 {
  font-size: 10px;
  margin: 17px 0 9px;
  letter-spacing: 1px;
}
.pane .hint {
  font-size: 11px;
  line-height: 1.6;
}
.big {
  font-size: 13px;
  padding: 11px 12px;
}
.empty {
  font-size: 13px;
  padding: 23px 7px;
}
.lays {
  gap: 8px;
}
.lay {
  border-width: 1px;
  border-radius: 6px;
  padding: 5px;
  font-size: 11px;
}
.lay.on {
  border: 2px solid var(--blue);
  padding: 4px;
  background: #f6fbff;
}
.lay canvas {
  height: 95px;
  width: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  box-shadow: none;
  background: #f3f8fb;
}
.stage {
  background: #edf5fa;
}
.pagebar {
  justify-content: flex-start;
  gap: 9px;
  padding: 7px 10px;
  min-height: 47px;
}
.pagebar .pt {
  font-size: 13px;
  min-width: 0;
  margin-right: auto;
}
.page-counter {
  font-size: 10px;
  color: #7896a8;
  padding: 4px 6px;
  background: #edf5fa;
  border-radius: 4px;
  white-space: nowrap;
}
.pagebar label.z {
  font-size: 12px;
}
.pagebar input[type="range"] {
  width: 110px;
}
.badge {
  font-size: 10px;
  padding: 4px 7px;
  border-radius: 4px;
}
.nav {
  font-size: 36px;
  width: 27px;
  height: 48px;
  color: #8cabbc;
}
.nav.prev {
  left: 1px;
}
.nav.next {
  right: 1px;
}
#preview {
  box-shadow: 0 4px 13px #17334826;
}
.film {
  padding: 5px 9px 7px;
  gap: 8px;
}
.film .th {
  width: 92px;
  max-width: 92px;
  font-size: 9px;
}
.film .th canvas {
  height: 61px;
  aspect-ratio: auto;
  object-fit: contain;
  box-shadow: none;
}
.film .th.on canvas {
  border-color: var(--blue);
}
.gridview {
  padding: 15px;
  gap: 15px;
}
.gridview .th canvas {
  max-height: 260px;
  object-fit: contain;
}
.msg {
  font-size: 12px;
  top: 7px;
  border-radius: 6px;
}
.msg.info {
  background: #e8f5fd;
  color: #20618b;
}
.li .del {
  display: block;
  background: #fffffff0;
}
.lib {
  gap: 8px;
}
.libtools .btn {
  font-size: 10px;
  padding: 7px 5px;
}
.evst button {
  font-size: 10px;
}
.mobile-editor {
  display: none;
}
.hero {
  background: linear-gradient(110deg, #f2f9fd, #edf7fc);
  color: var(--ink);
  padding: 31px 24px 28px;
  text-align: left;
  max-width: 1240px;
  margin: auto;
}
.hero h1 {
  font-size: 35px;
  letter-spacing: -1px;
  margin: 0 0 13px;
  max-width: 720px;
}
.hero p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  max-width: 650px;
}
.hero:after {
  display: none;
}
.steps {
  justify-content: flex-start;
  margin-top: 19px;
  gap: 20px;
}
.step {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-size: 12px;
  color: #6a8799;
  gap: 8px;
}
.step b {
  width: 23px;
  height: 23px;
  background: #1279bd;
  color: #ffffff;
  font-size: 11px;
}
.prods {
  margin: 0 auto;
  padding: 16px 24px 30px;
}
.prods h2 {
  color: var(--ink);
  text-align: left;
  font-size: 19px;
  text-transform: none;
  letter-spacing: -0.3px;
  margin: 0 0 18px;
  opacity: 1;
}
.pgrid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.card {
  border: 1px solid var(--line);
  box-shadow: none;
  border-radius: 9px;
}
.card:hover {
  box-shadow: 0 8px 22px #17334812;
}
.card .pv2 {
  height: 185px;
  padding: 12px;
  background: #eaf5fb;
}
.card .kind {
  background: white;
  color: #6d8ca0;
  font-size: 9px;
  left: 8px;
  top: 8px;
  padding: 3px 6px;
  border: 1px solid var(--line);
}
.card .cb {
  padding: 13px 14px 15px;
  gap: 7px;
}
.card h3 {
  font-family: "Manrope";
  font-size: 14px;
}
.card .meta {
  font-size: 10px;
}
.card .desc {
  font-size: 11px;
  color: #7891a2;
}
.card .price {
  font-size: 15px;
  color: var(--blue-d);
}
.card .foot {
  flex-wrap: wrap;
  gap: 9px;
}
.card .foot .btn {
  font-size: 10px;
  padding: 8px 10px;
}
.feats {
  padding-bottom: 24px;
}
.feat {
  font-size: 11px;
}
.feat i {
  font-size: 16px;
}
.feat b {
  font-size: 12px;
}
.seg button.on {
  background: var(--blue-d);
}
.sw button {
  width: 25px;
  height: 25px;
}
.app.home .top {
  height: 72px;
}
.app.home .brand img {
  height: 60px;
  width: 75px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 25px;
  color: var(--ink);
  width: min(550px, 94vw);
  max-height: 90dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #17334899;
}
dialog .eyebrow {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: #66899f;
  font-weight: 700;
}
dialog h2 {
  font: 750 22px "Manrope";
  margin: 10px 0;
}
dialog p {
  font-size: 12px;
  color: var(--muted);
}
dialog .demo-note {
  padding: 12px;
  background: #eaf5fc;
  color: #1279bd;
  font-size: 11px;
  line-height: 1.6;
  border-radius: 6px;
  margin: 15px 0;
}
dialog .field {
  display: block;
  font-size: 12px;
  margin: 12px 0;
  color: #5a7b90;
}
dialog input {
  display: block;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 5px;
}
dialog input[type="checkbox"] {
  display: inline-block;
  width: auto;
  margin-right: 7px;
}
dialog .two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
}
.order-price {
  font-weight: 700;
  color: var(--blue-d) !important;
  font-size: 16px !important;
}
.pickup {
  font-size: 11px !important;
}
@media (min-width: 901px) {
  html,
  body {
    overflow: hidden;
  }
  .body {
    min-height: 0;
  }
  .work {
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .app.home {
    height: 100dvh;
  }
  .panel {
    scrollbar-width: thin;
  }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .body {
    grid-template-columns: 58px 240px minmax(0, 1fr);
  }
  .tool {
    gap: 7px;
  }
  .prod {
    max-width: 280px;
  }
  .btn {
    padding: 7px 9px;
  }
  .pagebar {
    gap: 6px;
  }
  .pagebar .pt {
    font-size: 12px;
  }
  .pagebar input[type="range"] {
    width: 80px;
  }
  .badge {
    font-size: 9px;
  }
  .pgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .app {
    height: auto;
    min-height: 100dvh;
  }
  .tool {
    flex-wrap: wrap;
  }
  .tool .prod {
    order: 4;
    width: 100%;
    font-size: 11px;
  }
  .top {
    height: 49px;
  }
  .top .tt {
    display: none;
  }
  .body {
    grid-template-columns: 55px minmax(0, 1fr);
    align-items: start;
  }
  .rail {
    order: 0;
    grid-column: 1;
    grid-row: 1;
    flex-direction: column;
    overflow: auto;
    border-right: 1px solid var(--line);
    border-top: 0;
    position: sticky;
    top: 0;
    max-height: 90dvh;
  }
  .rail button {
    flex: none;
    padding: 10px 2px;
    font-size: 9px;
  }
  .rail button svg {
    width: 20px;
    height: 20px;
  }
  .work {
    order: 0;
    grid-column: 2;
    grid-row: 1;
  }
  .panel {
    order: 0;
    grid-column: 2;
    grid-row: 1;
    display: none;
  }
  .body.show-panel .work {
    display: none;
  }
  .body.show-panel .panel {
    display: block;
  }
  .mobile-editor {
    display: flex;
    width: calc(100% - 24px);
    margin: 12px;
  }
  .stage {
    height: min(70dvh, calc((100vw - 55px) * 0.85));
    min-height: 230px;
  }
  .pagebar {
    flex-wrap: wrap;
  }
  .pagebar .pt {
    flex: 1 0 55%;
  }
  .badge {
    font-size: 9px;
  }
  .nav {
    display: block;
  }
  .pane {
    padding: 12px;
  }
  .pane input,
  .pane select,
  .pane textarea {
    font-size: 16px;
  }
  .hero {
    padding: 24px 18px;
  }
  .hero h1 {
    font-size: 28px;
  }
  .hero p {
    font-size: 13px;
  }
  .steps {
    gap: 12px;
  }
  .step {
    font-size: 10px;
  }
  .prods {
    padding: 15px 16px;
  }
  .pgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .card .pv2 {
    height: 170px;
  }
  .card .foot .btn {
    width: 100%;
  }
  .card h3 {
    font-size: 12px;
  }
  .card .meta {
    font-size: 9px;
  }
  .card .desc {
    font-size: 10px;
  }
  .hero h1 {
    max-width: 570px;
  }
  .feats {
    display: none;
  }
  .app.home .top {
    height: 62px;
  }
  .app.home .brand img {
    height: 51px;
    width: 64px;
  }
  .lay canvas {
    height: 120px;
  }
  .lib {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 480px) {
  .card .pv2 {
    height: 145px;
  }
  .card .cb {
    padding: 10px;
  }
  .card .price {
    font-size: 14px;
  }
  .top .brand-sub {
    font-size: 6px;
    letter-spacing: 0.7px;
  }
  .tabs button {
    font-size: 11px;
    padding: 6px 9px;
  }
  .tool .btn {
    font-size: 10px;
  }
  .pagebar .btn {
    font-size: 10px;
    padding: 7px 9px;
  }
  .pagebar input[type="range"] {
    width: 105px;
  }
  .lib {
    grid-template-columns: repeat(2, 1fr);
  }
  .card .desc {
    display: none;
  }
  .card .meta {
    line-height: 1.6;
  }
  .dialog-actions {
    flex-direction: column;
  }
  .card .foot {
    margin-top: 4px;
  }
}
@media print {
  body > * {
    display: none !important;
  }
  body:after {
    content: "Ez az előnézet nem nyomtatási fájl.";
  }
}
/* Larger tool labels and the original photographic product illustrations. */
@media (min-width: 901px) {
  .body {
    grid-template-columns: 76px 296px minmax(0, 1fr);
  }
  .rail button {
    font-size: 12px;
    padding: 12px 3px 10px;
  }
  .rail button svg {
    width: 27px;
    height: 27px;
  }
  .pane {
    padding: 17px 18px 23px;
  }
  .pane h3 {
    font-size: 18px;
  }
  .pane label.f {
    font-size: 14px;
  }
  .pane label.f span {
    font-size: 13px;
  }
  .pane .hint {
    font-size: 12px;
  }
  .pane .btn {
    font-size: 13px;
  }
  .pane input,
  .pane select,
  .pane textarea {
    font-size: 14px;
  }
  .pane .lay {
    font-size: 12px;
  }
  .pane .lay canvas {
    height: 104px;
  }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .body {
    grid-template-columns: 68px 267px minmax(0, 1fr);
  }
  .rail button {
    font-size: 11px;
  }
  .pane {
    padding: 14px;
  }
  .pane .btn {
    font-size: 12px;
  }
}
.export-status {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.7px;
  color: #1279bd;
  max-width: 100px;
  line-height: 1.4;
}
.month-decor {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 4px;
}
.month-decor h4 {
  color: var(--blue-d);
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}
.decor-colors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  font-size: 11px;
  color: #658598;
  margin: 14px 0;
}
.decor-colors label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.decor-colors input {
  display: block;
  width: 100%;
  height: 35px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px;
  cursor: pointer;
}
.vr {
  min-width: 31px;
  min-height: 31px;
}
.vr.on {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.photo-product-art {
  background: linear-gradient(130deg, #eaf5fc, #f6fafc) !important;
  overflow: hidden;
}
.card:nth-child(3n + 2) .photo-product-art {
  background: linear-gradient(130deg, #eaf5fc, #f7fbfd) !important;
}
.card:nth-child(3n) .photo-product-art {
  background: linear-gradient(130deg, #edf7fc, #f7fbfd) !important;
}
@media (max-width: 900px) {
  .export-status {
    display: none;
  }
  .actions {
    gap: 5px;
  }
  .rail button {
    font-size: 10px;
  }
  .rail button svg {
    width: 23px;
    height: 23px;
  }
  .decor-colors input {
    height: 40px;
  }
  .month-decor h4 {
    font-size: 13px;
  }
}
.theme-chooser {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.theme-chooser summary {
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  color: var(--blue-d);
  padding: 3px 0 12px;
}
.theme-chooser .lays {
  margin-top: 3px;
}
.monthly-artwork {
  padding-top: 17px;
}
.monthly-artwork > h4 {
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin-bottom: 8px;
}
.variant-gallery {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.variant-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  padding: 4px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  overflow: hidden;
  text-align: center;
}
.variant-card canvas {
  width: 100%;
  height: 82px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}
.variant-card span {
  display: block;
  font:
    550 11px/1.45 "DM Sans",
    sans-serif;
  color: var(--muted);
  padding: 7px 3px 4px;
  width: 100%;
}
.variant-card.on {
  padding: 3px;
  border: 2px solid var(--blue);
  background: #f0f8fd;
}
.variant-card.on span {
  color: var(--blue-d);
  font-weight: 700;
}
.variant-card:hover {
  box-shadow: 0 2px 10px #17334814;
}
.monthly-artwork .full {
  white-space: normal;
  line-height: 1.45;
}
.monthly-artwork .decor-colors {
  font-size: 12px;
}
.monthly-artwork .hint {
  line-height: 1.6;
}
@media (max-width: 900px) {
  .variant-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .variant-card canvas {
    height: 90px;
  }
  .variant-card span {
    font-size: 10px;
  }
}
@media (max-width: 480px) {
  .variant-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* A compact choice instead of a second large gallery. */
.theme-chooser > h4 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.monthly-artwork {
  padding-top: 14px;
}
.variant-gallery {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 78px !important;
  gap: 10px;
  align-items: end;
  margin: 9px 0;
}
.variant-select-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
}
.variant-select-label select {
  display: block;
  margin-top: 5px;
  width: 100%;
  font-size: 13px;
  padding: 9px 7px;
}
.selected-variant-preview {
  width: 78px;
  height: 60px;
  border: 1px solid var(--line);
  border-radius: 5px;
  object-fit: cover;
  align-self: end;
}
.monthly-artwork > h4 {
  font-size: 13px;
}
.monthly-artwork .hint {
  font-size: 11px;
}
.monthly-artwork .decor-colors {
  margin-block: 10px;
}
.monthly-artwork #variantCurrentAuto {
  font-size: 11px;
  padding-block: 6px;
}
.monthly-artwork .f {
  margin-bottom: 10px;
}
.theme-chooser .lay {
  font-size: 11px;
}
.card {
  position: relative;
}
.card-open:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
  border-radius: 9px;
}
.card:focus-within {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.card:hover {
  border-color: #a9cee5;
}
@media (max-width: 900px) {
  .variant-select-label select {
    font-size: 16px;
  }
  .variant-gallery {
    grid-template-columns: minmax(0, 1fr) 95px !important;
  }
  .selected-variant-preview {
    width: 95px;
    height: 68px;
  }
}

/* V12: one complete raster product image, stable at every card width. */
.card {
  min-width: 0;
}
.card .pv2 {
  height: auto;
  aspect-ratio: 11/8.2;
  padding: 0;
  flex-shrink: 0;
}
.card .product-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  min-width: 0;
}
.card .cb {
  gap: 9px;
}
.card h3 {
  line-height: 1.45;
  overflow-wrap: break-word;
}
.card .foot {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.card .foot .btn {
  width: 100%;
  min-height: 42px;
  font-size: 12px;
  white-space: normal;
}
.card .meta {
  font-size: 12px;
  line-height: 1.5;
}
.card .price {
  font-size: 18px;
}
@media (max-width: 600px) {
  .pgrid {
    gap: 12px;
  }
  .prods {
    padding: 16px 12px 24px;
  }
  .card .cb {
    padding: 12px;
    gap: 8px;
  }
  .card h3 {
    font-size: 13px;
    min-height: 3em;
  }
  .card .meta {
    font-size: 11px;
  }
  .card .desc {
    display: none;
  }
  .card .price {
    font-size: 17px;
  }
  .card .foot .btn {
    font-size: 11px;
    padding: 10px 4px;
    min-height: 44px;
  }
  .card .kind {
    font-size: 8px;
    left: 6px;
    top: 6px;
  }
  .card:hover {
    transform: none;
  }
}
@media (max-width: 359px) {
  .pgrid {
    grid-template-columns: minmax(0, 1fr);
  }
  .card h3 {
    min-height: 0;
    font-size: 15px;
  }
  .card .pv2 {
    aspect-ratio: 1.6;
  }
  .card .foot .btn {
    font-size: 13px;
  }
}

/* Bundled, licensed calendar fonts; no external font service. */
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("assets/fonts/caveat.woff") format("woff");
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("assets/fonts/lora.woff") format("woff");
}
@font-face {
  font-family: "Crimson Pro";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("assets/fonts/crimsonpro.woff") format("woff");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("assets/fonts/nunito.woff") format("woff");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("assets/fonts/outfit.woff") format("woff");
}

/* Project state and export controls. */
.project-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
#saveStatus {
  font-size: 10px;
  line-height: 1.3;
  color: var(--muted);
  max-width: 155px;
}
.failed {
  color: #a22 !important;
}
#exportDpi {
  width: 83px;
  font-size: 12px;
  padding: 7px 5px;
}
#exportDialog {
  max-width: 390px;
  width: calc(100% - 32px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}
#exportDialog::backdrop {
  background: #17334880;
}
#exportDialog h3 {
  margin: 0 0 14px;
}
#exportDialog button {
  min-height: 44px;
}
.panel-backdrop {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (max-width: 900px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }
  .app {
    height: 100dvh;
    min-height: 0;
    grid-template-rows: 48px 84px minmax(0, 1fr);
  }
  .app.home {
    height: 100dvh;
    grid-template-rows: 64px minmax(0, 1fr);
  }
  .app:not(.home) .top {
    height: 48px;
    min-height: 48px;
    padding: 3px 10px;
    gap: 7px;
  }
  .app:not(.home) .brand img {
    height: 39px;
    width: 48px;
  }
  .app:not(.home) .brand-sub {
    display: none;
  }
  .top .tt {
    display: none;
  }
  .project-tools {
    gap: 5px;
  }
  .project-tools .btn {
    font-size: 10px;
    min-height: 34px;
    padding: 6px 8px;
  }
  #saveStatus {
    font-size: 9px;
    max-width: 100px;
  }
  .tool {
    height: 84px;
    min-height: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 34px 34px;
    gap: 4px 8px;
    padding: 6px 10px;
    align-items: center;
    overflow: hidden;
  }
  .tool .back {
    grid-row: 1;
    grid-column: 1;
    min-height: 32px;
    padding: 6px 8px;
    font-size: 11px;
  }
  .tool .prod {
    grid-row: 1;
    grid-column: 2;
    width: auto;
    order: 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 10px;
  }
  .tabs {
    grid-row: 2;
    grid-column: 1;
    margin: 0;
    padding: 2px;
    min-width: 0;
  }
  .tabs button {
    font-size: 10px;
    padding: 7px 6px;
    white-space: nowrap;
  }
  .actions {
    grid-row: 2;
    grid-column: 2;
    margin: 0;
    justify-self: end;
    gap: 4px;
    min-width: 0;
  }
  .actions .btn {
    font-size: 10px;
    padding: 7px 6px;
    min-height: 32px;
  }
  #exportDpi {
    width: 65px;
    font-size: 10px;
    height: 32px;
    padding: 4px 2px;
  }
  #exportStatus {
    display: none;
  }
  .body {
    display: block;
    position: relative;
    min-height: 0;
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
    overflow: hidden;
  }
  .rail {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 40;
    height: calc(62px + env(safe-area-inset-bottom));
    max-height: none;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding: 3px 4px calc(3px + env(safe-area-inset-bottom));
    gap: 1px;
    background: white;
    border: 0;
    border-top: 1px solid var(--line);
    overflow: hidden;
  }
  .rail button {
    min-width: 0;
    min-height: 52px;
    padding: 5px 1px;
    font-size: 10px;
    gap: 3px;
  }
  .rail button svg {
    width: 21px;
    height: 21px;
  }
  .work,
  .body.show-panel .work {
    display: grid;
    height: 100%;
    width: 100%;
    grid-template-rows: minmax(0, 1fr) auto;
    grid-column: auto;
    grid-row: auto;
    overflow: hidden;
  }
  .editview {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    overflow: hidden;
  }
  .stage {
    height: auto;
    min-height: 80px;
    width: 100%;
    background: var(--bg);
  }
  .pagebar {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    padding: 6px 9px;
    min-height: 48px;
    max-height: 56px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }
  .pagebar > * {
    flex-shrink: 0;
  }
  .pagebar .pt {
    flex: 0 0 auto;
    font-size: 11px;
    min-width: 65px;
  }
  .pagebar .btn {
    font-size: 11px;
    min-height: 34px;
    padding: 6px 8px;
  }
  .pagebar .badge {
    font-size: 10px;
    white-space: nowrap;
  }
  .pagebar label.z {
    font-size: 11px;
  }
  .pagebar input[type="range"] {
    width: 85px;
  }
  .page-counter {
    font-size: 10px;
  }
  .film {
    max-height: 88px;
    min-height: 0;
    padding: 4px 8px;
    gap: 7px;
  }
  .film .th canvas {
    height: 48px;
  }
  .film .th {
    font-size: 9px;
    width: 68px;
    max-width: 68px;
  }
  .gridview {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
  }
  .panel,
  .body.show-panel .panel {
    position: absolute;
    inset: auto 0 calc(62px + env(safe-area-inset-bottom)) 0;
    z-index: 35;
    display: block;
    max-height: min(72dvh, calc(100% - 72px));
    height: auto;
    min-height: 0;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    background: white;
    box-shadow: 0 -8px 32px #17334825;
    overflow: auto;
    overscroll-behavior: contain;
    transform: translateY(120%);
    visibility: hidden;
    transition:
      transform 0.18s ease,
      visibility 0.18s;
    pointer-events: none;
  }
  .body.show-panel .panel {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }
  .panel-backdrop:not([hidden]) {
    display: block;
    position: absolute;
    inset: 0 0 calc(62px + env(safe-area-inset-bottom));
    border: 0;
    background: #17334835;
    z-index: 30;
  }
  .mobile-editor {
    position: sticky;
    top: 0;
    z-index: 1;
    width: 100%;
    margin: 0;
    border-radius: 15px 15px 0 0;
    min-height: 44px;
    background: white !important;
    color: var(--blue-d);
    border: 0;
    border-bottom: 1px solid var(--line);
  }
  .pane {
    padding: 14px 16px 20px;
  }
  .pane .btn {
    min-height: 42px;
  }
  .pane .lib {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .pane .lay canvas {
    height: 90px;
  }
  .msg {
    position: absolute;
    top: 6px;
    left: 8px;
    right: 8px;
    z-index: 45;
    max-height: 100px;
    overflow: auto;
    white-space: pre-line;
  }
  .app.home .project-tools #saveStatus {
    display: none;
  }
  .app.home .top {
    gap: 5px;
  }
  .app.home .project-tools .btn {
    font-size: 10px;
  }
}
@media (max-width: 370px) {
  .tool {
    grid-template-columns: 125px minmax(0, 1fr);
    gap: 4px;
  }
  .tabs button {
    font-size: 9px;
    padding: 7px 4px;
  }
  .actions {
    gap: 2px;
  }
  .actions .btn {
    font-size: 9px;
    padding: 7px 4px;
  }
  #exportDpi {
    width: 56px;
    font-size: 9px;
  }
  #saveStatus {
    max-width: 74px;
    font-size: 8px;
  }
  .project-tools .btn {
    padding: 5px 6px;
  }
}
@media (max-width: 900px) and (max-height: 500px) {
  .app {
    grid-template-rows: 40px 70px minmax(0, 1fr);
  }
  .app:not(.home) .top {
    height: 40px;
    min-height: 40px;
  }
  .app:not(.home) .brand img {
    height: 32px;
  }
  .tool {
    height: 70px;
    grid-template-rows: 28px 28px;
    padding: 4px 8px;
    gap: 3px 7px;
  }
  .tool .back,
  .actions .btn,
  #exportDpi {
    min-height: 27px;
    height: 27px;
    padding-top: 3px;
    padding-bottom: 3px;
  }
  .rail {
    height: calc(51px + env(safe-area-inset-bottom));
  }
  .rail button {
    min-height: 43px;
    font-size: 9px;
    gap: 1px;
    padding: 2px;
  }
  .rail button svg {
    width: 18px;
    height: 18px;
  }
  .body {
    padding-bottom: calc(51px + env(safe-area-inset-bottom));
  }
  .panel,
  .body.show-panel .panel {
    bottom: calc(51px + env(safe-area-inset-bottom));
    max-height: calc(100% - 51px);
  }
  .panel-backdrop:not([hidden]) {
    bottom: calc(51px + env(safe-area-inset-bottom));
  }
  .pagebar {
    min-height: 40px;
    padding: 3px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .panel {
    transition: none !important;
  }
}
@media (max-width: 900px) {
  .tool {
    grid-template-columns: 136px minmax(0, 1fr);
  }
  .tabs button {
    font-size: 0;
    padding: 7px 6px;
  }
  .tabs button::before {
    font-size: 10px;
    content: "Oldalak";
  }
  .tabs button[data-view="edit"]::before {
    content: "Szerkesztés";
  }
}
@media (max-width: 370px) {
  .tool {
    grid-template-columns: 118px minmax(0, 1fr);
  }
  .tabs button {
    padding: 7px 4px;
  }
  .tabs button::before {
    font-size: 9px;
  }
}
@media (max-width: 370px) {
  .tool {
    grid-template-columns: 110px minmax(0, 1fr);
  }
}
@media (max-width: 900px) {
  .msg {
    transform: none;
    max-width: none;
    width: auto;
  }
}
@media (max-width: 900px) {
  .panel .mobile-editor {
    color: var(--blue-d) !important;
    border-color: var(--line);
  }
}

/* V14 – Fotó’s Dekor blue/white style study. Same palette as the landing page order button. */
:root {
  --blue: #3099dc;
  --blue-d: #1279bd;
  --orange: #1279bd;
  --orange-d: #0b639b;
}
.btn.orange {
  color: #fff;
  background: #1279bd;
  border-color: #1279bd;
}
.btn.orange:hover {
  background: #0b639b;
  border-color: #0b639b;
}
.rail button.on {
  background: #e6f3fc;
  color: #1279bd;
}
.step b {
  background: #1279bd;
  color: white;
}
.photo-product-art,
.card:nth-child(3n + 2) .photo-product-art,
.card:nth-child(3n) .photo-product-art {
  background: linear-gradient(130deg, #eaf5fc, #f7fbfd) !important;
}

.saved-project {
  max-width: 1192px;
  margin: 16px auto 4px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.saved-project strong {
  display: block;
  font-size: 14px;
  color: var(--blue-d);
}
.saved-project span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.saved-project .btn {
  flex-shrink: 0;
  min-height: 42px;
}
@media (max-width: 1250px) {
  .saved-project {
    margin-inline: 24px;
  }
}
@media (max-width: 600px) {
  .saved-project {
    margin: 14px 12px 0;
    padding: 12px;
    gap: 10px;
  }
  .saved-project strong {
    font-size: 13px;
  }
  .saved-project span {
    font-size: 11px;
    line-height: 1.4;
  }
  .saved-project .btn {
    padding: 8px 10px;
    font-size: 12px;
  }
}

body.checkout-active .app { grid-template-rows: auto minmax(0, 1fr); }
body.checkout-active .app > :not(.top):not(.order-page) { display: none; }
body.checkout-active .top .project-tools { display: none; }
body.checkout-active .order-page {
  width: 100%; min-height: 0; overflow: auto; margin: 0;
  padding: 16px max(16px, calc((100% - 1080px) / 2)) 28px;
}
.order-page[hidden] { display: none !important; }
.order-page { width: min(100% - 32px, 600px); margin: 24px auto; padding: 24px; background: white; border-radius: 12px; }
.order-page h1 { margin-top: 0; }
#orderForm label { display: grid; gap: 5px; margin: 12px 0; }
#orderForm input { font: inherit; padding: 8px; border: 1px solid #a6bed1; border-radius: 5px; }
#orderTotal { font-weight: bold; }
.order-confirmation { margin: 12px auto; width: min(100% - 32px, 1152px); padding: 12px; background: #e4f2eb; color: #194e35; border-radius: 8px; }

.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 12px; margin: 8px 0; border: 1px solid #d5e3f1; border-radius: 10px; }
.cart-line strong { grid-column: 1 / -1; }
.cart-line input { max-width: 110px; }
.cart-line button { align-self: end; }
#homeCart { margin: 12px 0; }

.order-page { width: min(100% - 32px, 1080px); padding: 0; background: transparent; color: #183b57; }
.checkout-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 20px 0; }
.checkout-steps li { border-radius: 20px; background: #e4eef6; padding: 6px 12px; }
.checkout-steps [aria-current] { background: #196ea5; color: white; font-weight: 700; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 340px); align-items: start; gap: 16px; }
.checkout-card { border: 1px solid #d5e3f1; border-radius: 14px; background: white; padding: clamp(14px, 3vw, 24px); }
.checkout-card h2 { margin-top: 0; font-size: 1.2rem; }
.checkout-totals .btn { width: 100%; white-space: normal; margin-bottom: 8px; }
.checkout-totals p { margin-top: 0; overflow-wrap: anywhere; }
#orderForm textarea { width: 100%; font: inherit; padding: 8px; border: 1px solid #a6bed1; border-radius: 5px; }
#orderForm .checkout-check { display: flex; align-items: flex-start; gap: 10px; }
#orderForm .checkout-check input { margin-top: .24em; }
#checkoutReview p { border-bottom: 1px solid #d5e3f1; padding-bottom: 8px; overflow-wrap: anywhere; }
@media (max-width: 680px) { .checkout-grid { grid-template-columns: 1fr; } }
#cartAddDialog { width: min(92vw, 470px); border: 1px solid #d5e3f1; border-radius: 14px; padding: 22px; color: #183b57; }
#cartAddDialog::backdrop { background: #122e47a0; }
#cartAddDialog input { width: 78px; font: inherit; padding: 6px; }
.order-page [hidden] { display: none !important; }
#orderCounty { font: inherit; padding: 8px; border: 1px solid #a6bed1; border-radius: 5px; }
#orderBreakdown { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; }
#orderBreakdown dd { margin: 0; text-align: right; }
#orderProgress { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 14px; padding: 14px; margin: 0 0 12px; background: #e7f3fd; border: 1px solid #9cc8e9; border-radius: 12px; }
.order-spinner { flex: 0 0 24px; height: 24px; border: 3px solid #b6d6ec; border-top-color: #176eaa; border-radius: 50%; animation: order-spin .85s linear infinite; }
@keyframes order-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .order-spinner { animation: none; } }
