/* Mobile redesign v3 — shared structure and typography. */
body.mobile-mode{--text-body:var(--fs);--text-small:calc(var(--fs)*.85);--text-title:calc(var(--fs)*1.15);--nav-space:78px;color:#303640}
body.mobile-mode .app-header{padding:12px 16px 0}
body.mobile-mode .title-block h1{font-size:19px}
body.mobile-mode .month-label,body.mobile-mode #sessionLogoutBtn{display:none}
body.mobile-mode .topbar{margin:0;border:0;padding-bottom:12px}
body.mobile-mode .app-scroll{padding:20px 16px 28px}
body.mobile-mode .subnav-row{padding:10px 16px}
body.mobile-mode .app{padding-bottom:calc(78px + env(safe-area-inset-bottom,0px))}
body.mobile-mode .mobile-bottom-nav{min-height:70px;padding:5px 8px calc(5px + env(safe-area-inset-bottom,0px));gap:4px}
body.mobile-mode .mobile-nav-item{font-size:11px;min-height:58px;padding:7px 0;border-radius:10px;gap:5px}
body.mobile-mode .mobile-nav-item.active{background:#fff1b6;color:#303640}
body.mobile-mode .mobile-nav-item .ic{display:flex;font-size:20px}
body.mobile-mode .mobile-nav-item svg{width:21px;height:21px}
body.mobile-mode .ui-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
body.mobile-mode .ui-heading h2{font-size:var(--text-title);margin:0}
body.mobile-mode .ui-heading button{background:#f4e27e;border:0;border-radius:9px;padding:8px 14px;font-size:var(--text-small)}
body.mobile-mode :is(.home-card,.project-card,.memo-row,.account-card,.ui-summary){border:1px solid #e7e5dd;border-radius:13px;box-shadow:0 2px 8px #20283003;background:#fff;padding:18px;margin:0 0 14px}
body.mobile-mode .ui-summary{display:flex;justify-content:space-between;align-items:center;gap:12px;line-height:1.6}
body.mobile-mode .ui-summary small{display:block;font-size:var(--text-small);color:#737b86}
body.mobile-mode .project-summary{display:none}
body.mobile-mode .project-card-head{align-items:start;gap:8px}
body.mobile-mode .project-card-name{font-size:var(--text-body)}
body.mobile-mode .project-card-head .cat-chip{display:none}
body.mobile-mode .project-card{border-left:1px solid #e7e5dd!important}
body.mobile-mode .project-progress>span{background:#dcba37!important}
body.mobile-mode .ui-preview{font-size:var(--text-small);line-height:1.6;color:#727c89;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:8px 0}
body.mobile-mode .ui-subtasks{font-size:var(--text-small);line-height:1.6;padding:0;list-style:none;margin:10px 0}
body.mobile-mode .ui-subtasks li{padding:4px 0}
body.mobile-mode .mobile-details>summary{border:1px solid #e8e8e0;background:#fafaf7}
body.mobile-mode .memo-row{display:flex;flex-direction:column;align-items:stretch;gap:5px;cursor:pointer}
body.mobile-mode .memo-row-title{order:0;font-size:var(--text-body);flex:none!important}
body.mobile-mode .memo-row .ui-preview{order:1}
body.mobile-mode .memo-row-date{order:2;font-size:var(--text-small)}
body.mobile-mode .memo-row>.cat-chip{display:none}
body.mobile-mode .memo-row>.memo-detail-actions{order:3;align-self:flex-end}
body.mobile-mode .memo-row>.memo-detail-actions>button:not(.memo-pin-btn){display:none}
body.mobile-mode .memo-add-bar{gap:8px}
body.mobile-mode .memo-add-bar input{flex:1 1 100%;width:100%;min-width:0;border-radius:10px;padding:12px}
body.mobile-mode .ui-filters{display:flex;gap:8px;overflow:auto;margin:0 0 16px;padding-bottom:4px}
body.mobile-mode .ui-filters button{flex:none;border:1px solid #e6e4dc;border-radius:24px;background:#fff;padding:7px 14px;font-size:var(--text-small)}
body.mobile-mode .ui-filters button.active{background:#fff0a8;border-color:#eedb7f}
body.mobile-mode .account-card-title{font-size:var(--text-body)}
body.mobile-mode .account-card-row{font-size:var(--text-small);border:0;padding:5px 0}
body.mobile-mode .account-card-title .account-card-sub{color:#757d87}
body.mobile-mode .home-card{padding:22px 18px;margin-bottom:18px}
body.mobile-mode .home-mini-item{background:transparent;border-left:0!important;border-bottom:1px solid #f2f1eb;padding:12px 0;font-size:var(--text-body)}
body.mobile-mode .home-mini-item:before{content:'○';color:#929bad;margin-right:9px}
body.mobile-mode .home-mini-item.done:before{content:'✓';color:#b9971e}
body.mobile-mode .daily-message{background:#fff7d9}
body.mobile-mode .week-agenda-daychip{min-height:74px;font-size:var(--text-small);gap:5px}
body.mobile-mode .week-agenda-item{display:grid;grid-template-columns:4.5em minmax(0,1fr);gap:12px;border-left:1px solid #e7e5dd!important;padding:16px;font-size:var(--text-body)}
body.mobile-mode .week-agenda-item .tm{font-size:var(--text-small);color:#747f90}
body.mobile-mode .week-agenda-item .agenda-text{border-left:3px solid #e9cf62;padding-left:12px}
body.mobile-mode .week-agenda-item small{display:block;font-size:var(--text-small);color:#788191;margin-top:5px}
body.mobile-mode .ui-week-controls{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:16px 0}
body.mobile-mode .ui-week-controls button{border:1px solid #e4e2d9;background:#fff;border-radius:8px;padding:8px}
body.mobile-mode .ui-habit-table{width:100%;min-width:420px;border-collapse:collapse;background:white;font-size:var(--text-small)}
body.mobile-mode .ui-habit-table th,body.mobile-mode .ui-habit-table td{padding:10px 4px;text-align:center;border-bottom:1px solid #efeee7;height:68px}
body.mobile-mode .ui-habit-table th:first-child,body.mobile-mode .ui-habit-table td:first-child{text-align:left;min-width:100px;padding-left:12px;max-width:130px}
body.mobile-mode .ui-habit-table .today{background:#fff8db}
body.mobile-mode .ui-habit-table button{border:1px solid #c8ced2;border-radius:50%;width:40px;height:40px;min-height:40px;background:#fff;padding:0;color:#fff}
body.mobile-mode .ui-habit-table button.on{background:#499a67;border-color:#499a67}
body.mobile-mode .ui-habit-scroll{overflow:auto;border:1px solid #e5e3da;border-radius:13px;margin-bottom:18px}
body.mobile-mode .ui-progress-ring{width:62px;height:62px;flex:none;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#499a67 var(--progress),#eceee9 0);font-size:14px}
body.mobile-mode .ui-progress-ring span{background:#fff;width:48px;height:48px;border-radius:50%;display:grid;place-items:center}
body.mobile-mode .mobile-bottom-nav .mobile-nav-item{font-size:11px!important;white-space:nowrap;min-width:0}
body.mobile-mode .mobile-bottom-nav .mobile-nav-item span:not(.ic){font-size:11px!important;white-space:nowrap}
body.mobile-mode[data-mobile-section=project] .subnav-row,body.mobile-mode[data-mobile-section=habit] .subnav-row,body.mobile-mode[data-mobile-section=home] .subnav-row{display:none}
body.mobile-mode .ui-habit-table th{white-space:normal;font-size:12px}
body.mobile-mode .ui-habit-table{min-width:0;table-layout:fixed}
body.mobile-mode .ui-habit-table th:first-child,body.mobile-mode .ui-habit-table td:first-child{width:24%;min-width:0;max-width:none;padding:8px}
body.mobile-mode .ui-habit-table button{width:100%;max-width:40px;min-height:44px;height:44px;border-radius:9px}
body.mobile-mode .ui-habit-table th,body.mobile-mode .ui-habit-table td{padding:8px 2px}
body.mobile-mode .memo-fab-btn{display:none}
body.mobile-mode[data-mobile-section=account] .subnav-row{display:none}
body.mobile-mode .account-wrap>.ui-heading{width:100%}
body.mobile-mode .account-note{display:none}
body.mobile-mode .mobile-more-sheet #sessionLogoutBtn{display:block!important}
