:root {
  --navy: #071d30;
  --navy-2: #0c2b44;
  --gold: #cfa85c;
  --ink: #15222d;
  --muted: #68737e;
  --line: #dbe1e6;
  --paper: #f5f7f8;
  --danger: #b13b38;
  --ok: #1f7554;
}

* { box-sizing: border-box; }
html { font-family: Arial, "Noto Sans KR", sans-serif; color: var(--ink); background: var(--paper); }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
.shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.top { background: var(--navy); color: #fff; padding: 20px 0; }
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.mark { width: 34px; height: 34px; border: 2px solid var(--gold); border-radius: 50%; display: grid; place-items: center; color: var(--gold); font-weight: 800; }
.brand strong { display: block; font-size: 18px; }
.brand small { display: block; color: #aebbc6; margin-top: 3px; }
.top__actions { display: flex; align-items: center; gap: 10px; }
.top__actions a, .button-quiet { color: #dce5eb; background: transparent; border: 1px solid #486074; border-radius: 7px; padding: 9px 13px; text-decoration: none; font-size: 14px; cursor: pointer; }
.hero { background: linear-gradient(130deg, var(--navy), var(--navy-2)); color: #fff; padding: 48px 0 56px; }
.eyebrow { color: var(--gold); font-size: 12px; letter-spacing: .2em; font-weight: 800; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); margin: 12px 0 9px; line-height: 1.05; }
.hero p { margin: 0; color: #c9d3da; font-size: 16px; }
.main { padding: 34px 0 80px; }
.alert { padding: 14px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 15px; line-height: 1.55; }
.alert--error { background: #fff0ef; color: #842c2a; border: 1px solid #efc3c0; }
.alert--success { background: #edf8f2; color: #18593f; border: 1px solid #bfdfcf; }
.alert--warning { background: #fff8e9; color: #704f16; border: 1px solid #ead59d; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 30px rgba(8, 29, 48, .06); padding: 26px; }
.auth { max-width: 560px; margin: -72px auto 0; position: relative; }
.auth h2, .panel h2 { margin: 0 0 8px; font-size: 24px; }
.lead { margin: 0 0 24px; color: var(--muted); line-height: 1.7; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 14px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #cbd3d9; border-radius: 7px; background: #fff; padding: 12px 13px; font: inherit; color: var(--ink); }
.field textarea { min-height: 180px; resize: vertical; line-height: 1.65; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid rgba(207, 168, 92, .35); border-color: #a77b2f; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.5; }
.button { border: 0; border-radius: 7px; background: var(--navy); color: #fff; padding: 12px 18px; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.button:hover { background: #123a59; }
.button--gold { background: var(--gold); color: var(--navy); }
.button--danger { background: #fff; color: var(--danger); border: 1px solid #dab6b4; padding: 8px 11px; font-size: 13px; }
.button--secondary { background: #e8edf0; color: var(--ink); }
.button--wide { width: 100%; }
.grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); gap: 24px; align-items: start; }
.panel__head { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 22px; }
.panel__head a { font-size: 14px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.span-2 { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 9px; margin: 8px 0 19px; font-weight: 700; }
.check input { width: 18px; height: 18px; }
.current-file { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--paper); padding: 10px 12px; border-radius: 7px; margin-top: 7px; font-size: 13px; }
.current-file a { color: #1a5d8a; overflow-wrap: anywhere; }
.posts { display: grid; gap: 12px; }
.post { border: 1px solid var(--line); border-radius: 9px; padding: 16px; }
.post__top { display: flex; justify-content: space-between; gap: 14px; }
.badge { display: inline-flex; padding: 4px 7px; border-radius: 99px; background: #edf1f4; font-size: 12px; font-weight: 700; color: #475761; }
.badge--live { background: #e6f4ec; color: var(--ok); }
.post h3 { font-size: 17px; margin: 9px 0 6px; }
.post p { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0; }
.post__meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; color: #78838c; font-size: 12px; }
.post__actions { display: flex; align-items: center; gap: 8px; margin-top: 13px; }
.post__actions a { font-size: 13px; font-weight: 700; color: #174f77; }
.post__actions form { margin: 0; }
.empty { border: 1px dashed #bdc7ce; border-radius: 9px; padding: 38px 20px; text-align: center; color: var(--muted); }
.stats { display: flex; gap: 9px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); padding: 13px 15px; border-radius: 8px; min-width: 110px; }
.stat strong { display: block; font-size: 22px; color: var(--navy); }
.stat span { font-size: 12px; color: var(--muted); }
details.settings { margin-top: 24px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
details.settings summary { cursor: pointer; font-weight: 800; }
.settings form { max-width: 560px; margin-top: 20px; }
.footer { padding: 28px 0; color: #7b858d; font-size: 13px; text-align: center; }

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .posts-panel { order: 2; }
  .editor-panel { order: 1; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 24px, 1180px); }
  .top__inner { align-items: flex-start; }
  .brand small { display: none; }
  .top__actions { flex-direction: column; align-items: stretch; }
  .hero { padding: 36px 0 80px; }
  .main { padding-top: 24px; }
  .panel { padding: 20px; }
  .auth { margin: -70px auto 0; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .stats { overflow: auto; }
  .post__top { display: block; }
  .post__top .badge { margin-top: 8px; }
}
