    button, input {
      font: inherit;
    }

    .app-container {
      max-width: 1120px;
      margin: auto;
      padding: 30px 16px 45px;
    }

   /* .page-heading {
      text-align: center;
      margin-bottom: 26px;
    }

    .page-heading h1 {
      font-size: clamp(1.65rem, 4vw, 2.5rem);
      font-weight: 800;
      letter-spacing: -1px;
      margin-bottom: 10px;
    }

    .page-heading p {
      color: #687386;
      max-width: 660px;
      margin: auto;
      line-height: 1.7;
    }
*/
    .tool-card {
      background: #ffffff;
      border: 1px solid #e3e8f0;
      border-radius: 22px;
      overflow: hidden;
      box-shadow: 0 10px 35px rgba(20, 35, 70, .06);
    }

    .tool-topbar {
      padding: 17px 22px;
      border-bottom: 1px solid #e3e8f0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .live-status {
      display: flex;
      align-items: center;
      gap: 9px;
      font-size: .9rem;
      font-weight: 650;
    }

    .status-dot {
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: #16a34a;
    }

    .status-dot.running {
      background: #f59e0b;
    }

    .preview-area {
      padding: 20px;
      background: #eef1f6;
    }

    .screen {
      position: relative;
      width: 100%;
      height: clamp(280px, 55vw, 500px);
      min-height: 280px;
      border-radius: 12px;
      background: #000000;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background-color .12s linear;
    }

    .screen.is-testing {
      border-radius: 0;
    }

    .screen-message {
      color: #ffffff;
      text-align: center;
      padding: 20px;
      z-index: 2;
      max-width: 340px;
    }

    .screen-message .start-icon {
      display: grid;
      place-items: center;
      width: 64px;
      height: 64px;
      border-radius: 20px;
      background: rgba(255, 255, 255, .13);
      margin: 0 auto 18px;
      font-size: 28px;
    }

    .screen-message h2 {
      font-size: 1.45rem;
      font-weight: 750;
    }

    .screen-message p {
      color: #d0d0d0;
      font-size: .92rem;
      line-height: 1.6;
    }

    .screen-message .btn {
      margin-top: 8px;
    }

    .screen-ui {
      position: absolute;
      inset: 0;
      pointer-events: none;
    }

    .screen-ui button,
    .screen-ui .test-label {
      pointer-events: auto;
    }

    .screen-ui button {
      position: absolute;
      top: 14px;
      z-index: 5;
      border: 1px solid rgba(255, 255, 255, .25);
      background: rgba(25, 25, 25, .7);
      color: #ffffff;
      width: 42px;
      height: 42px;
      border-radius: 12px;
      display: grid;
      place-items: center;
      backdrop-filter: blur(8px);
    }

    .screen-ui button:hover {
      background: rgba(70, 70, 70, .9);
    }

    #exitFullscreen {
      right: 14px;
    }

    #screenInfo {
      left: 14px;
    }

    .test-label {
      position: absolute;
      bottom: 15px;
      left: 50%;
      transform: translateX(-50%);
      color: #ffffff;
      font-size: .78rem;
      background: rgba(0, 0, 0, .6);
      padding: 7px 12px;
      border-radius: 30px;
      white-space: nowrap;
    }

    .screen.is-pure-black .test-label {
      color: #ffffff;
      background: #080808;
    }

    .test-controls {
      padding: 23px;
    }

    .section-label {
      font-size: .92rem;
      font-weight: 750;
      margin-bottom: 12px;
    }

    .color-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 10px;
    }

    .color-btn {
      border: 1px solid #e3e8f0;
      background: #ffffff;
      border-radius: 12px;
      min-width: 0;
      padding: 9px 3px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 7px;
      font-size: .76rem;
      font-weight: 650;
      color: #344054;
      transition: .15s;
    }

    .color-btn:hover {
      border-color: #4f46e5;
      transform: translateY(-2px);
    }

    .color-btn.active {
      border: 2px solid #4f46e5;
      padding: 8px 2px;
      background: #f4f3ff;
      color: #4f46e5;
    }

    .swatch {
      width: 30px;
      height: 30px;
      border-radius: 9px;
      border: 1px solid rgba(0, 0, 0, .12);
      display: block;
    }

    .swatch.black {
      background: #000000;
      border-color: #777777;
    }

    .swatch.white {
      background: #ffffff;
    }

    .swatch.red {
      background: #ff0000;
    }

    .swatch.green {
      background: #00d000;
    }

    .swatch.blue {
      background: #0000ff;
    }

    .swatch.gray {
      background: #808080;
    }

    .swatch.gradient {
      background: linear-gradient(90deg, #000000, #ffffff);
    }

    .control-divider {
      height: 1px;
      background: #e3e8f0;
      margin: 23px 0;
    }

    .action-buttons {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .action-buttons .btn {
      min-height: 44px;
      border-radius: 11px;
      font-weight: 650;
      padding: 10px 17px;
    }

    .btn-primary {
      --bs-btn-bg: #4f46e5;
      --bs-btn-border-color: #4f46e5;
      --bs-btn-hover-bg: #4338ca;
      --bs-btn-hover-border-color: #4338ca;
    }

    .custom-color-wrap {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .custom-color-wrap input[type="color"] {
      width: 50px;
      height: 42px;
      padding: 3px;
      border: 1px solid #e3e8f0;
      border-radius: 10px;
      background: #ffffff;
      cursor: pointer;
    }

    .pattern-select {
      max-width: 300px;
      min-height: 43px;
      border-radius: 10px;
    }

    .info-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 15px;
      margin-top: 22px;
    }

    .info-card {
      background: #ffffff;
      border: 1px solid #e3e8f0;
      border-radius: 15px;
      padding: 18px;
    }

    .info-card i {
      font-size: 22px;
      color: #4f46e5;
    }

    .info-card h3 {
      font-size: .98rem;
      font-weight: 750;
      margin: 10px 0 6px;
    }

    .info-card p {
      font-size: .86rem;
      line-height: 1.65;
      color: #687386;
      margin: 0;
    }

    .instructions {
      margin-top: 22px;
      background: #ffffff;
      border: 1px solid #e3e8f0;
      border-radius: 17px;
      padding: 23px;
    }

    .instructions h2 {
      font-size: 1.2rem;
      font-weight: 750;
      margin-bottom: 14px;
    }

    .instructions li {
      color: #525d70;
      line-height: 1.8;
      margin-bottom: 6px;
    }

    .site-footer {
      color: #687386;
      text-align: center;
      font-size: .85rem;
      padding-top: 25px;
    }

    /* Actual fullscreen: only the test screen remains visible. */
    #testStage:fullscreen {
      position: fixed;
      inset: 0;
      z-index: 99999;
      width: 100%;
      height: 100%;
      background: #000000;
      display: flex;
      align-items: stretch;
      justify-content: stretch;
    }

    #testStage:fullscreen .screen {
      width: 100%;
      height: 100%;
      min-height: 0;
      border-radius: 0;
      flex: 1;
    }

    #testStage:fullscreen .screen-message {
      display: none;
    }

    #testStage:fullscreen .screen-ui button {
      opacity: 0;
      transition: opacity .2s;
    }

    #testStage:fullscreen .screen-ui:hover button,
    #testStage:fullscreen .screen-ui button:focus-visible {
      opacity: 1;
    }

    #testStage:fullscreen .test-label {
      opacity: 0;
      transition: opacity .2s;
    }

    #testStage:fullscreen .screen-ui:hover .test-label {
      opacity: 1;
    }

    #testStage:fullscreen .screen.is-testing {
      border-radius: 0;
    }

    body.fullscreen-active {
      overflow: hidden;
    }

    @media (max-width: 700px) {
      .app-container {
        padding: 22px 11px 30px;
      }

      .preview-area {
        padding: 9px;
      }

      .screen {
        height: 55vh;
        min-height: 260px;
      }

      .test-controls {
        padding: 17px 13px;
      }

      .color-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
      }

      .swatch {
        width: 27px;
        height: 27px;
      }

      .info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
      }

      .info-card {
        padding: 15px;
      }

      .tool-topbar {
        padding: 14px;
      }

      .action-buttons .btn {
        flex: 1 1 auto;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
      }
    }
