@property --edge { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --fill { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --bk { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --bl { syntax: "<length>"; inherits: true; initial-value: 14px; }

:root {
  --text: #f4f6fb;
  --text-dim: rgba(244, 246, 251, 0.72);
  --accent: #6c8cff;
  --accent-2: #9d6bff;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.16);
  --red-hi: #ff5a6e;
  --red-lo: #d91427;
  --red-text: #ff8b9a;
  --red-tint: rgba(255, 90, 110, 0.14);
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, Menlo, monospace;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --red: #ff2b2b;
  --red-glow: rgba(255, 43, 43, 0.45);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 760px at 78% 18%, rgba(120, 14, 22, 0.35), transparent 62%),
    radial-gradient(900px 700px at 8% 92%, rgba(24, 36, 84, 0.35), transparent 60%),
    #06070a;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding: clamp(84px, 12vh, 120px) 20px 40px;
}

#scene {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  display: block;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.scene-ready #scene {
  opacity: 1;
}

.gc-top {
  --gc-head: 68px;
  --gc-gutter: clamp(16px, 4vw, 64px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--gc-head);
  padding: 0 var(--gc-gutter);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.gc-top.is-scrolled,
.gc-top.is-solid {
  background: rgba(6, 7, 10, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.gc-top::before {
  content: "";
  position: absolute;
  inset: 0 0 -28px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 7, 10, 0.62), rgba(6, 7, 10, 0));
  transition: opacity 0.3s ease;
}

.gc-top.is-scrolled::before,
.gc-top.is-solid::before {
  opacity: 0;
}

.gc-brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: #f4f6fb;
  text-decoration: none;
  font: 600 17px/1 "Space Grotesk", "Inter", system-ui, sans-serif;
  letter-spacing: -0.01em;
}

.gc-brand img {
  display: block;
  width: 36px;
  height: auto;
}

.gc-nav {
  display: flex;
  gap: 2px;
}

.gc-nav a {
  position: relative;
  padding: 12px;
  color: #7d8492;
  text-decoration: none;
  font: 500 12.5px/1 "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.gc-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  background: currentColor;
  transform-origin: 0 50%;
  transform: skewX(-35deg) scaleX(0);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gc-nav a:hover {
  color: #f4f6fb;
}

.gc-nav a:hover::after {
  transform: skewX(-35deg) scaleX(1);
}

.gc-nav a[aria-current="page"] {
  color: #fff;
}

.gc-nav a[aria-current="page"]::after {
  background: #ff2b2b;
  box-shadow: 0 0 10px rgba(255, 43, 43, 0.45);
  transform: skewX(-35deg) scaleX(1);
}

.gc-nav a:focus-visible,
.gc-brand:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.gc-btn {
  --gc-cut: 10px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #f4f6fb;
  cursor: pointer;
  clip-path: polygon(var(--gc-cut) 0, 100% 0, 100% calc(100% - var(--gc-cut)), calc(100% - var(--gc-cut)) 100%, 0 100%, 0 var(--gc-cut));
  transition: background-color 0.2s ease, color 0.2s ease;
}

.gc-btn::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: #101218;
  clip-path: polygon(calc(var(--gc-cut) - 0.59px) 0, 100% 0, 100% calc(100% - var(--gc-cut) + 0.59px), calc(100% - var(--gc-cut) + 0.59px) 100%, 0 100%, 0 calc(var(--gc-cut) - 0.59px));
  transition: background-color 0.2s ease;
}

.gc-btn:hover {
  background: rgba(255, 255, 255, 0.34);
}

.gc-btn:hover::before {
  background: #171a22;
}

.gc-btn:focus-visible {
  outline: none;
  background: #fff;
}

.gc-btn:focus-visible::before {
  inset: 2px;
}

.gc-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
}

.gc-menu span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease;
}

.nav-open .gc-menu span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-open .gc-menu span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.gc-top.gc-compact {
  gap: 12px;
}

