:root {
  --bg: #0c0b13; --panel: #17151f; --panel-2: #110f18;
  --border: rgba(255,255,255,0.08); --text: #ece9f4; --muted: #a39db4; --faint: #645d75;
  --accent: #a98bff; --accent-2: #6c8cff; --ok: #3ddc91; --radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  font-family: "Inter","Segoe UI",system-ui,-apple-system,sans-serif;
  background: var(--bg); color: var(--text); padding: 40px 20px 20px; min-height: 100vh; position: relative;
}
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(38rem 32rem at 6% -8%, rgba(169,139,255,0.18), transparent 60%),
              radial-gradient(34rem 28rem at 100% 6%, rgba(108,140,255,0.13), transparent 60%); }
.shell { position: relative; z-index: 1; max-width: 960px; margin: 0 auto; }
.masthead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { font-size: 22px; }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.headline { font-size: clamp(28px,5.5vw,44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.06; margin-bottom: 12px; }
.sub { color: var(--muted); font-size: 16px; max-width: 60ch; margin-bottom: 26px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: 0 18px 46px rgba(0,0,0,0.4); }
.field-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.field-head label { font-size: 13px; color: var(--muted); font-weight: 600; }
.counter { font-size: 12px; color: var(--faint); }
textarea {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); padding: 14px; font-size: 15px; font-family: inherit; line-height: 1.6; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--accent); }
.opts { display: flex; gap: 12px; align-items: end; margin-top: 14px; }
.opt { flex: 1; }
.opt label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
select { width: 100%; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); padding: 11px; font-size: 14px; font-family: inherit; }
select:focus { outline: none; border-color: var(--accent); }
.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; border: none;
  border-radius: 10px; padding: 12px 22px; font-size: 15px; font-weight: 800; cursor: pointer; font-family: inherit;
  white-space: nowrap; transition: filter 0.15s, transform 0.1s;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.limit-note { font-size: 12px; color: var(--faint); margin-top: 10px; min-height: 15px; }
.output { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; min-height: 280px; font-size: 15px; line-height: 1.7; white-space: pre-wrap; }
.output .placeholder { color: var(--faint); }
.output.loading { color: var(--muted); }
.copy-btn { background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; }
.copy-btn:hover:not(:disabled) { color: var(--text); border-color: var(--accent); }
.copy-btn:disabled { opacity: 0.45; cursor: default; }
