@font-face {
  font-family: 'Barriecito';
  src: url('Barriecito-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('SpaceMono-Regular.ttf') format('truetype');   /* SIL OFL 1.1, see OFL.txt */
  font-display: swap;
}

:root {
  /* exact hex values pulled from the SVG source */
  --bg-grey:      #CDCDCD;
  --bg-line:      #DCDCDC;   /* stripes: a shade lighter than the grey, not white */
  --line:         1px;       /* every outline on the page */
  --ink:          #000000;
  --paper:        #FFFFFF;
  --frame:        #000000;
  --arrow-green:  #CCF7DA;
  --arrow-brown:  #582A21;
  --ratio-bg:     #FFFFFF;
  --apple-red:    #DD2E44;
  --apple-leaf:   #77B255;
  --apple-stem:   #662113;
  --rose:         #F8C8DC;
  --mint:         #B8E0D2;
  --butter:       #F5DC6B;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
/* html gets a plain background so the body's stripes stay inside the phone frame on desktop */
html { height: 100%; background: var(--bg-grey); overflow: hidden; }

body {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  color: var(--ink);
  background-color: var(--bg-grey);
  /* faint vertical stripes: 11 across the width, each centred in its own tile and
     `round` makes the tiles fit exactly, so the left and right edges mirror each other.
     Stripe = 22% of a tile ≈ 2% of the width. */
  background-image: linear-gradient(90deg, transparent 0 39%, var(--bg-line) 39% 61%, transparent 61%);
  background-size: 9.09% 100%;
  background-repeat: round;
  height: 100vh;
  height: 100dvh;            /* the real visible height on phones (toolbar in or out) */
  overflow: hidden;          /* everything fits one screen — the preview shrinks instead */
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* === top row: logo bar + a separate refresh square. Proportions started from the
   mock-up (content column 85% wide) and were then scaled up at Jessie's request === */
.top-row {
  display: flex;
  align-items: stretch;
  gap: 6%;
  margin: 6.4% 7.5% 0;
  flex-shrink: 0;
}
.logo-bar {
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #FAFCFD 0%, #94C4E1 100%);
  border: var(--line) solid var(--ink);
  border-radius: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  display: inline-flex;
  align-items: baseline;      /* i, apple and the word all sit on one baseline */
  gap: 0.5em;
  font-size: clamp(21px, 6.2vw, 27px);   /* fills ~90% of the bar on a phone */
  --lift: -0.1em;                        /* how far the letters sit above the apple's baseline */
  white-space: nowrap;
  user-select: none;
  color: var(--ink);
}
.logo .i,
.logo .doodle {
  font-family: 'Barriecito', cursive;
  font-weight: 400;
  line-height: 1;
  position: relative;
  top: var(--lift);               /* optically centre the letters in the bar; the apple stays put */
}
.logo .i {
  font-size: 1.05em;              /* a hair taller than the word, thinner */
  top: calc(var(--lift) + 0.05em); /* and a touch lower than the other letters */
}
.logo .apple {
  width: 0.96em; height: 1.12em;  /* body = ascender height, leaf pokes above */
  position: relative;
  top: 0.085em;                   /* sits on the baseline like the letters */
  flex-shrink: 0;
}

/* === undo button (the circular arrow): lavender gradient square, thin black outline === */
.refresh-btn {
  width: 17.5%;
  aspect-ratio: 96 / 79;    /* the row is as tall as this square */
  background: linear-gradient(180deg, #FAF9FD 0%, #8E86DD 100%);
  border: var(--line) solid var(--ink);
  border-radius: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.refresh-btn:active { transform: scale(0.93); }
.refresh-btn:disabled { opacity: 0.35; cursor: default; }   /* nothing to undo yet */
.refresh-btn:disabled:active { transform: none; }
/* the drawn square is small on a phone — give the thumb a bigger invisible target */
.refresh-btn { position: relative; }
.refresh-btn::before { content: ''; position: absolute; inset: -8px; }
.refresh-btn.spin svg { animation: rspin 0.55s ease; }
@keyframes rspin { to { transform: rotate(-360deg); } }
.refresh-btn svg {
  width: 50%;
  height: auto;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* === stage: takes whatever height is left between the top row and the panel;
   the preview is fitted inside it (JS) so the panel never moves === */
.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4.5% 7.5% 0;
}

.preview-frame {
  /* width/height set by fitPreview() */
  background: var(--paper);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.preview-frame canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}
/* long-dash frame like the mock-up (5px dash, 2px gap) — a plain `border: dashed`
   only gives short even dashes */
.preview-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  --dash-h: repeating-linear-gradient(90deg,  var(--frame) 0 5px, transparent 5px 7px);
  --dash-v: repeating-linear-gradient(180deg, var(--frame) 0 5px, transparent 5px 7px);
  background-image: var(--dash-h), var(--dash-h), var(--dash-v), var(--dash-v);
  background-size: 100% var(--line), 100% var(--line), var(--line) 100%, var(--line) 100%;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: no-repeat;
}

.save-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 1.5px;
  background: rgba(255,255,255,0.85);
  border: var(--line) solid var(--ink);
  /* the right side is trimmed by the trailing letter-spacing */
  padding: 7.25px 10.5px 7.25px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;        /* the preview can get narrow on short phones */
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.save-hint.show { opacity: 1; }

/* === toast === */
.toast {
  position: fixed;
  left: 50%;
  top: 92px;
  transform: translateX(-50%) translateY(-12px);
  background: var(--ink);
  color: var(--paper);
  padding: 8.7px 14px;
  border-radius: 999px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 1.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
  text-transform: uppercase;
  white-space: nowrap;       /* longer messages ("crystal comes in one look") stay on one line */
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* === bottom panel: full-bleed (touches the left, right and bottom edges, like the
   mock-up's bottom bar), fixed height, pinned under the preview. One step at a time —
   Ratio → Pattern → Tune → Color — switched with the brown arrows. === */
.control-panel {
  background: var(--paper);
  border: var(--line) solid var(--ink);
  margin: 4.5% -1px -1px;    /* side and bottom outlines fall just off the screen */
  padding: 8px 14px 0;
  height: calc(226px + env(safe-area-inset-bottom, 0px));   /* fixed: the preview takes what is left */
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

/* header: ◀  [step name]  ▶ */
.steps-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  flex-shrink: 0;
}
.step-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 120px;
  padding: 0 16px 1px;        /* Space Mono sits a hair low */
  background: linear-gradient(180deg, #FBFEFC 0%, #A9EBC8 100%);   /* same family as the logo bar */
  border: var(--line) dashed var(--ink);
  font-family: 'Space Mono', monospace;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: var(--ink);
  user-select: none;
}
/* once something in the step has been chosen, the title fills in: solid */
.step-name.done { border-style: solid; }
.step-arrow {
  width: 44px; height: 44px;
  margin: 0 -6px;             /* triangles sit close to the screen edge, like the mock-up */
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.step-arrow::before {
  content: '';
  width: 0; height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}
.step-arrow.prev::before { border-right: 14px solid var(--arrow-brown); }
.step-arrow.next::before { border-left:  14px solid var(--arrow-brown); }
.step-arrow:disabled { opacity: 0.25; cursor: default; }
.step-arrow:active:not(:disabled)::before { transform: translateY(1px); }

.step { display: none; flex: 1; min-height: 0; padding-top: 4px; }
/* Tune and Color fill the panel, so their last row keeps 16px clear of the iPhone
   home-bar swipe zone (env() adds the real inset when running edge-to-edge);
   Ratio and Pattern are short and simply sit centred in the whole panel */
.step.safe { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.step.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

/* Ratio: one little frame per option, the same shape as the wallpaper it makes */
.ratio-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.ratio-chip,
.pattern-chip {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--ink);
}
.ratio-chip { width: 62px; font-size: 13px; }
.ratio-chip .mini {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px; height: 60px;
}
/* not chosen yet = dashed outline; chosen = solid + pink (same idea in every step) */
.ratio-chip .mini i {
  display: block;
  background: var(--paper);
  border: var(--line) dashed var(--ink);
  border-radius: 1px;
}
.ratio-chip[aria-pressed="true"] .mini i { border-style: solid; background: var(--rose); }

/* Pattern: icon buttons drawn by the same cell functions as the wallpaper, name below */
.pattern-row {
  display: flex;
  justify-content: space-evenly;   /* spreads 3, 4 or 6 icons without overflowing */
  gap: 0;
}
/* six icons in a row (the lines page): smaller chips */
.pattern-row.dense .pattern-chip { width: 54px; font-size: 11px; letter-spacing: 0; }
.pattern-row.dense .pattern-chip .icon { width: 48px; height: 48px; }
.pattern-row.dense .pattern-chip canvas { width: 32px; height: 32px; }
.pattern-chip { width: 72px; font-size: 13px; }
.pattern-chip .icon {
  width: 66px; height: 66px;
  background: var(--paper);
  border: var(--line) dashed var(--ink);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pattern-chip canvas { width: 42px; height: 42px; display: block; }
.pattern-chip[aria-pressed="true"] .icon { border-style: solid; background: var(--rose); }

/* Tune: label on the left, control fills the rest */
.setting-row {
  display: grid;
  grid-template-columns: 56px 1fr 50px;
  align-items: center;
  gap: 8px;
  height: 34px;
}
.setting-row .lbl {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;        /* Space Mono runs wider: keeps SPREAD / PATTERN off the slider */
}
.setting-row .val {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  text-align: right;
  font-style: italic;
  white-space: nowrap;        /* "300 px" stays on one line */
}
/* grid|brick and solid|outline side by side */
.switch-row {
  display: flex;
  gap: 10px;
}
.switch-row .segmented { flex: 1; height: 34px; }

input[type="range"].slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 34px;                   /* the whole row is the touch target */
  background: transparent;
  cursor: pointer;
  margin: 0;
}
input[type="range"].slider::-webkit-slider-runnable-track {
  height: 8px;
  border: var(--line) solid var(--ink);
  border-radius: 4px;
  background:
    repeating-linear-gradient(45deg, rgba(31,31,31,0.06) 0 6px, transparent 6px 12px),
    var(--paper);
}
input[type="range"].slider::-moz-range-track {
  height: 8px;
  border: var(--line) solid var(--ink);
  border-radius: 4px;
  background: var(--paper);
}
/* a slider nobody has moved yet is dashed too */
input[type="range"].slider:not(.touched)::-webkit-slider-runnable-track { border-style: dashed; }
input[type="range"].slider:not(.touched)::-moz-range-track { border-style: dashed; }
input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -10px;              /* centres the 26px thumb on the 8px track */
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--rose);
  border: var(--line) solid var(--ink);
}
input[type="range"].slider::-moz-range-thumb {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--rose);
  border: var(--line) solid var(--ink);
}

/* two-way switch */
.segmented {
  display: flex;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  height: 36px;
}
.segmented button {
  flex: 1;
  border: none;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0;
  cursor: pointer;
}
.segmented button + button { border-left: var(--line) solid var(--ink); }
/* round the end buttons themselves so the fill meets the pill's curve cleanly */
.segmented button:first-child { border-radius: 999px 0 0 999px; }
.segmented button:last-child  { border-radius: 0 999px 999px 0; }
.segmented button.end { border-radius: 0 999px 999px 0; }   /* the last tab that is showing, when later ones are hidden */
.segmented button[aria-pressed="true"] { background: var(--rose); }
/* the option that also holds an amount (round / grainy): its pink fills as far as the amount,
   with a hairline at the edge you drag */
.segmented button.fill { touch-action: none; }
.segmented.choice button.fill[aria-pressed="true"] {
  --f: calc(var(--fill, 1) * 100%);
  background: linear-gradient(90deg, var(--rose) var(--f), var(--ink) var(--f), var(--ink) calc(var(--f) + 1px), var(--paper) calc(var(--f) + 1px));
}
.segmented button > span { display: inline-block; }
/* a switched-off slider (Background size / vivid before a style is picked) */
.setting-row.off { opacity: 0.3; pointer-events: none; }
/* choice switches (grid|brick …) start dashed with nothing lit; the tab bar in Color is
   navigation, so it stays solid */
.segmented.choice:not(.touched) { border-style: dashed; }
.segmented.choice:not(.touched) button + button { border-left-style: dashed; }

/* Color: combos | dots | bg switch on top, then 6 × 2 chips */
.color-step .segmented {
  height: 28px;
  width: 230px;
  margin: 0 auto 4px;
  flex-shrink: 0;
}
.color-step .segmented button { font-size: 11px; }
.swatches, .bg-swatches {
  display: grid;
  grid-template-columns: repeat(6, 40px);
  justify-content: space-between;
  gap: 8px 0;
}
.sw-chip, .bg-sw-chip {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: var(--line) dashed var(--ink);
  cursor: pointer;
  position: relative;
  padding: 0;
}
.sw-chip.mix {
  background: conic-gradient(from 0deg,
    #F8C8DC, #B8E0D2, #B8DCE6, #F5DC6B,
    #D5C7E8, #F5B7B1, #FFDDC1, #C9D8B6, #F8C8DC);
}
/* "+" chip: pick any colour with the system colour picker (the invisible input sits
   right on top of the chip so the tap opens it directly) */
.sw-chip.custom {
  background: conic-gradient(from 0deg, #FF8A8A, #FFD27A, #FFF07A, #9BE79B, #8AD7FF, #A9A2FF, #FF9BE0, #FF8A8A);
  font-family: 'Space Mono', monospace;
  font-size: 20px;
  color: var(--ink);
  padding-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sw-chip.custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
/* combo chips: a mini wallpaper (bg + its dot colours) drawn on a canvas */
.sw-chip.combo { overflow: hidden; }
.sw-chip.combo canvas { width: 100%; height: 100%; display: block; }
.sw-chip.random {
  background: conic-gradient(from 0deg,
    #F8C8DC, #B8E0D2, #B8DCE6, #F5DC6B,
    #D5C7E8, #F5B7B1, #FFDDC1, #C9D8B6, #F8C8DC);
  font-family: 'Space Mono', monospace;
  font-size: 18px;
  color: var(--ink);
  padding-top: 2px;
  border-style: solid;            /* an action, not a choice */
}
.sw-chip[aria-pressed="true"],
.bg-sw-chip[aria-pressed="true"] { border-style: solid; }
.sw-chip[aria-pressed="true"]::after,
.bg-sw-chip[aria-pressed="true"]::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  pointer-events: none;
}


/* === arriving from the menu ===
   The old page crossfades out (cross-document view transition where supported) while
   the pieces of this one drop, pop and slide into place one after another. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }

.logo-bar      { animation: drop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.refresh-btn   { animation: drop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.08s both; }
.preview-frame { animation: pop  0.5s  cubic-bezier(0.34, 1.56, 0.64, 1) 0.12s both; }
.control-panel { animation: rise 0.5s  cubic-bezier(0.22, 1, 0.36, 1) 0.18s both; }
.ratio-chip    { animation: pop  0.45s cubic-bezier(0.34, 1.56, 0.64, 1) calc(0.12s + var(--i) * 0.06s) both; }
/* every step plays a little entrance when it comes up (Jessie wanted the opening effect on
   each one, not just the first): rows rise in one after another, icon chips pop one by one
   like the Ratio frames. Steps are display:none when inactive, so this replays on every visit. */
.step.active > :not(.ratio-row):not(.pattern-row):not(.font-row) { animation: stepin 0.4s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i, 0) * 0.05s) both; }
.pattern-chip  { animation: pop  0.45s cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--i, 0) * 0.06s) both; }
@keyframes stepin { from { transform: translateY(10px); opacity: 0; } }
@keyframes drop { from { transform: translateY(-140%); opacity: 0; } }
@keyframes rise { from { transform: translateY(100%); } }
@keyframes pop  { from { transform: scale(0.85); opacity: 0; } }
/* the dashed frame "draws itself": ants crawl once around it when the page appears */
.preview-frame::after { animation: ants 1.4s linear 0.25s 1; }
@keyframes ants {
  from { background-position: 0 0, 0 100%, 0 0, 100% 0; }
  to   { background-position: 14px 0, -14px 100%, 0 -14px, 100% 14px; }
}
/* the first wallpaper pours in from the top, and the save hint pops */
.preview-frame.pour canvas { animation: pour 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes pour { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
.save-hint.show { animation: hintpop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes hintpop { from { transform: translateX(-50%) scale(0.6); } to { transform: translateX(-50%) scale(1); } }
/* the logo bar and the undo button lift the foot the pointer is on (Jessie: "一个脚往上提一点"):
   shell.js sets --tilt and the pivot from where the pointer is; translate/rotate are separate
   from the transform the entrance animation and :active use, so they don't fight */
.logo-bar, .refresh-btn {
  transition: translate 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), rotate 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.15s ease;
}
.logo-bar.lift, .refresh-btn.lift:not(:disabled) { translate: 0 -2px; rotate: var(--tilt, 0deg); }

/* picking something gives a little nudge (Jessie: "a bit of feedback, nothing dramatic"):
   the chosen chip / swatch / pill label bumps once, a slider knob grows while it is held */
.pattern-chip[aria-pressed="true"] .icon, .ratio-chip[aria-pressed="true"] .mini i,
.sw-chip[aria-pressed="true"], .segmented.choice button[aria-pressed="true"] > span { animation: bump 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes bump { 50% { transform: scale(1.1); } }
input[type="range"].slider::-webkit-slider-thumb { transition: transform 0.15s ease; }
input[type="range"].slider:active::-webkit-slider-thumb { transform: scale(1.15); }

@media (prefers-reduced-motion: reduce) {
  .logo-bar, .refresh-btn, .preview-frame, .control-panel, .ratio-chip, .preview-frame::after,
  .preview-frame.pour canvas, .save-hint.show, .step.active > *, .pattern-chip,
  .pattern-chip[aria-pressed="true"] .icon, .ratio-chip[aria-pressed="true"] .mini i,
  .sw-chip[aria-pressed="true"], .segmented.choice button[aria-pressed="true"] > span { animation: none; }
}

/* === desktop: phone-shaped window === */
@media (min-width: 720px) {
  /* on a computer the phone-width column sits on tiny polka dots, the same as the teacup on
     the home page (Jessie): grey #CDCDCD, faint white dots (Jessie: just a hint), every other row shifted half a step */
  html {
    background-color: #CDCDCD;
    background-image:
      radial-gradient(circle, rgba(255, 255, 255, 0.45) 1.6px, transparent 2.1px),
      radial-gradient(circle, rgba(255, 255, 255, 0.45) 1.6px, transparent 2.1px);
    background-size: 21.6px 32.4px;
    background-position: 0 0, 10.8px 16.2px;
  }
  body {
    max-width: 480px;
    margin: 0 auto;
    height: 100vh;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 30px 60px -10px rgba(0,0,0,0.3);
    overflow: hidden;
  }
}

/* ===== added for the other generators ===== */
@font-face {
  font-family: 'Jessie Hand';            /* Jessie's own handwriting, letters + digits only */
  src: url('jessie-hand.woff') format('woff');
  font-display: swap;
  unicode-range: U+0020, U+0030-0039, U+0041-005A, U+0061-007A;
}
/* a word to type (the "i love u" page) — dashed until it has been touched, like everything else */
.setting-row.text-row { height: 40px; }
.text-field {
  width: 100%;
  height: 40px;
  border: var(--line) dashed var(--ink);
  border-radius: 2px;
  background: var(--paper);
  font-family: 'Space Mono', monospace;
  font-size: 16px;
  letter-spacing: 1px;
  padding: 2px 12px 0;
  color: var(--ink);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.text-field.touched, .text-field:focus { border-style: solid; }
/* font chips: "Aa" set in that font, name below */
.font-row { display: flex; justify-content: space-between; gap: 6px; }
.font-chip { width: 54px; font-size: 11px; letter-spacing: 0; }
.font-chip .icon {
  width: 50px; height: 42px;
  font-size: 22px;
  line-height: 1;
  padding-top: 2px;
}
/* a locked font row shows just the one font that comes with the chosen look (crystal) */
.font-row.locked { justify-content: center; }
/* a locked Color step: the one combo, centred, with a note under it */
.swatches.locked { grid-template-columns: 40px; justify-content: center; }
.note {
  margin: 2px 0 0;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--ink);
  opacity: 0.6;
}
/* the Color tab bar can hold four tabs on some pages */
.color-step .segmented { width: min(100%, 300px); }

/* a "no colour" chip (the gradient page's optional third colour) */
.sw-chip.none {
  background: var(--paper);
  font-family: 'Space Mono', monospace;
  font-size: 18px;
  color: var(--ink);
  padding-top: 2px;
}
/* a label in front of a level bar (grain, background size / contrast) */
.switch-row .lbl {
  width: 76px;
  flex-shrink: 0;
  align-self: center;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
/* a whole step can be locked (the i love u Background step while crystal is on):
   its controls hide and one line says why */
.step .lock-note { display: none; }
.step.locked > :not(.lock-note) { display: none !important; }
.step.locked .lock-note { display: block; }
