/*
 * emojinize.com: one stylesheet for every page.
 *
 * The colours are the extension's own (popup.html, write.html, welcome.html in
 * emojinize-web-extension), so the site, the popup and the in-page card read
 * as one product. The look was chosen in the style explorer on 2026-11-03:
 * underlined tabs centred in the top bar, soft glows, solid amber main button,
 * round corners, system headings, the tour's floating emoji trio, samples
 * On top, no footer. The layout for wide screens was chosen in the layout
 * explorer the same day (see "wide screens" below); phones and windows under
 * 1,100px keep the sizes before it.
 */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1b1b1d;
  --muted: #63636b;
  --border: #e4e4e7;
  --edge: #cfcfd6;
  --sunken: #f2f2f4;
  --card: rgba(255, 255, 255, 0.8);
  --accent: #ffb020;
  /* Text on the amber: always ink, in both themes, like the tour's Next. */
  --accent-ink: #1b1b1d;
  --tint: #fff1cf;
  --tint-edge: #efc45e;
  --focus: #a86500;
  --ok: #2ea043;
  --bad: #d1242f;
  --warn: #d99b1c;
  --line: #8e8e96;
  --seg-on: #ffffff;
  /* The popup's size slider: its ticks and empty track, and its thumb. */
  --tick: #b6b6bd;
  --thumb: #ffffff;
  /* content.css's toggle highlight. */
  --hl: rgba(255, 176, 64, 0.22);
  --hl-hover: rgba(255, 176, 64, 0.42);
  --sel: rgba(96, 165, 250, 0.3);
  /* The emojis over emojinized words, as a share of the words' size; site.js
     fit() reads it too. Chosen in the size explorer: 115%. */
  --glyph-size: 1.15;
  --glow-amber: rgba(255, 176, 32, 0.22);
  --glow-pink: rgba(255, 122, 168, 0.16);
  --glow-sky: rgba(96, 165, 250, 0.16);
  --shadow: 0 18px 50px rgba(30, 30, 50, 0.08), 0 2px 8px rgba(30, 30, 50, 0.05);

  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --dw: 650;
  --dls: -0.02em;

  --r-btn: 999px;
  --r-card: 22px;
  --r-field: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #19191b;
    --fg: #f1f1f2;
    --muted: #a1a1a8;
    --border: #3a3a40;
    --edge: #4b4b53;
    --sunken: #2c2c31;
    --card: rgba(33, 33, 36, 0.8);
    --tint: #3b2f12;
    --tint-edge: #8a6a1e;
    --focus: #ffb020;
    --ok: #3fb950;
    --bad: #ff6b6b;
    --line: #75757d;
    --seg-on: #3a3a40;
    --tick: #5e5e66;
    --thumb: #f3f3f4;
    --hl: rgba(255, 176, 64, 0.2);
    --hl-hover: rgba(255, 176, 64, 0.38);
    --sel: rgba(96, 165, 250, 0.32);
    --glow-amber: rgba(255, 176, 32, 0.14);
    --glow-pink: rgba(255, 122, 168, 0.1);
    --glow-sky: rgba(96, 165, 250, 0.12);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--fg);
  font: 15px/1.55 var(--body);
  background:
    radial-gradient(38% 46% at 6% 0%, var(--glow-amber), transparent 70%),
    radial-gradient(34% 42% at 100% 10%, var(--glow-pink), transparent 70%),
    radial-gradient(46% 50% at 70% 104%, var(--glow-sky), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

/* The feedback form's field for bots: out of sight, out of the tab order. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

kbd {
  font: 600 12px/1 var(--body);
  padding: 3px 6px;
  border: 1px solid var(--edge);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--bg);
}

/* ---------- top bar: logo left, tabs centred, store link right ---------- */

.snav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  /* Bottom-aligned, so the open tab's underline lands on the bar's border;
     the bottom paddings below put all three on one centre line. */
  align-items: end;
  gap: 16px;
  padding: 16px max(32px, env(safe-area-inset-right, 0px)) 0 max(32px, env(safe-area-inset-left, 0px));
  border-bottom: 1px solid var(--border);
}

.slogo {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 18px;
  font: var(--dw) 19px/1 var(--body);
  letter-spacing: var(--dls);
  text-decoration: none;
  color: var(--fg);
}

.slogo img {
  display: block;
}

.links {
  justify-self: center;
  display: flex;
  justify-content: center;
  min-width: 0;
}

/* The tab's underline sits on the bar's bottom border. */
.links a {
  margin: 0 14px;
  padding: 10px 2px 19px;
  color: var(--muted);
  font-weight: 550;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 -2px 0 transparent;
}

.links a:hover,
.links a[aria-current="page"] {
  color: var(--fg);
}

.links a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.storelink {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 2px 19px;
  color: var(--muted);
  font-weight: 550;
  font-size: 14.5px;
  text-decoration: none;
  white-space: nowrap;
}

.storelink:hover {
  color: var(--fg);
}

.storelink svg {
  flex: none;
  opacity: 0.8;
}

/* ---------- page shell ---------- */

