/* ═══════════════════════════════════════════════════════════════════════
   HANTAS CLOUD — cloud.hantas.kr
   디자인 시스템 v0.1 (design/design-system.html 에서 확정한 토큰)

   구조
     1. 토큰      — 라이트가 기준, 다크는 값만 재정의
     2. 기본형    — body, 포커스, 모션
     3. 앱 셸     — 레일 / 상단바 / 본문
     4. 컴포넌트  — hc-* (디자인 시스템과 1:1)
     5. 화면      — 로그인 / 상세 패널 / 관리
     6. 반응형

   ⚠️ 색은 반드시 토큰을 거쳐 쓴다. 미디어 쿼리나 [data-theme] 안에서만 정의된
      색을 컴포넌트가 직접 쓰면, 테마를 지정하지 않은 기본 상태에서 한쪽 테마의
      글자색이 다른 쪽 배경 위에 얹힌다.
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── 1. 토큰 ─────────────────────────────────────────────────────── */
:root{
  --bg:#edf0f3;
  --surface:#ffffff;
  --surface-2:#f5f7f9;
  --surface-3:#e7ecf0;
  --border:#d7dee5;
  --border-strong:#b9c4ce;

  --text:#131a21;
  --text-2:#4a5763;
  --text-3:#77848f;

  /* 기존 404 페이지의 #448CCB 계보. 흰 배경 AA 통과하도록 어둡게 조정했다. */
  --accent:#2c6ca8;
  --accent-hover:#21537f;
  --accent-weak:#e3eef8;
  --accent-line:#a9c9e4;
  --on-accent:#ffffff;

  /* 상태 전용. 액센트와 절대 겹치지 않는다. */
  --ok:#1b6f49;   --ok-weak:#dff0e7;   --ok-line:#a8d6bf;
  --warn:#8f5c08; --warn-weak:#f8eeda; --warn-line:#e0c48a;
  --crit:#ab2f24; --crit-weak:#f9e3e1; --crit-line:#e8b3ad;
  --idle:#5f6c78; --idle-weak:#e8ecf0; --idle-line:#c4ced7;

  --focus:#2c6ca8;
  --shadow-1:0 1px 2px rgba(19,26,33,.06), 0 1px 1px rgba(19,26,33,.04);
  --shadow-2:0 2px 4px rgba(19,26,33,.06), 0 8px 20px rgba(19,26,33,.08);
  --shadow-3:0 12px 40px rgba(19,26,33,.16);

  --r-sm:3px; --r-md:4px; --r-lg:6px; --r-pill:999px;

  --sans:"IBM Plex Sans KR", -apple-system, "Malgun Gothic", sans-serif;
  --mono:"IBM Plex Mono", ui-monospace, "Consolas", monospace;

  --rail-w:212px;
  --top-h:54px;
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0d1218;
    --surface:#151c24;
    --surface-2:#1b232c;
    --surface-3:#232d38;
    --border:#293440;
    --border-strong:#3d4a57;
    --text:#e3e9ef;
    --text-2:#a2aeba;
    --text-3:#788694;
    --accent:#63a4dd;
    --accent-hover:#8bbee9;
    --accent-weak:#15293c;
    --accent-line:#2c4f6f;
    --on-accent:#0d1218;
    --ok:#54c08e;   --ok-weak:#0f271d;   --ok-line:#255a43;
    --warn:#d8a54c; --warn-weak:#2a2113; --warn-line:#5c4620;
    --crit:#e67b6f; --crit-weak:#2e1714; --crit-line:#6b332c;
    --idle:#8c99a5; --idle-weak:#1c242c; --idle-line:#38434f;
    --focus:#63a4dd;
    --shadow-1:0 1px 2px rgba(0,0,0,.4);
    --shadow-2:0 2px 4px rgba(0,0,0,.3), 0 8px 20px rgba(0,0,0,.4);
    --shadow-3:0 12px 40px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"]{
  --bg:#0d1218;
  --surface:#151c24;
  --surface-2:#1b232c;
  --surface-3:#232d38;
  --border:#293440;
  --border-strong:#3d4a57;
  --text:#e3e9ef;
  --text-2:#a2aeba;
  --text-3:#788694;
  --accent:#63a4dd;
  --accent-hover:#8bbee9;
  --accent-weak:#15293c;
  --accent-line:#2c4f6f;
  --on-accent:#0d1218;
  --ok:#54c08e;   --ok-weak:#0f271d;   --ok-line:#255a43;
  --warn:#d8a54c; --warn-weak:#2a2113; --warn-line:#5c4620;
  --crit:#e67b6f; --crit-weak:#2e1714; --crit-line:#6b332c;
  --idle:#8c99a5; --idle-weak:#1c242c; --idle-line:#38434f;
  --focus:#63a4dd;
  --shadow-1:0 1px 2px rgba(0,0,0,.4);
  --shadow-2:0 2px 4px rgba(0,0,0,.3), 0 8px 20px rgba(0,0,0,.4);
  --shadow-3:0 12px 40px rgba(0,0,0,.6);
}

