:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #eff6ff;
  --radius: 18px;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
  --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.site-header {
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px);
  background: rgba(246, 247, 251, 0.88); border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}
.site-header__inner {
  max-width: var(--max); margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px; color: var(--text);
  font-weight: 800; font-size: 18px; text-decoration: none;
}
.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.nav-toggle {
  display: none; border: 1px solid var(--line); background: #fff; color: var(--text);
  border-radius: 12px; padding: 10px 12px; font: inherit; font-weight: 700; cursor: pointer;
}
.site-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.site-nav a {
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 700;
  padding: 10px 12px; border-radius: 10px;
}
.site-nav a:hover { background: #eef2ff; color: var(--primary); }
.nav-cta { background: var(--primary); color: #fff !important; }
.nav-cta:hover { background: var(--primary-hover) !important; }
.page-hero { padding: 38px 0 24px; }
.page-hero__card {
  background: linear-gradient(135deg, #ffffff 0%, #eef5ff 100%);
  border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); padding: 34px;
}
.page-hero__logo {
  width: min(100%, 480px);
  margin: 0 auto 18px;
}
.page-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-radius: 999px; background: #eef2ff; color: var(--primary); font-size: 13px; font-weight: 800;
}
.page-hero h1 { margin: 18px 0 10px; font-size: 42px; line-height: 1.15; text-align: center; }
.page-hero p {
  max-width: 760px; margin: 0 auto; font-size: 17px; color: var(--muted); text-align: center;
}
.hero-actions {
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 24px;
}
.btn {
  appearance: none; border: none; border-radius: 14px; padding: 13px 18px; font: inherit;
  font-weight: 800; cursor: pointer; text-decoration: none; display: inline-flex;
  justify-content: center; align-items: center; transition: background .15s ease, transform .05s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2); }