.pg {
  flex: 1;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding-block: 48px 72px;
  padding-left: max(32px, env(safe-area-inset-left, 0px));
  padding-right: max(32px, env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.scard {
  --pad-y: 26px;
  padding: var(--pad-y) 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.disp {
  margin: 0;
  font: var(--dw) 46px/1.08 var(--body);
  letter-spacing: var(--dls);
  text-wrap: balance;
}

.disp.sm {
  font-size: 34px;
  line-height: 1.15;
}

.lede {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 17.5px;
  line-height: 1.55;
  text-wrap: pretty;
}

.cap {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.note {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  text-wrap: pretty;
}

.note.bad {
  color: var(--bad);
}

.note:empty,
#turnstile:empty,
#check:empty {
  display: none;
}

/* Turnstile with nothing to show: drawn (so its check still runs) but out of
   the card's flow, so the card's gap leaves no empty band. It comes back in
   once it has a height, when it needs a click (write.js, feedback.js). */
#turnstile.idle,
#check.idle {
  position: absolute;
}

.label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.optnote {
  font-weight: 450;
  letter-spacing: 0;
  text-transform: none;
}

.ctl {
  font-weight: 650;
  color: var(--fg);
}

.inl {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--tint-edge);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* A page's title, centred over what it holds (Write, Feedback, Privacy). */
.whead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-inline: auto;
  text-align: center;
}

.whead .lede {
  max-width: none;
  text-wrap: balance;
}

/* The tour's three emoji, each bobbing on its own beat. */
.deco {
  display: flex;
  gap: 16px;
  font: 34px/1 var(--emoji);
  user-select: none;
}

.deco span {
  --lean: -4deg;
  --lift: -6px;
  display: inline-block;
  animation: float 5s ease-in-out infinite;
}

.deco span:nth-child(2) {
  --lean: 3deg;
  --lift: -8px;
  animation-duration: 5.8s;
  animation-delay: -1.6s;
}

.deco span:nth-child(3) {
  --lean: -2deg;
  --lift: -5px;
  animation-duration: 4.6s;
  animation-delay: -3.1s;
}

@keyframes float {
  50% {
    transform: translateY(var(--lift)) rotate(var(--lean));
  }
}

/* ---------- buttons ---------- */

.sbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--edge);
  border-radius: var(--r-btn);
  background: var(--bg);
  color: var(--fg);
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.06s ease, filter 0.12s ease;
}

.sbtn:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--sunken);
}

.sbtn:active:not(:disabled):not([aria-disabled="true"]) {
  transform: translateY(0.5px);
}

.sbtn:disabled,
.sbtn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
}

.sbtn.lg {
  min-height: 52px;
  padding: 0 26px;
  font-size: 16px;
}

.sbtn.sm {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.sbtn.ghost {
  background: transparent;
}

.sbtn.link {
  padding-inline: 8px;
  border-color: transparent;
  background: transparent;
}

.sbtn.link:hover:not(:disabled) {
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.sbtn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.sbtn.primary:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--accent);
  filter: brightness(1.06);
}

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: var(--r-btn);
  background: var(--sunken);
}

.seg button {
  padding: 7px 12px;
  border: 0;
  border-radius: var(--r-btn);
  background: none;
  color: var(--muted);
  font-weight: 550;
  font-size: 12.5px;
  line-height: 1;
  cursor: pointer;
}

.seg button[aria-checked="true"] {
  background: var(--seg-on);
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
}

/* ---------- annotated text: On top and Toggle, as content.css draws them ---------- */

.an {
  margin: 0;
  overflow-wrap: break-word;
}

/* A phrase is an inline-block, so its row is placed from its own box: as an
   inline, Chrome can start it at the end of the line above, and its row
   lands off its words. site.js glue() keeps the comma after it on its line
   (.nb), which an inline-block alone would let go to the next. */
.an .nb {
  white-space: nowrap;
}

.an .w {
  --mark: var(--hl);
  position: relative;
  display: inline-block;
  line-height: 1.2;
  white-space: nowrap;
  /* Every marked word or phrase is tinted, in both modes, as content.css
     tints it in the page: a background plus same-colour shadows 0.09em above
     and below and only 0.03em to the sides, so a phrase reads as one and two
     neighbouring spans stay apart. */
  border-radius: 3px;
  background: var(--mark);
  box-shadow: 0 0.09em 0 0.03em var(--mark), 0 -0.09em 0 0.03em var(--mark);
}

/* With JavaScript, the tint arrives with the word's emoji. */
.js .an .w {
  --mark: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  transition-delay: calc(min(var(--i, 0), 16) * 60ms);
}

.js .an.on .w,
.js .an .w.got {
  --mark: var(--hl);
}

/* While site.js fit() sizes the rows: a new size shows at once. Not while a
   carousel language's emojis are landing (carousel.js .lc-landing): taking
   their transitions off cancels the ones still waiting, and every emoji not
   yet landed showed at once (a font arriving late on a first visit). */
.an.refit:not(.lc-landing .an) .w:not(.landing) .g {
  transition: none !important;
}

/* A streamed emoji landing (site.js lander, the writer): its box grows to
   its row as it lands, and the words after it slide along rather than jump.
   A refit spares it (above), so it is never cut short. */
