body { background: #f3f5f8; color: #20314a; }
.mast { background: #fff; border-bottom: 3px solid var(--orange); }
.mast-inner, #desk { max-width: 1190px; margin: auto; padding: 0 28px; }
.mast-inner { display: flex; gap: 24px; align-items: center; min-height: 88px; }
.mast-inner img { width: 170px; height: auto; }
.mast-inner span { padding-left: 24px; border-left: 1px solid var(--line); color: var(--blue); font-size: 20px; font-weight: 700; }
.desk-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 36px 0 4px; }
.station { font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.desk-heading h1 { margin: 0; font-size: clamp(29px,3.5vw,43px); letter-spacing: -.035em; }
.desk-actions { display: grid; justify-items: center; gap: 5px; }
.desk-actions .primary { font-size: 16px; min-height: 50px; }
.desk-actions a { color: var(--blue); font-size: 12px; text-underline-offset: 3px; padding: 4px; }
.screen-status { color: #4d5c70; margin: 12px 0 24px; font-size: 13px; }
.screen-status[data-state='ready'] { color: #1f6143; }
.screen-status[data-state='error'], #import-feedback[data-error='true'] { color: #8a3311; }
.desk-grid { display: grid; grid-template-columns: minmax(0,1.27fr) minmax(0,1fr); align-items: start; gap: 20px; }
.paper { padding: 23px; border: 1px solid #d7dfea; border-radius: 12px; background: #fff; }
.panel-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 15px; }
.panel-title h2 { margin: 0; font-size: 21px; }
.panel-title>span, .helper, .session-note { color: #56657a; font-size: 13px; }
.file-pick { display: flex; justify-content: center; align-items: center; gap: 11px; width: 100%; min-height: 63px; color: var(--blue); background: #f2f6fd; border: 1px dashed #8a9fbe; border-radius: 7px; font-size: 16px; }
.file-pick:hover, .file-pick.dragging { background: #e8f1ff; border-color: var(--blue); }
.file-pick>span { font-size: 22px; }
.manage .helper { margin: 7px 0 2px; }
.first-hint { font-size: 13px; padding: 8px 12px; background: #fff6e8; color: #705013; border-left: 3px solid var(--orange); margin: 15px 0 0; }
.file-progress { display: flex; align-items: center; gap: 8px; }
.file-progress p { margin: 0; }
.file-progress p:not(:empty) { margin: 8px 0; font-size: 14px; }
#document-list { margin: 12px 0 2px; border-top: 1px solid var(--line); }
.doc-row { display: grid; grid-template-columns: 47px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.doc-type { border-radius: 5px; border: 1px solid #d2deef; background: #f0f4fa; color: var(--blue); text-align: center; padding: 9px 3px; font-size: 12px; font-weight: 700; }
.doc-row h3 { color: var(--ink); font-size: 16px; margin: 0; overflow-wrap:anywhere; }
.doc-row p { color: #546680; font-size: 12px; margin: 3px 0 0; }
.doc-row .row-actions { display: flex; flex-direction: column; align-items: flex-end; }
.text-btn { padding: 5px 0; min-height: 35px; border: 0; background: transparent; color: var(--blue); font-weight: 600; font-size: 13px; text-align: left; }
.row-actions button { min-height: 30px; }
.row-actions .remove { color: #5c6777; font-weight: 400; }
.text-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.mini-frame { border: 4px solid #253448; border-radius: 7px; overflow:hidden; background: #eaf0f7; min-width: 0; aspect-ratio: 16/9; display: grid; grid-template-rows: 17% minmax(0,1fr) 9%; container-type:inline-size; }
.mini-head, .mini-foot { display: flex; align-items: center; padding: 0 3%; gap: 4%; }
.mini-head { background: white; color: var(--blue); border-bottom: 2px solid var(--orange); font-size: 2.9cqw; }
.mini-head img { height: 63%; width:auto; max-width: 23%; object-fit: contain; }
.mini-pages { min-height: 0; display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 2.4%; gap: 2%; }
.mini-pages.single { grid-template-columns:minmax(0,1fr); }
.mini-card { display:grid; grid-template-rows: 13% minmax(0,1fr); border: 1px solid #c6d3e5; background:white; border-radius: 2px; overflow:hidden; min-width: 0; min-height: 0; }
.mini-card-head { display:flex; align-items:center; justify-content:space-between; gap:3px; padding: 0 4%; border-bottom: 1px solid var(--line); font-size: 1.9cqw; line-height: 1.15; }
.mini-card-head b { overflow:hidden; text-overflow: ellipsis; white-space:nowrap; }
.mini-card-head span { white-space:nowrap; }
.mini-card .sheet { padding: 3.5%; }
.mini-card .sheet .sample { font-size: 1.2cqw; }
.mini-card .sheet h4 { font-size: 2.7cqw; margin-bottom: 1.5cqw; }
.mini-card .sheet p, .mini-card .sheet ul { font-size: 1.8cqw; }
.mini-card .sheet .smallline { font-size: 1.2cqw; }
.mini-card .sheet table { font-size: 1.6cqw; }
.mini-card .sheet .highlight { font-size: 1.8cqw; }
.mini-card .image-page,.preview-page .image-page { display:block; width:100%; height:100%; object-fit:contain; min-height:0; background:white; }
.mini-foot { background: var(--blue); color:white; justify-content:space-between; font-size:1.85cqw; }
.mini-controls, .clear-actions { display:flex; gap:16px; justify-content:flex-end; }
.mini-empty { margin:auto; text-align:center; font-size:3.5cqw; color:#52617a; }
.detail-panel { margin-top: 15px; padding: 0; }
.detail-panel summary { cursor:pointer; font-size:15px; font-weight:700; color:var(--blue); padding:15px 22px; }
.detail-body { border-top:1px solid var(--line); padding: 16px 22px; }
.detail-body label { display:block; font-size:14px; }
.detail-body label + label { margin-top:12px; }
.detail-body label select { display:block; margin:4px 0 0; width:100%; min-height:40px; }
.detail-body label + button { margin-top:12px; }
.connect-panel .detail-body { display:grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap:25px; }
.connect-panel h3,.preview-action h3 { margin:0 0 8px; font-size:17px; }
.connect-panel p { margin:5px 0 12px; font-size:14px; }
.session-note { margin:18px 0 30px; }
.preview-action .outline { width:100%; margin-top:10px; }
#preview-title { overflow-wrap:anywhere; margin-top:12px; }
.preview-page { display:grid; grid-template: minmax(0,1fr) / minmax(0,1fr); }
#clear-dialog { max-width: min(520px,96vw); }
@media (max-width:850px) { .desk-grid { grid-template-columns:1fr; } .connect-panel .detail-body { grid-template-columns:1fr; gap:12px; } }
@media (max-width:600px) {
  .mast-inner, #desk { padding-inline: 15px; }
  .mast-inner { min-height:66px; gap:15px; } .mast-inner img { width:125px; }
  .mast-inner span { padding-left:15px; font-size:17px; }
  .desk-heading { flex-direction:column; align-items:stretch; margin-top:21px; gap:12px; }
  .desk-actions { justify-items:stretch; text-align:center; } .desk-actions a { padding:7px; }
  .screen-status { margin:6px 0 1em; }
  .paper:not(.detail-panel) { padding:16px; } .panel-title h2 { font-size:18px; }
  .doc-row { grid-template-columns:40px minmax(0,1fr); gap:8px; }
  .doc-row .row-actions { grid-column:2; flex-direction:row; gap:17px; align-items:center; }
  .row-actions button { min-height:40px; } .preview-content { margin-top:10px; }
}
