:root{
  --omt-mobile-pad:16px;
  --omt-touch:44px;
}
html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  scroll-behavior:smooth;
}
html,body{max-width:100%;overflow-x:hidden}
body{min-width:0}
*,*::before,*::after{box-sizing:border-box}
img,svg,canvas,video,iframe,embed,object{max-width:100%}
img,svg{height:auto}
button,a,input,select,textarea{touch-action:manipulation}
button,a,[role="button"]{-webkit-tap-highlight-color:transparent}
input,select,textarea{max-width:100%}
pre,code{max-width:100%;overflow-wrap:anywhere;white-space:pre-wrap}
.omt-mobile-table-scroll-v36{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  -webkit-overflow-scrolling:touch;
  border:1px solid rgba(10,111,183,.12);
  border-radius:14px;
}
.omt-mobile-table-scroll-v36 table{
  width:max-content;
  min-width:100%;
}
@media screen and (max-width:900px){
  body{min-height:100svh}
  .site-header,.topbar,.hero,.toolbar,.shell{
    max-width:100%!important;
  }
  .site-header,.topbar{
    height:auto!important;
    min-height:64px!important;
  }
  .header-inner,.topbar,.toolbar,.controls,.results-bar,
  .header-actions,.hero-actions,.actions,.actions-row,
  .topbar-actions,.success-actions,.dialog-header,
  .dialog-header-actions,.card-footer,.card-meta,.preview-head{
    flex-wrap:wrap!important;
    min-width:0!important;
  }
  .shell,.page-shell,.lecture-root,.wrap,.content{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  .lecture-grid,.grid,.skeleton-grid,.section-grid,.main-layout,
  .layout,.grid-2{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .preview-panel{
    position:relative!important;
    top:auto!important;
    order:2;
  }
  .modal{
    padding:10px!important;
    align-items:flex-end!important;
  }
  .dialog{
    width:100%!important;
    max-width:none!important;
    max-height:94svh!important;
    border-radius:22px 22px 0 0!important;
    overflow:auto!important;
    overscroll-behavior:contain;
  }
  .dialog-body{max-height:none!important;overflow:visible!important}
  .dialog-media,.dialog-cover{width:100%!important}
  .upload-area{min-height:160px!important}
}
@media screen and (max-width:640px){
  :root{--omt-mobile-pad:14px}
  body{
    padding-left:max(0px,env(safe-area-inset-left))!important;
    padding-right:max(0px,env(safe-area-inset-right))!important;
  }
  .site-header,.topbar{
    position:relative!important;
    top:auto!important;
    padding:12px var(--omt-mobile-pad)!important;
  }
  .header-inner{
    min-height:0!important;
    padding:0!important;
    gap:10px!important;
    flex-wrap:wrap!important;
  }
  .brand{
    width:100%!important;
    justify-content:center!important;
    text-align:center!important;
    gap:10px!important;
  }
  .brand-copy{min-width:0!important;text-align:center!important}
  .brand-logo{
    width:auto!important;
    max-width:min(82vw,340px)!important;
    max-height:96px!important;
    object-fit:contain!important;
  }
  .brand-title{
    font-size:clamp(28px,9vw,40px)!important;
    line-height:1.08!important;
    overflow-wrap:anywhere;
  }
  .brand-subtitle{font-size:13px!important}
  .header-actions,.hero-actions,.actions,.actions-row,.topbar-actions,
  .success-actions,.dialog-header-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  .header-actions > *,.hero-actions > *,.actions > *,.actions-row > *,
  .topbar-actions > *,.success-actions > *,.dialog-header-actions > *{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
  }
  a.button,a.btn,button,.button,.btn,[role="button"],
  .primary-btn,.secondary-btn,.ghost-btn,.danger-btn,.link-btn{
    min-height:var(--omt-touch)!important;
    white-space:normal!important;
    line-height:1.25!important;
    text-align:center!important;
    justify-content:center!important;
  }
  input,select,textarea{
    font-size:16px!important;
    width:100%!important;
  }
  .page-shell,.shell,.lecture-root,.wrap,.content{
    padding-left:var(--omt-mobile-pad)!important;
    padding-right:var(--omt-mobile-pad)!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  .hero{
    padding:32px var(--omt-mobile-pad)!important;
    min-height:auto!important;
  }
  .hero-title,.page-heading{
    font-size:clamp(28px,8vw,40px)!important;
    line-height:1.15!important;
  }
  .hero-sub,.hero-copy p{font-size:15px!important;line-height:1.7!important}
  .toolbar,.controls,.results-bar{
    gap:10px!important;
    padding:12px!important;
  }
  .search-wrap,.search-field,.field,.field-full{
    width:100%!important;
    min-width:0!important;
  }
  .view-switch{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .lecture-card,.skeleton-card,.form-card,.preview-card,.panel,.box,.card{
    border-radius:18px!important;
    min-width:0!important;
  }
  .card-cover,.preview-cover,.cover{
    height:auto!important;
    min-height:0!important;
    aspect-ratio:16/9!important;
  }
  .card-content,.card-body,.preview-body{
    padding:16px!important;
  }
  .card-title,.title,.preview-title{
    font-size:20px!important;
    line-height:1.35!important;
    overflow-wrap:anywhere;
  }
  .card-description,.desc,.preview-desc{
    display:block!important;
    max-height:none!important;
    -webkit-line-clamp:unset!important;
    overflow:visible!important;
  }
  .card-footer{
    align-items:stretch!important;
    gap:12px!important;
  }
  .details-button,.load-more-button{
    width:100%!important;
    justify-content:center!important;
  }
  .dialog{
    padding-bottom:max(12px,env(safe-area-inset-bottom))!important;
  }
  .dialog-header{
    padding:12px!important;
    gap:10px!important;
  }
  .dialog-header-actions{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .dialog-info{padding:16px!important}
  .dialog-title{font-size:24px!important}
  .dialog-file{
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:8px!important;
    padding:12px!important;
  }
  .main-layout{
    gap:16px!important;
  }
  .form-card,.preview-panel,.panel,.box,.card{
    padding:18px 15px!important;
  }
  .section-grid,.grid,.grid-2{
    gap:14px!important;
  }
  .upload-top,.selected-file,.file-item,.order-row{
    align-items:stretch!important;
    flex-direction:column!important;
    gap:10px!important;
  }
  .selected-file-main,.file-main{min-width:0!important;width:100%!important}
  .file-actions,.card-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  .preview-panel{
    margin-top:0!important;
  }
  .preview-cover{min-height:180px!important}
  .hero-brand{display:none!important}
  .status,.state-panel,.message,.log{
    overflow-wrap:anywhere!important;
  }
  .progress,.bar{width:100%!important}
  .footer-note,.site-footer{
    padding-left:var(--omt-mobile-pad)!important;
    padding-right:var(--omt-mobile-pad)!important;
  }
}
@media screen and (max-width:420px){
  :root{--omt-mobile-pad:12px}
  .header-actions,.hero-actions,.actions,.actions-row,.topbar-actions,
  .success-actions,.dialog-header-actions,.file-actions,.card-actions{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .brand-logo{max-width:88vw!important}
  .form-card,.preview-panel,.panel,.box,.card{
    padding:16px 12px!important;
  }
  .dialog{
    border-radius:18px 18px 0 0!important;
  }
  .dialog-header-actions{
    grid-template-columns:minmax(0,1fr)!important;
  }
}
@media screen and (orientation:landscape) and (max-height:520px){
  .modal{align-items:stretch!important}
  .dialog{max-height:100svh!important;border-radius:0!important}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* OMT_MOBILE_DISPLAY_REPAIR_V37_START */
@media screen and (max-width:640px){
  .site-header .header-inner{
    width:100%!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:12px!important;
    padding:12px 14px!important;
  }
  .site-header .brand{
    width:100%!important;
    min-width:0!important;
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:center!important;
    gap:10px!important;
    text-align:initial!important;
  }
  .site-header .brand-logo{
    width:54%!important;
    max-width:250px!important;
    min-width:0!important;
    height:auto!important;
    max-height:92px!important;
    object-fit:contain!important;
    object-position:center!important;
    flex:0 1 54%!important;
  }
  .site-header .brand-divider{
    display:block!important;
    width:1px!important;
    min-width:1px!important;
    height:58px!important;
    flex:0 0 1px!important;
  }
  .site-header .brand-copy{
    width:auto!important;
    min-width:0!important;
    flex:1 1 0!important;
    text-align:center!important;
  }
  .site-header .brand-title{
    margin:0!important;
    font-size:clamp(22px,6.4vw,29px)!important;
    line-height:1.18!important;
    letter-spacing:-.025em!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
  }
  .site-header .brand-subtitle{
    display:none!important;
  }
  .site-header .header-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  .site-header .header-actions>*{
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }
  .site-header .header-actions>:last-child:nth-child(odd){
    grid-column:1 / -1!important;
  }
}
@media screen and (max-width:390px){
  .site-header .brand-logo{
    width:51%!important;
    flex-basis:51%!important;
    max-height:82px!important;
  }
  .site-header .brand-title{
    font-size:21px!important;
  }
}
/* OMT_MOBILE_DISPLAY_REPAIR_V37_END */