.js .an .w.landing {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding-inline 0.3s ease;
}

/* --dx: how far site.js fit() slid the row off its words' centre.
   A row of emojis is always laid out left to right, as the model wrote it:
   inside right-to-left text (Arabic) it would otherwise come out reversed,
   and 🥶➡️🔥😊 ("warmed up") would read 😊🔥➡️🥶. */
.an .g {
  direction: ltr;
  unicode-bidi: isolate;
  position: absolute;
  left: calc(50% + var(--dx, 0px));
  font-family: var(--emoji);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

/* Room above each line: the words' box (1.2em), the row of emojis, and
   0.38em of air between the row and the line above. A line's box holds its
   words with half of that room above them and half below (--half); the
   first line's row stands higher than its half (--over). */
.an[data-mode="ontop"] {
  --lh: max(2.4em, calc(1.62em + var(--glyph-size) * 1em));
  --half: calc((var(--lh) - 1.2em) / 2);
  --over: max(0px, calc(var(--glyph-size) * 1em + 0.04em - var(--half)));
  line-height: var(--lh);
}

/* Centred in its box, as plain text is: with the row standing out of the
   first line's box and the room under the last line empty, text with emojis
   sat high in every box (the tour's story: 7px over the first row, 34px under
   the last line). The first block makes room for its row, the last gives its
   empty room back. Home's paragraphs start under the title, not at the top of
   the card. The writer's result is the text's own box. */
.an[data-mode="ontop"]:first-child {
  margin-top: var(--over);
}

.an[data-mode="ontop"]:last-child {
  margin-bottom: calc(-1 * var(--half));
}

.demo-body > .an[data-mode="ontop"]:first-child {
  margin-top: 0;
}

.result.an[data-mode="ontop"] {
  margin: 0;
  padding-top: calc(4px + var(--over));
}

/* --fit: the size site.js fit() gives the rows of a line, so neighbours keep
   apart; drawn smaller about the row's foot. */
.an[data-mode="ontop"] .g {
  bottom: calc(100% + 0.04em);
  font-size: calc(var(--glyph-size) * 1em);
  transform: translate(-50%, 0) scale(var(--fit, 1));
  transform-origin: 50% 100%;
}

/* Emojis land one after another when the page has JavaScript to run the
   landing; without it they are simply there. */
.js .an[data-mode="ontop"] .g {
  opacity: 0;
  transform: translate(-50%, 0.45em) scale(0.45);
  transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.2, 1.5, 0.35, 1);
  transition-delay: calc(min(var(--i, 0), 16) * 60ms);
}

.js .an[data-mode="ontop"].on .g,
.js .an[data-mode="ontop"] .w.got .g {
  opacity: 1;
  transform: translate(-50%, 0) scale(var(--fit, 1));
}

.an[data-mode="toggle"] {
  line-height: 1.8;
}

.an[data-mode="toggle"] .w {
  cursor: pointer;
}

.an[data-mode="toggle"] .w:hover {
  --mark: var(--hl-hover) !important;
  transition-delay: 0s;
}

/* Over the words at the emojis' size, between 1em and 1.25em; a glyph wider
   than its words is drawn smaller (--fit), so it covers them and not their
   neighbours (in [data-room], the box is padded to fit it). */
.an[data-mode="toggle"] .g {
  top: 50%;
  font-size: clamp(1em, var(--glyph-size) * 1em, 1.25em);
  opacity: 0;
  transform: translate(-50%, -50%) scale(var(--fit, 1));
}

.an[data-mode="toggle"] .w:hover .g,
.an[data-mode="toggle"] .w.show .g {
  opacity: 1;
}

.an[data-mode="toggle"] .w:hover .t,
.an[data-mode="toggle"] .w.show .t {
  color: transparent;
}

/* ---------- home ---------- */

