/* Fstep phone composition. Desktop styles are intentionally outside this scope. */
.phone-tabbar,.phone-learning-tabs,.phone-filter-bar,.phone-rank-toggle { display: none; }
.phone-all-dialog,.phone-filter-dialog { border:0; padding:0; color:#18233a; background:#fff; }
.phone-all-dialog:not([open]),.phone-filter-dialog:not([open]) { display:none; }
.phone-viewport-hint { padding:1em; background:#fff7df; color:#493914; font:clamp(16px,4vw,40px)/1.7 system-ui,sans-serif; }
.phone-viewport-hint p { margin:0 0 8px; }
.phone-viewport-hint button { padding:.5em 1em; min-height:44px; border:1px solid #c0a971; border-radius:8px; background:white; font:inherit; }
@media (max-width:759px) {
  :root { --phone-bg:#f5f6fa; --phone-paper:#fff; --phone-ink:#18233a; --phone-muted:#626d81; --phone-accent:#6541e9; --phone-line:#e6e7ef; --phone-bottom:calc(64px + env(safe-area-inset-bottom)); }
  body { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
  body:not(.welcome-mode) { background:var(--phone-bg); }
  #appPage { --shell-gutter:16px; font-size:16px; padding-bottom:var(--phone-bottom); }
  #productWorkspace > .topbar { height:60px; min-height:60px; padding-inline:20px; background:white; backdrop-filter:none; box-shadow:none; border-bottom:1px solid var(--phone-line); }
  #appPage #sidebarToggle { display:none; }
  #appPage .mobile-shell-brand .brand { font-size:20px; gap:9px; letter-spacing:0; }
  #appPage .mobile-shell-brand .brand-mark { width:32px; height:32px; }
  #coastAtmosphere { display:none; }
  #productWorkspace > .topbar .guest-actions button { min-height:44px; padding:8px 12px; font-size:14px; }
  #productWorkspace > .guest-banner { padding:12px 16px; font-size:13px; }
  #productWorkspace > .guest-banner p { white-space:normal; text-overflow:clip; overflow:visible; }
  #productWorkspace .product-view > section.module-hero:first-child,#appPage .ency-primary .module-hero { display:block; padding:24px 0 18px; margin-bottom:0; }
  #appPage .module-hero h1,#appPage .ency-primary .module-hero h1 { font-size:28px; line-height:1.35; letter-spacing:-.025em; margin:0 0 8px; }
  #appPage .module-hero-copy > p,#appPage .ency-primary .module-hero-copy > p { font-size:14px; line-height:1.8; color:var(--phone-muted); }
  #appPage .module-hero :is(.library-count,.tool-total),#appPage .resume-counts { margin-top:12px; }
  #appPage .module-hero :is(.library-count,.tool-total) strong,#appPage .resume-counts strong { font-size:18px; }
  #appPage .module-hero :is(.library-count,.tool-total) span,#appPage .resume-counts span { font-size:13px; }
  #appPage #toolsPage > .module-features,#appPage #workshopPage > .module-features { display:none; }
  .phone-tabbar { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); position:fixed; z-index:30; inset:auto 0 0; min-height:var(--phone-bottom); padding:6px 8px max(6px,env(safe-area-inset-bottom)); background:white; border-top:1px solid var(--phone-line); }
  .phone-tab { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-width:0; min-height:52px; padding:4px; border:0; border-radius:12px; background:transparent; color:var(--phone-muted); font:inherit; font-size:12px; font-weight:600; line-height:1.4; cursor:pointer; }
  .phone-tab svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
  .phone-tab[aria-current=page] { color:var(--phone-accent); background:#f4f0ff; }
  .phone-tab:active,.phone-all-item:active { background:#eee8ff; }
  body.welcome-mode .phone-tabbar,body[data-mobile-keyboard=true] .phone-tabbar { display:none; }
  .phone-learning-tabs:not([hidden]) { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; background:white; padding:8px 12px; border-bottom:1px solid var(--phone-line); }
  .phone-learning-tabs button { min-height:44px; padding:8px 3px; border:0; border-radius:8px; background:transparent; color:var(--phone-muted); font:inherit; font-size:14px; }
  .phone-learning-tabs button[aria-pressed=true] { background:#f2edff; color:var(--phone-accent); font-weight:650; }
  #appPage :is(.library-panel,.skill-panel,.tool-directory,.ency-directory,.knowledge-panel,.resume-panel) { background:transparent; border:0; box-shadow:none; padding:0; margin-bottom:24px; overflow:visible; }
  #appPage :is(.skill-toolbar,.knowledge-toolbar,.tool-directory-head,.feed-heading) { display:flex; flex-direction:column; align-items:stretch; padding:0; gap:12px; margin-bottom:14px; }
  #appPage :is(.skill-toolbar,.knowledge-toolbar,.tool-directory-head) h2 { font-size:17px; margin:0 0 5px; }
  #appPage :is(.search,.tool-search,.ency-search) { border:1px solid var(--phone-line); background:white; border-radius:12px; overflow:visible; min-height:48px; }
  #appPage :is(.search,.tool-search,.ency-search) input { font-size:16px; padding-block:12px; }
  #appPage :is(.search,.tool-search,.ency-search) button { border-radius:0 11px 11px 0; }
  #appPage .phone-filter-source { display:none!important; }
  #appPage .phone-filter-source + .mobile-choice-toggle { display:none; }
  #appPage :is(.skill-filters,.knowledge-filter-block) { display:block; margin:0; padding:0; border:0; }
  .phone-filter-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 16px; min-height:48px; }
  .phone-filter-summary { min-width:0; flex:1; font-size:13px; color:var(--phone-muted); overflow-wrap:anywhere; }
  .phone-filter-button { flex:none; min-height:44px; padding:10px 16px; border:1px solid #ded6f8; border-radius:10px; color:var(--phone-accent); background:white; font:inherit; font-size:14px; font-weight:600; line-height:1.4; cursor:pointer; }
  .phone-filter-button::after { content:'⌄'; margin-left:8px; }
  :is(.phone-all-dialog,.phone-filter-dialog)[open] { position:fixed; inset:auto 0 0; margin:0 auto; width:100%; max-width:600px; max-height:min(88dvh,calc(var(--mobile-visual-height,100dvh) - 16px)); border-radius:24px 24px 0 0; overflow:auto; padding-bottom:max(20px,env(safe-area-inset-bottom)); }
  :is(.phone-all-dialog,.phone-filter-dialog)::backdrop { background:#18233a70; }
  .phone-sheet-head { display:flex; align-items:center; justify-content:space-between; gap:16px; position:sticky; top:0; z-index:2; background:white; padding:16px 20px; border-bottom:1px solid var(--phone-line); }
  .phone-sheet-head h2 { margin:0; font-size:21px; line-height:1.5; }
  .phone-sheet-head button { min-height:44px; min-width:60px; padding:8px 12px; border:0; border-radius:9px; font:inherit; font-size:15px; background:#f4f0ff; color:var(--phone-accent); }
  .phone-all-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:20px; }
  .phone-all-item { display:flex; align-items:center; gap:12px; min-height:76px; padding:16px 12px; border:1px solid var(--phone-line); border-radius:14px; background:white; color:var(--phone-ink); font:inherit; font-size:15px; font-weight:600; line-height:1.6; text-align:left; }
  .phone-all-item svg { width:25px; height:25px; flex:none; fill:none; stroke:var(--phone-accent); stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
  .phone-all-item[aria-current=page] { border-color:#bdaaf6; background:#f8f5ff; }
  .phone-filter-body { padding:8px 20px 24px; }
  .phone-filter-section { margin:18px 0 24px; }
  .phone-filter-section h3 { font-size:15px; line-height:1.6; margin:0 0 12px; }
  .phone-filter-section:has(> [hidden]) { display:none; }
  .phone-filter-dialog :is(.category-chips,.type-filters,.knowledge-primary-filters,.knowledge-sub-filters,.tool-filters) { display:flex; flex-wrap:wrap; gap:10px; padding:0; margin:0; border:0; }
  .phone-filter-dialog :is(.filter-chip,.type-filter,.knowledge-filter,.knowledge-sub-filter,.tool-filter) { display:block; min-height:44px; max-width:100%; padding:10px 13px; border:1px solid var(--phone-line); border-radius:10px; background:#fafafe; color:var(--phone-muted); font:inherit; font-size:14px; white-space:normal; overflow-wrap:anywhere; }
  .phone-filter-dialog :is(.active,[aria-pressed=true]) { background:#eee8ff; border-color:#c5b4f7; color:var(--phone-accent); }
  .phone-filter-dialog .tool-category-toggle,.phone-filter-dialog .mobile-choice-toggle { display:none; }
  .phone-filter-dialog .tool-filters[data-collapsed=true] .tool-filter:nth-of-type(n+7):not(.active) { display:block; }
  .phone-filter-dialog .resume-filters { display:grid; gap:12px; }
  .phone-filter-dialog select { width:100%; min-height:48px; padding:10px 12px; border:1px solid var(--phone-line); border-radius:10px; background:white; color:var(--phone-ink); font:inherit; font-size:16px; }
  #appPage .hotspot-heading { margin-bottom:12px; }
  #appPage .hotspot-heading h2 { font-size:20px; }
  #appPage .hotspot-block { margin-bottom:26px; }
  #appPage .hotspot-lead { border-radius:16px; }
  #appPage .hotspot-lead-content { padding:20px; }
  #appPage .hotspot-lead h3 { font-size:21px; line-height:1.55; }
  #appPage .hotspot-lead-content > p { -webkit-line-clamp:2; }
  #appPage .hotspot-ranking { padding:0 16px; border-radius:12px; }
  #appPage .phone-rank-toggle { display:flex; align-items:center; justify-content:space-between; min-height:52px; width:100%; padding:12px 0; border:0; background:transparent; font:inherit; font-size:14px; color:var(--phone-accent); text-align:left; }
  #appPage .phone-rank-toggle::after { content:'⌄'; }
  #appPage .hotspot-ranking:not([data-phone-expanded=true]) > :not(.phone-rank-toggle) { display:none; }
  #appPage .article-list { border:0; }
  #appPage .article-row { position:relative; grid-template-columns:minmax(0,1fr) 92px; gap:14px; padding:20px 16px; margin-bottom:12px; background:white; border:1px solid var(--phone-line); border-radius:14px; }
  #appPage .article-thumbnail { width:92px; height:72px; border-radius:10px; }
  #appPage .article-row h3 { font-size:17px; line-height:1.65; }
  #appPage .article-row p { font-size:14px; line-height:1.8; }
  #appPage .skill-grid,#appPage .tool-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; }
  #appPage .skill-card { padding:20px; border-radius:16px; border-color:var(--phone-line); }
  #appPage .skill-card-top { min-height:46px; padding-left:58px; }
  #appPage .skill-card-top > .topic-icon { left:20px; top:20px; }
  #appPage .skill-card h3 { font-size:20px; line-height:1.55; margin:10px 0; }
  #appPage .skill-card > p { font-size:15px; line-height:1.85; margin-bottom:14px; }
  #appPage .skill-card-bottom { padding-top:12px; border-top:1px solid #f0eff6; align-items:center; gap:10px; }
  #appPage .skill-platforms { color:var(--phone-muted); }
  #appPage .skill-action { display:flex; align-items:center; min-height:44px; font-size:14px; }
  #appPage .favorite-button { min-height:44px; padding:10px 12px; border:1px solid #eeedf5; color:var(--phone-muted); background:#fcfcff; }
  #appPage .favorite-button.is-saved { color:var(--phone-accent); background:#f3eeff; }
  #appPage .ency-directory { padding:0; }
  #appPage .ency-head { gap:14px; }
  #appPage .ency-item { display:grid; grid-template-columns:minmax(0,1fr) 88px; gap:14px; align-items:start; padding:20px 16px; border:1px solid var(--phone-line); border-radius:14px; margin:12px 0; }
  #appPage .ency-item > .semantic-concept { width:88px; aspect-ratio:1; margin-top:34px; }
  #appPage .ency-item h2 { font-size:18px; line-height:1.65; }
  #appPage .ency-item p { font-size:15px; line-height:1.8; }
  #appPage .ency-learning-rail { margin-top:8px; }
  #appPage .tool-card { padding:20px; border:1px solid var(--phone-line); border-radius:16px; }
  #appPage .tool-card h2 { font-size:20px; }
  #appPage .tool-card-summary { font-size:15px; color:var(--phone-muted); }
  #appPage .tool-card > .favorite-button { align-self:flex-start; }
  #appPage .knowledge-list { background:none; }
  #appPage .knowledge-row { margin-bottom:14px; padding:20px; border:1px solid var(--phone-line); border-radius:14px; background:white; }
  #appPage .knowledge-row-content > p { font-size:15px; line-height:1.85; }
  #appPage .resume-tabs { padding-inline:0; margin-bottom:14px; gap:20px; }
  #appPage .resume-tab { min-height:48px; font-size:16px; }
  #appPage .resume-toolbar { padding:0; }
  #appPage .resume-summary { margin:12px 0 16px; }
  #appPage .resume-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; border:0; background:transparent; }
  #appPage .resume-template-card { grid-template-columns:76px minmax(0,1fr); padding:18px; border:1px solid var(--phone-line); border-radius:14px; background:white; }
  #appPage .resume-card-preview { width:76px; height:104px; }
  #appPage .resume-card-content h3 { font-size:17px; line-height:1.6; }
  #appPage .resume-card-content p { font-size:14px; line-height:1.8; }
  #appPage .resume-card-actions { padding-top:12px; border-top:1px solid #f0eff6; }
  #appPage .workshop-catalog { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:0; border:0; background:transparent; }
  #appPage .workshop-group-filters { padding:0 0 16px; margin-bottom:0; border:0; gap:8px; }
  #appPage .workshop-tool { display:flex; flex-direction:column; align-items:stretch; gap:12px; padding:16px; border:1px solid var(--phone-line); border-radius:14px; background:white; }
  #appPage .workshop-tool + .workshop-tool { border-top:1px solid var(--phone-line); }
  #appPage .workshop-tool-symbol { width:42px; height:42px; border-radius:10px; }
  #appPage .workshop-tool h2 { font-size:17px; line-height:1.6; margin:0 0 8px; }
  #appPage .workshop-tool p { font-size:14px; line-height:1.8; }
  #appPage .workshop-format-chips span { font-size:12px; padding:2px 4px; }
  #appPage .workshop-tool .workshop-button { width:100%; min-width:0; padding-inline:8px; margin-top:auto; font-size:14px; }
  #appPage .workshop-catalog-note { grid-column:1/-1; margin:0; padding:8px 0; }
  #appPage :is(.workshop-extra,.workshop-shell) { border-radius:16px; background:white; border:1px solid var(--phone-line); scroll-margin-top:76px; }
  #appPage .workshop-extra { padding:20px 16px; }
  #appPage .workshop-workspace { padding:24px 18px; }
  #appPage .workshop-notes { padding:20px 18px; border-radius:0 0 16px 16px; }
  #appPage .workshop-breadcrumb { padding-block:4px; font-size:14px; }
  #appPage .workshop-upload { padding:28px 16px; }
  #appPage .workshop-submit-row { padding-top:20px; }
  #appPage .workshop-text-input textarea { min-height:220px; }
  #appPage .account-page { padding:24px 16px; }
  #appPage .account-heading { align-items:center; margin-bottom:24px; gap:16px; }
  #appPage .account-avatar { width:60px; height:60px; font-size:26px; border-radius:18px; }
  #appPage .account-heading h1 { font-size:25px; overflow-wrap:anywhere; }
  #appPage .account-tabs { background:white; gap:6px; padding:10px; }
  #appPage .account-tabs button { min-height:48px; font-size:14px; border-radius:9px; border:0; }
  #appPage .account-tabs button.active { color:var(--phone-accent); background:#f3eeff; }
  #appPage .account-panel { padding:24px 18px; }
  #appPage .account-panel > p { font-size:15px; }
  #appPage .account-content-row { padding:20px 0; }
  #appPage footer .container { padding-bottom:24px; }
  :is(.article-modal,.skill-modal,.knowledge-modal,.resume-modal) { width:100%; max-width:none; max-height:var(--mobile-visual-height,100dvh); height:var(--mobile-visual-height,100dvh); border:0; border-radius:0; background:white; }
  .modal-backdrop:not(.auth-backdrop),body.authenticated .modal-backdrop:not(.auth-backdrop) { padding:0; }
  :is(.article-detail,.skill-detail,.knowledge-detail,.resume-detail) { padding:24px 20px max(32px,env(safe-area-inset-bottom)); }
  :is(.article-detail,.skill-detail,.knowledge-detail,.resume-detail) h1 { font-size:26px; line-height:1.55; }
  :is(.article-content,.knowledge-content,.encyclopedia-prose) { font-size:17px; line-height:1.95; color:#354158; }
  :is(.modal-header,.tool-dialog-head,.ency-dialog-bar,.feedback-head) { padding:12px 20px; min-height:64px; }
  .tool-dialog[open],.ency-dialog[open] { position:fixed; inset:0; margin:0; width:100%; max-width:none; height:var(--mobile-visual-height,100dvh); max-height:var(--mobile-visual-height,100dvh); border:0; border-radius:0; }
  .ency-reading,.tool-detail-body { padding:24px 20px 32px; }
  .auth-backdrop,#authModal.welcome-auth { align-items:end!important; padding:0!important; }
  .auth-modal,#authModal.welcome-auth .auth-modal { width:100%; max-width:none; padding:28px 24px max(24px,env(safe-area-inset-bottom)); border:0; border-radius:24px 24px 0 0; max-height:calc(var(--mobile-visual-height,100dvh) - 12px); }
  .auth-heading h2 { font-size:23px; line-height:1.5; }
  .auth-form input { min-height:50px; font-size:16px; }
  .auth-form .auth-check input { min-height:0; }
  .auth-primary,.auth-demo { min-height:50px; }
  .feedback-dialog[open] { inset:auto 0 0; margin:0 auto; width:100%; max-width:600px; max-height:calc(var(--mobile-visual-height,100dvh) - 12px); border:0; border-radius:24px 24px 0 0; }
  .feedback-body textarea { min-height:170px; }
  .feedback-body,.feedback-success { padding:20px; }
  .toast-stack { top:auto; bottom:calc(var(--phone-bottom) + 12px); pointer-events:none; }
  :is(.phone-tab,.phone-all-item,.phone-filter-button,.phone-sheet-head button,.phone-learning-tabs button):focus-visible { outline:3px solid #9f85ef; outline-offset:2px; }
  .welcome-page { min-height:100svh; padding:28px 24px max(20px,env(safe-area-inset-bottom)); }
  .welcome-header { align-items:center; gap:16px; }
  .welcome-page .welcome-brand { font-size:24px; }
  .welcome-tagline { max-width:145px; font-size:12px; line-height:1.8; }
  .welcome-tagline > span { display:block; }
  .welcome-landscape { object-position:43% 50%; }
  .welcome-page::before { background:linear-gradient(180deg,#16315466,#16315499 39%,#16315425 62%,transparent 78%); }
  .welcome-content { margin-top:clamp(40px,7svh,72px); padding-bottom:32px; max-width:100%; }
  .welcome-content h1 { font-size:clamp(34px,9.5vw,44px); line-height:1.28; font-weight:650; letter-spacing:-.04em; }
  .welcome-english { margin-top:20px; font-size:16px; line-height:1.6; }
  .welcome-description { margin-top:20px; font-size:15px; line-height:1.9; }
  .welcome-actions { display:flex; flex-direction:column; align-items:stretch; gap:12px; margin-top:28px; }
  .welcome-actions button { width:100%; min-height:52px; font-size:16px; border-radius:12px; }
  .welcome-bottom { padding-top:32px; gap:12px; }
  .welcome-modules { font-size:12px; line-height:1.9; max-width:100%; }
  .welcome-bottom nav { gap:0 24px; font-size:13px; }
}
@media (max-width:359px) {
  #appPage { --shell-gutter:14px; }
  #appPage .workshop-catalog { grid-template-columns:minmax(0,1fr); }
  #appPage .article-row,#appPage .ency-item { grid-template-columns:minmax(0,1fr); }
  #appPage .article-thumbnail { grid-row:1; width:100%; height:auto; aspect-ratio:16/9; }
  #appPage .ency-item > .semantic-concept { grid-row:1; width:100%; margin:0; aspect-ratio:5/3; }
  .phone-all-grid { gap:10px; padding:16px; }
  .phone-all-item { flex-direction:column; align-items:flex-start; font-size:14px; }
  .welcome-page { padding-inline:20px; }
  .welcome-content { margin-top:32px; }
}
@media (max-width:759px) and (max-height:700px) {
  .welcome-content { margin-top:28px; }
  .welcome-content h1 { font-size:32px; }
}