.gc-compact .gc-nav {
  display: none;
  position: fixed;
  top: calc(var(--gc-head) - 6px);
  left: 16px;
  right: 16px;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 6px 0;
  max-height: calc(100vh - var(--gc-head) - 12px);
  overflow-y: auto;
  background: rgba(12, 14, 19, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 2px solid #ff2b2b;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
}

.gc-compact.nav-open .gc-nav {
  display: grid;
}

.gc-compact .gc-nav a {
  padding: 16px 18px;
  line-height: 1.3;
  white-space: normal;
}

.gc-compact .gc-nav a::after {
  left: 0;
  right: auto;
  top: 10px;
  bottom: 10px;
  width: 2px;
  height: auto;
  transform: scaleY(0);
}

.gc-compact .gc-nav a:hover::after {
  transform: scaleY(1);
}

.gc-compact .gc-nav a[aria-current="page"] {
  background: linear-gradient(90deg, rgba(255, 43, 43, 0.1), transparent 70%);
}

.gc-compact .gc-nav a[aria-current="page"]::after {
  transform: none;
}

.gc-compact .gc-nav a:focus-visible {
  outline-offset: -2px;
}

.gc-compact .gc-menu {
  display: inline-flex;
}

@media (min-width: 761px) {
  .gc-compact .gc-nav {
    left: auto;
    right: var(--gc-gutter);
    width: 440px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gc-top,
  .gc-top::before,
  .gc-nav a,
  .gc-nav a::after,
  .gc-btn,
  .gc-btn::before,
  .gc-menu span {
    transition: none;
  }
}

.vbtn-icon {
  position: relative;
  display: block;
  width: 13px;
  height: 15px;
}

@media (max-width: 560px) {
  body {
    padding-top: 84px;
  }
}

.gc-video {
  color: rgba(244, 246, 251, 0.72);
}

.gc-video:hover {
  color: #f4f6fb;
}

.gc-video .vbtn-icon::before,
.gc-video .vbtn-icon::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 1px;
  background: currentColor;
}

.gc-video .vbtn-icon::before { left: 1px; }
.gc-video .vbtn-icon::after { right: 1px; }

.gc-video.is-paused .vbtn-icon::before {
  bottom: auto;
  left: 2px;
  width: 0;
  height: 0;
  border-radius: 0;
  background: none;
  border-left: 12px solid currentColor;
  border-top: 7.5px solid transparent;
  border-bottom: 7.5px solid transparent;
}

.gc-video.is-paused .vbtn-icon::after {
  display: none;
}

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  margin: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: clamp(8px, 4vh, 40px) 0 clamp(30px, 5vh, 46px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
  font: 600 clamp(14px, 1.2vw, 18px)/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  animation: fade-up 0.7s ease both;
}

.eyebrow span {
  padding: 0.42em 0.55em 0.42em 0.62em;
  color: #fff;
  background: var(--red);
  box-shadow: 0 0 24px rgba(255, 40, 40, 0.35);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 4.5em;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), transparent);
}

.eyebrow::before {
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.35), transparent);
}

h1 {
  margin-top: 20px;
  padding-bottom: 0.06em;
  font: 600 clamp(44px, 6.4vw, 92px)/0.94 var(--display);
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, #fff 40%, #a4abba);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fade-up 0.7s ease 0.1s both;
}

