@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("../fonts/inter-tight.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {

  --bg: oklch(0.158 0.014 255);
  --bg-2: oklch(0.185 0.015 255);
  --surface: oklch(0.200 0.016 255);
  --surface-2: oklch(0.242 0.018 255);
  --border: oklch(0.340 0.022 255);
  --border-2: oklch(0.420 0.026 255);
  --text: oklch(0.970 0.004 240);
  --muted: oklch(0.735 0.014 245);
  --accent: oklch(0.790 0.125 196);
  --accent-2: oklch(0.860 0.110 196);
  --accent-ink: oklch(0.185 0.035 230);
  --ok: oklch(0.770 0.145 158);
  --warn: oklch(0.820 0.130 85);
  --danger: oklch(0.680 0.170 27);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 16px 40px -12px rgba(3, 8, 22, .62);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: "Inter Tight", "Geist", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", "Geist", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, "Cascadia Code", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(900px 500px at 85% -15%, oklch(0.790 0.125 196 / .07), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
}

html::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: clamp(1.7rem, 1rem + 2.4vw, 2.6rem); letter-spacing: -.02em; margin: 0 0 .3em; }
h2 { font-size: 1.25rem; letter-spacing: -.01em; margin: 0 0 .2em; }
h1, h2, h3, .brand { font-family: var(--font-display); }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem 1.4rem;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 15, 20, .8);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent-2); }
.topnav { display: flex; align-items: center; gap: 1rem; }
.topnav a { color: var(--muted); font-weight: 500; }
.topnav a:hover { color: var(--text); text-decoration: none; }
.nav-admin { color: var(--accent-2) !important; }
.user-chip { display: flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 600; }
.user-chip img { width: 26px; height: 26px; border-radius: 50%; }
.logout-form { display: inline; margin: 0; }

.content { flex: 1; width: min(1040px, 92vw); margin: 2.2rem auto; }
.footer { text-align: center; color: var(--muted); padding: 2rem; font-size: .85rem; }
.page-head { margin-bottom: 1.6rem; }

.btn-primary, .btn-ghost, .btn-discord {
  display: inline-flex; align-items: center; gap: .5rem;
  border-radius: var(--radius-sm); font-weight: 600; cursor: pointer;
  border: 1px solid transparent; padding: .6rem 1.1rem; font-size: .95rem;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, #fff); text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn-sm { padding: .4rem .8rem; font-size: .85rem; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent-2); text-decoration: none; }
.btn-discord { background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: .85rem 1.5rem; font-size: 1.05rem; }
.btn-discord:hover { background: var(--accent-2); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.dc-logo { font-size: 1.2rem; }

.btn-primary:active, .btn-ghost:active, .btn-discord:active { transform: translateY(0) scale(.975); }
.bento-tile:active, .ov-card:active, .fcard:active, .guild-card:active { transform: scale(.99); }

.hero { position: relative; padding: 3rem 0 2rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; color: var(--accent-2); font-weight: 700; margin: 0 0 .6rem; }
.hero .lead { color: var(--muted); font-size: 1.12rem; max-width: 46ch; margin: 1rem 0 2rem; }
.lead { font-size: 1.05rem; }
.hero-glow { position: absolute; inset: auto auto 0 40%; width: 420px; height: 420px; background: radial-gradient(circle, rgba(123, 134, 255, .18), transparent 70%); filter: blur(20px); z-index: -1; }
.feature-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-top: 2rem; }
.fcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; transition: transform .2s var(--ease), border-color .2s; }
.fcard:hover { transform: translateY(-3px); border-color: var(--accent); }
.fcard span { font-size: 1.6rem; }
.fcard h3 { margin: .5rem 0 .2rem; font-size: 1rem; }
.fcard p { color: var(--muted); font-size: .88rem; margin: 0; }

