.mobile-brandbar,.mobile-bottom-nav,.mobile-utility{display:none}
@media(max-width:680px){
.mobile-nav-camera{order:6}.mobile-nav-item[data-view="dashboard"]{order:1}.mobile-nav-item[data-view="mistakes"]{order:2}.mobile-nav-item[data-view="practice"]{order:3}.mobile-nav-item[data-view="knowledge"]{order:4}.mobile-nav-item[data-view="reports"]{order:5}
body{padding-bottom:74px;background:#f8f7f2}.mobile-brandbar{display:flex;align-items:center;gap:10px;height:64px;padding:9px 16px;background:#fff;border-bottom:1px solid #ecebe5;position:sticky;top:0;z-index:7}.mobile-brand-mark{position:relative;width:38px;height:38px;border-radius:11px;background:#2d746e;flex:0 0 auto}.mobile-brand-mark .logo-card{position:absolute;width:16px;height:22px;border:3px solid #79aaa4;border-radius:5px}.mobile-brand-mark .logo-card-back{left:8px;top:7px;transform:rotate(-13deg)}.mobile-brand-mark .logo-card-front{left:17px;top:12px;background:#4a8e87;transform:rotate(8deg)}.mobile-brand-mark .logo-check{position:absolute;right:5px;bottom:3px;color:#e05252;font-size:15px;font-weight:800}.mobile-brand-copy{display:flex;flex-direction:column;line-height:1.15}.mobile-brand-copy b{font-size:17px;color:#202f2d}.mobile-brand-copy small{margin-top:3px;color:#82908d;font-size:10px}.mobile-auth{margin-left:auto;display:flex;align-items:center;gap:6px;color:#28766e;font-size:12px;font-weight:700}.mobile-auth .avatar{width:28px;height:28px;font-size:12px}.topbar{height:48px;top:64px;padding:0 16px;background:#fffdf9}.breadcrumb{margin-left:8px;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.content{padding:22px 14px 24px}.welcome-row h1{font-size:29px;letter-spacing:0}.welcome-row .primary-btn{border-radius:15px;background:#087f76;min-height:52px}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stat-card{border-radius:18px;padding:16px 14px;min-height:142px}.mobile-bottom-nav{display:flex;position:fixed;left:0;right:0;bottom:0;height:70px;z-index:18;align-items:stretch;justify-content:space-around;padding:6px 7px calc(6px + env(safe-area-inset-bottom));background:rgba(255,255,255,.97);border-top:1px solid #e7ebe7;box-shadow:0 -5px 18px rgba(44,67,61,.08)}.mobile-nav-item{position:relative;display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:#7c8582;font-size:10px;border-radius:12px}.mobile-nav-item span{font-size:20px;line-height:1}.mobile-nav-item b{font-size:10px;font-weight:600}.mobile-nav-item.active{color:#167e74;background:#e7f5f0}.mobile-nav-item em{position:absolute;top:3px;right:calc(50% - 19px);font-style:normal;font-size:9px;line-height:17px;min-width:17px;height:17px;padding:0 4px;border-radius:10px;background:#fff0ea;color:#d87961}.mobile-nav-camera{margin:-17px 5px 0;height:70px;align-self:flex-start;border:5px solid #f8f7f2;border-radius:50%;background:#087f76!important;color:#fff!important;box-shadow:0 4px 12px rgba(8,127,118,.25)}.mobile-nav-camera span{font-size:25px}
  .sidebar{display:none}.mobile-menu{display:none!important}.mobile-utility{display:flex;align-items:center;justify-content:flex-end;gap:14px;height:34px;padding:0 16px;background:#fff;border-bottom:1px solid #ecebe5}.mobile-utility button,.mobile-utility a{color:#6c7d79;font-size:10px;text-decoration:none}.mobile-utility button:first-child{color:#28766e}.mobile-utility a{color:#28766e}
}

/* Keep the recognition summary readable on narrow screens. */
@media(max-width:680px){
.modal-backdrop:has(.analysis-result:not([hidden])){padding:0}
.camera-modal:has(.analysis-result:not([hidden])){width:100%;height:100dvh;max-height:none;padding:18px 14px 12px;border-radius:0}
.camera-modal:has(.analysis-result:not([hidden])) .modal-head{margin-bottom:12px}
.analysis-title{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0 0 8px;border:0}
.analysis-result{display:flex!important;flex:0 0 auto!important;flex-direction:column;min-height:0!important;height:max-content!important;max-height:none!important;gap:0!important;overflow:visible!important}
.analysis-title{position:relative;flex:0 0 auto!important;align-items:stretch!important;min-height:0!important;height:auto!important;margin:0!important;padding-bottom:0!important}
.analysis-title>div{flex:0 0 auto!important}
.camera-modal:has(#analysis-result:not([hidden])) .analysis-title>div{display:block!important;flex:0 0 auto!important;align-self:stretch!important;min-height:0!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important}
.camera-modal:has(#analysis-result:not([hidden])) .analysis-title>div>*{flex:0 0 auto!important;min-height:0!important;height:auto!important}
.analysis-title>div,.analysis-title small,.analysis-title span{height:auto!important;min-height:0!important}
.analysis-title>div{min-width:0}
.analysis-title b{font-size:17px;line-height:1.35}
.analysis-title small{max-width:none;margin-top:0;font-size:12px;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
.analysis-title #analysis-mode{position:static!important;order:1;flex:0 0 auto!important;align-self:stretch;min-width:0;min-height:0!important;height:auto!important;margin:20px 0 0!important;padding:3px 9px;border-radius:6px;background:#eef7f4;color:#286b65;font-size:11px;line-height:1.2;text-align:left;white-space:normal;overflow-wrap:anywhere}
.analysis-layout{display:flex;flex:0 0 auto!important;flex-direction:column;min-height:0!important;height:auto!important;margin:0!important;gap:9px;padding-top:0!important}
.source-panel{flex:0 0 27vh;min-height:160px}
.source-preview-stage{padding:10px}
.source-preview-stage .question-preview{width:auto;height:auto;max-width:96%;max-height:96%;padding:5px}
.analysis-panel-head{min-height:44px;padding:0 12px}
.analysis-panel-head b{font-size:13px}
.editor-fields{padding:14px 12px 10px}
.editor-fields>label,.analysis-fields label{margin-bottom:13px;font-size:13px}
.analysis-result textarea,.analysis-result select{font-size:14px;line-height:1.65}
#confirm-ocr{min-height:132px}
#confirm-knowledge{min-height:70px}
#confirm-explanation{min-height:170px}
#confirm-reason{min-height:120px}
.editor-actions{padding-top:4px;background:#fff}
}
