/* Personal mobile interface. Business pages remain independent; desktop keeps its layout. */
.mobile-header,.mobile-welcome,.mobile-profile,.mobile-section-title,.mobile-account-card,.mobile-settings-links,.ps-mobile-views,.ps-mobile-only,.mobile-eyebrow{display:none}
.tool button.cd{font-family:inherit;color:inherit;background:transparent;width:100%;padding:0}
.tool button.cd.sel{background:var(--cat-self-bg)}
@media(max-width:760px){
  :root{--mobile-nav-height:72px;--muted:#877667}
  html{height:auto;scroll-padding-top:70px}
  body{display:block;min-height:100svh;-webkit-text-size-adjust:100%}
  .rail{display:none}.main{width:100%;padding:0 18px calc(100px + env(safe-area-inset-bottom));min-width:0}
  .mobile-header{display:flex;align-items:center;justify-content:space-between;min-height:80px;padding:14px 0 12px;padding-top:max(14px,env(safe-area-inset-top));gap:12px}
  .mobile-brand{display:flex;align-items:center;gap:9px;color:var(--ink);font-size:19px;font-weight:750;letter-spacing:-.5px;min-height:44px}
  .mobile-brand img{width:31px;height:34px;object-fit:contain}.mobile-brand small{display:block;font-size:10px;letter-spacing:1.5px;margin-top:2px;color:var(--g5);font-weight:500}
  .mobile-account{height:42px;width:42px;flex:0 0 42px;border-radius:50%;background:#efe1d1;box-shadow:0 0 0 4px #ffffff8c;display:grid;place-items:center;color:#895237;font-size:16px;font-weight:700}
  .topbar{display:none}.topbar .right{display:none}
  [data-page=apps] .topbar{display:block;margin:3px -18px 24px;padding:4px 18px 8px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  [data-page=apps] #tabs{display:flex!important;width:max-content;gap:7px}
  .topbar .tab{padding:12px 14px;min-height:44px;font-size:13px;gap:6px;white-space:nowrap;background:#f0e9e1;border:1px solid transparent;border-radius:99px}
  .topbar .tab svg{display:none}.topbar .tab.on{background:#3e352c;color:#fff;box-shadow:none}
  .mobile-nav{position:fixed;z-index:40;inset:auto 0 0;display:grid;grid-template-columns:repeat(4,1fr);min-height:var(--mobile-nav-height);padding:7px 12px calc(9px + env(safe-area-inset-bottom));background:#fffcf9f2;border-top:1px solid #e9dfd2;box-shadow:0 -6px 24px #56392106;backdrop-filter:blur(16px)}
  .mobile-nav a{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;padding:6px 4px;font-size:11px;font-weight:550;line-height:1.2;min-height:49px;color:#938274;border-radius:14px}
  .mobile-nav a svg{width:22px;height:22px}.mobile-nav a.on{background:transparent;color:var(--warm);font-weight:700}.mobile-nav a.on svg{filter:drop-shadow(0 2px 5px #c5803933)}
  button,a,input,textarea,select,summary{-webkit-tap-highlight-color:#b8562a1a}
  button,a.act{touch-action:manipulation}.act,.lnk,.del,.tool .nb,.return-link{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  input,textarea,select{font-size:16px!important;max-width:100%}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #c39a68;outline-offset:3px}
  .form,.tbox,.tool,.detail-body,.dcard,.app{min-width:0}.form{padding:24px 18px;border-radius:20px;max-width:none}.form .fsub{font-size:14px;line-height:1.8;color:var(--g5)}
  .form h2{font-size:24px;line-height:1.4}.row2{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;padding:16px 0;align-items:center;font-size:14px}
  .row2 .k{min-width:0;font-size:14px;font-weight:650}.row2 .muted{grid-column:1;font-size:12px;overflow-wrap:anywhere}.row2 .v{grid-column:2;grid-row:1 / span 2;max-width:100%;overflow-wrap:anywhere;font-size:14px}
  .row2 .act{font-size:13px;min-width:68px;padding:10px 14px!important;box-shadow:none}
  .hsec,.mobile-section-title{font-size:18px;line-height:1.5;margin:22px 0 13px;letter-spacing:-.4px}.hsec .hcnt{font-size:11px}.hsec .hcnt a{display:inline-flex;min-height:40px;align-items:center}
  /* Home: focus on the next useful action before calendar and notes. */
  [data-page=home] #content{display:flex;flex-direction:column}
  .mobile-welcome{display:block;order:0;padding:12px 2px 21px}.mobile-welcome>p{font-size:12px;color:var(--g5);margin:0 0 11px;letter-spacing:.5px}
  .mobile-welcome h1{font-size:27px;font-weight:700;letter-spacing:-1px;margin:0;line-height:1.35;overflow-wrap:anywhere}.mobile-welcome h1 span{display:block;font-size:14px;font-weight:400;color:var(--g5);letter-spacing:0;margin-top:9px}
  #portrait{order:1;min-width:0}.portrait.home{display:none}.mobile-profile{display:block}
  .mobile-portrait-card{display:grid;grid-template-columns:90px minmax(0,1fr);gap:15px;align-items:center;background:linear-gradient(125deg,#f3dfcb,#f9ede0 70%,#f6efe5);border:1px solid #ebd4bc;border-radius:23px;padding:20px 17px;position:relative;overflow:hidden}
  .mobile-portrait-image{width:90px;height:112px;border:1px solid #fff9;background:#fff7ee;border-radius:45px 45px 14px 14px;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;color:#9c613e}
  .mobile-portrait-image img{height:100%;width:100%;object-fit:cover}.mobile-portrait-image svg{height:42px;width:42px}.mobile-portrait-image .pst{position:absolute;bottom:0;left:0;right:0;background:#fff7eeeb;font-size:10px;text-align:center;padding:6px 2px}
  .mobile-eyebrow{display:block;font-size:11px;letter-spacing:1px;font-weight:600;color:#967257;margin:0 0 9px}
  .mobile-portrait-card h2{font-size:18px;letter-spacing:-.6px;line-height:1.45;margin:0 0 8px;font-weight:700}.mobile-portrait-card p:not(.mobile-eyebrow){font-size:12px;color:#8d725b;line-height:1.6;margin:0}
  .mobile-portrait-card a{display:inline-flex;align-items:center;gap:12px;min-height:44px;font-size:13px;font-weight:700;color:#a7512b;margin-top:4px}
  .mobile-axis-heading{display:flex;justify-content:space-between;align-items:center;margin-top:25px}.mobile-axis-heading h2{margin:0;font-size:18px;font-weight:700;letter-spacing:-.4px}.mobile-axis-heading>span{font-size:11px;color:var(--g5)}
  .mobile-profile .axl{gap:9px;margin-top:13px!important}.mobile-profile .axr{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:11px;padding:15px 13px;background:#fff;border:1px solid #ece1d5;border-radius:16px;line-height:1.6}
  .mobile-profile .ak{display:grid;place-items:center;height:43px;width:42px;border-radius:13px;background:#f8e8dc;color:#a75b34;font-size:12px;font-weight:650}
  .mobile-profile [data-axis=personality] .ak{background:#efe8f2;color:#876c91}.mobile-profile [data-axis=ability] .ak{background:#e8eee3;color:#6d835d}
  .mobile-profile .av{font-size:12px;color:#695a4c;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.mobile-profile .ac a{font-size:11px;display:inline-flex;align-items:center;min-height:44px;color:#a2512b}
  .mobile-about{margin:13px 0 0;border-radius:14px;padding:0 13px;background:#f1eae2;font-size:13px;line-height:1.7;color:var(--g5)}.mobile-about summary{padding:13px 0;cursor:pointer;color:#6a5747;font-weight:600}.mobile-about summary span{font-size:11px;font-weight:400;margin-left:7px;color:#937e6c}.mobile-about p{margin:0;padding:0 0 14px;overflow-wrap:anywhere}.mobile-about blockquote{margin:0;padding:0 0 14px;font-size:13px;color:#a35b35}
  .home-apps{order:2}.home-reports{order:3}.home-tools{order:4}.mobile-section-title{display:block}
  .dgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.dcard{border:1px solid #ebdfd2;border-radius:18px;box-shadow:none}.dcard:nth-child(n+5){display:none}.dcard .pic{aspect-ratio:1.7}.dcard .dbody{padding:12px}.dcard .dnm{font-size:14px;line-height:1.5;min-height:42px;margin-bottom:5px}.dcard .dblurb{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:11px;line-height:1.6;margin-bottom:10px}.dcard .dfoot{gap:0;flex-wrap:wrap}.dcard .stat{display:none}.dcard .act{width:100%;border-radius:10px;font-size:12px;padding:10px;box-shadow:none}
  .home-reports .tbox{border-radius:18px;padding:0 15px}.home-reports .tbox>.muted{display:block;padding:18px 0;line-height:1.8}
  .tools{grid-template-columns:1fr;gap:13px}.tool{padding:18px 15px;border:1px solid #ebdfd2;border-radius:18px}.tool .th{gap:8px;flex-wrap:wrap}.tool .nav{gap:3px;font-size:12px}.tool .nb{width:36px;border:0;background:#f7f2ec;border-radius:10px}.tool .nb.txt{padding:0 8px}.tool .cd{height:42px;font-size:13px}.add{display:grid;grid-template-columns:90px minmax(0,1fr);gap:8px}.add input{min-width:0;min-height:46px}.add button{grid-column:1 / -1;min-height:44px;border-radius:10px}.nadd .prow{display:flex;align-items:center;gap:12px}.nadd .prow>.muted{line-height:1.7;font-size:11px!important}.tool textarea{min-height:92px}.di{overflow-wrap:anywhere}.di label{min-width:0}.di .tm{flex-shrink:0}.ni .nf{flex-wrap:wrap}.lnk,.del{padding:8px}
  /* Explore: compact image-led rows, horizontally scrollable categories. */
  .sect{font-size:21px;margin:28px 0 15px;gap:7px}.sect .cnt{font-size:11px;flex-basis:100%;font-weight:500}.sect .lead{font-size:13px;line-height:1.8;color:#887462;margin:3px 0 3px}
  .grid{grid-template-columns:minmax(0,1fr);gap:13px}.app{display:grid;grid-template-columns:88px minmax(0,1fr);column-gap:14px;border-radius:18px;padding:16px;border:1px solid #eadfd2;box-shadow:none}.app .pic{width:88px;height:105px;aspect-ratio:auto;border-radius:12px;align-self:start}.app .body{padding:0;min-width:0}.app .head{margin-bottom:8px;gap:0}.app .tile{display:none}.app .nm{font-size:15px;line-height:1.45}.app .badge{font-size:9px;padding:2px 6px}.app .desc{font-size:12px;line-height:1.7;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:8px}.app .foot{gap:5px}.app .stat{font-size:10px;padding:4px 0;background:transparent}.app .act{min-height:44px;min-width:66px;font-size:12px;padding:10px 15px;box-shadow:none;border-radius:12px}
  .report-library{background:transparent;border:0;padding:17px 0}.report-library .row2{background:#fff;margin:12px 0;padding:19px 17px;border:1px solid #e9dfd2;border-radius:17px}.report-library .row2 .k{font-size:15px}.report-library .fsub{margin-top:10px;margin-bottom:24px}
  .mobile-account-card{display:flex;align-items:center;gap:16px;padding:10px 0 27px;margin-bottom:8px;border-bottom:1px solid var(--line)}.mobile-account-card>span{width:62px;height:62px;flex:0 0 62px;border-radius:22px;background:#f2dfcb;color:#9c5b37;font-weight:700;font-size:24px;display:grid;place-items:center}.mobile-account-card h1{font-size:23px;line-height:1.4;margin:0;overflow-wrap:anywhere}.mobile-account-card p{font-size:12px;color:var(--g5);margin:5px 0 0}.account-settings h2{font-size:16px;padding-top:18px}.account-settings .fsub{font-size:12px;margin-bottom:8px}.account-settings .row2 .v{font-weight:500;text-align:right;max-width:185px}.mobile-settings-links{display:grid;gap:10px;margin-top:18px}.mobile-settings-links a,.mobile-settings-links button{min-height:52px;display:flex;align-items:center;justify-content:space-between;padding:14px 19px;border:1px solid var(--line);border-radius:14px;background:#fff;color:#75604e;font:inherit;font-size:14px}.mobile-settings-links button{justify-content:center;margin-top:10px;background:transparent;color:#a55f3c}
  .return-link{font-size:13px;margin-bottom:12px;justify-content:flex-start}.abanner{min-height:174px;border-radius:20px}.abanner:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#20342e22,#20342e66);pointer-events:none}.abanner .hinner{z-index:1;padding:40px 18px;text-align:right}.abanner h1{font-size:23px;letter-spacing:0}.detail-body{padding:22px 20px;border-radius:19px;font-size:14px;line-height:1.9}.detail-body h2{font-size:20px}.detail-actions .act{min-width:100px}.detail-actions{padding-top:12px}
  #me-activate-toast{bottom:calc(90px + env(safe-area-inset-bottom))!important;max-width:calc(100% - 36px);width:max-content;line-height:1.7}
  /* Portrait: create and works are two views of the same retained workflow. */
  .portrait-studio{padding-bottom:0}.ps-heading{margin:10px 0 18px;gap:13px}.ps-heading h1{font-size:28px;letter-spacing:-1px;line-height:1.4}.ps-heading p{font-size:13px;line-height:1.8}.ps-eyebrow{font-size:10px;letter-spacing:1px;margin-bottom:6px}#psBack{min-height:40px;font-size:11px}.ps-connection{font-size:11px}
  .ps-mobile-views{display:grid;grid-template-columns:1fr 1fr;gap:4px;position:sticky;top:0;z-index:25;background:#e9ede3;border:5px solid #e9ede3;border-radius:15px;margin:0 0 17px;scroll-margin-top:10px}
  .ps-mobile-views button{min-height:44px;border:0;border-radius:10px;font-size:14px;font-weight:600;color:#6b7c64;background:transparent}.ps-mobile-views button[aria-pressed=true]{background:#fff;color:#244c3e;box-shadow:0 2px 8px #233c3112}
  .portrait-studio[data-mobile-view=create] .ps-results{display:none}.portrait-studio[data-mobile-view=works] .ps-controls{display:none}.ps-layout{display:block}.ps-controls{overflow:visible;border-radius:18px}.ps-tabs{display:none}.portrait-studio[data-mobile-view=decorate] .ps-results{margin-top:16px}.portrait-studio[data-mobile-view=decorate] #psMobileDecorate{display:none}.ps-tabs button{font-size:12px;min-height:44px}#psCreate,#psDecorate{padding:18px}
  .ps-field{font-size:14px;gap:10px}.ps-main-label{font-size:16px}.ps-flow-heading strong{font-size:16px}.ps-flow-heading>span{font-size:11px}.ps-flow-heading b{font-size:11px}.ps-hint{font-size:12px;line-height:1.8;color:#7c8a71}.ps-axis{font-size:12px;padding:14px 0}.ps-axis strong{font-size:13px}.ps-axis strong small{display:block;font-size:11px;margin:4px 0}.ps-axis input{width:20px;height:20px;flex:0 0 20px}
  .ps-details summary{font-size:13px;min-height:40px}.ps-details summary span{font-size:11px}.ps-section-label{font-size:14px;flex-wrap:wrap}.ps-section-label span{font-size:11px}.ps-choice{min-height:46px;font-size:12px}.ps-styles .ps-choice{min-height:78px;padding:14px 12px}.ps-styles .ps-choice span{font-size:14px}.ps-styles small{font-size:11px;margin-top:5px}.ps-inspire{gap:7px}.ps-inspire>span{width:100%;font-size:12px}.ps-inspire button{min-height:40px;border:1px solid #e1e8db;padding:8px 11px;border-radius:9px;background:#f7f9f3;font-size:11px;margin:0}
  .ps-primary{min-height:52px;font-size:15px}.ps-generate-bar p{font-size:11px}.ps-input-summary{font-size:12px}.ps-input-summary span{font-size:11px}.ps-photo-picker{padding:18px 14px;font-size:14px}.portrait-studio .ps-photo-picker input{font-size:14px!important}.ps-photo-picker input::file-selector-button{border:0;border-radius:8px;background:#e3edda;color:#365b30;min-height:44px;padding:10px 12px;margin-right:9px;font:inherit}.ps-photo-picker span{font-size:11px}.ps-reference-remove{min-height:44px;font-size:12px}.ps-crop-ratios{gap:4px}.ps-crop-ratios button{font-size:11px;min-height:44px}.ps-crop-heading{font-size:13px}.ps-crop-heading button{min-height:44px;font-size:12px}.ps-crop-handle{width:44px;height:44px}
  .ps-results .ps-preview-card{padding:13px;border-radius:18px}.ps-image-wrap{min-height:220px}.ps-image-wrap img{max-height:460px}.ps-empty{min-height:250px;padding:18px}.ps-empty h2{font-size:20px}.ps-empty p{font-size:12px}.ps-preview-top{font-size:12px;gap:8px;flex-wrap:wrap}.ps-preview-top #psSelectedBadge{font-size:11px}
  .ps-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.ps-actions button{min-height:46px;font-size:12px;padding:11px 7px}.ps-mobile-only{display:block}#psMobileDecorate{grid-column:1/-1;color:#395b35;background:#f0f5e9}
  .ps-edit-actions{flex-direction:column;align-items:stretch;gap:12px}.ps-edit-actions small{font-size:11px}.ps-secondary{min-height:46px;font-size:13px}.ps-history-heading{gap:8px;align-items:baseline;flex-wrap:wrap}.ps-history-heading h2{font-size:18px}.ps-history-heading>span{font-size:11px}.ps-history{grid-template-columns:repeat(2,minmax(0,1fr));max-height:none;overflow:visible;gap:13px}.ps-history-item>span:last-child{font-size:11px;padding:9px}.portrait-studio .ps-delete-work{min-height:44px;font-size:12px;padding:10px 13px}.ps-source-details{font-size:12px}
  .ps-message{position:sticky;bottom:calc(85px + env(safe-area-inset-bottom));font-size:13px;z-index:30;box-shadow:0 3px 18px #20342e12}.portrait-studio .ps-delete-dialog{max-height:calc(100svh - 40px);overflow:auto;padding:23px}.ps-delete-dialog .ps-actions{grid-template-columns:1fr 1fr}.ps-delete-dialog .ps-actions button{font-size:13px}
}
@media(max-width:359px){[data-page=apps] .topbar{margin-left:-14px;margin-right:-14px;padding-left:14px;padding-right:14px}.main{padding-left:14px;padding-right:14px}.mobile-portrait-card{grid-template-columns:72px minmax(0,1fr);padding:17px 13px;gap:12px}.mobile-portrait-image{width:72px;height:98px}.mobile-portrait-card h2{font-size:16px}.mobile-profile .axr{padding:12px 10px;gap:8px;grid-template-columns:36px minmax(0,1fr) auto}.mobile-profile .ak{width:36px}.mobile-profile .av{font-size:11px}.app{padding:13px;grid-template-columns:72px minmax(0,1fr);gap:11px}.app .pic{width:72px;height:96px}.tool .nav{font-size:11px}.tool .nb{width:30px}.ps-crop-heading{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
