  /* Redesigned Homepage Archival Console Styles */
  .console-frame {
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 20px 0;
    margin: 20px auto 40px;
    position: relative;
    overflow: visible;
    transition: all 0.4s ease;
    max-width: 1100px; /* Cinematic Widescreen */
    min-height: max(600px, calc(100vh - 180px)); /* Match viewport with a floor height */
    display: flex;
    flex-direction: column;
  }
  body.laplace-active .console-frame {
    background: none;
    border: none;
    box-shadow: none;
  }
  
  /* Grid lines on background of console */
  .console-frame::before {
    display: none;
  }
  body.laplace-active .console-frame::before {
    display: none;
  }

  .console-header-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 24px;
    z-index: 5;
    position: relative;
  }
  body.laplace-active .console-header-bar {
    border-bottom-color: #2D3043;
  }
  .console-system-info {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
  }
  .console-system-status {
    font-size: 11px;
    font-weight: 700;
    color: #10B981;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
  }
  .status-dot {
    width: 6px;
    height: 6px;
    background: #10B981;
    border-radius: 50%;
    display: inline-block;
    animation: statusPulse 2s infinite alternate;
  }
  @keyframes statusPulse {
    from { opacity: 0.4; }
    to { opacity: 1; transform: scale(1.2); }
  }

  .console-title-wrap {
    text-align: center;
  }
  .console-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  body.laplace-active .console-title {
    color: #FFFFFF;
  }
  .console-subtitle {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 1.5px;
    margin-top: 2px;
    text-transform: uppercase;
  }

  .console-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    z-index: 5;
    position: relative;
  }
  @media (max-width: 1024px) {
    .console-grid {
      grid-template-columns: 1fr;
      gap: 20px;
    }
  }

  .step-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  body.laplace-active .step-panel {
    background: #1C1D24;
    border-color: #2D3043;
  }
  
  /* Step active/inactive and complete logic */
  .step-panel.locked {
    opacity: 0.3;
    filter: grayscale(0.6) blur(0.5px);
    pointer-events: none;
    user-select: none;
  }
  .step-panel.completed {
    border-color: rgba(16, 185, 129, 0.3);
  }
  body.laplace-active .step-panel.completed {
    border-color: rgba(16, 185, 129, 0.2);
  }

  .step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 12px;
  }
  body.laplace-active .step-header {
    border-bottom-color: #2D3043;
  }
  .step-num {
    font-family: 'Libre Bodoni', serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--text-dark);
    opacity: 0.8;
  }
  body.laplace-active .step-num {
    color: #FFFFFF;
  }
  .step-tag {
    font-family: 'Fira Code', monospace;
    font-size: 9px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.03);
    padding: 3px 8px;
    border-radius: 4px;
  }
  body.laplace-active .step-tag {
    background: rgba(255, 255, 255, 0.04);
  }
  .step-panel.completed .step-tag {
    color: #10B981;
    background: rgba(16, 185, 129, 0.08);
  }

  .step-title-block {
    text-align: center;
    margin-bottom: 16px;
  }
  .step-main-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
  }
  body.laplace-active .step-main-title {
    color: #FFFFFF;
  }
  .step-sub-title {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
  }

  /* Connection SVG inside Step 1 */
  .step-gear-eye-svg {
    display: block;
    margin: 0 auto;
    width: 220px;
    height: 220px;
    color: var(--text-dark);
  }
  body.laplace-active .step-gear-eye-svg {
    color: #EEEEEE;
  }
  
  .gender-symbol {
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .gender-symbol.active {
    opacity: 1;
    transform: scale(1);
  }

  .branch-selector-row {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 360px;
    margin: 20px auto 0;
    gap: 16px;
  }
  .branch-option {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 84px;
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
  }
  
  /* Male Branch option - Blue on initial load */
  .branch-option.male-opt {
    border: 1px solid var(--observer-blue);
    background: rgba(47, 117, 255, 0.01);
    color: var(--observer-blue);
  }
  .branch-option.male-opt .branch-opt-text {
    color: var(--observer-blue) !important;
    font-weight: 800;
  }
  .branch-option.male-opt .branch-opt-sub {
    color: var(--observer-blue) !important;
    font-weight: 600;
    opacity: 0.8;
  }
  .branch-option.male-opt:hover {
    background: rgba(47, 117, 255, 0.05);
    box-shadow: 0 4px 12px rgba(47, 117, 255, 0.1);
  }
  .branch-option.male-opt.active {
    background: rgba(47, 117, 255, 0.04);
    box-shadow: 0 0 16px rgba(47, 117, 255, 0.25), inset 0 0 8px rgba(47, 117, 255, 0.05);
  }
  
  /* Female Branch option - Red on initial load */
  .branch-option.female-opt {
    border: 1px solid var(--observer-red);
    background: rgba(233, 53, 70, 0.01);
    color: var(--observer-red);
  }
  .branch-option.female-opt .branch-opt-text {
    color: var(--observer-red) !important;
    font-weight: 800;
  }
  .branch-option.female-opt .branch-opt-sub {
    color: var(--observer-red) !important;
    font-weight: 600;
    opacity: 0.8;
  }
  .branch-option.female-opt:hover {
    background: rgba(233, 53, 70, 0.05);
    box-shadow: 0 4px 12px rgba(233, 53, 70, 0.1);
  }
  .branch-option.female-opt.active {
    background: rgba(233, 53, 70, 0.04);
    box-shadow: 0 0 16px rgba(233, 53, 70, 0.25), inset 0 0 8px rgba(233, 53, 70, 0.05);
  }

  /* Laplace Mode overrides to keep them beautiful on dark background */
  body.laplace-active .branch-option.male-opt {
    background: rgba(47, 117, 255, 0.04);
    border-color: var(--observer-blue);
  }
  body.laplace-active .branch-option.female-opt {
    background: rgba(233, 53, 70, 0.04);
    border-color: var(--observer-red);
  }
  body.laplace-active .branch-option.male-opt:hover {
    background: rgba(47, 117, 255, 0.1);
  }
  body.laplace-active .branch-option.male-opt.active {
    background: rgba(47, 117, 255, 0.15);
    box-shadow: 0 0 20px rgba(47, 117, 255, 0.35);
  }
  body.laplace-active .branch-option.female-opt:hover {
    background: rgba(233, 53, 70, 0.1);
  }
  body.laplace-active .branch-option.female-opt.active {
    background: rgba(233, 53, 70, 0.15);
    box-shadow: 0 0 20px rgba(233, 53, 70, 0.35);
  }
  
  /* Triangles above selected buttons */
  .branch-option.male-opt.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 8px 6px;
    border-style: solid;
    border-color: transparent transparent var(--observer-blue) transparent;
    z-index: 10;
  }
  .branch-option.female-opt.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 8px 6px;
    border-style: solid;
    border-color: transparent transparent var(--observer-red) transparent;
    z-index: 10;
  }

  /* Tech scanning corner brackets */
  .corner-bracket {
    position: absolute;
    width: 6px;
    height: 6px;
    pointer-events: none;
    opacity: 0.5;
    transition: all 0.3s ease;
  }
  .corner-bracket.tl {
    top: 6px;
    left: 6px;
    border-top: 1.5px solid currentColor;
    border-left: 1.5px solid currentColor;
  }
  .corner-bracket.tr {
    top: 6px;
    right: 6px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
  }
  .corner-bracket.bl {
    bottom: 6px;
    left: 6px;
    border-bottom: 1.5px solid currentColor;
    border-left: 1.5px solid currentColor;
  }
  .corner-bracket.br {
    bottom: 6px;
    right: 6px;
    border-bottom: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
  }
  .branch-option:hover .corner-bracket,
  .branch-option.active .corner-bracket {
    opacity: 1;
    transform: scale(1.1);
  }

  /* HUD Divider Line below Title */
  .hud-divider {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 8px 0;
    color: var(--border);
  }
  body.laplace-active .hud-divider {
    color: #2D3043;
  }

  /* Bottom Step Progress indicator (Mockup style) */
  .step-progress-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
    width: 100%;
    font-size: 13px;
    font-weight: 600;
  }
  body.laplace-active .step-progress-indicator {
    border-top-color: #2D3043;
  }
  .progress-step {
    color: var(--muted);
    transition: color 0.3s ease;
  }
  .progress-divider {
    color: var(--border);
  }
  body.laplace-active .progress-divider {
    color: #2D3043;
  }
  
  /* Default active color is text-dark, white in dark mode */
  .progress-step.active-step {
    color: var(--text-dark);
  }
  body.laplace-active .progress-step.active-step {
    color: #FFFFFF;
  }
  
  /* Completed step styling */
  .progress-step.completed-step {
    color: var(--text-main);
    opacity: 0.8;
  }
  
  /* Gender contextual highlights when active */
  .male-theme-active .step-progress-indicator .active-step {
    color: var(--observer-blue) !important;
  }
  .female-theme-active .step-progress-indicator .active-step {
    color: var(--observer-red) !important;
  }

  .branch-opt-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
    transition: color 0.3s;
  }
  body.laplace-active .branch-opt-text {
    color: #FFFFFF;
  }
  .branch-opt-sub {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
    transition: color 0.3s;
  }

  /* Abstract Coordinates Map inside Step 2 */
  .abstract-map-wrap {
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: #FAF8F5; /* Warm parchment map background */
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 340px; /* Expansive Widescreen Map height */
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
  }
  body.laplace-active .abstract-map-wrap {
    border-color: #2D3043;
    background: #121319;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
  }
  
  .abstract-map-svg {
    width: 100%;
    height: 100%;
  }

  /* Map Nodes style with 3D cube icons and halos */
  .map-node {
    cursor: default; /* Not interactive anymore */
    pointer-events: none; /* Make nodes transparent to mouse clicks */
  }
  
  .map-node .node-halo {
    fill: none;
    stroke: transparent;
    stroke-width: 1px;
    transition: all 0.3s ease;
  }
  
  .map-node .node-halo-outer {
    fill: none;
    stroke: transparent;
    stroke-width: 0.8px;
    transition: all 0.3s ease;
  }
  
  .map-node .node-bg {
    fill: #FFFFFF;
    stroke: var(--border);
    stroke-width: 1.5px;
    opacity: 0.35; /* Weaken unlit nodes */
    transition: all 0.3s ease;
  }
  body.laplace-active .map-node .node-bg {
    fill: #15161D;
    stroke: #2D3043;
    opacity: 0.25;
  }
  
  .map-node .node-cube-icon {
    fill: none;
    stroke: var(--text-dark);
    stroke-width: 0.8px;
    opacity: 0.35; /* Weaken unlit icons */
    transition: all 0.3s ease;
  }
  body.laplace-active .map-node .node-cube-icon {
    stroke: #8E91A5;
    opacity: 0.25;
  }
  
  .map-node .node-label {
    font-size: 8px;
    font-family: inherit;
    font-weight: 600;
    fill: var(--muted);
    text-anchor: middle;
    transition: all 0.3s ease;
    display: none; /* Hide individual text labels on the map to keep it clean like the mockup */
  }
  
  /* Selected active state - inherits color class (male-color: blue, female-color: red) */
  .map-node.active .node-bg {
    fill: currentColor;
    stroke: currentColor;
    opacity: 1 !important; /* Full opacity when active */
  }
  .map-node.active .node-cube-icon {
    stroke: #FFFFFF !important; /* Cube wireframe becomes white inside the colored circle */
    stroke-width: 1.2px;
    opacity: 1 !important; /* Full opacity when active */
  }
  
  /* Glow/Drop Shadow and concentric halo rings for active node */
  .map-node.active.male-color {
    color: var(--observer-blue) !important;
  }
  .map-node.active.female-color {
    color: var(--observer-red) !important;
  }
  
  .map-node.active {
    filter: drop-shadow(0 0 10px currentColor);
  }
  .map-node.active .node-halo {
    stroke: currentColor;
    opacity: 0.45;
    animation: mapNodePulse 1.8s infinite ease-in-out;
    transform-origin: center;
  }
  .map-node.active .node-halo-outer {
    stroke: currentColor;
    opacity: 0.2;
    animation: mapNodePulseOuter 1.8s infinite ease-in-out;
    transform-origin: center;
  }
  
  @keyframes mapNodePulse {
    0% { r: 12px; opacity: 0.5; }
    50% { r: 18px; opacity: 0.25; }
    100% { r: 12px; opacity: 0.5; }
  }
  @keyframes mapNodePulseOuter {
    0% { r: 18px; opacity: 0.25; }
    50% { r: 24px; opacity: 0.08; }
    100% { r: 18px; opacity: 0.25; }
  }
  
  /* Recommended quick select chips */
  .recommended-warehouses-chips {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    width: 100%;
  }
  .chip-item {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--paper);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
  }
  .chip-item:hover {
    border-color: var(--text-dark);
    color: var(--text-dark);
  }
  body.laplace-active .chip-item {
    background: #1C1D24;
    border-color: #2D3043;
    color: #8E91A5;
  }
  body.laplace-active .chip-item:hover {
    border-color: #FFFFFF;
    color: #FFFFFF;
  }
  
  /* Gender accent colors on hover and active chips */
  .male-theme-active .chip-item:hover, .male-theme-active .chip-item.active {
    border-color: var(--observer-blue) !important;
    color: var(--observer-blue) !important;
    background: rgba(47, 117, 255, 0.04);
  }
  .female-theme-active .chip-item:hover, .female-theme-active .chip-item.active {
    border-color: var(--observer-red) !important;
    color: var(--observer-red) !important;
    background: rgba(233, 53, 70, 0.04);
  }
  
  /* Widescreen side-by-side Step 2 row */
  .step2-map-row {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    margin-bottom: 8px;
    align-items: stretch;
  }
  .step2-map-row .abstract-map-wrap {
    flex: 0.62;
    height: 360px;
    margin: 0;
  }
  .step2-map-row .warehouse-detail-card-container {
    flex: 0.38;
    margin: 0;
    display: flex;
  }
  .step2-map-row .warehouse-placeholder-state {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .step2-map-row .warehouse-telemetry-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    box-sizing: border-box;
  }
  .step2-map-row .telemetry-body {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  body.laplace-active .telemetry-logs-wrap {
    border-top-color: #2D3043 !important;
  }

  @media (max-width: 768px) {
    .step2-map-row {
      flex-direction: column;
      height: auto;
    }
    .step2-map-row .abstract-map-wrap {
      flex: none;
      width: 100%;
      height: 280px;
    }
    .step2-map-row .warehouse-detail-card-container {
      flex: none;
      width: 100%;
    }
    .step2-map-row .telemetry-body {
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
    }
    .telemetry-logs-wrap {
      display: none !important;
    }
    .branch-option {
      padding: 16px 8px !important; /* 手机端减小左右 padding，提供更多内部文字空间 */
    }
    .branch-opt-sub {
      font-size: 10px !important; /* 手机端小字号微调 */
      white-space: nowrap !important; /* 强行禁止换行 */
      letter-spacing: 0px !important; /* 取消字符间隔以防挤出 */
    }
  }

  /* Warehouse telemetry detail card styling */

/* Hide browser's native clock/calendar picker icons in date and time inputs */
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator {
  display: none !important;
  -webkit-appearance: none !important;
}

/* Mobile one-screen home wizard contract */
@media (max-width: 768px) {
  body:not(.page-result) .container {
    padding-top: 0;
    padding-bottom: 0;
  }

  body:not(.page-result) .footer-copyright {
    display: none !important;
  }

  #homePage.console-frame {
    margin-top: 0;
    padding-top: 0;
  }

  #homePage .step-panel {
    min-height: calc(100svh - 64px);
    padding: 10px 12px 8px;
    gap: 6px;
    justify-content: flex-start;
  }

  #homePage .step-title-block {
    padding-top: 0 !important;
    margin-bottom: 0;
  }

  #homePage .step-main-title {
    font-size: 21px !important;
    line-height: 1.08;
    margin-bottom: 0 !important;
  }

  #homePage .step-sub-title {
    font-size: 9.5px !important;
    line-height: 1.25;
    letter-spacing: 1px !important;
    margin-top: 2px !important;
  }

  #homePage .hud-divider {
    height: 8px;
    overflow: hidden;
  }

  #homePage .hud-divider svg {
    height: 8px !important;
  }

  #step1Panel .observer-eye-wrapper {
    width: min(45vw, 172px);
    height: min(45vw, 172px);
    margin: 0 auto;
  }

  #step1Panel .observer-eye-wrapper .eye-base-shell,
  #step1Panel .observer-eye-wrapper img.eye-base,
  #step1Panel .observer-eye-wrapper img.eye-open-face,
  #step1Panel .observer-eye-wrapper img.eye-closed-face,
  #step1Panel .observer-eye-wrapper img.eye-pupil {
    width: min(39vw, 146px);
    height: min(39vw, 146px);
  }

  #step1Panel .observer-eye-wrapper .eye-static-core {
    width: min(22vw, 82px);
    height: min(22vw, 82px);
  }

  #step1Panel .observer-eye-wrapper .eye-pupil-cover {
    width: min(11vw, 38px);
    height: min(10vw, 34px);
  }

  #step1Panel .branch-selector-row {
    gap: 8px;
    margin-top: 0;
  }

  #step1Panel .branch-option {
    min-height: 58px !important;
    padding: 8px 6px !important;
  }

  #step1Panel .branch-opt-text {
    font-size: 18px;
    line-height: 1;
  }

  #step1Panel .branch-opt-sub {
    font-size: 7px;
    line-height: 1.1;
  }

  #step2Panel .form-group {
    margin-bottom: 4px !important;
  }

  #step2Panel #birthPlace {
    min-height: 40px;
    padding: 9px 12px !important;
    font-size: 13px !important;
  }

  #step2Panel .solar-note {
    margin-top: 4px !important;
    font-size: 10px;
    min-height: 0;
  }

  #step2Panel .step2-buttons-row {
    display: flex !important;
    flex-direction: column-reverse !important;
    margin-top: 6px !important;
    gap: 8px !important;
  }

  #step2Panel .step2-buttons-row .step-action-btn {
    width: 100% !important;
    flex: none !important;
    height: 38px !important;
    min-height: 38px;
    border-radius: 10px !important;
    font-size: 12px !important;
  }

  #step2Panel .step2-buttons-row .step-action-btn.secondary,
  #step3Panel .step-action-btn.secondary {
    opacity: 0.78;
  }

  #step2Panel .step2-map-row {
    margin-top: 0;
    gap: 6px;
  }

  #step2Panel .step2-map-row .abstract-map-wrap {
    height: clamp(132px, 38vw, 160px);
  }

  #step2Panel .warehouse-placeholder-state,
  #step2Panel .warehouse-telemetry-card {
    padding: 10px;
    min-height: 64px;
  }

  #step2Panel .placeholder-icon {
    font-size: 16px;
  }

  #step2Panel .warehouse-placeholder-state p,
  #step2Panel .telemetry-label,
  #step2Panel .telemetry-value,
  #step2Panel .telemetry-status-tag {
    font-size: 9px;
    line-height: 1.2;
  }

  #step2Panel .telemetry-header {
    gap: 6px;
    margin-bottom: 6px;
  }

  #step2Panel .telemetry-title {
    font-size: 12px;
  }

  #step2Panel .telemetry-body {
    gap: 6px;
  }

  #homePage .step-progress-indicator {
    margin-top: 0;
    padding-top: 6px;
    gap: 6px;
  }

  #homePage .progress-step,
  #homePage .progress-divider {
    font-size: 9px;
  }

  #step3Panel {
    min-height: calc(100svh - 64px);
    padding-bottom: 8px;
  }

  #step3Panel .log-inputs-wrap {
    gap: 6px;
    margin-top: 0;
  }

  #step3Panel .unified-datetime-field {
    min-height: 48px;
    padding: 6px 8px;
  }

  #step3Panel .datetime-input-row {
    min-height: 22px;
  }

  #step3Panel .datetime-input-row input {
    font-size: 14px !important;
  }

  #step3Panel .step3-actions-wrap {
    gap: 5px;
  }

  #step3Panel .step-action-btn,
  #step3Panel .step-action-btn.secondary {
    min-height: 38px;
    font-size: 12px !important;
  }

  #step3Panel .logbook-mock {
    width: min(39vw, 130px);
    height: min(51vw, 170px);
    padding: 10px;
  }

  #step3Panel .book-emblem {
    width: 30px;
    height: 30px;
    margin-top: 6px;
  }

  #step3Panel .compiled-log-id-display {
    padding: 5px 8px;
    font-size: 9px;
  }
}

