:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #11131A;
  color: #f4f5fb;
  --line: #2c3042;
  --muted: #a6abc0;
  --blue: #5965ef;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: #11131A; }
button, input, textarea, select, a { font: inherit; }
button:disabled { cursor: not-allowed; opacity: .5; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #949cff; outline-offset: 3px; }
.shell { max-width: 1450px; margin: 0 auto; padding: clamp(24px, 5vw, 72px); }
.login-card { max-width: 600px; margin: 15vh auto 0; padding: clamp(28px, 5vw, 56px); text-align: center; border: 1px solid var(--line); border-radius: 20px; background: #141723e8; }
h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -.04em; margin: 0 0 28px; }
h2 { font-size: 22px; margin: 0; letter-spacing: -.02em; }
h3 { font-size: 14px; margin: 0; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 22px; align-items: start; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: #141723e8; padding: 24px; box-shadow: 0 18px 50px #0002; }
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.form-panel label, .destination-controls label { display: block; color: #cdd0df; font-size: 13px; font-weight: 650; margin: 0 0 17px; min-width: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.counter { float: right; color: #a2a8c0; font-weight: 500; font-size: 11px; }
h3 .counter, h4 .counter { float: none; margin-left: 8px; }
input, textarea, select { display: block; width: 100%; min-width: 0; margin-top: 8px; padding: 12px 13px; border: 1px solid #34394f; border-radius: 9px; background: #0f111a; color: #f6f7ff; outline: none; transition: .15s; }
input:focus, textarea:focus, select:focus { border-color: #8b93ff; box-shadow: 0 0 0 3px #5965ef22; }
input[type=color] { height: 46px; padding: 5px; cursor: pointer; }
input::placeholder, textarea::placeholder { color: #9298af; opacity: 1; }
textarea { resize: vertical; line-height: 1.5; }
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 25px 0 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.section-title .toggle { margin-bottom: 0; }
.toggle, .checkbox, .inline-check { display: flex !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.toggle input, .checkbox input, .inline-check input { width: auto; margin: 0; accent-color: var(--blue); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9px; padding: 13px 18px; color: white; text-decoration: none; font-weight: 750; cursor: pointer; transition: .15s; }
.button.primary { background: var(--blue); }
.button.primary:hover:not(:disabled) { background: #707aff; }
.button.ghost { background: #24283a; border: 1px solid #3b4057; color: #e7e9f8; }
.button.ghost:hover:not(:disabled) { background: #2e344d; }
.button.danger { background: #301c26; border: 1px solid #59323e; color: #ffb3bf; }
.button.danger:hover:not(:disabled) { background: #482936; }
.button.small { padding: 8px 11px; font-size: 12px; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line); margin-top: 24px; }
.notice { padding: 13px 15px; border-radius: 10px; background: #352b1d; color: #ffd799; border: 1px solid #73562a; margin: 0 0 18px; font-size: 14px; overflow-wrap: anywhere; }
.notice.success { background: #19372c; color: #a3ebc6; border-color: #3d7056; }
.embed-editor { margin: 0 0 24px; padding: 18px; border: 1px solid #656ed3; border-top: 4px solid var(--blue); border-radius: 12px; background: #191e32; }
.embed-editor-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid #39415f; cursor: pointer; list-style: none; }
.embed-editor-heading::-webkit-details-marker { display: none; }
.embed-editor-heading::before { content: '▸'; color: #c0c7f0; }
.embed-editor[open] > .embed-editor-heading::before { content: '▾'; }
.embed-editor:not([open]) > .embed-editor-heading { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.embed-number { font-size: 17px; font-weight: 700; }
.embed-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.embed-editor-section { padding-top: 15px; margin-top: 16px; border-top: 1px solid #343c57; }
.embed-editor-section h4 { font-size: 13px; color: #c0c7f0; margin: 0 0 15px; }
.embed-editor-section label:last-child { margin-bottom: 0; }
.fields-heading { padding: 0; margin: 0 0 14px; border: 0; }
.fields-heading h4 { margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 9px; align-items: start; margin-bottom: 12px; padding: 12px; border: 1px solid #3b4363; border-radius: 10px; background: #10131d; }
.field-row label { margin: 0 !important; }
.field-row-heading { display: flex; justify-content: space-between; align-items: center; color: #bbc2df; font-size: 12px; font-weight: 650; }
.inline-check { min-height: 40px; white-space: nowrap; }
.remove-field { justify-self: end; height: 40px; width: 40px; border: 1px solid #59323e; border-radius: 8px; background: #301c26; color: #ff9bab; font-size: 22px; cursor: pointer; }
.channel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.channel-heading label { margin: 0; }
.destination-controls { padding-top: 22px; margin-top: 24px; border-top: 1px solid var(--line); }
#channel-search { margin-top: 12px; }
#channel { margin-bottom: 22px; }
optgroup { font-weight: 700; }
option { font-weight: 400; }
.input-help { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.6; display: block; margin: 8px 0 18px; }
.over-limit { color: #ff9bab; }
.discord-preview { border-radius: 10px; background: #313338; padding: 22px 18px; min-height: 200px; color: #dbdee1; overflow-wrap: anywhere; }
.message-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.avatar { width: 32px; height: 32px; display: block; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.username { font-weight: 650; color: #f2f3f5; }
.bot-tag { padding: 2px 4px; border-radius: 3px; background: #5865f2; color: #fff; font-size: 9px; }
.time { color: #aeb4bc; font-size: 11px; }
.message-content { white-space: pre-wrap; overflow-wrap: anywhere; margin: 5px 0 9px; }
.preview-embed-section { padding: 12px; margin-top: 18px; border: 1px solid #606793; border-radius: 9px; background: #272a36; }
.preview-embed-label { margin: 0 0 10px; color: #c5cbf7; font-size: 11px; font-weight: 750; letter-spacing: .04em; }
.embed-card { display: flow-root; border-left: 4px solid var(--blue); background: #2b2d31; border-radius: 4px; padding: 14px 16px; max-width: 620px; }
.preview-editable { display: block; width: 100%; margin: 0; padding: 0; background: transparent; color: inherit; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; border: 1px solid transparent; border-radius: 3px; min-width: 0; min-height: 1.3em; box-shadow: none; resize: none; overflow: hidden; transition: none; }
.preview-editable:hover { border-color: #737ca0; }
.preview-editable:focus { border-color: #a6aeff; outline: 2px solid #969fff55; outline-offset: 2px; }
.preview-editable::placeholder { color: #979da9; font-weight: 400; opacity: 1; }
.embed-title { color: #00a8fc; font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.embed-description { margin-bottom: 12px; line-height: 1.45; }
.preview-field-name { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.preview-field-value { font-size: 12px; color: #c7cbd0; }
.preview-footer-text { flex: 1; }
.embed-card h4 { margin: 0 0 8px; font-size: 16px; }
.embed-card p { white-space: pre-wrap; margin: 0 0 12px; color: #dbdee1; line-height: 1.45; }
.embed-card a { color: #00a8fc; text-decoration: none; }
.embed-card a:hover { text-decoration: underline; }
.embed-image { display: block; max-width: 100%; max-height: 300px; border-radius: 4px; margin-top: 10px; }
.embed-thumb { width: 72px; max-width: 35%; height: 72px; float: right; object-fit: cover; border-radius: 4px; margin: 0 0 12px 12px; }
.embed-author, .embed-footer { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; min-width: 0; }
.embed-author { font-weight: 600; }
.embed-author .author-link { color: #f2f3f5; }
.embed-footer { color: #c6cad1; margin: 12px 0 0; font-size: 11px; }
.embed-icon { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.embed-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; clear: both; }
.embed-field { grid-column: 1 / -1; min-width: 0; }
.embed-field.inline { grid-column: span 1; }
.embed-field strong { display: block; font-size: 12px; margin-bottom: 4px; white-space: pre-wrap; }
.embed-field span { font-size: 12px; color: #c7cbd0; white-space: pre-wrap; }
.preview-link { display: inline-flex; margin-top: 12px; padding: 9px 14px; border-radius: 4px; background: #4e5058; color: #f2f3f5; text-decoration: none; font-size: 13px; }
.preview-link:hover { background: #6d6f78; }
.preview-note { color: #a6abc0; font-size: 12px; line-height: 1.6; }
.preview-note { margin: 18px 0 0; }
@media (max-width: 1000px) {
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid.two { grid-template-columns: 1fr; }
  .panel { padding: 18px; }
  .field-row { grid-template-columns: 1fr; }
  .embed-fields { grid-template-columns: 1fr; }
  .shell { padding: 24px 16px; }
  .section-title { flex-wrap: wrap; }
  .channel-heading { align-items: flex-start; }
  .preview-embed-section { padding: 8px; }
  .embed-card { padding: 12px; }
  .embed-editor { padding: 14px; }
}
