:root {
  --bg:#0C0D2A; --surface:#15163D; --surface-2:#1C1E4D; --line:#272A66; --text:#EEF0FF; --muted:#A3A8D6;
  --cyan:#00E5FF; --blue:#2F74FC; --indigo:#5937FB; --violet:#942BFB; --magenta:#F35BF5; --safe:#22C55E; --warn:#F59E0B; --danger:#EF4444;
  --brand:linear-gradient(90deg,var(--cyan),var(--blue) 30%,var(--indigo) 55%,var(--violet) 78%,var(--magenta));
}
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; color:var(--text); font-family:"Noto Sans JP","Hiragino Sans","Inter","Segoe UI",system-ui,sans-serif; line-height:1.6;
  background:radial-gradient(70vmax 70vmax at -10% 110%, rgba(0,229,255,.12), transparent 60%), radial-gradient(70vmax 70vmax at 110% -10%, rgba(243,91,245,.12), transparent 60%), var(--bg); }
a { color:var(--cyan); }
button, select, input, textarea { font:inherit; color:inherit; }
.top { display:flex; align-items:center; justify-content:space-between; padding:12px 20px; border-bottom:1px solid var(--line); background:rgba(12,13,42,.7); backdrop-filter:blur(6px); position:sticky; top:0; z-index:5; }
.logo { display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--text); }
.logo img { border-radius:9px; } .logo span { color:var(--muted); font-size:.85rem; }
.who { display:flex; align-items:center; gap:10px; font-size:.85rem; }
.who img { width:28px; height:28px; border-radius:50%; }
main { width:min(1100px,100%); margin:0 auto; padding:20px; }
.center { text-align:center; } .muted { color:var(--muted); }
.card { background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:18px; margin-bottom:16px; }
.card h2 { margin:0 0 12px; font-size:1.05rem; } .card h3 { margin:14px 0 8px; font-size:.95rem; color:var(--muted); }
.btn { display:inline-flex; align-items:center; gap:8px; border:1px solid var(--line); background:var(--surface-2); padding:8px 14px; border-radius:10px; cursor:pointer; text-decoration:none; color:var(--text); }
.btn:hover { border-color:var(--cyan); }
.btn.primary { border:0; background:var(--brand); color:#fff; font-weight:700; }
.btn.danger { border-color:rgba(239,68,68,.6); color:#FCA5A5; }
.layout { display:grid; grid-template-columns:240px 1fr; gap:16px; }
@media (max-width:820px) { .layout { grid-template-columns:1fr; } }
.guilds { display:flex; flex-direction:column; gap:6px; }
.guild { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:10px; border:1px solid transparent; cursor:pointer; background:none; text-align:left; width:100%; }
.guild:hover { background:var(--surface-2); } .guild.on { border-color:var(--cyan); background:var(--surface-2); }
.guild img, .guild .ph { width:34px; height:34px; border-radius:10px; flex:none; }
.guild .ph { display:grid; place-items:center; background:var(--surface-2); font-weight:700; }
.badge { font-size:.7rem; padding:1px 8px; border-radius:999px; border:1px solid var(--line); color:var(--muted); }
.badge.eternal { color:#fff; border:0; background:var(--brand); }
.tabs { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px; }
.tab { padding:7px 14px; border-radius:999px; border:1px solid var(--line); background:none; cursor:pointer; color:var(--muted); }
.tab.on { color:var(--bg); background:var(--cyan); border-color:var(--cyan); }
.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
.stat { background:var(--surface-2); border:1px solid var(--line); border-radius:12px; padding:12px; }
.stat b { display:block; font-size:1.6rem; } .stat span { color:var(--muted); font-size:.8rem; }
.level { font-size:1.4rem; font-weight:800; }
.lv0 { color:var(--safe); } .lv1 { color:var(--warn); } .lv2, .lv3 { color:var(--danger); }
.row { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.field { display:grid; grid-template-columns:220px 1fr; gap:10px; align-items:center; padding:9px 0; border-bottom:1px solid rgba(39,42,102,.6); }
@media (max-width:640px) { .field { grid-template-columns:1fr; } }
.field label { font-size:.9rem; } .field small { display:block; color:var(--muted); font-size:.75rem; }
select, input[type=text], input[type=number], textarea { width:100%; background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:8px 10px; }
textarea { min-height:90px; resize:vertical; }
.switch { position:relative; width:44px; height:24px; }
.switch input { opacity:0; width:0; height:0; }
.switch span { position:absolute; inset:0; border-radius:999px; background:var(--surface-2); border:1px solid var(--line); cursor:pointer; transition:.2s; }
.switch span::after { content:""; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:var(--muted); transition:.2s; }
.switch input:checked + span { background:var(--blue); } .switch input:checked + span::after { left:23px; background:#fff; }
.save { position:sticky; bottom:12px; display:flex; justify-content:flex-end; gap:10px; margin-top:14px; }
table { width:100%; border-collapse:collapse; font-size:.82rem; }
th, td { text-align:left; padding:8px; border-bottom:1px solid var(--line); vertical-align:top; }
th { color:var(--muted); font-weight:500; }
td code { font-size:.78rem; color:var(--muted); word-break:break-all; }
.toast { position:fixed; bottom:20px; left:50%; transform:translateX(-50%); background:var(--surface-2); border:1px solid var(--cyan); padding:10px 16px; border-radius:10px; z-index:10; }
.toast.error { border-color:var(--danger); }
.codes { font-family:ui-monospace,monospace; display:grid; grid-template-columns:repeat(2,1fr); gap:6px; }
.foot { display:flex; flex-direction:column; align-items:center; gap:8px; padding:30px 20px; color:var(--muted); font-size:.8rem; }
.foot nav { display:flex; gap:14px; flex-wrap:wrap; justify-content:center; }
.protected { display:flex; flex-direction:column; align-items:center; gap:2px; }
.protected span { font-size:.58rem; letter-spacing:.1em; text-transform:uppercase; } .protected img { height:14px; width:auto; }
.hero { text-align:center; padding:50px 20px; }
.hero img { width:84px; height:84px; border-radius:20px; }
.hero h1 { margin:14px 0 6px; } .hero p { color:var(--muted); }
