/* Gofa Bots, dark warm UI */
:root {
  --canvas: #131312;
  --card: #1b1b19;
  --card2: #222220;
  --border: #2a2a27;
  --stone: #3b3b37;
  --dim: #a09e96;
  --text: #ecebe5;
  --ink: #ffffff;
  --danger: #e5534b;
  --ok: #4cc38a;
  --hero-gradient: linear-gradient(90deg, rgba(19,19,18,0) 0%, rgba(19,19,18,0) 20%, rgb(130,188,255) 34%, rgb(36,131,255) 42%, rgb(255,102,244) 50%, rgb(255,48,41) 58%, rgb(254,123,2) 66%, rgba(19,19,18,0) 80%, rgba(19,19,18,0) 100%);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow-float: rgba(0,0,0,0.35) 0px 20px 40px -10px, rgba(0,0,0,0.3) 0px 8px 16px -8px;
  --r-card: 20px;
  --r-container: 14px;
  --r-input: 8px;
  --max: 1200px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--canvas); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.5; letter-spacing: -0.02em;
  font-feature-settings: "liga" 0; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 480; color: var(--text); }
h1 { font-size: 44px; line-height: 1.1; letter-spacing: -1.1px; }
h2 { font-size: 32px; line-height: 1.15; letter-spacing: -0.8px; }
h3 { font-size: 19px; line-height: 1.3; letter-spacing: -0.4px; }
h4 { font-size: 16px; line-height: 1.4; letter-spacing: -0.3px; }
.muted { color: var(--dim); }
.small { font-size: 14px; letter-spacing: -0.2px; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.w480 { font-weight: 480; }
[hidden] { display: none !important; }
svg.i { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- living background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg span { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .22; mix-blend-mode: screen; will-change: transform; }
.bg .b1 { width: 55vw; height: 55vw; left: -18vw; top: -22vw; background: #2483ff; animation: drift-a 42s ease-in-out infinite alternate; }
.bg .b2 { width: 48vw; height: 48vw; right: -14vw; top: 10vh; background: #ff66f4; animation: drift-b 54s ease-in-out infinite alternate; }
.bg .b3 { width: 46vw; height: 46vw; left: 20vw; bottom: -26vw; background: #fe7b02; animation: drift-c 48s ease-in-out infinite alternate; }
.bg .b4 { width: 34vw; height: 34vw; right: 18vw; bottom: -12vw; background: #82bcff; animation: drift-d 36s ease-in-out infinite alternate; }
@keyframes drift-a { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(28vw, 22vh) scale(1.15); } 100% { transform: translate(8vw, 48vh) scale(.95); } }
@keyframes drift-b { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-30vw, 30vh) scale(1.2); } 100% { transform: translate(-10vw, -8vh) scale(1.05); } }
@keyframes drift-c { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(24vw, -30vh) scale(1.1); } 100% { transform: translate(-16vw, -10vh) scale(1.25); } }
@keyframes drift-d { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-26vw, -36vh) scale(1.3); } 100% { transform: translate(10vw, -18vh) scale(.9); } }
.bg-soft .bg span { opacity: .07; }
.no-bg .bg { display: none; }
@media (prefers-reduced-motion: reduce) { .bg span { animation: none; } }
.nav, .footer { position: relative; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; height: 60px; background: rgba(19,19,18,0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav .container { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 480; font-size: 16px; }
.brand svg { width: 22px; height: 22px; }
.nav-links { display: flex; gap: 18px; margin-left: 8px; }
.nav-links a { font-size: 15px; color: var(--dim); transition: color .15s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.userchip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--border); border-radius: 9999px; font-size: 14px; }
.userchip img { width: 24px; height: 24px; border-radius: 50%; }
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: 9999px; border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.lang-btn:hover { border-color: var(--stone); }
.flag { width: 18px; height: 13px; border-radius: 2px; overflow: hidden; display: inline-block; flex: none; }
.flag svg { width: 100%; height: 100%; display: block; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 150px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: var(--shadow-float); z-index: 60; }
.lang-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.lang-menu a:hover { background: var(--card2); }
.lang-menu a.on { color: var(--dim); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9999px; padding: 8px 16px; font: inherit; font-size: 15px; font-weight: 450; letter-spacing: -0.2px; line-height: 1.2; cursor: pointer; border: 1px solid transparent; white-space: nowrap; transition: color .15s ease, background-color .15s ease, border-color .15s ease, opacity .15s ease; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--text); color: var(--canvas); }
.btn-primary:hover { background: var(--ink); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--stone); background: rgba(255,255,255,0.03); }
.btn-frosted { background: rgba(255,255,255,0.1); color: var(--text); backdrop-filter: blur(6px); }
.btn-frosted:hover { background: rgba(255,255,255,0.16); }
.btn-ghost { background: transparent; color: var(--dim); padding: 6px 10px; }
.btn-ghost:hover { color: var(--text); }
.btn-danger-text { background: transparent; color: var(--danger); }
.btn-danger-text:hover { background: rgba(229,83,75,0.08); }
.btn-lg { padding: 12px 22px; font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 14px; }
.btn[disabled], .btn.is-busy { opacity: .5; cursor: default; pointer-events: none; }
.btn-icon { width: 30px; height: 30px; padding: 0; border-radius: 9999px; background: transparent; border: 1px solid var(--border); color: var(--dim); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font: inherit; }
.btn-icon:hover { color: var(--text); border-color: var(--stone); }
.btn-icon[disabled] { opacity: .35; cursor: default; }
.btn-icon svg { width: 14px; height: 14px; }

