.app.is-mobile{min-height:100vh;min-height:100dvh;padding-bottom:calc(92px + env(safe-area-inset-bottom))}

.topbar{position:sticky;top:0;z-index:20;padding-top:env(safe-area-inset-top);background:color-mix(in srgb,var(--bg) 82%,transparent);backdrop-filter:saturate(1.6) blur(16px);-webkit-backdrop-filter:saturate(1.6) blur(16px)}
.topbar-in{display:flex;align-items:center;justify-content:space-between;gap:10px;height:58px;padding:0 10px 0 18px;max-width:640px;margin:0 auto}
.top-title{display:flex;align-items:center;gap:9px;min-width:0}
.top-title b{font-size:19px;font-weight:800;letter-spacing:-.035em;white-space:nowrap}
.top-title .brand-mark{width:28px;height:28px}
.top-actions{display:flex;align-items:center;gap:2px;min-width:0}
.chip-class{max-width:150px;height:32px;padding:0 12px;border-radius:999px;background:var(--surface);box-shadow:var(--shadow);font-size:12.5px;font-weight:700;color:var(--primary-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.app.is-mobile .main{max-width:640px;margin:0 auto}
.page{padding:6px 16px 20px}
.page>.card,.page.home>.card{margin-top:12px}
.page.home .hero{margin-bottom:4px}

.tabbar{position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));z-index:30;display:flex;justify-content:space-around;max-width:520px;margin:0 auto;padding:7px;border-radius:24px;background:color-mix(in srgb,var(--surface) 88%,transparent);backdrop-filter:saturate(1.8) blur(20px);-webkit-backdrop-filter:saturate(1.8) blur(20px);box-shadow:0 10px 34px -10px rgba(10,30,80,.35),inset 0 0 0 1px var(--line)}
.tabbar .nav-item{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;height:54px;justify-content:center;border-radius:18px;color:var(--faint);font-size:11px;font-weight:700;transition:color .15s,background .15s}
.tabbar .nav-item .ic{width:22px;height:22px}
.tabbar .nav-item.on{color:var(--primary);background:var(--primary-soft)}
.tabbar .nav-item.on .ic{stroke-width:2.2}

.layer.as-sheet{align-items:flex-end}
.as-sheet .panel{width:100%;max-height:92vh;max-height:92dvh;border-radius:26px 26px 0 0;transform:translateY(100%);transition:transform .28s cubic-bezier(.2,.8,.2,1);padding-bottom:env(safe-area-inset-bottom)}
.as-sheet.on .panel{transform:none}
.grip{width:40px;height:5px;border-radius:5px;background:var(--line-2);margin:9px auto 0}
.as-sheet .panel-head{padding:8px 12px 4px 20px}
.as-sheet .panel-body{padding:8px 20px 20px}
.as-sheet .panel-foot{padding:12px 20px 16px}
.as-sheet .panel-foot .btn.primary{flex:1}
.toast{bottom:calc(104px + env(safe-area-inset-bottom))}

.sec-head{margin-top:2px}
.page>.sec-head{margin-top:20px}

.tt-page{padding-left:10px;padding-right:10px}
.tt-toolbar{display:flex;align-items:center;gap:8px;margin:2px 4px 12px}
.tt-class{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;text-align:left;position:relative;padding-right:20px}
.tt-class b{font-size:17px;font-weight:800;letter-spacing:-.03em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.tt-class small{font-size:12px;color:var(--sub);font-weight:600}
.tt-class .ic{position:absolute;right:0;top:6px;color:var(--faint)}
.tt-acts{display:flex;gap:6px}
.tt-card{background:var(--surface);border-radius:20px;box-shadow:var(--shadow);padding:6px 6px 8px 0;overflow:hidden}
.tt-grid{--row:58px;grid-template-columns:34px repeat(5,minmax(0,1fr))}
.tt-time small{display:none}
.tt-time b{font-size:11.5px;color:var(--faint)}
.tt-block{padding:6px 5px 5px 7px;border-radius:9px}
.tt-block b{font-size:11.5px;-webkit-line-clamp:4;letter-spacing:-.03em}
.tt-block small{font-size:10px}
.memo-badge{right:3px;bottom:3px;height:16px;padding:0 4px;font-size:9.5px}
.memo-badge .ic{display:none}

.m-board .board-head{flex-wrap:wrap}
.m-board .board-head .back-btn{flex-basis:100%}
.m-board .board-title h2{font-size:21px}
.type-stats{grid-template-columns:repeat(3,1fr)}
.m-board .chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
.m-board .chips::-webkit-scrollbar{display:none}
.lec-list .lec-row{background:var(--surface);box-shadow:var(--shadow);margin-bottom:4px;padding:14px}
.lec-list .lec-row:hover{background:var(--surface)}

.day-strip{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-bottom:18px}
.day-pill{display:flex;flex-direction:column;align-items:center;gap:1px;padding:8px 0;border-radius:14px;color:var(--sub)}
.day-pill span{font-size:11.5px;font-weight:650}
.day-pill b{font-size:17px;font-weight:750;color:var(--ink)}
.day-pill.weekend{opacity:.55}
.day-pill.today b{color:var(--primary)}
.day-pill.on{background:var(--primary);color:rgba(255,255,255,.85);box-shadow:0 8px 18px -8px rgba(33,96,243,.7)}
.day-pill.on b{color:#fff}
.week-nav{justify-content:space-between}
.week-nav b{flex:1;text-align:center}
.fold{margin-top:16px;padding:0 16px}
.fold summary{display:flex;align-items:center;gap:8px;padding:16px 0;font-weight:700;font-size:14.5px;cursor:pointer;list-style:none}
.fold summary::-webkit-details-marker{display:none}
.fold[open] summary{border-bottom:1px solid var(--line)}
.fold .meal-info{padding:12px 0 16px}
.fold .meal-info h3{display:none}

.page.settings .card{margin-bottom:12px;padding:14px 16px}
.set-row{flex-wrap:wrap}
.set-row .mini-seg{margin-left:34px}

@media (max-width:380px){
  .page{padding-left:12px;padding-right:12px}
  .tt-acts .btn{padding:0 9px}
  .hero h2{font-size:23px}
}
