/* ولاء v2 — نظام تصميم هادئ
   الأرضية: رمادي دافئ فاتح جداً · الحبر: كحلي رمادي · الأساسي: أزرق بترولي هادئ · لمسة: عسلي
   خط واحد: IBM Plex Sans Arabic بأوزان مختلفة، عناوين معتدلة الحجم */
:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --ink: #0f1c1a;
  --ink2: #33423f;
  --mut: #66736f;
  --mut2: #98a39f;
  --line: #e3e9e6;
  --line2: #eef2f0;
  --pri: #0f7a63;
  --pri2: #0b6150;
  --pri-soft: #e2f2ec;
  --pri-ink: #ffffff;
  --acc: #e39a2a;
  --acc-soft: #fdf2df;
  --ok: #2e7d5b;
  --ok-soft: #e4f2ea;
  --bad: #c2453d;
  --bad-soft: #fbe9e7;
  --warn: #b7791f;
  --warn-soft: #fdf3e1;
  --r: 14px;
  --r2: 20px;
  --sh1: 0 1px 2px rgba(28, 34, 48, 0.04), 0 1px 3px rgba(28, 34, 48, 0.06);
  --sh2: 0 4px 6px -2px rgba(28, 34, 48, 0.05), 0 12px 28px -8px rgba(28, 34, 48, 0.12);
  --sh3: 0 24px 60px -20px rgba(28, 34, 48, 0.28);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --f: 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, Tahoma, sans-serif;
}
* {
  box-sizing: border-box;
  min-width: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15.5px/1.7 var(--f);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
  color: var(--ink);
}
h1 {
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(21px, 2.2vw, 27px);
}
h3 {
  font-size: 16.5px;
}
h4 {
  font-size: 14.5px;
}
p {
  margin: 0;
}
a {
  color: inherit;
}
img {
  max-width: 100%;
  display: block;
}
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 max(4vw, 18px);
}
.mut {
  color: var(--mut);
}
.small {
  font-size: 14px;
}
.tiny {
  font-size: 12.5px;
}
.num {
  font-variant-numeric: tabular-nums;
}
.hide {
  display: none !important;
}
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.sp {
  flex: 1;
}
.stack {
  display: grid;
  gap: 12px;
}
svg.lucide {
  width: 18px;
  height: 18px;
  stroke-width: 1.75;
  flex: none;
}
.ico-lg svg.lucide {
  width: 22px;
  height: 22px;
}

/* top */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(245, 246, 248, 0.85);
  backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.top.scrolled {
  border-color: var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 19px;
  text-decoration: none;
  color: var(--ink);
}
.mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--pri);
  display: grid;
  place-items: center;
  color: #fff;
}
.mark svg.lucide {
  width: 17px;
  height: 17px;
}

/* buttons */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 500 15px var(--f);
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  background: var(--pri);
  color: #fff;
  transition:
    background 0.2s,
    transform 0.2s var(--spring),
    box-shadow 0.25s var(--ease);
}
.btn:hover {
  background: var(--pri2);
  box-shadow: 0 6px 16px -6px rgba(47, 93, 98, 0.55);
  transform: translateY(-1px);
}
.btn:active {
  transform: scale(0.97);
  transition-duration: 0.08s;
}
.btn.sec {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn.sec:hover {
  background: var(--bg);
  box-shadow: inset 0 0 0 1px #d6d9e0;
}
.btn.soft {
  background: var(--pri-soft);
  color: var(--pri);
}
.btn.soft:hover {
  background: #d8e7e7;
  box-shadow: none;
}
.btn.acc {
  background: var(--acc);
}
.btn.acc:hover {
  background: #c97f3b;
  box-shadow: 0 6px 16px -6px rgba(217, 142, 72, 0.6);
}
.btn.ghost {
  background: transparent;
  color: var(--ink2);
}
.btn.ghost:hover {
  background: var(--line2);
  box-shadow: none;
}
.btn.danger {
  background: var(--bad-soft);
  color: var(--bad);
}
.btn.danger:hover {
  background: #f6d7d3;
  box-shadow: none;
}
.btn.sm {
  padding: 7px 12px;
  min-height: 36px;
  font-size: 14px;
  border-radius: 10px;
}
.btn.icon {
  padding: 0;
  width: 40px;
  min-height: 40px;
}
.btn.block {
  width: 100%;
}
.btn[disabled] {
  opacity: 0.55;
  pointer-events: none;
}
.btn .spin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: rot 0.7s linear infinite;
}
@keyframes rot {
  to {
    transform: rotate(360deg);
  }
}
.rip {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.18;
  transform: scale(0);
  animation: rip 0.55s var(--ease) forwards;
  pointer-events: none;
}
@keyframes rip {
  to {
    transform: scale(3.5);
    opacity: 0;
  }
}
:focus-visible {
  outline: 2px solid var(--pri);
  outline-offset: 2px;
}