@media (max-width: 768px) {
  .console-frame {
    width: 100%;
    max-width: 100%;
    min-height: auto;
    margin: 10px auto 28px;
    padding: 14px 0 0;
    overflow: visible;
  }

  .console-grid,
  .step-panel,
  .step-content-centered,
  .step-content-wide {
    width: 100%;
    max-width: 100%;
    min-height: 0;
  }

  .step-panel {
    padding: 20px 14px;
    justify-content: flex-start;
    gap: 16px;
    overflow: visible;
  }

  .step-title-block {
    margin-bottom: 4px;
  }

  .step-main-title {
    font-size: 24px !important;
    line-height: 1.18;
    letter-spacing: 0 !important;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .step-sub-title {
    font-size: 11px !important;
    letter-spacing: 1.6px !important;
    line-height: 1.5;
  }

  .hud-divider svg {
    max-width: 82vw !important;
  }

  .branch-selector-row {
    max-width: 100%;
    gap: 10px;
    margin-top: 6px;
  }

  .branch-option {
    min-height: 76px;
    padding: 14px 8px !important;
  }

  .branch-opt-text {
    font-size: 20px;
  }

  .branch-opt-sub {
    max-width: 100%;
    text-align: center;
    white-space: normal !important;
    overflow-wrap: anywhere;
    line-height: 1.25;
  }

  .step-progress-indicator {
    justify-content: flex-start;
    gap: 8px;
    margin-top: 8px;
    padding-top: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .step-progress-indicator::-webkit-scrollbar {
    display: none;
  }

  .progress-step,
  .progress-divider {
    flex: 0 0 auto;
    font-size: 11px;
    white-space: nowrap;
  }

  .step2-buttons-row,
  .step-panel > div[style*="display:flex"][style*="gap:12px"] {
    gap: 10px !important;
  }

  .step-action-btn {
    min-width: 0;
    min-height: 44px;
    white-space: normal;
    line-height: 1.25;
  }

  .step2-map-row {
    margin-top: 10px;
  }

  .step2-map-row .abstract-map-wrap {
    height: clamp(220px, 62vw, 280px);
  }

  .warehouse-placeholder-state,
  .warehouse-telemetry-card {
    padding: 14px;
  }

  .telemetry-header {
    align-items: flex-start;
    gap: 10px;
  }

  .telemetry-title-wrap {
    min-width: 0;
  }

  .telemetry-title,
  .telemetry-status-tag,
  .telemetry-value {
    overflow-wrap: anywhere;
  }

  .step-flex-row {
    flex-direction: column;
    gap: 14px;
  }

  .log-inputs-wrap,
  .logbook-wrap {
    width: 100%;
    flex: none;
  }

  .unified-datetime-field {
    padding: 12px;
  }

  .datetime-input-row {
    gap: 8px;
  }

  .date-inputs-container {
    min-width: 0;
    justify-content: flex-start;
  }

  .datetime-input-row input {
    font-size: 16px !important;
  }

  .telemetry-logs-wrap {
    display: none !important;
  }
}

@media (max-width: 380px) {
  .step-panel {
    padding: 18px 12px;
  }

  .step-main-title {
    font-size: 22px !important;
  }

  .branch-selector-row {
    flex-direction: column;
  }

  .branch-option {
    width: 100%;
  }

  .step2-buttons-row {
    flex-direction: column;
  }
}

/* Mobile first-screen log entry contract */
@media (max-width: 768px) {
  .console-frame {
    margin: 0 auto 20px;
    padding: 6px 0 0;
  }

  .step-panel {
    padding: 16px 14px;
    gap: 10px;
  }

  .step-title-block {
    margin-bottom: 0;
  }

  .observer-eye-wrapper {
    width: min(54vw, 210px);
    height: min(54vw, 210px);
    margin: 0 auto 4px;
  }

  .branch-selector-row {
    margin-top: 0;
  }

  .step-progress-indicator {
    margin-top: 2px;
    padding-top: 8px;
  }

  #step3Panel {
    min-height: calc(100svh - 104px);
  }

  #step3Panel .step-title-block {
    order: 1;
  }

  #step3Panel .step-flex-row {
    display: contents !important;
  }

  #step3Panel .log-inputs-wrap {
    order: 2;
    flex: none !important;
    justify-content: flex-start !important;
    gap: 7px;
    margin-top: 6px;
  }

  #step3Panel .logbook-wrap {
    order: 4;
    display: flex !important;
    width: 100%;
    flex: none !important;
    justify-content: center;
    margin-top: 2px;
  }

  #step3Panel .unified-datetime-field {
    padding: 6px 9px;
    gap: 3px;
    border-radius: 14px;
  }

  #step3Panel .datetime-label {
    font-size: 8px;
    line-height: 1.15;
  }

  #step3Panel .datetime-input-row {
    min-height: 26px;
  }

  #step3Panel .datetime-input-row input {
    padding: 2px !important;
  }

  #step3Panel .step3-actions-wrap {
    order: 3;
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 7px;
    margin-top: 0 !important;
  }

  #step3Panel .step3-actions-wrap > div:first-child {
    display: contents !important;
  }

  #step3Panel #submitBtn {
    width: 100% !important;
    flex: none !important;
    margin-top: 0 !important;
  }

  #step3Panel .step-action-btn.secondary {
    width: 100% !important;
    flex: none !important;
    min-height: 44px;
    font-size: 12px !important;
    opacity: 0.78;
  }

  #step3Panel .compiled-log-id-display {
    order: 5;
    margin-top: 0;
    padding: 6px 8px;
    font-size: 10px;
    line-height: 1.25;
  }

  #step3Panel .step-progress-indicator {
    order: 6;
  }

  #step3Panel .logbook-mock {
    width: min(48vw, 150px);
    height: min(64vw, 204px);
    padding: 12px;
    margin: 0 auto;
  }

  #step3Panel .book-emblem {
    width: 34px;
    height: 34px;
    margin-top: 8px;
  }

  #step3Panel .book-title {
    font-size: 9px;
    margin-top: 4px;
  }

  #step3Panel .book-meta {
    margin-bottom: 6px;
  }

  #step3Panel .book-log-id,
  #step3Panel .book-warehouse {
    font-size: 7.5px;
  }
}