/* ---------- surfaces ---------- */
.card { background: rgba(27,27,25,0.82); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: var(--r-card); padding: 24px; }
.card-tight { padding: 16px; border-radius: var(--r-container); }
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 9999px; border: 1px solid var(--border); font-size: 13px; color: var(--dim); background: transparent; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; min-height: calc(100vh - 60px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 0 96px; }
.hero-glow { position: absolute; left: -10%; right: -10%; top: 50%; height: 320px; transform: translateY(-20%); pointer-events: none; background: var(--hero-gradient); filter: blur(90px); opacity: .5; animation: hero-enter 1.4s cubic-bezier(.4,0,.2,1) both; }
@keyframes hero-enter { from { opacity: 0; transform: translateY(10%) scaleX(.7); } to { opacity: .5; transform: translateY(-20%) scaleX(1); } }
.hero-inner { position: relative; max-width: 820px; margin: 0 auto; padding: 0 24px; }
.hero h1 { font-size: 64px; line-height: 1; letter-spacing: -2px; color: var(--ink); }
.hero p { margin: 22px auto 0; max-width: 640px; font-size: 18px; line-height: 1.45; letter-spacing: -0.3px; color: var(--dim); }
.hero-actions { margin-top: 32px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-strip { position: relative; margin: 56px auto 0; max-width: 620px; background: rgba(27,27,25,0.85); border: 1px solid var(--border); border-radius: 20px; padding: 16px 18px; box-shadow: var(--shadow-float); text-align: left; display: flex; align-items: center; gap: 16px; backdrop-filter: blur(8px); }
.hero-strip .logo { width: 48px; height: 48px; flex: none; border-radius: 14px; object-fit: cover; }
.hero-strip .t { font-weight: 480; }
.scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--dim); font-size: 13px; }
.scroll-hint svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: bounce 1.6s ease-in-out infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(6px); opacity: 1; } }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-head p { margin-top: 8px; color: var(--dim); max-width: 640px; }
.features-2col { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.feature-steps { display: flex; flex-direction: column; gap: 36px; }
.feature-steps h2 { font-size: 28px; letter-spacing: -0.7px; }
.feature-steps p { margin-top: 8px; color: var(--dim); }
.footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 64px; color: var(--dim); font-size: 14px; }
.footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a:hover { color: var(--text); }