/* forms */
.lbl {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink2);
  margin: 14px 0 6px;
}
.in {
  width: 100%;
  font: 15.5px var(--f);
  padding: 10px 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  min-height: 44px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.in:hover {
  border-color: #d6d9e0;
}
.in:focus {
  outline: 0;
  border-color: var(--pri);
  box-shadow: 0 0 0 3px var(--pri-soft);
}
textarea.in {
  min-height: 80px;
  resize: vertical;
}
.hint {
  font-size: 12.5px;
  color: var(--mut);
  margin-top: 5px;
}
.err {
  color: var(--bad);
  font-size: 13.5px;
  margin-top: 8px;
}
.inwrap {
  position: relative;
}
.inwrap svg.lucide {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--mut2);
  pointer-events: none;
}
.inwrap .in {
  padding-right: 38px;
}

.chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  min-height: 38px;
  transition: all 0.2s var(--ease);
  user-select: none;
  color: var(--ink2);
}
.chip:hover {
  border-color: #cfd3da;
}
.chip.on {
  background: var(--pri-soft);
  border-color: var(--pri);
  color: var(--pri);
}
.chip.lock {
  cursor: default;
  opacity: 0.75;
}
.chip svg.lucide {
  width: 15px;
  height: 15px;
}

.swatches {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.sw {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s var(--spring);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.sw:hover {
  transform: scale(1.1);
}
.sw.on {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px var(--ink);
}

.iconpick {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.iconpick button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink2);
  transition: all 0.2s;
}
.iconpick button.on {
  background: var(--pri);
  border-color: var(--pri);
  color: #fff;
}

.seg {
  display: inline-flex;
  background: var(--line2);
  border-radius: 11px;
  padding: 3px;
  gap: 2px;
}
.seg button {
  border: 0;
  background: none;
  font: 500 13.5px var(--f);
  padding: 6px 13px;
  border-radius: 9px;
  cursor: pointer;
  color: var(--mut);
  min-height: 34px;
  white-space: nowrap;
  transition: all 0.2s;
}
.seg button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh1);
}

.switch {
  position: relative;
  width: 40px;
  height: 23px;
  border-radius: 999px;
  background: #d6d9e0;
  border: 0;
  cursor: pointer;
  transition: background 0.2s;
  flex: none;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--sh1);
  transition: transform 0.25s var(--spring);
}
.switch.on {
  background: var(--pri);
}
.switch.on::after {
  transform: translateX(-17px);
}

/* surfaces */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  padding: clamp(16px, 2vw, 22px);
}
.card.flat {
  border: 0;
  box-shadow: none;
}
.chead {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.chead .ic {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--pri-soft);
  color: var(--pri);
  display: grid;
  place-items: center;
  flex: none;
}
.chead .ic svg.lucide {
  width: 17px;
  height: 17px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--line2);
  color: var(--ink2);
}
.badge svg.lucide {
  width: 13px;
  height: 13px;
}
.badge.pri {
  background: var(--pri-soft);
  color: var(--pri);
}
.badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.badge.bad {
  background: var(--bad-soft);
  color: var(--bad);
}
.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.badge.acc {
  background: var(--acc-soft);
  color: #a4612a;
}