.btn--primary:hover { background: var(--primary-hover); }
.btn--ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn--ghost:hover { background: #f8fafc; }
.home-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; margin: 0 0 22px; }
.section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
}
.card h2 { margin: 0 0 14px; font-size: 24px; line-height: 1.25; }
.card h3 { margin: 18px 0 10px; font-size: 18px; line-height: 1.35; }
.card p, .card li { font-size: 15px; }
.muted { color: var(--muted); }
.list { margin: 0; padding-left: 18px; }
.list li + li { margin-top: 8px; }
.feature-list { display: grid; gap: 12px; }
.feature-item { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.feature-item strong { display: block; margin-bottom: 4px; font-size: 15px; }
.notice { background: var(--accent); border: 1px solid #bfdbfe; border-radius: 14px; padding: 16px; font-size: 14px; }
.notice strong { display: block; margin-bottom: 6px; }
.steps { counter-reset: step; display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.steps li {
  display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
}
.steps li::before {
  counter-increment: step; content: counter(step); width: 44px; height: 44px; border-radius: 999px;
  background: #eef2ff; color: var(--primary); font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.steps strong { display: block; margin-bottom: 4px; }
.cta-strip {
  display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 22px 24px;
  border-radius: 20px; background: linear-gradient(135deg, #111827 0%, #1f2937 100%); color: #fff;
  box-shadow: var(--shadow); margin-bottom: 22px;
}
.cta-strip h2 { margin: 0 0 6px; font-size: 24px; }
.cta-strip p { margin: 0; color: rgba(255,255,255,.78); }
.page-title { margin: 0 0 8px; font-size: 38px; line-height: 1.15; }
.page-intro { margin: 0 0 22px; color: var(--muted); font-size: 16px; }
.faq-list { display: grid; gap: 14px; }
.faq-item { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.faq-question {
  width: 100%; text-align: left; padding: 16px 18px; background: #fff; border: 0;
  cursor: pointer; font: inherit; font-weight: 800; color: var(--text);
}
.faq-question:hover { background: #f8fafc; }
.faq-answer { display: none; padding: 0 18px 18px; color: var(--muted); font-size: 15px; }
.faq-item.is-open .faq-answer { display: block; }
.site-footer { padding: 32px 0 50px; }
.site-footer__card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 24px;
}
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.footer-grid h3 { margin: 0 0 10px; font-size: 18px; }
.footer-grid p { margin: 8px 0; font-size: 14px; }
.footer-links { margin-top: 18px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.badge {
  display: inline-flex; align-items: center; padding: 7px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: #f9fafb; font-size: 12px; font-weight: 800;
}
.badge--primary { background: #eef2ff; border-color: #c7d2fe; color: var(--primary); }
@media (max-width: 900px) {
  .home-grid, .section-grid, .footer-grid { grid-template-columns: 1fr; }
  .cta-strip { flex-direction: column; align-items: flex-start; }
  .page-hero h1, .page-title { font-size: 34px; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .site-header__inner { align-items: flex-start; flex-direction: column; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; }
  .site-nav.is-open { display: flex; }
  .site-nav a { border: 1px solid var(--line); background: #fff; }
  .page-hero__card, .card, .site-footer__card { padding: 20px; }
  .page-hero h1, .page-title { font-size: 28px; }
  .page-hero p, .page-intro { font-size: 15px; }
  .container { padding: 0 14px; }
  .kv { grid-template-columns: 1fr; }
}

.hidden {
  display: none !important;
}

.page-hero__card {
  padding: 36px 32px;
}

.hero-showcase {
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.hero-side {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-center {
  text-align: center;
}

.page-hero__logo {
  display: block;
  width: min(100%, 440px);
  margin: 0 auto 18px;
}

.hero-center h1 {
  margin: 0 0 14px;
  font-size: 56px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-center p {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 24px;
  line-height: 1.7;
  word-break: keep-all;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;   /* 노란색 표시 부분 가운데 정렬 */
  gap: 10px;
  margin-top: 20px;
}

.hero-character {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  object-fit: contain;
}

.hero-character--left {
  transform: translateX(-6px);
}

.hero-character--right {
  transform: translateX(6px);
}
@media (max-width: 1200px) {
  .hero-showcase {
    grid-template-columns: 160px 1fr 160px;
    gap: 16px;
  }

  .hero-character {
    max-width: 160px;
  }

  .hero-center h1 {
    font-size: 42px;
  }

  .hero-center p {
    font-size: 20px;
  }
}

@media (max-width: 900px) {
  .hero-showcase {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-side {
    order: 2;
  }

  .hero-center {
    order: 1;
  }

  .hero-side--right {
    order: 3;
  }

  .hero-character {
    max-width: 180px;
  }

  .hero-center h1 {
    font-size: 34px;
  }

  .hero-center p {
    font-size: 17px;
  }

  .page-hero__card {
    padding: 28px 20px;
  }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}
.form-card {
  max-width: 520px;
  margin: 36px auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 26px;
}
.form-card label {
  display: block;
  margin-top: 14px;
  font-weight: 800;
}
.form-card input, .form-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 6px;
  font: inherit;
  background: #fff;
}
.form-card .btn {
  width: 100%;
  margin-top: 18px;
}
.notice {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px 16px;
  color: var(--muted);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 32px 0;
}
.dashboard-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.dashboard-card h2 {
  margin-top: 0;
}
pre.api-box {
  white-space: pre-wrap;
  word-break: break-all;
  background: #0f172a;
  color: #d1fae5;
  border-radius: 16px;
  padding: 16px;
  overflow: auto;
}
/* Dashboard polish */
.dashboard-grid {
  align-items: start;
}

.dashboard-card {
  overflow: hidden;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 18px;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.data-table th {
  padding: 12px 14px;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 900;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 14px;
  color: #334155;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table td:nth-child(1) {
  min-width: 150px;
}

.data-table td:nth-child(2) {
  min-width: 70px;
}

.data-table td:nth-child(3),
.data-table td:nth-child(4) {
  min-width: 110px;
}

.data-table td:nth-child(5) {
  min-width: 90px;
  font-weight: 800;
}

.data-table td:nth-child(6) {
  min-width: 140px;
  max-width: 260px;
  white-space: normal;
  word-break: break-word;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  background: rgba(15, 23, 42, 0.08);
}

.status-pill--ok {
  background: rgba(34, 197, 94, 0.14);
  color: #047857;
}

.status-pill--wait {
  background: rgba(234, 179, 8, 0.18);
  color: #92400e;
}

.status-pill--error {
  background: rgba(239, 68, 68, 0.16);
  color: #b91c1c;
}

#devEventForm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  align-items: end;
  margin-top: 16px;
}

#devEventForm label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #334155;
}

#devEventForm input,
#devEventForm select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 14px;
  background: #ffffff;
}

#devEventForm .btn,
#devEventForm .message {
  grid-column: 1 / -1;
}

#devEventForm .btn {
  justify-self: start;
  min-height: 46px;
  padding: 0 22px;
}

@media (max-width: 760px) {
  #devEventForm {
    grid-template-columns: 1fr;
  }
}


.message {
  margin-top: 12px;
  font-weight: 800;
}
.message.ok { color: #047857; }
.message.err { color: #dc2626; }
@media (max-width: 820px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}


.dashboard-card--wide {
  grid-column: 1 / -1;
}

.admin-form,
#devEventForm {
  display: grid;
  gap: 12px 14px;
  align-items: end;
  margin-top: 16px;
}

.admin-form--grid,
#devEventForm {
  grid-template-columns: 1fr 1fr;
}

.admin-form label,
#devEventForm label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #334155;
}

.admin-form input,
.admin-form select,
#devEventForm input,
#devEventForm select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 14px;
  background: #ffffff;
}

.admin-form .btn,
.admin-form .message,
#devEventForm .btn,
#devEventForm .message,
.admin-form__wide {
  grid-column: 1 / -1;
}

.admin-form .btn,
#devEventForm .btn {
  justify-self: start;
  min-height: 46px;
  padding: 0 22px;
}

.message--ok,
.message.ok {
  color: #047857;
}

.message--error,
.message.err {
  color: #dc2626;
}

@media (max-width: 760px) {
  .admin-form--grid,
  #devEventForm {
    grid-template-columns: 1fr;
  }
}


/* Dashboard v2 polish */
.dashboard-shell {
  --dashboard-gap: 20px;
  padding-bottom: 56px;
}

.dashboard-hero {
  margin: 34px 0 18px;
  padding: 34px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 30px;
  background:
    radial-gradient(circle at 8% 20%, rgba(37, 99, 235, 0.14), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 55%, #eef6ff 100%);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-hero h1 {
  margin: 14px 0 8px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.dashboard-hero p {
  margin: 0;
  color: #64748b;
  font-size: 16px;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--dashboard-gap);
  margin-bottom: var(--dashboard-gap);
}

.summary-card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.06);
}

.summary-card::after {
  content: "";
  position: absolute;
  right: -36px;
  top: -46px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.10);
}

.summary-card__label,
.panel-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.summary-card small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-weight: 700;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--dashboard-gap);
  align-items: start;
}

