@font-face { font-family: 'Coolvetica'; src: local('Coolvetica'), local('Coolvetica Rg'), url(./coolvetica.otf) format('opentype'); font-display: swap; }
  @font-face { font-family: 'Kinder'; src: url(./kinder.woff) format('woff'); font-display: swap; }
  :root { --bg: #fff; --ink: #111; --blue: #1941f5; --line: #dcdad4; --mute: #8a887f; }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  #tool { width: 100%; height: 100%; position: relative; container-type: inline-size; overflow: hidden; background: var(--bg); color: var(--ink); }
  #app { width: 100%; height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 236px; height: 100%;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 11px; letter-spacing: .01em; }
  #tool .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  #tool main { display: flex; align-items: center; justify-content: center; padding: 18px; overflow: hidden; min-width: 0; min-height: 0; }
  #tool #out { display: block; background: #fff; outline: 1px solid var(--line); max-width: 100%; max-height: 100%; }

  #tool aside { border-left: 1px solid var(--line); padding: 18px 16px; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
  #tool h1 { font-family: 'Coolvetica', 'Helvetica Neue', sans-serif; font-size: 20px; font-weight: normal; letter-spacing: .005em; margin-bottom: 10px; }
  #tool .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); min-height: 28px; }
  #tool .row:last-of-type { border-bottom: 1px solid var(--line); }
  #tool .row > span { color: var(--mute); white-space: nowrap; }
  #tool .val { font-weight: normal; }
  #tool .opts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
  #tool .opts button { background: none; border: 1px solid var(--line); padding: 2px 6px; font: inherit; color: var(--ink); cursor: pointer; line-height: 1.3; }
  #tool .opts button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
  #tool .opts button.sw { width: 16px; height: 16px; padding: 0; }
  #tool .opts button.sw.on { outline: 2px solid var(--ink); outline-offset: 1px; }
  #tool .pair { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
  #tool .pair .opts { flex-wrap: wrap; max-width: 100px; }
  #tool .row.slider { flex-direction: column; align-items: stretch; gap: 4px; }
  #tool .row.slider .top { display: flex; justify-content: space-between; }
  #tool .row.slider .top span { color: var(--mute); }
  #tool input[type=range] { width: 100%; height: 14px; accent-color: var(--blue); }
  #tool input[type=color] { width: 20px; height: 20px; padding: 0; border: 1px solid var(--line); background: none; cursor: pointer; }
  #tool input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
  #tool input[type=color]::-webkit-color-swatch { border: 0; }
  #tool .row.lines { flex-direction: column; align-items: stretch; gap: 3px; }
  #tool .row.lines > span em { font-style: normal; color: var(--ink); }
  #tool .line { display: flex; gap: 4px; align-items: center; }
  #tool .line input[type=text] { flex: 1; min-width: 0; border: 1px solid var(--line); background: none; font: inherit; color: var(--ink); padding: 2px 5px; outline: none; height: 20px; }
  #tool .line input[type=text]:focus { border-color: var(--ink); }
  #tool .line .opts { flex-shrink: 0; flex-wrap: nowrap; gap: 2px; }
  #tool .line .opts button { padding: 1px 4px; font-size: 10px; }

  #tool .export { display: flex; gap: 6px; margin-top: 12px; }
  #tool .export + .export { margin-top: 6px; }
  #tool .btn { flex: 1; padding: 8px 4px; white-space: nowrap; border: 1px solid var(--ink); background: none; font: inherit; color: var(--ink); cursor: pointer; text-align: center; }
  #tool .btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
  #tool .btn:disabled { opacity: .35; cursor: default; }

  #tool .status { color: var(--mute); line-height: 1.45; margin-top: auto; padding-top: 10px; }
  #tool .status em { font-style: normal; color: var(--blue); }

  @container (max-width: 700px) {
    #app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
    #tool main { padding: 12px; }
    #tool aside { border-left: 0; border-top: 1px solid var(--line); max-height: 48vh; overflow-y: auto; padding: 12px 14px; }
    #tool .status { margin-top: 10px; }
  }