h1 em {
  font-style: normal;
  background: linear-gradient(95deg, #ff3b3b 10%, #ff8a5c 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin-top: 0.9rem;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.6;
  color: var(--text-dim);
  animation: fade-up 0.7s ease 0.2s both;
}

.card {
  --bk: rgba(255, 255, 255, 0.32);
  --bl: 14px;
  position: relative;
  background: linear-gradient(180deg, rgba(20, 22, 30, 0.86), rgba(10, 11, 15, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.85);
}

.card::after {
  --bw: 1px;
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(var(--bk), var(--bk)) 0 0 / var(--bl) var(--bw),
    linear-gradient(var(--bk), var(--bk)) 0 0 / var(--bw) var(--bl),
    linear-gradient(var(--bk), var(--bk)) 100% 0 / var(--bl) var(--bw),
    linear-gradient(var(--bk), var(--bk)) 100% 0 / var(--bw) var(--bl),
    linear-gradient(var(--bk), var(--bk)) 0 100% / var(--bl) var(--bw),
    linear-gradient(var(--bk), var(--bk)) 0 100% / var(--bw) var(--bl),
    linear-gradient(var(--bk), var(--bk)) 100% 100% / var(--bl) var(--bw),
    linear-gradient(var(--bk), var(--bk)) 100% 100% / var(--bw) var(--bl);
  background-repeat: no-repeat;
}

.builder {
  padding: 24px;
  margin-bottom: 18px;
  animation: fade-up 0.7s ease 0.3s both;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, --bk 0.35s ease, --bl 0.35s ease;
  position: relative;
  z-index: 2;
}

.builder:focus-within {
  --bk: var(--red);
  --bl: 26px;
  border-color: rgba(255, 43, 43, 0.4);
  box-shadow:
    inset 0 0 50px -18px rgba(217, 20, 39, 0.3),
    0 14px 40px -10px rgba(217, 20, 39, 0.3),
    0 30px 60px -34px rgba(0, 0, 0, 0.85);
}

.builder:focus-within::after {
  --bw: 2px;
  filter: drop-shadow(0 0 6px var(--red-glow));
}

.preview-card {
  padding: 16px 24px 20px;
  animation: fade-up 0.7s ease 0.4s both;
}

.builder-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
}

.field {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
}

.field-label {
  font: 500 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.kw-chip {
  height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--red-text);
  background: var(--red-tint);
  border: 1px solid rgba(255, 90, 110, 0.3);
  border-left: 2px solid var(--red);
  user-select: none;
}

.key-field { min-width: 160px; }

#keyBox {
  position: relative;
  height: 48px;
  width: 100%;
  background: rgba(11, 13, 20, 0.5);
  border: 1.5px dashed var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--mono);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

#keyBox:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(11, 13, 20, 0.65);
}

#keyBox .placeholder {
  color: var(--text-dim);
  font-size: 14px;
  padding-left: 28px;
}

#keyBox .value {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

#keyBox.has-key {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.3);
}
#keyBox.has-key .value { color: #ffffff; }

#keyBox.recording {
  border-style: solid;
  border-color: var(--red-hi);
  animation: pulse 1.1s ease-in-out infinite;
}
#keyBox.recording .recording-text { color: var(--red-text); font-size: 14px; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 110, 0.45); }
  50%      { box-shadow: 0 0 0 7px rgba(255, 90, 110, 0); }
}

#keyBox.invalid { border-color: #ff6b7d !important; animation: none; }

#clearKey {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
#keyBox.has-key #clearKey { display: inline-flex; }
#clearKey:hover { background: var(--red-tint); color: #ff6b7d; }

#manualKey {
  position: absolute;
  left: 8px; top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#manualKey:hover { background: var(--red-tint); color: #ff6b7d; }

.key-manual-input {
  position: absolute;
  inset: 3px;
  border: none;
  background: rgba(11, 13, 20, 0.97);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.5px;
  padding: 0 8px 0 32px;
  outline: none;
}
#keyBox.has-key .key-manual-input { padding-right: 36px; }
.key-manual-input::placeholder { color: var(--text-dim); }

#keyBox.manual-editing { border-style: solid; border-color: var(--red-hi); cursor: text; }

.select-wrap { position: relative; width: 100%; }

#searchWrap { height: 48px; }

select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 48px;
  border-radius: 0;
  background: rgba(11, 13, 20, 0.5);
  border: 1.5px solid var(--glass-border);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 0 38px 0 14px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

select:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(11, 13, 20, 0.65);
}

select:focus-visible {
  outline: none;
  border-color: var(--red);
  box-shadow: inset 3px 0 0 var(--red), 0 0 0 3px rgba(255, 43, 43, 0.14);
}

.select-wrap::after {
  content: "\25BE";
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
  font-size: 13px;
}

select option { background: #141722; color: var(--text); }

.category-field { width: 150px; flex-shrink: 0; }
.item-field { flex: 1; min-width: 170px; }
.extra-field { width: 180px; flex-shrink: 0; }
#extraSelect { border-style: dashed; }

#itemSearchBtn {
  position: absolute;
  left: 8px; top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#itemSearchBtn:hover { background: var(--red-tint); color: #ff6b7d; }

#itemSelect { padding-left: 38px; }

#itemSearch {
  position: absolute;
  inset: 0;
  display: none;
  border: 1.5px solid var(--red);
  background: rgba(11, 13, 20, 0.97);
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  padding: 0 40px;
  outline: none;
}
#itemSearch::placeholder { color: var(--text-dim); }

