/* Device-selected phone layout; source styles stay intact. */
.sv-mobile-nav,.sv-mobile-workbench{display:none}
.sv-layout-options{display:flex;gap:8px;flex-wrap:wrap}.sv-layout-options button{min-height:44px}.sv-layout-options button[aria-pressed="true"]{background:#252d27!important;color:#fff!important}
html[data-sv-layout="phone"]{scroll-padding-bottom:110px}
html[data-sv-layout="phone"] body{font-size:14px;-webkit-text-size-adjust:100%}
html[data-sv-layout="phone"] .main,html[data-sv-layout="phone"] .main.archive-main{padding:20px 16px calc(100px + env(safe-area-inset-bottom))!important}
html[data-sv-layout="phone"] .top{align-items:center!important;gap:12px!important;margin-bottom:18px!important;padding-bottom:16px!important}
html[data-sv-layout="phone"] .top h1,html[data-sv-layout="phone"] .archive-head h1{font-size:24px!important;letter-spacing:-.04em!important;line-height:1.35!important}
html[data-sv-layout="phone"] .top .kicker{font-size:10px!important;letter-spacing:.1em!important;color:#68706b}
html[data-sv-layout="phone"] button{touch-action:manipulation;min-height:44px}
html[data-sv-layout="phone"] .btn,html[data-sv-layout="phone"] .tabs button,html[data-sv-layout="phone"] .seg button,html[data-sv-layout="phone"] .dash-switch button,html[data-sv-layout="phone"] .dash-role button,html[data-sv-layout="phone"] .kb-open,html[data-sv-layout="phone"] .kb-move,html[data-sv-layout="phone"] .modal .close{min-height:44px}
html[data-sv-layout="phone"] input,html[data-sv-layout="phone"] select,html[data-sv-layout="phone"] textarea{font-size:16px!important;min-height:48px}
html[data-sv-layout="phone"] input[type=checkbox],html[data-sv-layout="phone"] input[type=radio]{min-height:22px;width:22px;height:22px;flex-shrink:0}
html[data-sv-layout="phone"] .field label,html[data-sv-layout="phone"] .small,html[data-sv-layout="phone"] .notice,html[data-sv-layout="phone"] .hint{line-height:1.65}
html[data-sv-layout="phone"] .field label{font-size:13px}
html[data-sv-layout="phone"] .card,html[data-sv-layout="phone"] .dash-panel{border-radius:14px!important;padding:16px!important;box-shadow:none!important}
html[data-sv-layout="phone"] .g,html[data-sv-layout="phone"] .split{gap:12px}
html[data-sv-layout="phone"] .formgrid,html[data-sv-layout="phone"] .role-grid,html[data-sv-layout="phone"] .flag-grid{grid-template-columns:minmax(0,1fr)!important}
html[data-sv-layout="phone"] .dash-switch{padding:3px;gap:2px;border-radius:10px}
html[data-sv-layout="phone"] .dash-switch button{min-width:56px;padding:8px 12px;font-size:13px}
html[data-sv-layout="phone"] .dash-intro{flex-direction:row;align-items:center;gap:12px;margin:0 0 16px}
html[data-sv-layout="phone"] .dash-intro .dash-eyebrow,html[data-sv-layout="phone"] .dash-intro>div>p:not(.dash-eyebrow){display:none}
html[data-sv-layout="phone"] .dash-intro h1{font-size:18px;letter-spacing:-.03em;margin:0;line-height:1.5}
html[data-sv-layout="phone"] .dash-intro label{gap:6px;flex-shrink:0;font-size:11px;color:#68706b}
html[data-sv-layout="phone"] .dash-intro select{min-width:0;width:124px;min-height:44px;font-size:13px!important;padding:0 8px}
html[data-sv-layout="phone"] .restored-revenue{margin:0 0 16px!important;padding:16px!important}
html[data-sv-layout="phone"] .restored-revenue .dash-head{align-items:center;flex-wrap:nowrap;gap:8px;margin-bottom:14px}
html[data-sv-layout="phone"] .restored-revenue .dash-head h2{font-size:15px;margin:0;white-space:nowrap}
html[data-sv-layout="phone"] .restored-revenue .dash-head p{display:none}
html[data-sv-layout="phone"] .restored-revenue .dash-head>.btn{font-size:0;min-width:92px;min-height:44px;padding:9px 10px;background:#f6f6f3;border-color:#e1e3de}
html[data-sv-layout="phone"] .restored-revenue .dash-head>.btn::after{content:'詳細を見る';font-size:12px}
html[data-sv-layout="phone"] .revenue-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:0!important}
html[data-sv-layout="phone"] .revenue-grid>div{min-width:0;padding:14px 0!important;border:0!important;display:grid;gap:6px}
html[data-sv-layout="phone"] .revenue-grid>div:first-child{grid-column:1/-1;grid-template-columns:1fr auto;align-items:center;border-bottom:1px solid #e6e8e2!important;padding-top:0!important;padding-bottom:16px!important}
html[data-sv-layout="phone"] .revenue-grid>div:first-child>strong{grid-column:2;grid-row:1/3;font-size:clamp(27px,7.6vw,34px)!important;line-height:1.2;letter-spacing:-.05em}
html[data-sv-layout="phone"] .revenue-grid>div:first-child>small{grid-column:1;font-size:11px}
html[data-sv-layout="phone"] .revenue-grid>div:nth-child(2){border-right:1px solid #e6e8e2!important;padding-right:12px!important;padding-bottom:0!important}
html[data-sv-layout="phone"] .revenue-grid>div:nth-child(3){padding-left:16px!important;padding-bottom:0!important}
html[data-sv-layout="phone"] .revenue-grid span{font-size:12px!important;font-weight:600;color:#5e6861!important}
html[data-sv-layout="phone"] .revenue-grid strong{font-size:clamp(16px,5.2vw,24px)!important;letter-spacing:-.035em;line-height:1.3;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
html[data-sv-layout="phone"] .revenue-grid small{font-size:10px!important;line-height:1.5;color:#69726c!important}
html[data-sv-layout="phone"] .dash-kpi{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:16px;border-radius:14px}
html[data-sv-layout="phone"] .dash-metric{padding:14px 16px;min-height:104px;gap:4px}
html[data-sv-layout="phone"] .dash-metric>span{font-size:12px;color:#59645c}
html[data-sv-layout="phone"] .dash-metric strong{font-size:29px;margin:0;line-height:1.2;letter-spacing:-.04em}
html[data-sv-layout="phone"] .dash-metric i{font-size:10px;opacity:1;color:#6a5972}
html[data-sv-layout="phone"] .dash-metric.is-active i{color:#d7c9df}
html[data-sv-layout="phone"] .dash-columns{gap:12px;margin-bottom:12px}
html[data-sv-layout="phone"] .dash-head{margin-bottom:16px;gap:10px}
html[data-sv-layout="phone"] .dash-head h2{font-size:16px}
html[data-sv-layout="phone"] .dash-head p,html[data-sv-layout="phone"] .dash-muted{color:#646f67;line-height:1.65}
html[data-sv-layout="phone"] .dash-trend{height:148px;padding-left:0;padding-right:0}
html[data-sv-layout="phone"] .dash-trend-total{line-height:1.7}
html[data-sv-layout="phone"] .bottom-nav{display:none!important}
html[data-sv-layout="phone"] .sv-mobile-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;z-index:25;left:0;right:0;bottom:0;gap:4px;padding:8px 12px max(8px,env(safe-area-inset-bottom));border-top:1px solid #e3e5df;background:#fff;box-shadow:0 -4px 20px #151a1706}
html[data-sv-layout="phone"] .sv-mobile-nav button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;min-height:52px;min-width:0;border:0;border-radius:12px;background:transparent;color:#67716a;font-size:10px;font-weight:650;line-height:1.3;padding:7px 2px;letter-spacing:0}
html[data-sv-layout="phone"] .sv-mobile-nav button[aria-current],html[data-sv-layout="phone"] .sv-mobile-nav button.selected{background:#edf0eb;color:#1c2720}
html[data-sv-layout="phone"] .sv-mobile-nav svg{width:21px;height:21px;flex-shrink:0}
html[data-sv-layout="phone"] .sv-mobile-nav button:active,html[data-sv-layout="phone"] .sv-mobile-menu button:active{background:#e3e8e0}
html[data-sv-layout="phone"] .sv-mobile-nav button:focus-visible,html[data-sv-layout="phone"] .sv-mobile-menu button:focus-visible{outline:2px solid #76548d;outline-offset:2px}
html[data-sv-layout="phone"] .sv-mobile-menu{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:none;max-height:85dvh;padding:24px 20px calc(24px + env(safe-area-inset-bottom));border:0;border-radius:22px 22px 0 0;background:#f8f8f5;color:#202820;overflow:auto}
html[data-sv-layout="phone"] .sv-mobile-menu::backdrop{background:#10171270}
html[data-sv-layout="phone"] .sv-mobile-menu header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}
html[data-sv-layout="phone"] .sv-mobile-menu header span{font-size:10px;color:#68746b;letter-spacing:.12em}
html[data-sv-layout="phone"] .sv-mobile-menu h2{font-size:22px;letter-spacing:-.04em;margin:5px 0 0}
html[data-sv-layout="phone"] .sv-mobile-menu header button{width:44px;height:44px;border:1px solid #dde2d9;background:#fff;border-radius:50%;font-size:24px;color:#58645b}
html[data-sv-layout="phone"] .sv-mobile-menu-list{background:#fff;border:1px solid #e0e4dc;border-radius:14px;overflow:hidden}
html[data-sv-layout="phone"] .sv-mobile-menu-list button{display:flex;align-items:center;gap:14px;width:100%;min-height:60px;padding:14px 16px;border:0;border-bottom:1px solid #eceee8;background:transparent;text-align:left;color:#26322a;font-size:14px;font-weight:600}
html[data-sv-layout="phone"] .sv-mobile-menu-list button:last-child{border-bottom:0}
html[data-sv-layout="phone"] .sv-mobile-menu-list button>span:last-child{margin-left:auto;color:#7b877d;font-size:22px;font-weight:400}
html[data-sv-layout="phone"] .sv-mobile-menu-list button[aria-current]{background:#eef2eb}
html[data-sv-layout="phone"] .sv-mobile-menu-list svg{width:22px;height:22px;flex-shrink:0}
html[data-sv-layout="phone"] .main[data-page=customers]>.g.g3{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px}
html[data-sv-layout="phone"] .main[data-page=customers]>.g.g3>.card{padding:12px 8px!important;border-radius:10px!important;font-size:11px}
html[data-sv-layout="phone"] .main[data-page=customers]>.g.g3>.card>strong{font-size:11px;line-height:1.5}
html[data-sv-layout="phone"] .main[data-page=customers]>.g.g3 .empty{padding:8px 0;font-size:11px;line-height:1.5}
html[data-sv-layout="phone"] .status-detail-empty{display:none}
html[data-sv-layout="phone"] .customer-scope-row{gap:10px;margin-bottom:12px}
html[data-sv-layout="phone"] .customer-scope-row .seg{width:100%}
html[data-sv-layout="phone"] .customer-scope-row .seg button{flex:1;font-size:13px}
html[data-sv-layout="phone"] .customer-scope-row>.small{font-size:11px}
html[data-sv-layout="phone"] .kanban-bar{gap:8px}
html[data-sv-layout="phone"] .kanban-bar .seg{flex:1;justify-content:center}
html[data-sv-layout="phone"] .kanban-bar .seg button{flex:1;padding:8px;font-size:12px;white-space:nowrap}
html[data-sv-layout="phone"] .kanban-bar>.btn{flex:1;font-size:12px;padding:9px 6px;white-space:nowrap}
html[data-sv-layout="phone"] .kb-scroll{overscroll-behavior-x:contain;scroll-snap-type:x proximity;margin:0 -16px;padding:0 16px 16px}
html[data-sv-layout="phone"] .kb-board{padding:0;gap:12px;min-height:250px}
html[data-sv-layout="phone"] .kb-col{width:min(82vw,300px);max-width:none;scroll-snap-align:start;border-radius:14px!important;padding:12px;max-height:none;min-height:250px}
html[data-sv-layout="phone"] .kb-card{border-radius:11px!important;padding:14px}
html[data-sv-layout="phone"] .kb-name{font-size:16px}
html[data-sv-layout="phone"] .kb-meta,html[data-sv-layout="phone"] .kb-due{font-size:12px;line-height:1.6}
html[data-sv-layout="phone"] .kb-open{font-size:12px;padding:10px 12px}
html[data-sv-layout="phone"] .kb-move{font-size:13px!important;max-width:160px}
html[data-sv-layout="phone"] .kb-note{font-size:11px;line-height:1.7}
html[data-sv-layout="phone"] .overlay{padding:12px;align-items:center}
html[data-sv-layout="phone"] .modal{width:100%;padding:20px 16px!important;max-height:calc(100dvh - 24px);border-radius:18px!important;overscroll-behavior:contain}
html[data-sv-layout="phone"] .modal header{margin-bottom:18px;gap:10px}
html[data-sv-layout="phone"] .modal h2{font-size:19px;line-height:1.5}
html[data-sv-layout="phone"] .modal footer{position:sticky;bottom:-20px;background:#fff;padding:14px 0 4px;flex-wrap:wrap}
html[data-sv-layout="phone"] .modal footer .btn{flex:1}
html[data-sv-layout="phone"] .training-tabs,html[data-sv-layout="phone"] .tabs{gap:6px}
html[data-sv-layout="phone"] .tabs button{font-size:12px;padding:9px 11px}
html[data-sv-layout="phone"] .sales-kpi-grid,html[data-sv-layout="phone"] .metric-picker{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html[data-sv-layout="phone"] .sales-kpi{min-height:92px!important}
html[data-sv-layout="phone"] .sales-nav{flex-wrap:nowrap!important;overflow-x:auto;white-space:nowrap;gap:4px!important}
html[data-sv-layout="phone"] .sales-nav-btn{flex-shrink:0;min-height:44px;padding:12px!important;font-size:12px}
html[data-sv-layout="phone"] .toast{left:16px;right:16px;bottom:calc(88px + env(safe-area-inset-bottom));font-size:13px;line-height:1.6}
html[data-sv-layout="phone"] #sync-warning{font-size:12px;line-height:1.65;padding:12px!important}
html[data-sv-layout="phone"] #sync-warning button{min-height:44px;margin:6px 3px 0;border:1px solid #777;background:#fff;border-radius:6px}
html[data-sv-layout="phone"] #app>main{margin:32px auto!important;padding:24px!important}
html[data-sv-layout="phone"] #app>main .formgrid{gap:16px}
html[data-sv-layout="phone"] #app>main .brand{font-size:27px!important;padding:0;justify-content:flex-start;text-align:left}
html[data-sv-layout="phone"] #app>main .brand::before{display:none}
html[data-sv-layout="phone"] #app>main .brand span,html[data-sv-layout="phone"] #app>main .brand small{display:block!important}
html[data-sv-layout="phone"] #app>main h2{font-size:23px;letter-spacing:-.04em}
html[data-sv-layout="phone"] #app>main form>button[type=submit]{min-height:50px;font-size:15px}
html[data-sv-layout="phone"] .sidebar{display:none!important}
html[data-sv-layout="phone"] .shell{display:block}
html[data-sv-layout="phone"] .main,html[data-sv-layout="phone"] .main.archive-main{max-width:600px!important;margin:0 auto!important;padding-left:max(16px,env(safe-area-inset-left))!important;padding-right:max(16px,env(safe-area-inset-right))!important}
html[data-sv-layout="phone"] .sv-mobile-nav{max-width:600px;margin:0 auto}
html[data-sv-layout="phone"] .sv-mobile-menu{max-width:600px;margin:0 auto}
html[data-sv-layout="phone"] .g2,html[data-sv-layout="phone"] .g3,html[data-sv-layout="phone"] .g4,html[data-sv-layout="phone"] .split,html[data-sv-layout="phone"] .dash-columns,html[data-sv-layout="phone"] .training-grid,html[data-sv-layout="phone"] .knowledge-grid,html[data-sv-layout="phone"] .cd-grid,html[data-sv-layout="phone"] .cd-form,html[data-sv-layout="phone"] .summary-role-grid,html[data-sv-layout="phone"] .activity-shell,html[data-sv-layout="phone"] .activity-fields,html[data-sv-layout="phone"] .register-grid,html[data-sv-layout="phone"] .reg-inner{grid-template-columns:minmax(0,1fr)!important}
html[data-sv-layout="phone"] .main[data-page=detail]>.tabs{position:sticky;top:0;z-index:4;flex-wrap:nowrap;overflow-x:auto;background:#f3f2ef;padding:10px 0;margin:0 -2px 14px;scrollbar-width:thin}
html[data-sv-layout="phone"] .main[data-page=detail]>.tabs button{flex-shrink:0;white-space:nowrap}
html[data-sv-layout="phone"] .sv-mobile-workbench{display:block;margin:0 0 16px}
html[data-sv-layout="phone"] .sv-mobile-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
html[data-sv-layout="phone"] .sv-mobile-actions button{display:flex;gap:8px;align-items:center;justify-content:center;min-height:48px;background:#fff;border:1px solid #dce2d8;border-radius:10px;color:#243029;font-size:13px;font-weight:650}
html[data-sv-layout="phone"] .sv-mobile-actions button:last-child{background:#252d27;color:#fff;border-color:#252d27}
html[data-sv-layout="phone"] .sv-mobile-actions svg{width:18px;height:18px;flex-shrink:0}
html[data-sv-layout="phone"] .sv-today{background:#fff;border:1px solid #dce2d8;border-radius:14px;margin-top:12px;padding:14px 16px}
html[data-sv-layout="phone"] .sv-today header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
html[data-sv-layout="phone"] .sv-today h2{font-size:15px;margin:0}
html[data-sv-layout="phone"] .sv-today header button{font-size:12px;color:#53665a;border:0;background:transparent;padding:8px 0}
html[data-sv-layout="phone"] .sv-today>p{font-size:12px;color:#66736b;line-height:1.7;margin:0}
html[data-sv-layout="phone"] .sv-task-row{border-top:1px solid #edf0e9;display:flex;gap:12px;align-items:center;justify-content:space-between;padding:10px 0}
html[data-sv-layout="phone"] .sv-task-row:last-child{padding-bottom:0}
html[data-sv-layout="phone"] .sv-task-row>div{min-width:0}
html[data-sv-layout="phone"] .sv-task-row strong{display:block;font-size:13px;overflow-wrap:anywhere}
html[data-sv-layout="phone"] .sv-task-row small{display:block;font-size:11px;color:#67756c;margin-top:5px;line-height:1.6}
html[data-sv-layout="phone"] .sv-task-row button{background:#f1f4ee;border:1px solid #e1e6db;color:#253b2c;border-radius:8px;font-size:12px;padding:8px 12px;flex-shrink:0}
html[data-sv-layout="phone"] .sv-task-due{color:#9b3b24!important}
html[data-sv-layout="phone"] .sv-task-list .sv-task-row{padding:14px 0}
html[data-sv-layout="phone"] .sv-task-list .sv-task-row strong{font-size:15px}
html[data-sv-layout="phone"] .sv-task-list .sv-task-row small{font-size:12px}
html[data-sv-layout="phone"] .activity-shell{scroll-margin-top:68px}
html[data-sv-layout="phone"] .sv-menu-layout{margin-top:20px;border-top:1px solid #dce2d8;padding-top:16px}
html[data-sv-layout="phone"] .sv-menu-layout h3{font-size:14px;margin:0 0 8px}
html[data-sv-layout="phone"] .sv-menu-layout p{font-size:12px;line-height:1.6}
html[data-sv-layout="phone"] .sv-task-actions{display:flex;gap:6px;flex-shrink:0}
html[data-sv-layout="phone"] .customer-summary .g3{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px}
html[data-sv-layout="phone"] .customer-summary .summary-value{font-size:13px!important;overflow-wrap:anywhere}
