﻿    :root {
      --bg: #111315;
      --panel: #1a1d21;
      --panel-2: #20242a;
      --border: #2d333b;
      --text: #eceff3;
      --muted: #a3acb8;
      --button: #2a2f36;
      --button-hover: #333943;
      --blue: #2563eb;
      --blue-soft: #1d4ed8;
      --link: #8bb6ff;
      --focus: #9fc5ff;
      --danger: #d35b5b;
      --warning: #d2a34c;
      --success: #62b46e;
      --very-strong: #3fbf7f;
      --radius: 12px;
    }

    * { box-sizing: border-box; }

    button,
    input,
    select,
    textarea {
      font: inherit;
    }

    a,
    button,
    input,
    select,
    textarea,
    .pin-card,
    .switch {
      touch-action: manipulation;
    }

    body {
      margin: 0;
      font-family: Inter, Arial, Helvetica, sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      padding: 10px;
      -webkit-text-size-adjust: 100%;
    }

    a {
      color: var(--link);
      text-underline-offset: 3px;
    }

    a:hover { color: var(--text); }

    code {
      color: var(--text);
      background: var(--panel-2);
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 1px 5px;
    }

    .site-nav {
      max-width: 980px;
      margin: 28px auto 0;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px;
      font-size: 13px;
    }

    .site-nav a {
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--panel);
      color: var(--muted);
      min-height: 40px;
      display: inline-flex;
      align-items: center;
      padding: 8px 10px;
      text-decoration: none;
    }

    .site-nav a:hover {
      background: var(--panel-2);
      color: var(--text);
    }

    .app {
      max-width: 560px;
      margin: 0 auto;
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px;
    }

    h1 {
      margin: 0 0 4px;
      font-size: 23px;
      font-weight: 700;
      text-align: center;
    }

    .subtitle {
      margin: 0 0 10px;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.5;
      text-align: center;
    }

    .trust-row {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 6px;
      margin: 0 0 14px;
    }

    .trust-badge {
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--panel-2);
      color: var(--muted);
      padding: 5px 7px;
      font-size: 12px;
      line-height: 1.2;
    }

    .section { margin-bottom: 12px; }

    .section-label {
      display: block;
      font-size: 13px;
      font-weight: 700;
      color: var(--muted);
      margin-bottom: 6px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .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;
    }

    .output-box { position: relative; }

    .output {
      min-height: 56px;
      width: 100%;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--panel-2);
      color: var(--text);
      padding: 10px 58px 10px 12px;
      font-family: Consolas, Monaco, monospace;
      font-size: 17px;
      line-height: 1.5;
      word-break: break-all;
      resize: vertical;
    }

    .copy-icon {
      position: absolute;
      top: 6px;
      right: 6px;
      width: 44px;
      height: 44px;
      border: 1px solid var(--border);
      background: var(--button);
      color: var(--text);
      border-radius: 8px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
    }

    .copy-icon svg {
      width: 20px;
      height: 20px;
      fill: currentColor;
      display: block;
      flex-shrink: 0;
    }

    .copy-icon .icon-check { display: none; }
    .copy-icon.is-copied .icon-copy { display: none; }
    .copy-icon.is-copied .icon-check { display: block; color: var(--success); }

    .btn-copied { border-color: var(--success); color: var(--success); }

    .copy-icon:hover, button:hover { background: var(--button-hover); }

    button:focus-visible,
    input:focus-visible,
    textarea:focus-visible,
    select:focus-visible,
    .pin-card:focus-visible,
    .switch input:focus-visible + .slider {
      outline: 2px solid var(--focus);
      outline-offset: 2px;
    }

    .length-row {
      display: grid;
      grid-template-columns: 1fr 160px;
      gap: 10px;
      align-items: center;
    }

    .length-control {
      display: grid;
      grid-template-columns: 44px 1fr 44px;
      gap: 6px;
      align-items: center;
    }

    .step-btn {
      min-height: 44px;
      padding: 0;
      border-radius: 8px;
      font-weight: 700;
      line-height: 1;
    }

    .step-btn:disabled {
      cursor: not-allowed;
      opacity: 0.45;
    }

    .tab-bar {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 4px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--panel-2);
      padding: 4px;
    }

    .tab-btn {
      min-height: 44px;
      border-color: transparent;
      border-radius: 8px;
      background: transparent;
      color: var(--muted);
      font-weight: 700;
    }

    .tab-btn[aria-pressed="true"] {
      background: var(--blue);
      color: white;
    }

    .tab-panel.is-hidden { display: none; }

    input[type="range"] { width: 100%; accent-color: var(--blue); }

    input,
    select,
    textarea {
      font-size: 16px;
    }

    input[type="number"], select {
      width: 100%;
      min-height: 44px;
      padding: 10px 8px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--panel-2);
      color: var(--text);
    }

    input[type="number"] {
      text-align: center;
      -moz-appearance: textfield;
    }

    input[type="number"]::-webkit-inner-spin-button,
    input[type="number"]::-webkit-outer-spin-button {
      margin: 0;
      -webkit-appearance: none;
    }

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

    .option {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      padding: 8px 10px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--panel-2);
      font-family: Inter, Arial, Helvetica, sans-serif;
      font-size: 14px;
      line-height: 1.2;
      min-height: 48px;
    }

    .option-text {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }

    .option-title {
      color: var(--text);
    }

    .option-hint {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.2;
    }

    .option-hint:empty { display: none; }

    .option.is-hidden { display: none; }

    .option.is-disabled { opacity: 0.5; }

    .pin-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
      gap: 8px;
    }

    .pin-card {
      position: relative;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--panel-2);
      color: var(--text);
      padding: 14px 10px;
      font-family: Consolas, Monaco, monospace;
      font-size: 22px;
      text-align: center;
      cursor: pointer;
      user-select: none;
      transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    }

    .pin-card:hover { background: var(--button-hover); }
    .pin-card:active { transform: scale(0.98); }

    @keyframes pin-copy-flash {
      0%   { background: var(--success); border-color: var(--success); color: #0f1a12; transform: scale(1.04); }
      60%  { background: var(--success); border-color: var(--success); color: #0f1a12; transform: scale(1); }
      100% { background: var(--panel-2); border-color: var(--success); color: var(--success); transform: scale(1); }
    }

    .pin-card.is-copied {
      border-color: var(--success);
      color: var(--success);
      animation: pin-copy-flash 0.5s ease-out;
    }

    .pin-card.is-copied .pin-value { color: inherit; }

    .pin-card .pin-hint {
      display: block;
      margin-top: 4px;
      font-family: Inter, Arial, Helvetica, sans-serif;
      font-size: 11px;
      font-weight: 500;
      color: var(--muted);
    }

    .pin-card.is-copied .pin-hint { color: var(--success); }

    .pin-empty {
      grid-column: 1 / -1;
      padding: 22px 10px;
      border: 1px dashed var(--border);
      border-radius: 10px;
      background: var(--panel-2);
      color: var(--muted);
      font-size: 14px;
      text-align: center;
    }

    .option-wide { grid-column: 1 / -1; }

    .options.is-passphrase #lowercaseOption { order: 1; }
    .options.is-passphrase #uppercaseOption { order: 2; }
    .options.is-passphrase #numbersOption { order: 3; }
    .options.is-passphrase #symbolsOption { order: 4; }
    .options.is-passphrase #excludeAmbiguousOption { order: 5; }
    .options.is-passphrase #separatorOption {
      order: 6;
      grid-column: auto;
    }

    .switch {
      position: relative;
      width: 52px;
      height: 32px;
      flex: 0 0 52px;
    }

    .switch input {
      position: absolute;
      inset: 0;
      opacity: 0;
      margin: 0;
      cursor: pointer;
    }

    .slider {
      position: absolute;
      inset: 0;
      background: #4b5563;
      border-radius: 999px;
      pointer-events: none;
    }

    .slider::before {
      content: "";
      position: absolute;
      width: 24px;
      height: 24px;
      left: 4px;
      top: 4px;
      background: white;
      border-radius: 50%;
      transition: 0.2s;
    }

    .switch input:checked + .slider { background: var(--blue); }
    .switch input:checked + .slider::before { transform: translateX(20px); }

    .buttons {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 10px;
    }

    button {
      min-height: 44px;
      padding: 10px 14px;
      border-radius: 9px;
      border: 1px solid var(--border);
      background: var(--button);
      color: var(--text);
      cursor: pointer;
    }

    .btn-primary { background: var(--blue); color: white; }
    .btn-primary:hover { background: var(--blue-soft); }

    .metrics { font-size: 14px; }

    .metric-row {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      border-bottom: 1px solid var(--border);
      padding: 6px 0;
    }

    .bar {
      height: 8px;
      background: #2f3540;
      border-radius: 999px;
      overflow: hidden;
    }

    .bar-fill {
      height: 100%;
      width: 0%;
      transition: width 0.2s ease, background 0.2s ease;
    }

    .message {
      min-height: 18px;
      margin-top: 8px;
      text-align: center;
      font-size: 13px;
      color: var(--muted);
    }

    .seo-content {
      max-width: 760px;
      margin: 16px auto 0;
      padding: 0 4px 24px;
      color: var(--text);
    }

    .seo-content section {
      border-top: 1px solid var(--border);
      padding: 16px 0 0;
      margin-top: 16px;
    }

    .seo-content h2 {
      margin: 0 0 8px;
      font-size: 19px;
      line-height: 1.25;
    }

    .seo-content h3 {
      margin: 14px 0 4px;
      font-size: 15px;
      line-height: 1.35;
    }

    .seo-content p,
    .seo-content li {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.6;
    }

    .seo-content ul {
      margin: 10px 0 0;
      padding-left: 20px;
    }

    @media (max-width: 640px) {
      body { padding: 8px; }
      .app {
        max-width: 100%;
        padding: 14px;
      }
      .length-row {
        grid-template-columns: 1fr;
        gap: 8px;
      }
      .options { gap: 7px; }
      .output {
        min-height: 62px;
        padding-right: 56px;
      }
      .seo-content { margin-top: 14px; }
    }

    @media (max-width: 440px) {
      body { padding: 10px; }
      .app { padding: 12px; }
      .length-row { grid-template-columns: 1fr; }
      .tab-bar { gap: 3px; }
      .tab-btn {
        min-width: 0;
        padding: 8px 5px;
        font-size: 13px;
      }
      .options { grid-template-columns: 1fr; }
      .buttons button { flex: 1 1 140px; }
      .pin-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
      .pin-card { font-size: 20px; }
      .seo-content h2 { font-size: 18px; }
    }

    @media (max-width: 360px) {
      body { padding: 6px; }
      .app { padding: 10px; }
      h1 { font-size: 21px; }
      .subtitle { font-size: 13px; }
      .tab-btn { font-size: 12px; }
      .trust-badge { font-size: 11px; }
      .metric-row {
        gap: 8px;
        align-items: flex-start;
      }
    }