.pg-home {
  justify-content: center;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.act {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.inst-big {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: var(--r-btn);
  background: var(--sunken);
  font-weight: 600;
}

.inst-big svg {
  flex: none;
  color: var(--ok);
}

.demo {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.demo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.demo-head .label {
  margin-right: auto;
}

/* Home's sample in six languages (carousel.js): the language tabs, then one
   layer per language, stacked in one cell so the card keeps the height of
   the longest and the page never jumps. Without JavaScript, only English. */
.lc-bar {
  container-type: inline-size;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lc-tabs {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-btn);
  background: var(--sunken);
}

.lc-tabs button {
  position: relative;
  flex: auto;
  padding: 7px 10px;
  border: 0;
  border-radius: var(--r-btn);
  background: none;
  color: var(--muted);
  font-weight: 550;
  font-size: 13px;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
}

.lc-tabs button:hover {
  color: var(--fg);
}

.lc-tabs button[aria-selected="true"] {
  background: var(--seg-on);
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
}

/* The active tab fills like a timer while the languages rotate. */
.lc-fill {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

.lc.lc-run [aria-selected="true"] .lc-fill {
  animation: lc-fill var(--lc-dur) linear forwards;
}

@keyframes lc-fill {
  to {
    transform: scaleX(1);
  }
}

/* Where the six don't fit on one row (phones, and the hero's narrow column
   from 760 to 1,100px): two rows of three. */
@container (max-width: 480px) {
  .lc-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 16px;
  }

  .lc-tabs button {
    padding-inline: 4px;
  }
}

.lc-pause {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
}

.lc-pause:hover {
  border-color: var(--edge);
  color: var(--fg);
}

.lc-i-play,
.lc.lc-held .lc-i-pause {
  display: none;
}

.lc.lc-held .lc-i-play {
  display: block;
}

html:not(.js) .lc-bar,
html:not(.js) .lc-layer:not(:first-child) {
  display: none;
}

/* Room between the tabs and the emojis over the title's words. */
.lc-stage {
  display: grid;
  /* As much room over the title's emojis, under the tabs (the card's gap
     between them is 14px), as the card leaves under the last line. */
  margin-top: max(0px, calc(var(--pad-y, 26px) - 13px));
}

.lc-layer {
  grid-area: 1 / 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Hidden layers keep their layout (site.js fits their rows, carousel.js
   orders them). The next one fades in a beat after the last fades out. */
.js .lc-layer {
  transition: opacity 0.32s ease, visibility 0s linear 0.32s;
}

.js .lc-layer:not(.lc-cur) {
  opacity: 0;
  visibility: hidden;
}

.js .lc-layer.lc-cur {
  transition: opacity 0.32s ease 0.12s, visibility 0s;
}

.lc-layer[lang="ar"] .story-t,
.lc-layer[lang="hi"] .story-t {
  letter-spacing: 0;
}

/* Each emoji lands --lc-per after the one before it, with no cap, in the
   order carousel.js gives (--i). */
.js .lc .an .w,
.js .lc .an[data-mode="ontop"] .g {
  transition-delay: calc(var(--i, 0) * var(--lc-per, 70ms));
}

.lc-snap,
.lc-snap * {
  transition: none !important;
  animation: none !important;
}

.demo-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-body p.an {
  font-size: 17.5px;
}

.story-t {
  font: var(--dw) 24px/1.2 var(--body);
  letter-spacing: var(--dls);
}

/* ---------- write ---------- */

.wcard {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
}

.rhead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 34px;
}

.copies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.copies svg {
  flex: none;
}

.field {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--edge);
  border-radius: var(--r-field);
  background: var(--bg);
  color: var(--fg);
  font: 15.5px/1.55 var(--body);
}

.field::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

textarea.field {
  min-height: 160px;
  resize: vertical;
}

.result {
  min-height: 160px;
  padding: 4px 2px;
  font-size: 18.5px;
  white-space: pre-wrap;
}

.wrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.count {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.count.over {
  color: var(--bad);
}

/* ---------- tour ---------- */

.trail {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.tmain {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-field);
  background: none;
  color: var(--muted);
  font-weight: 550;
  font-size: 14px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.rail button:hover {
  color: var(--fg);
}

.rail button[aria-current="step"] {
  background: var(--sunken);
  color: var(--fg);
}

.rail .n {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border: 1px solid var(--edge);
  border-radius: 50%;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.rail .done .n {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

/* As tall as its step: a short step (the writer's) left a band of empty card
   under its last line. */
.tcard {
  display: flex;
  flex-direction: column;
}

.step-c {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

/* A step's intro is one or two sentences: a wide card keeps a short one on
   one line, and wraps a long one before its lines get too long to read. The
   extension's tour has the same (.copy p, below). */
.step-c .lede {
  max-width: 100ch;
}

.step-c h1:focus {
  outline: none;
}

/* The tour's samples land as Home's carousel does: each emoji 70 ms after
   the one before it, in reading order (tour.js, site.js order()), no cap. */
.js .tcard .an[data-mode="ontop"] .w,
.js .tcard .an[data-mode="ontop"] .g {
  transition-delay: calc(var(--i, 0) * 70ms);
}

.choice {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 520px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  background: var(--bg);
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
}

.tile:hover {
  background: var(--sunken);
}

.tile .e {
  font: 30px/1 var(--emoji);
}

.tile[aria-checked="true"],
.tile:has(input:checked) {
  border-color: var(--tint-edge);
  background: var(--tint);
}

.tile input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.tile:has(input:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.howlist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.howlist img {
  vertical-align: -3px;
}

.story {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-field);
  background: var(--bg);
}

/* The same size plain (the preview's Revert, the words to select) as with
   emojis. */
.story p {
  margin: 0;
  font-size: 16.5px;
}

/* Plain, the title needs no room above it for emojis. */
.story h3.story-t:not(.an) {
  margin-top: 0;
}

.sel {
  border-radius: 2px;
  background: var(--sel);
  color: inherit;
  transition: background-color 0.4s ease;
}

.sel.off {
  background: transparent;
}

.keys {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.keys div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.keys .combo {
  display: inline-flex;
  gap: 4px;
  min-width: 150px;
}

.tnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.dots i {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: var(--edge);
  transition: width 0.2s ease;
}

.dots i.cur {
  width: 20px;
  background: var(--accent);
}

/* ---------- the tour preview's stand-ins (tour.js, without the extension) ----------
   What the extension draws, so each step can be tried here: the Emojinize
   menu (popup.html), the selection button and the result card (ui.js), in
   their colours and sizes. */

/* Over each stand-in: a simulation, and what of (tour.js sim). */
.sim {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.sim-t {
  padding: 2px 9px;
  border: 1px dashed var(--tint-edge);
  border-radius: 999px;
  background: var(--tint);
  color: var(--fg);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* The first step's advice: add the extension first, or keep going. */
.getit {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 640px;
  padding: 18px 20px;
  border: 1px solid var(--tint-edge);
  border-radius: var(--r-card);
  background: var(--tint);
}

.getit p {
  margin: 0;
}

.getit .getit-t {
  font-weight: 650;
  font-size: 16.5px;
}

.getit .cta {
  margin-top: 6px;
}

/* An icon named in the copy, in a small box, as the extension's tour draws it. */
.pv-ico {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 22px;
  margin: 0 1px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--fg);
  vertical-align: -5px;
}

.pv-ico svg,
.pv-ico img {
  display: block;
}

.pv-ico img[height="20"] {
  width: 19px;
  height: 16px;
}

/* The preview's pin step: "You have not installed the extension yet", the
   word a link to the store. */
.chip a {
  color: var(--fg);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--tint-edge);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* A menu beside what it works on; on a phone, above it. */
.pv-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 18px;
  align-items: start;
  width: 100%;
}

.pv-demo > .pm {
  grid-column: 2;
  grid-row: 1;
}

.pv-demo > :not(.pm) {
  grid-column: 1;
  grid-row: 1;
}

.step-c {
  container-type: inline-size;
}

@container (max-width: 720px) {
  .pv-demo {
    grid-template-columns: minmax(0, 1fr);
  }

  .pv-demo > .pm,
  .pv-demo > :not(.pm) {
    grid-column: 1;
    grid-row: auto;
  }

  .pv-demo > .pm {
    width: 100%;
    max-width: 320px;
  }
}

/* The Emojinize menu, as popup.html draws it. */
.pm {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.45;
}

.pm-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.pm-brand img {
  display: block;
}

.pm-brand b {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.pm-act {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 0 12px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--bg);
  font-weight: 600;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.pm-act:hover {
  background: var(--sunken);
}

.pm-act.primary {
  border-color: var(--tint-edge);
  background: var(--tint);
}

.pm-act.primary:hover {
  background: color-mix(in srgb, var(--tint) 75%, var(--accent));
}

.pm-act .em {
  flex: none;
  width: 26px;
  font: 22px/1 var(--emoji);
  text-align: center;
}

.pm-act .em svg {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0 auto;
  color: var(--muted);
}

.pm-act .lab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.25;
}

.pm .sub {
  display: block;
  font-size: 11px;
  font-weight: 450;
  color: var(--muted);
}

.pm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pm-row .nm {
  font-weight: 550;
}

.pm-sw {
  position: relative;
  flex: none;
  width: 36px;
  height: 21px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: var(--edge);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.pm-sw::after {
  content: "";
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.pm-sw[aria-checked="true"] {
  background: var(--accent);
}

.pm-sw[aria-checked="true"]::after {
  transform: translateX(15px);
}

/* The popup's Display settings, open: its heading, then its grey panel
   (popup.html #disclose, #settings). */
.pm-open {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-weight: 550;
  font-size: 13px;
}

.pm-open svg {
  color: var(--muted);
}

.pm-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 -16px -14px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 14px 14px;
  background: var(--sunken);
}

.pm-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* The size slider, as popup.html draws it: the same fox small at one end
   and large at the other, the track amber up to the thumb (--fill, set by
   tour.js), and a tick under each of the five stops. */
.pv-sl {
  display: flex;
  align-items: center;
  gap: 9px;
}

.pv-sl .face {
  flex: none;
  font-family: var(--emoji);
  line-height: 1;
}

.pv-sl .face.small {
  font-size: 15px;
}

.pv-sl .face.large {
  font-size: 23px;
}

.pv-sl .tr {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 24px;
}

.pv-sl input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.pv-sl input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--accent) var(--fill, 50%), var(--tick) var(--fill, 50%));
}

.pv-sl input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--thumb);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Firefox draws the same with its own parts. */
.pv-sl input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--tick);
}

.pv-sl input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
}

.pv-sl input[type="range"]::-moz-range-thumb {
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--thumb);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pv-sl .ticks {
  position: absolute;
  left: 7px;
  right: 7px;
  top: 19px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.pv-sl .ticks i {
  display: block;
  width: 2px;
  height: 5px;
  border-radius: 1px;
  background: var(--tick);
}

/* The popup's two-way switch: the chosen side filled amber. */
.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  background: var(--bg);
}

.segmented button {
  flex: 1;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.segmented button[aria-checked="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}

.segmented button:hover:not([aria-checked="true"]) {
  color: var(--fg);
}

/* The story to select in, with the selection button and the card over it. */
.pv-pick {
  position: relative;
  width: 100%;
}

.pv-pick .story ::selection {
  background: rgba(96, 165, 250, 0.35);
}

/* ui.js's bubble: the mark alone, a ring in the logo's yellow. */
.pv-bubble {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4.5px;
  border: 1.5px solid #e3ac2a;
  border-radius: 9px;
  background: var(--bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.17), 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: border-color 0.12s, background-color 0.12s, box-shadow 0.12s;
}

.pv-bubble:hover {
  border-color: #d59300;
  background: #fffaf0;
  box-shadow: 0 0 0 3px rgba(251, 196, 51, 0.22), 0 10px 30px rgba(0, 0, 0, 0.17);
}

.pv-bubble img {
  display: block;
}

/* ui.js's result card. */
.pv-card {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  width: max-content;
  max-width: min(440px, 100%);
  padding: 11px 14px 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.17), 0 2px 6px rgba(0, 0, 0, 0.1);
}

.pv-card[hidden] {
  display: none;
}

.pv-card:focus {
  outline: none;
}

.pv-card-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.pv-card-t {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pv-card-t img {
  display: block;
}

.pv-x {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.pv-x:hover {
  color: var(--fg);
}

.pv-card .an {
  margin: 0;
  font-size: 15.5px;
}

.pv-card .none {
  max-width: 320px;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

@media (prefers-color-scheme: dark) {
  .pv-bubble {
    border-color: #d9a82e;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35);
  }

  .pv-bubble:hover {
    border-color: #f0c04a;
    background: #2b2820;
    box-shadow: 0 0 0 3px rgba(251, 196, 51, 0.18), 0 10px 30px rgba(0, 0, 0, 0.55);
  }

  .pv-card {
    background: #212124;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35);
  }
}

/* ---------- feedback ---------- */

.pg-feedback .scard,
.pg-feedback .whead {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
}

.fcard {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fcard fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.fcard legend {
  margin-bottom: 10px;
  padding: 0;
}

.fld {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ftiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}

.ftiles .tile {
  padding: 14px 10px;
  font-size: 13.5px;
}

.ftiles .tile .e {
  font-size: 24px;
}

/* Send, on the right; what is missing, or how sending went, on its left in
   the same row, so the card never grows under the button. */
.fcard .wrow {
  justify-content: flex-end;
}

.fcard .wrow .note {
  flex: 1;
  min-width: 0;
}

/* A field that must be filled in. */
.req {
  color: var(--bad);
  font-weight: 700;
  letter-spacing: 0;
}

.thanks {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

/* ---------- privacy ---------- */

.pg-privacy .whead,
.policy {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
}

.policy {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.policy section > :last-child {
  margin-bottom: 0;
}

.policy h2 {
  margin: 0 0 8px;
  font: var(--dw) 21px/1.25 var(--body);
  letter-spacing: var(--dls);
}

.policy p {
  margin: 0 0 10px;
  text-wrap: pretty;
}

.policy ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 4px 0 12px;
  padding-left: 20px;
}

.mail {
  font-weight: 600;
  user-select: all;
}

/* ---------- what the extension draws here (Write and Tour with it installed) ----------
   The extension runs the writer and the tour on this site itself
   (emojinize-web-extension write.js and welcome.js) and builds their markup;
   these are the classes it uses, in this site's look. The tour's rules start
   html[data-emojinize-tour="host"]: the site's own preview builds into the
   same #step with some of the same classes (.story, .seg, .keys), and must
   not take the extension's serif story or its tiles. */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 5px 13px 5px 10px;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--muted);
  font-size: 13px;
}

.chip i {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}

.chip[data-state="waking"] i {
  background: var(--warn);
  animation: pulse 1.2s ease-in-out infinite;
}

.chip[data-state="down"] i {
  background: var(--bad);
}

.chip[data-ok="true"] {
  color: var(--fg);
}

.chip[data-ok="true"] i {
  background: var(--ok);
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.caps {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  vertical-align: baseline;
}

.caps .plus {
  color: var(--muted);
  font-size: 11px;
}

#keys {
  color: var(--muted);
  font-size: 12.5px;
}

.count[data-full="true"] {
  color: var(--fg);
  font-weight: 600;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

#back[data-gone="true"],
#next[data-gone="true"] {
  visibility: hidden;
}

.dots i[data-on="true"] {
  width: 20px;
  background: var(--accent);
}

.dots i[data-done="true"] {
  background: var(--line);
}

/* The tour's step, as welcome.js builds it: on the page, not in a card, its
   own cards inside. */
html[data-emojinize-tour="host"] #step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  min-height: 420px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-emojinize-tour="host"] #step .copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

html[data-emojinize-tour="host"] #step .copy h1 {
  margin: 0;
  font: var(--dw) 34px/1.15 var(--body);
  letter-spacing: var(--dls);
  text-wrap: balance;
}

html[data-emojinize-tour="host"] #step .copy h1:focus {
  outline: none;
}

html[data-emojinize-tour="host"] #step .copy p {
  margin: 0;
  max-width: 100ch;
  color: var(--muted);
  font-size: 17px;
  text-wrap: pretty;
}

html[data-emojinize-tour="host"] #step .card {
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

html[data-emojinize-tour="host"] #step .note {
  font-size: 14.5px;
}

html[data-emojinize-tour="host"] #step .note strong,
html[data-emojinize-tour="host"] #step .note a {
  color: var(--fg);
  font-weight: 600;
}

html[data-emojinize-tour="host"] #step .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* A control in the Emojinize menu, named in the copy, drawn like one. */
html[data-emojinize-tour="host"] #step .ctl {
  display: inline-block;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--card);
  color: var(--fg);
  font-size: 0.92em;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
}

