[hidden] { display: none !important; }
.debug-panel[hidden] { display: none !important; }
:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #62708a;
  --line: #dfe5ef;
  --brand: #1f5eff;
  --brand-dark: #123bb3;
  --danger: #c93030;
  --ok: #0f7d4f;
  --warn: #9a6400;
  --shadow: 0 10px 30px rgba(20, 35, 70, .08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--bg); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 10px 14px; }
button.primary { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }
button.primary:hover { background: var(--brand-dark); }
button.secondary { background: #eef3ff; color: #183b91; border-color: #d3defc; }
button.danger { background: #fff0f0; color: var(--danger); border-color: #ffd1d1; }
button.small { padding: 6px 9px; border-radius: 8px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 28px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(10px); }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 900; }
.brand strong { display: block; }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.main-nav { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.main-nav a { text-decoration: none; color: #253451; }
.inline-form { display: inline; }
.inline-form button { padding: 7px 10px; }
.page-shell { max-width: 1480px; margin: 0 auto; padding: 26px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: stretch; margin-bottom: 22px; }
.platform-hero { min-height: 310px; }
.hero-text { background: linear-gradient(135deg, #153fbd, #1d74ff 70%, #3bc5ff); color: #fff; padding: 34px; border-radius: 24px; box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 12px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: inherit; opacity: .8; font-weight: 800; }
h1, h2, h3 { margin-top: 0; }
h1 { font-size: clamp(30px, 4vw, 54px); line-height: 1.12; margin-bottom: 18px; }
h2 { font-size: 22px; margin-bottom: 8px; }
h3 { font-size: 17px; margin-bottom: 8px; }
.hero-copy { max-width: 860px; color: rgba(255,255,255,.9); font-size: 17px; line-height: 1.7; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hero-badges span { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); padding: 8px 12px; border-radius: 999px; font-weight: 700; }
.card, .hero-card { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 22px; padding: 22px; }
.hero-card ul { padding-left: 18px; line-height: 1.8; color: #34415b; }
.search-panel { margin-bottom: 22px; }
.section-title-row { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 16px; }
.section-title-row p { margin: 0; color: var(--muted); }
.search-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
.search-grid.compact { grid-template-columns: repeat(4, minmax(120px, 1fr)) auto; }
.stack-form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; color: #43506a; font-size: 13px; font-weight: 700; }
label.check { display: flex; flex-direction: row; gap: 8px; align-items: center; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; color: var(--text); }
.split-layout { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 22px; align-items: start; }
.product-grid { display: grid; gap: 12px; }
.product-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #fff; display: grid; gap: 12px; }
.product-card header { display: flex; justify-content: space-between; gap: 14px; }
.product-title { font-weight: 800; color: #172033; text-decoration: none; line-height: 1.4; }
.product-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; background: #eef3ff; color: #1b3f96; font-size: 12px; font-weight: 800; }
.badge.gray { background: #f0f2f6; color: #5d697d; }
.badge.ok { background: #e7f8ef; color: var(--ok); }
.badge.warn { background: #fff7e6; color: var(--warn); }
.spec-line { color: #35425c; display: flex; flex-wrap: wrap; gap: 12px; font-size: 14px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 900; color: #0e387f; white-space: nowrap; }
.pagination { margin-top: 16px; display: flex; gap: 8px; justify-content: center; }
.compare-panel.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; padding: 18px; }
.compare-item { border-top: 1px solid var(--line); padding: 12px 0; }
.compare-score { font-weight: 900; }
.guide-card { margin-top: 22px; }
.guide-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.guide-grid article { background: #f8faff; border: 1px solid #e4ebfb; border-radius: 16px; padding: 16px; }
.admin-hero { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.admin-actions { display: flex; gap: 10px; }
.stats-grid { display: grid; grid-template-columns: repeat(6, minmax(140px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 28px; }
.stat span { color: var(--muted); font-size: 13px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }
.admin-grid.wide-left { grid-template-columns: minmax(0, 1.55fr) minmax(320px, .8fr); }
.log-box { min-height: 160px; max-height: 360px; overflow: auto; white-space: pre-wrap; background: #101827; color: #d9e4ff; border-radius: 12px; padding: 14px; }
.table-wrap { overflow: auto; max-height: 620px; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
th, td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: #f5f7fb; z-index: 1; }
.small-table { max-height: 400px; }
.login-card { max-width: 420px; margin: 60px auto; }
.muted { color: var(--muted); }
.debug-monitor { position: fixed; right: 18px; bottom: 18px; z-index: 1000; font-size: 13px; }
.debug-toggle { background: #111827; color: #fff; border-color: #111827; box-shadow: var(--shadow); }
.debug-panel { position: absolute; right: 0; bottom: 54px; width: min(760px, calc(100vw - 36px)); height: min(620px, calc(100vh - 120px)); background: #0b1020; color: #d7e2ff; border: 1px solid #273553; border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.35); overflow: hidden; }
.debug-panel header { display: flex; justify-content: space-between; gap: 10px; padding: 14px; border-bottom: 1px solid #273553; background: #111a2e; }
.debug-panel small { display: block; color: #91a1c4; margin-top: 3px; }
.debug-actions { display: flex; gap: 6px; }
.debug-actions button, .debug-filter-row button { padding: 6px 8px; border-radius: 8px; background: #1e2b47; color: #d7e2ff; border-color: #334365; }
.debug-actions button.danger { background: #3a1820; color: #ffd8d8; border-color: #6a2b38; }
.debug-filter-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid #273553; }
.debug-filter-row label { color: #c7d3f2; display: flex; flex-direction: row; align-items: center; gap: 8px; }
.debug-filter-row input[type=number] { width: 80px; padding: 6px; background: #111a2e; color: #fff; border-color: #334365; }
.debug-log { margin: 0; padding: 14px; height: calc(100% - 112px); overflow: auto; white-space: pre-wrap; line-height: 1.55; color: #d7e2ff; }
@media (max-width: 1100px) {
  .hero, .split-layout, .admin-grid, .admin-grid.wide-left { grid-template-columns: 1fr; }
  .search-grid, .search-grid.compact { grid-template-columns: 1fr 1fr; }
  .guide-grid, .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .topbar { align-items: flex-start; flex-direction: column; padding: 12px 16px; }
  .main-nav { flex-wrap: wrap; }
  .page-shell { padding: 16px; }
  .search-grid, .search-grid.compact, .guide-grid, .stats-grid { grid-template-columns: 1fr; }
  .hero-text { padding: 24px; }
}

.pc-builder-card { margin-top: 22px; }
.pc-builder-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px; padding: 12px; }
.pc-build-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; background: #fff; }
.pc-build-card h4 { margin: 0 0 8px; }
.pc-build-card ul { margin: 8px 0; padding-left: 20px; }
.pc-build-total { font-weight: 900; color: var(--brand); margin-bottom: 8px; }
.number-cell { text-align: right; white-space: nowrap; }
@media (max-width: 920px) { .pc-builder-grid { grid-template-columns: 1fr; } }


/* 공통 버튼 처리/진행상태 알림 */
button.is-busy, button.is-disabled-action, button[disabled], input[type=submit][disabled] {
  opacity: .55;
  cursor: not-allowed;
  filter: grayscale(.18);
}
button.is-busy::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -1px;
  animation: kjcSpin .75s linear infinite;
}
@keyframes kjcSpin { to { transform: rotate(360deg); } }
button.policy-action-active {
  box-shadow: inset 0 0 0 2px rgba(31,94,255,.24);
  font-weight: 900;
}
button.danger.policy-action-active {
  box-shadow: inset 0 0 0 2px rgba(201,48,48,.22);
}
.action-notice {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 18px);
  z-index: 3000;
  min-width: min(520px, calc(100vw - 36px));
  max-width: calc(100vw - 36px);
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid #cdd7eb;
  background: #111827;
  color: #fff;
  box-shadow: 0 12px 38px rgba(15, 23, 42, .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  text-align: center;
  font-weight: 800;
}
.action-notice.show { opacity: 1; transform: translate(-50%, 0); }
.action-notice.ok { background: #0f7d4f; border-color: #0f7d4f; }
.action-notice.warn { background: #9a6400; border-color: #9a6400; }
.action-notice.error { background: #b42318; border-color: #b42318; }
.policy-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  margin: 0 0 6px;
  background: #f0f2f6;
  color: #5d697d;
  font-size: 12px;
  font-weight: 900;
}
.policy-status-badge.allow { background: #e7f8ef; color: var(--ok); }
.policy-status-badge.block { background: #fff0f0; color: var(--danger); }
.policy-status-badge.default { background: #f0f2f6; color: #5d697d; }
.policy-row-blocked { background: #fff7f7; }
.policy-row-allowed { background: #f2fbf6; }
.action-inline-status {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

/* v38 등급제 노출/공통 드롭다운/로그인 분리 */
.compare-card {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 104px);
  overflow: auto;
  z-index: 5;
}
.compare-open-link { font-weight: 900; color: var(--brand); text-decoration: none; }
.compare-open-link:hover { text-decoration: underline; }
.compare-result-table th { top: 0; }
.grade-select {
  min-width: 118px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-weight: 800;
}
.policy-status-badge.grade-a { background: #e7f4ff; color: #0b5cad; }
.policy-status-badge.grade-b { background: #eef9e7; color: #237a37; }
.policy-status-badge.grade-c { background: #fff7df; color: #976000; }
.policy-status-badge.grade-d { background: #fff0f0; color: #b42318; }
.admin-floating-login {
  position: fixed;
  right: 18px;
  bottom: 86px;
  z-index: 1200;
  width: min(260px, calc(100vw - 36px));
  font-size: 12px;
}
.admin-floating-login details {
  border: 1px solid #cfd8ea;
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.admin-floating-login summary {
  cursor: pointer;
  padding: 9px 12px;
  font-weight: 900;
  color: #0f172a;
  background: #f7f9fc;
}
.admin-floating-login form {
  display: grid;
  gap: 8px;
  padding: 10px;
}
.admin-floating-login input {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.admin-floating-login button { padding: 8px 10px; border-radius: 10px; }
.login-card-wide { max-width: 860px; margin: 46px auto; }
.login-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.login-panel { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: #fff; }
.form-error { color: #b42318; font-weight: 800; margin: 8px 0; }
.form-ok { color: #0f7d4f; font-weight: 800; margin: 8px 0; }
.soft-divider { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
@media (max-width: 900px) {
  .compare-card { position: static; max-height: none; }
  .login-grid { grid-template-columns: 1fr; }
  .admin-floating-login { bottom: 74px; }
}
