  /* 문서 양식 — 라이트 문서 스타일 유지 (복사·인쇄 가독성). 사이드바만 앱 크롬과 조화 */
  :host{
    --navy:#1B2A4A; --navy-light:#2E4370; --paper:#FAFAF8; --line:#D8D9DC;
    --ink:#1F2328; --sub:#6B7178; --up:#C0392B; --down:#1F5FA8; --accent:#B5893A;
    --kt-black:#000000; --kt-gray:#4C4C4E; --kt-lightgray:#A2A4A3; --kt-red:#FE2E36;
    --kb-bg:#000000; --kb-surface:#1d1d1f; --kb-text:#FFFFFF; --kb-muted:#A2A4A3; --kb-faint:#6e6e73; --kb-accent:#FE2E36;
    --sidebar-w:250px;
    display:block; background:#000; min-height:100%;
  }
  *{box-sizing:border-box;}
  .rt-wrap{
    font-family:'Noto Sans KR','Malgun Gothic',-apple-system,sans-serif;
    background:var(--paper); color:var(--ink); font-size:13.5px; line-height:1.5;
    border:1px solid var(--line); border-radius:8px; overflow:hidden;
    box-shadow:0 2px 10px rgba(0,0,0,.2);
    display:flex; min-height:640px; width:100%; max-width:none; margin:0;
  }
  .rt-sidebar{
    width:var(--sidebar-w); flex-shrink:0; background:var(--kb-surface); color:var(--kb-text);
    display:flex; flex-direction:column; max-height:800px; border-right:1px solid #2c2c2e;
  }
  .rt-sidebar-head{ padding:16px 16px 10px; }
  .rt-sidebar-head h1{ font-size:15px; font-weight:700; margin:0 0 2px; color:var(--kb-text); }
  .rt-sidebar-head .sub{ font-size:10.5px; color:var(--kb-muted); }
  .rt-sb-status{ font-size:10px; color:var(--kb-faint); margin-top:6px; }
  .rt-search{ padding:0 16px 10px; }
  .rt-search input{
    width:100%; border:1px solid #2c2c2e; border-radius:999px; padding:8px 12px; font-size:12.5px;
    background:#111113; color:var(--kb-text);
  }
  .rt-search input::placeholder{ color:var(--kb-faint); }
  .rt-search input:focus{ outline:none; border-color:var(--kb-accent); }
  .rt-nav-item{
    padding:10px 16px; cursor:pointer; font-size:13px; font-weight:600;
    color:var(--kb-muted); border-left:3px solid transparent;
  }
  .rt-nav-item:hover{ background:rgba(255,255,255,.06); color:var(--kb-text); }
  .rt-nav-item.active{ background:rgba(0,113,227,.18); border-left-color:var(--kb-accent); color:var(--kb-text); }
  .rt-center-list{ flex:1; overflow-y:auto; padding:4px 0; }
  .rt-center-group-label{ font-size:10.5px; color:var(--kb-faint); padding:12px 16px 4px; text-transform:uppercase; letter-spacing:.4px; }
  .rt-center-item{
    padding:9px 16px 9px 20px; cursor:pointer; font-size:12.8px; color:var(--kb-muted);
    border-left:3px solid transparent; display:flex; justify-content:space-between; align-items:center; gap:6px;
  }
  .rt-center-item:hover{ background:rgba(255,255,255,.06); color:var(--kb-text); }
  .rt-center-item.active{ background:rgba(0,113,227,.18); border-left-color:var(--kb-accent); color:var(--kb-text); font-weight:700; }
  .rt-center-item .badge{ font-size:9.5px; background:rgba(0,113,227,.18); padding:1px 6px; border-radius:8px; color:#64b5f6; flex-shrink:0; }
  .rt-add-center-btn{
    margin:10px 16px 16px; padding:9px; border-radius:999px; border:1px dashed #3a3a3c;
    background:transparent; color:var(--kb-muted); font-size:12.5px; cursor:pointer; font-weight:600;
  }
  .rt-add-center-btn:hover{ background:rgba(255,255,255,.06); color:var(--kb-text); border-color:var(--kb-accent); }

  /* ---- 본문·표·버튼: 이전 라이트 문서 양식 (이미지 8~10) ---- */
  .rt-main{ flex:1; min-width:0; overflow-y:auto; overflow-x:auto; max-height:800px; padding:22px 26px 40px; background:#fff; color:var(--ink); }
  .rt-main-header{ display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:16px; flex-wrap:wrap; gap:10px; }
  .rt-main-header h2{ font-size:18px; font-weight:700; color:var(--kt-black); margin:0 0 4px; }
  .rt-main-header .desc{ font-size:12px; color:var(--sub); }
  .rt-subtabs{ display:flex; gap:4px; margin-bottom:18px; border-bottom:1px solid var(--line); }
  .rt-subtab{ padding:8px 14px; cursor:pointer; font-size:12.8px; font-weight:600; color:var(--sub); border-bottom:2px solid transparent; }
  .rt-subtab.active{ color:var(--kt-black); border-bottom-color:var(--kt-red); }

  .rt-row{ display:flex; gap:14px; margin-bottom:14px; flex-wrap:wrap; align-items:flex-end; }
  .rt-field{ display:flex; flex-direction:column; gap:4px; flex:1; min-width:140px; }
  .rt-field label{ font-size:11.5px; color:var(--sub); font-weight:600; }
  .rt-field input, .rt-field select, .rt-field textarea{
    border:1px solid var(--line); border-radius:4px; padding:8px 10px; font-size:13px;
    font-family:inherit; background:#fff; color:var(--ink);
  }
  .rt-field input:focus, .rt-field select:focus, .rt-field textarea:focus{ outline:none; border-color:var(--kt-red); }
  .rt-status{ font-size:11.5px; padding:6px 10px; border-radius:4px; background:#F2F2F2; color:var(--kt-gray); display:inline-block; }
  .rt-status.warn{ background:#FDECEC; color:var(--kt-red); }
  .rt-section-title{ font-size:12.5px; font-weight:700; color:var(--kt-black); margin:20px 0 9px; padding-bottom:5px; border-bottom:1px solid var(--line); }
  table.rt-table{ width:100%; border-collapse:collapse; font-size:12.6px; margin-bottom:6px; background:#fff; }
  table.rt-table th, table.rt-table td{ border:1px solid #B9BCC2; padding:6px 8px; text-align:center; color:var(--ink); }
  table.rt-table th{ background:#E7E9EE; font-weight:700; color:var(--navy); }
  table.rt-table td.rt-label{ background:#F5F5F3; font-weight:600; text-align:left; padding-left:10px; color:var(--ink); }
  table.rt-table td.rt-num-input input{ width:100%; border:none; background:transparent; text-align:right; font-size:12.6px; font-family:inherit; padding:2px; color:var(--ink); }
  table.rt-table td.rt-num-input input:focus{ outline:1px solid var(--navy-light); background:#fff; }
  table.rt-table tr.rt-total td{ font-weight:700; background:#F0F0EC; }
  .rt-arrow-up{ color:var(--up); font-weight:700; }
  .rt-arrow-down{ color:var(--down); font-weight:700; }
  .rt-arrow-flat{ color:var(--sub); }
  textarea.rt-comment{ width:100%; min-height:60px; resize:vertical; color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:4px; }
  .rt-actions{ display:flex; gap:8px; margin-top:16px; flex-wrap:wrap; }
  .rt-btn{ border:none; border-radius:4px; padding:9px 16px; font-size:12.6px; font-weight:700; cursor:pointer; font-family:inherit; }
  .rt-btn-primary{ background:var(--kt-red); color:#fff; }
  .rt-btn-primary:hover{ background:#D81F27; }
  .rt-btn-ghost{ background:#fff; color:var(--kt-black); border:1px solid var(--kt-black); }
  .rt-btn-ghost:hover{ background:#F2F2F2; }
  .rt-btn-danger{ background:#fff; color:var(--up); border:1px solid var(--up); }
  .rt-btn-danger:hover{ background:#FDF0EE; }
  .rt-btn-sm{ padding:5px 10px; font-size:11.5px; }
  .rt-copy-target{ border:1px dashed var(--line); padding:12px; border-radius:4px; margin-top:8px; background:#fff; color:var(--ink); }
  .rt-copy-section{ margin-bottom:14px; }
  .rt-copy-section-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; }
  .rt-copy-section-head span{ font-size:12px; font-weight:700; color:var(--kt-black); }
  .rt-mini-copy-btn{ border:1px solid var(--kt-black); background:#fff; color:var(--kt-black); font-size:11px; font-weight:700; padding:3px 9px; border-radius:4px; cursor:pointer; }
  .rt-mini-copy-btn:hover{ background:#F2F2F2; }
  .rt-toast{ position:fixed; bottom:24px; left:50%; transform:translateX(-50%); background:var(--kt-black); color:#fff;
    padding:10px 18px; border-radius:4px; font-size:12.6px; opacity:0; pointer-events:none; transition:opacity .2s; z-index:999; }
  .rt-toast.show{ opacity:1; }
  .rt-hint{ font-size:11px; color:var(--sub); margin-top:3px; }

  .rt-history-row{ display:flex; align-items:center; justify-content:space-between; padding:10px 12px; border:1px solid var(--line); border-radius:5px; margin-bottom:6px; background:#FAFAF9; }
  .rt-history-row .info{ font-size:12.6px; color:var(--ink); }
  .rt-history-row .info b{ color:var(--kt-black); }
  .rt-history-row .ops{ display:flex; gap:6px; }
  .rt-history-row:hover{ box-shadow:0 2px 6px rgba(0,0,0,.06); }
  .rt-empty{ color:var(--sub); font-size:12.6px; padding:20px; text-align:center; border:1px dashed var(--line); border-radius:6px; }

  .rt-modal-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.4); display:flex; align-items:center; justify-content:center; z-index:1000; }
  .rt-modal{ background:#fff; border-radius:8px; padding:22px 24px; width:440px; max-width:92vw; max-height:85vh; overflow-y:auto; color:var(--ink); }
  .rt-modal h3{ margin:0 0 14px; font-size:15px; color:var(--kt-black); }
  .rt-modal .rt-field{ margin-bottom:10px; }
  .rt-checkbox-row{ display:flex; align-items:center; gap:6px; font-size:12.6px; margin-bottom:4px; color:var(--ink); }
  .rt-checkbox-row input{ width:auto; }
  .rt-modal-section-title{ font-size:12.5px; font-weight:700; color:var(--kt-black); margin:18px 0 8px; padding-bottom:5px; border-bottom:1px solid var(--line); }
  .rt-modal .rt-hint{ margin:-4px 0 10px; }

  .rt-summary-table{ width:100%; border-collapse:collapse; font-size:12.6px; margin-bottom:20px; background:#fff; }
  .rt-summary-table th, .rt-summary-table td{ border:1px solid var(--line); padding:8px 10px; text-align:left; color:var(--ink); }
  .rt-summary-table th{ background:#F0F2F5; color:var(--kt-black); }
  .rt-summary-table tr:hover td{ background:#FAFBFD; cursor:pointer; }

  .rt-ai-box{ border:1px solid var(--line); border-radius:5px; padding:12px; margin-bottom:16px; background:#FAFBFD; color:var(--ink); }
  .rt-ai-box .rt-row{ margin-bottom:8px; }
  input[type="file"]{ font-size:12px; color:var(--sub); }

  /* 481~760px 사이는 예전엔 사이드바가 200px 고정폭으로 본문 옆에 계속 붙어있어 본문이 좁게 밀렸음 —
     다른 두 사이드바(캘린더 .sidebar, 손익 #pl-sidebar)와 같은 기준으로 맞춰 760px까지 세로 스택으로 통일. */
  @media (max-width: 760px){
    .rt-wrap{ flex-direction:column; }
    .rt-sidebar{ width:100%; max-height:420px; }
    .rt-center-list{ max-height:220px; }
    .rt-main{ max-height:none; }
  }
