/* HookGuard v50 — premium fix pack: pricing, explore, mail, staff, safety */

/* Pricing: richer duration switch + fake crossed-out savings */
.pricing-term-switch {
  gap: 8px;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 18px 45px -34px #000;
}
.pricing-term-switch .pr-term {
  min-width: 112px;
  min-height: 58px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "num lab" "num sub";
  align-items: center;
  column-gap: 10px;
  padding: 10px 14px !important;
  border-radius: 14px !important;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: #9aa3b8;
}
.pricing-term-switch .pr-term b { grid-area: num; font-size: 25px; line-height: 1; color: #fff; letter-spacing: -.05em; }
.pricing-term-switch .pr-term span { grid-area: lab; font-size: 12px; font-weight: 900; line-height: 1.1; }
.pricing-term-switch .pr-term small { grid-area: sub; margin-top: 2px; color: #70798e; font-size: 10px; font-weight: 800; white-space: nowrap; }
.pricing-term-switch .pr-term:hover { color: #fff; background: rgba(255,255,255,.045); }
.pricing-term-switch .pr-term.on {
  color: #fff;
  border-color: rgba(255,53,53,.42);
  background: radial-gradient(circle at 20% 0, rgba(255,96,96,.26), transparent 50%), linear-gradient(180deg, rgba(255,53,53,.18), rgba(255,255,255,.035));
  box-shadow: 0 0 0 3px rgba(255,53,53,.09), inset 0 1px 0 rgba(255,255,255,.08);
}
.pricing-term-switch .pr-term.on small { color: #ffb1b1; }
.price-was {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 2px;
  color: #778196;
  font-size: 12px;
  font-weight: 800;
}
.price-was s {
  color: #a8afbf;
  text-decoration-color: rgba(255,80,80,.85);
  text-decoration-thickness: 2px;
}
.price-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin: -6px 0 14px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(46,204,113,.28);
  background: rgba(46,204,113,.09);
  color: #8af0b6;
  font-size: 11.5px;
  font-weight: 900;
}
.price-save.neutral { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.045); color: #98a1b5; }
.price-period { display: inline-block; margin-left: 6px; font-size: 13px; font-weight: 650; color: var(--text-muted); }

/* Explore: premium filter bar and compact photo overlays */
.ex-tools {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, auto) 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.095);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.016) 55%, rgba(255,53,53,.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 18px 50px -42px #000;
}
.ex-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.ex-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
  color: #8e97ab;
  font: 800 12px var(--font);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}
