/* 시안 C 괄호: 전시 제목의 빈칸 ( )이 화면의 주인공. 고른 단어가 괄호에 들어가고, 붉은 실이 글자 자리로 이어진다. */
body[data-v="c"] {
  --red: #e0001b;
  --dim: #8c8c8c;
  background: #fff;
  color: #111;
  font: 15px/1.6 "Noto Serif KR", Batang, AppleMyungjo, serif;
}
body[data-v="c"] #app { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
body[data-v="c"] :is(#m-form, #m-meta, #fkeys, #stamp, #scan-log) { display: none; }
body[data-v="c"] #threads { display: block; z-index: 3; }
body[data-v="c"] #threads line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: c-thread 0.7s ease-out forwards; }
@keyframes c-thread { to { stroke-dashoffset: 0; } }

body[data-v="c"] #mast { display: flex; justify-content: space-between; padding: 16px 28px 0; font-size: 13px; }
body[data-v="c"] #m-sub { color: var(--dim); white-space: pre; }
body[data-v="c"] #steps {
  position: absolute;
  top: 17px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #c4c4c4;
  white-space: nowrap;
  z-index: 2;
}
body[data-v="c"] #steps li[data-status="past"] { color: var(--dim); }
body[data-v="c"] #steps li[data-status="now"] { color: #111; }
body[data-v="c"] .s-n { display: none; }

body[data-v="c"] #form {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0 44px;
  min-height: 0;
  padding: 10px 28px 12px;
}
body[data-v="c"] .label { display: none; }
body[data-v="c"] .block[data-status="todo"] { display: none; }

/* 괄호 */
body[data-v="c"] #hero {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  font-size: clamp(60px, 9.5vw, 138px);
  font-weight: 200;
  line-height: 1.14;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
