:root { --bg:#000; --panel:rgba(255,255,255,.04); --line:rgba(255,255,255,.08); --text:#f4f2fb; --muted:rgba(255,255,255,.55); --accent:#7c5cff; --lilac:#c9b8ff; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; -webkit-font-smoothing: antialiased; word-break: keep-all; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
header.top { position: sticky; top: 0; z-index: 10; background: rgba(0,0,0,.75); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.logo i { width: 26px; height: 26px; border-radius: 8px; background: conic-gradient(from 200deg, #c9b8ff, #7c5cff, #142266, #c9b8ff); display: inline-block; }
.nav { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
.avatar { width: 30px; height: 30px; border-radius: 999px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 0; cursor: pointer; font-family: inherit; }
.btn-white { background: #fff; color: #08070d; box-shadow: 0 12px 40px -14px rgba(201,184,255,.8); }
.btn-ghost { background: rgba(255,255,255,.05); color: var(--text); border: 1px solid var(--line); }
.btn-discord { background: #5865F2; color: #fff; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-danger { background: rgba(244,63,94,.12); color: #fecdd3; }
.hero { position: relative; text-align: center; padding: 110px 0 70px; overflow: hidden; }
.hero::before { content: ""; position: absolute; left: 50%; top: -280px; width: 1000px; height: 800px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(124,92,255,.4), transparent 70%); pointer-events: none; }
.hero h1 { position: relative; font-size: clamp(38px, 8vw, 72px); line-height: 1.05; letter-spacing: -.05em; margin: 0; background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,.55)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { position: relative; color: var(--muted); font-size: 17px; line-height: 1.6; margin: 22px auto 0; max-width: 30rem; }
.hero .cta { position: relative; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 34px; }
.grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)); border: 1px solid var(--line); border-radius: 24px; padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
h1.page { font-size: 28px; letter-spacing: -.03em; margin: 34px 0 6px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 22px 0; scrollbar-width: none; }
.tabs a { flex-shrink: 0; padding: 9px 16px; border-radius: 999px; background: rgba(255,255,255,.05); font-size: 14px; color: var(--muted); }
.tabs a.on { background: #fff; color: #000; font-weight: 700; }
.guild { display: flex; align-items: center; gap: 14px; }
.guild img, .guild .ph { width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; background: rgba(255,255,255,.08); display: grid; place-items: center; font-weight: 700; }
.guild .name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
form .field { margin-bottom: 16px; }
label.lb { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
input[type=text], input[type=number], select, textarea { width: 100%; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.1); color: #fff; border-radius: 14px; padding: 12px 14px; font-size: 15px; font-family: inherit; outline: none; }
input:focus, select:focus, textarea:focus { border-color: rgba(201,184,255,.6); }
select option { background: #0d0c16; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: #fff; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; background: rgba(255,255,255,.05); border-radius: 999px; font-size: 13px; cursor: pointer; }
.checks input { accent-color: #fff; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.flash { border-radius: 14px; padding: 13px 16px; font-size: 14px; margin: 16px 0; }
.flash.ok { background: rgba(52,211,153,.1); color: #a7f3d0; border: 1px solid rgba(52,211,153,.2); }
.flash.err { background: rgba(244,63,94,.1); color: #fecdd3; border: 1px solid rgba(244,63,94,.2); }
.banner { background: rgba(124,92,255,.12); border: 1px solid rgba(124,92,255,.3); border-radius: 16px; padding: 14px 16px; font-size: 14px; margin: 14px 0; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.on { background: rgba(52,211,153,.15); color: #a7f3d0; }
.badge.off { background: rgba(255,255,255,.07); color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
td, th { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 30px 0; color: var(--muted); font-size: 13px; }

/* ---------- 관리 화면 공통 ---------- */
.stat p { font-size: 13px; }
.stat b { display: block; font-size: 28px; letter-spacing: -.03em; margin-top: 6px; }
.stat span { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.stat span a { text-decoration: underline; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
h2.sec { font-size: 18px; margin: 0; letter-spacing: -.02em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.05); font-size: 13px; color: var(--muted); }
.chip.on { background: #fff; color: #000; font-weight: 700; }
.search input { width: 220px; height: 38px; padding: 0 14px; border-radius: 999px; font-size: 14px; }
.table-wrap { overflow-x: auto; padding: 8px 14px; }
.table-wrap table { min-width: 560px; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 6px; align-items: center; }
.badge.warn { background: rgba(245,158,11,.15); color: #fde68a; }
.badge.info { background: rgba(56,189,248,.15); color: #bae6fd; }
.list { list-style: none; padding: 0; margin: 10px 0 0; }
.list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list li:last-child { border-bottom: 0; }
.link { background: none; border: 0; color: var(--lilac); font-size: 12px; cursor: pointer; padding: 0 4px; font-family: inherit; }
details > summary { cursor: pointer; list-style: none; color: var(--muted); margin-top: 10px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸ "; }
details[open] > summary::before { content: "▾ "; }
details.card > summary { margin-top: 0; color: var(--text); }
.product { margin-bottom: 12px; }
.product h3 { display: flex; align-items: center; gap: 8px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } .search input { width: 100%; } .search { width: 100%; } }

/* ---------- 화면 크기별 최적화 ---------- */
html, body { max-width: 100%; overflow-x: hidden; -webkit-text-size-adjust: 100%; touch-action: manipulation; }
* { min-width: 0; }
img, input, select, textarea, table { max-width: 100%; }
.card { overflow-wrap: anywhere; }
.layout { display: block; }
.content { min-width: 0; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; margin: 0; }
.menu summary::before, .menu summary::-webkit-details-marker { display: none; content: none; }
.menu-box { position: absolute; right: 0; top: 44px; min-width: 180px; background: #0d0c16; border: 1px solid var(--line); border-radius: 18px; padding: 10px; box-shadow: 0 20px 50px -20px #000; z-index: 20; }
.menu-box a { display: block; padding: 12px 12px; border-radius: 12px; font-size: 15px; }
.menu-box a:active, .menu-box a:hover { background: rgba(255,255,255,.06); }
.menu-box p { padding: 4px 12px 8px; margin: 0; border-bottom: 1px solid var(--line); margin-bottom: 6px; }

/* 휴대폰 */
@media (max-width: 767px) {
  .pc-only { display: none !important; }
  .wrap { padding: 0 16px; }
  header.top .wrap { height: 56px; }
  h1.page { font-size: 24px; margin-top: 24px; }
  .hero { padding: 72px 0 48px; }
  .card { padding: 18px; border-radius: 20px; }
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; }
  .stat b { font-size: 20px; }
  .row { grid-template-columns: 1fr; }
  .btn { height: 48px; }
  .btn-sm { height: 38px; }
  .tabs { margin: 16px -16px; padding: 0 16px; }
  .table-wrap { margin: 0 -2px; padding: 4px 10px; }
  .table-wrap table { min-width: 520px; }
  input[type=text], input[type=number], select, textarea { font-size: 16px; } /* 입력할 때 자동 확대 방지 */
  .toolbar { align-items: flex-start; }
}

/* PC */
@media (min-width: 768px) {
  .mobile-only { display: none !important; }
}
@media (min-width: 1024px) {
  .wrap { max-width: 1160px; }
  .layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 24px; }
  .layout > .tabs { position: sticky; top: 84px; flex-direction: column; overflow: visible; margin: 0; gap: 4px; }
  .layout > .tabs a { background: transparent; border-radius: 12px; padding: 11px 14px; font-size: 15px; }
  .layout > .tabs a:hover { background: rgba(255,255,255,.05); color: var(--text); }
  .layout > .tabs a.on { background: #fff; color: #000; }
  .card { padding: 26px; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .table-wrap table { min-width: 0; }
  .hero h1 { font-size: 76px; }
}