.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.guild-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; display: flex; align-items: center; gap: 1rem; transition: transform .2s var(--ease), border-color .2s; }
.guild-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.guild-card.is-disabled { opacity: .55; }
.guild-ico { width: 52px; height: 52px; border-radius: 14px; overflow: hidden; flex: 0 0 auto; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; color: var(--accent-2); }
.guild-ico img { width: 100%; height: 100%; object-fit: cover; }
.guild-ico.big { width: 68px; height: 68px; border-radius: 18px; }
.guild-body { flex: 1; min-width: 0; }
.guild-body h3 { margin: 0 0 .35rem; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-head { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.8rem; }

.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: .18rem .55rem; border-radius: 999px; margin-right: .3rem; }
.tag-ok { background: rgba(59, 165, 93, .16); color: #57e08a; }
.tag-off { background: rgba(237, 66, 69, .14); color: #ff7b7d; }
.tag-owner { background: rgba(31, 143, 255, .16); color: var(--accent-2); }

.notice { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--muted); border-radius: var(--radius-sm); padding: .9rem 1.1rem; margin-bottom: 1.2rem; }
.notice-ok { border-left-color: var(--ok); }
.notice-warn { border-left-color: var(--warn); }
.notice ul { margin: .4rem 0 0; padding-left: 1.2rem; }

.ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; margin-bottom: 1.6rem; }
.ov-card { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; cursor: pointer; text-align: left; transition: transform .15s var(--ease), border-color .15s; font: inherit; color: var(--text); }
.ov-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.ov-ico { font-size: 1.4rem; }
.ov-label { font-weight: 600; font-size: .92rem; }
.ov-status { font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; }
.ov-status.on { background: rgba(59, 165, 93, .16); color: #57e08a; }
.ov-status.off { background: var(--surface-2); color: var(--muted); }
.ov-status.act { background: rgba(31, 143, 255, .16); color: var(--accent-2); }
.guild-head-invite { margin-left: auto; }
.nav-invite { color: var(--accent-2) !important; font-weight: 600; }

.tabs { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tab-nav { display: flex; flex-wrap: wrap; gap: .2rem; padding: .6rem .6rem 0; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.tab-btn { background: transparent; border: none; color: var(--muted); font-weight: 600; font-size: .92rem; padding: .7rem 1rem; cursor: pointer; border-radius: 10px 10px 0 0; border-bottom: 2px solid transparent; transition: color .15s, background .15s; }
.tab-btn:hover { color: var(--text); background: var(--surface); }
.tab-btn.active { color: var(--text); background: var(--surface); border-bottom-color: var(--accent); }
.tab-btn .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-left: .4rem; vertical-align: middle; }
.tab-panel { display: none; padding: 1.6rem; }
.tab-panel.active { display: block; animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.field { margin: 0 0 1.2rem; max-width: 560px; }
.lbl { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.inp { width: 100%; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); padding: .6rem .7rem; font-size: .95rem; font-family: inherit; transition: border-color .15s, box-shadow .15s; }
.inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 143, 255, .25); }
textarea.inp { resize: vertical; }

.bento-tile:focus-visible, .btn-primary:focus-visible, .btn-outline:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.guild-status { display: flex; align-items: center; gap: .35rem; font-size: .85rem; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.gs-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 3px rgba(255,255,255,.04); }
.gs-dot.on { background: #3ba55d; box-shadow: 0 0 8px rgba(59,165,93,.7); }
.gs-dot.off { background: #ed4245; }
.inp-sm { width: 110px; }
.inp-color { width: 64px; height: 40px; padding: 3px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.hint { color: var(--muted); font-size: .8rem; margin: .35rem 0 0; }

.ph-list { display: grid; grid-template-columns: max-content 1fr; gap: .3rem .75rem; margin: .3rem 0 0; align-items: baseline; }
.ph-list dt { margin: 0; }
.ph-list dd { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.ph-list code { font-family: var(--font-mono); font-size: .8rem; color: var(--accent-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: .1rem .4rem; white-space: nowrap; }

@media (max-width: 520px) {
  .ph-list { grid-template-columns: 1fr; gap: .1rem; }
  .ph-list dd { margin: 0 0 .45rem; }
}

.switch { display: inline-flex; align-items: center; gap: .7rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.track { width: 44px; height: 25px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); position: relative; transition: background .2s; flex: 0 0 auto; }
.track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: var(--muted); transition: transform .2s var(--ease), background .2s; }
.switch input:checked + .track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .track::after { transform: translateX(19px); background: #fff; }
.switch-label { font-weight: 600; font-size: .92rem; }

.level-roles { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .7rem; }
.lr-row { display: flex; gap: .6rem; align-items: center; }
.lr-row .inp { flex: 1; }

#ar-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .7rem; }
.ar-row { display: flex; gap: .6rem; align-items: center; }
.ar-row .inp-sm { width: 150px; flex: 0 0 auto; }
.ar-row .inp { flex: 1; }

.role-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem; max-width: 720px; margin-bottom: .6rem; }
.role-check { display: flex; align-items: center; gap: .5rem; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .5rem .7rem; cursor: pointer; font-size: .9rem; }
.role-check:hover { border-color: var(--accent-2); }
.role-check.is-priv { opacity: .5; cursor: not-allowed; }
.role-check input { accent-color: var(--accent); }

.sr-kopf { display: flex; align-items: center; gap: .7rem; margin: 1.8rem 0 0; padding-top: 1.2rem;
  border-top: 1px solid var(--border); max-width: 720px; flex-wrap: wrap; }
.sr-kat { max-width: 720px; margin: .8rem 0; padding: .8rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color .18s var(--ease), background .18s var(--ease); }
.sr-kat--frei { background: var(--bg-2); border-style: dashed; }
.sr-kat.is-ziel { border-color: var(--accent-2); background: var(--surface-2); }
.sr-kat__kopf { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-bottom: .5rem; }
.sr-kat__kopf .inp { flex: 1; min-width: 9rem; }
.sr-kat .inp { margin-bottom: .4rem; }
.sr-emoji { flex: 0 0 3.4rem !important; min-width: 0 !important; text-align: center; }
.sr-num { width: 4.2rem; }
.sr-grenzen { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; font-size: .84rem;
  color: var(--muted); margin-bottom: .5rem; }
.sr-grenzen label { display: inline-flex; align-items: center; gap: .35rem; }
.sr-liste { display: flex; flex-direction: column; gap: .35rem; min-height: 2.2rem; }
.sr-zeile { display: flex; align-items: center; gap: .45rem; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .35rem .5rem;
  font-size: .89rem; }
.sr-zeile:hover { border-color: var(--border-2); }
.sr-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-warn { flex: 0 0 auto; color: var(--warn); cursor: help; }
.sr-move { flex: 0 0 auto; max-width: 11rem; font-size: .82rem; padding: .25rem .4rem; margin: 0 !important; }
.sr-weg { color: var(--danger); }
.sr-leer { margin: .2rem 0; font-style: italic; }
.sr-griff { cursor: grab; color: var(--muted); user-select: none; flex: 0 0 auto; padding: 0 .15rem; }
.sr-griff:active { cursor: grabbing; }

@media (max-width: 560px) {

  .sr-zeile { flex-wrap: wrap; }
  .sr-name { flex: 1 0 60%; }
  .sr-move { max-width: none; flex: 1 0 100%; margin-top: .3rem !important; }
  .sr-griff { display: none; }
}

.ps-zeile { flex-wrap: wrap; }
.ps-zeile .inp { margin-bottom: 0 !important; }
.ps-name { flex: 1 1 9rem; min-width: 0; }
.ps-sel { flex: 0 1 11rem; min-width: 0; font-size: .82rem; padding: .3rem .4rem; }

.role-create { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--border); max-width: 720px; }
.role-create__row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: .4rem 0 .2rem; }
.role-create__row .inp { flex: 1; min-width: 12rem; }
.role-create__opt { display: inline-flex; margin: .5rem 0; }

.eco-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; margin: .4rem 0; max-width: 720px; }
.eco-h { font-family: var(--font-display); font-size: 1.02rem; margin: 1.4rem 0 .3rem; }
.eco-item-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.eco-item-row .inp { flex: 1; }
.eco-del { flex: 0 0 auto; }
.eco-item-row .inp-sm { flex: 0 0 5.5rem; }

.preview-wrap { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--border); max-width: 560px; }
.preview-wrap h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 .7rem; }
.dc-embed { display: flex; background: #2b2d31; border-radius: 6px; border-left: 4px solid var(--accent); overflow: hidden; max-width: 440px; }
.dc-embed .dc-bar { display: none; }
.dc-body { padding: .7rem .9rem; }
.dc-title { font-weight: 700; color: #fff; margin-bottom: .3rem; }
.dc-desc { color: #dbdee1; font-size: .9rem; white-space: pre-wrap; }
.dc-footer { color: #949ba4; font-size: .78rem; margin-top: .5rem; }

.tier { display: inline-block; font-size: .72rem; font-weight: 700; padding: .18rem .55rem; border-radius: 999px; }
.tier-pro { background: rgba(88,101,242,.2); color: var(--accent-2); }
.tier-free { background: var(--surface-2); color: var(--muted); }

.stat-row { display: flex; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.4rem; min-width: 130px; }
.stat-num { display: block; font-size: 1.9rem; font-weight: 600; letter-spacing: -.02em; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.stat-lbl { color: var(--muted); font-size: .85rem; }
.tbl { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.tbl th, .tbl td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl th { background: var(--bg-2); color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl-ico { width: 46px; }
.tbl-ico img { width: 34px; height: 34px; border-radius: 9px; }
.tbl-ico span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); color: var(--accent-2); font-weight: 700; }

.error-box { text-align: center; padding: 4rem 0; }
.error-box h1 { font-size: 4rem; color: var(--accent-2); }

@media (max-width: 640px) {
  .guild-head { flex-direction: column; align-items: flex-start; }

  .tab-nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .tab-btn { flex: 0 0 auto; white-space: nowrap; }
  .tab-panel { padding: 1.1rem; }
  .content { width: 94vw; margin: 1.4rem auto; }
  .ov-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

body::before, body::after {
  content: ""; position: fixed; z-index: -2; border-radius: 50%;
  filter: blur(120px); opacity: .1; pointer-events: none;
}
body::before {
  width: 460px; height: 460px; top: -200px; left: -160px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  animation: orb1 26s ease-in-out infinite;
}
body::after {
  width: 400px; height: 400px; bottom: -200px; right: -160px;
  background: radial-gradient(circle, #8b8ffb, transparent 70%);
  animation: orb2 30s ease-in-out infinite;
}
@keyframes orb1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(90px,70px) scale(1.1); } }
@keyframes orb2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-80px,-60px) scale(1.08); } }

.intro {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  cursor: pointer; text-align: center;
  background:
    radial-gradient(1100px 700px at 50% 42%, rgba(88,101,242,.20), transparent 60%),
    var(--bg);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.intro.hide { opacity: 0; transform: scale(1.08); pointer-events: none; }
.intro-inner { animation: introIn .9s var(--ease) both; padding: 1rem; }
.intro-logo {
  font-size: clamp(3.2rem, 9vw, 7.5rem); font-weight: 800; letter-spacing: -.04em; margin: 0;
  background: linear-gradient(100deg, #7b86ff, #5865f2, #b16bff, #66e0ff, #5865f2);
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 7s linear infinite, breathe 4.5s ease-in-out infinite;
  filter: drop-shadow(0 0 40px rgba(88,101,242,.45));
}
.intro-hint {
  margin: 1.4rem 0 0; color: var(--muted); text-transform: uppercase;
  letter-spacing: .38em; font-size: .78rem; font-weight: 600; animation: hintPulse 2.2s ease-in-out infinite;
}
.intro-hint .chev {
  display: block; width: 20px; height: 20px; margin: 1rem auto 0;
  border-right: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2);
  transform: rotate(45deg); animation: bob 1.8s ease-in-out infinite;
}
@keyframes shimmer { to { background-position: 300% 0; } }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes hintPulse { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes bob { 0%,100% { transform: rotate(45deg) translate(0,0); } 50% { transform: rotate(45deg) translate(3px,3px); } }
@keyframes introIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.intro-tag { margin: .8rem 0 0; color: var(--accent-2); font-size: 1rem; font-weight: 600;
  letter-spacing: .02em; opacity: 0; animation: introIn .8s var(--ease) .25s both; }
.intro-feats { position: absolute; top: 50%; transform: translateY(-50%); display: flex;
  flex-direction: column; gap: .85rem; pointer-events: none; z-index: 1; max-width: 26vw; }
.intro-feats-l { left: clamp(1rem, 5vw, 6rem); align-items: flex-start; }
.intro-feats-r { right: clamp(1rem, 5vw, 6rem); align-items: flex-end; }
.feat-pill { background: rgba(120, 130, 240, .08); border: 1px solid rgba(160, 170, 255, .16);
  color: var(--accent-2); padding: .5rem .95rem; border-radius: 999px; font-size: .85rem;
  font-weight: 600; white-space: nowrap; backdrop-filter: blur(6px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .25); opacity: 0; transform: translateY(12px);
  animation: featIn .6s var(--ease) var(--d, 0s) forwards; }
@keyframes featIn { to { opacity: .92; transform: none; } }
@media (max-width: 950px) { .intro-feats { display: none; } }

.reveal { animation: reveal .7s var(--ease) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.auth-wrap { min-height: calc(100vh - 120px); display: grid; place-items: center; padding: 2rem 0; }
.auth-card {
  width: min(560px, 92vw); text-align: center; padding: 2.6rem 2.2rem;
  background: linear-gradient(180deg, rgba(29,34,48,.75), rgba(23,27,37,.85));
  border: 1px solid var(--border); border-radius: 22px;
  box-shadow: var(--shadow); backdrop-filter: blur(14px);
}
.auth-logo { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .2rem;
  background: linear-gradient(100deg, #7b86ff, #b16bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-card h1 { font-size: clamp(1.7rem, 1rem + 2.4vw, 2.4rem); margin: .3rem 0 .6rem; }
.auth-card .lead { color: var(--muted); max-width: 42ch; margin: 0 auto 1.8rem; }
.auth-card .btn-discord { margin: 0 auto; }

.guild-card, .fcard, .stat, .tabs, .auth-card { position: relative; }
.guild-card {
  background: linear-gradient(180deg, rgba(29,34,48,.7), rgba(23,27,37,.8));
  backdrop-filter: blur(8px);
}
.guild-card::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none;
  background: linear-gradient(120deg, rgba(123,134,255,.12), transparent 40%); opacity: 0; transition: opacity .25s;
}
.guild-card:hover::after { opacity: 1; }
.guild-ico { box-shadow: 0 6px 18px rgba(0,0,0,.35); }

.page-head h1, .hero h1 {
  background: linear-gradient(100deg, #fff, #c9cffb);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.1rem; }
.scard {
  display: flex; flex-direction: column; gap: 1rem; padding: 1.2rem 1.3rem;
  background: linear-gradient(180deg, rgba(23,28,38,.9), rgba(15,19,26,.92));
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .18s var(--ease), border-color .18s, box-shadow .25s;
}
.scard:hover { transform: translateY(-3px); border-color: var(--border-2); box-shadow: var(--shadow); }
.scard-off { opacity: .82; }
.scard-head { display: flex; gap: .85rem; align-items: center; min-width: 0; }
.scard-meta { min-width: 0; flex: 1; }
.scard-meta h3 { margin: 0 0 .45rem; font-size: 1.05rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard-tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.scard-btn { width: 100%; justify-content: center; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .6rem 1.1rem; border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem;
  cursor: pointer; background: transparent; color: var(--accent-2);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  transition: background .2s, border-color .2s, transform .15s var(--ease);
}
.btn-outline:hover { background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }

.bento {
  display: grid; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 112px; gap: .85rem; grid-auto-flow: dense; margin-bottom: 1.8rem;
}
.bt-lg   { grid-column: span 2; grid-row: span 2; }
.bt-wide { grid-column: span 2; }
.bt-tall { grid-row: span 2; }

.bento-tile {
  --tile: #5865f2;
  position: relative; overflow: hidden; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: .35rem; font: inherit; color: var(--text);
  padding: 1rem 1.1rem; border-radius: 18px;
  background:
    radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--tile) 22%, transparent), transparent 55%),
    linear-gradient(180deg, rgba(29,34,48,.85), rgba(20,24,33,.9));
  border: 1px solid var(--border);
  box-shadow: 0 6px 22px rgba(0,0,0,.35);
  transition: transform .18s var(--ease), border-color .18s, box-shadow .25s;
}
.bento-tile::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--tile); opacity: .9;
}
.bento-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tile) 60%, var(--border));
  box-shadow: 0 12px 30px color-mix(in srgb, var(--tile) 22%, rgba(0,0,0,.4));
}
.bt-top { display: flex; align-items: center; justify-content: space-between; }
.bt-ico { font-size: 1.7rem; line-height: 1; filter: drop-shadow(0 2px 8px color-mix(in srgb, var(--tile) 55%, transparent)); }
.bt-lg .bt-ico, .bt-tall .bt-ico { font-size: 2.3rem; }
.bt-label { font-weight: 700; font-size: 1rem; letter-spacing: -.01em; margin-top: auto; }
.bt-lg .bt-label, .bt-wide .bt-label { font-size: 1.15rem; }
.bt-desc { display: none; color: var(--muted); font-size: .82rem; line-height: 1.35; }
.bt-lg .bt-desc, .bt-wide .bt-desc, .bt-tall .bt-desc { display: block; }
.bt-status { font-size: .68rem; font-weight: 800; padding: .16rem .5rem; border-radius: 999px; white-space: nowrap; }
.bt-status.on  { background: rgba(59,165,93,.18);  color: #57e08a; }
.bt-status.off { background: rgba(255,255,255,.06); color: var(--muted); }
.bt-status.act { background: color-mix(in srgb, var(--tile) 22%, transparent); color: var(--tile); }

@media (max-width: 820px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 104px; }
  .bt-lg { grid-column: span 2; grid-row: span 2; }
  .bt-wide { grid-column: span 2; }
  .bt-tall { grid-row: span 1; }
}
@media (max-width: 480px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bt-lg, .bt-wide { grid-column: span 2; }
  .bt-lg { grid-row: span 1; }
}

.toasts { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 1200; display: flex; flex-direction: column; gap: .6rem; }
.toast { padding: .8rem 1.1rem; border-radius: 12px; font-weight: 600; font-size: .9rem; color: #fff;
  background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow);
  border-left: 3px solid var(--muted); animation: toastIn .3s var(--ease) both; max-width: 340px; }
