* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--background-tertiary); color: var(--text-primary); font: 14px var(--font-main); }
a { color: inherit; text-decoration: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px max(24px, calc((100vw - 1100px)/2)); border-bottom: 1px solid var(--background-accent); background: var(--background-secondary); }
.brand { display: flex; align-items: center; gap: 9px; color: var(--header-primary); font-size: 20px; font-weight: 800; }
.brand img { width: 30px; height: 30px; }
nav { display: flex; gap: 18px; color: var(--text-secondary); }
nav a:hover { color: var(--header-primary); }
main { max-width: 1100px; padding: 42px 24px 80px; margin: auto; }
.intro { max-width: 670px; margin-bottom: 26px; }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
h1 { margin: 4px 0 10px; color: var(--header-primary); font-size: clamp(30px, 5vw, 42px); }
h2 { margin: 0 0 18px; color: var(--header-primary); font-size: 19px; }
p { line-height: 1.6; } .intro p:not(.eyebrow), .muted, .hint { color: var(--text-muted); }
.layout { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.card { min-width: 0; padding: 22px; border: 1px solid var(--background-accent); border-radius: 14px; background: var(--background-primary); }
form, label { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 9px; } form { gap: 16px; } label { color: var(--text-secondary); font-weight: 700; }
input, textarea, select { width: 100%; min-width: 0; max-width: 100%; padding: 10px 12px; border: 1px solid var(--background-accent); border-radius: 8px; outline: none; background: var(--background-tertiary); color: var(--text-primary); font: inherit; }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url('/resources/ChevronBottom.svg'); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px 14px; cursor: pointer; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); }
button { min-height: 36px; padding: 8px 13px; border: 0; border-radius: 8px; background: var(--brand); color: var(--on-blurple); font: inherit; font-weight: 800; cursor: pointer; }
button:hover { background: var(--brand-hover); } button:disabled { opacity: .55; cursor: default; }
button.secondary { background: var(--background-accent); color: var(--header-primary); }
button.danger { background: #a92d38; color: white; }
.hint { margin: 15px 0 0; font-size: 12px; }
.bot { padding: 18px 0; border-top: 1px solid var(--background-accent); }
.bot:first-child { padding-top: 0; border-top: 0; }
.bot-head { display: flex; align-items: center; gap: 12px; }
.bot-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; overflow: hidden; border-radius: 8px; background: var(--background-accent); font-size: 20px; }
.bot-icon img { width: 100%; height: 100%; object-fit: cover; }
.bot-banner { display: block; width: 100%; height: 120px; margin-bottom: 14px; border-radius: 8px; object-fit: cover; }
.bot-name { font-weight: 800; color: var(--header-primary); }
.bot-meta { color: var(--text-muted); font-size: 12px; }
.bot p { margin: 11px 0; color: var(--text-secondary); white-space: break-spaces; }
.bot-actions, .install-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bot-actions button { font-size: 12px; }
.bot-editor { display: grid; gap: 12px; margin-top: 15px; }
.bot-editor[hidden] { display: none; }
.bot-appearance { display: grid; gap: 12px; min-width: 0; padding-top: 14px; border-top: 1px solid var(--background-accent); }
.bot-appearance h3 { margin: 0; font-size: 15px; color: var(--header-primary); }
.bot-appearance input[type="color"] { height: 38px; padding: 3px; cursor: pointer; }
.bot-appearance input[type="file"] { overflow: hidden; }
.checkbox { display: flex; align-items: center; gap: 8px; font-weight: 500; }.checkbox input { width: auto; }
.install-row input, .install-row select { flex: 1 1 150px; width: auto; }
.installed-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.installed-list button { background: var(--background-accent); font-size: 12px; }
.installed-label { display: inline-flex; align-items: center; min-height: 36px; padding: 8px 13px; border-radius: 8px; background: var(--background-accent); color: var(--text-secondary); font-size: 12px; }
.token-panel { margin-top: 20px; border-color: var(--brand); }
.public-install { margin-top: 20px; }
.token-panel[hidden] { display: none; }.token-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.token-row code { display: block; flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 12px; border-radius: 7px; background: var(--background-tertiary); }
#notice { min-height: 24px; color: var(--text-secondary); } #notice.error { color: #f66; }
@media (max-width: 720px) { .layout { grid-template-columns: 1fr; } .topbar { flex-wrap: wrap; } main { padding-top: 26px; } }

/* Developer pages share the public site's navigation and brand colors. */
.navbar { background: var(--background); border-color: var(--border); }
.navbar .nav-container { width: 100%; }
.navbar .nav-links { display: flex; flex-wrap: wrap; gap: clamp(12px, 3vw, 32px); }
.navbar .nav-link { font-size: 14px; }
.navbar .nav-link:focus-visible, .navbar .logo-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 5px; border-radius: 4px; }

