@font-face {
  font-family: "Ancient";
  src: url("/fonts/Ancient.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "AngerStyles";
  src: url("/fonts/AngerStyles.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Chalk";
  src: url("/fonts/Chalk.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Dacherry";
  src: url("/fonts/Dacherry.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Heartless";
  src: url("/fonts/Heartless.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "KGBlankSpace";
  src: url("/fonts/KGBlankSpace.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Moonstar";
  src: url("/fonts/Moonstar.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "myheart";
  src: url("/fonts/myheart.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "OhChewy";
  src: url("/fonts/Oh-Chewy.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "OldLondon";
  src: url("/fonts/OldLondon.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg0: #050612;
  --bg1: #07081a;
  --panel: rgba(14, 16, 30, 0.62);
  --panel2: rgba(10, 12, 22, 0.78);
  --line: rgba(255, 255, 255, 0.09);
  --text: #eaf0ff;
  --muted: #a7b0d6;

  --accent: #6b78ff; /* purple-blue */
  --accent2: #56c0ff; /* cyan */
  --danger: #ff4d6d;
  --good: #36d399;

  --shadow: 0 18px 70px rgba(0, 0, 0, 0.45);
  --shadow2: 0 12px 44px rgba(0, 0, 0, 0.35);
  --r: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial;
  background:
    radial-gradient(
      900px 520px at 55% 0%,
      rgba(107, 120, 255, 0.25),
      transparent 62%
    ),
    radial-gradient(
      900px 520px at 20% 12%,
      rgba(86, 192, 255, 0.18),
      transparent 60%
    ),
    radial-gradient(
      1200px 720px at 90% 40%,
      rgba(255, 77, 109, 0.1),
      transparent 60%
    ),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  color: var(--text);
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.mono {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

/* ===== Buttons ===== */
.btn,
button {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(14, 16, 30, 0.78);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 0.08s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    filter 0.15s ease;
  user-select: none;
}
.btn:hover,
button:hover {
  border-color: rgba(107, 120, 255, 0.42);
  filter: brightness(1.05);
}
.btn:active,
button:active {
  transform: translateY(1px);
}

.btn.primary {
  border-color: rgba(107, 120, 255, 0.65);
  background: linear-gradient(
    180deg,
    rgba(107, 120, 255, 0.28),
    rgba(107, 120, 255, 0.16)
  );
  box-shadow: 0 0 0 6px rgba(107, 120, 255, 0.08);
}
.btn.danger {
  border-color: rgba(255, 77, 109, 0.65);
  background: linear-gradient(
    180deg,
    rgba(255, 77, 109, 0.22),
    rgba(255, 77, 109, 0.12)
  );
}
.btn.ghost {
  background: transparent;
}

/* ===== Inputs ===== */
input,
select,
textarea {
  border: 1px solid var(--line);
  background: rgba(10, 12, 22, 0.72);
  color: var(--text);
  border-radius: 14px;
  outline: none;
  padding: 10px 12px;
}
.search {
  width: 100%;
}

/* ===== Fonts ===== */
@font-face {
  font-family: "Coffee";
  src: url("/fonts/font.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Bubble";
  src:
    local("Bubblegum Sans"),
    url("/fonts/Bubblegum.otf") format("opentype");
  font-display: swap;
}

/* =======================================================
   LOGIN VIEW (FULL SCREEN GATE)
======================================================= */
.loginView {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.loginCard {
  width: min(980px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background:
    radial-gradient(
      700px 380px at 20% 0%,
      rgba(86, 192, 255, 0.18),
      transparent 55%
    ),
    radial-gradient(
      700px 380px at 80% 10%,
      rgba(107, 120, 255, 0.22),
      transparent 55%
    ),
    rgba(10, 12, 22, 0.55);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.loginBrand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 18px 18px 0;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 18px rgba(107, 120, 255, 0.55);
}

.loginTitle {
  font-weight: 950;
  letter-spacing: 0.2px;
  font-size: 18px;
}
.loginSub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.loginHero {
  padding: 22px 22px 26px;
  display: grid;
  gap: 14px;
}

.heroTitle {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 950;
  letter-spacing: 0.2px;
  line-height: 1.05;
}

.heroText {
  color: var(--muted);
  font-size: 14px;
  max-width: 62ch;
  line-height: 1.5;
}

.heroBullets {
  display: grid;
  gap: 6px;
  color: rgba(234, 240, 255, 0.85);
  font-size: 13px;
}
.heroBullets .b {
  padding-left: 2px;
}

.ctaBtn {
  margin-top: 6px;
  width: min(420px, 100%);
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(107, 120, 255, 0.68);
  background:
    radial-gradient(
      700px 200px at 50% 0%,
      rgba(86, 192, 255, 0.28),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      rgba(107, 120, 255, 0.34),
      rgba(107, 120, 255, 0.18)
    );
  box-shadow:
    0 18px 60px rgba(107, 120, 255, 0.2),
    0 0 0 8px rgba(107, 120, 255, 0.08);
  font-weight: 950;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    filter 0.15s ease;
}
.ctaBtn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.ctaBtn:active {
  transform: translateY(0px);
}

.ctaIcon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: rgba(86, 192, 255, 0.18);
  border: 1px solid rgba(86, 192, 255, 0.3);
  box-shadow: 0 0 0 6px rgba(86, 192, 255, 0.07);
}

.loginFine {
  color: rgba(167, 176, 214, 0.95);
  font-size: 12px;
}

.loginFooter {
  margin-top: 14px;
  color: rgba(167, 176, 214, 0.75);
  font-size: 12px;
}

/* =======================================================
   TOPBAR
======================================================= */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 8, 18, 0.55);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.title {
  font-weight: 950;
  letter-spacing: 0.2px;
}
.subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.topbarRight {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(16, 18, 32, 0.55);
  color: var(--text);
  font-size: 12.5px;
  white-space: nowrap;
}

/* =======================================================
   PAGES
======================================================= */
.page {
  padding: 16px;
}

.pageAlbums {
  max-width: 1200px;
  margin: 0 auto;
}

.albumsHeader {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-end;
  margin: 10px 0 14px;
  flex-wrap: wrap;
}

.hTitle {
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 950;
  letter-spacing: 0.2px;
}
.hSub {
  color: var(--muted);
  margin-top: 6px;
}

.albumsActions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.segmented {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(16, 18, 32, 0.4);
  backdrop-filter: blur(10px);
}
.segBtn {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-weight: 950;
}
.segBtn.active {
  border-color: rgba(107, 120, 255, 0.55);
  background: rgba(107, 120, 255, 0.16);
}

.dashPanel {
  margin-top: 10px;
}

.albumsGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 900px) {
  .albumsGrid {
    grid-template-columns: 1fr;
  }
}

.albumCard {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(16, 18, 32, 0.48);
  border-radius: 22px;
  padding: 14px;
  box-shadow: var(--shadow2);
  backdrop-filter: blur(12px);
}

.albumHead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.albumName {
  font-weight: 950;
  font-size: 18px;
}
.albumMeta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.albumActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.albumPreview {
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
}
.previewLine {
  font-size: 12px;
  color: rgba(167, 176, 214, 0.92);
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}
.previewLine:last-child {
  border-bottom: none;
}

.emptyState {
  grid-column: 1 / -1;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  padding: 18px;
  background: rgba(12, 14, 26, 0.46);
}
.emptyTitle {
  font-weight: 950;
  font-size: 18px;
}
.emptySub {
  color: var(--muted);
  margin-top: 6px;
}

/* Background browser */
.bgBrowserHeader {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.bgBrowserGrid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px) {
  .bgBrowserGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .bgBrowserGrid {
    grid-template-columns: 1fr;
  }
}

.bgBrowserCard {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(16, 18, 32, 0.48);
  border-radius: 22px;
  padding: 12px;
  box-shadow: var(--shadow2);
  backdrop-filter: blur(12px);
}
.bgBrowserThumb {
  width: 100%;
  height: 150px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}
.bgBrowserName {
  margin-top: 10px;
  font-weight: 950;
}
.bgBrowserMeta {
  margin-top: 6px;
  color: rgba(167, 176, 214, 0.92);
  font-size: 12px;
  line-height: 1.4;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 14, 26, 0.55);
  font-size: 12px;
  font-weight: 950;
}
.badge.owned {
  border-color: rgba(86, 192, 255, 0.35);
  background: rgba(86, 192, 255, 0.14);
}

/* =======================================================
   EDITOR LAYOUT
======================================================= */
.pageEditor {
  padding: 12px 14px 18px;
  max-width: 1400px;
  margin: 0 auto;
}

.editorHeader {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 12px 0 12px;
}

.editorMeta {
  flex: 1;
  min-width: 220px;
}
.editorTitle {
  font-weight: 950;
  font-size: 18px;
}
.editorSub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.editorRight {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.pagePicker {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border-radius: 18px;
  background: rgba(16, 18, 32, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}
#pageInput {
  width: 110px;
  height: 44px;
  font-size: 16px;
  text-align: center;
}

/* sidebar + canvas */
.editorLayout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 1020px) {
  .editorLayout {
    grid-template-columns: 1fr;
  }
}

/* DOCK (sidebar) */
.dock {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(16, 18, 32, 0.48);
  overflow: hidden;
  position: sticky;
  top: 84px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow2);
}
@media (max-width: 1020px) {
  .dock {
    position: relative;
    top: 0;
  }
}

.dockTabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 20, 0.4);
}

.tabBtn {
  padding: 12px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 14, 26, 0.55);
  color: var(--text);
  font-weight: 950;
}
.tabBtn.active {
  border-color: rgba(107, 120, 255, 0.55);
  background: rgba(107, 120, 255, 0.16);
}

.dockPanels {
  padding: 12px;
}

.panelDock {
  display: none;
}
.panelDock.show {
  display: block;
}

.panelTitle {
  font-weight: 950;
  margin-bottom: 10px;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.chk {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.smallNote {
  margin-top: 10px;
  color: rgba(167, 176, 214, 0.92);
  font-size: 12px;
  line-height: 1.4;
}

/* Generic box blocks inside sidebar */
.box {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(10, 12, 22, 0.6);
  padding: 12px;
}
.boxTitle {
  font-weight: 950;
  margin-bottom: 10px;
}

/* NUDGE */
.nudgeGrid {
  display: grid;
  grid-template-columns: 46px 46px 46px;
  grid-template-rows: 46px 46px;
  gap: 10px;
}
.nudgeBtn {
  padding: 10px;
  border-radius: 16px;
  font-weight: 950;
}

/* In album list */
.albumItemsList {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 240px;
  overflow: auto;
  padding-right: 4px;
}
.albumItemRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(10, 12, 22, 0.78);
  padding: 12px;
}
.albumItemLeft {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.albumItemCode {
  font-weight: 950;
}
.albumItemMeta {
  color: rgba(167, 176, 214, 0.92);
  font-size: 12px;
}
.albumItemActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* cards list */
.cardsList {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 380px;
  overflow: auto;
  padding-right: 4px;
}
@media (max-width: 650px) {
  .cardsList {
    grid-template-columns: 1fr;
    max-height: 300px;
  }
}
.cardTile {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(10, 12, 22, 0.76);
  padding: 12px;
  cursor: grab;
  user-select: none;
  display: flex;
  gap: 12px;
  align-items: center;
}
.cardTile:active {
  cursor: grabbing;
}
.cardTile .code {
  font-weight: 950;
}
.cardTile .meta {
  color: rgba(167, 176, 214, 0.92);
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.35;
}

.selectedInfo {
  color: rgba(167, 176, 214, 0.95);
  font-size: 13px;
}

/* backgrounds shop (owned) */
.bgShop {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: 440px;
  overflow: auto;
  padding-right: 4px;
}
@media (max-width: 600px) {
  .bgShop {
    grid-template-columns: 1fr;
  }
}
.bgCard {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 12, 22, 0.76);
  border-radius: 18px;
  padding: 12px;
  overflow: hidden;
}
.bgThumb {
  width: 100%;
  height: 120px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}
.bgName {
  font-weight: 950;
  margin-top: 10px;
}
.bgMeta {
  color: rgba(167, 176, 214, 0.92);
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.35;
}
.bgActions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.bgActions button {
  flex: 1;
}

/* =======================================================
   CANVAS
======================================================= */
.canvasWrap {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 14px;
  background: rgba(16, 18, 32, 0.45);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.canvasTop {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.hint {
  color: rgba(167, 176, 214, 0.95);
  font-size: 13px;
}
.hint2 {
  color: rgba(167, 176, 214, 0.85);
  font-size: 12px;
}

.canvasOuter {
  width: 100%;
  overflow: auto;
  border-radius: 18px;
}

/* the actual album area */
.canvas {
  position: relative;

  width: 1160px;
  height: 830px;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;

  background: transparent;

  overflow: hidden;

  outline: none;
}

/* background image layer */
.bgLayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.96;
  z-index: 0;
  pointer-events: none;
}

.canvas .grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  opacity: 0.24;
  z-index: 1;
}

/* CARD BASE */
.item {
  position: absolute;
  width: 290px;
  height: 415px;
  border-radius: 16px;
  user-select: none;
  cursor: move;
  box-shadow: 0 18px 64px rgba(0, 0, 0, 0.55);
  z-index: 5;
  transform-origin: center center;
}
.item.selected {
  outline: 2px solid rgba(86, 192, 255, 0.85);
  box-shadow:
    0 0 0 8px rgba(86, 192, 255, 0.14),
    0 18px 64px rgba(0, 0, 0, 0.55);
}
.item .char {
  position: absolute;
  left: 32px;
  top: 33px;
  width: 225px;
  height: 350px;
  object-fit: cover;
  border-radius: 12px;
}
.item .frame {
  position: absolute;
  inset: 0;
  width: 290px;
  height: 415px;
  object-fit: contain;
  pointer-events: none;
}

/* TEXT */
.item .name {
  position: absolute;
  left: 35px;
  top: 330px;
  width: 220px;
  height: 64px;

  font-family: "Coffee", system-ui, sans-serif;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 400;
  color: #fff;
  text-align: center;

  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;

  padding: 0 6px 4px;
  pointer-events: none;

  text-shadow:
    1px 1px 0 #000,
    -1px 1px 0 #000,
    1px -1px 0 #000,
    -1px -1px 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000,
    1px 0 0 #000,
    -1px 0 0 #000;
}

.item .print {
  position: absolute;
  left: 225px;
  top: 298px;
  transform: translate(-50%, -50%);

  font-family: "Bubble", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 400;

  color: #fff;
  pointer-events: none;

  text-shadow:
    1px 1px 0 #000,
    -1px 1px 0 #000,
    1px -1px 0 #000,
    -1px -1px 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000,
    1px 0 0 #000,
    -1px 0 0 #000;
}

/* Mobile tweaks */
@media (max-width: 520px) {
  .topbarRight {
    gap: 8px;
  }
  .pill {
    width: 100%;
  }
  .ctaBtn {
    width: 100%;
  }
}
.bgBrowserPagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
html,
body {
  min-height: 100%;
}

body {
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
#saveBtn {
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 800;
}

.grid {
  pointer-events: none;
}

.bgLayer {
  pointer-events: none;
}
.textItem {
  position: absolute;
  cursor: grab;
  user-select: none;
  pointer-events: auto;
  max-width: 520px;
  line-height: 1.1;
  white-space: pre-line;
  word-break: break-word;
}

.textItem.selected {
  outline: 2px dashed #ffffff88;
  outline-offset: 6px;
}
#textInput {
  height: auto;
  resize: vertical;
  min-height: 90px;
}

#fontSelect,
#textGradientDirection,
#embedColorHex {
  width: 100%;
}

input[type="color"] {
  width: 56px;
  min-width: 56px;
  height: 42px;
  padding: 4px;
  cursor: pointer;
}

#textLetterSpacing,
#textStrokeSize,
#textSize {
  width: 100%;
}

input[type="number"] {
  width: 90px;
  text-align: center;
  font-weight: 600;
}
/* ===== FONT PREVIEW IN SELECT ===== */

#fontSelect option[value="Coffee"] {
  font-family: "Coffee";
}
#fontSelect option[value="Ancient"] {
  font-family: "Ancient";
}
#fontSelect option[value="AngerStyles"] {
  font-family: "AngerStyles";
}
#fontSelect option[value="Chalk"] {
  font-family: "Chalk";
}
#fontSelect option[value="Dacherry"] {
  font-family: "Dacherry";
}
#fontSelect option[value="Heartless"] {
  font-family: "Heartless";
}
#fontSelect option[value="KGBlankSpace"] {
  font-family: "KGBlankSpace";
}
#fontSelect option[value="Moonstar"] {
  font-family: "Moonstar";
}
#fontSelect option[value="myheart"] {
  font-family: "myheart";
}
#fontSelect option[value="OhChewy"] {
  font-family: "OhChewy";
}
#fontSelect option[value="OldLondon"] {
  font-family: "OldLondon";
}
.bgCard img,
.bgBrowserCard img {
  width: 100%;
  height: 140px; /* o 160px si quieres más grande */
  object-fit: cover;
  border-radius: 8px;
  display: block;
  transition: opacity 0.22s ease, filter 0.22s ease;
}

.bgCard img.img-loading,
.bgBrowserCard img.img-loading {
  opacity: 0.78;
  filter: blur(10px);
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.12) 40%,
      rgba(255, 255, 255, 0.05) 100%
    );
}