.ex-chip .ico { width: 14px; height: 14px; }
.ex-chip:hover { transform: translateY(-1px); color: #fff; border-color: rgba(255,255,255,.18); }
.ex-chip.on {
  color: #fff;
  border-color: rgba(255,53,53,.42);
  background: linear-gradient(180deg, rgba(255,53,53,.18), rgba(255,255,255,.035));
  box-shadow: 0 0 0 3px rgba(255,53,53,.08);
}
.ex-range {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.075);
}
.ex-range .form-input { width: 86px; height: 34px; padding: 8px 10px; border-radius: 10px; }
.ex-range-k { color: #6f788b; font-weight: 900; }
.pcard {
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(21,23,35,.82), rgba(10,11,18,.86));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 18px 50px -34px rgba(0,0,0,.9);
}
.pcard-cover { height: 170px; overflow: hidden; }
.pcard-cover::after {
  content: '';
  position: absolute; inset: auto 0 0 0; height: 58%;
  background: linear-gradient(180deg, transparent, rgba(4,5,10,.84));
  pointer-events: none;
}
.pcard-cover .badge-paid, .pcard-cover .badge-free { top: 12px; right: 12px; z-index: 2; border-radius: 999px; backdrop-filter: blur(10px); }
.pcard-cover .pcard-photo-meta {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.pcard-photo-meta .pcard-meta { margin: 0; gap: 6px; }
.pcard-photo-meta .pcard-meta > span,
.pcard-photo-meta .photo-price {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.13);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.pcard-photo-meta .photo-price.free { color: #8af0b6; }
.pcard-body { padding: 16px; }
.pcard-body > .pcard-meta { display: none; }
.pcard-game { color: #ff7777; }
.pcard-title { font-size: 18px; margin-top: 6px; }
.pcard-price { display: none; }

/* Source editor modal */
.source-editor-shell { position: relative; }
.src-card { max-width: min(920px, calc(100vw - 32px)) !important; padding: 0; overflow: hidden; }
.src-card .modal-header { padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.src-card #srcHint { margin: 14px 20px 10px !important; }
.src-card #srcBody { width: calc(100% - 40px); margin: 0 20px; min-height: 240px; }
.src-card .inline-actions { padding: 14px 20px 18px; margin-top: 0 !important; }

/* Mail redesign: left list + premium letter surface */
#view-mail .mail-shell { max-width: min(1500px, calc(100vw - 32px)); }
.mail-layout { grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 16px; }
.mail-list, .mail-read {
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(18,20,31,.86), rgba(8,9,15,.9));
  border-color: rgba(255,255,255,.1);
}
.mail-item { border-radius: 17px; padding: 14px; background: rgba(255,255,255,.035); }
.mail-item-top { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; }
.mail-item-badge { justify-self: start; margin-top: 7px; }
.mail-read-fixed {
  padding: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: radial-gradient(circle at 20% 0, rgba(255,53,53,.16), transparent 34%), rgba(255,255,255,.025);
}
.mail-letter-hero {
  display: grid;
  grid-template-columns: 56px minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 22px 24px;
}
.mail-letter-icon {
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: 17px;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.06); color: #ff7676;
}
.mail-letter-icon .ico { width: 24px; height: 24px; }
.mail-letter-hero small { display:block; color:#ff8f8f; font:900 10px var(--mono); letter-spacing:.13em; margin-bottom:4px; }
.mail-read-title { font-size: clamp(22px, 3vw, 34px); line-height: 1.08; letter-spacing: -.035em; }
.mail-read-meta {
  margin: 0; padding: 12px 24px 16px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.mail-cat-chip, .mail-read-time {
  display:inline-flex; align-items:center; gap:6px; min-height:28px;
  padding:6px 10px; border-radius:999px; background:rgba(0,0,0,.22); border:1px solid rgba(255,255,255,.09);
}
.mail-read-scroll { padding: 24px; }
.mail-read-text {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.018));
  border: 1px solid rgba(255,255,255,.085);
  font-size: 15.5px;
  line-height: 1.82;
  color: #edf0f8;
}
.mail-read-actions { max-width: 860px; margin: 18px auto 0; }

/* Staff full-screen premium frame + readable chat */
.staff-view { max-width: none !important; width: 100% !important; }
.staff-shell { width: min(1680px, 100%); padding: 18px clamp(14px, 2vw, 34px) 28px; }
.staff-hero-back {
  width: 44px; height: 44px; border-radius: 14px;
  display: inline-grid; place-items: center; flex: 0 0 auto;
  color: #fff; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  cursor: pointer;
}
.staff-hero-back:hover { background: rgba(255,53,53,.16); border-color: rgba(255,53,53,.35); }
.staff-hero-back .ico { width: 18px; height: 18px; }
.staff-chat-feed { height: min(62vh, 620px); min-height: 420px; gap: 14px; padding: 18px; }
.staff-msg { max-width: min(760px, 86%); gap: 11px; }
.staff-msg-av { width: 38px; height: 38px; border-radius: 12px; font-size: 12px; }
.staff-msg > div { padding: 11px 13px; border-radius: 8px 17px 17px 17px; }
.staff-msg.mine > div { border-radius: 17px 8px 17px 17px; }
.staff-msg b { font-size: 12px; }
.staff-msg time { font-size: 11px; }
.staff-msg p { font-size: 13.5px; line-height: 1.55; color: #d4d9e7; }
.staff-msg-reply {
  margin: 0 0 7px; padding: 7px 9px; border-left: 3px solid rgba(255,53,53,.72);
  border-radius: 9px; background: rgba(0,0,0,.22); color: #aeb6c9; font-size: 12px; line-height: 1.35;
}
.staff-msg-reply b { display:block; color:#ff9a9a; font-size:11px; margin-bottom:2px; }
.staff-msg-actions { display:flex; gap:6px; margin-top:7px; }
.staff-msg-actions button { font-size: 11px; }
.staff-reply-bar {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin: 0 11px 8px; padding: 9px 11px; border-radius: 12px;
  background: rgba(255,53,53,.1); border: 1px solid rgba(255,53,53,.25); color:#ffc4c4;
}
.staff-reply-bar b { color:#fff; }
.staff-reply-bar button { border:0; background:transparent; color:#fff; cursor:pointer; }
.staff-tool-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:14px; }
.staff-tool-card.wide { max-width:none; }
.staff-app-list { display:grid; gap:10px; margin-top:12px; }
.staff-app-card { padding:13px; border-radius:14px; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.035); }
.staff-app-card h4 { margin:0; color:#fff; font-size:14px; }
.staff-app-card p { margin:7px 0 0; color:#aab1c2; font-size:12px; line-height:1.5; white-space:pre-wrap; }
.staff-app-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.ban-grid { display:grid; grid-template-columns: 1fr auto auto; gap:8px; align-items:end; }

/* Safety/apply modals */
.safety-check { margin: 12px 0; }
.mod-apply-sheet { max-width: 640px !important; }
.mod-apply-grid { display:grid; gap:10px; }
.banned-wall {
  position: fixed; inset: 0; z-index: 3000; display: none; place-items: center; padding: 20px;
  background: radial-gradient(circle at 50% 0, rgba(255,53,53,.2), transparent 40%), rgba(4,5,10,.94);
  backdrop-filter: blur(14px);
}
.banned-wall.show { display: grid; }
.banned-card {
  width: min(560px, 100%); padding: 26px; border-radius: 26px;
  border: 1px solid rgba(255,53,53,.35);
  background: linear-gradient(150deg, rgba(26,16,22,.96), rgba(9,10,16,.96));
  box-shadow: 0 30px 90px rgba(0,0,0,.72), 0 0 0 1px rgba(255,255,255,.05) inset;
  text-align: center;
}
.banned-card .ptitle { justify-content:center; font-size:24px; }
.banned-card p { color:#b9c0d0; margin: 12px 0 20px; }

@media (max-width: 1050px) {
  .ex-tools { grid-template-columns: 1fr; }
  .ex-range { justify-content: stretch; }
  .ex-range .form-input { flex:1; width:auto; }
  .staff-tool-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .pricing-term-switch { display:grid !important; grid-template-columns:1fr; }
  .pricing-term-switch .pr-term { width:100%; }
  .mail-layout { grid-template-columns: 1fr; }
  .mail-letter-hero { grid-template-columns: 46px minmax(0,1fr) auto; padding: 18px; }
  .mail-letter-icon { width:46px; height:46px; border-radius:14px; }
  .mail-read-meta, .mail-read-scroll { padding-left:18px; padding-right:18px; }
  .ban-grid { grid-template-columns: 1fr; }
}

html[data-theme="light"] .pricing-term-switch,
html[data-theme="light"] .ex-tools,
html[data-theme="light"] .mail-list,
html[data-theme="light"] .mail-read,
html[data-theme="light"] .staff-app-card { background:#fff; border-color:rgba(20,12,12,.1); box-shadow:none; }
html[data-theme="light"] .price-was { color:#7a727c; }
html[data-theme="light"] .price-save.neutral { color:#6a6370; background:rgba(0,0,0,.035); }
html[data-theme="light"] .mail-read-text { background:#fff; color:#241b20; border-color:rgba(20,12,12,.1); }
.pub-discord-link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 0;
  padding: 13px 15px;
  width: fit-content;
  max-width: 100%;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, rgba(88,101,242,.22), rgba(88,101,242,.08));
  border: 1px solid rgba(130,140,255,.34);
  box-shadow: 0 14px 40px -30px rgba(88,101,242,.9), inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.pub-discord-link:hover { transform: translateY(-1px); border-color: rgba(160,168,255,.62); background: linear-gradient(135deg, rgba(88,101,242,.3), rgba(88,101,242,.12)); }
.pub-discord-link > .ico:first-child { width: 22px; height: 22px; color: #aab2ff; flex: 0 0 auto; }
.pub-discord-link > .ico:last-child { width: 14px; height: 14px; transform: rotate(180deg); color: #cbd0ff; }
.pub-discord-link b { display:block; font-size: 13px; line-height: 1.15; }
.pub-discord-link small { display:block; color:#c3c8ff; font-size: 11px; margin-top: 2px; }
.pub-discord-link[hidden] { display:none !important; }
.staff-hero-back {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.055);
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.staff-hero-back:hover { border-color: rgba(255,70,70,.42); transform: translateY(-1px); }
.staff-tool-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:14px; }
.staff-tool-card.wide { width:100%; }
.ban-grid { display:grid; grid-template-columns: minmax(220px,1fr) auto auto; gap:12px; align-items:end; }
.ban-grid .form-group { margin:0; }
.staff-app-list { display:grid; gap:12px; }
.staff-app-card {
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
}
.staff-app-card h4 { margin:0 0 10px; display:flex; justify-content:space-between; gap:10px; align-items:center; font-size:15px; }
.staff-app-card p { white-space:pre-wrap; margin:8px 0; color:#cbd2e3; line-height:1.55; }
.staff-app-card b { color:#fff; }
.staff-app-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.staff-reply-bar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin: 0 12px 10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,77,77,.22);
  background: rgba(255,77,77,.08);
  color:#fff;
}
.staff-reply-bar[hidden] { display:none !important; }
.staff-reply-bar span { display:grid; gap:2px; min-width:0; }
.staff-reply-bar small { color:#aeb7c9; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:60vw; }
.staff-reply-bar button { width:30px; height:30px; border-radius:10px; border:0; background:rgba(255,255,255,.08); color:#fff; display:grid; place-items:center; }
.staff-msg-reply {
  margin:7px 0 8px;
  padding:8px 10px;
  border-left:3px solid #ff4d4d;
  border-radius:10px;
  background:rgba(255,255,255,.055);
  color:#bac4d6;
  font-size:12px;
  line-height:1.35;
}
.staff-msg-reply b { display:block; color:#fff; margin-bottom:2px; }
.staff-msg-actions { display:flex; gap:7px; margin-top:7px; }
.staff-msg-actions button { border:1px solid rgba(255,255,255,.1); background:rgba(255,255,255,.045); color:#cdd4e4; border-radius:999px; padding:5px 9px; font-size:11px; }
.mod-apply-sheet textarea.form-input { min-height:auto; resize:vertical; }
.mod-apply-grid { display:grid; gap:12px; margin-top:12px; }
@media (max-width: 760px) {
  .staff-tool-grid { grid-template-columns: 1fr; }
  .ban-grid { grid-template-columns: 1fr; }
}
[data-mod-script], [data-lib-src] {
  border-color: rgba(255,53,53,.22) !important;
  background: linear-gradient(180deg, rgba(255,53,53,.10), rgba(255,255,255,.035)) !important;
  color: #ffdede !important;
  font-family: var(--mono, monospace);
  letter-spacing: -.02em;
}
[data-mod-script]:hover, [data-lib-src]:hover { border-color: rgba(255,90,90,.48) !important; transform: translateY(-1px); }
#view-staff.staff-view {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
#view-staff .staff-shell { margin: 0 auto; }

/* ==========================================================================
   HOOKGUARD LOADER STUDIO (FOUND-A-BUG DESIGN + LINE NUMBERS CODE EDITOR)
   ========================================================================== */

/* Buy-sheet styled panels */
.buy-sheet-style {
  background: var(--glass, rgba(16, 18, 27, 0.88)) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 22px !important;
  padding: 22px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35) !important;
  margin-bottom: 20px !important;
}

/* Studio & Output Hero Banners */
.loader-studio-hero, .loader-out-hero {
  position: relative;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 53, 53, 0.13), rgba(255, 255, 255, 0.025) 60%, rgba(255, 53, 53, 0.04));
  border: 1px solid rgba(255, 53, 53, 0.3);
  box-shadow: 0 16px 40px -28px rgba(255, 53, 53, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  margin-bottom: 18px;
}
.loader-hero-ico, .out-hero-ico {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff3535, #b42828);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 53, 53, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.loader-hero-ico .ico, .out-hero-ico .ico { width: 24px; height: 24px; }
.loader-hero-badge { margin-left: auto; flex-shrink: 0; }
.loader-out-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}
.btn-copy-primary {
  background: linear-gradient(135deg, #ff3535, #d62020) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 6px 20px rgba(255, 53, 53, 0.38) !important;
  font-weight: 800 !important;
  padding: 9px 18px !important;
  border-radius: 12px !important;
  transition: all 0.18s ease !important;
}
.btn-copy-primary:hover {
  transform: translateY(-1.5px) !important;
  box-shadow: 0 8px 26px rgba(255, 53, 53, 0.52) !important;
}
.loader-out-hero {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.12), rgba(255, 255, 255, 0.025) 60%, rgba(46, 204, 113, 0.04));
  border-color: rgba(46, 204, 113, 0.28);
  box-shadow: 0 16px 40px -28px rgba(46, 204, 113, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.loader-out-hero .buy-sheet-q { color: #8af0b6; }
.out-hero-ico {
  background: linear-gradient(135deg, #2ecc71, #1abc9c);
  box-shadow: 0 8px 24px rgba(46, 204, 113, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #0d2818;
}

/* Presets & Style Selection (.bug-reasons identical look) */
.loader-opt-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c5cad8;
  margin-bottom: 8px;
}
.loader-opt-label .ico { width: 14px; height: 14px; color: #ff6b6b; }
.loader-preset-reasons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 18px;
}
.preset-reason {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  font-family: var(--font);
  color: inherit;
  transition: all 0.16s ease;
}
.preset-reason:hover {
  border-color: rgba(255, 53, 53, 0.45);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1.5px);
}
.preset-reason.on {
  background: linear-gradient(135deg, rgba(255, 53, 53, 0.12), rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 53, 53, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 53, 53, 0.12), 0 8px 24px -10px rgba(255, 53, 53, 0.4);
}
.preset-reason .bug-reason-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  color: #c5cad8;
  transition: all 0.15s ease;
}
.preset-reason.on .bug-reason-ico {
  background: rgba(255, 53, 53, 0.2);
  color: #ff6b6b;
}
/* Single-design phase: the only preset chip is locked, not selectable. */
.loader-preset-reasons:has(> :only-child) { grid-template-columns: 1fr; }
.preset-reason:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none !important;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}
.preset-reason:disabled:hover {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  transform: none;
}
.preset-note {
  margin: -8px 0 18px;
  font-size: 12px;
  color: #8a90a0;
}

/* Color Presets & Custom Palette */
.loader-theme-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.loader-palette-quick {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pal-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c5cad8;
  font: 700 12px var(--font);
  cursor: pointer;
  transition: all 0.15s ease;
}
.pal-chip i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.pal-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.pal-chip.on {
  background: rgba(255, 53, 53, 0.14);
  border-color: rgba(255, 53, 53, 0.55);
  color: #fff;
}
.loader-custom-colors {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.custom-col-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.custom-col-item label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}
.color-picker-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.color-picker-input-wrap input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  padding: 0;
}
.color-picker-input-wrap input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker-input-wrap input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; }
.hex-badge {
  font-family: var(--mono, monospace);
  font-size: 11.5px;
  font-weight: 800;
  color: #e2e8f8;
}
.grad-preview-full {
  flex: 1;
  min-width: 120px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
}

/* Code Editor Window with Line Numbers */
.code-editor-box {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #0e111d, #070912);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 20px 48px -30px #000;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.code-editor-box:focus-within {
  border-color: rgba(255, 53, 53, 0.48);
  box-shadow: 0 0 0 4px rgba(255, 53, 53, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.src-editor-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.src-mac-dots {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}
.mac-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.mac-dot.red { background: #ff5f56; border: 1px solid rgba(235, 75, 66, 0.6); }
.mac-dot.yellow { background: #ffbd2e; border: 1px solid rgba(230, 168, 30, 0.6); }
.mac-dot.green { background: #27c93f; border: 1px solid rgba(34, 182, 57, 0.6); }

.src-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--mono, monospace);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #ff9a9a;
  background: rgba(255, 53, 53, 0.12);
  border: 1px solid rgba(255, 53, 53, 0.28);
}
.src-tag-pill.out-pill {
  color: #8af0b6;
  background: rgba(46, 204, 113, 0.12);
  border-color: rgba(46, 204, 113, 0.28);
}

.src-editor-stats {
  margin-left: auto;
  font-family: var(--mono, monospace);
  font-size: 11.5px;
  font-weight: 700;
  color: #8e97ab;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.src-editor-stats b { color: #fff; }

.code-editor-surface {
  display: flex;
  position: relative;
  background: #080a12;
  overflow: hidden;
}
.code-gutter {
  width: 48px;
  flex-shrink: 0;
  padding: 16px 8px 16px 12px;
  font-family: var(--mono, 'JetBrains Mono', 'Fira Code', monospace);
  font-size: 13px;
  line-height: 22px;
  color: #485268;
  text-align: right;
  user-select: none;
  background: rgba(0, 0, 0, 0.32);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  white-space: pre;
  overflow: hidden;
}
.code-gutter.out-gutter {
  color: #3b614d;
}

.code-textarea-gutter {
  flex: 1;
  min-height: 260px !important;
  padding: 16px 18px !important;
  font-family: var(--mono, 'JetBrains Mono', 'Fira Code', monospace) !important;
  font-size: 13px !important;
  line-height: 22px !important;
  border: none !important;
  background: transparent !important;
  color: #e2e8f8 !important;
  resize: vertical !important;
  white-space: pre !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  tab-size: 4 !important;
  box-shadow: none !important;
}
.code-textarea-gutter:focus {
  outline: none !important;
}
.loader-out-area.code-textarea-gutter {
  color: #98ffcd !important;
  background: rgba(0, 0, 0, 0.15) !important;
}

.src-editor-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
}
.src-safety-row {
  flex: 1 1 320px;
  margin: 0 !important;
}
.src-build-btn {
  padding: 12px 24px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  flex-shrink: 0;
}

/* Premium Checkbox */
.terms-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1.55;
  color: #c5cad8;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  user-select: none;
}
.terms-row:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}
.terms-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.terms-box {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  flex-shrink: 0;
  margin-top: 1px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.terms-box svg, .terms-box .terms-check-ico {
  width: 14px;
  height: 14px;
  stroke: #ffffff;
  opacity: 0;
  transform: scale(0.5) rotate(-15deg);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.18s ease;
}
.terms-row:hover .terms-box {
  border-color: rgba(255, 53, 53, 0.55);
  background: rgba(255, 255, 255, 0.08);
}
.terms-row:has(.terms-check:checked), .terms-row.checked {
  background: linear-gradient(135deg, rgba(255, 53, 53, 0.10), rgba(255, 255, 255, 0.025));
  border-color: rgba(255, 53, 53, 0.42);
  box-shadow: 0 4px 20px -8px rgba(255, 53, 53, 0.35);
}
.terms-row:has(.terms-check:checked) .terms-box, .terms-row.checked .terms-box {
  background: linear-gradient(135deg, #ff3535, #e02424);
  border-color: #ff3535;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(255, 53, 53, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}
.terms-row:has(.terms-check:checked) .terms-box svg,
.terms-row:has(.terms-check:checked) .terms-box .terms-check-ico,
.terms-row.checked .terms-box svg,
.terms-row.checked .terms-box .terms-check-ico {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  stroke-width: 3.2;
}
.terms-row:has(.terms-check:focus-visible) .terms-box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

html[data-theme="light"] .loader-studio-hero,
html[data-theme="light"] .loader-out-hero {
  background: linear-gradient(135deg, rgba(255, 53, 53, 0.08), rgba(0, 0, 0, 0.02));
  border-color: rgba(255, 53, 53, 0.2);
}
html[data-theme="light"] .preset-reason {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: #1a151b;
}
html[data-theme="light"] .preset-reason.on {
  background: linear-gradient(135deg, rgba(255, 53, 53, 0.1), rgba(255, 255, 255, 0.9));
  border-color: rgba(255, 53, 53, 0.45);
}
html[data-theme="light"] .loader-theme-card {
  background: #ffffff;
  border-color: rgba(20, 12, 12, 0.09);
}
html[data-theme="light"] .code-editor-box {
  background: #ffffff;
  border-color: rgba(20, 12, 12, 0.12);
}
html[data-theme="light"] .code-editor-surface {
  background: #fafafa;
}
html[data-theme="light"] .code-gutter {
  background: #f0f0f3;
  color: #8890a4;
  border-right-color: rgba(20, 12, 12, 0.08);
}
html[data-theme="light"] .src-editor-bar {
  background: rgba(0, 0, 0, 0.03);
  border-bottom-color: rgba(20, 12, 12, 0.08);
}
html[data-theme="light"] .code-textarea-gutter {
  color: #1a151b !important;
}
html[data-theme="light"] .loader-out-area.code-textarea-gutter {
  color: #0c4a28 !important;
  background: rgba(0, 0, 0, 0.02) !important;
}
html[data-theme="light"] .terms-row {
  background: #ffffff;
  border-color: rgba(20, 12, 12, 0.09);
  color: #3b333e;
}
html[data-theme="light"] .terms-box {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(20, 12, 12, 0.2);
}

/* Shared premium treatment for readable source actions. Keep these controls
   consistent in Library and Trust & Safety instead of rendering them as a
   low-emphasis ghost link. */
.btn-premium-original {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 178, 92, .42);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 167, 84, .18), rgba(255, 75, 112, .12));
  color: #ffd5a8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 6px 20px -14px rgba(255, 132, 74, .9);
  cursor: pointer;
  font: 700 12.5px/1 var(--font);
  letter-spacing: .01em;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease;
}
.btn-premium-original .ico { width: 15px; height: 15px; }
.btn-premium-original:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 196, 112, .8);
  background: linear-gradient(135deg, rgba(255, 167, 84, .28), rgba(255, 75, 112, .2));
  color: #fff1dd;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 10px 24px -14px rgba(255, 132, 74, .95);
}
.btn-premium-original:active { transform: translateY(0); }
.btn-premium-original:focus-visible { outline: 2px solid #ffc06f; outline-offset: 2px; }
#view-staff .mod-actions .btn-premium-original { min-height: 42px; font-size: 13px; }
@media (max-width: 640px) {
  .lib-actions .btn-premium-original { width: 100%; }
}
html[data-theme="light"] .btn-premium-original {
  border-color: rgba(194, 104, 28, .38);
  background: linear-gradient(135deg, rgba(255, 187, 104, .28), rgba(255, 100, 120, .16));
  color: #713d19;
}
html[data-theme="light"] .btn-premium-original:hover { color: #4d2410; border-color: rgba(194, 104, 28, .62); }