/* A toolbar icon, drawn inline where the copy names it. */
html[data-emojinize-tour="host"] #step .ico {
  display: inline-block;
  overflow: hidden;
  width: 24px;
  height: 22px;
  margin: 0 1px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--fg);
  line-height: 20px;
  text-align: center;
  vertical-align: -6px;
}

html[data-emojinize-tour="host"] #step .ico svg,
html[data-emojinize-tour="host"] #step .ico img {
  display: inline-block;
  vertical-align: middle;
}

html[data-emojinize-tour="host"] #step .link {
  padding: 2px;
  border: 0;
  background: none;
  color: var(--fg);
  font-size: inherit;
  text-decoration: underline;
  text-decoration-color: var(--tint-edge);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}

html[data-emojinize-tour="host"] #step .btn {
  min-height: 40px;
  padding: 0 20px;
  border: 1px solid var(--edge);
  border-radius: var(--r-btn);
  background: var(--bg);
  color: var(--fg);
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
}

html[data-emojinize-tour="host"] #step .btn:hover {
  background: var(--sunken);
}

/* The Automatic choice: two tiles, the chosen one amber with a tick. */
html[data-emojinize-tour="host"] #step .choice {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

html[data-emojinize-tour="host"] #step .choice .lead {
  align-self: center;
  font-size: 19px;
  font-weight: 600;
  text-align: center;
}

