
    :root {
      --surface-strong: #ffffff;
      --border-strong: rgba(15, 23, 42, 0.22);
      --primary-soft: rgba(37, 99, 235, 0.12);
      --card-dim: 0.48;
      --radius-sm: 10px;
      --transition: 220ms ease;
    }

    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]) {
        --surface-strong: #1a2440;
        --border-strong: rgba(226, 232, 240, 0.16);
        --primary-soft: rgba(59, 130, 246, 0.14);
        --card-dim: 0.38;
      }
    }

    :root[data-theme="light"] {
      color-scheme: light;
      --surface-strong: #ffffff;
      --border-strong: rgba(15, 23, 42, 0.22);
      --primary-soft: rgba(37, 99, 235, 0.12);
      --card-dim: 0.48;
    }

    :root[data-theme="dark"] {
      color-scheme: dark;
      --surface-strong: #1a2440;
      --border-strong: rgba(226, 232, 240, 0.16);
      --primary-soft: rgba(59, 130, 246, 0.14);
      --card-dim: 0.38;
    }

    body::before,
    body::after {
      content: "";
      position: fixed;
      inset: auto;
      pointer-events: none;
      z-index: 0;
      border-radius: 999px;
      filter: blur(22px);
      opacity: 0.7;
    }

    body::before {
      top: 4rem;
      left: -5rem;
      width: 16rem;
      height: 16rem;
      background: rgba(127, 187, 112, 0.15);
    }

    body::after {
      right: -4rem;
      bottom: 5rem;
      width: 14rem;
      height: 14rem;
      background: rgba(70, 135, 187, 0.12);
    }

    .app-shell {
      position: relative;
      z-index: 1;
      backdrop-filter: blur(18px);
      overflow: hidden;
    }

    .topbar {
      gap: 16px;
      margin-bottom: 16px;
    }

    .brand-badge {
      overflow: hidden;
    }

    .brand-badge-icon {
      background: var(--surface-muted);
      border: 1px solid var(--border);
    }

    .brand-badge-icon img {
      width: 40px;
      height: 40px;
      object-fit: contain;
      display: block;
    }

    @media (prefers-color-scheme: dark) {
      :root:not([data-theme="light"]) .brand-badge-icon img {
        filter: invert(1);
      }
    }

    :root[data-theme="dark"] .brand-badge-icon img {
      filter: invert(1);
    }

    .wizard-meta {
      display: none;
    }

    .intro-panel,
    .help-panel {
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      background: var(--surface-strong);
      padding: 20px;
    }

    .intro-panel {
      background: linear-gradient(140deg, var(--surface-strong), var(--surface-muted));
    }

    .intro-panel p,
    .help-panel p,
    .step-copy,
    .field-note,
    .summary-copy,
    .summary-list dd,
    .page-footer-note {
      color: var(--text-soft);
    }

    .steps {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 10px;
      margin-top: 12px;
    }

    .step-pill {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 14px;
      border-radius: 16px;
      border: 1px solid var(--border);
      background: var(--surface-muted);
      transition: border-color var(--transition), transform var(--transition), background var(--transition);
      cursor: pointer;
    }

    .step-pill.active {
      border-color: var(--primary);
      background: var(--primary-soft);
      transform: translateY(-1px);
    }

    .step-number {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      font-size: 0.85rem;
      font-weight: 700;
      background: rgba(130, 150, 143, 0.18);
    }

    .step-pill.active .step-number {
      background: var(--primary);
      color: white;
    }

    .step-label {
      font-size: 0.92rem;
      font-weight: 600;
    }

    .help-panel strong {
      display: block;
      margin-bottom: 10px;
      font-size: 1rem;
    }

    .wizard-frame {
      position: relative;
      overflow: hidden;
      border-radius: var(--radius-lg);
      border: 1px solid var(--border);
      background: var(--surface-strong);
    }

    .wizard-track {
      display: flex;
      width: 500%;
      transition: transform 340ms cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .step-page {
      width: 20%;
      padding: 12px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .page-header {
      display: flex;
      justify-content: space-between;
      gap: 14px;
      align-items: flex-start;
    }

    .page-header h2 {
      margin: 0;
      font-size: clamp(1.1rem, 1.8vw, 1.45rem);
    }

    .eyebrow {
      margin: 0 0 4px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      font-size: 0.8rem;
      color: var(--primary);
      font-weight: 700;
    }

    .button-row,
    .page-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      align-items: center;
    }

    .page-actions {
      justify-content: space-between;
      margin-top: auto;
      padding-top: 8px;
      border-top: 1px solid var(--border);
    }

    .page-actions .right-actions,
    .page-actions .left-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    button,
    .button-like,
    a.btn-primary,
    a.btn-secondary,
    a.btn-ghost {
      appearance: none;
      border: none;
      border-radius: 999px;
      padding: 10px 14px;
      font: inherit;
      cursor: pointer;
      transition: transform var(--transition), background var(--transition), border-color var(--transition), opacity var(--transition);
    }

    button:hover,
    .button-like:hover,
    a.btn-primary:hover,
    a.btn-secondary:hover,
    a.btn-ghost:hover {
      transform: translateY(-1px);
    }

    button:active,
    .button-like:active,
    a.btn-primary:active,
    a.btn-secondary:active,
    a.btn-ghost:active {
      transform: translateY(0);
    }

    a.btn-primary {
      background: linear-gradient(135deg, var(--primary), var(--primary-strong));
      color: white;
      box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
    }

    a.btn-secondary {
      background: var(--surface-muted);
      color: var(--text);
      border: 1px solid var(--border);
    }

    a.btn-ghost {
      background: transparent;
      color: var(--text-soft);
      border: 1px dashed var(--border-strong);
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--primary), var(--primary-strong));
      color: white;
      box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
    }

    .btn-secondary {
      background: var(--surface-muted);
      color: var(--text);
      border: 1px solid var(--border);
    }

    .btn-ghost {
      background: transparent;
      color: var(--text-soft);
      border: 1px dashed var(--border-strong);
    }

    .hero-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
      gap: 16px;
      align-items: stretch;
    }

    .hero-card,
    .info-card,
    .summary-card,
    .map-card,
    .orientation-card,
    .field-cluster,
    details.advanced-panel {
      background: var(--surface-muted);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 16px;
    }

    .hero-card {
      display: grid;
      gap: 12px;
    }

    .hero-card ul {
      margin: 0;
      padding-left: 18px;
      color: var(--text-soft);
    }

    .placeholder-illustration {
      height: 480px;
      border-radius: 24px;
      border: 1px solid var(--border);
      background: linear-gradient(160deg, rgba(79, 161, 119, 0.16), rgba(63, 114, 189, 0.12));
      position: relative;
      overflow: hidden;
      display: grid;
      place-items: center;
    }

    .placeholder-illustration img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
    }

    .sensor-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 18px;
    }

    .sensor-card {
      position: relative;
      display: grid;
      grid-template-rows: 250px auto;
      gap: 12px;
      padding: 14px;
      border-radius: 24px;
      background: var(--surface-muted);
      border: 2px solid transparent;
      cursor: pointer;
      transition: border-color var(--transition), transform var(--transition), opacity var(--transition), background var(--transition), filter var(--transition);
    }

    .sensor-card:hover {
      transform: translateY(-2px);
    }

    .sensor-card.dimmed {
      opacity: var(--card-dim);
      filter: grayscale(0.3);
    }

    .sensor-card.selected {
      border-color: var(--primary);
      background: linear-gradient(180deg, var(--primary-soft), var(--surface-muted));
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    }

    .sensor-preview {
      height: 100%;
      border-radius: 20px;
      border: 1px solid var(--border);
      background: linear-gradient(155deg, rgba(99, 169, 129, 0.2), rgba(73, 128, 197, 0.12));
      position: relative;
      overflow: hidden;
      display: block;
    }

    .sensor-preview img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
    }

    .sensor-text h3,
    .summary-card h3,
    .field-cluster h3,
    .orientation-card h3,
    .map-card h3,
    .info-card h3 {
      margin: 0 0 8px;
      font-size: 1.06rem;
    }

    .sensor-text p,
    .map-card p,
    .orientation-card p,
    .field-cluster p,
    .info-card p,
    .summary-card p {
      margin: 0;
      color: var(--text-soft);
    }

    .details-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 10px;
      align-items: start;
    }

    .field-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .field {
      display: grid;
      gap: 8px;
    }

    .field.full {
      grid-column: 1 / -1;
    }

    .field label,
    .advanced-grid label,
    .checkbox {
      font-size: 0.94rem;
      font-weight: 600;
    }

    input[type="text"],
    input[type="number"] {
      width: 100%;
      min-height: 44px;
      border-radius: 14px;
      border: 1px solid var(--border);
      background: var(--surface-strong);
      color: var(--text);
      padding: 12px 14px;
      font: inherit;
      transition: border-color var(--transition), box-shadow var(--transition);
    }

    input[type="text"]:focus,
    input[type="number"]:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 4px var(--primary-soft);
    }

    .input-inline {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
    }

    .unit {
      color: var(--text-soft);
      font-size: 0.92rem;
    }

    .preview-pill {
      display: inline-block;
      padding: 10px 16px;
      border-radius: 12px;
      background: var(--primary-soft);
      border: none;
      margin-top: 8px;
      font-weight: 600;
      color: var(--primary-strong);
    }

    .preview-pill strong {
      font-weight: 700;
    }

    .map-card {
      display: grid;
      gap: 12px;
    }

    .leaflet-control-locate {
      width: 32px;
      height: 32px;
      display: grid;
      place-items: center;
      text-decoration: none;
      font-size: 18px;
      font-weight: 700;
      line-height: 1;
      color: #111827;
      background: #fff;
    }

    .leaflet-locate-icon {
      display: inline-block;
      transform: rotate(-45deg);
      transform-origin: center;
    }

    .layer-switch-control {
      background: transparent;
      border: 0;
      box-shadow: none;
    }

    .layer-switch-track {
      position: relative;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      min-width: 188px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: var(--surface-strong);
      padding: 3px;
      overflow: hidden;
    }

    .layer-switch-highlight {
      position: absolute;
      left: 3px;
      top: 3px;
      width: calc(50% - 3px);
      height: calc(100% - 6px);
      border-radius: 999px;
      border: 1px solid rgba(37, 99, 235, 0.35);
      background: var(--primary-soft);
      transition: transform var(--transition);
      pointer-events: none;
    }

    .layer-switch-track[data-active-layer="satellite"] .layer-switch-highlight {
      transform: translateX(100%);
    }

    .layer-switch-button {
      position: relative;
      z-index: 1;
      border: 0;
      background: transparent;
      color: var(--text-soft);
      border-radius: 999px;
      padding: 8px 14px;
      font-size: 0.87rem;
      font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
      transition: color var(--transition);
    }

    .layer-switch-button.is-active {
      color: var(--primary-strong);
    }

    :root[data-theme="dark"] .leaflet-control-locate {
      color: #000000;
      background: #ffffff;
    }

    #map {
      width: 100%;
      height: 100dvh;
      height: 600px;
      border-radius: 20px;
      border: 1px solid var(--border);
      z-index: 1;
      overflow: hidden;
    }

    .coord-grid,
    .advanced-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .orientation-layout {
      display: grid;
      grid-template-columns: 280px minmax(0, 1fr);
      gap: 14px;
      align-items: center;
    }

    .compass-wrap {
      display: grid;
      justify-content: center;
      padding: 10px 0;
    }

    .compass {
      width: 240px;
      height: 240px;
      position: relative;
      border-radius: 50%;
      background: radial-gradient(circle at center, var(--surface-strong) 0%, var(--surface-muted) 70%, rgba(120, 132, 128, 0.18) 100%);
      border: 1px solid var(--border);
      box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.04);
      touch-action: none;
      user-select: none;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
    }

    .compass-label {
      position: absolute;
      font-weight: 700;
      color: var(--text-soft);
      user-select: none;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
    }

    .compass-label.north {
      left: 50%;
      top: 14px;
      transform: translateX(-50%);
    }

    .compass-label.south {
      left: 50%;
      bottom: 14px;
      transform: translateX(-50%);
    }

    .compass-label.east {
      right: 16px;
      top: 50%;
      transform: translateY(-50%);
    }

    .compass-label.west {
      left: 16px;
      top: 50%;
      transform: translateY(-50%);
    }

    .compass-center {
      position: absolute;
      inset: 50% auto auto 50%;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: var(--text);
      transform: translate(-50%, -50%);
      z-index: 2;
    }

    .compass-line {
      position: absolute;
      left: 50%;
      top: 50%;
      width: 88px;
      height: 4px;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(47, 143, 78, 0.2), var(--primary));
      transform-origin: 0 50%;
      transform: translate(0, -50%) rotate(-90deg);
    }

    .compass-handle {
      position: absolute;
      left: calc(50% + 88px);
      top: 50%;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: var(--primary);
      border: 3px solid rgba(255, 255, 255, 0.85);
      transform: translate(-50%, -50%);
      box-shadow: 0 8px 18px rgba(47, 143, 78, 0.28);
      cursor: grab;
      z-index: 3;
    }

    .orientation-map-card {
      background: var(--surface-muted);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 16px;
      display: grid;
      gap: 10px;
    }

    .orientation-map-card h3 {
      margin: 0;
      font-size: 1.06rem;
    }

    .orientation-map-card p {
      margin: 0;
      color: var(--text-soft);
    }

    #orientation-map {
      width: 100%;
      height: 320px;
      border-radius: 20px;
      border: 1px solid var(--border);
      z-index: 1;
      overflow: hidden;
    }

    .leaflet-div-icon.sensor-orientation-icon {
      background: transparent;
      border: 0;
    }

    .sensor-orientation-marker {
      position: relative;
      width: 128px;
      height: 128px;
      transform: rotate(var(--sensor-angle, 0deg));
      transform-origin: center;
    }

    .sensor-orientation-marker::before {
      content: "";
      position: absolute;
      left: 50%;
      top: 50%;
      width: 80px;
      height: 4px;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(255, 255, 255,0.85), rgba(234, 234, 234, 0.85) );
      transform: translateY(-50%);
      transform-origin: 0 50%;

    }

    .sensor-orientation-dot {
      position: absolute;
      left: 50%;
      top: 50%;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: rgba(215, 215, 215, 0.95);
      border: 2px solid rgba(78, 78, 78, 0.95);
      transform: translate(-50%, -50%);
    }

    .sensor-orientation-tip {
      position: absolute;
      left: calc(50% + 80px);
      top: 50%;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: rgba(105, 105, 105, 0.911);
      border: 2px solid rgba(255, 255, 255, 0.9);
      transform: translate(-50%, -50%);
      
    }

    .summary-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 12px;
      align-items: start;
    }

    .summary-list {
      display: grid;
      grid-template-columns: 160px minmax(0, 1fr);
      gap: 8px 12px;
      margin: 0;
    }

    .summary-list dt {
      font-weight: 700;
    }

    .summary-list dd {
      margin: 0;
    }

    details.advanced-panel summary {
      cursor: pointer;
      font-weight: 700;
      list-style: none;
    }

    details.advanced-panel summary::-webkit-details-marker {
      display: none;
    }

    .advanced-copy {
      margin: 10px 0 18px;
      color: var(--text-soft);
    }

    .checkbox-list {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      margin-top: 12px;
    }

    .checkbox {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 14px;
      border-radius: 14px;
      border: 1px solid var(--border);
      background: var(--surface-strong);
      font-weight: 600;
    }

    input[type="checkbox"] {
      width: 18px;
      height: 18px;
      accent-color: var(--primary);
      margin: 0;
    }

    .inline-link {
      color: var(--primary);
      text-decoration: none;
      font-weight: 600;
    }

    .inline-link:hover {
      text-decoration: underline;
    }

    .visually-hidden {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    .footer-note {
      margin-top: 18px;
      text-align: center;
      color: var(--text-soft);
      font-size: 0.92rem;
    }

    .console-brand {
      margin-top: 18px;
      text-align: center;
      color: var(--text-soft);
      font-size: 0.92rem;
      font-weight: 600;
    }

    @media (max-width: 980px) {
      .wizard-meta,
      .hero-grid,
      .details-grid,
      .summary-layout,
      .orientation-layout {
        grid-template-columns: 1fr;
      }

      .sensor-grid,
      .field-grid,
      .coord-grid,
      .advanced-grid,
      .checkbox-list,
      .steps {
        grid-template-columns: 1fr;
      }

      .summary-list {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 720px) {
      .app-shell {
        width: min(100vw - 16px, 100%);
        margin: 8px auto;
        padding: 16px;
        border-radius: 24px;
      }

      .topbar,
      .page-header,
      .page-actions {
        flex-direction: column;
        align-items: stretch;
      }

      .page-actions .left-actions,
      .page-actions .right-actions {
        width: 100%;
      }

      .page-actions .right-actions > *,
      .page-actions .left-actions > * {
        flex: 1 1 auto;
      }

      .sensor-card {
        grid-template-rows: 180px auto;
      }

      .step-page {
        padding: 20px;
      }

      .compass {
        width: 220px;
        height: 220px;
      }

      #orientation-map {
        height: 300px;
      }
    }
  
