/* ==========================================================================
   KCD Pune 2027 - Badge page styles (badge.html only).
   PART 1: site chrome COPIED UNCHANGED from deployment/New/faq-new.html
           (its single inline <style> block), so the bar, footer, fonts and the
           night-metro palette match the New site exactly. Only change: the four
           logo mask images point at files in this folder instead of base64.
           Loaded only by badge.html, so it cannot affect index-new/faq-new.
           If the New styles change, re-copy this part from faq-new.html.
   PART 2: the badge maker. Every class is prefixed .kcd-badge-
   ========================================================================== */
:root {
  /* The palette, in page order: a Pune day going down into violet. */
  --h-paper: #faf1e1;
  --h-cream: #f3e2c9;
  --h-sand: #e7c499;
  --h-tan: #c9956a;
  --h-copper: #bc7148;
  --h-orange: #d98e60;
  --h-apricot: #e9a780;
  --h-mauve: #c2a5bc;
  --h-sky: #87acea;
  --h-cornflower: #6d87e5;
  --h-periwinkle: #5d6ad7;
  --h-iris: #5052c3;
  --h-indigo: #4239a7;
  --h-royal: #3f2990;
  --h-violet: #4a2a95;
  --h-purple: #5d2f95;
  --h-plum: #813f8c;
  --h-magenta: #aa5283;

  /* Added around the palette */
  --h-saffron: #c9622a;
  --h-ink: #2a1a5e;
  --h-night: #1f1248;

  /* English is Mango Grotesque; Anton and Antonio stand in until its licensed files are added below.
     Those have no Devanagari, so Marathi falls through to Poppins on its own. */
  --h-serif: "Mango Grotesque", "Anton", "Poppins", sans-serif;
  --h-sans: "Mango Grotesque", "Antonio", "Poppins", sans-serif;

  --h-gutter: clamp(16px, 4vw, 56px);

  /* Small four-petal flowers on a half-drop repeat: terracotta for light sections, cream for dark */
  --h-flowers-warm: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='92' height='92' fill='%23bc7148'%3E%3Cpath d='M23 21.8C27.6 20.6 26.6 15 23 15C19.4 15 18.4 20.6 23 21.8ZM23 24.2C18.4 25.4 19.4 31 23 31C26.6 31 27.6 25.4 23 24.2ZM21.8 23C20.6 18.4 15 19.4 15 23C15 26.6 20.6 27.6 21.8 23ZM24.2 23C25.4 27.6 31 26.6 31 23C31 19.4 25.4 18.4 24.2 23ZM69 67.8C73.6 66.6 72.6 61 69 61C65.4 61 64.4 66.6 69 67.8ZM69 70.2C64.4 71.4 65.4 77 69 77C72.6 77 73.6 71.4 69 70.2ZM67.8 69C66.6 64.4 61 65.4 61 69C61 72.6 66.6 73.6 67.8 69ZM70.2 69C71.4 73.6 77 72.6 77 69C77 65.4 71.4 64.4 70.2 69Z'/%3E%3C/svg%3E");
  --h-flowers-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='92' height='92' fill='%23f3e2c9'%3E%3Cpath d='M23 21.8C27.6 20.6 26.6 15 23 15C19.4 15 18.4 20.6 23 21.8ZM23 24.2C18.4 25.4 19.4 31 23 31C26.6 31 27.6 25.4 23 24.2ZM21.8 23C20.6 18.4 15 19.4 15 23C15 26.6 20.6 27.6 21.8 23ZM24.2 23C25.4 27.6 31 26.6 31 23C31 19.4 25.4 18.4 24.2 23ZM69 67.8C73.6 66.6 72.6 61 69 61C65.4 61 64.4 66.6 69 67.8ZM69 70.2C64.4 71.4 65.4 77 69 77C72.6 77 73.6 71.4 69 70.2ZM67.8 69C66.6 64.4 61 65.4 61 69C61 72.6 66.6 73.6 67.8 69ZM70.2 69C71.4 73.6 77 72.6 77 69C77 65.4 71.4 64.4 70.2 69Z'/%3E%3C/svg%3E");

  --h-petals: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-9 -9 18 18'%3E%3Cpath d='M0 -1.2C4.6 -2.4 3.6 -8 0 -8C-3.6 -8 -4.6 -2.4 0 -1.2ZM0 1.2C-4.6 2.4 -3.6 8 0 8C3.6 8 4.6 2.4 0 1.2ZM-1.2 0C-2.4 -4.6 -8 -3.6 -8 0C-8 3.6 -2.4 4.6 -1.2 0ZM1.2 0C2.4 4.6 8 3.6 8 0C8 -3.6 2.4 -4.6 1.2 0Z'/%3E%3C/svg%3E");

  /* Chalk: masks that leave dry, broken strokes. -fine for small text, -drag for big strokes pulled across a board */
  --h-chalk-fine: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -2.3 1.85'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --h-chalk-drag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.45 2.4' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -2.6 2.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* Fine paper tooth, used on stamps and page grounds */
  --h-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .16 0 0 0 0 .1 0 0 0 0 .37 0 0 0 .55 -.16'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  /* The same tooth in a warm brown, for old paper and leather */
  --h-grain-warm: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .2 0 0 0 0 .09 0 0 0 .6 -.16'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Same night-metro palette as index.html */
:root{--h-paper:#eaf0ff;--h-cream:#dfe6ff;--h-sand:#c8cdf5;--h-tan:#9aa0e6;--h-copper:#7d8cff;--h-orange:#8b7cf0;--h-apricot:#b8b0ff;--h-mauve:#b9b4e8;--h-saffron:#5f7dff;--h-sky:#7fa6ff;--h-cornflower:#5f7dff;--h-periwinkle:#5367f0;--h-iris:#3f4fd8;--h-indigo:#27289a;--h-royal:#1a1f6e;--h-violet:#2a1a7a;--h-purple:#3a1f8a;--h-plum:#4e2a96;--h-magenta:#8a5bd0;--h-ink:#eaf0ff;--h-night:#0b0c2a;--k-ease:cubic-bezier(.22,.7,.2,1)}
.h-btn{display:inline-flex;align-items:center;justify-content:center;min-height:50px;padding:0 26px;font:500 18px/1 var(--h-sans);letter-spacing:.06em;text-transform:uppercase;text-decoration:none;background:var(--btn-bg,var(--h-royal));color:var(--btn-ink,var(--h-paper));border:2px solid var(--btn-bg,var(--h-royal));transition:transform .35s var(--k-ease),box-shadow .35s var(--k-ease),filter .35s}
.h-btn:hover,.h-btn:focus-visible{transform:translateY(-3px);box-shadow:0 12px 30px rgba(95,125,255,.5);filter:brightness(1.12)}
* { box-sizing: border-box; }
html { background: #0b0c2a; scroll-padding-top: 90px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: #eaf0ff; font: 400 17px/1.6 var(--h-sans); overflow-x: clip;
  background: radial-gradient(55% 45% at 12% 8%, rgba(63,91,255,.45), transparent 70%), radial-gradient(50% 50% at 92% 55%, rgba(138,91,208,.4), transparent 70%), linear-gradient(180deg,#0b0c2a,#12175a 45%,#1a1f6e 80%,#0b0c2a); }
body::before { content:""; position:fixed; inset:0; z-index:-1; pointer-events:none; background: linear-gradient(rgba(143,160,255,.07) 1px,transparent 1px) 0 0/64px 64px, linear-gradient(90deg,rgba(143,160,255,.07) 1px,transparent 1px) 0 0/64px 64px; }
a:focus-visible, summary:focus-visible { outline: 2px solid #b8b0ff; outline-offset: 4px; }
.wrap { max-width: 1320px; margin-inline: auto; padding-inline: var(--h-gutter); }
/* Top bar: same logo, links and underline as index.html on a dark section */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 45; background: #0b0c2a; color: #f3e2c9; box-shadow: 0 2px 0 rgb(233 167 128 / .0), 0 1px 0 rgba(127,166,255,.5), 0 8px 18px rgb(5 6 28 / .45); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 6px; }
.brand { position: relative; display: inline-flex; align-items: center; min-height: 44px; margin-left: clamp(6px, 1.8vw, 30px); text-decoration: none; color: inherit; }
.logo { position: relative; display: block; height: clamp(36px, 2.9vw, 42px); aspect-ratio: 900 / 213; }
.logo i { position: absolute; inset: 0; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.logo .l-type { --m: url("kcd-badge-logo-type.webp"); background: #f3e2c9; }
.logo .l-helm { --m: url("kcd-badge-logo-helm.webp"); background: #87acea; }
.logo .l-panel { --m: url("kcd-badge-logo-panel.webp"); background: #6d87e5; }
.logo .l-shadow { --m: url("kcd-badge-logo-shadow.webp"); background: #813f8c; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.nav-a { position: relative; display: inline-block; padding: 8px 2px 12px; color: inherit; text-decoration: none; font: 400 19px/1.3 var(--h-serif); letter-spacing: .02em; }
.nav-a .roll { display: inline-grid; height: 1.3em; overflow: clip; text-align: center; }
.nav-a .roll span { display: block; height: 1.3em; transition: transform .45s cubic-bezier(.3,.9,.3,1); }
.nav-a .roll [lang="mr"] { font: 600 16px/1.55 "Poppins", sans-serif; color: var(--h-apricot); }
.nav-a:hover .roll span, .nav-a:focus-visible .roll span { transform: translateY(-100%); }
.nav-a::after { content:""; position:absolute; left:0; right:0; bottom:-6px; height:2px; background:#7fa6ff; transform:scaleX(0); transform-origin:left; transition:transform .35s var(--k-ease); }
.nav-a:hover::after, .nav-a:focus-visible::after, .nav-a[aria-current]::after { transform:scaleX(1); }
/* Page */
main { flex: 1; width: 100%; padding-block: calc(64px + clamp(40px, 6vw, 84px)) clamp(48px, 7vw, 100px); }
.kicker { margin: 0 0 8px; font: 500 16px/1 var(--h-sans); letter-spacing: .24em; text-transform: uppercase; color: #7fa6ff; }
.kicker [lang="mr"] { font: 600 17px/1 "Poppins", sans-serif; letter-spacing: 0; }
h1 { margin: 0; font: 400 clamp(44px, 7vw, 96px)/1 var(--h-serif); color: #eaf0ff; text-shadow: 0 0 40px rgba(95,125,255,.35); }
.lead { max-width: 40em; margin: 18px 0 0; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.35; text-wrap: pretty; color: #eaf0ff; }
.faq { max-width: 880px; margin-top: clamp(32px, 4vw, 56px); display: grid; gap: 14px; }
.faq details { --n:#7fa6ff; position: relative; border-radius: 16px; background: linear-gradient(160deg,#0d1450,#16217a); border: 1px solid color-mix(in srgb,var(--n) 60%,transparent); box-shadow: 0 14px 34px rgba(2,4,30,.45), inset 0 0 24px color-mix(in srgb,var(--n) 12%,transparent); transition: box-shadow .4s var(--k-ease), border-color .3s; }
.faq details:hover, .faq details[open] { border-color: var(--n); box-shadow: 0 18px 40px rgba(2,4,30,.55), 0 0 26px color-mix(in srgb,var(--n) 45%,transparent), inset 0 0 28px color-mix(in srgb,var(--n) 18%,transparent); }
.faq details::before, .faq details::after { content:""; position:absolute; width:14px; height:14px; border:2px solid var(--n); pointer-events:none; }
.faq details::before { top:-1px; left:-1px; border-right:0; border-bottom:0; border-radius:16px 0 0 0; }
.faq details::after { bottom:-1px; right:-1px; border-left:0; border-top:0; border-radius:0 0 16px 0; }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 18px 22px; font: 400 clamp(21px, 2vw, 26px)/1.2 var(--h-serif); color: #eaf0ff; }
.faq summary::-webkit-details-marker { display: none; }
.faq .no { flex: none; padding: 5px 10px; border: 1.5px solid var(--n); border-radius: 6px; font: 500 13px/1 ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing: .08em; color: color-mix(in srgb,var(--n) 55%,#fff); }
.faq .q { flex: 1; }
.faq summary::after { content:""; flex:none; width:18px; height:18px; background: linear-gradient(var(--n),var(--n)) center / 100% 2.5px no-repeat, linear-gradient(var(--n),var(--n)) center / 2.5px 100% no-repeat; transition: transform .3s var(--k-ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 22px 22px 22px; margin-left: 0; }
.faq .a p { margin: 0; padding-top: 14px; border-top: 1px dashed color-mix(in srgb,var(--n) 55%,transparent); font-size: clamp(18px, 1.5vw, 21px); line-height: 1.4; text-wrap: pretty; color: #cfd8ff; }
.faq .a a { color: #b8b0ff; text-underline-offset: 4px; }
.faq .a a:hover { color: #fff; }
.more { max-width: 600px; margin-top: 32px; padding: 12px 14px 12px 20px; border-radius: 12px; background: linear-gradient(135deg,rgba(13,18,84,.92),rgba(42,26,122,.85)); border: 1px solid rgba(127,166,255,.5); color: #dfe6ff; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.more p { margin: 0; font-size: 18px; }
.more .h-btn { --btn-bg: #dfe6ff; --btn-ink: #1a1f6e; min-height: 40px; padding: 0 18px; font-size: 15px; }
  footer { color: var(--h-sand); font-size: 15px; }
  .foot-base { background: var(--h-night); padding-block: 26px 34px; }
  .foot-base .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 32px; }
  .foot-base .brand { color: var(--h-cream); font-size: 18px; }
  .foot-base .foot-logo { display: block; height: 40px; width: auto; }
  .foot-base p { margin: 0; opacity: .8; }
  .foot-base p a { color: inherit; }
  .foot-meta { margin-left: auto; display: grid; justify-items: end; gap: 12px; text-align: right; }
  .foot-links { display: flex; align-items: center; gap: 8px; }
  @media (max-width: 640px) { .foot-meta { margin-left: 0; justify-items: start; text-align: left; } }
  .foot-links a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--h-cream); background: rgb(243 226 201 / .1); transition: background .2s, color .2s; }
  .foot-links a:hover { background: var(--h-apricot); color: var(--h-night); }
  .foot-links svg { width: 15px; height: 15px; fill: currentColor; }
  .foot-links .faq-link { width: auto; padding: 0 12px; border-radius: 999px; font: 500 13px/1 var(--h-sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
  /* Footer: about KCD Pune with its social pages, then two columns of links, then the legal line */
  .foot-wrap { display: block !important; }
  .foot-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(24px, 5vw, 72px); padding-block: 12px 8px; }
  .foot-about .foot-logo, .foot-about img { display: block; height: 46px; width: auto; }
  .foot-grid .foot-blurb { max-width: 30em; margin: 14px 0 18px; font-size: 18px; line-height: 1.4; color: var(--h-cream); opacity: .85; }
  .foot-about .foot-links { margin-left: 0; gap: 10px; }
  .foot-about .foot-links a { width: 40px; height: 40px; background: none; border: 1.5px solid rgb(243 226 201 / .35); }
  .foot-about .foot-links a:hover { background: var(--h-apricot); border-color: var(--h-apricot); color: var(--h-night); }
  .foot-about .foot-links svg { width: 18px; height: 18px; }
  .foot-col h4 { margin: 4px 0 12px; font: 500 16px/1 var(--h-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--h-cream); }
  .foot-col a { display: block; width: fit-content; padding: 5px 0; font-size: 18px; line-height: 1.3; color: var(--h-sand); text-decoration: none; opacity: .85; transition: color .2s, opacity .2s; }
  .foot-col a:hover { color: var(--h-apricot); opacity: 1; }
  /* Phones: the about block across the top, the two link columns side by side under it */
  @media (max-width: 760px) { .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 20px; } .foot-about { grid-column: 1 / -1; } }
footer { margin-top: 0; }
.foot-base { background:#0b0c2a; border-top:1px solid rgba(127,166,255,.5); box-shadow: 0 -1px 18px #5f7dff55; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .menu-btn { display: grid; place-content: center; gap: 5px; width: 44px; height: 44px; margin-right: 2px; padding: 0; border: 0; border-radius: 8px; background: none; color: inherit; cursor: pointer; }
  .menu-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
  .menu-btn span { display: block; width: 24px; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform .3s cubic-bezier(.3,.9,.3,1), opacity .2s; }
  .menu-open .menu-btn span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  .menu-open .menu-btn span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 6px var(--h-gutter) 16px; background: #12175a; color: #eaf0ff; border-top: 1px solid rgba(234,240,255,.25); box-shadow: 0 18px 30px rgba(5,6,28,.35); }
  .menu-open .nav-links { display: flex; }
  .nav-links .nav-a { display: block; padding: 13px 4px; font-size: 24px; border-bottom: 1px solid rgba(234,240,255,.16); }
  .nav-links .nav-a:last-of-type { border-bottom: 0; }
  .nav-links .nav-a::after { display: none; }
  .nav-links .nav-a[aria-current] { color: #b8b0ff; }
}
@media (max-width: 560px) { .faq .no { display: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ==========================================================================
   PART 2: the badge maker (.kcd-badge-*), in the New site's night-metro look:
   the FAQ cards' neon border + corner ticks, metro-ticket header, mono labels.
   ========================================================================== */
.kcd-badge { --kb-mono: "Antonio", "Poppins", ui-monospace, monospace; }
/* Ticket header, after .tk-head on index-new */
.kcd-badge-tk { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; margin: clamp(28px, 4vw, 44px) 0 0; padding-bottom: 14px; border-bottom: 1px dashed rgba(184,176,255,.45); font: 500 12px/1.2 var(--kb-mono); letter-spacing: .2em; text-transform: uppercase; color: #cfd8ff; }
.kcd-badge-tk span { display: inline-flex; align-items: center; gap: 8px; }
.kcd-badge-tk i { width: 10px; height: 10px; border-radius: 50%; background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }
.kcd-badge-tk .kcd-badge-tk-type { color: #b8b0ff; font-weight: 600; font-size: 13px; padding: 5px 10px; border: 1px solid rgba(184,176,255,.6); border-radius: 999px; background: linear-gradient(90deg,rgba(184,176,255,.16),rgba(138,91,208,.16)); text-shadow: 0 0 12px rgba(184,176,255,.6); }
@media (max-width: 640px) { .kcd-badge-tk { font-size: 11px; letter-spacing: .14em; } .kcd-badge-tk .kcd-badge-tk-meta { display: none; } }

.kcd-badge-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 56px); align-items: start; margin-top: clamp(24px, 3vw, 36px); }
@media (max-width: 860px) { .kcd-badge-grid { grid-template-columns: minmax(0, 1fr); } }

/* Neon card, same recipe as .faq details on faq-new */
.kcd-badge-card { --n: #7fa6ff; position: relative; border-radius: 16px; background: linear-gradient(160deg,#0d1450,#16217a); border: 1px solid color-mix(in srgb,var(--n) 60%,transparent); box-shadow: 0 14px 34px rgba(2,4,30,.45), inset 0 0 24px color-mix(in srgb,var(--n) 12%,transparent); transition: box-shadow .4s var(--k-ease), border-color .3s; }
.kcd-badge-card:hover, .kcd-badge-card:focus-within { border-color: var(--n); box-shadow: 0 18px 40px rgba(2,4,30,.55), 0 0 26px color-mix(in srgb,var(--n) 45%,transparent), inset 0 0 28px color-mix(in srgb,var(--n) 18%,transparent); }
.kcd-badge-card::before, .kcd-badge-card::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--n); pointer-events: none; }
.kcd-badge-card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-radius: 16px 0 0 0; }
.kcd-badge-card::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-radius: 0 0 16px 0; }

/* Preview */
.kcd-badge-stage { width: 100%; max-width: 620px; margin-inline: auto; padding: clamp(10px, 1.6vw, 16px); }
.kcd-badge-canvas-wrap { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #0b0c2a; touch-action: none; cursor: grab; outline: none; }
.kcd-badge-canvas-wrap:active { cursor: grabbing; }
.kcd-badge-canvas-wrap:focus-visible { outline: 2px solid #b8b0ff; outline-offset: 4px; }
.kcd-badge-canvas-wrap.is-empty { cursor: pointer; }
.kcd-badge-canvas-wrap.is-drop { box-shadow: inset 0 0 0 3px #38bdf8, 0 0 24px #38bdf8; }
.kcd-badge-canvas { display: block; width: 100%; height: 100%; }
.kcd-badge-hint { position: absolute; left: 50%; top: 36%; transform: translate(-50%, -50%); margin: 0; padding: 10px 18px; border-radius: 999px; background: rgba(11,12,42,.82); border: 1px solid rgba(127,166,255,.6); color: #eaf0ff; font: 500 15px/1.2 var(--kb-mono); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; pointer-events: none; box-shadow: 0 0 18px rgba(95,125,255,.45); transition: opacity .3s; }
.kcd-badge-canvas-wrap:not(.is-empty) .kcd-badge-hint { opacity: 0; }

/* Steps */
.kcd-badge-panel { display: grid; gap: 18px; }
.kcd-badge-step { padding: 18px 22px 22px; }
.kcd-badge-step h2 { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; font: 400 clamp(21px, 2vw, 26px)/1.2 var(--h-serif); color: #eaf0ff; }
.kcd-badge-no { flex: none; padding: 5px 10px; border: 1.5px solid var(--n); border-radius: 6px; font: 500 13px/1 ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing: .08em; color: color-mix(in srgb,var(--n) 55%,#fff); }
.kcd-badge-step p { margin: 0 0 14px; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.4; color: #cfd8ff; }
.kcd-badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.kcd-badge-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Buttons: the site's .h-btn, plus a lit primary and an outline variant */
.kcd-badge-btn { cursor: pointer; font-family: var(--h-sans); border-radius: 999px; }
.kcd-badge-btn.is-primary { --btn-bg: #5f7dff; --btn-ink: #fff; box-shadow: 0 0 0 1px rgba(184,176,255,.6), 0 8px 24px rgba(95,125,255,.45); }
.kcd-badge-btn.is-ghost { --btn-bg: transparent; --btn-ink: #eaf0ff; border-color: rgba(127,166,255,.6); }
.kcd-badge-btn.is-small { min-height: 42px; padding: 0 18px; font-size: 15px; }
.kcd-badge-btn[disabled] { opacity: .4; cursor: not-allowed; transform: none !important; box-shadow: none !important; filter: none !important; }

/* Shape toggle */
.kcd-badge-seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: rgba(11,12,42,.6); border: 1px solid rgba(127,166,255,.35); }
.kcd-badge-seg button { min-height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: #cfd8ff; font: 500 15px/1 var(--kb-mono); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.kcd-badge-seg button[aria-pressed="true"] { background: #8a5bd0; color: #fff; box-shadow: 0 0 14px rgba(138,91,208,.7); }
.kcd-badge-seg button:focus-visible { outline: 2px solid #b8b0ff; outline-offset: 2px; }

/* Zoom */
.kcd-badge-zoom { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: 16px; }
.kcd-badge-zoom label { font: 500 13px/1 var(--kb-mono); letter-spacing: .2em; text-transform: uppercase; color: #7fa6ff; }
.kcd-badge-zoom input[type="range"] { width: 100%; min-height: 32px; accent-color: #38bdf8; }
.kcd-badge-zoom output { min-width: 3.2em; text-align: right; font: 500 14px/1 ui-monospace,SFMono-Regular,Consolas,monospace; color: #dfe6ff; }
.kcd-badge-tip { margin: 12px 0 0 !important; font-size: 16px !important; opacity: .8; }

/* Caption */
.kcd-badge-label { display: block; margin-bottom: 8px; font: 500 13px/1 var(--kb-mono); letter-spacing: .2em; text-transform: uppercase; color: #7fa6ff; }
.kcd-badge-caption { display: block; width: 100%; min-height: 190px; padding: 12px 14px; border: 1px solid rgba(127,166,255,.45); border-radius: 10px; background: rgba(11,12,42,.65); color: #eaf0ff; font: 400 16px/1.5 "Poppins", sans-serif; resize: vertical; }
.kcd-badge-caption:focus-visible { outline: 2px solid #b8b0ff; outline-offset: 2px; }
.kcd-badge-status { min-height: 1.4em; margin: 12px 0 0 !important; font-size: 16px !important; color: #b8b0ff !important; }

.kcd-badge-privacy { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 14px 18px; border-radius: 12px; background: linear-gradient(135deg,rgba(13,18,84,.92),rgba(42,26,122,.85)); border: 1px solid rgba(127,166,255,.5); color: #dfe6ff; font-size: 17px; line-height: 1.4; }
.kcd-badge-privacy::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: #3ddc1f; box-shadow: 0 0 8px #3ddc1f; }
@media (prefers-reduced-motion: reduce) { .kcd-badge-hint, .kcd-badge-card { transition: none; } }

/* Caption options: radio cards (v3) */
.kcd-badge-captions { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.kcd-badge-captions legend { padding: 0; margin-bottom: 10px; }
.kcd-badge-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 420px) { .kcd-badge-chips { grid-template-columns: minmax(0, 1fr); } }
.kcd-badge-chip { --c: #7fa6ff; position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: center; min-height: 56px; padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: rgba(11,12,42,.55); color: #dfe6ff; cursor: pointer; transition: border-color .25s, box-shadow .25s, background .25s; }
.kcd-badge-chip:hover { border-color: color-mix(in srgb, var(--c) 75%, transparent); }
.kcd-badge-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.kcd-badge-chip-dot { grid-row: 1 / span 2; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--c); box-shadow: inset 0 0 0 3px #0b0c2a; transition: background .2s, box-shadow .2s; }
.kcd-badge-chip-title { font: 500 17px/1.15 var(--h-sans); letter-spacing: .02em; color: #eaf0ff; }
.kcd-badge-chip-sub { font: 400 13px/1.3 "Poppins", sans-serif; color: #b9c5ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcd-badge-chip:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, #0d1450); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 45%, transparent); }
.kcd-badge-chip:has(input:checked) .kcd-badge-chip-dot { background: var(--c); box-shadow: inset 0 0 0 3px #0b0c2a, 0 0 10px var(--c); }
.kcd-badge-chip.is-checked { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, #0d1450); }
.kcd-badge-chip.is-checked .kcd-badge-chip-dot { background: var(--c); }
.kcd-badge-chip:has(input:focus-visible) { outline: 2px solid #b8b0ff; outline-offset: 3px; }
.kcd-badge-caption-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.kcd-badge-edit-note { letter-spacing: .06em; text-transform: none; color: #b9c5ff; }
.kcd-badge-count { font: 500 12px/1 ui-monospace, SFMono-Regular, Consolas, monospace; color: #b9c5ff; }
.kcd-badge-count.is-long { color: #f5c451; }
.kcd-badge-restore { margin-top: 8px; padding: 4px 0; border: 0; background: none; color: #b8b0ff; font: 500 15px/1.2 var(--h-sans); letter-spacing: .04em; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.kcd-badge-restore:focus-visible { outline: 2px solid #b8b0ff; outline-offset: 2px; }