.select-wrap.searching #itemSearch { display: block; }
.select-wrap.searching select,
.select-wrap.searching #itemSearchBtn,
.select-wrap.searching::after { display: none; }
.select-wrap.searching #itemSearch:focus {
  box-shadow: inset 3px 0 0 var(--red), 0 0 0 3px rgba(255, 43, 43, 0.14);
}

#clearSearch {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.select-wrap.searching.has-text #clearSearch { display: inline-flex; }
#clearSearch:hover { background: var(--red-tint); color: #ff6b7d; }

#itemSuggest {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  z-index: 10;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 280px;
  overflow-y: auto;
  background: rgba(13, 15, 24, 0.97);
  border: 1px solid var(--glass-border);
  border-top: 2px solid var(--red);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
#itemSuggest.open { display: block; }

.suggest-item {
  display: block;
  padding: 8px 10px;
  font-size: 14px;
  cursor: pointer;
}
.suggest-item:hover { background: var(--red-tint); box-shadow: inset 2px 0 0 var(--red); }

.suggest-hit { color: #ff8b9a; font-weight: 700; }

.suggest-more,
.suggest-none {
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--text-dim);
}

#itemSuggest::-webkit-scrollbar { width: 8px; }
#itemSuggest::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
}

.copy-field { justify-content: flex-end;  }

#copyBtn {
  --c: 12px;
  --edge: #ff4d5c;
  --fill: #e0192d;
  position: relative;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 26px;
  color: #fff;
  font: 600 0.95rem/1 var(--display);
  letter-spacing: 0.01em;
  cursor: pointer;
}

#copyBtn::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

#copyBtn:hover:not(.disabled) {
  --edge: #ff7480;
  --fill: #ff2b3d;
  transform: translateY(-3px);
}

#copyBtn:hover:not(.disabled)::after {
  transform: translateX(120%);
}

#copyBtn:active:not(.disabled) { transform: translateY(-1px) scale(0.98); }

#copyBtn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#copyBtn .icon-check { display: none; }
#copyBtn.copied {
  --edge: #ffb3bb;
  --fill: #ff4d5c;
}
#copyBtn.copied .icon-copy { display: none; }
#copyBtn.copied .icon-check { display: inline; }

.hint {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-dim);
}
.hint.warn { color: #ffb0a8; }

.preview-head {
  margin-bottom: 10px;
}

.preview-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.preview-label::before {
  content: "";
  width: 14px;
  height: 5px;
  background: var(--red);
  transform: skewX(-35deg);
  box-shadow: 0 0 8px var(--red-glow);
}

.apply-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim);
}
.apply-hint code {
  font-family: var(--mono);
  font-size: 0.95em;
  padding: 1px 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 2px;
}

#consoleBox {
  background: rgba(5, 6, 10, 0.75);
  border: 1px solid var(--glass-border);
  border-left: 2px solid var(--red);
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 17px;
  overflow-x: auto;
  white-space: nowrap;
  transition: box-shadow 0.2s, border-color 0.2s;
}

#consoleBox.flash {
  border-color: rgba(255, 139, 154, 0.6);
  border-left-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 43, 43, 0.14), 0 0 24px rgba(255, 43, 43, 0.28);
}

#preview .kw    { color: var(--red-text); font-weight: 700; }
#preview .str   { color: #8f9097; }
#preview .key-str { color: #ffffff; font-weight: 600; }
#preview .cmd-str { color: #d0d1d7; }
#preview .extra-str { color: #ff9aa2; }
#preview .extra-sep { color: #5c5d63; }
#preview .dim   { color: #5c5d63; font-style: italic; }

.beta-note {
  margin-top: 20px;
  padding: 16px 24px;
  animation: fade-up 0.7s ease 0.5s both;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-dim);
}
.beta-note strong { color: var(--text); font-weight: 600; }

