@media(max-width:740px){
  body:not(.quiz-focus) .shell{display:flex;flex-direction:column;min-height:100dvh}
  body:not(.quiz-focus) .workspace{display:contents}
  body:not(.quiz-focus) .topbar{order:0;min-height:76px;gap:10px;background:#fff}
  body:not(.quiz-focus) .mobile-brand{font-size:15px;letter-spacing:-.3px;line-height:1.25;max-width:155px}
  body:not(.quiz-focus) .topbar .row{gap:8px;flex-wrap:nowrap}
  body:not(.quiz-focus) .sidebar{order:1;position:static;inset:auto;display:block;height:auto;background:transparent;border:0;backdrop-filter:none;padding:14px max(16px,env(safe-area-inset-right)) 0 max(16px,env(safe-area-inset-left));width:100%}
  body:not(.quiz-focus) .nav{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
  body:not(.quiz-focus) .nav button{flex-direction:row;justify-content:flex-start;gap:10px;width:100%;margin:0;min-height:56px;font-size:14px;line-height:1.3;padding:12px;border:1px solid #e8e6e1;background:#fff;border-radius:12px;color:#555b61;text-align:left;overflow-wrap:normal}
  body:not(.quiz-focus) .nav button.active{background:#fff0ed;border-color:#efbfb6;color:#c82e2b}
  body:not(.quiz-focus) .nav-icon{flex:0 0 22px;font-size:20px}
  body:not(.quiz-focus) .main{order:2;width:100%;padding-top:18px;padding-bottom:calc(30px + env(safe-area-inset-bottom))}
  body:not(.quiz-focus) .button,body:not(.quiz-focus) .button.small,body:not(.quiz-focus) .table-action{font-size:15px;min-height:48px;line-height:1.35}
  body:not(.quiz-focus) .page-title.between{flex-direction:column;align-items:stretch}
  body:not(.quiz-focus) .page-title h1{font-size:29px;letter-spacing:-.9px;overflow-wrap:anywhere}
  body:not(.quiz-focus) .page-title p,body:not(.quiz-focus) .card>p,body:not(.quiz-focus) .hero p{font-size:15px;line-height:1.6}
  body:not(.quiz-focus) .form-note,body:not(.quiz-focus) .install-tip{font-size:13px;line-height:1.6}
  body:not(.quiz-focus) label{font-size:14px}
  body:not(.quiz-focus) small{font-size:13px;line-height:1.5}
  body:not(.quiz-focus) .metric .label{font-size:13px;line-height:1.4}
  body:not(.quiz-focus) .metric .foot{font-size:12px;line-height:1.4}
  body:not(.quiz-focus) .item-title{font-size:16px;line-height:1.5}
  body:not(.quiz-focus) .item.between{flex-wrap:wrap}
  body:not(.quiz-focus) .result-row{padding:20px;border-radius:12px;border-width:4px}
  body:not(.quiz-focus) .result-row p{font-size:17px;line-height:1.6}
  body:not(.quiz-focus) .result-row .eyebrow{font-size:12px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
  body:not(.quiz-focus) .result-row img{display:block;width:auto;max-width:100%;max-height:190px;margin:18px auto;object-fit:contain}
  body:not(.quiz-focus) .table-wrap:has(.mobile-records){overflow:visible}
  .mobile-records,.mobile-records tbody{display:block;width:100%;min-width:0}
  .mobile-records thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .mobile-records tbody{display:grid;gap:14px;margin-top:14px}
  .mobile-records tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px 12px;border:1px solid #e8e6e1;background:#fff;border-radius:14px;padding:18px;min-width:0}
  .mobile-records td{display:block;border:0;padding:0;white-space:normal;overflow-wrap:anywhere;min-width:0;font-size:16px;line-height:1.45}
  .mobile-records td::before{content:attr(data-label);display:block;color:#787c83;font-size:12px;font-weight:500;margin-bottom:5px}
  .mobile-records td:first-child{grid-column:1/-1;font-size:17px;font-weight:700;padding-bottom:12px;border-bottom:1px solid #eeece7}
  .mobile-records td:first-child::before{display:none}
  .mobile-records td:has(.attendance),.mobile-records td[data-label="Azioni"]{grid-column:1/-1}
  .mobile-records td[data-label="Azioni"]::before{display:none}
  .mobile-records td[data-label="Azioni"] button{width:100%;background:#fff4f0;border:1px solid #f2d3c9;border-radius:10px}
  .mobile-records .attendance .button{flex:1;min-height:48px;font-size:14px}
  .mobile-records .badge{font-size:12px;white-space:normal}
  .learning-section .metrics{gap:10px}.learning-section .metric{padding:13px}
  .login-story{padding:28px 24px}.login-story h1{font-size:32px}.login-story img{margin-bottom:18px;width:170px}
  .login-story .eyebrow{display:block;font-size:11px;line-height:1.6}
  .login-form{padding:28px 24px calc(32px + env(safe-area-inset-bottom))}.login-form h2{font-size:27px}
  #toast{bottom:calc(18px + env(safe-area-inset-bottom));font-size:14px}
}
@media print{.mobile-records{display:table}.mobile-records thead{display:table-header-group;position:static;width:auto;height:auto;overflow:visible;clip-path:none}.mobile-records tbody{display:table-row-group}.mobile-records tbody tr{display:table-row}.mobile-records td{display:table-cell}.mobile-records td::before{display:none}}