/* ─── 2. 기본형 ───────────────────────────────────────────────────── */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:var(--sans); font-size:15px; font-weight:400; line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4{margin:0; font-weight:600; letter-spacing:-.015em; text-wrap:balance}
p{margin:0}
:focus-visible{outline:2px solid var(--focus); outline-offset:2px; border-radius:2px}
code{font-family:var(--mono); font-size:.88em}
.mono{font-family:var(--mono); font-variant-numeric:tabular-nums}
.muted{color:var(--text-3); font-size:12.5px}
.nowrap{white-space:nowrap}
.center{text-align:center}
.block{width:100%}

@media (prefers-reduced-motion: reduce){
  *{animation-duration:.001ms !important; transition-duration:.001ms !important}
}

.skip{
  position:absolute; left:-9999px; top:8px; z-index:100;
  background:var(--accent); color:var(--on-accent); padding:8px 14px; border-radius:var(--r-md);
}
.skip:focus{left:8px}

/* ─── 3. 앱 셸 ────────────────────────────────────────────────────── */
.app{display:grid; grid-template-columns:var(--rail-w) 1fr; min-height:100%}

.rail{
  background:var(--surface-2); border-right:1px solid var(--border);
  padding:12px 10px; position:sticky; top:0; height:100vh; overflow-y:auto;
}

.main{display:flex; flex-direction:column; min-width:0}

.topbar{
  display:flex; align-items:center; gap:14px; padding:0 20px; height:var(--top-h);
  background:var(--surface); border-bottom:1px solid var(--border);
  position:sticky; top:0; z-index:20;
}
.brand{
  display:flex; align-items:center; gap:9px; flex:none;
  font-weight:600; font-size:14px; letter-spacing:-.015em; color:var(--text);
}
.brand:hover{text-decoration:none}
.brand .glyph{
  width:22px; height:22px; border-radius:var(--r-sm); background:var(--accent);
  color:var(--on-accent); display:grid; place-items:center;
  font-family:var(--mono); font-size:11px; font-weight:600;
}
.brand small{
  font-family:var(--mono); font-size:10px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--text-3); font-weight:500;
}
.railtoggle{
  display:none; width:32px; height:32px; border:1px solid var(--border);
  background:var(--surface); color:var(--text-2); border-radius:var(--r-md);
  place-items:center; cursor:pointer; flex:none;
}
.railtoggle svg{width:16px; height:16px}
.topsearch{margin-left:6px}
.userbox{display:flex; align-items:center; gap:9px; margin-left:auto; flex:none; font-size:13px; color:var(--text-2)}
.userbox .uname{white-space:nowrap}
.avatar{
  width:26px; height:26px; border-radius:50%; background:var(--surface-3);
  border:1px solid var(--border); display:grid; place-items:center;
  font-size:11px; font-weight:600; color:var(--text-2); flex:none;
}

.body{padding:22px 20px 40px; display:flex; flex-direction:column; gap:22px; min-width:0}

.group{display:flex; flex-direction:column; gap:11px}
.grouphead{display:flex; align-items:center; gap:10px}
.grouphead h2{font-size:13.5px; font-weight:600}
.grouphead .n{font-family:var(--mono); font-size:11px; color:var(--text-3)}
.grouphead .rule{flex:1; height:1px; background:var(--border)}

.cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(268px,1fr)); gap:12px}
.stats{display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px}

.footnote{font-size:12px; color:var(--text-3); line-height:1.7; max-width:80ch; margin-top:6px}
.footnote code{
  background:var(--surface-2); border:1px solid var(--border);
  border-radius:var(--r-sm); padding:1px 5px;
}

.deadend{display:grid; place-items:center; min-height:70vh; padding:24px}
.deadend .hc-empty{max-width:420px; background:var(--surface)}

/* ─── 4. 컴포넌트 ─────────────────────────────────────────────────── */

/* 상태 칩 — 점 + 글자. 색만으로 말하지 않는다. */
.hc-status{
  display:inline-flex; align-items:center; gap:6px; flex:none;
  font-family:var(--mono); font-size:11px; font-weight:500; letter-spacing:.04em;
  padding:2px 8px 2px 6px; border-radius:var(--r-pill); border:1px solid; white-space:nowrap;
}
.hc-status::before{content:""; width:6px; height:6px; border-radius:50%; background:currentColor; flex:none}
.hc-status.is-ok{color:var(--ok); background:var(--ok-weak); border-color:var(--ok-line)}
.hc-status.is-warn{color:var(--warn); background:var(--warn-weak); border-color:var(--warn-line)}
.hc-status.is-crit{color:var(--crit); background:var(--crit-weak); border-color:var(--crit-line)}
.hc-status.is-idle{color:var(--idle); background:var(--idle-weak); border-color:var(--idle-line)}

/* 버튼 */
.hc-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  font-family:var(--sans); font-size:13.5px; font-weight:500; line-height:1;
  padding:0 14px; height:34px; border-radius:var(--r-md); cursor:pointer;
  border:1px solid transparent; background:none; color:var(--text);
  transition:background .13s ease, border-color .13s ease, color .13s ease;
}
.hc-btn:hover{text-decoration:none}
.hc-btn-primary{background:var(--accent); color:var(--on-accent); border-color:var(--accent)}
.hc-btn-primary:hover{background:var(--accent-hover); border-color:var(--accent-hover)}
.hc-btn-secondary{background:var(--surface); border-color:var(--border-strong); color:var(--text)}
.hc-btn-secondary:hover{background:var(--surface-2); border-color:var(--text-3)}
.hc-btn-ghost{color:var(--text-2)}
.hc-btn-ghost:hover{background:var(--surface-3); color:var(--text)}
.hc-btn-danger{background:var(--surface); border-color:var(--crit-line); color:var(--crit)}
.hc-btn-danger:hover{background:var(--crit-weak)}
.hc-btn[disabled],.hc-btn.is-disabled{opacity:.42; cursor:not-allowed; pointer-events:none}
.hc-btn-sm{height:28px; font-size:12.5px; padding:0 10px}
.hc-btn svg{width:14px; height:14px; flex:none}
.hc-btn .cnt{font-family:var(--mono); font-size:10.5px; opacity:.7}

/* 입력 */
.hc-field{display:flex; flex-direction:column; gap:6px; min-width:0}
.hc-label{font-size:12.5px; font-weight:500; color:var(--text-2)}
.hc-input{
  height:36px; padding:0 11px; font-family:var(--sans); font-size:13.5px; color:var(--text);
  background:var(--surface); border:1px solid var(--border-strong); border-radius:var(--r-md);
  width:100%; transition:border-color .13s ease, box-shadow .13s ease;
}
.hc-input::placeholder{color:var(--text-3)}
.hc-input:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-weak)}
.hc-input.tiny{height:28px; font-size:12.5px; padding:0 6px}
.hc-hint{font-size:11.5px; color:var(--text-3)}
select.hc-input{cursor:pointer; padding-right:6px}

.hc-search{position:relative; display:flex; align-items:center; width:100%; max-width:320px}
.hc-search > svg{position:absolute; left:10px; width:14px; height:14px; color:var(--text-3); pointer-events:none}
.hc-search .hc-input{padding-left:31px; padding-right:52px; background:var(--surface-2)}
.hc-kbd{
  position:absolute; right:8px; font-family:var(--mono); font-size:10.5px; color:var(--text-3);
  border:1px solid var(--border-strong); border-bottom-width:2px; border-radius:var(--r-sm);
  padding:1px 5px; background:var(--surface); pointer-events:none;
}