/* ---------- grids / cards ---------- */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.bot-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.bot-card .head { display: flex; align-items: center; gap: 14px; }
.bot-card .logo { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; flex: none; background: var(--card2); }
.bot-card .head .grow { flex: 1; min-width: 0; }
.bot-card .actions { display: flex; gap: 8px; align-items: center; }
.bot-card .actions .expand { margin-left: auto; }
.bot-card .expand svg { transition: transform .2s ease; }
.bot-card.open .expand svg { transform: rotate(180deg); }
.bot-card .more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.bot-card.open .more { grid-template-rows: 1fr; }
.bot-card .more > div { overflow: hidden; }
.bot-card .more-inner { padding-top: 4px; display: flex; flex-direction: column; gap: 12px; }
.bot-card ul { margin: 0; padding-left: 18px; color: var(--dim); font-size: 14px; display: grid; gap: 4px; }
.bot-card .cmds { display: flex; flex-wrap: wrap; gap: 6px; }
.guild-card { background: rgba(27,27,25,0.82); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.guild-banner { height: 110px; background: var(--card2); position: relative; overflow: hidden; }
.guild-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.guild-banner img.blur { transform: scale(1.6); filter: blur(22px) saturate(1.1); opacity: .9; }
.guild-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19,19,18,0) 40%, rgba(27,27,25,0.9) 100%); }
.guild-body { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.guild-avatar { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 18px; margin-top: -32px; border: 3px solid var(--card); background: var(--card2); display: flex; align-items: center; justify-content: center; font-weight: 480; font-size: 20px; overflow: hidden; }
.guild-avatar img { width: 100%; height: 100%; object-fit: cover; }
.guild-name { font-weight: 480; font-size: 17px; letter-spacing: -0.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.page-head { display: flex; align-items: center; gap: 16px; margin: 40px 0 28px; flex-wrap: wrap; }
.page-head .avatar { width: 48px; height: 48px; border-radius: 14px; overflow: hidden; background: var(--card2); display: flex; align-items: center; justify-content: center; font-weight: 480; object-fit: cover; }
.page-head .avatar img { width: 100%; height: 100%; object-fit: cover; }
.page-head .grow { flex: 1; min-width: 200px; }
.page-head h1 { font-size: 30px; letter-spacing: -0.7px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--dim); margin-top: 32px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--text); }
.bot-row { display: flex; align-items: center; gap: 16px; padding: 18px; }
.bot-row .logo { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex: none; }
.bot-row .grow { flex: 1; min-width: 0; }
a.card:hover { border-color: var(--stone); }