html[data-emojinize-tour="host"] #step .choice .note {
  text-align: center;
}

html[data-emojinize-tour="host"] #step .seg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 0;
  border-radius: 0;
  background: none;
}

html[data-emojinize-tour="host"] #step .seg button.option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: none;
  color: var(--fg);
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

html[data-emojinize-tour="host"] #step .option:hover {
  border-color: var(--line);
}

html[data-emojinize-tour="host"] #step .option .emoji {
  font: 34px/1 var(--emoji);
}

html[data-emojinize-tour="host"] #step .option .text {
  max-width: 100%;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
}

html[data-emojinize-tour="host"] #step .option .tick {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
}

html[data-emojinize-tour="host"] #step .seg button.option[aria-checked="true"] {
  border-color: var(--accent);
  background: var(--tint);
  box-shadow: 0 0 0 3px var(--glow-amber);
}

html[data-emojinize-tour="host"] #step .option[aria-checked="true"] .tick {
  border-color: var(--accent);
  background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b1b1d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center / 13px no-repeat;
}

/* With emojis on top, the first line's row stands in the card's top padding
   and the room under the last line stays empty: the story sat high (11px over
   the first row, 37px under the last line). While the card holds emojis, its
   padding moves from under the text to over it (the extension adds room over
   the first line only as far as the padding lacks it, so the top takes the
   row's height and the even gap); plain or in Toggle, it is even again. */