/* 모노그램 */
.hc-mono{
  width:34px; height:34px; flex:none; border-radius:var(--r-md);
  display:grid; place-items:center; font-family:var(--mono); font-size:12px; font-weight:600;
  background:var(--surface-2); border:1px solid var(--border); color:var(--text-2);
}
.hc-mono.t-a{background:var(--accent-weak); border-color:var(--accent-line); color:var(--accent)}
.hc-mono.t-b{background:var(--ok-weak); border-color:var(--ok-line); color:var(--ok)}
.hc-mono.t-c{background:var(--warn-weak); border-color:var(--warn-line); color:var(--warn)}

/* 서비스 카드 */
.hc-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--r-md);
  padding:14px 15px 13px; display:flex; flex-direction:column; gap:11px; cursor:pointer;
  transition:border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.hc-card:hover{border-color:var(--accent); box-shadow:var(--shadow-2); transform:translateY(-1px)}
.hc-card.is-locked{cursor:pointer; background:var(--surface-2)}
.hc-card.is-locked:hover{border-color:var(--border-strong); transform:none; box-shadow:none}
.hc-card.is-locked .hc-card-name,
.hc-card.is-locked .hc-card-desc{color:var(--text-3)}
.hc-card-top{display:flex; align-items:flex-start; gap:11px}
.hc-card-id{display:flex; flex-direction:column; gap:1px; min-width:0; flex:1}
.hc-card-name{font-size:14.5px; font-weight:600; letter-spacing:-.01em; line-height:1.35}
.hc-card-host{
  font-family:var(--mono); font-size:11.5px; color:var(--text-3);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.hc-card-desc{font-size:12.5px; color:var(--text-2); line-height:1.55; font-weight:300}
.hc-card-foot{
  display:flex; align-items:center; gap:8px; justify-content:space-between;
  padding-top:10px; border-top:1px solid var(--border); min-height:26px; margin-top:auto;
}
.hc-card-tags{display:flex; gap:5px; flex-wrap:wrap}
.hc-tag{
  font-family:var(--mono); font-size:10.5px; color:var(--text-3);
  border:1px solid var(--border); border-radius:var(--r-sm); padding:1px 5px; background:var(--surface-2);
}
.hc-tag.t-warn{color:var(--warn); border-color:var(--warn-line); background:var(--warn-weak)}
.lockhint{font-size:11.5px; color:var(--text-3); white-space:nowrap}

.hc-star{
  width:24px; height:24px; border-radius:var(--r-sm); display:grid; place-items:center;
  color:var(--text-3); border:1px solid transparent; background:none; cursor:pointer; flex:none;
}
.hc-star:hover{background:var(--surface-3); color:var(--text-2)}
.hc-star.is-on{color:var(--warn)}
.hc-star svg{width:14px; height:14px}

/* 지표 타일 */
.hc-stat{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--r-md);
  padding:13px 15px 14px; display:flex; flex-direction:column; gap:6px;
}
.hc-stat-label{
  font-family:var(--mono); font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--text-3);
}
.hc-stat-val{
  font-size:27px; font-weight:600; letter-spacing:-.03em; line-height:1.1;
  font-variant-numeric:tabular-nums; display:flex; align-items:baseline; gap:5px;
}
.hc-stat-val small{font-size:14px; font-weight:400; color:var(--text-3); letter-spacing:0}
.hc-stat-sub{font-size:11.5px; color:var(--text-3); display:flex; align-items:center; gap:5px; flex-wrap:wrap}
.hc-stat-sub.mono{font-family:var(--mono)}