/* loyalty card */
.lcard {
  position: relative;
  padding: 18px 18px 16px;
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
  box-shadow: var(--sh3);
  transition: transform 0.6s var(--ease);
  isolation: isolate;
}
.lcard::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.14), transparent 45%);
  pointer-events: none;
  z-index: 0;
}
.lcard.dark::before {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.5), transparent 50%);
}
.lcard > * {
  position: relative;
  z-index: 1;
}
.lcard .lc-pat {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.lcard .gl {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.14) 50%, transparent 60%);
  transform: translateX(var(--gx, -70%));
  transition: transform 0.4s;
  pointer-events: none;
}
.lc-top {
  display: flex;
  align-items: center;
  gap: 11px;
}
.lc-top.rev {
  flex-direction: row-reverse;
}
.lc-top.rev .lc-title {
  text-align: left;
}
.lc-top.rev .lc-count {
  margin-inline-start: 0;
  margin-inline-end: auto;
  text-align: right;
}
.lc-top.col {
  flex-direction: column;
  text-align: center;
  gap: 8px;
}
.lc-top.col .lc-count {
  margin: 0;
  text-align: center;
}
.lc-countbar {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}
.lc-logo {
  display: grid;
  place-items: center;
  font-weight: 600;
  overflow: hidden;
  flex: none;
  background: rgba(255, 255, 255, 0.16);
}
.lcard.dark .lc-logo {
  background: rgba(28, 34, 48, 0.07);
}
.lc-logo.nobg {
  background: none !important;
}
.lc-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lc-title {
  min-width: 0;
}
.lc-name {
  font-weight: 600;
  font-size: 17px;
  line-height: 1.25;
}
.lc-kind {
  font-size: 11.5px;
  opacity: 0.7;
}
.lc-count {
  margin-inline-start: auto;
  text-align: left;
  line-height: 1.1;
}
.lc-count b {
  font-size: 21px;
  font-weight: 600;
  display: block;
}
.lc-count b small {
  font-size: 13px;
  opacity: 0.6;
  font-weight: 500;
}
.lc-count span {
  font-size: 11px;
  opacity: 0.7;
}
.lc-stamps {
  display: grid;
  margin: 18px 0 14px;
}
.stp {
  aspect-ratio: 1;
  border-radius: var(--sr);
  display: grid;
  place-items: center;
  position: relative;
  transition: transform 0.3s var(--spring);
}
.sh-hex .stp {
  border-radius: 0;
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
}
.stp svg.lucide {
  width: 48%;
  height: 48%;
  stroke-width: 1.9;
}
.stp img {
  width: 64%;
  height: 64%;
  object-fit: cover;
  border-radius: inherit;
}
.stp.e-dashed {
  border: 1.5px dashed color-mix(in srgb, var(--ink) 40%, transparent);
}
.stp.e-faint {
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}
.stp.e-icon {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: color-mix(in srgb, var(--ink) 30%, transparent);
}
.sh-hex .stp.e-dashed {
  border: 0;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.stp.on {
  border: 0;
  animation: pop 0.5s var(--spring) both;
  animation-delay: calc(var(--i) * 40ms);
}
.stp.s-solid.on {
  background: var(--sf);
  color: var(--si);
  box-shadow: 0 3px 10px -3px rgba(0, 0, 0, 0.25);
}
.stp.s-outline.on {
  background: transparent;
  color: var(--sf);
  box-shadow: inset 0 0 0 2.5px var(--sf);
}
.stp.s-soft.on {
  background: color-mix(in srgb, var(--sf) 26%, transparent);
  color: var(--sf);
}
.stp.s-accent.on {
  background: var(--a);
  color: #fff;
  box-shadow: 0 3px 10px -3px color-mix(in srgb, var(--a) 70%, transparent);
}
@keyframes pop {
  from {
    transform: scale(0.3);
    opacity: 0;
  }
}
/* gift */
.stp.gift {
  color: var(--a);
}
.stp.gift svg.lucide {
  width: 52%;
  height: 52%;
}
.stp.gift .gbx {
  width: 58%;
  height: 58%;
}
.stp.gift em {
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--a);
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.stp.g-glow {
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--a) 30%, transparent),
    color-mix(in srgb, var(--a) 8%, transparent) 70%
  );
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--a) 70%, transparent);
}
.stp.g-glow.on {
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--a) 70%, #fff), var(--a));
  color: #fff;
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--a) 30%, transparent),
    0 6px 18px -4px var(--a);
  animation:
    pop 0.5s var(--spring) both,
    glow 2.2s ease-in-out infinite 0.6s;
}
.stp.g-glow.on em {
  background: #fff;
  color: var(--a);
}
@keyframes glow {
  50% {
    box-shadow:
      0 0 0 8px color-mix(in srgb, var(--a) 12%, transparent),
      0 6px 22px -4px var(--a);
  }
}
.stp.g-ribbon {
  background: color-mix(in srgb, var(--a) 18%, transparent);
  overflow: visible;
}
.stp.g-ribbon::before,
.stp.g-ribbon::after {
  content: '';
  position: absolute;
  background: color-mix(in srgb, var(--a) 45%, transparent);
  pointer-events: none;
}
.stp.g-ribbon::before {
  width: 100%;
  height: 12%;
  top: 44%;
}
.stp.g-ribbon::after {
  height: 100%;
  width: 12%;
  left: 44%;
}
.stp.g-ribbon > svg {
  position: relative;
  z-index: 1;
}
.stp.g-ribbon.on {
  background: var(--a);
  color: #fff;
}
.stp.g-ribbon.on::before,
.stp.g-ribbon.on::after {
  background: rgba(255, 255, 255, 0.35);
}
.stp.g-plain {
  box-shadow: inset 0 0 0 1.5px var(--a);
}
.stp.g-plain.on {
  background: var(--a);
  color: #fff;
}
.lc-foot {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 6px;
}
.lc-reward {
  font-size: 12px;
  opacity: 0.85;
}
.lc-reward span {
  display: block;
}
.lc-reward b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}
.lc-qr {
  margin-inline-start: auto;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
  width: 74px;
  flex: none;
}
.lc-qr svg {
  display: block;
  width: 100%;
  height: auto;
}
/* motion */
.rv {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}
.rv.shown {
  opacity: 1;
  transform: none;
}
.enter {
  animation: enter 0.45s var(--ease) both;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.float {
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  50% {
    transform: translateY(-8px);
  }
}

/* toast */
.toasts {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 99;
  display: grid;
  gap: 8px;
  max-width: calc(100vw - 40px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  padding: 11px 15px;
  border-radius: 12px;
  font-size: 14.5px;
  box-shadow: var(--sh3);
  animation: tin 0.45s var(--spring) both;
}
.toast.out {
  animation: tout 0.3s var(--ease) forwards;
}
.toast.ok svg {
  color: #8fd3b0;
}
.toast.bad svg {
  color: #f3a59f;
}
@keyframes tin {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
}
@keyframes tout {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

.skel {
  background: linear-gradient(90deg, var(--line2), #e9ebef, var(--line2));
  background-size: 200% 100%;
  animation: sk 1.3s linear infinite;
  border-radius: 12px;
}
@keyframes sk {
  to {
    background-position: -200% 0;
  }
}

dialog {
  border: 0;
  border-radius: 20px;
  padding: 24px;
  width: min(420px, calc(100vw - 32px));
  box-shadow: var(--sh3);
  color: var(--ink);
}
dialog::backdrop {
  background: rgba(28, 34, 48, 0.35);
  backdrop-filter: blur(3px);
}
dialog[open] {
  animation: enter 0.35s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* card designer */
.dtabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 3px;
  background: var(--line2);
  border-radius: 12px;
  margin-bottom: 16px;
}
.dtabs button {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 8px 11px;
  border-radius: 9px;
  font: 500 13.5px var(--f);
  color: var(--mut);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.dtabs button svg.lucide {
  width: 16px;
  height: 16px;
}
.dtabs button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh1);
}
.dpanel {
  animation: enter 0.3s var(--ease) both;
  display: grid;
  gap: 4px;
}
.dgrp {
  margin-bottom: 12px;
}
.dlbl {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
  margin-bottom: 8px;
}
.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font: 14px var(--f);
  color: var(--ink2);
  cursor: pointer;
  min-height: 40px;
  transition: all 0.2s var(--ease);
}
.opt svg.lucide {
  width: 16px;
  height: 16px;
}
.opt:hover {
  border-color: #cfd3da;
}
.opt.on {
  border-color: var(--pri);
  background: var(--pri-soft);
  color: var(--pri);
}
.clrs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 12px;
}
.clr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
}
.clr input {
  width: 34px;
  height: 34px;
  border: 0;
  padding: 0;
  border-radius: 8px;
  background: none;
  cursor: pointer;
}
.clr input::-webkit-color-swatch-wrapper {
  padding: 0;
}
.clr input::-webkit-color-swatch {
  border: 0;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.rng {
  display: block;
  margin: 4px 0 12px;
}
.rng span {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink2);
  margin-bottom: 4px;
}
.rng b {
  font-weight: 500;
  color: var(--mut);
}
.rng input {
  width: 100%;
  accent-color: var(--pri);
}
.tg {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--line2);
  font-size: 14.5px;
}
.tg:last-child {
  border: 0;
}
.icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 6px;
}
.icons button {
  aspect-ratio: 1;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink2);
  transition: all 0.2s;
  padding: 0;
  overflow: hidden;
}
.icons button svg {
  width: 20px;
  height: 20px;
}
.icons button .gbx {
  width: 26px;
  height: 26px;
}
.icons button img {
  width: 70%;
  height: 70%;
  object-fit: cover;
  border-radius: 6px;
}
.icons button.on {
  background: var(--pri);
  border-color: var(--pri);
  color: #fff;
}
.fonts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
}
.fonts button {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 16px;
  color: var(--ink);
}
.fonts button.on {
  border-color: var(--pri);
  background: var(--pri-soft);
  color: var(--pri);
}
.tpls {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.tpl {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font: 13.5px var(--f);
  color: var(--ink2);
  text-align: center;
}
.tpl .tsw {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  aspect-ratio: 1.55;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 6px;
  box-shadow: var(--sh1);
  transition: transform 0.25s var(--spring);
}
.tpl:hover .tsw {
  transform: translateY(-3px);
}
.tpl .tsw i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}
.upl {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink2);
  transition: border-color 0.2s;
  margin-bottom: 8px;
}
.upl:hover {
  border-color: var(--pri);
}
.upl img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}
.upl.busy {
  opacity: 0.5;
  pointer-events: none;
}
.lc-countbar .lc-count,
.lc-top.col .lc-count {
  margin: 0;
  text-align: center;
}
.sh-hex .stp.s-outline.on {
  box-shadow: none;
  background: color-mix(in srgb, var(--sf) 18%, transparent);
  color: var(--sf);
}
.lc-top.col + .lc-countbar {
  margin-top: 6px;
}
.lc-pts {
  margin: 16px 0 12px;
}
.lc-sub {
  font-size: 12px;
  opacity: 0.75;
}
.lc-big {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.lc-big small {
  font-size: 15px;
  font-weight: 500;
  opacity: 0.75;
}
.lc-meter {
  height: 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink) 18%, transparent);
  overflow: hidden;
  margin: 10px 0 6px;
}
.lc-meter i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--a);
  transition: width 1s var(--ease);
}
.lc-next {
  font-size: 12.5px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 5px;
}
.lc-next svg.lucide {
  width: 14px;
  height: 14px;
}
.lc-rw {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.lc-rw span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.lc-rw span svg.lucide {
  width: 13px;
  height: 13px;
}
.lc-rw span.ok {
  background: var(--a);
  color: #fff;
}
.lc-form {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}
.lc-form input {
  width: 100%;
  font: 15px inherit;
  font-family: inherit;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  color: var(--ink);
  min-height: 44px;
}
.lc-form input::placeholder {
  color: color-mix(in srgb, var(--ink) 60%, transparent);
}
.lc-form input:focus {
  outline: 0;
  border-color: var(--a);
  background: color-mix(in srgb, var(--ink) 16%, transparent);
}
.lc-form .lc-go {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: var(--a);
  color: #fff;
  font: 600 15px inherit;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.lc-form .lc-err {
  font-size: 12.5px;
  color: #ffd2cc;
  min-height: 0;
}
.lcard.dark .lc-form .lc-err {
  color: #c2453d;
}
.lc-hold {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 2px;
}

/* ================= v3 identity (same as the landing page) ================= */
.btn {
  border-radius: 12px;
  font-weight: 500;
}
.btn:hover {
  background: var(--pri2);
  box-shadow: 0 8px 18px -10px rgba(15, 122, 99, 0.7);
}
.btn.soft:hover {
  background: #d2ebe2;
}
.btn.sec {
  box-shadow: inset 0 0 0 1px var(--line);
}
.card {
  border: 0;
  box-shadow:
    0 0 0 1px var(--line),
    0 1px 2px rgba(15, 28, 26, 0.03);
  border-radius: 22px;
}
.in {
  border-radius: 12px;
  background: #fbfcfb;
}
.in:focus {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 122, 99, 0.12);
}
.switch.on {
  background: var(--pri);
}
.chip.on {
  background: var(--pri-soft);
  border-color: var(--pri);
  color: var(--pri);
}
.opt.on {
  background: var(--pri-soft);
  border-color: var(--pri);
  color: var(--pri);
}
.toast {
  border-radius: 14px;
}
dialog {
  border-radius: 24px;
}
h1,
h2,
h3 {
  font-weight: 600;
}
