/* A6 안내문 편집기 — 전체 화면 작업 공간 (인쇄되는 용지 스타일은 a6_editor.js의 SHEET_CSS) */
body.a6-open { overflow: hidden; }
#a6-overlay {
  --a6-ui-ink: #292723; --a6-ui-muted: #716c64; --a6-ui-line: #e3dfd8; --a6-ui-bg: #f3f1ed; --a6-ui-accent: #76604c;
  position: fixed; inset: 0; z-index: 900; background: var(--a6-ui-bg); color: var(--a6-ui-ink);
  display: flex; flex-direction: column; font-size: 13px;
}
#a6-overlay button, #a6-overlay input, #a6-overlay select { font: inherit; color: inherit; }
#a6-overlay [hidden] { display: none !important; }
.a6-btn {
  border: 1px solid var(--a6-ui-line); background: #fff; border-radius: 7px; padding: 8px 12px;
  font-weight: 600; line-height: 1.25; cursor: pointer; white-space: nowrap;
}
.a6-btn:hover:not(:disabled) { background: #f5f2ed; border-color: #beb3a5; }
.a6-btn:disabled { opacity: .38; cursor: default; }
.a6-btn:focus-visible, #a6-overlay select:focus-visible, #a6-overlay input:focus-visible, .a6-lang:focus-visible, .a6-tab:focus-visible {
  outline: 2px solid #9f8161; outline-offset: 2px;
}
.a6-primary { color: #fff; background: var(--a6-ui-accent); border-color: var(--a6-ui-accent); }
.a6-primary:hover:not(:disabled) { background: #624e3d; border-color: #624e3d; }
.a6-small { font-size: 11.5px; padding: 7px 9px; }
.a6-wide { width: 100%; margin-top: 6px; }
.a6-danger { color: #994434; }
.a6-close { padding: 8px 11px; }

.a6-top {
  flex-shrink: 0; min-height: 70px; background: #fffffff0; border-bottom: 1px solid var(--a6-ui-line);
  display: flex; align-items: center; gap: 16px; padding: 10px 22px; flex-wrap: wrap;
}
.a6-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.a6-brand-mark {
  display: grid; place-items: center; width: 34px; height: 40px; border: 1px solid #b8a997; border-radius: 5px;
  color: #79614b; font-size: 12px; font-weight: 700; background: #f9f6f1; flex-shrink: 0;
}
.a6-title { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.03em; }
.a6-sub { margin: 2px 0 0; font-size: 10.5px; letter-spacing: .06em; color: var(--a6-ui-muted); }
.a6-langs { display: flex; gap: 4px; padding: 3px; background: #efebe5; border-radius: 9px; }
.a6-lang {
  position: relative; border: 0; background: transparent; padding: 6px 12px; border-radius: 7px;
  font-weight: 600; color: var(--a6-ui-muted); cursor: pointer;
}
.a6-lang.active { background: #fff; color: var(--a6-ui-ink); box-shadow: 0 1px 3px #0001; }
.a6-saved-dot { position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; border-radius: 50%; background: #5d8a6a; }
.a6-actions { display: flex; align-items: center; gap: 7px; margin-left: auto; flex-wrap: wrap; }
.a6-save-state { color: var(--a6-ui-muted); font-size: 11px; margin-right: 4px; }
.a6-save-state.dirty { color: #a0612e; font-weight: 600; }
.a6-paper {
  border: 1px solid var(--a6-ui-line); background: #fff; border-radius: 7px; padding: 7px 8px; min-height: 34px; width: auto;
}

.a6-workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr); }
.a6-inspector { background: #fff; border-right: 1px solid var(--a6-ui-line); overflow-y: auto; scrollbar-width: thin; }
.a6-tabs { display: flex; gap: 8px; padding: 14px 18px 0; position: sticky; top: 0; background: #fff; z-index: 2; border-bottom: 1px solid var(--a6-ui-line); }
.a6-tab {
  flex: 1; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 9px 4px 12px;
  color: var(--a6-ui-muted); font-weight: 600; cursor: pointer;
}
.a6-tab[aria-selected="true"] { border-color: var(--a6-ui-accent); color: var(--a6-ui-ink); }
.a6-panel { padding: 16px 18px 28px; }
.a6-group { margin: 0 0 18px; padding: 0 0 18px; border-bottom: 1px solid #eeeae4; }
.a6-group:last-child { border-bottom: 0; }
.a6-group-title { margin: 0 0 10px; font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; }
.a6-group-title span { font-weight: 400; color: #a0988f; font-size: 10px; letter-spacing: .08em; }
.a6-field { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.a6-field > label { flex: 1; min-width: 0; font-size: 12px; }
.a6-field.a6-stack { display: block; }
.a6-field.a6-stack label { display: block; margin-bottom: 6px; }
.a6-value { display: flex; align-items: center; gap: 6px; width: 112px; }
.a6-unit { color: var(--a6-ui-muted); width: 22px; font-size: 11px; }
#a6-overlay .a6-inspector select, #a6-overlay .a6-inspector input[type="number"] {
  width: 100%; min-width: 0; border: 1px solid var(--a6-ui-line); border-radius: 7px; background: #fff; padding: 7px 8px;
}
#a6-overlay .a6-value input { width: 82px; }
#a6-overlay input[type="color"] { width: 48px; height: 32px; padding: 3px; border: 1px solid var(--a6-ui-line); border-radius: 6px; background: #fff; cursor: pointer; }
.a6-help { font-size: 11px; line-height: 1.65; color: var(--a6-ui-muted); margin: 8px 0 0; word-break: keep-all; }
.a6-check { display: flex; align-items: center; gap: 7px; font-size: 12px; margin: 8px 0; cursor: pointer; }
.a6-two { display: flex; gap: 7px; margin-top: 8px; }
.a6-two > * { flex: 1; min-width: 0; }
.a6-layouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 8px; }
.a6-layout {
  border: 1px solid var(--a6-ui-line); background: #fff; border-radius: 7px; padding: 9px 4px 7px;
  font-size: 11px; cursor: pointer; text-align: center;
}
.a6-layout[aria-pressed="true"] { background: #f6f1e9; border-color: #9d8266; box-shadow: 0 0 0 1px #9d8266 inset; color: #624d38; }
.a6-layout-sym { display: block; width: 22px; height: 28px; margin: 0 auto 6px; border: 1px solid #c5b8a8; border-radius: 2px; position: relative; background: #fff; }
.a6-layout-sym::before { content: ""; position: absolute; left: 4px; right: 4px; top: 7px; height: 2px; background: #b2a18f; box-shadow: 0 5px #ded4c8, 0 10px #ded4c8; }
.a6-layout[data-layout="rules"] .a6-layout-sym::before { height: 1px; top: 9px; box-shadow: 0 8px #b2a18f; }
.a6-layout[data-layout="cards"] .a6-layout-sym::before { height: 6px; top: 4px; box-shadow: 0 10px #ded4c8; }
#a6-overlay details { margin-top: 12px; }
#a6-overlay summary { cursor: pointer; font-size: 12px; font-weight: 600; padding: 4px 0; }
.a6-qr-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.a6-qr-thumb { width: 44px; height: 44px; object-fit: contain; border: 1px solid var(--a6-ui-line); border-radius: 4px; }
.a6-qr-none { display: grid; place-items: center; border-style: dashed; font-size: 10.5px; color: var(--a6-ui-muted); }
.a6-section-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.a6-section-row { display: flex; align-items: center; gap: 4px; padding: 5px 5px 5px 8px; border: 1px solid #e9e5df; border-radius: 6px; background: #fcfbf9; }
.a6-section-row.active { border-color: #b49a7d; background: #f9f3ea; }
.a6-section-label { flex: 1; min-width: 0; border: 0; background: transparent; text-align: left; font-size: 11.5px; padding: 4px 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.a6-order { border: 1px solid var(--a6-ui-line); background: #fff; border-radius: 5px; padding: 3px 7px; font-weight: 700; cursor: pointer; }
.a6-order:disabled { opacity: .3; cursor: default; }
.a6-choice { padding: 10px 12px; border: 1px solid #e2d6c7; background: #fbf7f1; border-radius: 7px; margin-bottom: 16px; font-size: 12px; line-height: 1.6; }
.a6-choice b { color: #6d533b; }
.a6-sel-text { color: #817568; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a6-empty { padding: 14px 0; font-size: 12px; line-height: 1.8; color: var(--a6-ui-muted); }

.a6-stage { min-width: 0; overflow-y: auto; padding: 18px 30px 30px; }
.a6-banner {
  max-width: 760px; margin: 0 auto 10px; padding: 10px 14px; border-radius: 8px; font-size: 12.5px; line-height: 1.6;
  background: #f4f0e8; border: 1px solid #e0d5c4; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.a6-banner-warn { background: #fff6ea; border-color: #e7c18f; color: #7a4a14; }
.a6-banner-ok { background: #eef6f0; border-color: #b9d8c2; color: #2f5b3d; }
.a6-stage-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 760px; margin: 0 auto 6px; }
.a6-stage-title { margin: 0; font-size: 13px; font-weight: 700; }
.a6-stage-title span { font-size: 11px; font-weight: 400; color: var(--a6-ui-muted); margin-left: 6px; }
.a6-zoom { display: flex; align-items: center; gap: 8px; color: var(--a6-ui-muted); font-size: 11px; }
.a6-zoom select { border: 1px solid var(--a6-ui-line); border-radius: 6px; background: #fff; padding: 4px 6px; width: auto; }
.a6-tip { max-width: 760px; margin: 0 auto 14px; color: var(--a6-ui-muted); font-size: 12px; }
.a6-preview { padding: 10px 6px 18px; overflow: auto; }
#a6-paper-wrap { margin: 0 auto; position: relative; }
.a6-preview .a6-sheet { box-shadow: 0 5px 28px #28201415, 0 0 0 1px #d8d1c680; }
.a6-fit {
  max-width: 600px; margin: 12px auto 0; background: #fff; border: 1px solid #e1ddd6; border-radius: 9px;
  padding: 11px 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between;
}
.a6-fit[data-overflow="true"] { background: #fff9f2; border-color: #d9b995; }
.a6-fit-status { margin: 0; font-size: 12px; font-weight: 700; color: #446152; }
.a6-fit[data-overflow="true"] .a6-fit-status { color: #986232; }
.a6-fit-detail { margin: 3px 0 0; font-size: 11px; color: var(--a6-ui-muted); line-height: 1.6; }
.a6-under { display: flex; justify-content: center; margin-top: 10px; }
.a6-print-note { text-align: center; color: #8b8278; font-size: 11px; line-height: 1.75; margin: 12px auto 0; max-width: 600px; }

@media (max-width: 900px) {
  .a6-workspace { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .a6-inspector { max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--a6-ui-line); }
  .a6-stage { padding: 14px 10px 24px; }
  .a6-top { padding: 10px 14px; }
  .a6-save-state { display: none; }
}
/* 터치 기기·태블릿(iPad) — 편집기 버튼·탭·순서 버튼을 40px 안팎으로 */
@media (hover: none), (pointer: coarse), (max-width: 1100px) {
  #a6-overlay .a6-btn, #a6-overlay .a6-lang, #a6-overlay .a6-tab, #a6-overlay .a6-layout { min-height: 40px; }
  #a6-overlay .a6-close { min-width: 44px; }
  #a6-overlay .a6-order { min-width: 38px; min-height: 38px; }
  #a6-overlay .a6-section-label { min-height: 38px; }
  #a6-overlay input[type="color"] { width: 56px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { #a6-overlay * { transition: none !important; } }