/* Mobile edge-to-edge home panel contract */
@media (max-width: 768px) {
  body.page-home .container {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  body.page-home .console-frame {
    margin: 0;
    padding: 0;
    max-width: none;
    width: 100vw;
  }

  #homePage.console-frame {
    margin-left: calc(-1 * max(14px, env(safe-area-inset-left)));
    margin-right: calc(-1 * max(14px, env(safe-area-inset-right)));
    width: 100vw;
    max-width: 100vw;
  }

  body.page-home .console-grid {
    width: 100vw;
    max-width: 100vw;
  }

  #homePage .console-grid {
    width: 100vw;
    max-width: 100vw;
  }

  body.page-home .step-panel {
    border-left: none;
    border-right: none;
    border-radius: 0;
    min-height: calc(100svh - 84px);
    width: 100vw;
    max-width: 100vw;
    margin-left: 0;
    margin-right: 0;
  }

  #homePage .step-panel {
    border-left: none;
    border-right: none;
    border-radius: 0;
    width: 100vw;
    max-width: 100vw;
    margin-left: 0;
    margin-right: 0;
  }

  #step3Panel {
    min-height: calc(100svh - 84px);
    padding-bottom: 10px;
  }

  #step3Panel .step-title-block {
    padding-top: 10px;
  }

  #step3Panel .step-main-title {
    font-size: 28px !important;
  }

  #step3Panel .step-sub-title {
    margin-top: 0;
  }

  #step3Panel .log-inputs-wrap {
    margin-top: 2px;
  }

  #step3Panel .unified-datetime-field {
    min-height: 58px;
  }

  #step3Panel .step3-actions-wrap {
    gap: 6px;
  }

  #step3Panel .logbook-wrap {
    margin-top: 0;
  }

  #step3Panel .compiled-log-id-display {
    margin-left: 14px;
    margin-right: 14px;
  }

  #step3Panel .step-progress-indicator {
    margin-left: 14px;
    margin-right: 14px;
    width: calc(100% - 28px);
  }
}

