/* iPad 网页版布局（刘柯宇）：只在网页版生效，html 上有 .web 时才用，电脑版不受影响 */
html.web,html.web body{height:100%;overscroll-behavior:none;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%}
html.web body{padding:env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);background:var(--sidebar)}
/* 没有窗口，标题栏和最小化/关闭按钮都不要 */
html.web .titlebar{display:none}
html.web .window{border-radius:0}
html.web .content{padding-bottom:calc(20px + env(safe-area-inset-bottom));-webkit-overflow-scrolling:touch}
html.web .sidebar{padding-bottom:calc(14px + env(safe-area-inset-bottom))}

/* 手指点的地方至少 44px 高 */
html.web nav a{min-height:44px;font-size:15px}
html.web .pill,html.web button.pill{min-height:40px}
html.web .ntu-btn{height:38px}
html.web .chat-send{width:40px;height:40px}
html.web .mp-opt{min-height:44px}
/* iOS 输入框字号小于 16px 会自动放大页面，统一调到 16px */
html.web input,html.web textarea,html.web select{font-size:16px!important}
/* 触屏没有鼠标悬停，去掉悬停高亮，免得点完一直亮着 */
@media (hover:none){
  html.web nav a:hover{background:none;color:var(--text-2)}
  html.web nav a.active:hover{background:var(--gold-soft);color:var(--gold)}
  html.web .card-link:hover{border-color:var(--line)}
  html.web .ntu-btn:hover{background:none;color:var(--text-2)}
  html.web nav a:active,html.web .ntu-btn:active{background:rgba(255,255,255,.08)}
  html.web .card-link:active{border-color:rgba(212,169,79,.35)}
}

/* 竖屏或窄屏：侧边栏只留图标 */
@media (max-width:1000px){
  html.web .sidebar{width:68px;padding:14px 8px;align-items:center}
  html.web .sidebar .brand{padding:0;justify-content:center}
  html.web .sidebar .brand-text{display:none}
  html.web .sidebar nav{width:100%}
  html.web .sidebar nav a{font-size:0;justify-content:center;padding:10px 0}
  html.web .sidebar nav a i{font-size:20px;width:auto}
  html.web .content{padding:14px 14px calc(16px + env(safe-area-inset-bottom))}
  html.web .ask-bar kbd{display:none}
}
/* 竖屏：主页上排三张卡改成两列，主页可以上下滑 */
@media (orientation:portrait) and (max-width:1000px){
  html.web #page-home.auto-layout{overflow:auto}
  html.web #page-home .grid-top{grid-template-columns:1fr 1fr;height:auto!important}
  html.web #page-home .grid-top>.card:first-child{grid-column:1/-1}
  html.web #page-home .grid-bottom{height:auto!important;flex:none;min-height:0}
  html.web #page-home.auto-layout .card{min-height:180px;max-height:none}
  html.web #page-home .grid-top>.card:first-child{min-height:160px}
}

/* NTU Learn 网页版：不能内嵌，改成一张跳转卡片 */
html.web .ntu-web{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;padding:32px;background:var(--card);border:1px solid var(--line);border-radius:var(--r-card)}
html.web .ntu-web b{font-size:17px;font-weight:600}
html.web .ntu-web p{color:var(--text-2);font-size:14px;line-height:1.7;max-width:420px}
html.web .ntu-web .pill{margin-top:12px;min-height:46px;padding:0 26px;font-size:15px}

/* 内容区不显示滚动条（iPad 本来就是浮动滚动条，这里防止预览时右边出现一条暗条） */
html.web .content,html.web #page-home.auto-layout{scrollbar-width:none}
html.web .content::-webkit-scrollbar,html.web #page-home::-webkit-scrollbar{display:none}