/* 표 */
.hc-tablewrap{overflow-x:auto; border:1px solid var(--border); border-radius:var(--r-md); background:var(--surface)}
.hc-table{width:100%; border-collapse:collapse; font-size:13px; min-width:600px}
.hc-table th{
  text-align:left; font-family:var(--mono); font-size:10.5px; font-weight:600; letter-spacing:.08em;
  text-transform:uppercase; color:var(--text-3); padding:9px 14px;
  background:var(--surface-2); border-bottom:1px solid var(--border); white-space:nowrap;
}
.hc-table td{padding:10px 14px; border-bottom:1px solid var(--border); color:var(--text-2); vertical-align:middle}
.hc-table tr:last-child td{border-bottom:0}
.hc-table tbody tr:hover{background:var(--surface-2)}
.hc-table .mono{font-family:var(--mono); font-size:12px; color:var(--text)}
.hc-table .name{color:var(--text); font-weight:500}
.hc-num{text-align:right; font-variant-numeric:tabular-nums}
.hc-table td.actions{display:flex; gap:6px; flex-wrap:wrap}
.inline{display:inline}

/* 배너 */
.hc-banner{
  display:flex; gap:11px; align-items:flex-start; padding:11px 14px;
  border:1px solid; border-radius:var(--r-md); font-size:13px; line-height:1.6;
}
.hc-banner > svg{width:15px; height:15px; flex:none; margin-top:2px}
.hc-banner b{font-weight:600; display:block; margin-bottom:1px}
.hc-banner.is-warn{background:var(--warn-weak); border-color:var(--warn-line); color:var(--warn)}
.hc-banner.is-crit{background:var(--crit-weak); border-color:var(--crit-line); color:var(--crit)}
.hc-banner.is-info{background:var(--accent-weak); border-color:var(--accent-line); color:var(--accent)}
.hc-banner p{color:inherit; opacity:.92}
.temp-pw{margin:6px 0}
.temp-pw code{
  font-size:15px; font-weight:600; letter-spacing:.06em; background:var(--surface);
  border:1px solid currentColor; border-radius:var(--r-sm); padding:3px 9px; display:inline-block;
}

/* 빈 상태 */
.hc-empty{
  display:flex; flex-direction:column; align-items:center; gap:9px; text-align:center;
  padding:34px 20px; border:1px dashed var(--border-strong); border-radius:var(--r-md);
  background:var(--surface-2);
}
.hc-empty > svg{width:22px; height:22px; color:var(--text-3)}
.hc-empty b{font-size:14px; font-weight:600}
.hc-empty p{font-size:12.5px; color:var(--text-3); max-width:42ch; line-height:1.6}

/* 사이드바 내비 */
.hc-nav{display:flex; flex-direction:column; gap:1px}
.hc-navgroup{
  font-family:var(--mono); font-size:10px; letter-spacing:.12em; text-transform:uppercase;
  color:var(--text-3); padding:14px 10px 5px;
}
.hc-navitem{
  display:flex; align-items:center; gap:9px; padding:6px 10px; border-radius:var(--r-md);
  font-size:13.5px; color:var(--text-2); line-height:1.4;
  transition:background .12s ease, color .12s ease;
}
.hc-navitem:hover{background:var(--surface-3); color:var(--text); text-decoration:none}
.hc-navitem.is-active{background:var(--accent-weak); color:var(--accent); font-weight:500}
.hc-navitem svg{width:15px; height:15px; flex:none; opacity:.85}
.hc-navitem .count{margin-left:auto; font-family:var(--mono); font-size:10.5px; color:var(--text-3); font-variant-numeric:tabular-nums}

/* ─── 5. 화면 ─────────────────────────────────────────────────────── */

/* 상세 패널 */
.panel-scrim{position:fixed; inset:0; background:rgba(19,26,33,.34); z-index:40}
.panel{
  position:fixed; top:0; right:0; bottom:0; width:420px; max-width:92vw; z-index:41;
  background:var(--surface); border-left:1px solid var(--border); box-shadow:var(--shadow-3);
  display:flex; flex-direction:column;
}
.panel[hidden],.panel-scrim[hidden]{display:none}
.panel-head{padding:16px 18px 14px; border-bottom:1px solid var(--border); display:flex; flex-direction:column; gap:11px}
.panel-title{display:flex; align-items:flex-start; gap:11px}
.panel-title .hc-mono{width:40px; height:40px; font-size:13px}
.panel-id{display:flex; flex-direction:column; gap:2px; min-width:0}
.panel-id h2{font-size:16px; line-height:1.3}
.panel-id .sub{font-family:var(--mono); font-size:11.5px; color:var(--text-3); word-break:break-all}
.panel-close{
  margin-left:auto; width:26px; height:26px; border-radius:var(--r-sm); border:1px solid var(--border);
  background:var(--surface); color:var(--text-2); display:grid; place-items:center; cursor:pointer; flex:none;
}
.panel-close:hover{background:var(--surface-2)}
.panel-close svg{width:13px; height:13px}
.panel-actions{display:flex; gap:8px; flex-wrap:wrap}
.panel-body{padding:16px 18px 24px; display:flex; flex-direction:column; gap:18px; overflow-y:auto}
.panel-loading{color:var(--text-3); font-size:13px}

