:root {
    color-scheme: dark;
    --background: #100e17;
    --surface: #191621;
    --surface-raised: #211d2c;
    --line: #332d41;
    --text: #eeeaf5;
    --muted: #aaa2b9;
    --accent: #ba95f5;
    --purple: #8954d8;
    --green: #98d4b7;
    --danger: #f0a7b3;
    --warning: #e7c998;
    --changed: #d9b3ff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: radial-gradient(ellipse at 80% 0%, #37204d50, transparent 48%), var(--background); color: var(--text); font-family: Inter, "Segoe UI", system-ui, sans-serif; font-size: 14px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 34px; letter-spacing: -.035em; line-height: 1.15; margin-bottom: 14px; }
h2 { font-size: 19px; letter-spacing: -.02em; margin-bottom: 16px; }
h3 { font-size: 16px; margin-bottom: 10px; }
p { color: var(--muted); }
img { max-width: 100%; object-fit: cover; }
small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 8px; }
code { padding: 3px 6px; border: 1px solid #51416860; border-radius: 5px; background: #30254070; color: #d4baf6; font: .88em ui-monospace, Consolas, monospace; }
.skip-link { position: absolute; top: -100px; left: 20px; padding: 12px; background: var(--surface); z-index: 10; }
.skip-link:focus { top: 10px; }
.topbar { border-bottom: 1px solid #ffffff0c; background: #100e17c9; }
.nav-shell { max-width: 1240px; margin: auto; padding: 20px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 750; letter-spacing: -.02em; white-space: nowrap; }
.brand img, .hero-brand img, .login-logo { border-radius: 50%; }
.topbar nav { display: flex; align-items: center; gap: 28px; font-size: 13px; color: #c0b7cd; }
.topbar nav form { margin: 0; }
.user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); border-left: 1px solid var(--line); padding-left: 24px; }
main { max-width: 1240px; margin: auto; padding: 48px 32px 72px; min-height: calc(100vh - 174px); }
footer { max-width: 1176px; margin: auto; padding: 26px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: #8f859f; font-size: 12px; gap: 20px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 42px; padding: 11px 21px; border: 1px solid #b38ae979; border-radius: 8px; background: linear-gradient(135deg, #925cdf, #7441bf); box-shadow: 0 2px 8px #0002; color: #fff; font-size: 13px; font-weight: 650; line-height: 1.4; transition: background .15s, border-color .15s; }
.button:hover { background: #9764dd; border-color: #cba6ff; color: #fff; }
.button.secondary { background: #ffffff05; box-shadow: none; color: #d5ccdf; border-color: #4c425e; }
.button.secondary:hover { background: #30263e; border-color: #79628f; }
.button.danger { color: #f0b9c2; background: #432332; border-color: #724252; box-shadow: none; }
.button.small { min-height: 36px; padding: 8px 14px; font-size: 12px; }
.text-button { background: none; border: 0; color: var(--muted); padding: 0; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 24px 0 16px; }
.actions form { margin: 0; }
.eyebrow, .feature-label { color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow { margin-bottom: 10px; }
.quiet { font-size: 12px; color: var(--muted); margin: 16px 0 0; }
.hero { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 48px; padding: 24px 0 64px; }
.hero-brand { display: flex; align-items: center; gap: 17px; margin-bottom: 28px; }
.hero-brand img { box-shadow: 0 0 40px #9c43e62b; }
.hero h1 { font-size: clamp(40px, 4.5vw, 60px); font-weight: 760; letter-spacing: -.055em; line-height: 1.08; margin-bottom: 24px; }
.hero h1 span { color: #c6a2f3; }
.hero .lead { font-size: 17px; line-height: 1.75; max-width: 440px; margin-bottom: 28px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; border-top: 1px solid var(--line); padding: 32px 0 0; }
.feature-grid h2 { font-size: 18px; margin: 12px 0 10px; }
.feature-grid p { font-size: 13px; margin-bottom: 16px; max-width: 330px; }
.bot-preview { min-width: 0; border: 1px solid #34363f; border-radius: 14px; background: #202126; color: #f2f3f5; box-shadow: 0 20px 60px #0003; overflow: hidden; }
.bot-preview a { color: #73bdfa; }
.bot-preview a:hover { color: #73bdfa; text-decoration: underline; }
.bot-preview :focus-visible { outline-color: #73bdfa; }
.bot-preview code { color: #dbdee1; background: #1e1f22; border: 0; border-radius: 3px; padding: 2px 4px; font-size: .9em; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; padding: 22px 22px 18px; gap: 16px; }
.preview-heading h2 { font-size: 17px; color: #f2f3f5; margin: 0; }
.sample-label { border: 1px solid #404249; color: #bfc1cb; border-radius: 5px; font-size: 10px; padding: 3px 7px; }
.preview-tabs { display: flex; gap: 4px; margin: 0 18px 18px; padding: 4px; background: #17181c; border: 1px solid #32343d; border-radius: 8px; }
.preview-tabs button { flex: 1; border: 0; background: transparent; color: #b5bac1; padding: 9px 6px; font-size: 12px; font-weight: 600; border-radius: 5px; }
.preview-tabs button[aria-selected=true] { background: #3b3d48; color: #fff; box-shadow: 0 2px 4px #0002; }
.preview-tabs button:hover { color: #fff; background: #30323a; }
.preview-panel { background: #313338; }
.preview-channel { display: flex; align-items: center; justify-content: space-between; padding: 11px 20px; background: #2b2d31; border-top: 1px solid #404249; border-bottom: 1px solid #222429; color: #e1e2e6; font-size: 12px; gap: 12px; }
.preview-channel > span:last-child { color: #b2b6c1; font-size: 9px; letter-spacing: .1em; }
.channel-hash { font-size: 20px; color: #969ba6; margin-right: 6px; vertical-align: middle; }
.preview-body { padding: 20px 18px; }
.preview-command { display: flex; align-items: center; gap: 9px; font-size: 11px; color: #b5bac1; margin-bottom: 18px; }
.preview-command code { color: #c9cdfb; background: #5865f226; }
.message-author { display: flex; align-items: center; gap: 7px; font-size: 12px; margin-bottom: 8px; }
.message-author img { border-radius: 50%; margin-right: 3px; }
.message-author strong { color: #f2f3f5; font-weight: 650; }
.app-badge { font-size: 8px; color: #fff; background: #5865f2; border-radius: 3px; padding: 1px 4px; font-weight: 650; }
.timestamp { color: #b0b2bb; font-size: 9px; font-weight: 400; white-space: nowrap; }
.message-card { background: #383a40; border: 1px solid #45474e; border-left: 4px solid #5865f2; border-radius: 8px; padding: 15px; margin-left: 46px; color: #dbdee1; overflow-wrap: anywhere; }
.character-header { display: grid; grid-template-columns: minmax(0, 1fr) 106px; align-items: start; gap: 14px; margin-bottom: 12px; }
.character-card h3 { font-size: 20px; font-weight: 700; line-height: 1.4; margin: 0 0 12px; }
.character-thumbnail { display: block; border-radius: 4px; overflow: hidden; }
.character-thumbnail img { display: block; width: 106px; height: 106px; object-fit: cover; object-position: top; border-radius: 4px; }
.character-details { margin: 0; font-size: 14px; line-height: 1.55; }
.character-details div { display: flex; gap: 4px; flex-wrap: wrap; }
.character-details dt { font-weight: 750; color: #f2f3f5; }
.character-details dd { margin: 0; color: #dbdee1; overflow-wrap: anywhere; }
.bot-preview .character-colors { margin: 13px 0 0; font-size: 11px; line-height: 1.65; color: #b5bac1; }
.preview-caption { font-size: 11px; color: #b0b3be; background: #202126; margin: 0; padding: 14px 20px; border-top: 1px solid #404249; }
.chat-message { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 22px; font-size: 13px; }
.chat-author { display: flex; align-items: center; gap: 12px; color: #f2f3f5; }
.chat-message p { color: #dbdee1; margin: 4px 0 0; }
.relay-card { margin-bottom: 8px; padding: 11px 13px; border-left-color: #99ff00; }
.relay-card p { color: #e6e7eb; font-size: 12px; line-height: 1.65; margin: 0; }
.guild-tag { color: #99ff00; font-weight: 700; margin-right: 4px; }
.game-chat { border: 1px solid #35443c; border-radius: 7px; background: #182824; margin-top: 20px; padding: 14px; }
.game-chat .feature-label { color: #b4c4b7; font-size: 9px; }
.game-chat p { color: #a5f316; font: 11px/1.8 ui-monospace, Consolas, monospace; margin: 7px 0 0; overflow-wrap: anywhere; }
.log-card { background: #2b2d31; border: 0; border-left: 4px solid #57f287; border-radius: 4px; margin-bottom: 12px; }
.log-card h3 { font-size: 14px; margin: 0 0 9px; color: #f2f3f5; }
.log-card .character-details, .log-card p { font-size: 12px; color: #dbdee1; }
.log-card h4 { color: #f2f3f5; font-size: 12px; margin: 14px 0 4px; }
.log-card p { margin-bottom: 0; }
.error-log { border-left-color: #ed4245; }
.embed-timestamp { font-size: 10px; color: #b5bac1; margin-top: 12px; }
.preview-subtabs { flex-wrap: wrap; background: transparent; border: 0; padding: 0; gap: 6px; margin: 0 18px 16px; }
.preview-subtabs button { flex: 0 1 auto; font-size: 11px; padding: 6px 12px; border: 1px solid #464950; border-radius: 20px; }
.preview-subtabs button[aria-selected=true] { background: #3b3d48; border-color: #90959f; color: #fff; box-shadow: none; }
.preview-fallback-heading { padding: 16px 20px 0; font-size: 15px; color: #f2f3f5; }
.preview-enhanced .preview-fallback-heading { display: none; }
.preview-user-avatar { display: block; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.preview-command .preview-user-avatar { width: 24px; height: 24px; }
.zone-relay { border-left-color: #dc143c; }
.zone-relay .guild-tag, .zone-game p { color: #ff849a; }
.global-relay { border-left-color: #00b2ff; }
.global-relay .guild-tag { color: #68cbff; }
.alliance-relay { border-left-color: #ff8e00; }
.alliance-relay .guild-tag, .alliance-game p { color: #ffc06b; }
.guild-card { border-left-color: #a67a2d; background: #2b2d31; border-radius: 5px; }
.guild-card h3 { color: #f2f3f5; font-size: 14px; margin-bottom: 12px; }
.guild-card p, .preview-roster-row { color: #dbdee1; font-size: 12px; line-height: 1.8; }
.guild-card p:last-child { margin-bottom: 0; }
.guild-card h4 { color: #f2f3f5; font-size: 12px; margin: 15px 0 5px; }
.preview-select { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; background: #1e1f22; border: 1px solid #464950; border-radius: 4px; color: #dbdee1; font-size: 12px; }
.preview-display-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.preview-display-actions > span { padding: 6px 10px; border-radius: 4px; background: #4e5058; color: #fff; font-size: 11px; }
.preview-display-actions > .is-success { background: #248046; }
.preview-display-actions > .is-primary { background: #5865f2; }
.preview-channel-mention { padding: 1px 3px; border-radius: 3px; background: #5865f24d; color: #c9cdfb; }
.logout-log { border-left-color: #a67a2d; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-heading p { margin-bottom: 0; }
.page-heading .eyebrow { margin-bottom: 8px; }
.count { font-size: 13px; background: #30263f; border: 1px solid #4d3a63; padding: 4px 9px; border-radius: 7px; margin-left: 14px; vertical-align: middle; color: #c8acf1; }
.server-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.server-card { padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; transition: border-color .15s, background .15s; }
.server-card:hover { color: var(--text); background: #211a2d; border-color: #80619f; }
.server-card-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.guild-icon { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; }
.guild-icon.initial { display: flex; align-items: center; justify-content: center; background: #3e2c54; color: #dabdff; font-size: 22px; }
.server-card h3 { margin-bottom: 5px; overflow-wrap: anywhere; }
.server-card p { font-size: 13px; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 24px; gap: 12px; font-size: 11px; color: var(--muted); }
.card-bottom span:last-child { color: var(--accent); font-size: 18px; }
.center-card, .empty-state { max-width: 560px; margin: 50px auto; padding: 40px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.center-card h1 { font-size: 29px; }
.center-card .button { margin-top: 8px; }
.login-logo { margin-bottom: 24px; }
.empty-state { text-align: center; }
.back-link { display: inline-block; font-size: 12px; color: var(--muted); margin-bottom: 24px; }
.guild-heading { display: flex; align-items: center; gap: 16px; min-width: 0; }
.guild-heading h1 { font-size: 30px; margin-bottom: 0; overflow-wrap: anywhere; }
.workspace { display: grid; grid-template-columns: 185px minmax(0, 1fr); gap: 36px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; align-self: start; position: sticky; top: 24px; }
.side-nav a { padding: 10px 14px; border-radius: 7px; color: #b4a8c3; font-size: 12px; }
.side-nav a:hover, .side-nav a[aria-current=true] { background: #32233f; color: #e4cfff; }
.access-label { font-size: 10px; color: var(--green); border-top: 1px solid var(--line); padding: 20px 14px 0; margin-top: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 24px; padding: 28px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-heading h2, .section-heading .quiet { margin: 0; }
.account-name { font-size: 27px; font-weight: 650; letter-spacing: -.025em; color: #e3d5f6; margin-bottom: 16px; overflow-wrap: anywhere; }
.section-note { font-size: 12px; margin: -8px 0 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 12px; font-weight: 600; color: #d5cbdf; margin-bottom: 9px; }
input:not([type=checkbox]):not([type=hidden]), select { width: 100%; min-height: 44px; padding: 10px 13px; color: #e5dded; background: #110e19; border: 1px solid #45394f; border-radius: 7px; font-size: 13px; }
input::placeholder { color: #81718f; }
input:focus, select:focus { border-color: #a57ace; }
select { text-overflow: ellipsis; }
.save-status { color: #94879f; font-size: 11px; }
form[data-dirty=true] .save-status { color: #d9b3ff; }
.inline-form { display: flex; align-items: center; gap: 12px; }
.inline-form input { flex: 1; min-width: 0; }
.inline-form .button { flex-shrink: 0; }
.notice { padding: 15px 18px; background: #332b21; color: #e7c998; border: 1px solid #6b5538; border-radius: 8px; font-size: 12px; margin: 0 0 24px; }
.notice.success { background: #1d2e27; border-color: #365746; color: #b3dcc5; }
.notice.error { background: #35212a; border-color: #704051; color: #edb6c3; }
.notice.compact { padding: 12px 15px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); margin: 0; }
.toggle-row:last-of-type { border-bottom: 0; }
.toggle-row strong { font-size: 13px; }
.toggle-row small { margin-top: 4px; }
.toggle-row input[type=checkbox] { appearance: none; width: 42px; height: 24px; background: #3d3548; border: 1px solid #61526e; border-radius: 20px; position: relative; flex-shrink: 0; cursor: pointer; margin: 0; }
.toggle-row input[type=checkbox]::before { content: ""; position: absolute; width: 16px; height: 16px; top: 3px; left: 3px; background: #b9aec7; border-radius: 50%; transition: transform .15s; }
.toggle-row input[type=checkbox]:checked { background: #8050be; border-color: #b28bdc; }
.toggle-row input[type=checkbox]:checked::before { transform: translateX(18px); background: #f4eaff; }
.alliance-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding: 14px 0; margin-bottom: 18px; font-size: 13px; }
.alliance-row small { margin: 2px 0 0; }
@media (max-width: 1000px) {
    .hero { gap: 32px; }
    .hero h1 { font-size: 45px; }
    .hero .lead { font-size: 15px; }
    .timestamp { display: none; }
    .workspace { grid-template-columns: 155px minmax(0, 1fr); gap: 24px; }
    .server-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    footer { margin: 0 32px; }
}
@media (max-width: 760px) {
    .nav-shell { padding: 16px 20px; flex-wrap: wrap; gap: 16px; }
    .topbar nav { gap: 18px; flex-wrap: wrap; }
    .user-name { display: none; }
    main { padding: 32px 20px 48px; }
    .hero { grid-template-columns: 1fr; gap: 32px; padding: 0 0 40px; }
    .hero h1 { font-size: clamp(40px, 8vw, 56px); }
    .hero-brand { margin-bottom: 22px; }
    .hero-brand img { width: 52px; height: 52px; }
    .hero .lead { max-width: 540px; font-size: 16px; }
    .bot-preview { width: 100%; max-width: 580px; }
    .feature-grid { gap: 24px; grid-template-columns: 1fr; }
    .feature-grid article { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
    .feature-grid article:last-child { border-bottom: 0; padding-bottom: 0; }
    .feature-grid p { max-width: 100%; }
    .workspace { display: block; }
    .side-nav { position: static; flex-direction: row; overflow-x: auto; margin: 0 0 24px; padding-bottom: 8px; }
    .side-nav a { white-space: nowrap; padding: 8px 12px; }
    .access-label { display: none; }
    .panel { padding: 24px; }
    .guild-heading h1 { font-size: 25px; }
    .page-heading { align-items: flex-start; gap: 14px; }
    .page-heading > .button { flex-shrink: 0; }
    .server-grid { grid-template-columns: 1fr; }
    footer { margin: 0 20px; }
}
@media (max-width: 480px) {
    .brand { font-size: 16px; }
    .brand img { width: 36px; height: 36px; }
    .topbar nav { width: 100%; justify-content: space-between; }
    .preview-heading, .preview-body { padding: 18px 16px; }
    .preview-tabs { margin-left: 12px; margin-right: 12px; }
    .preview-tabs button { padding: 9px 4px; font-size: 10px; }
    .preview-channel { padding: 12px 16px; }
    .message-card { margin-left: 0; }
    .character-header { grid-template-columns: minmax(0, 1fr) 90px; gap: 10px; }
    .character-thumbnail img { width: 90px; height: 100px; }
    .character-details { font-size: 13px; }
    .form-grid { grid-template-columns: 1fr; gap: 20px; }
    .inline-form { align-items: stretch; flex-direction: column; }
    .panel { padding: 20px 16px; }
    .guild-heading .guild-icon { display: none; }
    .center-card, .empty-state { padding: 28px 22px; margin: 20px auto; }
    .hero .actions .button { padding: 11px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before { transition: none !important; }
}

.legacy-description { max-width: 440px; font-size: 14px; line-height: 1.8; }
.new-bot-note { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 22px; max-width: 440px; }
.new-bot-note h2 { font-size: 17px; margin-bottom: 8px; }
.new-bot-note p { font-size: 13px; line-height: 1.8; margin-bottom: 12px; }
.new-bot-note a { color: #d4baf6; font-size: 12px; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.login-policy-links { margin: 24px 0 0; font-size: 12px; }
.login-policy-links a, .policy-page a { color: #c9acf0; text-decoration: underline; text-underline-offset: 3px; }
.policy-page { max-width: 780px; margin: 0 auto; }
.policy-page h1 { margin-bottom: 12px; }
.policy-page h2 { margin: 32px 0 12px; font-size: 20px; }
.policy-page p, .policy-page li { color: #c4bdcf; line-height: 1.85; font-size: 14px; }
.policy-page ul { padding-left: 23px; }
.policy-page li { margin: 10px 0; }
.policy-page strong { color: #eeeaf5; }
.policy-page .policy-date { color: var(--muted); font-size: 12px; margin-bottom: 28px; }
@media (max-width: 650px) { footer { flex-direction: column; gap: 16px; } footer nav { gap: 16px; } }

.settings-savebar { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: min(760px, calc(100% - 32px)); z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #211b2b); box-shadow: 0 8px 36px #0009; }
.save-actions { display: flex; gap: 10px; flex-shrink: 0; }
.settings-savebar .save-status { font-size: 13px; }
body.has-unsaved-settings { padding-bottom: 110px; }
@media (max-width: 480px) {
    .settings-savebar { bottom: 12px; padding: 12px; gap: 8px; }
    .settings-savebar .button { padding: 10px 12px; }
    .settings-savebar .save-status { font-size: 12px; }
}

.server-search { margin-bottom: 24px; max-width: 580px; }
.server-search .quiet { margin: 8px 0 0; }


.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.text-link { color: #d4baf6; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--accent); }
.topbar nav a[aria-current=page] { color: var(--text); }
.status-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #51445e; border-radius: 20px; padding: 3px 11px 3px 9px; font-size: 11px; font-weight: 600; color: #beb2cd; background: #2b2336; white-space: nowrap; }
.status-pill .status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-pill.positive { border-color: #345748; background: #1c3029; color: var(--green); }
.status-pill.pending { border-color: #6b5538; background: #332b21; color: var(--warning); }
.status-pill.pending .status-dot { animation: pulse 1.4s ease-in-out infinite; }
.status-pill.small { font-size: 10px; padding: 2px 9px 2px 7px; }
@keyframes pulse { 50% { opacity: .35; } }


.server-search input { max-width: 420px; }
.server-group + .server-group { margin-top: 44px; }
.group-heading { display: flex; align-items: center; gap: 2px; margin-bottom: 18px; }
.group-heading h2 { margin: 0; }
.group-heading .count { font-size: 11px; padding: 1px 8px; margin-left: 10px; }
.server-card { display: block; }
.server-card h3 { font-size: 17px; }
.server-card p { margin-bottom: 0; overflow-wrap: anywhere; }
.card-bottom .approved { color: var(--green); }
.card-arrow { color: var(--accent); font-size: 18px; transition: transform .15s; }
.server-card:hover .card-arrow { transform: translateX(3px); }
.server-grid.compact { gap: 14px; }
.invite-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: transparent; border-style: dashed; }
.invite-card .guild-icon { width: 40px; height: 40px; border-radius: 10px; font-size: 18px; }
.invite-card .invite-text { flex: 1; min-width: 0; }
.invite-card h3 { font-size: 14px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invite-card .invite-text span { font-size: 11px; color: var(--muted); }
.invite-card:hover { border-style: solid; }
.invite-card:hover .card-arrow { transform: translate(2px, -2px); }
.invite-card[aria-disabled=true] { opacity: .55; pointer-events: none; }
.empty-inline { padding: 20px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 13px; text-align: center; margin: 0; }


.side-nav a { transition: background .15s, color .15s; }
.side-nav a[aria-current=true] { box-shadow: inset 2px 0 0 var(--accent); }
.locked-panel h2 { margin-top: 18px; }
.locked-panel p { max-width: 560px; }
.account-summary { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.account-summary .account-name { margin-bottom: 0; }
.field-caption { display: block; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.meta-list { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; font-size: 12px; }
.meta-list dt { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.meta-list dd { margin: 2px 0 0; color: var(--text); font-weight: 600; }
.checklist { border: 1px solid #4d3a63; border-radius: 10px; background: #1f1a29; padding: 16px 18px; margin: 0 0 8px; }
.checklist-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.checklist-heading h3 { font-size: 13px; margin: 0; }
.checklist-heading .quiet { margin: 0; }
.checklist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.checklist li { display: flex; align-items: center; gap: 10px; }
.checklist .check-mark { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; flex-shrink: 0; background: #2b2336; color: var(--muted); }
.checklist .done { color: var(--muted); }
.checklist .done .check-mark { background: #1c3029; color: var(--green); }
.checklist .todo .check-mark { background: #3a2b47; color: var(--accent); }
.checklist a { color: #e3d5f6; text-decoration: underline; text-decoration-color: #7d6597; text-underline-offset: 3px; }
.checklist a:hover { color: var(--accent); }
.optional-tag { margin-left: 8px; font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.register-form h3 { margin-bottom: 4px; }
.register-form .section-note { margin: 0 0 20px; }
.register-form .actions .quiet { margin: 0; }
.password-field { position: relative; }
.password-field input { padding-right: 64px; }
.password-field .text-button { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 600; }
.danger-zone { border: 1px solid #4a2c38; border-radius: 10px; margin-top: 8px; font-size: 12px; }
.danger-zone summary { padding: 12px 16px; color: #d6a2b0; font-weight: 600; }
.danger-zone[open] summary { border-bottom: 1px solid #4a2c38; }
.danger-zone form { padding: 16px; }
.danger-zone form p { font-size: 12px; margin-bottom: 14px; }
.danger-zone label strong { color: var(--text); }
.field { position: relative; }
.field label { transition: color .15s; }
.field.is-changed > label::after, .toggle-row.is-changed strong::after { content: "Edited"; margin-left: 8px; padding: 1px 6px; border-radius: 4px; background: #3a2b47; color: var(--changed); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; vertical-align: 1px; }
.field.is-changed select, .field.is-changed input:not([type=checkbox]) { border-color: #8a63b8; }
optgroup { color: var(--muted); font-style: normal; }
option { color: var(--text); }
option:disabled { color: #6f6580; }
.save-text { display: flex; flex-direction: column; min-width: 0; }
.save-warning { color: var(--warning); font-size: 11px; }
.alliance-list { list-style: none; margin: 0 0 22px; padding: 0; }
.alliance-row { margin-bottom: 0; }
.alliance-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-width: 0; }
.alliance-name strong { overflow-wrap: anywhere; }
.alliance-add { border-top: 1px solid var(--line); padding-top: 20px; }
#alliances .empty-inline { margin-bottom: 22px; }
.alliance-add .inline-form { max-width: 520px; }
.notice[data-flash] { animation: flash-in .25s ease-out; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-4px); } }
@media (max-width: 1000px) {
    .server-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .server-grid.compact { grid-template-columns: 1fr; }
    .side-nav a[aria-current=true] { box-shadow: inset 0 -2px 0 var(--accent); }
    .account-summary { align-items: flex-start; }
}
@media (max-width: 480px) {
    .settings-savebar { flex-wrap: wrap; }
    .save-actions { width: 100%; }
    .save-actions .button { flex: 1; }
    .checklist { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .status-pill.pending .status-dot, .notice[data-flash] { animation: none; }
    .card-arrow { transition: none; }
}


.alliance-actions { display: flex; gap: 8px; flex-shrink: 0; }
.alliance-actions form { margin: 0; }
.status-changed { font-size: 12px; color: var(--warning); margin: -8px 0 16px; }
.user-name { display: inline-flex; align-items: center; gap: 8px; max-width: 190px; }
.user-name img { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; }
.user-name span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) {
    .alliance-row { flex-wrap: wrap; }
    .alliance-actions { width: 100%; }
    .alliance-actions form, .alliance-actions .button { flex: 1; }
}