body[data-v="c"] #hero[data-len="long"] { font-size: clamp(44px, 6.2vw, 90px); }
body[data-v="c"] #hero[data-len="xlong"] { font-size: clamp(32px, 4.2vw, 62px); }
body[data-v="c"] .paren { font-weight: 200; }
body[data-v="c"] .h-inner { display: inline-flex; align-items: center; padding: 0 0.16em; }
body[data-v="c"] .h-blank { display: inline-block; width: 1.3em; }
body[data-v="c"] .h-word { display: inline-flex; }
body[data-v="c"] .h-gap { display: inline-block; width: 0.34em; }
body[data-v="c"] .h-ch { font-weight: 300; }
body[data-v="c"] .h-ch.none { color: #d9d9d9; }
body[data-v="c"] .h-count { font-size: 0.42em; font-weight: 300; font-variant-numeric: tabular-nums; }

/* 접수 전: 괄호 하나만 */
body[data-v="c"][data-phase="idle"] #form { display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
body[data-v="c"][data-phase="idle"] #hero { font-size: min(30vw, 58vh); line-height: 1; }
body[data-v="c"][data-phase="idle"] .h-blank { width: 0.72em; }
body[data-v="c"][data-phase="idle"] .paren { transition: transform 0.25s ease; display: inline-block; }
body[data-v="c"].drag .paren:first-child { transform: translateX(-0.06em); }
body[data-v="c"].drag .paren:last-child { transform: translateX(0.06em); }
body[data-v="c"] #drop { display: block; text-align: center; }
body[data-v="c"][data-phase="idle"] #s-file { position: static; }
body[data-v="c"][data-phase="idle"] #drop::before { content: ""; position: absolute; inset: 0; }
body[data-v="c"] .drop-main { font-size: 15px; }
body[data-v="c"] .drop-sub.is-error { color: var(--red); font-size: 13px; }
body[data-v="c"]:not([data-phase="idle"]) #drop { display: none; }

/* 왼쪽: 괄호 아래 */
body[data-v="c"] #s-file { grid-column: 1; grid-row: 2; align-self: start; display: none; }
body[data-v="c"][data-phase="idle"] #s-file { display: block; align-self: center; }
body[data-v="c"][data-phase="idle"] #s-word { display: none; }
body[data-v="c"] #s-mask, body[data-v="c"] #s-done { grid-column: 1; grid-row: 2; align-self: start; min-height: 0; overflow: auto; margin-top: 14px; }
body[data-v="c"]:not([data-phase="done"]) #s-done { display: none; }
body[data-v="c"][data-phase="done"] #s-mask { display: none; }
body[data-v="c"][data-phase="scan"] #s-mask { display: none; }

/* 오른쪽: 조회와 단어 */
body[data-v="c"] #s-scan { grid-column: 2; grid-row: 1 / 3; padding-top: 22px; display: none; font-size: 13px; color: #444; min-height: 0; overflow: auto; }
body[data-v="c"][data-phase="scan"] #s-scan { display: block; }
body[data-v="c"] #register { margin-top: 10px; font-size: 15px; line-height: 1.75; letter-spacing: 0.14em; color: #333; }
body[data-v="c"] .r { display: inline; }
body[data-v="c"] .r.on { background: #111; color: #fff; }
body[data-v="c"] #s-word { grid-column: 2; grid-row: 1 / 3; display: flex; min-height: 0; padding-top: 22px; }
body[data-v="c"][data-phase="scan"] #s-word, body[data-v="c"][data-phase="done"] #s-word { display: none; }
body[data-v="c"] #s-word[data-status="past"] { display: flex; }
body[data-v="c"][data-phase="done"] #s-word[data-status="past"] { display: none; }
body[data-v="c"] #s-word .body { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; }

body[data-v="c"] #ask { display: flex; align-items: baseline; gap: 10px; }
body[data-v="c"] #ask label { font-size: 13px; color: var(--dim); white-space: nowrap; }
body[data-v="c"] #ask-input { flex: 1; min-width: 60px; padding: 0 0 2px; font-size: 19px; font-weight: 300; background: none; border: 0; border-bottom: 1px solid #111; border-radius: 0; outline: 0; }
body[data-v="c"] #ask-input::placeholder { color: #c8c8c8; }
body[data-v="c"] #ask-result { min-height: 1.6em; margin-top: 3px; font-size: 13px; color: #444; }
body[data-v="c"] #ask-result .none { color: var(--red); }
body[data-v="c"] #list-head { margin-top: 4px; font-size: 12px; color: var(--dim); }
body[data-v="c"] #wordlist { flex: 1; min-height: 0; overflow: auto; margin-top: 4px; scrollbar-width: thin; }
body[data-v="c"] .w-group { display: grid; grid-template-columns: 46px minmax(0, 1fr); padding: 3px 0; border-top: 1px solid #e6e6e6; }
body[data-v="c"] .w-group h3 { font-size: 12px; line-height: 26px; color: var(--dim); }
body[data-v="c"] .w-cells { display: flex; flex-wrap: wrap; gap: 0 3px; }
body[data-v="c"] .w { padding: 0 5px; background: none; border: 0; font-size: 16px; line-height: 26px; }
body[data-v="c"] .w:hover { text-decoration: underline; text-underline-offset: 0.22em; }
body[data-v="c"] .w[aria-pressed="true"] { background: #111; color: #fff; text-decoration: none; }

/* 남길 글자 */
body[data-v="c"] .empty { display: none; }
body[data-v="c"] #letters { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 2px; }
body[data-v="c"] .l-name { font-size: 12px; color: var(--dim); }
body[data-v="c"] .l-name b { font-weight: 400; }
body[data-v="c"] .l-drop { margin-left: 4px; }
body[data-v="c"] .l-cells { display: flex; gap: 8px; }
body[data-v="c"] .cell { display: block; width: 40px; padding: 0; background: none; border: 0; text-align: center; }
body[data-v="c"] .cell canvas { width: 40px; height: 40px; }
body[data-v="c"] .cell small { display: block; font-size: 11px; line-height: 15px; color: var(--dim); }
body[data-v="c"] .cell.none span { display: flex; align-items: center; justify-content: center; height: 40px; font-size: 19px; color: #d4d4d4; }
body[data-v="c"] .cell.none small { color: var(--red); }
body[data-v="c"] button.cell:hover canvas { outline: 1px solid #111; }
body[data-v="c"] #missing { font-size: 12.5px; color: var(--red); }
body[data-v="c"] #missing:empty { display: none; }
body[data-v="c"] #modes { display: flex; flex-wrap: wrap; gap: 0 14px; margin-top: 6px; font-size: 12.5px; color: #444; }
body[data-v="c"] #modes input { accent-color: #111; margin: 0 3px 0 0; vertical-align: -1px; }
body[data-v="c"] .actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; margin-top: 8px; }
body[data-v="c"][data-picked="no"] #s-mask :is(#modes, .actions) { display: none; }

body[data-v="c"] .btn { padding: 0; background: none; border: 0; font-size: 13.5px; text-decoration: underline; text-underline-offset: 0.24em; text-decoration-thickness: 1px; white-space: nowrap; }
body[data-v="c"] #ask .btn { font-size: 13px; }
body[data-v="c"] .btn:disabled { color: #c8c8c8; text-decoration: none; }
body[data-v="c"] .btn.primary { order: -1; font-size: 24px; font-weight: 300; text-decoration-thickness: 1.5px; }

/* 교부 */
body[data-v="c"] #done-line { display: block; font-size: 15px; }
body[data-v="c"] #done-line span { display: inline; }
body[data-v="c"] .d-sub { margin-left: 10px; font-size: 13px; color: var(--dim); }
body[data-v="c"] .d-date, body[data-v="c"] .d-office { display: none !important; }
body[data-v="c"] #print-note { margin-top: 4px; font-size: 12.5px; color: var(--dim); }

/* 문서는 아래에 한 줄로 */
body[data-v="c"] #docview {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(138px, 186px);
  justify-content: safe center;
  gap: 10px;
  overflow-x: auto;
  padding: 0 28px 14px;
  scrollbar-width: thin;
}
body[data-v="c"][data-phase="idle"] #docview { display: none; }
body[data-v="c"] .paper { outline: 1px solid #111; }
body[data-v="c"] figcaption { margin-top: 2px; font-size: 11px; color: var(--dim); }