html[data-emojinize-tour="host"][data-emojinize-mode="ontop"] #step .story:has([data-emojinize="wrapper"]) {
  padding-top: 47px;
  padding-bottom: 10px;
}

/* The welcome step's one sentence: no room is left under a single line, so
   less moves (it sat 8px under the card's top and 27px over its bottom). */
html[data-emojinize-tour="host"][data-emojinize-mode="ontop"] #step .card:has(> .hero-sample [data-emojinize="wrapper"]) {
  padding-top: 36px;
  padding-bottom: 12px;
}

/* The sample story, in the serif the tour sets it in. */
html[data-emojinize-tour="host"] #step .story {
  display: block;
}

html[data-emojinize-tour="host"] #step .story h2 {
  margin: 0 0 10px;
  font: 600 24px/1.3 Georgia, "Times New Roman", serif;
}

html[data-emojinize-tour="host"] #step .story p,
html[data-emojinize-tour="host"] #step .hero-sample {
  margin: 0;
  font: 18px/1.65 Georgia, "Times New Roman", serif;
}

html[data-emojinize-tour="host"] #step .story p + p {
  margin-top: 12px;
}

html[data-emojinize-tour="host"] #step .story ::selection,
html[data-emojinize-tour="host"] #step .hero-sample ::selection {
  background: rgba(96, 165, 250, 0.35);
}

html[data-emojinize-tour="host"] #step .steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
}

html[data-emojinize-tour="host"] #step .steps li {
  display: flex;
  align-items: center;
  gap: 12px;
}

html[data-emojinize-tour="host"] #step .steps li::before {
  content: counter(s);
  counter-increment: s;
  display: grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sunken);
  font-size: 13px;
  font-weight: 600;
}

html[data-emojinize-tour="host"] #step .keys {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

html[data-emojinize-tour="host"] #step .key {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
}

html[data-emojinize-tour="host"] #step kbd {
  min-width: 26px;
  padding: 2px 8px;
  font: 600 13px/1.35 var(--body);
  text-align: center;
  background: var(--sunken);
}