/* Mobile final one-screen home wizard contract */
@media (max-width: 768px) {
  body:not(.page-result) .container {
    padding-top: 0;
    padding-bottom: 0;
  }

  body:not(.page-result) .footer-copyright {
    display: none !important;
  }

  #homePage.console-frame {
    margin-top: 0;
    padding-top: 0;
  }

  #homePage .step-panel {
    min-height: calc(100svh - 64px);
    padding: 10px 12px 8px;
    gap: 6px;
    justify-content: flex-start;
  }

  #homePage .step-title-block {
    padding-top: 0 !important;
    margin-bottom: 0;
  }

  #homePage .step-main-title {
    font-size: 21px !important;
    line-height: 1.08;
    margin-bottom: 0 !important;
  }

  #homePage .step-sub-title {
    font-size: 9.5px !important;
    line-height: 1.25;
    letter-spacing: 1px !important;
    margin-top: 2px !important;
  }

  #homePage .hud-divider {
    height: 8px;
    overflow: hidden;
  }

  #homePage .hud-divider svg {
    height: 8px !important;
  }

  #step1Panel .observer-eye-wrapper {
    width: min(45vw, 172px);
    height: min(45vw, 172px);
    margin: 0 auto;
  }

  #step1Panel .observer-eye-wrapper .eye-base-shell,
  #step1Panel .observer-eye-wrapper img.eye-base,
  #step1Panel .observer-eye-wrapper img.eye-open-face,
  #step1Panel .observer-eye-wrapper img.eye-closed-face,
  #step1Panel .observer-eye-wrapper img.eye-pupil {
    width: min(39vw, 146px);
    height: min(39vw, 146px);
  }

  #step1Panel .observer-eye-wrapper .eye-static-core {
    width: min(22vw, 82px);
    height: min(22vw, 82px);
  }

  #step1Panel .observer-eye-wrapper .eye-pupil-cover {
    width: min(11vw, 38px);
    height: min(10vw, 34px);
  }

  #step1Panel .branch-selector-row {
    gap: 8px;
    margin-top: 0;
  }

  #step1Panel .branch-option {
    min-height: 58px !important;
    padding: 8px 6px !important;
  }

  #step1Panel .branch-opt-text {
    font-size: 18px;
    line-height: 1;
  }

  #step1Panel .branch-opt-sub {
    font-size: 7px !important;
    line-height: 1.1;
  }

  #step2Panel .form-group {
    margin-bottom: 4px !important;
  }

  #step2Panel #birthPlace {
    min-height: 40px;
    padding: 9px 12px !important;
    font-size: 13px !important;
  }

  #step2Panel .solar-note {
    margin-top: 4px !important;
    font-size: 10px;
    min-height: 0;
  }

  #step2Panel .step2-buttons-row {
    display: flex !important;
    flex-direction: column-reverse !important;
    margin-top: 6px !important;
    gap: 8px !important;
  }

  #step2Panel .step2-buttons-row .step-action-btn {
    width: 100% !important;
    flex: none !important;
    height: 38px !important;
    min-height: 38px;
    border-radius: 10px !important;
    font-size: 12px !important;
  }

  #step2Panel .step2-map-row {
    margin-top: 0;
    gap: 6px;
  }

  #step2Panel .step2-map-row .abstract-map-wrap {
    height: clamp(132px, 38vw, 160px);
  }

  #step2Panel .warehouse-placeholder-state,
  #step2Panel .warehouse-telemetry-card {
    padding: 10px;
    min-height: 64px;
  }

  #step2Panel .placeholder-icon {
    font-size: 16px;
  }

  #step2Panel .warehouse-placeholder-state p,
  #step2Panel .telemetry-label,
  #step2Panel .telemetry-value,
  #step2Panel .telemetry-status-tag {
    font-size: 9px;
    line-height: 1.2;
  }

  #step2Panel .telemetry-header {
    gap: 6px;
    margin-bottom: 6px;
  }

  #step2Panel .telemetry-title {
    font-size: 12px;
  }

  #step2Panel .telemetry-body {
    gap: 6px;
  }

  #homePage .step-progress-indicator {
    margin-top: 0;
    padding-top: 6px;
    gap: 6px;
  }

  #homePage .progress-step,
  #homePage .progress-divider {
    font-size: 9px;
  }

  #step3Panel {
    min-height: calc(100svh - 64px);
    padding-bottom: 8px;
  }

  #step3Panel .log-inputs-wrap {
    gap: 6px;
    margin-top: 0;
  }

  #step3Panel .unified-datetime-field {
    min-height: 48px;
    padding: 6px 8px;
  }

  #step3Panel .datetime-input-row {
    min-height: 22px;
  }

  #step3Panel .datetime-input-row input {
    font-size: 14px !important;
  }

  #step3Panel .step3-actions-wrap {
    gap: 5px;
  }

  #step3Panel .step-action-btn,
  #step3Panel .step-action-btn.secondary {
    min-height: 38px;
    font-size: 12px !important;
  }

  #step3Panel .logbook-mock {
    width: min(39vw, 130px);
    height: min(51vw, 170px);
    padding: 10px;
  }

  #step3Panel .book-emblem {
    width: 30px;
    height: 30px;
    margin-top: 6px;
  }

  #step3Panel .compiled-log-id-display {
    padding: 5px 8px;
    font-size: 9px;
  }
}