.beta-note .todo-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}
.beta-note .todo-label {
  display: block;
  margin-bottom: 8px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.beta-note .todo-block ul {
  list-style: none;
  display: inline-block;
  text-align: left;
}
.beta-note .todo-block li {
  position: relative;
  padding-left: 16px;
  margin-top: 3px;
}
.beta-note .todo-block li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 3px;
  background: var(--red);
  transform: translateY(-50%) skewX(-35deg);
}

.beta-note .suggestions-line {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}
.beta-note code {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 1px 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 2px;
}
.beta-chip {
  display: inline-block;
  vertical-align: 1px;
  margin-right: 10px;
  padding: 3px 9px;
  font: 600 10px/1.2 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-text);
  background: var(--red-tint);
  border-left: 2px solid var(--red);
}

.footer {
  margin-top: auto;
  padding: 1.4rem 0 0;
  text-align: center;
  font: 500 11px/1.8 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

#keyBox:focus-visible,
#clearKey:focus-visible {
  outline: 2px solid var(--red-text);
  outline-offset: 3px;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .eyebrow,
  h1,
  .subtitle,
  .builder,
  .preview-card,
  .beta-note {
    animation: none;
  }
  #copyBtn,
  #copyBtn:hover:not(.disabled) {
    transform: none;
  }
}

@media (max-width: 700px) {
  body { padding-left: 14px; padding-right: 14px; }
  .eyebrow { gap: 0.75em; letter-spacing: 0.14em; }
  .eyebrow::before, .eyebrow::after { width: 2.2em; }
  .builder-row { gap: 12px; }
  .field, .category-field, .key-field, .item-field, .extra-field { width: 100%; flex-basis: 100%; }
  .kw-chip { width: 100%; justify-content: center; }
  #copyBtn { width: 100%; }
}

@media (max-width: 700px) {
  select,
  #itemSearch,
  .key-manual-input {
    font-size: 16px;
  }
  #manualKey,
  #clearKey,
  #clearSearch,
  #itemSearchBtn {
    width: 36px;
    height: 36px;
  }
  #manualKey,
  #itemSearchBtn {
    left: 5px;
  }
  #clearKey,
  #clearSearch {
    right: 5px;
    font-size: 20px;
  }
  #itemSelect {
    padding-left: 44px;
  }
  #itemSearch {
    padding: 0 46px;
  }
  .key-manual-input {
    padding-left: 42px;
  }
  #keyBox.has-key .key-manual-input {
    padding-right: 44px;
  }
  .suggest-item {
    padding-top: 11px;
    padding-bottom: 11px;
  }
}

@media (hover: none) {
  #copyBtn:hover:not(.disabled) {
    transform: none;
  }
  #copyBtn:hover:not(.disabled)::after {
    transform: translateX(-120%);
  }
}

#copyBtn {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  clip-path: polygon(var(--c, 10px) 0, 100% 0, 100% calc(100% - var(--c, 10px)), calc(100% - var(--c, 10px)) 100%, 0 100%, 0 var(--c, 10px));
  background:
    linear-gradient(var(--edge), var(--edge)) var(--c, 10px) 0 / 100% var(--bw, 1px) no-repeat,
    linear-gradient(var(--edge), var(--edge)) 100% 0 / var(--bw, 1px) calc(100% - var(--c, 10px)) no-repeat,
    linear-gradient(var(--edge), var(--edge)) 0 100% / calc(100% - var(--c, 10px)) var(--bw, 1px) no-repeat,
    linear-gradient(var(--edge), var(--edge)) 0 var(--c, 10px) / var(--bw, 1px) 100% no-repeat,
    linear-gradient(to bottom right, transparent 50%, var(--edge) 0, var(--edge) calc(50% + var(--bw, 1px) + 0.3px), transparent 0) 0 0 / var(--c, 10px) var(--c, 10px) no-repeat,
    linear-gradient(to bottom right, transparent calc(50% - var(--bw, 1px) - 0.3px), var(--edge) 0, var(--edge) 50%, transparent 0) 100% 100% / var(--c, 10px) var(--c, 10px) no-repeat,
    var(--fill);
  transition: --edge 0.2s ease, --fill 0.2s ease, color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

:is(#copyBtn):focus-visible {
  outline: none;
  --edge: #fff;
  --bw: 2px;
}

@media (prefers-reduced-motion: reduce) {
  #copyBtn::after {
    display: none;
  }
}