/* ---------- flash / toast ---------- */
.flash { max-width: var(--max); margin: 16px auto 0; padding: 0 24px; }
.flash div { border: 1px solid var(--border); background: var(--card); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.flash .err { border-color: rgba(229,83,75,.4); color: var(--danger); }
.toast-wrap { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--text); color: var(--canvas); padding: 10px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-float); max-width: 380px; animation: toast-in .2s ease; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 14px; color: var(--text); font-weight: 480; letter-spacing: -0.2px; }
.field .hint, .hint { font-size: 13px; color: var(--dim); }
.input, select.input, textarea.input { width: 100%; font: inherit; font-size: 15px; letter-spacing: -0.2px; color: var(--text); background: rgba(19,19,18,0.7); border: 1px solid var(--border); border-radius: var(--r-input); padding: 9px 11px; outline: none; transition: border-color .15s ease; }
.input:focus { border-color: var(--stone); }
.input::placeholder { color: var(--dim); opacity: .7; }
textarea.input { min-height: 100px; resize: vertical; }
select.input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a09e96' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
select.input option, select.input optgroup { background: var(--card); color: var(--text); }
.row { display: grid; gap: 16px; }
.row-2 { grid-template-columns: 1fr 1fr; }
.row-3 { grid-template-columns: 1fr 1fr 1fr; }
.inline { display: flex; align-items: center; gap: 8px; }
.color-field { display: flex; align-items: center; gap: 8px; }
.color-field input[type=color] { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: var(--canvas); cursor: pointer; }
.color-field .input { width: 110px; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 9999px; background: var(--stone); cursor: pointer; transition: background .15s ease; flex: none; border: none; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.segment { display: inline-flex; border: 1px solid var(--border); border-radius: 9999px; padding: 3px; background: var(--canvas); }
.segment button, .segment a { font: inherit; font-size: 14px; letter-spacing: -0.2px; border: none; background: transparent; padding: 6px 14px; border-radius: 9999px; cursor: pointer; color: var(--dim); transition: all .15s ease; }
.segment button.on, .segment a.on { background: var(--text); color: var(--canvas); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 9999px; background: var(--canvas); }
.stepper button { font: inherit; border: none; background: transparent; width: 34px; height: 34px; cursor: pointer; color: var(--dim); font-size: 18px; }
.stepper button:hover { color: var(--text); }
.stepper span { min-width: 28px; text-align: center; font-weight: 480; }
.swatches { display: flex; gap: 8px; }
.swatch { width: 34px; height: 34px; border-radius: 9999px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--card) inset; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 10px; border-radius: 9999px; border: 1px solid var(--border); background: var(--canvas); font-size: 13px; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip button { border: none; background: transparent; cursor: pointer; color: var(--dim); font-size: 14px; line-height: 1; padding: 0 2px; }
.chip button:hover { color: var(--danger); }
.picker { position: relative; }
.picker-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 100%; max-height: 260px; overflow: auto; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-float); padding: 6px; }
.picker-menu .opt { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.picker-menu .opt:hover { background: var(--card2); }
.picker-menu .opt.on { color: var(--dim); }
.picker-menu .search { margin-bottom: 6px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.emoji-grid button { border: none; background: transparent; border-radius: 8px; padding: 4px; cursor: pointer; }
.emoji-grid button:hover { background: var(--card2); }
.emoji-grid img { width: 28px; height: 28px; }
.sub-list { display: flex; flex-direction: column; gap: 10px; }
.sub-item { border: 1px solid var(--border); border-radius: var(--r-container); background: var(--card2); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.sub-item-head { display: flex; align-items: center; gap: 8px; }
.sub-item-head .t { font-weight: 480; flex: 1; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-item-head .s { color: var(--dim); font-size: 13px; font-weight: 400; }
.sub-item-head .tools { display: flex; gap: 4px; }
.acc { padding: 0; overflow: hidden; }
.acc > .acc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; user-select: none; }
.acc > .acc-head .t { font-weight: 480; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc > .acc-head .s { color: var(--dim); font-size: 13px; }
.acc > .acc-head .chev svg { transition: transform .2s ease; }
.acc.open > .acc-head .chev svg { transform: rotate(180deg); }
.acc > .acc-body { display: none; padding: 4px 14px 14px; border-top: 1px solid var(--border); flex-direction: column; gap: 12px; }
.acc.open > .acc-body { display: flex; }
.acc .acc-body { padding-top: 14px; }
.empty { color: var(--dim); font-size: 14px; padding: 12px; border: 1px dashed var(--border); border-radius: 12px; text-align: center; }

/* ---------- bot pages ---------- */
.bot-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; align-items: start; margin-bottom: 64px; }
.list-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.list-head h3 { font-size: 24px; letter-spacing: -0.6px; }
.rows { display: flex; flex-direction: column; }
.row-item { display: flex; align-items: center; gap: 16px; padding: 18px 12px; margin: 0 -12px; border-radius: 14px; border-bottom: 1px solid var(--border); transition: background-color .15s ease; }
.row-item:hover { background: rgba(255,255,255,0.035); }
.row-item .grow { flex: 1; min-width: 0; }
.row-item .t { font-weight: 480; font-size: 17px; letter-spacing: -0.3px; }
.row-item .d { color: var(--dim); font-size: 14px; margin-top: 2px; }

/* ---------- editor layout ---------- */
.editor { display: grid; grid-template-columns: 230px minmax(0, 1fr) 380px; gap: 40px; align-items: start; margin-bottom: 120px; }
.side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; }
.side a { display: block; padding: 8px 12px; border-radius: 10px; font-size: 15px; color: var(--dim); transition: color .15s ease, background-color .15s ease; }
.side a:hover { color: var(--text); }
.side a.on { color: var(--text); background: rgba(255,255,255,0.06); }
.side a.danger { color: var(--danger); }
.side-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: 18px 12px 6px; }
.page h3 { font-size: 24px; letter-spacing: -0.6px; }
.page .desc { color: var(--dim); font-size: 15px; margin: 6px 0 26px; max-width: 600px; line-height: 1.5; }
.page.danger h3 { color: var(--danger); }
.page .stack { display: flex; flex-direction: column; gap: 20px; }
.page .group { border-top: 1px solid var(--border); padding-top: 20px; }
.how { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: how; display: flex; flex-direction: column; gap: 14px; max-width: 600px; }
.how li { position: relative; padding-left: 40px; color: var(--dim); font-size: 15px; line-height: 1.5; counter-increment: how; }
.how li::before { content: counter(how); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text); }
.todo { display: flex; flex-direction: column; margin-top: 8px; max-width: 600px; }
.todo-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.todo-row .grow { flex: 1; }
.todo-row .mark { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--stone); display: flex; align-items: center; justify-content: center; flex: none; }
.todo-row.ok .mark { background: var(--ok); border-color: var(--ok); color: var(--canvas); }
.todo-row.ok .mark svg { width: 13px; height: 13px; stroke-width: 2.4; }
.todo-row.ok .grow { color: var(--dim); }
.preview-col { position: sticky; top: 76px; }
.savebar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; border-top: 1px solid var(--border); background: rgba(19,19,18,0.9); backdrop-filter: blur(8px); }
.savebar .container { display: flex; align-items: center; gap: 12px; height: 64px; }
.savebar .status { color: var(--dim); font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.savebar .status.dirty { color: var(--text); }

/* ---------- discord preview ---------- */
.dc { background: #313338; color: #dbdee1; border-radius: 12px; padding: 16px; font-family: "gg sans", "Noto Sans", var(--font); letter-spacing: 0; font-size: 15px; line-height: 1.375; }
.dc-msg { display: flex; gap: 14px; }
.dc-av { width: 40px; height: 40px; border-radius: 50%; background: #5865f2; flex: none; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.dc-av img { width: 100%; height: 100%; object-fit: cover; }
.dc-body { min-width: 0; flex: 1; }
.dc-head { display: flex; align-items: baseline; gap: 6px; }
.dc-name { color: #f2f3f5; font-weight: 500; }
.dc-tag { background: #5865f2; color: #fff; font-size: 10px; font-weight: 600; padding: 1px 4px; border-radius: 3px; vertical-align: middle; }
.dc-time { color: #949ba4; font-size: 12px; }
.dc-text { color: #dbdee1; word-wrap: break-word; white-space: pre-wrap; }
.dc-embed { margin-top: 6px; display: grid; grid-template-columns: 1fr auto; background: #2b2d31; border-left: 4px solid #5865f2; border-radius: 4px; padding: 10px 16px 12px 12px; max-width: 520px; gap: 0 16px; }
.dc-embed .e-title { color: #f2f3f5; font-weight: 600; margin-top: 2px; }
.dc-embed .e-desc { color: #dbdee1; font-size: 14px; margin-top: 6px; white-space: pre-wrap; word-wrap: break-word; }
.dc-embed .e-fields { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
.dc-embed .e-field .n { font-weight: 600; font-size: 14px; color: #f2f3f5; }
.dc-embed .e-field .v { font-size: 14px; white-space: pre-wrap; }
.dc-embed .e-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; margin-top: 8px; grid-row: 1 / span 3; grid-column: 2; }
.dc-embed .e-image { max-width: 100%; border-radius: 4px; margin-top: 12px; grid-column: 1 / -1; }
.dc-embed .e-footer { font-size: 12px; color: #949ba4; margin-top: 8px; grid-column: 1 / -1; }
.dc-embed .e-left { grid-column: 1; min-width: 0; }
.dc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dc-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 2px 16px; border-radius: 3px; font-size: 14px; font-weight: 500; color: #fff; cursor: default; }
.dc-btn img, .dc-btn .em { width: 18px; height: 18px; font-size: 16px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.dc-btn.primary { background: #5865f2; } .dc-btn.secondary { background: #4e5058; } .dc-btn.success { background: #248046; } .dc-btn.danger { background: #da373c; }
.dc-select { margin-top: 8px; max-width: 400px; background: #1e1f22; border: 1px solid #111214; border-radius: 4px; padding: 8px 10px; color: #949ba4; display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.dc-select-opts { max-width: 400px; background: #2b2d31; border: 1px solid #1e1f22; border-radius: 4px; margin-top: 4px; overflow: hidden; }
.dc-select-opts .o { display: flex; gap: 10px; align-items: center; padding: 8px 12px; font-size: 14px; }
.dc-select-opts .o:hover { background: #35373c; }
.dc-select-opts .o .em { width: 20px; text-align: center; }
.dc-select-opts .o .l { color: #f2f3f5; font-weight: 500; }
.dc-select-opts .o .d { color: #949ba4; font-size: 12px; }
.dc-select-opts img { width: 20px; height: 20px; }
.dc-mention { background: rgba(88,101,242,.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }
.preview-tabs { margin-bottom: 12px; }
.preview-note { font-size: 13px; color: var(--dim); margin-top: 10px; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 480; color: var(--dim); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,0.02); }
.table .u { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.table .u img { width: 24px; height: 24px; border-radius: 50%; }
.table-wrap { overflow-x: auto; }
.status { display: inline-flex; align-items: center; font-size: 13px; }
.status.deleted { color: var(--danger); }

/* ---------- transcript ---------- */
.transcript { background: #313338; border: 1px solid var(--border); border-radius: 16px; padding: 16px 0; color: #dbdee1; font-family: "gg sans", "Noto Sans", var(--font); letter-spacing: 0; font-size: 15px; line-height: 1.375; max-height: 78vh; overflow: auto; }
.t-msg { display: flex; gap: 14px; padding: 2px 16px; margin-top: 16px; }
.t-msg.grouped { margin-top: 0; }
.t-msg.grouped .t-av { visibility: hidden; height: 0; }
.t-msg:hover { background: #2e3035; }
.t-av { width: 40px; height: 40px; border-radius: 50%; flex: none; overflow: hidden; }
.t-av img { width: 100%; height: 100%; object-fit: cover; }
.t-body { min-width: 0; flex: 1; }
.t-head { display: flex; align-items: baseline; gap: 6px; }
.t-name { color: #f2f3f5; font-weight: 500; }
.t-time { color: #949ba4; font-size: 12px; }
.t-content { word-wrap: break-word; overflow-wrap: anywhere; }
.t-content a { color: #00a8fc; }
.t-content a:hover { text-decoration: underline; }
.t-code { background: #2b2d31; border: 1px solid #1e1f22; border-radius: 4px; padding: 8px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; white-space: pre-wrap; margin: 4px 0; }
.t-inline { background: #2b2d31; border-radius: 3px; padding: 1px 4px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.t-mention { background: rgba(88,101,242,.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }
.t-emoji { width: 22px; height: 22px; vertical-align: -5px; }
.t-quote { border-left: 4px solid #4e5058; padding-left: 8px; display: inline-block; }
.t-spoiler { background: #202225; color: #202225; border-radius: 3px; } .t-spoiler:hover { color: #dbdee1; }
.t-att { margin-top: 6px; }
.t-att img { max-width: 400px; max-height: 300px; border-radius: 4px; display: block; }
.t-att video { max-width: 400px; border-radius: 4px; }
.t-file { display: inline-flex; align-items: center; gap: 8px; background: #2b2d31; border: 1px solid #1e1f22; border-radius: 4px; padding: 8px 12px; color: #00a8fc; font-size: 14px; }
.t-file svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.t-file:hover { text-decoration: underline; }
.t-embed { margin-top: 6px; background: #2b2d31; border-left: 4px solid #5865f2; border-radius: 4px; padding: 10px 16px 12px 12px; max-width: 520px; font-size: 14px; }
.t-embed .n { font-weight: 600; color: #f2f3f5; margin-top: 6px; }
.t-embed .et { font-weight: 600; color: #f2f3f5; }
.t-embed .ef { font-size: 12px; color: #949ba4; margin-top: 8px; }
.t-embed img.ei { max-width: 100%; border-radius: 4px; margin-top: 8px; }
.t-reply { font-size: 13px; color: #949ba4; margin-bottom: 2px; }
.ticket-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.ticket-meta .k { font-size: 12px; color: var(--dim); }
.ticket-meta .v { font-size: 14px; font-weight: 480; }
.answers { display: grid; gap: 8px; }
.answers .a { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.answers .a .k { font-size: 12px; color: var(--dim); }
.answers .a .v { white-space: pre-wrap; font-size: 14px; }

/* ---------- legal ---------- */
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; margin: 40px 0 64px; }
.legal-nav { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 2px; }
.legal-nav a { padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--dim); }
.legal-nav a.on, .legal-nav a:hover { color: var(--text); background: var(--card); }
.legal-body { max-width: 760px; }
.legal-body h1 { margin-bottom: 8px; }
.legal-body h2 { font-size: 20px; letter-spacing: -0.4px; margin: 32px 0 10px; }
.legal-body p, .legal-body li { color: var(--dim); font-size: 15px; line-height: 1.6; }
.legal-body p + p { margin-top: 10px; }
.legal-body ul { padding-left: 20px; margin: 8px 0; }
.legal-body strong { color: var(--text); font-weight: 480; }
.legal-body .meta { font-size: 13px; color: var(--dim); margin-bottom: 24px; }
.legal-body a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- misc ---------- */
.kbd { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--card2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; letter-spacing: 0; }
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 140px; }
.stat .n { font-size: 30px; font-weight: 480; letter-spacing: -0.8px; line-height: 1.1; }
.stat .l { color: var(--dim); font-size: 14px; }
.warn { border: 1px solid rgba(229,83,75,.4); background: rgba(229,83,75,.06); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.warn a { text-decoration: underline; text-underline-offset: 3px; }
.error-page { text-align: center; padding: 120px 0; }
.error-page .code { font-size: 60px; font-weight: 480; letter-spacing: -1.5px; line-height: 1; }
.error-page p { margin-top: 12px; color: var(--dim); }

@media (max-width: 1100px) {
  .editor { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; }
  .side { position: static; grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .side-group { display: none; }
}
@media (max-width: 900px) {
  .editor { grid-template-columns: 1fr; }
  .bot-layout { grid-template-columns: 1fr; gap: 20px; }
  .bot-layout .side { position: static; flex-direction: row; flex-wrap: wrap; }
  .preview-col { position: static; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .features-2col { grid-template-columns: 1fr; }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .grid-3, .grid-2, .row-2, .row-3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; letter-spacing: -1px; }
  .nav-links { display: none; }
  h1 { font-size: 34px; letter-spacing: -0.8px; }
  .container { padding: 0 16px; }
  .savebar .status { display: none; }
}
