    :root {
      color-scheme: light;
      --background: #f8f7f4;
      --surface: #ffffff;
      --surface-soft: #fbfaf8;
      --surface-muted: #f1efec;
      --text: #1f1b17;
      --text-muted: #6f6862;
      --text-soft: #8c837a;
      --border: rgba(31, 27, 23, 0.14);
      --border-strong: rgba(31, 27, 23, 0.24);
      --primary: #312d2a;
      --primary-dark: #312d2a;
      --primary-soft: #f2e5df;
      --primary-gradient: linear-gradient(135deg, #312d2a, #4b4540);
      --focus-ring: rgba(91, 143, 185, 0.24);
      --danger: #b3312d;
      --success: #2f6b4f;
      --warning: #9a6700;
      --accent: #8f4f39;
      --info: #2d6577;
      --radius: 8px;
      --radius-sm: 6px;
      --font-sans: "Oracle Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
      --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    }

    body.theme-dark {
      color-scheme: dark;
      --background: #171412;
      --surface: #211d1a;
      --surface-soft: #28231f;
      --surface-muted: #332d28;
      --text: #f7f1ed;
      --text-muted: #cfc6bd;
      --text-soft: #a89f96;
      --border: rgba(247, 241, 237, 0.14);
      --border-strong: rgba(247, 241, 237, 0.24);
      --primary: #d08a70;
      --primary-dark: #ffd6c9;
      --primary-soft: #3a2b25;
      --primary-gradient: linear-gradient(135deg, #8f4f39, #6b3d32);
      --focus-ring: rgba(122, 167, 202, 0.28);
      --danger: #ffaaa2;
      --success: #81d0aa;
      --warning: #ffd27a;
      --accent: #d08a70;
      --info: #84bdd0;
    }

    * {
      box-sizing: border-box;
    }

    body {
      min-width: 320px;
      margin: 0;
      background: var(--background);
      color: var(--text);
      font-family: var(--font-sans);
      font-size: 16px;
      line-height: 1.45;
    }

    button,
    input,
    textarea {
      font: inherit;
    }

    button {
      border: 0;
    }

    a {
      color: inherit;
    }

    :where(button, a, .drop-zone):focus-visible {
      outline: 2px solid var(--primary);
      outline-offset: 3px;
      box-shadow: 0 0 0 4px var(--focus-ring);
    }

    h1,
    h2,
    h3,
    p {
      margin: 0;
    }

    .app-shell {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      background: var(--background);
    }

    .topbar {
      border-bottom: 1px solid var(--border);
      background: var(--surface);
    }

    .topbar-inner {
      min-height: 58px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      padding: 0 18px;
    }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 13px;
      min-width: 0;
      color: var(--text);
      text-decoration: none;
    }

    .brand-mark {
      width: 32px;
      height: 32px;
      display: grid;
      place-items: center;
      flex: 0 0 auto;
      color: var(--primary-dark);
    }

    .brand-name {
      display: block;
      font-size: 25px;
      font-weight: 760;
      letter-spacing: 0;
      line-height: 1;
    }

    .brand-subtitle {
      display: none;
    }

    .topbar-actions,
    .nav-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 34px;
    }

    .nav-link {
      min-height: 36px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: #2b3040;
      background: transparent;
      font-size: 17px;
      font-weight: 560;
      line-height: 1;
      cursor: pointer;
      text-decoration: none;
      white-space: nowrap;
    }

    .nav-link svg,
    .moon-button svg,
    .btn svg,
    .segment svg,
    .source-btn svg,
    .action-link svg,
    .info-list svg,
    .primary-action svg {
      width: 20px;
      height: 20px;
      flex: 0 0 auto;
      stroke-width: 2.15;
    }

    .moon-button {
      width: 36px;
      height: 36px;
      display: inline-grid;
      place-items: center;
      color: #222838;
      background: transparent;
      cursor: pointer;
    }

    .main {
      width: 100%;
      padding: 28px 18px 0;
    }

    .workspace {
      display: grid;
      grid-template-columns: minmax(420px, 0.88fr) minmax(560px, 1.32fr);
      gap: 30px;
      align-items: start;
    }

    .panel {
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      overflow: hidden;
    }

    .converter-panel {
      border: 0;
      border-radius: 0;
      overflow: visible;
    }

    .mode-tabs {
      min-height: 64px;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      background: var(--surface);
      margin-bottom: 28px;
    }

    .segment {
      min-height: 64px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 14px;
      color: #1e2534;
      background: var(--surface);
      border-right: 1px solid var(--border);
      cursor: pointer;
      font-size: 18px;
      font-weight: 680;
      line-height: 1;
      transition: background 140ms ease, color 140ms ease;
    }

    .segment:last-child {
      border-right: 0;
    }

    .segment[aria-pressed="true"] {
      background: var(--primary-gradient);
      color: #ffffff;
    }

    .section-label,
    .label {
      display: block;
      color: var(--text);
      font-size: 17px;
      font-weight: 720;
      line-height: 1.2;
    }

    .source-header,
    .input-label-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }

    .source-header {
      margin-bottom: 13px;
    }

    .source-switch {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 190px));
      gap: 0;
      margin-bottom: 22px;
    }

    .source-btn {
      min-height: 53px;
      padding: 0 20px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      cursor: pointer;
      font-size: 16px;
      font-weight: 650;
      line-height: 1;
      white-space: nowrap;
    }

    .source-btn:first-child {
      border-radius: var(--radius) 0 0 var(--radius);
    }

    .source-btn:last-child {
      border-left: 0;
      border-radius: 0 var(--radius) var(--radius) 0;
    }

    .source-btn[aria-pressed="true"] {
      border-color: var(--primary);
      background: linear-gradient(180deg, #fffdfb, var(--primary-soft));
      color: var(--primary-dark);
      box-shadow: inset 0 0 0 1px var(--primary);
    }

    .action-link {
      min-height: 34px;
      display: inline-flex;
      align-items: center;
      gap: 9px;
      color: var(--primary-dark);
      background: transparent;
      cursor: pointer;
      font-size: 15px;
      font-weight: 650;
      line-height: 1;
      text-decoration: none;
      white-space: nowrap;
    }

    .input-label-row {
      margin-bottom: 11px;
    }

    .clear-link {
      color: var(--primary-dark);
      background: transparent;
      cursor: pointer;
      font-size: 16px;
      font-weight: 520;
      line-height: 1;
    }

    textarea,
    input[type="text"] {
      width: 100%;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      outline: none;
      box-shadow: none;
      transition: border-color 150ms ease, box-shadow 150ms ease;
    }

    textarea:focus,
    input[type="text"]:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px var(--focus-ring);
    }

    textarea {
      min-height: 300px;
      max-height: 42vh;
      padding: 16px 20px;
      resize: vertical;
      border-radius: var(--radius) var(--radius) 0 0;
      font-family: var(--font-mono);
      font-size: 14px;
      font-weight: 560;
      line-height: 1.65;
      letter-spacing: 0;
    }

    .input-stats {
      min-height: 56px;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      border: 1px solid var(--border);
      border-top: 0;
      border-radius: 0 0 var(--radius) var(--radius);
      background: var(--surface-soft);
      overflow: hidden;
      margin-bottom: 20px;
    }

    .input-stat {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 0 18px;
      border-right: 1px solid var(--border);
      color: #5d6676;
      font-size: 14px;
      font-weight: 560;
      min-width: 0;
    }

    .input-stat:last-child {
      border-right: 0;
    }

    .input-stat strong {
      color: var(--text);
      font-weight: 700;
    }

    .drop-zone {
      display: none;
    }

    .settings-scrim {
      position: fixed;
      inset: 0;
      z-index: 40;
      background: rgba(22, 21, 19, 0.34);
      backdrop-filter: blur(2px);
    }

    .settings-scrim[hidden],
    .settings-panel[hidden] {
      display: none;
    }

    .settings-panel {
      position: fixed;
      top: 50%;
      left: 50%;
      z-index: 45;
      width: min(520px, calc(100vw - 32px));
      display: grid;
      gap: 18px;
      padding: 22px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: var(--surface);
      box-shadow: 0 24px 70px rgba(22, 21, 19, 0.22);
      transform: translate(-50%, -50%);
    }

    .settings-modal-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
    }

    .settings-eyebrow {
      margin-bottom: 5px;
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.2;
      text-transform: uppercase;
    }

    .settings-panel-title {
      color: var(--text);
      font-size: 20px;
      font-weight: 760;
      line-height: 1.25;
    }

    .modal-close {
      width: 38px;
      height: 38px;
      display: inline-grid;
      place-items: center;
      flex: 0 0 auto;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: var(--surface-soft);
      color: var(--text);
      cursor: pointer;
    }

    .modal-close svg {
      width: 18px;
      height: 18px;
      stroke-width: 2.2;
    }

    .options-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .field {
      display: grid;
      gap: 8px;
      min-width: 0;
    }

    .toggle-line {
      min-height: 42px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      color: var(--text);
      font-size: 14px;
      font-weight: 650;
    }

    .toggle-line input {
      width: 20px;
      height: 20px;
      accent-color: var(--primary);
    }

    .settings-actions {
      display: flex;
      justify-content: flex-end;
      gap: 12px;
      padding-top: 2px;
    }

    .settings-actions .btn {
      min-width: 96px;
      min-height: 42px;
      font-size: 14px;
    }

    .settings-actions .settings-ok {
      border-color: var(--primary);
      background: var(--primary-gradient);
      color: #ffffff;
    }

    .input-label-row.is-hidden,
    textarea.is-hidden,
    .input-stats.is-hidden {
      display: none;
    }

    .drop-zone.is-visible {
      min-height: 244px;
      display: grid;
      place-items: center;
      margin-bottom: 20px;
      border: 1px dashed var(--border-strong);
      border-radius: var(--radius);
      background: var(--surface-soft);
      cursor: pointer;
    }

    .drop-zone.is-dragging {
      border-color: var(--primary);
      background: var(--primary-soft);
      box-shadow: 0 0 0 3px var(--focus-ring);
    }

    .drop-zone-inner {
      display: flex;
      align-items: center;
      gap: 12px;
      color: var(--text-muted);
    }

    .drop-icon {
      width: 44px;
      height: 44px;
      display: grid;
      place-items: center;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      color: var(--primary-dark);
      background: var(--surface);
    }

    .drop-title {
      color: var(--text);
      font-weight: 720;
    }

    .drop-subtitle {
      margin-top: 2px;
      font-size: 13px;
    }

    .primary-action {
      width: 100%;
      min-height: 56px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 13px;
      border-radius: var(--radius-sm);
      background: var(--primary-gradient);
      color: #ffffff;
      cursor: pointer;
      font-size: 17px;
      font-weight: 760;
      line-height: 1;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    }

    .action-bar {
      margin-top: 18px;
    }

    .action-group {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
      margin-top: 17px;
    }

    .btn,
    .btn-secondary,
    .btn-danger {
      min-height: 50px;
      padding: 0 16px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: var(--surface);
      color: var(--text);
      cursor: pointer;
      font-size: 16px;
      font-weight: 620;
      line-height: 1;
      text-decoration: none;
      white-space: nowrap;
    }

    .btn-danger {
      color: var(--text);
    }

    .btn:disabled,
    .btn[aria-disabled="true"] {
      cursor: not-allowed;
      opacity: 0.58;
      pointer-events: none;
    }

    .icon-btn {
      width: 54px;
      padding: 0;
      flex: 0 0 auto;
    }

    .status-line {
      display: none;
    }

    .result-panel {
      min-height: 100%;
    }

    .result-header {
      min-height: 78px;
      padding: 0 26px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      border-bottom: 1px solid var(--border);
      background: var(--surface);
    }

    .result-title-wrap {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .result-title-wrap h2 {
      color: var(--text);
      font-size: 21px;
      font-weight: 760;
      line-height: 1.2;
    }

    .result-file {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      color: var(--primary-dark);
      font-size: 14px;
      font-weight: 650;
      line-height: 1;
      white-space: nowrap;
    }

    .result-actions {
      display: flex;
      align-items: center;
      gap: 14px;
      flex: 0 0 auto;
    }

    .result-actions .btn {
      min-height: 46px;
      padding: 0 20px;
    }

    .result-body {
      padding: 26px;
    }

    .preview-summary {
      display: grid;
      grid-template-columns: minmax(300px, 48%) minmax(240px, 1fr);
      gap: 22px;
      align-items: start;
    }

    .preview-frame {
      min-height: 300px;
      border: 0;
      border-radius: var(--radius);
      background: var(--surface);
      overflow: hidden;
    }

    .preview-empty {
      min-height: 300px;
      padding: 26px;
      display: grid;
      place-items: center;
      border: 1px dashed var(--border-strong);
      border-radius: var(--radius);
      color: var(--text-muted);
      text-align: center;
      background: var(--surface-soft);
    }

    .preview-empty strong {
      display: block;
      margin-bottom: 4px;
      color: var(--text);
      font-size: 15px;
      line-height: 1.25;
    }

    .preview-media {
      min-height: 300px;
      display: grid;
      place-items: center;
      background: var(--surface);
    }

    .preview-media img,
    .preview-media video {
      width: 100%;
      max-height: 360px;
      object-fit: cover;
      border-radius: var(--radius-sm);
      box-shadow: none;
    }

    .preview-media audio {
      width: min(100%, 420px);
    }

    .preview-media iframe {
      width: 100%;
      height: 360px;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: var(--surface);
    }

    .text-preview,
    .output-area {
      width: 100%;
      min-height: 300px;
      max-height: 360px;
      margin: 0;
      padding: 14px;
      overflow: auto;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--text);
      background: var(--surface);
      white-space: pre-wrap;
      word-break: break-word;
      font-family: var(--font-mono);
      font-size: 12px;
      line-height: 1.55;
    }

    .output-area {
      resize: vertical;
    }

    .metadata-grid {
      display: grid;
      grid-template-columns: minmax(88px, 0.3fr) minmax(0, 1fr);
      align-content: start;
    }

    .file-overview {
      grid-column: 1 / -1;
      min-height: 72px;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 0 0 14px;
      margin-bottom: 2px;
      border-bottom: 1px solid var(--border);
    }

    .file-type-icon {
      width: 48px;
      height: 54px;
      display: grid;
      place-items: center;
      position: relative;
      flex: 0 0 auto;
      border: 1px solid rgba(199, 70, 52, 0.25);
      border-radius: 10px;
      background: linear-gradient(180deg, var(--primary-soft), var(--surface));
      color: var(--primary-dark);
      box-shadow: inset 0 -12px 22px rgba(199, 70, 52, 0.08);
    }

    .file-type-icon svg {
      width: 30px;
      height: 30px;
      stroke-width: 2;
      opacity: 0.72;
    }

    .file-type-icon strong {
      position: absolute;
      right: 5px;
      bottom: 5px;
      min-width: 26px;
      padding: 3px 4px 2px;
      border-radius: 5px;
      background: var(--primary);
      color: #ffffff;
      font-size: 9px;
      font-weight: 800;
      line-height: 1;
      text-align: center;
      letter-spacing: 0;
    }

    .file-type-icon.is-image {
      border-color: rgba(15, 123, 96, 0.28);
      color: var(--success);
    }

    .file-type-icon.is-image strong {
      background: var(--success);
    }

    .file-type-icon.is-archive {
      border-color: rgba(161, 92, 0, 0.26);
      color: var(--warning);
    }

    .file-type-icon.is-archive strong {
      background: var(--warning);
    }

    .file-type-icon.is-empty {
      border-color: var(--border);
      background: var(--surface-soft);
      color: var(--text-soft);
      box-shadow: none;
    }

    .file-type-icon.is-empty strong {
      background: var(--text-soft);
    }

    .file-overview-copy {
      min-width: 0;
    }

    .file-kind {
      color: var(--text);
      font-size: 14px;
      font-weight: 760;
      line-height: 1.2;
    }

    .file-kind-meta {
      margin-top: 4px;
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 520;
      line-height: 1.35;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .metadata-item {
      display: contents;
    }

    .metadata-label,
    .metadata-value {
      min-width: 0;
      min-height: 36px;
      border-bottom: 1px solid var(--border);
      font-size: 12px;
      line-height: 1.2;
    }

    .metadata-label {
      display: flex;
      align-items: center;
      color: var(--text);
      font-weight: 760;
    }

    .metadata-value {
      display: block;
      color: var(--text-muted);
      font-weight: 500;
      line-height: 36px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .result-tabs {
      min-height: 59px;
      display: flex;
      align-items: flex-end;
      gap: 34px;
      padding: 0 26px;
      border-top: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
      background: var(--surface);
    }

    .result-tab {
      min-height: 58px;
      display: inline-flex;
      align-items: center;
      border-bottom: 3px solid transparent;
      color: #a0a7b3;
      background: transparent;
      font-size: 17px;
      font-weight: 700;
      line-height: 1;
    }

    .result-tab.is-active {
      color: var(--primary-dark);
      border-bottom-color: var(--primary);
    }

    .hex-panel {
      margin: 26px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      overflow: auto;
    }

    .hex-header {
      min-width: 820px;
      min-height: 45px;
      display: grid;
      grid-template-columns: 96px repeat(16, 38px) minmax(128px, 1fr);
      align-items: center;
      gap: 0;
      padding: 0 16px;
      border-bottom: 1px solid var(--border);
      background: linear-gradient(180deg, var(--surface-soft), var(--surface-muted));
      color: var(--text-muted);
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 760;
      white-space: nowrap;
    }

    .hex-header span,
    .hex-header small {
      color: inherit;
      font-size: inherit;
      font-weight: inherit;
    }

    .hex-dump {
      min-width: 820px;
      max-height: 317px;
      margin: 0;
      padding: 12px 16px 18px;
      overflow: auto;
      color: var(--text-muted);
      background: var(--surface);
      white-space: pre;
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 650;
      line-height: 1.8;
    }

    .hex-panel.is-text .hex-header {
      display: none;
    }

    .hex-panel.is-text .hex-dump {
      min-width: 0;
      white-space: pre-wrap;
      word-break: break-word;
    }

    .hex-dump::selection,
    textarea::selection {
      background: rgba(199, 70, 52, 0.22);
    }

    .toast-root {
      position: fixed;
      right: 20px;
      bottom: 20px;
      z-index: 50;
      display: grid;
      gap: 10px;
      pointer-events: none;
    }

    .toast {
      width: min(360px, calc(100vw - 40px));
      min-height: 48px;
      padding: 13px 15px;
      display: flex;
      align-items: center;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      color: var(--text);
      box-shadow: 0 18px 42px rgba(16, 24, 40, 0.16);
      font-size: 14px;
      font-weight: 680;
      line-height: 1.35;
      opacity: 0;
      transform: translateY(8px);
      transition: opacity 160ms ease, transform 160ms ease;
    }

    .toast.is-visible {
      opacity: 1;
      transform: translateY(0);
    }

    .toast-success {
      border-color: #b7e4d4;
      background: #edfdf7;
      color: #075e46;
    }

    .toast-danger {
      border-color: #ffc4bc;
      background: #fff1f0;
      color: var(--danger);
    }

    .toast-warning {
      border-color: #ffe0a3;
      background: #fff8e5;
      color: var(--warning);
    }

    .utility-grid {
      margin-top: 26px;
      padding: 24px 20px 32px;
      display: grid;
      grid-template-columns: 1.05fr 1fr 0.86fr;
      gap: 28px;
      border-top: 1px solid var(--border);
      background: var(--surface);
    }

    .help-column {
      min-height: 160px;
      padding: 0 26px 0 0;
      border-right: 1px solid var(--border);
    }

    .help-column:last-child {
      border-right: 0;
      padding-right: 0;
    }

    .help-column h2 {
      margin-bottom: 18px;
      color: var(--text);
      font-size: 17px;
      font-weight: 760;
      line-height: 1.2;
    }

    .info-list {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 14px;
      color: #596272;
      font-size: 13px;
      font-weight: 520;
    }

    .info-row {
      display: grid;
      grid-template-columns: 28px minmax(0, 1fr);
      align-items: center;
      gap: 8px;
    }

    .step-dot {
      width: 20px;
      height: 20px;
      display: inline-grid;
      place-items: center;
      border-radius: 999px;
      background: var(--primary);
      color: #ffffff;
      font-size: 11px;
      font-weight: 760;
      line-height: 1;
    }

    .check-icon {
      color: var(--primary);
    }

    .shortcut-row {
      display: grid;
      grid-template-columns: 128px minmax(0, 1fr);
      align-items: center;
      gap: 14px;
    }

    .keys {
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }

    kbd {
      min-width: 38px;
      min-height: 27px;
      padding: 0 9px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: var(--surface);
      color: var(--text-muted);
      box-shadow: inset 0 -1px 0 rgba(16, 24, 40, 0.06);
      font-family: var(--font-sans);
      font-size: 12px;
      font-weight: 640;
      line-height: 1;
    }

    .hidden {
      display: none !important;
    }

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    body.theme-dark .topbar,
    body.theme-dark .mode-tabs,
    body.theme-dark .segment,
    body.theme-dark .source-btn,
    body.theme-dark .btn,
    body.theme-dark .btn-secondary,
    body.theme-dark .btn-danger,
    body.theme-dark .panel,
    body.theme-dark .result-header,
    body.theme-dark .result-tabs,
    body.theme-dark .preview-frame,
    body.theme-dark .preview-media,
    body.theme-dark .hex-panel,
    body.theme-dark .hex-dump,
    body.theme-dark .utility-grid,
    body.theme-dark .drop-icon,
    body.theme-dark textarea,
    body.theme-dark input[type="text"],
    body.theme-dark kbd,
    body.theme-dark .toast {
      background: var(--surface);
      color: var(--text);
    }

    body.theme-dark .app-shell,
    body.theme-dark .main {
      background: var(--background);
    }

    body.theme-dark .settings-panel,
    body.theme-dark .input-stats,
    body.theme-dark .drop-zone.is-visible,
    body.theme-dark .preview-empty {
      background: var(--surface-soft);
    }

    body.theme-dark .hex-header {
      background: linear-gradient(180deg, var(--surface-soft), var(--surface-muted));
      color: var(--text-muted);
    }

    body.theme-dark .brand,
    body.theme-dark .brand-name,
    body.theme-dark .nav-link,
    body.theme-dark .moon-button,
    body.theme-dark .segment,
    body.theme-dark .source-btn,
    body.theme-dark .section-label,
    body.theme-dark .label,
    body.theme-dark .settings-panel-title,
    body.theme-dark .result-title-wrap h2,
    body.theme-dark .metadata-label,
    body.theme-dark .file-kind,
    body.theme-dark .input-stat strong,
    body.theme-dark .help-column h2,
    body.theme-dark .preview-empty strong,
    body.theme-dark .drop-title {
      color: var(--text);
    }

    body.theme-dark .metadata-value,
    body.theme-dark .file-kind-meta,
    body.theme-dark .input-stat,
    body.theme-dark .info-list,
    body.theme-dark .hex-dump,
    body.theme-dark .drop-zone-inner {
      color: var(--text-muted);
    }

    body.theme-dark .source-btn[aria-pressed="true"] {
      border-color: var(--primary);
      background: linear-gradient(180deg, #3a211d, #2c1a17);
      color: var(--primary-dark);
      box-shadow: inset 0 0 0 1px var(--primary);
    }

    body.theme-dark .segment[aria-pressed="true"],
    body.theme-dark .primary-action,
    body.theme-dark .settings-ok {
      background: var(--primary-gradient);
      color: #ffffff;
    }

    body.theme-dark .drop-zone.is-dragging {
      background: var(--primary-soft);
    }

    body.theme-dark .clear-link,
    body.theme-dark .action-link,
    body.theme-dark .result-file,
    body.theme-dark .result-tab.is-active {
      color: var(--primary-dark);
    }

    body.theme-dark .result-tab {
      color: var(--text-soft);
    }

    body.theme-dark .toast-success {
      border-color: #1f7f66;
      background: #0c2f28;
      color: #b8f7df;
    }

    body.theme-dark .toast-danger {
      border-color: #85433d;
      background: #3a1618;
      color: #ffd0cb;
    }

    body.theme-dark .toast-warning {
      border-color: #7d5520;
      background: #33240e;
      color: #ffe0a3;
    }

    @media (max-width: 1180px) {
      .workspace {
        grid-template-columns: 1fr;
      }

      .preview-summary {
        grid-template-columns: minmax(300px, 0.52fr) minmax(0, 1fr);
      }
    }

    @media (max-width: 760px) {
      body {
        min-width: 0;
        background: var(--surface-soft);
        font-size: 15px;
        overscroll-behavior-y: contain;
      }

      body::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: -1;
        background:
          linear-gradient(180deg, rgba(199, 70, 52, 0.08), transparent 230px),
          var(--background);
      }

      :where(button, a, .drop-zone):focus-visible {
        outline-offset: 2px;
      }

      .app-shell {
        min-height: 100dvh;
        background: transparent;
      }

      .topbar {
        position: sticky;
        top: 0;
        z-index: 30;
        border-bottom-color: rgba(203, 189, 179, 0.72);
        background: color-mix(in srgb, var(--surface) 92%, transparent);
        backdrop-filter: blur(18px);
      }

      .topbar-inner {
        min-height: calc(58px + env(safe-area-inset-top));
        align-items: end;
        gap: 10px;
        padding: env(safe-area-inset-top) 14px 10px;
      }

      .brand {
        gap: 9px;
      }

      .brand-mark {
        width: 30px;
        height: 30px;
      }

      .brand-name {
        font-size: clamp(19px, 5.8vw, 23px);
        white-space: nowrap;
      }

      .nav-link span {
        display: none;
      }

      .nav-actions a.nav-link {
        display: none;
      }

      .nav-link,
      .moon-button {
        width: 42px;
        height: 42px;
        min-height: 42px;
        justify-content: center;
        border-radius: 12px;
        color: var(--text);
      }

      .topbar-actions,
      .nav-actions {
        gap: 4px;
      }

      .main {
        padding: 12px 12px calc(28px + env(safe-area-inset-bottom));
      }

      .workspace {
        gap: 14px;
      }

      .converter-panel,
      .result-panel,
      .utility-grid {
        border: 1px solid var(--border);
        border-radius: 22px;
        background: color-mix(in srgb, var(--surface) 96%, transparent);
        box-shadow: 0 12px 34px rgba(45, 35, 30, 0.08);
        overflow: hidden;
      }

      .converter-panel,
      .result-panel,
      .utility-grid {
        scroll-margin-top: 76px;
      }

      .mode-tabs,
      .options-grid,
      .action-group,
      .utility-grid,
      .preview-summary {
        grid-template-columns: 1fr;
      }

      .mode-tabs {
        min-height: 48px;
        margin: 12px;
        padding: 4px;
        border-radius: 16px;
        background: var(--surface-soft);
      }

      .segment {
        min-height: 40px;
        gap: 8px;
        border: 0;
        border-radius: 12px !important;
        background: transparent;
        font-size: 15px;
        font-weight: 760;
      }

      .segment[aria-pressed="true"] {
        box-shadow: 0 6px 16px rgba(127, 45, 36, 0.22);
      }

      .source-header,
      .input-label-row {
        padding-inline: 14px;
      }

      .source-header {
        margin: 16px 0 10px;
      }

      .section-label,
      .label {
        font-size: 15px;
      }

      .action-link,
      .clear-link {
        font-size: 14px;
      }

      .source-switch {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin: 0 14px 16px;
      }

      .source-btn {
        min-height: 48px;
        padding: 0 12px;
        border: 1px solid var(--border);
        border-radius: 14px !important;
        font-size: 15px;
      }

      .source-btn:last-child {
        border-left: 1px solid var(--border);
      }

      .source-btn[aria-pressed="true"] {
        box-shadow: inset 0 0 0 1px var(--primary), 0 8px 18px rgba(199, 70, 52, 0.12);
      }

      textarea {
        width: calc(100% - 28px);
        min-height: min(242px, 34dvh);
        max-height: 40dvh;
        margin-inline: 14px;
        padding: 14px;
        border-radius: 16px 16px 0 0;
        font-size: 13px;
        line-height: 1.55;
      }

      .input-stats {
        width: calc(100% - 28px);
        min-height: 48px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin: 0 14px 14px;
        border-radius: 0 0 16px 16px;
      }

      .input-stat {
        min-height: 48px;
        justify-content: center;
        gap: 3px;
        padding: 4px 6px;
        border-right: 1px solid var(--border);
        border-bottom: 0;
        flex-wrap: wrap;
        text-align: center;
        font-size: 11px;
        line-height: 1.15;
      }

      .input-stat:last-child {
        border-right: 0;
      }

      .drop-zone.is-visible {
        min-height: 190px;
        margin: 0 14px 14px;
        border-radius: 18px;
      }

      .drop-zone-inner {
        width: min(100%, 270px);
        justify-content: center;
        text-align: left;
      }

      .action-bar {
        position: sticky;
        bottom: max(12px, env(safe-area-inset-bottom));
        z-index: 20;
        margin: 12px;
        padding: 10px;
        border: 1px solid var(--border);
        border-radius: 22px;
        background: color-mix(in srgb, var(--surface) 94%, transparent);
        box-shadow: 0 14px 34px rgba(45, 35, 30, 0.2);
        backdrop-filter: blur(18px);
      }

      .primary-action {
        min-height: 52px;
        border-radius: 16px;
        font-size: 15px;
      }

      .action-group {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin-top: 8px;
      }

      .action-group .btn {
        min-height: 44px;
        padding: 0 8px;
        border-radius: 14px;
        font-size: 12px;
        gap: 6px;
      }

      .action-group .btn svg {
        width: 16px;
        height: 16px;
      }

      .result-header,
      .result-body,
      .result-tabs {
        padding-left: 14px;
        padding-right: 14px;
      }

      .result-header {
        align-items: stretch;
        flex-direction: column;
        min-height: 0;
        padding-top: 16px;
        padding-bottom: 12px;
      }

      .result-title-wrap {
        gap: 7px;
      }

      .result-title-wrap h2 {
        font-size: 20px;
      }

      .result-file {
        max-width: 100%;
        font-size: 13px;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .result-actions {
        width: 100%;
        gap: 8px;
      }

      .result-actions .btn {
        flex: 1 1 auto;
        min-height: 44px;
        padding: 0 10px;
        border-radius: 14px;
        font-size: 13px;
      }

      .result-actions .icon-btn {
        flex: 0 0 48px;
      }

      .result-body {
        padding-top: 14px;
        padding-bottom: 14px;
      }

      .preview-frame,
      .preview-media,
      .preview-empty,
      .text-preview,
      .output-area {
        min-height: 220px;
        max-height: 300px;
      }

      .preview-media iframe {
        height: 300px;
      }

      .metadata-grid {
        grid-template-columns: minmax(92px, 0.38fr) minmax(0, 1fr);
      }

      .file-overview {
        min-height: 66px;
        padding-bottom: 12px;
      }

      .metadata-label,
      .metadata-value {
        min-height: 34px;
        font-size: 12px;
      }

      .metadata-value {
        line-height: 34px;
      }

      .result-tabs {
        min-height: 48px;
        gap: 0;
        justify-content: space-between;
        align-items: stretch;
        padding-top: 0;
        padding-bottom: 0;
      }

      .result-tab {
        min-height: 48px;
        flex: 1 1 0;
        justify-content: center;
        font-size: 13px;
      }

      .hex-panel {
        margin: 14px;
        border-radius: 16px;
      }

      .hex-dump {
        max-height: 240px;
        font-size: 12px;
      }

      .settings-scrim {
        background: rgba(22, 21, 19, 0.48);
      }

      .settings-panel {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: calc(100dvh - env(safe-area-inset-top) - 20px);
        gap: 16px;
        padding: 24px 20px calc(20px + env(safe-area-inset-bottom));
        border-width: 1px 0 0;
        border-radius: 26px 26px 0 0;
        transform: none;
      }

      .settings-panel-title {
        font-size: 21px;
      }

      .settings-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
      }

      .settings-actions .btn {
        min-height: 50px;
        border-radius: 16px;
        font-size: 15px;
      }

      .toast-root {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        left: 12px;
      }

      .toast {
        width: 100%;
        border-radius: 16px;
      }

      .help-column {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        padding: 0 0 18px;
      }

      .help-column:last-child {
        border-bottom: 0;
      }

      .utility-grid {
        margin-top: 14px;
        padding: 18px;
        gap: 18px;
      }

      .help-column h2 {
        margin-bottom: 12px;
      }

      .info-list {
        gap: 10px;
      }

      .shortcut-row {
        grid-template-columns: 132px minmax(0, 1fr);
      }
    }

    /* Oracle Redwood workbench treatment */
    .topbar {
      position: sticky;
      top: 0;
      z-index: 35;
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      box-shadow: 0 1px 0 rgba(31, 27, 23, 0.03);
    }

    .topbar-inner {
      min-height: 56px;
      justify-content: flex-start;
      padding: 0 20px;
      gap: 10px;
    }

    .brand-mark {
      width: 30px;
      height: 30px;
      color: var(--accent);
    }

    .nav-toggle {
      flex: 0 0 auto;
    }

    .brand-mark svg,
    .side-nav-item svg,
    .icon-button svg,
    .profile-button svg {
      width: 20px;
      height: 20px;
      stroke-width: 2;
    }

    .brand-name {
      font-size: 16px;
      font-weight: 760;
      line-height: 1.15;
    }

    .brand-subtitle {
      display: block;
      margin-top: 2px;
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 520;
      line-height: 1;
    }

    .topbar-actions {
      margin-left: auto;
    }

    .topbar-actions,
    .nav-actions {
      gap: 6px;
    }

    .icon-button,
    .moon-button,
    .profile-button {
      width: 36px;
      height: 36px;
      min-height: 36px;
      display: inline-grid;
      place-items: center;
      border: 1px solid transparent;
      border-radius: var(--radius-sm);
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
      text-decoration: none;
    }

    .icon-button:hover,
    .moon-button:hover,
    .profile-button:hover {
      border-color: var(--border);
      background: var(--surface-soft);
      color: var(--text);
    }

    .icon-button:disabled {
      cursor: not-allowed;
      opacity: 0.45;
    }

    .profile-button {
      border-color: var(--border);
      background: var(--surface-muted);
      color: var(--text);
      font-size: 12px;
      font-weight: 760;
    }

    .shell-body {
      min-height: calc(100vh - 57px);
      display: grid;
      grid-template-columns: 236px minmax(0, 1fr);
      transition: grid-template-columns 180ms ease;
    }

    .side-nav {
      position: sticky;
      top: 57px;
      width: 236px;
      height: calc(100vh - 57px);
      align-self: start;
      padding: 14px 12px;
      border-right: 1px solid var(--border);
      background: var(--surface-soft);
      overflow: auto;
      transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease, padding 180ms ease;
    }

    .nav-scrim {
      display: none;
    }

    body.nav-collapsed .shell-body {
      grid-template-columns: 0 minmax(0, 1fr);
    }

    body.nav-collapsed .side-nav {
      padding-inline: 0;
      border-right: 0;
      width: 0;
      opacity: 0;
      overflow: hidden;
      pointer-events: none;
      transform: translateX(-100%);
      visibility: hidden;
    }

    .nav-section + .nav-section {
      margin-top: 22px;
      padding-top: 18px;
      border-top: 1px solid var(--border);
    }

    .nav-section-label {
      margin: 0 10px 8px;
      color: var(--text-soft);
      font-size: 11px;
      font-weight: 760;
      line-height: 1;
      text-transform: uppercase;
    }

    .side-nav-item {
      min-height: 38px;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 0 10px;
      border-radius: var(--radius);
      color: var(--text-muted);
      font-size: 13px;
      font-weight: 650;
      line-height: 1;
      text-decoration: none;
    }

    .side-nav-item + .side-nav-item {
      margin-top: 3px;
    }

    .side-nav-item.is-active {
      background: var(--primary-soft);
      color: var(--text);
      font-weight: 760;
      box-shadow: inset 3px 0 0 var(--accent);
    }

    .side-nav-item.is-disabled {
      opacity: 0.52;
      cursor: not-allowed;
    }

    .main {
      min-width: 0;
      padding: 22px;
      background: var(--background);
    }

    .page-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 18px;
    }

    .breadcrumbs {
      margin-bottom: 8px;
      color: var(--text-soft);
      font-size: 12px;
      font-weight: 650;
      line-height: 1;
    }

    .page-title-row {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .page-title-row h1 {
      color: var(--text);
      font-size: 24px;
      font-weight: 760;
      line-height: 1.18;
    }

    .page-summary {
      max-width: 720px;
      margin-top: 7px;
      color: var(--text-muted);
      font-size: 13px;
      font-weight: 520;
      line-height: 1.45;
    }

    .page-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
    }

    .status-chip,
    .status-line {
      min-height: 30px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 0 12px;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: var(--surface);
      color: var(--text-muted);
      font-size: 13px;
      font-weight: 760;
      line-height: 1;
      white-space: nowrap;
    }

    .status-chip {
      color: #2f6b4f;
      background: #edf7f1;
      border-color: #b8d9c8;
    }

    .status-chip svg,
    .status-icon svg {
      width: 16px;
      height: 16px;
      flex: 0 0 auto;
      stroke-width: 2.2;
    }

    .local-chip {
      color: #2f604a;
      background: #f3faf6;
      border-color: #b8d9c8;
    }

    .status-chip-muted {
      color: var(--text-muted);
      background: var(--surface-soft);
      border-color: var(--border);
    }

    .status-chip-success {
      color: var(--success);
      background: #edf6f1;
      border-color: rgba(47, 107, 79, 0.22);
    }

    .status-icon {
      display: inline-grid;
      place-items: center;
      flex: 0 0 auto;
    }

    .status-line[data-tone="neutral"] {
      color: var(--text-muted);
      background: var(--surface-soft);
    }

    .status-line[data-tone="success"] {
      color: #2f6b4f;
      background: #edf7f1;
      border-color: #b8d9c8;
    }

    .status-line[data-tone="warning"] {
      color: #7d5a12;
      background: #fff7e4;
      border-color: #ead293;
    }

    .status-line[data-tone="danger"] {
      color: #9d302b;
      background: #fff0ee;
      border-color: #efbbb7;
    }

    .view-output-btn {
      border-color: #c9c2bb;
      background: #ffffff;
      color: var(--text);
      box-shadow: 0 1px 2px rgba(31, 27, 23, 0.06);
    }

    .view-output-btn:hover {
      border-color: #a99e95;
      background: #fbfaf8;
    }

    .workspace {
      grid-template-columns: minmax(360px, 0.84fr) minmax(520px, 1.16fr);
      gap: 18px;
      align-items: stretch;
    }

    .panel,
    .converter-panel,
    .result-panel,
    .utility-grid {
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: 0 1px 2px rgba(31, 27, 23, 0.06);
    }

    .converter-panel {
      padding: 18px;
      overflow: visible;
    }

    .panel-header {
      min-height: 42px;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }

    .panel-kicker {
      margin-bottom: 5px;
      color: var(--text-soft);
      font-size: 11px;
      font-weight: 760;
      line-height: 1;
      text-transform: uppercase;
    }

    .panel-header h2 {
      color: var(--text);
      font-size: 18px;
      font-weight: 760;
      line-height: 1.2;
    }

    .mode-tabs {
      min-height: 44px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 4px;
      padding: 4px;
      margin-bottom: 18px;
      border-radius: var(--radius);
      background: var(--surface-muted);
    }

    .segment {
      min-height: 36px;
      gap: 8px;
      border: 0;
      border-radius: var(--radius-sm);
      background: transparent;
      color: var(--text-muted);
      font-size: 13px;
      font-weight: 760;
    }

    .segment[aria-pressed="true"] {
      background: var(--surface);
      color: var(--text);
      box-shadow: 0 1px 2px rgba(31, 27, 23, 0.08);
    }

    .section-label,
    .label {
      color: var(--text);
      font-size: 13px;
      font-weight: 760;
    }

    .source-header {
      margin-bottom: 9px;
    }

    .source-switch {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      margin-bottom: 16px;
    }

    .source-btn {
      min-height: 40px;
      padding: 0 12px;
      color: var(--text-muted);
      font-size: 13px;
      font-weight: 700;
    }

    .source-btn[aria-pressed="true"] {
      border-color: var(--accent);
      background: var(--primary-soft);
      color: var(--primary-dark);
      box-shadow: inset 0 0 0 1px rgba(143, 79, 57, 0.18);
    }

    .action-link,
    .clear-link {
      color: var(--accent);
      font-size: 13px;
      font-weight: 700;
    }

    textarea {
      min-height: 260px;
      max-height: 42vh;
      padding: 13px 14px;
      border-radius: var(--radius) var(--radius) 0 0;
      font-size: 13px;
      font-weight: 520;
      line-height: 1.55;
    }

    .input-stats {
      min-height: 44px;
      margin-bottom: 14px;
      background: var(--surface-soft);
    }

    .input-stat {
      padding: 0 12px;
      color: var(--text-muted);
      font-size: 12px;
    }

    .drop-zone.is-visible {
      min-height: 210px;
      margin-bottom: 14px;
      background: var(--surface-soft);
    }

    .drop-icon {
      color: var(--accent);
      background: var(--surface);
    }

    .primary-action {
      min-height: 42px;
      border-radius: var(--radius-sm);
      background: var(--primary-gradient);
      font-size: 14px;
      font-weight: 760;
      box-shadow: none;
    }

    .action-bar {
      margin-top: 14px;
    }

    .action-group {
      gap: 8px;
      margin-top: 8px;
    }

    .btn,
    .btn-secondary,
    .btn-danger {
      min-height: 36px;
      padding: 0 12px;
      border-radius: var(--radius-sm);
      color: var(--text);
      font-size: 13px;
      font-weight: 700;
    }

    .btn:hover,
    .btn-secondary:hover,
    .btn-danger:hover {
      background: var(--surface-soft);
    }

    .result-panel {
      min-width: 0;
      overflow: hidden;
    }

    .result-header {
      min-height: 64px;
      padding: 0 18px;
      background: var(--surface);
    }

    .result-title-wrap h2 {
      font-size: 18px;
      font-weight: 760;
    }

    .result-file {
      max-width: min(520px, 42vw);
      color: var(--accent);
      font-size: 12px;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .result-actions {
      gap: 8px;
    }

    .result-actions .btn {
      min-height: 36px;
      padding: 0 12px;
    }

    .result-actions .icon-btn {
      width: 38px;
    }

    .result-body {
      padding: 18px;
    }

    .preview-summary {
      grid-template-columns: minmax(260px, 0.48fr) minmax(260px, 1fr);
      gap: 16px;
    }

    .preview-frame,
    .preview-media,
    .preview-empty,
    .text-preview,
    .output-area {
      min-height: 260px;
    }

    .preview-empty {
      background: var(--surface-soft);
    }

    .preview-media img,
    .preview-media video {
      max-height: 320px;
      object-fit: contain;
    }

    .metadata-grid {
      grid-template-columns: minmax(88px, 0.32fr) minmax(0, 1fr);
    }

    .file-type-icon {
      border-radius: var(--radius);
      color: var(--accent);
      background: var(--primary-soft);
      box-shadow: none;
    }

    .file-type-icon strong {
      background: var(--accent);
    }

    .metadata-label,
    .metadata-value {
      min-height: 34px;
      font-size: 12px;
    }

    .metadata-value {
      line-height: 34px;
    }

    .result-tabs {
      min-height: 45px;
      gap: 24px;
      padding: 0 18px;
      align-items: flex-end;
    }

    .result-tab {
      min-height: 44px;
      color: var(--text-soft);
      font-size: 13px;
      font-weight: 760;
      cursor: pointer;
    }

    .result-tab.is-active {
      color: var(--text);
      border-bottom-color: var(--accent);
    }

    .hex-panel {
      margin: 18px;
      border-radius: var(--radius);
    }

    .hex-header {
      min-height: 38px;
      background: var(--surface-soft);
      font-size: 12px;
    }

    .hex-dump {
      max-height: 280px;
      font-size: 12px;
      font-weight: 520;
    }

    .utility-grid {
      margin-top: 18px;
      padding: 0;
      grid-template-columns: 1fr 1fr 1.18fr;
      gap: 0;
      overflow: hidden;
    }

    .help-column {
      min-height: 190px;
      padding: 18px;
      border-right: 1px solid var(--border);
    }

    .help-column:last-child {
      border-right: 0;
    }

    .ops-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }

    .help-column h2 {
      margin: 0;
      font-size: 14px;
      font-weight: 760;
    }

    .task-summary {
      display: grid;
      gap: 5px;
      margin-bottom: 16px;
    }

    .task-summary strong {
      color: var(--text);
      font-size: 16px;
      font-weight: 760;
      line-height: 1.25;
    }

    .task-summary span {
      color: var(--text-muted);
      font-size: 13px;
      line-height: 1.4;
    }

    .metric-strip {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .metric-tile {
      min-width: 0;
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--surface-soft);
    }

    .metric-tile span,
    .policy-row span,
    .activity-meta {
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 560;
      line-height: 1.35;
    }

    .metric-tile strong {
      display: block;
      margin-top: 5px;
      color: var(--text);
      font-size: 15px;
      font-weight: 760;
      line-height: 1.2;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .info-list,
    .activity-list {
      display: grid;
      gap: 10px;
    }

    .policy-row,
    .activity-item {
      min-height: 36px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--border);
    }

    .policy-row:last-child,
    .activity-item:last-child {
      padding-bottom: 0;
      border-bottom: 0;
    }

    .policy-row strong,
    .activity-title {
      color: var(--text);
      font-size: 12px;
      font-weight: 760;
      line-height: 1.35;
      text-align: right;
    }

    .activity-main {
      min-width: 0;
    }

    .activity-empty {
      justify-content: flex-start;
      gap: 12px;
      min-height: 72px;
      padding: 14px;
      border: 1px dashed var(--border-strong);
      border-radius: var(--radius);
      background: var(--surface-soft);
    }

    .activity-empty-icon {
      width: 36px;
      height: 36px;
      display: inline-grid;
      place-items: center;
      flex: 0 0 auto;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: var(--surface);
      color: var(--accent);
    }

    .activity-empty-icon svg {
      width: 20px;
      height: 20px;
      stroke-width: 2;
    }

    .activity-title,
    .activity-meta {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      text-align: left;
    }

    .activity-tag {
      flex: 0 0 auto;
      min-height: 24px;
      display: inline-flex;
      align-items: center;
      border-radius: 999px;
      padding: 0 9px;
      background: var(--surface-soft);
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 760;
      line-height: 1;
    }

    body.theme-dark .side-nav,
    body.theme-dark .metric-tile,
    body.theme-dark .activity-empty,
    body.theme-dark .activity-tag,
    body.theme-dark .status-chip-muted {
      background: var(--surface-soft);
    }

    body.theme-dark .status-chip,
    body.theme-dark .local-chip,
    body.theme-dark .status-chip-success,
    body.theme-dark .status-line[data-tone="success"] {
      color: var(--success);
      background: rgba(129, 208, 170, 0.12);
      border-color: rgba(129, 208, 170, 0.24);
    }

    body.theme-dark .status-line[data-tone="warning"] {
      background: rgba(255, 210, 122, 0.12);
      border-color: rgba(255, 210, 122, 0.24);
    }

    body.theme-dark .status-line[data-tone="danger"] {
      background: rgba(255, 170, 162, 0.12);
      border-color: rgba(255, 170, 162, 0.24);
    }

    body.theme-dark .source-btn[aria-pressed="true"],
    body.theme-dark .side-nav-item.is-active {
      background: var(--primary-soft);
      color: var(--primary-dark);
    }

    @media (max-width: 1240px) {
      .workspace {
        grid-template-columns: 1fr;
      }

      .result-file {
        max-width: min(720px, 70vw);
      }
    }

    @media (max-width: 760px) {
      .shell-body {
        grid-template-columns: 1fr;
      }

      .side-nav {
        position: fixed;
        top: calc(57px + env(safe-area-inset-top));
        bottom: 0;
        left: 0;
        z-index: 34;
        width: min(300px, calc(100vw - 56px));
        height: auto;
        display: block;
        padding: 14px 12px calc(18px + env(safe-area-inset-bottom));
        border-right: 1px solid var(--border);
        box-shadow: 16px 0 36px rgba(31, 27, 23, 0.16);
        opacity: 0;
        pointer-events: none;
        transform: translateX(-105%);
        visibility: hidden;
      }

      body.nav-open {
        overflow: hidden;
      }

      body.nav-open .side-nav {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
        visibility: visible;
      }

      body.nav-collapsed .shell-body {
        grid-template-columns: 1fr;
      }

      body.nav-collapsed .side-nav {
        padding: 14px 12px calc(18px + env(safe-area-inset-bottom));
        border-right: 1px solid var(--border);
        transform: translateX(-105%);
      }

      .nav-scrim {
        position: fixed;
        inset: calc(57px + env(safe-area-inset-top)) 0 0;
        z-index: 33;
        display: block;
        border: 0;
        background: rgba(31, 27, 23, 0.32);
        cursor: pointer;
      }

      .nav-scrim[hidden] {
        display: none;
      }

      .main {
        padding: 18px;
      }

      .utility-grid {
        grid-template-columns: 1fr;
      }

      .help-column {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--border);
      }

      .help-column:last-child {
        border-bottom: 0;
      }
    }

    @media (max-width: 760px) {
      body {
        background: var(--background);
      }

      body::before {
        display: none;
      }

      .topbar {
        background: color-mix(in srgb, var(--surface) 94%, transparent);
      }

      .topbar-inner {
        min-height: calc(56px + env(safe-area-inset-top));
        align-items: center;
        padding: env(safe-area-inset-top) 12px 0;
      }

      .brand {
        gap: 8px;
      }

      .brand-subtitle,
      .icon-button[aria-label="Notifications"],
      .profile-button {
        display: none;
      }

      .brand-name {
        font-size: 15px;
      }

      .main {
        padding: 14px 12px calc(22px + env(safe-area-inset-bottom));
      }

      .page-header {
        display: grid;
        gap: 12px;
      }

      .page-title-row h1 {
        font-size: 21px;
      }

      .page-summary {
        font-size: 13px;
      }

      .page-actions {
        justify-content: flex-start;
      }

      .converter-panel,
      .result-panel,
      .utility-grid {
        border-radius: var(--radius);
        box-shadow: none;
      }

      .converter-panel {
        padding: 14px;
      }

      .mode-tabs {
        margin: 0 0 14px;
        border-radius: var(--radius);
      }

      .segment {
        min-height: 36px;
        border-radius: var(--radius-sm) !important;
        font-size: 13px;
      }

      .source-header,
      .input-label-row {
        padding-inline: 0;
      }

      .source-switch {
        margin: 0 0 14px;
      }

      .source-btn {
        min-height: 40px;
        border-radius: var(--radius-sm) !important;
      }

      textarea {
        width: 100%;
        min-height: min(230px, 36dvh);
        margin-inline: 0;
        border-radius: var(--radius) var(--radius) 0 0;
      }

      .input-stats {
        width: 100%;
        margin: 0 0 14px;
      }

      .input-stat {
        min-height: 44px;
      }

      .drop-zone.is-visible {
        margin: 0 0 14px;
        border-radius: var(--radius);
      }

      .action-bar {
        position: static;
        margin: 12px 0 0;
        padding: 10px;
        border-radius: var(--radius);
        background: var(--surface-soft);
        box-shadow: none;
      }

      .primary-action {
        min-height: 46px;
        border-radius: var(--radius-sm);
      }

      .action-group {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .action-group .btn,
      .result-actions .btn {
        min-height: 40px;
        border-radius: var(--radius-sm);
        font-size: 12px;
      }

      .result-header {
        padding: 14px;
      }

      .result-body {
        padding: 14px;
      }

      .preview-summary,
      .metric-strip {
        grid-template-columns: 1fr;
      }

      .result-tabs {
        padding: 0 14px;
        gap: 0;
      }

      .hex-panel {
        margin: 14px;
      }

      .utility-grid {
        margin-top: 14px;
      }

      .help-column {
        padding: 14px;
      }
    }

    @media (min-width: 761px) {
      body.nav-collapsed .shell-body {
        display: block;
      }

      body.nav-collapsed .side-nav {
        display: none;
      }
    }

    @media (max-width: 760px) {
      body.nav-open .side-nav {
        display: block;
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
        visibility: visible;
      }

      body:not(.nav-open) .side-nav {
        opacity: 0;
        pointer-events: none;
        transform: translateX(-105%);
        visibility: hidden;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
      }
    }
