/* 기본설정: 업무흐름은 옅은 노란색, 이용자 적색/예측 녹색/경매 청색/과거 갈색은 기존 계열 유지.
   점선 격자와 6번 채운 삼각 화살표는 구조 표시이며 API/모델 신호색을 변경하지 않는다. */
:root{--flow-ink:#70540b;--flow-paper:#fff5d6;--flow-tint:#f8e6a7;--flow-edge:#cdb86f}
body[data-theme=flow]{--section-ink:var(--flow-ink);--section-tint:var(--flow-tint);--section-paper:var(--flow-paper);--section-edge:var(--flow-edge)}
#tab-flow{--tab-ink:var(--flow-ink);--tab-tint:var(--flow-tint);--tab-edge:var(--flow-edge)}
#tab-flow[aria-current]{background:var(--flow-tint);color:var(--flow-ink);border-color:var(--flow-edge);border-bottom:3px solid var(--flow-ink)}
.app-tabs{gap:3px;padding-left:4px;padding-right:4px}.app-tabs a{font-size:12px;white-space:normal}.app-tabs .tab-selected-mark{width:.8em;margin-right:.1em}
#flow-screen{max-width:656px;color:var(--flow-ink);background:var(--flow-paper)}
.flow-current{padding:12px;border:1px solid var(--flow-edge);border-radius:9px;background:#fff9e7;font-size:13px;overflow-wrap:anywhere}
.flow-grid{border-collapse:collapse;table-layout:fixed;width:100%;background:var(--flow-paper)}
.flow-grid th,.flow-grid td{border-top:1px dashed #d8c98e;border-bottom:1px dashed #d8c98e;border-left:2px dotted #bca353;border-right:2px dotted #bca353;padding:9px 4px;text-align:center;font-size:12px;vertical-align:middle;overflow-wrap:anywhere}
.flow-grid thead th{height:58px;background:#f8e9b9}.flow-grid tbody th{text-align:center;padding:7px 4px;background:#f8e9b9}
.flow-step-number{display:block;font-size:14px;font-weight:700;margin-bottom:3px}.flow-step-name{display:block;font-size:13px;line-height:1.4;word-break:keep-all}
.flow-grid td{height:102px;position:relative}.flow-grid .flow-reserve td,.flow-grid .flow-reserve th{height:44px}
body #flow-screen .flow-button{width:100%;min-height:46px;padding:8px 2px;border:1px solid #a88a32;border-bottom-width:3px;border-radius:7px;background:linear-gradient(#f6dd86,#ebc75c);color:#533e08;box-shadow:0 2px 3px #70540b20;font-size:12px;line-height:1.4;font-weight:700;position:relative;overflow:visible}
body #flow-screen .flow-wide{font-size:15px}#flow-screen .flow-button:disabled{opacity:1;background:#eee0b5;color:#877445;border-color:#cdbb86;box-shadow:none}
/* 적용된 설정은 녹색 상태로 표시하고 다음 조회 메뉴를 느린 신호등으로 안내한다. */
body #flow-screen .flow-button.flow-complete{background:linear-gradient(#e2f2dc,#cbe6c2);border-color:#7aaa72;color:#285322}
body #flow-screen [data-flow-role]{word-break:keep-all}
body #flow-screen [data-flow-go=forecast]{display:flex;align-items:center;justify-content:center;gap:7px}
.flow-traffic{display:inline-flex;gap:3px;align-items:center;padding:4px;background:#4d5144;border-radius:7px;flex-shrink:0}
.flow-traffic[hidden]{display:none!important}.flow-traffic i{display:block;width:7px;height:7px;border-radius:50%;background:#a1a68f}
.flow-traffic i:first-child{background:#ac7770}.flow-traffic i:nth-child(2){background:#b4a16a}.flow-traffic i:last-child{background:#77e87c;animation:flow-signal 1.8s ease-in-out infinite}
@keyframes flow-signal{0%,100%{opacity:1;box-shadow:0 0 4px #77e87c}50%{opacity:.4;box-shadow:none}}
@media(prefers-reduced-motion:reduce){.flow-traffic i:last-child{animation:none}}
.flow-to-file::after{content:'';position:absolute;left:calc(50% - 1.5px);top:calc(100% + 4px);height:20px;border-left:3px solid var(--flow-ink);pointer-events:none;z-index:3}
.flow-file-join{position:absolute;top:-5px;left:0;width:100%;height:31px;pointer-events:none;z-index:3;color:var(--flow-ink)}
.flow-file-join span:first-child{position:absolute;top:0;left:37.5%;right:12.5%;border-top:3px solid currentColor}
.flow-file-join span:nth-child(2){position:absolute;top:0;left:calc(50% - 1.5px);height:13px;border-left:3px solid currentColor}
.flow-file-join span:last-child{position:absolute;top:13px;left:calc(50% - 9px);border-left:9px solid transparent;border-right:9px solid transparent;border-top:13px solid currentColor}
.html-request-dialog{box-sizing:border-box;width:min(94vw,480px);max-height:85vh;overflow:auto;padding:20px;border:1px solid var(--flow-edge);border-radius:14px;background:var(--flow-paper);color:var(--flow-ink)}
.html-request-dialog::backdrop{background:#302715aa}.html-request-dialog h2{font-size:20px}.html-request-dialog label{display:block;font-size:16px}.html-request-dialog input{display:block;box-sizing:border-box;width:100%;min-height:46px;margin-top:8px;padding:9px;font-size:18px;border:1px solid var(--flow-edge);border-radius:6px}.html-request-dialog p{font-size:13px;line-height:1.6}.html-request-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.html-request-actions button{min-height:44px;padding:8px 20px;border:1px solid var(--flow-edge);border-bottom-width:3px;border-radius:6px;background:var(--flow-tint);color:var(--flow-ink);font-size:16px}
.html-request-settings{margin-top:14px;padding:10px 12px;background:#fff9e7;border:1px dashed var(--flow-edge);border-radius:8px}.html-request-settings h3{font-size:15px;margin:0 0 8px}.html-request-settings dl{display:grid;grid-template-columns:65px minmax(0,1fr);gap:7px 10px;margin:0;font-size:15px}.html-request-settings dt{font-weight:700}.html-request-settings dd{margin:0;overflow-wrap:anywhere}
/* 글자 확대: 열 폭은 유지하고 줄바꿈과 최소 터치 높이로 모바일 가독성을 확보한다. */
.app-tabs a{font-size:clamp(13px,4vw,18px);font-weight:800;line-height:1.25;word-break:keep-all;min-height:56px;padding-left:2px;padding-right:2px}
.app-tabs .tab-selected-mark{position:absolute;left:4px;top:4px;font-size:10px;line-height:1;width:auto;margin:0}
.flow-grid thead th{font-size:clamp(15px,4vw,19px);font-weight:800;line-height:1.4;padding-left:2px;padding-right:2px;word-break:keep-all;height:70px}
.flow-grid thead th[role=button]{cursor:zoom-in}.flow-grid thead th[role=button]:focus-visible{outline:2px solid var(--flow-ink);outline-offset:-3px}
.flow-step-number{font-size:17px}.flow-step-name{font-size:clamp(15px,4vw,19px);font-weight:800;line-height:1.4}
body #flow-screen [data-flow-role]{font-size:clamp(15px,4vw,19px);line-height:1.3;min-height:52px}
body #flow-screen .flow-wide{font-size:clamp(17px,4.4vw,21px)!important;font-weight:800;line-height:1.35}
body #flow-screen #flow-institution-forecast,body #flow-screen #flow-institution-history{font-size:15px;font-weight:800;word-break:keep-all}
.flow-title-dialog{box-sizing:border-box;width:min(92vw,470px);padding:24px;border:1px solid var(--flow-edge);border-radius:14px;background:var(--flow-paper);color:var(--flow-ink);text-align:center}.flow-title-dialog::backdrop{background:#302715aa}.flow-title-dialog strong{display:block;line-height:1.5;overflow-wrap:anywhere;margin:0 0 20px}.flow-title-dialog button{font-size:17px;min-height:44px;padding:8px 24px;background:var(--flow-tint);color:var(--flow-ink);border:1px solid var(--flow-edge);border-radius:6px}
.flow-link::after{content:'';position:absolute;left:calc(50% - 1.5px);top:calc(100% + 4px);height:33px;border-left:3px solid var(--flow-ink);opacity:.85;pointer-events:none;z-index:2}
.flow-link::before{content:'';position:absolute;left:calc(50% - 9px);top:calc(100% + 35px);width:0;height:0;border-left:9px solid transparent;border-right:9px solid transparent;border-top:13px solid var(--flow-ink);opacity:.85;pointer-events:none;z-index:2}
.flow-institution-link::after{height:135px}.flow-institution-link::before{top:calc(100% + 137px)}
/* 이용자 제목과 설정 입력을 같은 세로 영역으로 이어 주고, 세 일반 이용자는 한 경로로 합류한다. */
.flow-grid thead th:not(:first-child){border-bottom:0;background:#f8e9b9}
.flow-grid tbody tr:first-child td{border-top:0;background:#f8e9b9}
.flow-grid [data-flow-role]:not([data-flow-role=institution])::after{height:20px}
.flow-grid [data-flow-role]:not([data-flow-role=institution])::before{display:none}
.flow-join{position:absolute;top:-5px;left:0;width:100%;height:31px;pointer-events:none;z-index:3;color:var(--flow-ink)}
.flow-join-bar{position:absolute;top:0;left:16.6667%;right:16.6667%;border-top:3px solid currentColor}
.flow-join-stem{position:absolute;top:0;left:calc(50% - 1.5px);height:13px;border-left:3px solid currentColor}
.flow-join-arrow{position:absolute;top:13px;left:calc(50% - 9px);border-left:9px solid transparent;border-right:9px solid transparent;border-top:13px solid currentColor}
#flow-status{font-size:12px;color:var(--flow-ink)}
.flow-return{display:inline-block;margin:0 0 12px;padding:8px 12px;border:1px solid var(--section-edge);border-bottom-width:3px;border-radius:6px;background:var(--section-tint);color:var(--section-ink);font-size:13px;font-weight:700;text-decoration:none}
.flow-settings-dialog{box-sizing:border-box;width:min(94vw,550px);max-height:86vh;overflow:auto;padding:14px;border:1px solid #e1b8b8;border-radius:15px;background:#fff0ef;color:#9f3f45}.flow-settings-dialog::backdrop{background:#30201faa}.flow-settings-close{display:block;margin:0 0 12px auto}.flow-settings-dialog .user-band[hidden]{display:none!important}
/* 표시용 표와 입력상자는 현재 탭의 색상을 따른다. 상승/하락 신호색은 원본 유지. */
body[data-theme] .screen .dung-choice-trigger{color:var(--section-ink);background:var(--section-paper);border-color:var(--section-edge)}
body[data-theme] .screen .dung-choice-panel{background:var(--section-paper);border-color:var(--section-edge)}
body[data-theme] .data-zoom-dialog{background:var(--section-paper);color:var(--section-ink);border-color:var(--section-edge)}
body[data-theme] .data-zoom-dialog .data-zoom-table th{background:var(--section-tint)}
body[data-theme] .data-zoom-dialog .data-zoom-table th,body[data-theme] .data-zoom-dialog .data-zoom-table td{border-color:var(--section-edge)}
@media(max-width:360px){.app-tabs a{font-size:11px;padding-left:1px;padding-right:1px}#flow-screen{padding:16px 7px}.flow-grid th,.flow-grid td{padding:8px 3px}.flow-grid .flow-wide{font-size:13px!important}}

/* 확정된 6단계 구성: 기존 단계/이용자 표시와 색상을 유지하고 두 연결축만 정렬한다. */
.flow-grid thead th,.flow-grid tbody th,.flow-step-number,.flow-step-name{color:var(--flow-ink)}
.flow-grid tbody th{background:#f8e9b9}
.flow-grid tbody tr:nth-child(n+2):nth-child(-n+5) td{height:82px}
.flow-grid tbody tr:nth-child(5) td{padding-top:19px}
#flow-screen{position:relative}
#flow-screen .flow-link::before,#flow-screen .flow-link::after,#flow-screen .flow-to-file::after,#flow-screen .flow-join,#flow-screen .flow-file-join{display:none}
.flow-wires{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:3;color:var(--flow-ink)}
.flow-comparison-dialog{box-sizing:border-box;width:min(92vw,470px);padding:20px;border:1px solid var(--flow-edge);border-radius:12px;background:var(--flow-paper);color:var(--flow-ink)}
.flow-comparison-dialog::backdrop{background:#302715aa}.flow-comparison-dialog h2{font-size:20px}.flow-comparison-dialog p{line-height:1.6;overflow-wrap:anywhere}.flow-comparison-dialog button{min-height:44px;padding:8px 22px;border:1px solid var(--flow-edge);border-bottom-width:3px;border-radius:6px;background:var(--flow-tint);color:var(--flow-ink)}

/* 가격비교표: 앱 내부 문서를 모바일 전체 높이로 표시하고 복귀 버튼 유지. */
.flow-comparison-dialog{width:min(100vw,520px);height:96dvh;max-height:96dvh;max-width:100vw;padding:0;overflow:hidden;background:#e0f0e3}
.flow-comparison-dialog[open]{display:flex;flex-direction:column}
.flow-comparison-close{flex:none;align-self:flex-end;margin:6px 10px}
.flow-comparison-frame{display:block;flex:1;width:100%;min-height:0;border:0}