.dl{display:flex; flex-direction:column}
.dl > div{
  display:grid; grid-template-columns:104px 1fr; gap:12px; padding:8px 0;
  border-bottom:1px solid var(--border); font-size:12.5px; align-items:baseline;
}
.dl > div:last-child{border-bottom:0}
.dl dt{color:var(--text-3); margin:0}
.dl dd{margin:0; color:var(--text); word-break:break-all}
.dl dd.mono{font-family:var(--mono); font-size:12px}

/* 로그인 · 비밀번호 변경 */
.login{min-height:100vh; display:grid; grid-template-columns:1fr 420px; background:var(--surface)}
.login-art{
  background:var(--accent); color:var(--on-accent); padding:42px 40px;
  display:flex; flex-direction:column; justify-content:space-between; gap:32px;
  position:relative; overflow:hidden;
}
.login-art::after{
  content:""; position:absolute; inset:0; opacity:.16; pointer-events:none;
  background-image:linear-gradient(currentColor 1px, transparent 1px),
                   linear-gradient(90deg, currentColor 1px, transparent 1px);
  background-size:34px 34px;
  -webkit-mask-image:radial-gradient(120% 90% at 78% 22%, #000 5%, transparent 72%);
  mask-image:radial-gradient(120% 90% at 78% 22%, #000 5%, transparent 72%);
}
.login-art > *{position:relative; z-index:1}
.login-art .brand{color:inherit}
.login-art .brand .glyph{background:var(--on-accent); color:var(--accent)}
.login-art h1{font-size:30px; letter-spacing:-.025em; line-height:1.3}
.login-art p{margin-top:10px; font-size:13.5px; opacity:.84; font-weight:300; line-height:1.7; max-width:36ch}
.login-svcs{display:flex; flex-wrap:wrap; gap:6px; list-style:none; margin:0; padding:0}
.login-svcs li{
  font-family:var(--mono); font-size:10.5px; border:1px solid currentColor;
  border-radius:var(--r-sm); padding:2px 7px; opacity:.72;
}
.login-form{display:grid; place-items:center; padding:40px 36px}
.login-form form{width:100%; max-width:340px; display:flex; flex-direction:column; gap:15px}
.login-form h2{font-size:19px}
.login-form .sub{font-size:13px; color:var(--text-2); font-weight:300; margin-top:-9px}
.login-form .hc-btn.block{height:38px}

/* 관리 */
.filterbar{display:flex; gap:6px; flex-wrap:wrap}
.userform{
  display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--r-md); padding:15px;
}
.userform .hc-field{flex:1; min-width:190px}
.userform .hc-field.narrow{flex:0 0 210px}
.pager{display:flex; align-items:center; gap:12px; justify-content:center; padding-top:4px; font-size:12px; color:var(--text-3)}

/* ─── 6. 반응형 ───────────────────────────────────────────────────── */
@media (max-width:1023px){
  .app{grid-template-columns:1fr}
  .rail{
    position:fixed; top:var(--top-h); left:0; bottom:0; width:var(--rail-w); z-index:30;
    transform:translateX(-100%); transition:transform .16s ease; box-shadow:var(--shadow-2);
  }
  .rail.is-open{transform:none}
  .railtoggle{display:grid}
  .topsearch{max-width:200px}
  .userbox .uname{display:none}
}
@media (max-width:719px){
  .body{padding:16px 14px 32px}
  .topbar{padding:0 12px; gap:9px}
  .topsearch{display:none}
  .cards{grid-template-columns:1fr}
  .panel{width:100%; max-width:100%; border-left:0}
  .login{grid-template-columns:1fr}
  .login-art{display:none}
}