.dashboard-panel {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.06);
  padding: 24px;
}

.dashboard-panel--profile,
.dashboard-panel--minecraft,
.dashboard-panel--accounts {
  grid-column: span 4;
}

.dashboard-panel--connect {
  grid-column: span 8;
}

.dashboard-panel--events {
  grid-column: 1 / -1;
}

.dashboard-panel--api {
  grid-column: span 4;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-heading h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.profile-box,
.account-list {
  display: grid;
  gap: 10px;
}

.profile-row {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid #eef2f7;
}

.profile-row:last-child {
  border-bottom: 0;
}

.profile-row span,
.account-meta dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.profile-row strong,
.account-meta dd {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  word-break: break-word;
}

.stack-form {
  display: grid;
  gap: 10px;
}

.stack-form label {
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.stack-form input,
.stack-form select,
.admin-form input,
.admin-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  padding: 0 14px;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
}

.stack-form input:focus,
.stack-form select:focus,
.admin-form input:focus,
.admin-form select:focus {
  outline: 3px solid rgba(37, 99, 235, 0.14);
  border-color: #2563eb;
  background: #ffffff;
}

.stack-form .btn {
  justify-self: start;
  margin-top: 4px;
}

.manual-connect {
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: #f8fafc;
}

.manual-connect summary {
  cursor: pointer;
  color: #0f172a;
  font-weight: 900;
}

.manual-connect .stack-form {
  margin-top: 16px;
}

.account-card {
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.account-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.account-meta {
  display: grid;
  gap: 12px;
  margin: 0;
}

.account-meta div {
  display: grid;
  gap: 3px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.badge--primary {
  background: #eef2ff;
  color: #2563eb;
}

.data-table--clean {
  min-width: 0;
}

.data-table--clean th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table--clean td {
  font-size: 13px;
}

.data-table--clean td:first-child,
.data-table--clean th:first-child {
  white-space: nowrap;
  min-width: 170px;
}

.data-table--clean td:nth-child(5),
.data-table--clean th:nth-child(5) {
  white-space: nowrap;
  min-width: 100px;
}

.dashboard-panel--events .table-wrap {
  border: 1px solid #eef2f7;
  border-radius: 18px;
  overflow: auto;
}

.dashboard-panel--api .api-box {
  margin-top: 14px;
}


.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.auth-help {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.dashboard-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-summary {
    grid-template-columns: 1fr;
  }

  .dashboard-panel,
  .dashboard-panel--profile,
  .dashboard-panel--minecraft,
  .dashboard-panel--accounts,
  .dashboard-panel--connect,
  .dashboard-panel--events,
  .dashboard-panel--api {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .dashboard-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .dashboard-hero,
  .dashboard-panel,
  .summary-card {
    border-radius: 22px;
    padding: 20px;
  }

  .panel-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-hero__admin {
    width: 100%;
  }

  .data-table {
    min-width: 720px;
  }
}