body { background: radial-gradient(ellipse 80% 420px at 50% 0, rgba(14, 110, 226, .16), transparent), var(--background-tertiary); }
main { max-width: 1200px; }
.intro { max-width: 760px; margin-bottom: 32px; }
.intro .eyebrow { color: var(--primary-light); }
.intro h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -.035em; }
.intro p:not(.eyebrow) { font-size: 15px; }
.layout { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 22px; }
.card { border-color: var(--border); border-radius: 18px; background: var(--background-primary); box-shadow: 0 12px 36px rgba(0, 0, 0, .13); }
.card h2 { letter-spacing: -.02em; }
.public-install { margin-top: 0; margin-bottom: 22px; }
.public-install h2 { margin-bottom: 6px; }
.public-install .install-row { margin-top: 16px; }
.list-card { padding: 22px; }
.list-card > h2 { margin-bottom: 16px; }
.bot { margin-top: 14px; padding: 18px; border: 1px solid var(--background-accent); border-radius: 14px; background: var(--background-secondary); }
.bot:first-child { padding-top: 18px; border: 1px solid var(--background-accent); }
.bot-banner { height: 150px; border-radius: 10px; }
.bot-icon { width: 48px; height: 48px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; }
.bot-name { font-size: 15px; }
.bot-meta { margin-top: 3px; line-height: 1.5; }
.bot p { margin: 13px 0; line-height: 1.5; }
.bot-editor { padding-top: 18px; border-top: 1px solid var(--background-accent); }
.bot-appearance { padding-top: 18px; }
.bot-appearance input[type="file"] { padding: 8px; }
.bot-appearance input[type="file"]::file-selector-button { margin-right: 12px; padding: 7px 10px; border: 1px solid var(--background-accent); border-radius: 7px; background: var(--background-primary); color: var(--text-primary); cursor: pointer; }
.bot-color-field { position: relative; display: grid; gap: 8px; }
.bot-color-label { color: var(--text-secondary); font-weight: 700; }
.bot-color-trigger { display: flex; align-items: center; width: 100%; gap: 12px; padding: 7px 10px; border: 1px solid var(--border); background: var(--background-tertiary); color: var(--text-primary); text-align: left; }
.bot-color-trigger:hover:not(:disabled) { background: var(--background-accent); box-shadow: none; }
.bot-color-swatch { width: 28px; height: 28px; flex: none; border: 1px solid rgba(255, 255, 255, .25); border-radius: 7px; }
.bot-color-value { font-family: var(--font-code); font-size: 13px; }
.bot-color-native { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.bot-color-popover { position: fixed; z-index: 12000; width: 220px; max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--background-secondary); box-shadow: 0 12px 32px rgba(0, 0, 0, .4); }
.bot-color-popover[hidden] { display: none; }
.bot-color-popover-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; color: var(--header-primary); }
.bot-color-popover-head button { min-height: 28px; padding: 0 8px; font-size: 20px; line-height: 1; }
.bot-color-wheel { display: flex; justify-content: center; min-height: 188px; }
.bot-color-popover label { margin-top: 12px; font-size: 12px; }
input, textarea, select { min-height: 42px; border-color: var(--border); border-radius: 10px; transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 110, 226, .2); }
input[type="checkbox"] { min-height: auto; accent-color: var(--primary); }
button { border-radius: 10px; background: var(--gradient); transition: transform .2s, box-shadow .2s, background .2s; }
button:hover:not(:disabled) { background: var(--gradient-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(14, 110, 226, .18); }
button:active:not(:disabled) { transform: translateY(0); }
button:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 3px; }
button.secondary, .installed-list button { background: var(--surface-light); }
button.secondary:hover:not(:disabled), .installed-list button:hover:not(:disabled) { background: var(--background-accent); box-shadow: none; }
button.danger { background: var(--gradient-danger); }
button.danger:hover:not(:disabled) { background: var(--gradient-danger-hover); box-shadow: 0 8px 20px rgba(237, 66, 69, .18); }
.token-panel { border-color: var(--primary); }
#notice:not(:empty) { padding: 10px 14px; border: 1px solid var(--background-accent); border-radius: 10px; background: var(--background-secondary); }
#notice.error { border-color: var(--danger); }

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .navbar .nav-container { gap: 14px; }
}
@media (max-width: 520px) {
  main { padding: 28px 16px 60px; }
  .navbar .nav-container { flex-wrap: wrap; padding: 0 16px; }
  .navbar .nav-links { width: 100%; justify-content: space-between; }
  .card { padding: 18px; }
  .bot { padding: 14px; }
  .bot:first-child { padding-top: 14px; }
}

#confirmation-modal-overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, .7); }
#confirmation-modal-overlay .modal-content { width: min(100%, 440px); padding: 24px; border: 1px solid var(--border); border-radius: 18px; background: var(--background-primary); box-shadow: 0 24px 64px rgba(0, 0, 0, .4); }
#confirmation-modal-overlay .modal-title { margin: 0; color: var(--header-primary); font-size: 21px; }
#confirmation-modal-overlay .modal-description { margin: 16px 0 22px; color: var(--text-secondary); white-space: pre-wrap; }
#confirmation-modal-overlay .modal-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
#confirmation-modal-overlay .modal-button { min-width: 100px; }