/* ---------- wide screens: the layout chosen on 2026-11-03 ----------
   From 1,100px: a page up to 1,360px with type about 15% bigger, a large
   top bar lined up with the page's edges, and the writer, the feedback form
   and the policy across the page ("Large" page and top bar in the size
   explorer, after the first, bigger version). Narrower windows keep the
   sizes above. */

@media (min-width: 1100px) {
  :root {
    --pgw: 1360px;
    --gut: 32px;
  }

  body {
    font-size: 16px;
  }

  .snav {
    column-gap: 24px;
    padding: 20px calc(max(0px, (100% - var(--pgw)) / 2) + var(--gut)) 0;
  }

  .slogo {
    gap: 11px;
    padding-bottom: 21px;
    font-size: 23px;
  }

  .slogo img {
    width: 38px;
    height: 32px;
  }

  .links a {
    margin: 0 17px;
    padding: 12px 2px 24px;
    font-size: 16.5px;
  }

  .storelink {
    gap: 7px;
    padding-bottom: 24px;
    font-size: 16px;
  }

  .storelink svg {
    width: 14px;
    height: 14px;
  }

  .pg {
    max-width: var(--pgw);
    padding-block: 56px 88px;
    padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
    padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
    gap: 30px;
  }

  .disp {
    font-size: 54px;
  }

  .disp.sm {
    font-size: 40px;
  }

  .lede {
    max-width: 60ch;
    font-size: 18.5px;
  }

  .scard {
    --pad-y: 32px;
    padding: var(--pad-y) 36px;
  }

  .deco {
    gap: 18px;
    font-size: 38px;
  }

  .cap {
    font-size: 14px;
  }

  .note {
    font-size: 14px;
  }

  .label {
    font-size: 12.5px;
  }

  .sbtn {
    min-height: 44px;
    padding: 0 22px;
    font-size: 15px;
  }

  .sbtn.lg {
    min-height: 54px;
    padding: 0 30px;
    font-size: 17px;
  }

  .sbtn.sm {
    min-height: 35px;
    padding: 0 15px;
    font-size: 13.5px;
  }

  .seg button {
    padding: 8px 14px;
    font-size: 13px;
  }

  .lc-tabs button {
    padding-block: 8px;
    font-size: 13.5px;
  }

  .demo-body p.an,
  .story p {
    font-size: 19px;
  }

  .story-t {
    font-size: 27.5px;
  }

  .field {
    padding: 14px 18px;
    font-size: 16.5px;
  }

  .result {
    font-size: 20px;
  }

  .tile {
    font-size: 15px;
  }

  .tile .e {
    font-size: 32px;
  }

  .rail button {
    padding: 10px 12px;
    font-size: 15px;
  }

  /* Write: the box across the page. */
  .wcard {
    max-width: none;
  }

  .pg-write .field,
  .pg-write .result {
    min-height: 280px;
  }

  /* Feedback: the form across the page, the four topics on one row. */
  .pg-feedback .scard {
    max-width: none;
  }

  .ftiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  .ftiles .tile {
    padding: 18px 12px;
    font-size: 15px;
  }

  .ftiles .tile .e {
    font-size: 30px;
  }

  #msg {
    min-height: 190px;
  }

  /* Privacy: the policy in two columns. */
  .policy {
    display: block;
    max-width: none;
    columns: 2;
    column-gap: 72px;
  }

  .policy section {
    break-inside: avoid;
    margin-bottom: 32px;
  }

  .policy section:last-child {
    margin-bottom: 0;
  }

  .policy h2 {
    font-size: 23px;
  }

  /* The tour as the extension runs it, at the preview's sizes. */
  html[data-emojinize-tour="host"] #step .copy h1 {
    font-size: 40px;
  }

  html[data-emojinize-tour="host"] #step .copy p {
    font-size: 18.5px;
  }
}

/* ---------- narrow screens ---------- */

@media (max-width: 760px) {
  .snav {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    row-gap: 4px;
    padding-top: 12px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

  .slogo,
  .storelink {
    padding-block: 6px;
  }

  .links {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: end;
    justify-self: stretch;
    justify-content: safe center;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .links a {
    margin: 0 9px;
    padding: 8px 2px 12px;
    font-size: 14.5px;
  }

  .pg {
    padding-block: 28px 48px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    gap: 20px;
  }

  .hero,
  .trail {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .disp {
    font-size: 36px;
  }

  .disp.sm {
    font-size: 28px;
  }

  .lede {
    font-size: 16px;
  }

  .scard {
    --pad-y: 18px;
    padding: var(--pad-y);
  }

  .rail {
    flex-direction: row;
    overflow-x: auto;
  }

  .rail button {
    width: auto;
  }

  .rail .t {
    display: none;
  }

  .copies {
    margin-left: 0;
  }
}

/* The five links fit side by side down to 320px (a small phone); narrower
   still, the bar scrolls and site.js keeps the current page's link in view. */
@media (max-width: 360px) {
  .links a {
    margin: 0 4px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .deco span {
    animation: none;
  }

  .js .an .g,
  .js .an .w,
  .dots i {
    transition: none !important;
  }
}
