:root {
  color-scheme: dark;
  --bg: #07101e;
  --surface: #0d1829;
  --surface-2: #121f33;
  --surface-3: #182942;
  --line: rgba(255, 255, 255, .09);
  --muted: #8ea0b9;
  --text: #edf4ff;
  --cyan: #56d4e8;
  --cyan-soft: rgba(86, 212, 232, .13);
  --green: #76dfab;
  --red: #ff8795;
  --shadow: 0 24px 70px rgba(0, 0, 0, .35);
  font-family: Inter, "Noto Sans JP", "Yu Gothic UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
button, select, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px; overflow: hidden; position: relative; isolation: isolate; background: radial-gradient(circle at 50% 50%, #102847 0, #09182b 29%, var(--bg) 68%); }
.login-shell::before, .login-shell::after { content: ""; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%; }
.login-shell::before { width: min(74vw, 850px); aspect-ratio: 1; border: 1px solid rgba(86, 212, 232, .12); box-shadow: 0 0 0 55px rgba(86, 212, 232, .025), 0 0 0 130px rgba(86, 212, 232, .018); }
.login-shell::after { width: 520px; height: 260px; bottom: -190px; background: rgba(65, 118, 217, .2); filter: blur(70px); }
.login-card { width: min(100%, 470px); position: relative; z-index: 2; text-align: center; }
.login-brand { display: inline-flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 850; letter-spacing: -.03em; }
.login-brand .brand-mark { width: 42px; height: 42px; border-radius: 13px; font-size: 21px; }
.brand-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px; background: linear-gradient(135deg, #65dce9, #4076d9); color: #07101e; font-weight: 900; font-size: 28px; box-shadow: 0 16px 40px rgba(62, 162, 209, .28); }
.brand-mark.small { width: 36px; height: 36px; border-radius: 11px; font-size: 18px; box-shadow: none; }
.eyebrow { margin: 26px 0 9px; color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.login-card h1 { margin: 0; font-size: clamp(34px, 5vw, 55px); line-height: 1.1; letter-spacing: -.055em; }
.discord-button { display: flex; gap: 13px; align-items: center; justify-content: center; width: 100%; min-height: 64px; margin-top: 38px; padding: 0 24px; border-radius: 15px; background: var(--cyan); color: #06131d; text-decoration: none; font-size: 16px; font-weight: 850; box-shadow: 0 18px 45px rgba(86, 212, 232, .22); transition: transform .2s, box-shadow .2s, background .2s; }
.discord-button:hover { transform: translateY(-3px); background: #8ae8f4; box-shadow: 0 24px 54px rgba(86, 212, 232, .32); }
.discord-button:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.permission-note { color: var(--muted); font-size: 11px; margin: 16px 0 0; }
.login-orbit { position: absolute; inset: 0; z-index: -1; pointer-events: none; }.login-orbit i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 20px rgba(86, 212, 232, .9); }.login-orbit i:nth-child(1) { top: 22%; left: 24%; }.login-orbit i:nth-child(2) { right: 21%; bottom: 26%; width: 5px; height: 5px; }.login-orbit i:nth-child(3) { top: 28%; right: 29%; width: 3px; height: 3px; opacity: .6; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; padding: 24px 18px; background: #091426; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 850; letter-spacing: -.02em; margin-bottom: 34px; }
.field-label { color: var(--muted); text-transform: uppercase; font-size: 10px; font-weight: 800; letter-spacing: .15em; margin: 0 8px 9px; }
.guild-select, .input, .select { width: 100%; min-height: 43px; padding: 0 12px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; outline: none; }
.guild-select:focus, .input:focus, .select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(86, 212, 232, .1); }
.textarea { min-height: 108px; padding: 11px 12px; resize: vertical; line-height: 1.55; }
.nav-list { display: grid; gap: 6px; margin-top: 24px; }
.nav-item { border: 0; padding: 11px 12px; display: flex; align-items: center; gap: 11px; border-radius: 9px; background: transparent; color: #a9b7cb; text-align: left; cursor: pointer; }
.nav-item span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: #132238; color: #90a8c5; font-size: 11px; font-weight: 800; }
.nav-item:hover, .nav-item.active { background: var(--cyan-soft); color: #effcff; }.nav-item.active span { color: #07101e; background: var(--cyan); }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--line); padding-top: 18px; }
.user-card { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar, .avatar-fallback { width: 35px; height: 35px; border-radius: 10px; object-fit: cover; background: #1b3554; display: grid; place-items: center; font-weight: 800; }
.user-card strong, .user-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.user-card small { color: var(--muted); margin-top: 2px; }
.text-button { border: 0; background: transparent; color: var(--muted); padding: 12px 0 0; cursor: pointer; font-size: 12px; }.text-button:hover { color: var(--text); }
.workspace { grid-column: 2; min-width: 0; }
.topbar { height: 94px; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; padding: 0 clamp(22px, 4vw, 60px); background: rgba(7, 16, 30, .88); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.topbar .eyebrow { margin: 0 0 4px; }.topbar h1 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.save-state { margin-left: auto; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 8px; }.save-state span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(118, 223, 171, .1); }
.menu-button { display: none; margin-right: 14px; border: 0; background: transparent; color: var(--text); font-size: 22px; }
.content { max-width: 1380px; padding: 38px clamp(22px, 4vw, 60px) 70px; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }.hero h2 { margin: 0 0 8px; font-size: clamp(25px, 3vw, 38px); letter-spacing: -.045em; }.hero p { margin: 0; color: var(--muted); line-height: 1.7; }
.guild-chip { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 10px 14px; display: flex; align-items: center; gap: 10px; white-space: nowrap; }.guild-chip img, .guild-icon-fallback { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; background: var(--surface-3); display: grid; place-items: center; font-weight: 800; }
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(135px, 1fr)); gap: 12px; margin: 24px 0 36px; }.stat-card { padding: 17px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(145deg, var(--surface-2), var(--surface)); }.stat-card small { color: var(--muted); }.stat-card strong { display: block; font-size: 28px; margin-top: 10px; letter-spacing: -.04em; }.stat-card i { color: var(--cyan); font-style: normal; font-size: 11px; float: right; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 34px 0 14px; }.section-heading h2 { margin: 0; font-size: 20px; }.section-heading p { color: var(--muted); margin: 5px 0 0; font-size: 13px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }.settings-grid.single { grid-template-columns: 1fr; }
.setting-card { border: 1px solid var(--line); border-radius: 15px; background: var(--surface); overflow: hidden; }.setting-card-head { display: flex; align-items: flex-start; gap: 13px; padding: 18px; }.setting-icon { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; background: var(--cyan-soft); color: var(--cyan); display: grid; place-items: center; font-weight: 900; }.setting-card h3 { margin: 0; font-size: 15px; }.setting-card .description { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }.count-badge { margin-left: auto; padding: 4px 8px; border-radius: 20px; color: var(--cyan); background: var(--cyan-soft); font-size: 11px; white-space: nowrap; }
.setting-list { border-top: 1px solid var(--line); }.setting-row { min-height: 59px; display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); }.setting-row:last-child { border-bottom: 0; }.setting-row-main { min-width: 0; flex: 1; }.setting-row strong, .setting-row small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.setting-row strong { font-size: 13px; }.setting-row small { margin-top: 4px; color: var(--muted); font-size: 11px; }.row-actions { display: flex; gap: 5px; }.icon-button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }.icon-button:hover { color: var(--text); background: var(--surface-3); }.icon-button.danger:hover { color: var(--red); border-color: rgba(255,135,149,.35); }
.empty-state { padding: 20px 18px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }.add-button, .primary-button, .secondary-button { min-height: 38px; border-radius: 9px; padding: 0 14px; cursor: pointer; font-weight: 750; font-size: 12px; }.add-button, .primary-button { border: 0; background: var(--cyan); color: #07131d; }.secondary-button { border: 1px solid var(--line); color: var(--text); background: transparent; }
.loading-card { min-height: 55vh; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--muted); }.spinner { width: 28px; height: 28px; border: 3px solid #20314b; border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; }@keyframes spin { to { transform: rotate(360deg); } }
.editor-dialog { width: min(560px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }.editor-dialog::backdrop { background: rgba(0, 5, 14, .76); backdrop-filter: blur(6px); }.editor-dialog form { padding: 23px; }.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; }.dialog-head .eyebrow { margin: 0 0 5px; }.dialog-head h2 { margin: 0; font-size: 22px; }.dialog-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }.form-field { display: grid; gap: 7px; }.form-field.full { grid-column: 1 / -1; }.form-field label { color: #b5c3d5; font-size: 12px; font-weight: 700; }.form-field small { color: var(--muted); font-size: 10px; line-height: 1.5; }.check-field { min-height: 43px; display: flex; gap: 9px; align-items: center; padding: 0 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; color: #c9d5e4; font-size: 12px; }.check-field input { accent-color: var(--cyan); }.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 18px; border-top: 1px solid var(--line); }
.toast { position: fixed; z-index: 100; right: 22px; bottom: 22px; max-width: min(430px, calc(100vw - 44px)); padding: 13px 16px; border-radius: 11px; background: #e7faff; color: #07131d; font-size: 13px; font-weight: 700; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .22s; }.toast.show { opacity: 1; transform: none; }.toast.error { background: #ffdce1; }

@media (max-width: 1050px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .app-shell { display: block; }.sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }.app-shell.menu-open .sidebar { transform: none; }.workspace { grid-column: 1; }.menu-button { display: block; }.topbar { height: 78px; }.save-state { display: none; }.content { padding-top: 26px; }.hero { align-items: flex-start; flex-direction: column; }.stat-grid { grid-template-columns: repeat(2, 1fr); }.settings-grid { grid-template-columns: 1fr; }.dialog-fields { grid-template-columns: 1fr; }.form-field.full { grid-column: auto; } }
@media (max-width: 460px) { .login-shell { padding: 26px; }.login-card h1 { font-size: 36px; }.discord-button { min-height: 60px; }.stat-grid { grid-template-columns: 1fr 1fr; }.setting-card-head { padding: 15px; }.setting-row { padding: 10px 15px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