.toast-ok  { border-left-color: var(--ok); }
.toast-err { border-left-color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.center-note { display: grid; place-items: center; min-height: 60vh; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.panel { background: linear-gradient(180deg, rgba(23,28,38,.9), rgba(15,19,26,.92)); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); animation: reveal .35s var(--ease) both; }
.panel h2 { font-size: 1.25rem; margin: 0 0 .2em; }
.ar-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .7rem; }
.bento-tile.bt-current { border-color: var(--tile); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tile) 45%, transparent); }

.feature-groups { display: flex; flex-direction: column; gap: 1.7rem; }
.cat-title {
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-size: 1.02rem; font-weight: 600;
  color: var(--text); letter-spacing: -.01em;
  margin: 0 0 .85rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.cat-ico { font-size: 1.15rem; }

.feature-group .bento { grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); grid-auto-rows: auto; }
.feature-group .bt-lg, .feature-group .bt-wide, .feature-group .bt-tall { grid-column: auto; grid-row: auto; }
.feature-group .bt-desc { display: block; }
.feature-group .bt-lg .bt-label, .feature-group .bt-wide .bt-label { font-size: 1rem; }
.feature-group .bt-lg .bt-ico, .feature-group .bt-tall .bt-ico { font-size: 1.55rem; }

.guild-body { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 2.4rem; align-items: start; margin-top: 1.8rem; }
.dash-sidebar {
  position: sticky; top: 74px; align-self: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.1rem .8rem;
  display: flex; flex-direction: column; gap: 1.6rem;
  max-height: calc(100dvh - 92px); overflow-y: auto;
}
.side-group { display: flex; flex-direction: column; gap: 4px; }
.side-group + .side-group { border-top: 1px solid var(--border); padding-top: 1.3rem; }
.side-cat {
  display: flex; align-items: center; gap: .45rem; width: 100%;
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-display); font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  padding: .32rem .5rem; margin: 0 0 .35rem; border-radius: 8px;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.side-cat:hover { color: var(--text); background: var(--surface-2); }
.side-cat-ico { font-size: .95rem; }
.side-cat-label { flex: 1; text-align: left; }
.side-cat-chevron { font-size: .8rem; color: var(--muted); transition: transform .18s var(--ease); }
.side-cat.collapsed .side-cat-chevron { transform: rotate(-90deg); }
.side-items { display: flex; flex-direction: column; gap: 3px; }

html { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
.dash-sidebar { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: padding-box; }
.side-item {
  display: flex; align-items: center; gap: .65rem; width: 100%;
  padding: .55rem .7rem; border: 0; border-radius: 10px; background: transparent;
  color: var(--muted); font: inherit; font-size: .9rem; text-align: left; cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.side-item:hover { background: var(--surface-2); color: var(--text); }
.side-item.active { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.side-ico { width: 1.4rem; text-align: center; flex: none; font-size: 1.05rem; }
.side-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; margin-left: auto; }
.side-dot.on { background: var(--ok); box-shadow: 0 0 6px color-mix(in srgb, var(--ok) 60%, transparent); }
.side-dot.off { background: var(--border-2); }
.dash-main { min-width: 0; max-width: 1120px; }

.content-wide { max-width: none; width: auto; margin: 1.6rem clamp(1rem, 3vw, 2.75rem); }
@media (max-width: 820px) {
  .guild-body { grid-template-columns: 1fr; gap: 1.4rem; }
  .dash-sidebar { position: static; max-height: none; overflow: visible; }
  .content-wide { margin: 1.4rem clamp(.9rem, 4vw, 1.4rem); }
}

.brand-logo { width: 30px; height: 30px; border-radius: 50%; vertical-align: middle; margin-right: .15rem; box-shadow: 0 0 0 1px var(--border); }
.auth-banner { display: block; width: 100%; max-width: 340px; height: auto; margin: 0 auto 1.3rem; border-radius: 12px; }

.help-perms { margin-top: 1.2rem; border-left: 3px solid var(--accent, #5865f2); }
.help-perms .help-steps { margin: .7rem 0 .5rem; padding-left: 1.35rem; display: flex; flex-direction: column; gap: .5rem; }
.help-perms .help-steps li { line-height: 1.5; }
.help-perms code { background: rgba(255,255,255,.08); padding: .05em .4em; border-radius: 5px; font-size: .92em; }

.cmd-add { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .4rem; }
.cmd-rule { display: flex; gap: .6rem; align-items: center; padding: .5rem .7rem; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,.03); }
.cmd-rule-tgt { flex: 1; font-size: .95rem; min-width: 8rem; }
.cmd-allow { border-left: 3px solid #3ba55d; }
.cmd-deny { border-left: 3px solid #ed4245; }

.feed-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.feed-row .feed-src { flex: 2; min-width: 12rem; }
.feed-row .feed-msg { flex: 1; min-width: 10rem; }

.gn-card { display: flex; flex-direction: column; gap: .5rem; padding: .75rem;
  border: 1px solid var(--border, #2a2f3a); border-radius: 10px; background: rgba(255,255,255,.02); }
.gn-line { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.gn-line .gn-name { flex: 1; min-width: 10rem; }
.gn-schedule .inp-sm { flex: 1; min-width: 7rem; }
.gn-schedule .gn-time { flex: 0 0 5.5rem; min-width: 5rem; text-align: center; }
.gn-schedule .gn-every { flex: 0 0 4.5rem; min-width: 4rem; text-align: center; }
.gn-schedule .gn-every-lbl { align-self: center; color: var(--text-muted, #98a2b3); font-size: .85rem; white-space: nowrap; }
.gn-msg { width: 100%; resize: vertical; font: inherit; }

.dc-fab {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 40;
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .8rem 1.25rem; border-radius: 999px;
  background: #5865f2; color: #fff !important; font-weight: 700; font-size: 1rem;
  box-shadow: 0 10px 26px rgba(88, 101, 242, .45);
  transition: transform .18s var(--ease), box-shadow .2s, background .2s;
}
.dc-fab:hover { background: #4752c4; text-decoration: none; transform: translateY(-2px); box-shadow: 0 14px 34px rgba(88, 101, 242, .62); }
.dc-fab-ico { width: 26px; height: 26px; flex: none; }
.dc-fab-txt { white-space: nowrap; }
.dc-fab-pulse {
  position: absolute; inset: 0; border-radius: 999px; z-index: -1;
  background: #5865f2; animation: dcPulse 2.4s var(--ease) infinite;
}
@keyframes dcPulse {
  0% { transform: scale(1); opacity: .55; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}
@media (max-width: 640px) {
  .dc-fab { padding: .85rem; }
  .dc-fab-txt { display: none; }
}

.auth-community { margin-top: 1.6rem; padding-top: 1.3rem; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.auth-community-lbl { color: var(--muted); font-size: .92rem; }
.btn-discord-alt {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .7rem 1.3rem; border-radius: var(--radius-sm);
  background: #5865f2; color: #fff !important; font-weight: 700; font-size: 1rem;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s;
}
.btn-discord-alt:hover { background: #4752c4; text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(88, 101, 242, .5); }
.btn-discord-alt svg { width: 22px; height: 22px; flex: none; }

.seg { display: inline-flex; gap: .3rem; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .25rem; }
.seg-btn { border: none; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer;
  padding: .45rem .9rem; border-radius: calc(var(--radius-sm) - 3px); font-size: .9rem;
  transition: background .15s, color .15s; }
.seg-btn.on { background: var(--accent); color: var(--accent-ink); }
.seg-btn:hover:not(.on) { color: var(--text); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.em-field { display: grid; grid-template-columns: 200px 1fr auto auto; gap: .5rem; align-items: start;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .5rem; margin-bottom: .5rem; }
.em-field .em-inline { align-self: center; white-space: nowrap; }
@media (max-width: 640px) { .em-field { grid-template-columns: 1fr; } }
.em-editbox { margin-top: 1.5rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.em-edit-row { display: flex; gap: .5rem; }
.em-edit-row .inp { flex: 1; }

.em-card { background: #2b2d31; border: 1px solid #232428; border-radius: 8px;
  padding: 14px 16px; max-width: 520px; margin: .3rem 0 .4rem; }
.em-card-empty { color: var(--muted); font-style: italic; font-size: .9rem; }
.em-card-title { font-weight: 700; font-size: 1.15rem; color: #f2f3f5; line-height: 1.3; margin-bottom: .35rem; }
.em-card-head { font-weight: 700; font-size: 1.05rem; color: #f2f3f5; margin: .6rem 0 .25rem; }
.em-card-body { color: #dbdee1; font-size: .95rem; }
.em-line { line-height: 1.45; }
.em-line.em-bullet { position: relative; padding-left: 1.1em; }
.em-line.em-bullet::before { content: "•"; position: absolute; left: .25em; color: #dbdee1; }
.em-card-sep { border: 0; border-top: 1px solid #3f4147; margin: .7rem 0; }
.em-card-foot { font-size: .78rem; color: #949ba4; margin-top: .35rem; }

.tpl-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; margin: .5rem 0 .2rem;
}
@media (max-width: 560px) { .tpl-grid { grid-template-columns: 1fr; } }
.tpl-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.15rem 1.15rem 1.2rem; cursor: pointer;
  transition: transform .18s var(--ease), border-color .18s, box-shadow .18s, background .18s;
  outline: none;
}
.tpl-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.tpl-card:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.tpl-card.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  box-shadow: 0 10px 30px -14px color-mix(in srgb, var(--accent) 60%, transparent);
}
.tpl-card.tpl-kitty:hover { border-color: color-mix(in srgb, #f48fb1 60%, var(--border)); }
.tpl-card.tpl-kitty.active {
  border-color: #f48fb1;
  background: color-mix(in srgb, #f48fb1 12%, var(--surface));
  box-shadow: 0 10px 30px -14px color-mix(in srgb, #f48fb1 55%, transparent);
}
.tpl-emoji { font-size: 1.8rem; line-height: 1; margin-bottom: .55rem; }
.tpl-name { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; margin-bottom: .3rem; }
.tpl-desc { font-size: .82rem; color: var(--muted); line-height: 1.45; }
.tpl-check {
  position: absolute; top: .8rem; right: .85rem; width: 22px; height: 22px; border-radius: 999px;
  display: grid; place-items: center; font-size: .72rem; font-weight: 800; color: var(--accent-ink);
  background: var(--accent); opacity: 0; transform: scale(.6); transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.tpl-card.tpl-kitty .tpl-check { background: #f48fb1; }
.tpl-card.tpl-ai:hover { border-color: color-mix(in srgb, #a855f7 60%, var(--border)); }
.tpl-card.tpl-ai.active {
  border-color: #a855f7;
  background: color-mix(in srgb, #a855f7 12%, var(--surface));
  box-shadow: 0 10px 30px -14px color-mix(in srgb, #a855f7 55%, transparent);
}
.tpl-card.tpl-ai .tpl-check { background: #a855f7; }
.tpl-card.tpl-ai .tpl-badge { background: color-mix(in srgb, #a855f7 22%, transparent); color: #d8b4fe; }
.tpl-card.active .tpl-check { opacity: 1; transform: scale(1); }
.tpl-badge {
  position: absolute; top: .85rem; left: .9rem; font-size: .64rem; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; padding: .16rem .5rem; border-radius: 999px;
  background: color-mix(in srgb, #f48fb1 22%, transparent); color: #ffc0d6;
}

.tc-section { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.tc-h { font-family: var(--font-display); font-size: 1.02rem; margin: 0 0 .3rem; }
.tc-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem; margin-bottom: .6rem; }
.tc-row-main { display: flex; gap: .5rem; align-items: center; }
.tc-row-adv { display: flex; gap: .5rem; margin-top: .5rem; }
.tc-row-main .inp-sm, .tc-row-adv .inp-sm { flex: 0 0 40%; }
.tc-color { width: 42px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; flex: 0 0 auto; }
.tc-del { flex: 0 0 auto; padding: .35rem .6rem; }
.tc-actions { display: flex; gap: .6rem; align-items: center; margin-top: .4rem; }

.tc-fields { margin-top: .6rem; padding: .6rem .7rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.tc-fields-head { display: flex; flex-direction: column; gap: .15rem; margin-bottom: .5rem; }
.tc-fields-lbl { font-weight: 600; font-size: .9rem; }
.tcf-row { display: flex; gap: .4rem; align-items: center; margin-bottom: .4rem; }
.tcf-num { flex: 0 0 auto; width: 1.4rem; height: 1.4rem; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 50%; }
.tcf-row .inp-sm { flex: 1 1 auto; min-width: 6rem; }
.tcf-type { flex: 0 0 5.5rem; }
.tcf-req { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .55rem; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--muted); font-size: .82rem; font-weight: 600; cursor: pointer; user-select: none; white-space: nowrap; }
.tcf-req.is-on { color: var(--danger); border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.tcf-req input { accent-color: var(--danger); cursor: pointer; }
.tcf-add { margin-top: .2rem; }
.tcf-add:disabled { opacity: .5; cursor: not-allowed; }
.tcf-empty { margin: .3rem 0 .5rem; }
@media (max-width: 560px) { .tc-row-main, .tc-row-adv { flex-wrap: wrap; } .tcf-row { flex-wrap: wrap; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
