/* 소방 타임머신 앱 화면 /timemachine — 2026-11-16 시안 모양을 .tma 안으로 옮긴 판을 2026-11-28 개편(시안 V5-Home · V3-First · V2-Panel · V3-Sheet · V2-Search).
   사이트 글꼴(Pretendard)·밝은 화면 하나(docs/screens/design-rules.md). 색은 아래 변수 + 주황 단추 #cc4d00(흰 글자 4.5:1).
   모서리 8(작은 단추·입력)·12(카드·큰 단추·판)·999(칩)·6(딱지), 간격 4의 배수, 누르는 칸 44px 이상, 입력 16px.
   PC(900px~)는 목록 | 상세 두 칸, 아래 메뉴는 감춘다(사용자 2026-11-10). 검색용 쪽 모양은 timemachine.css */
@media (min-width: 900px) {
    .qz.tm-wide { max-width: 1120px; padding: 0 24px 48px; }
    .qz-body .qz.tm-wide.has-menu { padding-bottom: 48px; }
    .qz.tm-wide .qz-nav { display: none; }
}
.qz .tm[hidden] { display: none; }
.qz .tma {
    --bg: #f6f4f2; --card: #fff; --fg: #1d1b19; --sub: #6e6a66; --faint: #8a857f; --line: #e6e6e8;
    --accent: #f26a00; --accent-soft: #fff1e6; --chg: #2457c5; --chip: #efece8; --ink: #1d1b19; --on-ink: #fff;
    --tagfg: #b34700; --btn: #cc4d00; --btnfg: #fff;
    font-size: 15px; line-height: 1.5; color: var(--fg);
}
.qz .tma [hidden] { display: none !important; }
.qz .tma button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.qz .tma .card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.qz .tma-wait { padding: 48px 0; text-align: center; color: var(--sub); }
.qz .tma .tma-h1 { margin: 0 0 12px; min-height: 44px; display: flex; align-items: center; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.qz .tma .tma-col { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.qz .tma .tma-cbt { max-width: 560px; margin-top: 12px; }

/* 첫 화면 — 최근 현장 큰 카드 (V5-Home) */
.qz .tma .tma-site { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.qz .tma .tma-site-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.qz .tma .tma-site-t b { font-size: 17px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.qz .tma .tma-site-t span { font-size: 15px; color: var(--sub); font-variant-numeric: tabular-nums; }
.qz .tma .tma-go { width: 100%; min-height: 56px; border-radius: 12px; background: var(--btn); color: var(--btnfg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 12px; }
.qz .tma .tma-go b { font-size: 17px; font-weight: 700; }
.qz .tma .tma-go span { font-size: 13px; color: #fff; font-variant-numeric: tabular-nums; }
.qz .tma .tma-go:disabled { opacity: .45; cursor: default; }
.qz .tma .tma-rows { display: flex; flex-direction: column; overflow: hidden; }
.qz .tma .tma-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; text-align: left; border-top: 1px solid var(--line); }
.qz .tma .tma-row:first-child { border-top: 0; }
.qz .tma .tma-row-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qz .tma .tma-row-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qz .tma .tma-row-t small { font-size: 13px; color: var(--sub); font-variant-numeric: tabular-nums; }
.qz .tma .tma-chev { flex: none; font-size: 17px; color: var(--sub); }
.qz .tma .tma-login { min-height: 44px; display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--sub); text-decoration: none; }
.qz .tma .tma-login::after { content: "\203A"; color: var(--sub); }
.qz .tma .tma-field { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-align: left; font-size: 16px; color: var(--sub); }
.qz .tma .tma-field span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qz .tma .tma-field.in { border-radius: 8px; padding: 0 12px; color: var(--fg); }
.qz .tma .tma-field.in span.ph { color: var(--sub); }
.qz .tma .tma-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qz .tma .tma-out { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; font-size: 15px; color: var(--fg); }
.qz .tma .tma-out.sm { align-self: flex-start; margin-top: 12px; font-size: 13px; }

/* 넣기 칸 (V3-First · V2-Panel) */
.qz .tma .tma-entry { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.qz .tma .tma-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: var(--bg); border-radius: 8px; padding: 4px; }
.qz .tma .tma-seg button { min-height: 44px; border-radius: 8px; font-size: 15px; color: var(--sub); }
.qz .tma .tma-seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); font-weight: 700; }
.qz .tma .tma-err { font-size: 15px; font-weight: 700; color: #b42318; }
.qz .tma .tma-band { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 52px; padding: 8px 12px; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.qz .tma .tma-band > svg { flex: none; color: var(--sub); transition: transform .15s; }
.qz .tma .tma-band[aria-expanded="true"] > svg { transform: rotate(180deg); }
.qz .tma .tma-band-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qz .tma .tma-band-t b { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.qz .tma .tma-band-t > span { font-size: 13px; color: var(--sub); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qz .tma .tma-tag { display: inline-block; margin-left: 4px; font-size: 13px; font-weight: 700; color: var(--tagfg); background: var(--accent-soft); border-radius: 6px; padding: 0 8px; line-height: 1.7; vertical-align: 1px; }
.qz .tma .tma-year { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qz .tma .tma-num { min-height: 48px; box-sizing: border-box; display: flex; align-items: center; gap: 4px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-size: 15px; }
.qz .tma .tma-num:focus-within { border-color: var(--ink); }
.qz .tma .tma-num > span { flex: none; color: var(--sub); }
.qz .tma .tma-num input { width: 100%; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--fg); font-variant-numeric: tabular-nums; }
.qz .tma .tma-num.y { width: 140px; min-height: 52px; }
.qz .tma .tma-floors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qz .tma .tma-area { border-top: 1px solid var(--line); }
.qz .tma .tma-area summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; font-size: 15px; }
.qz .tma .tma-area summary::-webkit-details-marker { display: none; }
.qz .tma .tma-area summary svg { color: var(--sub); transition: transform .15s; }
.qz .tma .tma-area[open] summary svg { transform: rotate(180deg); }
.qz .tma .tma-area .tma-num { max-width: 200px; }
.qz .tma .tma-uses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.qz .tma .chip { flex: none; min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--line); border-radius: 999px; font-size: 15px; color: var(--fg); white-space: nowrap; }
.qz .tma .chip.u { padding: 0 4px; font-size: 15px; }
.qz .tma .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); font-weight: 700; }
.qz .tma .tma-chips { display: flex; gap: 8px; }
.qz .tma .tma-chips.wrap { flex-wrap: wrap; }
.qz .tma .tma-chips.row { overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
.qz .tma .tma-chips.row::-webkit-scrollbar { display: none; }
.qz .tma .tma-old { font-size: 15px; font-weight: 700; color: var(--tagfg); background: var(--accent-soft); border-radius: 12px; padding: 16px; text-align: center; }
.qz .tma .tma-old.big { margin-top: 12px; }
/* 360폭에서 '공연·집회'가 4칸에 안 들어가면 3칸 (명세 화면 5-3) */
@media (max-width: 374px) { .qz .tma .tma-uses { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* 결과표 (V3-Sheet) */
.qz .tma .tma-sheetband { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 56px; padding: 4px 4px 4px 16px; text-align: left; }
.qz .tma .tma-change { flex: none; min-height: 44px; padding: 0 12px; display: flex; align-items: center; gap: 4px; font-size: 15px; }
.qz .tma .listcol { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.qz .tma .tma-search { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 4px 0 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.qz .tma .tma-search.on, .qz .tma .tma-search:focus-within { border: 2px solid var(--ink); padding-left: 15px; padding-right: 3px; }
.qz .tma .tma-search > svg { flex: none; }
.qz .tma .tma-search input { flex: 1; min-width: 0; min-height: 44px; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--fg); }
.qz .tma .tma-search input::-webkit-search-cancel-button { display: none; }
.qz .tma .tma-clear { width: 44px; height: 44px; flex: none; display: grid; place-items: center; color: var(--sub); }
.qz .tma .tma-list { display: flex; flex-direction: column; overflow: hidden; }
.qz .tma .tma-r { display: flex; justify-content: space-between; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; box-sizing: border-box; text-align: left; border-top: 1px solid var(--line); color: var(--fg); text-decoration: none; }
.qz .tma .tma-r:first-child { border-top: 0; }
.qz .tma .tma-r[aria-current="true"] { box-shadow: inset 3px 0 var(--btn); }
.qz .tma .tma-r-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qz .tma .tma-r-l .e { font-size: 13px; color: var(--sub); }
.qz .tma .tma-r-l .n { font-size: 15px; line-height: 1.4; }
.qz .tma .tma-r-v { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; max-width: 50%; text-align: right; }
.qz .tma .tma-r-v b { font-size: 15px; font-weight: 700; line-height: 1.35; font-variant-numeric: tabular-nums; }
.qz .tma .tma-r-v b.wait { color: var(--sub); }
.qz .tma .tma-r-v .s { font-size: 13px; color: var(--sub); }
.qz .tma .tma-r-v .s.me { color: var(--fg); font-weight: 700; }
.qz .tma .chg { font-size: 13px; color: var(--chg); font-weight: 700; }
.qz .tma .tag { display: inline-block; font-size: 13px; font-weight: 700; border-radius: 6px; padding: 0 8px; line-height: 1.7; }
.qz .tma .tag.back { background: var(--accent-soft); color: var(--tagfg); }
.qz .tma .tag.may { background: var(--chip); color: var(--sub); }
.qz .tma .empty { padding: 24px 16px; text-align: center; color: var(--sub); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qz .tma .empty b { display: block; color: var(--fg); }
.qz .tma .tma-link { min-height: 44px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 700; color: var(--fg); }

/* 건물 없이 찾기 (V2-Search) */
.qz .tma .tma-nowband { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 4px 16px; }
.qz .tma .tma-sgo { min-height: 44px; padding: 0 12px; border-radius: 8px; background: var(--btn); color: var(--btnfg); display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }

/* 앱 안 질문 상세 */
.qz .tma .layout { display: block; }
.qz .tma .detail { display: none; }
.qz .tma .dhead { display: flex; align-items: center; gap: 8px; padding: 12px 0; }
.qz .tma .dhead .back { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.qz .tma .dhead .t { flex: 1; min-width: 0; }
.qz .tma .dhead .t small { display: block; font-size: 13px; color: var(--sub); }
.qz .tma .dhead .t b { font-size: 17px; font-weight: 700; line-height: 1.3; }
.qz .tma .dbody { display: flex; flex-direction: column; gap: 8px; }
.qz .tma .cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qz .tma .cmp > div { padding: 12px 16px; min-width: 0; }
.qz .tma .cmp .w { font-size: 13px; color: var(--sub); }
.qz .tma .cmp .w b { color: var(--fg); font-variant-numeric: tabular-nums; }
.qz .tma .cmp .v { font-size: 17px; font-weight: 700; line-height: 1.35; margin-top: 2px; }
.qz .tma .cmp .v small { display: block; font-size: 13px; color: var(--sub); font-weight: 400; margin-top: 2px; }
.qz .tma .cmp .now { background: var(--chip); border-color: transparent; }
.qz .tma .cmp .now.diff .v { color: var(--chg); }
.qz .tma .cmp .now.diffsub .v small { color: var(--chg); font-weight: 700; }
.qz .tma .cmp .v .part { display: block; font-size: 15px; margin-top: 2px; }
.qz .tma .cmp .v .tag { margin-top: 8px; }
.qz .tma .br { overflow: hidden; }
.qz .tma .br > div { display: grid; grid-template-columns: minmax(84px, 38%) 1fr; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--line); align-items: baseline; }
.qz .tma .br > div:first-child { border-top: 0; }
.qz .tma .br .k { font-size: 13px; color: var(--sub); }
.qz .tma .br .v b { font-weight: 700; }
.qz .tma .br .v small { display: block; color: var(--sub); font-size: 13px; }
.qz .tma .br .v small.chg { color: var(--chg); }
.qz .tma .br > div.me { background: var(--accent-soft); }
.qz .tma .br > div.me .k { color: var(--tagfg); font-weight: 700; }
.qz .tma .hd { font-size: 13px; font-weight: 700; color: var(--sub); padding: 4px 0 0; }
.qz .tma .tl > div { display: grid; grid-template-columns: 96px 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); align-items: baseline; }
.qz .tma .tl > div:first-child { border-top: 0; }
.qz .tma .tl .y { font-size: 13px; color: var(--sub); font-variant-numeric: tabular-nums; }
.qz .tma .tl .a b { font-weight: 700; }
.qz .tma .tl .a b.c { color: var(--chg); }
.qz .tma .tl .a small { display: block; font-size: 13px; color: var(--sub); }
.qz .tma .tl .a .tag { margin-left: 4px; }
.qz .tma .tl > div.me { box-shadow: inset 3px 0 var(--btn); padding-left: 8px; }
.qz .tma details.more { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
.qz .tma details.more summary { list-style: none; cursor: pointer; min-height: 48px; box-sizing: border-box; padding: 12px 0; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.qz .tma details.more summary::-webkit-details-marker { display: none; }
.qz .tma details.more summary span { flex: 1; text-align: right; font-size: 13px; color: var(--sub); font-weight: 400; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qz .tma details.more summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(45deg); margin-top: -4px; }
.qz .tma details.more[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.qz .tma details.more .in { padding: 0 0 16px; font-size: 13px; line-height: 1.65; display: flex; flex-direction: column; gap: 8px; }
.qz .tma details.more .src { color: var(--sub); font-weight: 700; }
.qz .tma .qlink { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--fg); text-decoration: none; }
.qz .tma .qlink .tx { flex: 1; min-width: 0; }
.qz .tma .qlink .tx b { display: block; }
.qz .tma .qlink .tx small { font-size: 13px; color: var(--sub); }
/* 카톡 노랑 그대로(design-rules.md 「색」) */
.qz .tma .tma-share { display: flex; gap: 8px; }
.qz .tma .tma-kakao { flex: 1; min-height: 48px; border-radius: 12px; background: #fee500; color: #191919; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; }
.qz .tma .tma-sq { width: 48px; height: 48px; flex: none; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; background: var(--card); display: grid; place-items: center; }

/* 아래에서 올라오는 창 — 화면 맨 위에 덮으므로 .qz 밖(#tmLayer)에 둔다 */
.tma-layer .sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: rgba(20, 16, 12, .45); }
.tma-layer .pane { background: #f6f4f2; color: #1d1b19; width: 100%; max-width: 560px; max-height: 86%; overflow: auto; border-radius: 12px 12px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px)); font-size: 15px; line-height: 1.5; }
.tma-layer button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.tma-layer .card { background: #fff; border: 1px solid #e6e6e8; border-radius: 12px; }
.tma-layer .sh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tma-layer .sh b { font-size: 17px; font-weight: 700; }
.tma-layer .sh .x { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; margin-right: -8px; }
.tma-layer .glh { font-size: 13px; font-weight: 700; color: #6e6a66; margin: 16px 0 8px; }
.tma-layer .gl { overflow: hidden; margin: 0; }
.tma-layer .gl > div { padding: 12px 16px; border-top: 1px solid #e6e6e8; }
.tma-layer .gl > div:first-child { border-top: 0; }
.tma-layer .gl dt { font-weight: 700; }
.tma-layer .gl dd { margin: 2px 0 0; font-size: 13px; color: #6e6a66; }
.tma-layer .tag { display: inline-block; font-size: 13px; font-weight: 700; border-radius: 6px; padding: 0 8px; line-height: 1.7; }
.tma-layer .tag.back { background: #fff1e6; color: #b34700; }
.tma-layer .tag.may { background: #efece8; color: #6e6a66; }
.tma-layer .chg { color: #2457c5; }
.tma-toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: #1d1b19; color: #fff; font-size: 15px; font-weight: 700; border-radius: 999px; padding: 8px 16px; z-index: 50; max-width: 90%; overflow-wrap: anywhere; }

/* 넓은 화면: 목록 | 상세 */
@media (min-width: 900px) {
    .qz .tma .layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
    .qz .tma .layout .detail { display: block; position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow: auto; padding: 12px 0 20px; }
    .qz .tma .dhead .back { display: none; }
    .qz .tma .tma-chips.row { margin-right: 0; padding-right: 0; }
}
@media (max-width: 899px) {
    body.tma-reading .qz .tma .listcol { display: none; }
    body.tma-reading .qz .tma .detail { display: block; }
}
