:root{font-family:system-ui,"Malgun Gothic",sans-serif;color:#20392f;background:#f4f5ef;font-size:16px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,label,input,select{touch-action:manipulation}button{cursor:pointer}a{color:inherit}.mobile-home header{padding:22px 22px 10px;display:flex;align-items:center;justify-content:space-between;max-width:680px;margin:auto}.brand{font-weight:750;letter-spacing:-.5px}.text-button{border:0;background:none;color:#667a70;font-size:13px;padding:10px}.mobile-home main{padding:22px;max-width:680px;margin:auto}.eyebrow{font-size:13px;color:#61776b;letter-spacing:.03em;margin:8px 0 12px}.mobile-home h1{font-size:42px;line-height:1.18;letter-spacing:-2px;margin:0 0 14px}.intro{color:#61776b;line-height:1.6;margin-bottom:30px}.home-actions{display:grid;gap:12px}.home-actions a{display:flex;align-items:center;gap:16px;padding:22px 18px;background:#fff;border:1px solid #dce2d8;border-radius:18px;text-decoration:none;min-height:104px}.home-actions a:first-child{background:#23483b;color:white;border-color:#23483b}.action-icon{font-size:28px;width:36px;flex-shrink:0}.home-actions strong{display:block;font-size:19px}.home-actions small{display:block;font-size:12px;opacity:.7;margin-top:7px;line-height:1.5}.home-actions b{margin-left:auto;font-size:25px;font-weight:400;opacity:.6}#upload{background:white;border:1px solid #dce2d8;border-radius:18px;padding:22px;margin-top:28px;scroll-margin-top:16px}#upload h2{font-size:22px;margin:0 0 8px}#upload>p{line-height:1.65;color:#64736a;font-size:14px}.capture-button,.gallery-button{display:block;text-align:center;border-radius:10px;padding:15px;margin:12px 0;background:#23483b;color:white;font-weight:650;cursor:pointer}.gallery-button{background:#edf1e9;color:#23483b}.capture-button input,.gallery-button input{position:absolute;width:1px;height:1px;opacity:0}.type-field{display:grid;gap:8px;margin:20px 0;font-size:14px}.type-field select{padding:12px;border:1px solid #ccd6cc;border-radius:8px;background:white}.secondary{border:1px solid #cbd5ca;background:white;border-radius:8px;padding:10px 16px;color:#23483b}.queue-row{border-top:1px solid #e2e8de;padding:16px 0;overflow-wrap:anywhere}.queue-row strong{display:block;font-size:14px}.queue-row small{display:block;margin-top:6px;color:#64736a;font-size:13px}.fine-print{font-size:12px!important;color:#7a837b!important}.connection-card{padding:20px 0;color:#60766a;font-size:13px}.connection-card small{display:block;line-height:1.6;margin:10px 0}#connection-dot{color:#48875b;margin-right:8px}
.mobile-quotes .mobile-topbar{display:flex;gap:14px;align-items:center;background:#23483b;color:white;padding:14px 18px}.mobile-quotes .mobile-topbar a{color:white;text-decoration:none}.mobile-quotes #mobile-draft-banner{padding:14px;background:#fff3d6;border:1px solid #ead49d;border-radius:10px}.mobile-quotes #mobile-draft-state{font-size:13px;color:#527064;margin:8px 0}.mobile-quotes #mobile-draft-banner button{margin:8px 8px 0 0}.mobile-quotes .mobile-topbar strong{font-size:16px}
@media screen and (max-width:960px){.mobile-quotes header,.mobile-quotes main{padding:16px;max-width:100%}.mobile-quotes header{gap:12px;align-items:flex-start}.mobile-quotes h1{font-size:24px;line-height:1.3}.mobile-quotes h2{font-size:21px}.mobile-quotes input,.mobile-quotes select,.mobile-quotes textarea{font-size:16px;min-height:44px}.mobile-quotes button{min-height:44px}.mobile-quotes .grid{grid-template-columns:1fr}.mobile-quotes .summary{grid-template-columns:1fr 1fr;gap:8px}.mobile-quotes .card{padding:14px;font-size:12px}.mobile-quotes .card strong{font-size:22px}.mobile-quotes .toolbar{gap:8px;flex-wrap:wrap}.mobile-quotes .toolbar>input,.mobile-quotes .toolbar>select{flex:1 1 46%;min-width:0}.mobile-quotes .toolbar>input#search{flex-basis:100%}.mobile-quotes .quote-filters{--filter-control-height:44px}.mobile-quotes dialog{width:100%;max-width:100%;max-height:100dvh;height:100dvh;inset:0;margin:0;border-radius:0;padding:16px}.mobile-quotes .dialog-head{position:sticky;top:-16px;background:white;z-index:3;margin:-16px -16px 16px;padding:12px 16px;border-bottom:1px solid #dce2d8}.mobile-quotes .dialog-head h2{font-size:18px;line-height:1.4}.mobile-quotes #quote-form>.toolbar{position:sticky;bottom:-16px;background:white;padding:12px 0 calc(12px + env(safe-area-inset-bottom));border-top:1px solid #dce2d8;z-index:3;box-shadow:0 -8px 18px #2233440a}.mobile-quotes #quote-form>.toolbar button{flex:1 1 45%}.mobile-quotes .scroll{max-width:100%;overflow-x:auto}.mobile-quotes #items input[data-field="name"]{min-width:150px}.mobile-quotes #items input[data-field="qty"]{min-width:62px}.mobile-quotes #items input[data-field="price"]{min-width:110px}.mobile-quotes #catalog{padding:16px}.mobile-quotes #document-view{padding:10px}.mobile-quotes .document-actions{gap:6px;flex-wrap:wrap}.mobile-quotes .document-actions button{padding:10px}.mobile-quotes #document-paper{overflow:auto}.mobile-quotes #summary small{line-height:1.6}.mobile-quotes #example,.mobile-quotes #staff-access{display:none}.mobile-quotes #list tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;background:white;margin:10px 0;border:1px solid #dce2d8;border-radius:12px;padding:15px}.mobile-quotes #list td{display:block;border:0;padding:0;overflow-wrap:anywhere;min-width:0;font-size:14px}.mobile-quotes #list td:nth-child(2){grid-column:1/-1;grid-row:1;font-size:17px}.mobile-quotes #quote-list-panel>.scroll>table{display:block;min-width:0;width:100%;background:transparent}.mobile-quotes #quote-list-panel>.scroll>table>thead{display:none}.mobile-quotes #list{display:block}.mobile-quotes #list tr td[colspan]{grid-column:1/-1}.mobile-quotes #list .quote-order-choices input{min-height:0}}
@media print{.mobile-topbar,#mobile-draft-banner,#mobile-draft-state{display:none!important}}
@media screen and (max-width:700px){.mobile-quotes #editor .scroll>table{min-width:0;width:100%}.mobile-quotes #editor .scroll>table>thead{display:none}.mobile-quotes #items,.mobile-quotes #schedule{display:block}.mobile-quotes #items>tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;padding:16px;border:1px solid #dce2d8;border-radius:12px;margin:12px 0;background:#f7f9f4}.mobile-quotes #items td{display:block;border:0;padding:0;min-width:0}.mobile-quotes #items td:nth-child(1),.mobile-quotes #items td:nth-child(4),.mobile-quotes #items td:nth-child(5),.mobile-quotes #items td:nth-child(6){grid-column:1/-1}.mobile-quotes #items input,.mobile-quotes #items select{width:100%;min-width:0!important;margin-top:6px}.mobile-quotes #items td::before{display:block;font-size:13px;color:#607166}.mobile-quotes #items td:nth-child(1)::before{content:'품목 · 규격'}.mobile-quotes #items td:nth-child(2)::before{content:'수량'}.mobile-quotes #items td:nth-child(3)::before{content:'단위'}.mobile-quotes #items td:nth-child(4)::before{content:'단가'}.mobile-quotes #items td:nth-child(5)::before{content:'할인'}.mobile-quotes #items td:nth-child(6){display:flex;gap:8px}.mobile-quotes #schedule>tr{display:grid;grid-template-columns:1fr;gap:8px;border:1px solid #dce2d8;padding:12px;border-radius:10px;margin:10px 0}.mobile-quotes #schedule td{padding:0;border:0}.mobile-quotes #schedule input{width:100%;min-width:0}}

.mobile-account main{max-width:540px;margin:50px auto;padding:28px;background:white;border:1px solid #dce2d8;border-radius:18px}.mobile-account h1{font-size:26px}.mobile-account p{line-height:1.65}.mobile-account label{display:grid;gap:8px;margin:22px 0}.mobile-account input{width:100%;padding:12px;border:1px solid #ccd6cc;border-radius:8px}.mobile-account button{background:#23483b;color:white;border:0;padding:14px 22px;border-radius:8px}

#mobile-draft-banner button{margin:4px 8px 4px 0}#mobile-draft-banner .draft-discard{background:white;color:#8a3e31;border:1px solid #d6b9ad}

#upload .queue-row button{margin:10px 8px 0 0;min-height:44px;font-size:13px}
#upload-state{font-variant-numeric:tabular-nums}
.mobile-quote-search{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin:12px 0}
.mobile-quote-search input{width:100%}
.mobile-search-scope{flex:1;min-width:8em;margin:0;color:#52675e;font-size:14px}
.mobile-quote-options{margin:10px 0;padding:0 12px;border:1px solid #dce2d8;border-radius:10px;background:white}
.mobile-quote-options>summary{padding:12px 0;cursor:pointer}
.mobile-quote-options>.toolbar{margin-bottom:12px}

@media print{.mobile-quote-search,.mobile-quote-options{display:none!important}}

.photo-progress{margin-top:16px;padding:14px 16px;border:1px solid #dce2d8;border-radius:12px;background:#f5f8f4}
.photo-progress h3{margin:0 0 8px}
.photo-progress p{margin:4px 0;overflow-wrap:anywhere}
.photo-progress ul{margin:10px 0 0;padding-left:20px;line-height:1.7}

/* The mobile top bar already links back to the portal. */
.mobile-quotes > header a { display: none; }

/* Keep amounts readable when the quote list is laid out as cards. */
@media screen and (max-width: 960px) {
  .mobile-quotes .mobile-topbar { padding-block: 4px; }

  .mobile-quotes .mobile-topbar a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
  }

  .mobile-quotes .quote-order-choices label { min-height: 44px; }

  .mobile-quotes #list td:nth-child(n+4) {
    font-variant-numeric: tabular-nums;
  }

  .mobile-quotes #list td:nth-child(n+4)::before {
    display: block;
    margin-bottom: 3px;
    color: #52675e;
    font-size: 12px;
  }

  .mobile-quotes #list td:nth-child(4)::before { content: '견적금액'; }
  .mobile-quotes #list td:nth-child(5)::before { content: '받은 대금'; }
  .mobile-quotes #list td.payable ~ td:nth-child(5)::before { content: '지급한 대금'; }
  .mobile-quotes #list td:nth-child(6)::before { content: '남은 대금'; }
  .mobile-quotes #list td:nth-child(7)::before { content: '기한 초과'; }
  .mobile-quotes #list td.quote-overdue-empty { display: none; }
}

@media screen and (max-width: 400px) {
  .mobile-quotes .quote-filters .range-tools {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .mobile-quotes .range-tools .period-field {
    grid-template-columns: 4em minmax(0, 1fr);
    align-items: center;
  }

  .mobile-quotes .range-separator { display: none; }
}
