@media (max-width: 767px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  body{min-width:0}
  button,input,select{font-size:16px;touch-action:manipulation}

  .login-screen{display:block;overflow-y:auto;padding:96px 14px 28px}
  .login-brand{left:20px;top:18px}
  .login-card{width:100%;max-width:430px;margin:0 auto;padding:28px 22px;border-radius:10px}
  .login-card h1{font-size:25px}
  .login-card>p:not(.eyebrow):not(.form-error){margin-bottom:20px}
  .login-card input{width:100%;font-size:16px}
  .login-card button{position:relative;z-index:3;min-height:48px}
  .login-card .install-app{margin-top:10px}

  .shell{display:block;min-height:100vh}
  .mobile-app-header{position:sticky;top:0;z-index:55;display:flex;align-items:center;justify-content:space-between;height:62px;padding:8px 14px;background:rgba(24,57,87,.97);color:#fff;box-shadow:0 6px 24px rgba(16,43,67,.16);backdrop-filter:blur(12px)}
  .mobile-brand{display:flex;align-items:center;gap:8px;color:#fff;text-decoration:none}
  .mobile-brand .brand-mark{width:34px;height:34px;font-size:17px}
  .mobile-brand b,.mobile-brand small{display:block}
  .mobile-brand b{font-size:14px}.mobile-brand small{margin-top:1px;color:#bad2e4;font-size:6px;letter-spacing:.16em}
  .mobile-header-actions{display:none}
  .mobile-header-actions button{min-height:36px;padding:7px 9px;border:1px solid rgba(255,255,255,.16);border-radius:9px;background:rgba(255,255,255,.08);color:#fff;font-size:11px;font-weight:700}

  #dashboard.active>:not(.mobile-launcher){display:none}
  .mobile-launcher{display:block;min-height:calc(100dvh - 142px);padding:22px 0 18px}
  .launcher-heading{display:flex;align-items:center;gap:14px;padding:16px 4px 22px}
  .launcher-mark{display:grid;place-items:center;flex:0 0 52px;width:52px;height:52px;border-radius:15px;background:linear-gradient(145deg,#183957,#357fbd);color:#fff;font-family:serif;font-size:25px;box-shadow:0 12px 28px rgba(24,57,87,.2)}
  .launcher-heading small{color:#357fbd;font-size:8px;font-weight:800;letter-spacing:.16em}
  .launcher-heading h2{margin:3px 0 4px;font-size:24px;letter-spacing:-.05em}
  .launcher-heading p{margin:0;color:#6f7f8c;font-size:11px}
  .launcher-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}
  .launcher-grid button{min-height:144px;padding:18px 14px;border:1px solid #d9e4ec;border-radius:16px;background:#fff;color:#23384b;text-align:left;box-shadow:0 8px 24px rgba(24,57,87,.07)}
  .launcher-grid button:active{transform:scale(.98);background:#edf6fc}
  .launcher-grid button>span{display:grid;place-items:center;width:45px;height:45px;margin-bottom:18px;border-radius:13px;background:#dcecf8;color:#2d72aa;font-size:24px}
  .launcher-grid b,.launcher-grid small{display:block}
  .launcher-grid b{font-size:15px;letter-spacing:-.03em}
  .launcher-grid small{margin-top:6px;color:#6f7f8c;font-size:10px}
  .launcher-account{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:14px}
  .launcher-account button{min-height:48px;border:1px solid #cbdbe7;border-radius:12px;background:#eef5fa;color:#315c7e;font-size:13px;font-weight:700}

  .sidebar{position:fixed;inset:auto 0 0;width:100%;height:auto;padding:6px max(7px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left));display:block;background:rgba(15,42,65,.97);border-top:1px solid rgba(255,255,255,.12);box-shadow:0 -8px 28px rgba(10,34,52,.2);backdrop-filter:blur(15px);z-index:60}
  .sidebar>.brand,.sidebar>.storage-card,.sidebar>.sidebar-foot{display:none}
  .sidebar nav{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(64px,1fr);gap:4px;overflow-x:auto;padding:0;scrollbar-width:none}
  .sidebar nav::-webkit-scrollbar{display:none}
  .nav-section-label{display:none}
  .nav-item{min-width:64px;min-height:58px;padding:6px 4px;border:0;border-radius:11px;display:flex;flex-direction:column;justify-content:center;gap:3px;text-align:center;transform:none!important}
  .nav-item .nav-icon{flex:0 0 25px;width:30px;height:25px;margin:0 auto;border-radius:8px;background:transparent;font-size:20px}
  .nav-item .nav-copy{width:100%}
  .nav-item .nav-copy b{font-size:10px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .nav-item[data-view="dashboard"] .nav-copy b{font-size:0}
  .nav-item[data-view="dashboard"] .nav-copy b:after{content:'홈';font-size:10px}
  .nav-item .nav-copy small{display:none}
  .nav-item.active{background:rgba(70,151,211,.22);border:0;box-shadow:none}
  .nav-item.active .nav-icon{background:#3b8dca;box-shadow:none}

  main{grid-column:auto;padding:0 14px calc(92px + env(safe-area-inset-bottom))}
  .topbar{display:none}

  .hero{height:auto;min-height:330px;padding:32px 24px;display:block}
  .hero h2{font-size:31px}.hero p{font-size:12px}
  .hero-actions{flex-direction:column}.hero-actions button{width:100%}
  .blueprint{display:none}
  .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .metric-grid article{padding:15px 12px;gap:10px;min-width:0}
  .metric-grid strong{font-size:18px;overflow-wrap:anywhere}
  .content-grid,.drawing-layout,.user-layout{grid-template-columns:1fr}
  .panel{padding:18px 15px}
  .project-row{grid-template-columns:36px 1fr auto;gap:7px;padding:13px 0}
  .project-row>div:nth-of-type(2){grid-column:2/-1}
  .project-row .status{grid-column:2}.project-row .amount{grid-column:3}

  .section-head{height:auto;min-height:72px;margin-bottom:16px;gap:10px}
  .section-head h2{font-size:24px}
  .toolbar{display:grid;gap:10px}.search{width:100%}.search input{width:calc(100% - 24px)}
  .filters{overflow-x:auto}.filters button{flex:1;white-space:nowrap}
  .project-cards{grid-template-columns:1fr}
  .project-card{min-height:auto}.empty-card{padding:45px 16px}

  .drawing-layout{display:grid}.drawing-setup{order:1}.canvas-wrap{order:2;min-width:0}
  .canvas-toolbar{overflow-x:auto}.canvas-toolbar>div{display:flex;white-space:nowrap}
  .drawing-canvas{height:300px}.canvas-empty{margin:14px;padding:24px 16px}
  .takeoff-strip{height:auto;grid-template-columns:repeat(2,1fr)}
  .takeoff-strip div{padding:12px;border-bottom:1px solid var(--line)}

  .role-guide{grid-template-columns:1fr!important;gap:8px}
  .role-guide article{padding:15px}.role-guide span{font-size:18px}
  .user-row{grid-template-columns:1fr;gap:8px}
  .user-row input,.user-row select{width:100%}
  .user-actions{display:grid;grid-template-columns:1fr 1fr}.mini-btn{font-size:13px;padding:10px}
  .placeholder{padding:60px 18px}

  dialog{width:calc(100vw - 20px);max-width:560px;max-height:calc(100dvh - 20px);margin:auto;border-radius:10px;overflow:auto}
  dialog form{padding:24px 18px 20px}
  .modal-head h2{font-size:21px;margin-bottom:18px}
  .account-guide{margin-top:-6px}
  .form-row{grid-template-columns:1fr;gap:0}
  dialog input,dialog select{width:100%;font-size:16px}
  .modal-actions{position:sticky;bottom:-20px;background:#fff;padding:12px 0 4px;display:grid;grid-template-columns:1fr;z-index:2}
  .modal-actions button{width:100%;min-height:46px}
  .toast{left:12px;right:12px;bottom:12px;text-align:center}
}

@media (max-width: 420px){
  .metric-grid{grid-template-columns:1fr}
  .topbar .eyebrow{display:none}
  .topbar h1{font-size:19px}
  .hero h2{font-size:28px}
}
