@font-face {
  font-family: "Ink Condensed";
  src: local("Arial Narrow Bold"), local("Arial Narrow");
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f0f0eb;
  --paper-raised: #e5e6df;
  --ink: #20231f;
  --ink-soft: #63675f;
  --rule: #9a9d94;
  --accent: #234f3b;
  --accent-contrast: #f4f3eb;
  --miss: #973c30;
  --focus: #155b83;
  --page-pad: clamp(.75rem, 2.2vw, 2rem);
  --display: "Ink Condensed", "Arial Narrow", Impact, Haettenschweiler, sans-serif;
  --body: "Avenir Next Condensed", "Arial Narrow", "IBM Plex Sans Condensed", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-synthesis: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #151a17;
  --paper-raised: #202722;
  --ink: #e9e8df;
  --ink-soft: #b1b6ac;
  --rule: #687069;
  --accent: #92bea4;
  --accent-contrast: #142019;
  --miss: #e78d7f;
  --focus: #dcbd58;
}

:root[data-contrast="high"] {
  --paper: #fbfbf7;
  --paper-raised: #fff;
  --ink: #090b08;
  --ink-soft: #252821;
  --rule: #30332e;
  --accent: #0e4128;
  --miss: #791e16;
}

:root[data-theme="dark"][data-contrast="high"] {
  --paper: #090c0a;
  --paper-raised: #161a17;
  --ink: #fafaf4;
  --ink-soft: #e0e2da;
  --rule: #bcc2ba;
  --accent: #b8e9ca;
  --miss: #ffafa2;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  min-height: 100%;
  overflow-x: hidden;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  background: var(--paper);
}

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

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 50;
  min-height: 44px;
  padding: .65rem .85rem;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.masthead {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: clamp(.7rem, 2vw, 1.6rem);
  min-height: 62px;
  margin-inline: var(--page-pad);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 75%, transparent);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 900;
  letter-spacing: .045em;
  line-height: .8;
  text-decoration: none;
}

.moon-mark {
  position: relative;
  display: inline-block;
  width: .52em;
  height: .52em;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: var(--ink);
}

.moon-mark::after {
  position: absolute;
  width: 92%;
  height: 92%;
  top: -24%;
  left: 32%;
  border-radius: 50%;
  background: var(--paper);
  content: "";
}

.issue-line {
  justify-self: end;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(.7rem, 1.2vw, .82rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .09em;
  white-space: nowrap;
}

.header-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: .36rem;
  padding: 0 .3rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.header-action:hover {
  color: var(--accent);
}

.hint-action {
  font-size: .9rem;
  white-space: nowrap;
}

.hint-action > span:first-child {
  font-size: 1.25rem;
}

.hint-action:disabled {
  color: var(--rule);
  cursor: default;
}

.help-action {
  width: 44px;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 1.15rem;
}

.utility-menu {
  position: relative;
}

.utility-menu summary {
  position: relative;
  display: grid;
  min-width: 72px;
  min-height: 44px;
  place-items: center end;
  padding-right: 1.8rem;
  font-size: .86rem;
  font-weight: 800;
  letter-spacing: .08em;
  list-style: none;
  text-transform: uppercase;
  cursor: pointer;
}

.utility-menu summary::-webkit-details-marker {
  display: none;
}

.utility-menu summary::before,
.utility-menu summary::after {
  position: absolute;
  top: 50%;
  right: 0;
  width: 1.2rem;
  border-top: 2px solid currentColor;
  content: "";
  transform-origin: center;
}

.utility-menu summary::before {
  transform: translateY(-.24rem);
}

.utility-menu summary::after {
  transform: translateY(.24rem);
}

.utility-menu[open] summary::before {
  transform: rotate(45deg);
}

.utility-menu[open] summary::after {
  transform: rotate(-45deg);
}

.utility-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(292px, calc(100vw - 1.5rem));
  padding: .65rem .85rem .9rem;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.primary-nav,
.appearance-tools {
  display: grid;
}

.primary-nav {
  border-bottom: 1px solid var(--rule);
  padding-bottom: .35rem;
  margin-bottom: .35rem;
}

.primary-nav a,
.text-button {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: .2rem .35rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 750;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.primary-nav a:hover,
.primary-nav a.is-active,
.text-button:hover,
.text-button[aria-pressed="true"] {
  color: var(--accent);
}

.text-button:disabled {
  color: var(--rule);
  cursor: default;
}

main {
  min-height: calc(100dvh - 62px);
}

.view {
  margin-inline: var(--page-pad);
  padding-block: clamp(.65rem, 1.6vw, 1.4rem) 3rem;
}

.view[data-view="today"] {
  padding-top: 0;
  padding-bottom: 0;
}

.gameplay-stage {
  display: grid;
  grid-template-areas:
    "notice notice"
    "cloud found"
    "hint found"
    "form found"
    "complete complete";
  grid-template-columns: minmax(0, 1fr) clamp(150px, 13vw, 190px);
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  column-gap: clamp(1rem, 2.5vw, 2.6rem);
  max-width: 1420px;
  min-height: calc(100dvh - 62px);
  margin: 0 auto;
}

.archive-notice {
  grid-area: notice;
  justify-self: center;
  margin: 0;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.word-cloud {
  grid-area: cloud;
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: clamp(410px, 66dvh, 720px);
  max-width: 1120px;
  align-content: center;
  align-items: baseline;
  align-self: center;
  justify-content: center;
  justify-self: center;
  column-gap: clamp(.08rem, .35vw, .28rem);
  row-gap: 0;
  flex-wrap: wrap;
  overflow: hidden;
  padding: .15rem 0;
  text-align: center;
}

.cloud-word {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 .025em;
  border: 0;
  background: transparent;
  color: var(--word-color, var(--ink));
  cursor: pointer;
  font-family: var(--display);
  font-size: clamp(3.2rem, 6vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -.065em;
  line-height: .77;
  text-rendering: geometricPrecision;
  text-transform: uppercase;
  transform-origin: 50% 60%;
}

.cloud-word-label {
  display: inline-block;
  pointer-events: none;
  transform-origin: 50% 60%;
}

.cloud-word.is-in-guess {
  outline: 2px solid currentColor;
  outline-offset: .035em;
  background: color-mix(in srgb, currentColor 8%, transparent);
}

.cloud-word:disabled {
  cursor: default;
}

.cloud-word[data-frequency="2"] {
  font-size: clamp(5.2rem, 9vw, 10rem);
}

.cloud-word[data-frequency="3"] {
  font-size: clamp(6.8rem, 11.8vw, 13rem);
}

.cloud-word[data-frequency="4"] {
  font-size: clamp(8.5rem, 15vw, 16rem);
}

/* Normalize the footprint of one-use words without overriding frequency. */
.cloud-word[data-frequency="1"][data-length="medium"] {
  font-size: clamp(3rem, 5.1vw, 5.7rem);
}

.cloud-word[data-frequency="1"][data-length="wide"] {
  font-size: clamp(2.7rem, 4.6vw, 5.1rem);
}

.cloud-word[data-frequency="1"][data-length="long"] {
  font-size: clamp(2.35rem, 4vw, 4.45rem);
}

.cloud-word[data-frequency="1"][data-length="very-long"] {
  font-size: clamp(2rem, 3.4vw, 3.8rem);
}

.cloud-word.is-hinted {
  outline: 2px dotted var(--accent);
  outline-offset: .06em;
}

.cloud-word.just-found .cloud-word-label {
  animation: ink-settle 560ms cubic-bezier(.22, .75, .28, 1);
}

.found-ledger {
  grid-area: found;
  align-self: center;
  min-height: 14rem;
  padding: .25rem 0 .25rem clamp(.8rem, 1.4vw, 1.3rem);
  border-left: 1px solid color-mix(in srgb, var(--ink) 65%, transparent);
}

.ledger-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .65rem;
  margin-bottom: .45rem;
}

.found-ledger h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  font-weight: 900;
  letter-spacing: -.025em;
  line-height: .9;
  text-transform: uppercase;
}

.remaining-readout {
  display: grid;
  justify-items: end;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--body);
  line-height: .9;
}

.remaining-readout strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 900;
}

.remaining-readout span {
  font-size: .8rem;
  font-weight: 750;
}

.phase-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .3rem;
  margin: .7rem 0 1rem;
}

.phase-mark {
  position: relative;
  width: 1.05rem;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--ink-soft);
  border-radius: 50%;
}

.phase-mark.is-solved {
  border-color: var(--accent);
  background: var(--accent);
}

.phase-mark.is-solved::after {
  position: absolute;
  width: 90%;
  height: 90%;
  top: -26%;
  left: 40%;
  border-radius: 50%;
  background: var(--paper);
  content: "";
}

.phase-mark:nth-child(2).is-solved::after {
  top: 0;
  left: 52%;
  width: 52%;
  height: 100%;
  border-radius: 0;
}

.phase-mark:nth-child(3).is-solved::after {
  top: -8%;
  left: 70%;
  width: 58%;
  height: 116%;
}

.phase-mark:nth-child(4).is-solved::after {
  display: none;
}

.found-ledger ol {
  display: grid;
  gap: .65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.found-ledger li {
  font-size: clamp(1.08rem, 1.35vw, 1.38rem);
  font-weight: 750;
  line-height: 1.08;
}

.found-ledger li::before {
  margin-right: .42rem;
  color: var(--accent);
  content: "●";
  font-size: .58em;
  vertical-align: .18em;
}

.found-ledger li.just-found {
  animation: phrase-arrive 440ms ease-out;
}

.phrase-form {
  grid-area: form;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "input button"
    "feedback feedback";
  width: min(610px, 100%);
  margin: .45rem auto 0;
  align-self: end;
}

.phrase-input-wrap {
  position: relative;
  grid-area: input;
  min-width: 0;
}

.phrase-form input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: .25rem .1rem;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  outline: 0;
}

.entry-prompt {
  position: absolute;
  top: 50%;
  left: .1rem;
  display: inline-flex;
  align-items: center;
  gap: .22rem;
  color: var(--ink-soft);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  pointer-events: none;
  transform: translateY(-50%);
}

.prompt-cursor {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  background: var(--accent);
  animation: cursor-blink 920ms steps(1, end) infinite;
}

.phrase-form input:focus ~ .entry-prompt,
.phrase-form input:not(:placeholder-shown) ~ .entry-prompt {
  display: none;
}

.hint-reveal {
  grid-area: hint;
  width: min(610px, 100%);
  margin: 0 auto .15rem;
  padding: .55rem .75rem .52rem;
  border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  color: var(--ink);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  font-weight: 800;
  line-height: 1.2;
}

.hint-reveal::before {
  content: none;
}

.phrase-form input:focus {
  border-bottom-color: var(--focus);
}

.phrase-form input:disabled {
  border-bottom-color: var(--rule);
  color: var(--ink-soft);
}

.phrase-form button,
.ink-button {
  min-height: 48px;
  padding: .6rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-size: .84rem;
  font-weight: 850;
  letter-spacing: .04em;
  cursor: pointer;
}

.phrase-form button:hover,
.ink-button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.phrase-form button:disabled {
  border-color: var(--rule);
  background: var(--rule);
  cursor: default;
}

.feedback {
  grid-area: feedback;
  min-height: 1.4rem;
  margin: .35rem 0 0;
  color: var(--ink-soft);
  font-size: .85rem;
  font-weight: 750;
}

.phrase-form.is-correct input {
  border-bottom-color: var(--accent);
}

.phrase-form.is-correct .feedback {
  color: var(--accent);
}

.phrase-form.is-wrong {
  animation: wrong-shift 360ms ease-out;
}

.phrase-form.is-wrong input {
  border-bottom-color: var(--miss);
}

.phrase-form.is-wrong .feedback {
  color: var(--miss);
}

.completion {
  grid-area: complete;
  display: grid;
  grid-template-areas:
    "heading inkprint connection"
    "share inkprint connection"
    "fallback fallback fallback";
  grid-template-columns: minmax(170px, .5fr) minmax(230px, .7fr) minmax(300px, 1.2fr);
  gap: .55rem clamp(1.4rem, 3.2vw, 3.2rem);
  width: min(1120px, 100%);
  margin: 1rem auto 0;
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
}

.completion-heading {
  grid-area: heading;
}

.completion > .ink-button {
  grid-area: share;
  align-self: start;
  justify-self: start;
  white-space: nowrap;
}

.inkprint-card {
  grid-area: inkprint;
  padding: .7rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.inkprint-card > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .88rem;
  font-weight: 750;
}

.inkprint-phases {
  margin: .35rem 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  letter-spacing: .08em;
  white-space: nowrap;
}

.inkprint-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: .75rem;
  font-weight: 750;
}

.today-ink {
  display: inline-flex;
  align-items: center;
  gap: .24rem;
  white-space: nowrap;
}

.today-ink i {
  width: .58rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #214f3b;
}

.today-ink i:nth-child(2) { background: #9c3327; }
.today-ink i:nth-child(3) { background: #a27616; }
.today-ink i:nth-child(4) { background: #213f62; }

.completion-kicker {
  margin: 0 0 .2rem;
  color: var(--accent);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .12em;
}

.completion h2,
.archive-lead h1,
.stats-heading h1,
.how-rules h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: .88;
  text-transform: uppercase;
}

.completion h2 {
  font-size: clamp(2.5rem, 4.2vw, 4rem);
}

.connection-reveal {
  grid-area: connection;
  margin: 0;
}

.connection-reveal h3 {
  margin: 0;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.connection-reveal p {
  margin: .35rem 0 0;
  line-height: 1.4;
}

.connection-reveal p:first-of-type {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
}

.share-fallback {
  grid-area: fallback;
  display: grid;
  gap: .45rem;
  margin-top: 1rem;
}

.gameplay-stage.is-complete {
  min-height: calc(100dvh - 62px);
}

.gameplay-stage.is-complete .word-cloud {
  min-height: clamp(260px, 42dvh, 440px);
}

.gameplay-stage.is-complete .phrase-form {
  display: none;
}

.share-fallback textarea {
  padding: .7rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper-raised);
}

.archive-view,
.statistics-view,
.how-view {
  display: grid;
  grid-template-columns: minmax(220px, .65fr) minmax(320px, 1.35fr);
  gap: clamp(2rem, 8vw, 8rem);
  max-width: 1180px;
  margin: 0 auto;
  padding-top: clamp(3rem, 9vw, 8rem);
}

.archive-lead p,
.stats-heading p {
  margin: 1rem 0;
  color: var(--ink-soft);
}

.underlined-link {
  color: var(--ink);
  font-weight: 800;
  text-underline-offset: .22em;
}

.archive-calendar {
  align-self: start;
  border-top: 2px solid var(--ink);
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  min-height: 58px;
  align-items: center;
  border-bottom: 1px solid var(--rule);
}

.calendar-toolbar h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.calendar-toolbar button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.35rem;
  cursor: pointer;
}

.calendar-toolbar button:disabled {
  color: var(--rule);
  cursor: default;
}

.calendar-weekdays,
.archive-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  padding: .65rem 0 .35rem;
  color: var(--ink-soft);
  font-size: .68rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
  border-top: 1px solid color-mix(in srgb, var(--rule) 55%, transparent);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

a.calendar-day {
  color: var(--ink);
  font-weight: 850;
}

a.calendar-day:hover {
  background: var(--paper-raised);
  color: var(--accent);
}

.calendar-day.is-future {
  opacity: .28;
}

.calendar-day.is-blank {
  border-top-color: transparent;
}

.calendar-number {
  position: absolute;
  top: .32rem;
  left: .38rem;
  font-size: .72rem;
}

.moon-status {
  position: relative;
  display: inline-block;
  width: clamp(1rem, 2.5vw, 1.5rem);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--ink-soft);
  border-radius: 50%;
}

.moon-status.is-complete {
  border-color: var(--accent);
  background: var(--accent);
}

.moon-status.is-progress {
  border-color: var(--accent);
  background: linear-gradient(90deg, var(--accent) 50%, transparent 50%);
}

.moon-status.is-unplayed {
  background: transparent;
}

.calendar-key {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.1rem;
  padding-top: .85rem;
  color: var(--ink-soft);
  font-size: .72rem;
  font-weight: 750;
}

.calendar-key span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.calendar-key .moon-status {
  width: .75rem;
}

.statistics-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 2px solid var(--ink);
}

.statistics-list div {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.statistics-list dt {
  color: var(--ink-soft);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.statistics-list dd {
  margin: .2rem 0 0;
  font-family: var(--display);
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  font-weight: 900;
  line-height: 1;
}

.how-rules ol {
  display: grid;
  gap: 1rem;
  margin: 1.6rem 0;
  padding-left: 1.25rem;
  font-size: clamp(1.18rem, 2vw, 1.48rem);
  font-weight: 700;
  line-height: 1.35;
}

.how-rules li {
  padding-left: .35rem;
}

.how-rules li::marker {
  color: var(--accent);
  font-family: var(--display);
  font-weight: 900;
}

.hint-explainer,
.color-explainer {
  max-width: 38ch;
  margin: 0 0 1.6rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.45;
}

.hint-explainer strong,
.color-explainer strong {
  color: var(--ink);
}

.color-explainer {
  padding-left: .8rem;
  border-left: 4px solid var(--accent);
}

.type-example {
  align-self: center;
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: .9;
  text-transform: uppercase;
}

.sample-cloud {
  display: flex;
  min-height: 190px;
  align-content: center;
  align-items: baseline;
  justify-content: center;
  gap: 0 .12rem;
  flex-wrap: wrap;
  padding: 1rem .2rem;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

.sample-cloud strong {
  color: #214f3b;
  font-size: clamp(3.6rem, 8vw, 7rem);
  line-height: .72;
}

.sample-cloud span {
  color: #9c3327;
  font-size: clamp(1.45rem, 3.2vw, 2.5rem);
  line-height: .75;
}

.sample-cloud span:nth-of-type(2) { color: #a27616; }
.sample-cloud span:nth-of-type(3) { color: #213f62; }
.sample-cloud span:nth-of-type(4) { color: var(--ink); }

.sample-phrases {
  margin-top: 1rem;
}

.type-example p {
  margin: .18rem 0;
}

.type-example strong {
  color: var(--accent);
  font-size: 1.28em;
}

.type-example small {
  display: block;
  margin-top: 1.2rem;
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.rules-dialog {
  width: min(820px, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  padding: 0;
  overflow: auto;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
}

.rules-dialog::backdrop {
  background: color-mix(in srgb, var(--ink) 68%, transparent);
}

.rules-dialog[open] {
  display: grid;
  grid-template-columns: minmax(105px, .32fr) minmax(0, 1fr);
}

.dialog-inkblots {
  display: grid;
  align-content: space-around;
  justify-items: center;
  padding: 1.5rem .8rem;
  background: var(--ink);
}

.dialog-inkblots i {
  position: relative;
  display: block;
  width: clamp(2.5rem, 7vw, 4.2rem);
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--paper) 42%, transparent);
  background: var(--palette-green);
  border-radius: 47% 53% 39% 61% / 57% 42% 58% 43%;
  box-shadow: .18rem .12rem 0 color-mix(in srgb, var(--ink) 28%, transparent);
  transform: rotate(-11deg);
}

.dialog-inkblots i:nth-child(2) { width: clamp(3rem, 8vw, 5rem); background: var(--palette-red); border-radius: 58% 42% 51% 49% / 44% 62% 38% 56%; transform: rotate(9deg); }
.dialog-inkblots i:nth-child(3) { width: clamp(2rem, 5vw, 3.2rem); background: var(--palette-gold); border-radius: 41% 59% 64% 36% / 55% 39% 61% 45%; transform: rotate(-19deg); }
.dialog-inkblots i:nth-child(4) { width: clamp(3.4rem, 9vw, 5.4rem); background: var(--palette-blue); border-radius: 63% 37% 45% 55% / 35% 59% 41% 65%; transform: rotate(14deg); }
.dialog-inkblots i:nth-child(5) { width: clamp(1.7rem, 4vw, 2.6rem); background: var(--palette-charcoal); border-radius: 52% 48% 66% 34% / 62% 46% 54% 38%; transform: rotate(-6deg); }

.dialog-copy {
  padding: clamp(1.3rem, 4vw, 3rem);
}

.dialog-kicker {
  margin: 0 0 .45rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.dialog-copy h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: .82;
  text-transform: uppercase;
}

.dialog-copy ol {
  display: grid;
  gap: .85rem;
  margin: 1.5rem 0 1rem;
  padding-left: 1.25rem;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.35;
}

.dialog-copy li::marker {
  color: var(--accent);
  font-family: var(--display);
  font-weight: 900;
}

.dialog-hint {
  max-width: 48ch;
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

@keyframes ink-settle {
  0% {
    opacity: .25;
    transform: scale(1.13);
  }
  55% {
    opacity: 1;
    transform: scale(.96);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes phrase-arrive {
  from {
    opacity: 0;
    transform: translateY(.55rem);
  }
}

@keyframes wrong-shift {
  20% { transform: translateX(-.38rem); }
  45% { transform: translateX(.3rem); }
  70% { transform: translateX(-.16rem); }
}

@keyframes cursor-blink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

@media (max-width: 760px) {
  :root {
    --page-pad: clamp(.55rem, 3vw, .9rem);
  }

  .masthead {
    min-height: 56px;
    gap: clamp(.25rem, 1.4vw, .55rem);
  }

  .wordmark {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .issue-line {
    justify-self: center;
    font-size: .64rem;
    letter-spacing: .055em;
  }

  .hint-action {
    font-size: .78rem;
  }

  .help-action {
    width: 38px;
    min-height: 38px;
  }

  .utility-menu summary {
    min-width: 44px;
    padding-right: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
  }

  .utility-menu summary::before,
  .utility-menu summary::after {
    margin: 0;
    color: var(--ink);
  }

  .gameplay-stage {
    grid-template-areas:
      "notice"
      "cloud"
      "hint"
      "form"
      "found"
      "complete";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
    min-height: calc(100dvh - 56px);
  }

  .word-cloud {
    min-height: clamp(350px, 56dvh, 560px);
    column-gap: .1rem;
    padding-block: .1rem;
  }

  .cloud-word {
    font-size: clamp(2.45rem, 12vw, 4rem);
    line-height: .75;
  }

  .cloud-word[data-frequency="2"] {
    font-size: clamp(3.9rem, 18vw, 5.4rem);
  }

  .cloud-word[data-frequency="3"] {
    font-size: clamp(5rem, 23vw, 6.8rem);
  }

  .cloud-word[data-frequency="4"] {
    font-size: clamp(6.1rem, 29vw, 8.5rem);
  }

  .cloud-word[data-frequency="1"][data-length="medium"] {
    font-size: clamp(1.8rem, 7vw, 2.8rem);
  }

  .cloud-word[data-frequency="1"][data-length="wide"] {
    font-size: clamp(1.6rem, 6.2vw, 2.5rem);
  }

  .cloud-word[data-frequency="1"][data-length="long"] {
    font-size: clamp(1.25rem, 4.8vw, 2rem);
  }

  .cloud-word[data-frequency="1"][data-length="very-long"] {
    font-size: clamp(1.1rem, 4.3vw, 1.75rem);
  }

  .phrase-form {
    margin-top: .2rem;
  }

  .found-ledger {
    min-height: 5.5rem;
    margin-top: 1rem;
    padding: .75rem 0 0;
    border-top: 1px solid color-mix(in srgb, var(--ink) 55%, transparent);
    border-left: 0;
  }

  .found-ledger h2 {
    font-size: 1.65rem;
  }

  .phase-track {
    grid-template-columns: repeat(4, 1.05rem);
    margin: .5rem 0 .7rem;
  }

  .found-ledger ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem .8rem;
  }

  .found-ledger li {
    font-size: clamp(1.15rem, 5vw, 1.32rem);
  }

  .completion {
    grid-template-areas:
      "heading heading"
      "inkprint connection"
      "share connection"
      "fallback fallback";
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: .45rem 1rem;
    margin-top: .85rem;
    padding-top: .8rem;
  }

  .completion h2 {
    font-size: clamp(2rem, 9.4vw, 2.75rem);
  }

  .completion-kicker {
    margin-bottom: .1rem;
  }

  .connection-reveal p:first-of-type {
    font-size: clamp(1.08rem, 5vw, 1.4rem);
  }

  .connection-reveal p:last-child {
    font-size: .76rem;
    line-height: 1.25;
  }

  .gameplay-stage.is-complete .word-cloud {
    min-height: clamp(145px, 22dvh, 205px);
  }

  .gameplay-stage.is-complete .cloud-word { font-size: clamp(2rem, 10vw, 3.2rem); }
  .gameplay-stage.is-complete .cloud-word[data-frequency="2"] { font-size: clamp(3.2rem, 15vw, 4.4rem); }
  .gameplay-stage.is-complete .cloud-word[data-frequency="3"] { font-size: clamp(4.1rem, 19vw, 5.4rem); }
  .gameplay-stage.is-complete .cloud-word[data-frequency="4"] { font-size: clamp(5rem, 24vw, 6.7rem); }
  .gameplay-stage.is-complete .cloud-word[data-frequency="1"][data-length="medium"] { font-size: clamp(1.25rem, 5.7vw, 1.9rem); }
  .gameplay-stage.is-complete .cloud-word[data-frequency="1"][data-length="wide"] { font-size: clamp(1.15rem, 5vw, 1.7rem); }
  .gameplay-stage.is-complete .cloud-word[data-frequency="1"][data-length="long"] { font-size: clamp(1rem, 4.2vw, 1.45rem); }
  .gameplay-stage.is-complete .cloud-word[data-frequency="1"][data-length="very-long"] { font-size: clamp(.9rem, 3.8vw, 1.25rem); }

  .gameplay-stage.is-complete .found-ledger {
    min-height: auto;
    margin-top: .45rem;
    padding-top: .5rem;
  }

  .gameplay-stage.is-complete .phase-track {
    margin: .3rem 0 .45rem;
  }

  .gameplay-stage.is-complete .found-ledger ol {
    gap: .25rem .7rem;
  }

  .inkprint-details {
    align-items: flex-start;
    flex-direction: column;
    gap: .45rem;
  }

  .inkprint-card {
    padding-block: .45rem;
  }

  .inkprint-card > p {
    font-size: .76rem;
  }

  .inkprint-phases {
    margin: .25rem 0;
    font-size: clamp(1.2rem, 6vw, 1.55rem);
    letter-spacing: 0;
  }

  .completion > .ink-button {
    width: 100%;
    padding-inline: .55rem;
    white-space: normal;
  }

  .archive-view,
  .statistics-view,
  .how-view {
    grid-template-columns: 1fr;
    gap: 2.4rem;
    padding-top: 2.2rem;
  }

  .statistics-list dd {
    font-size: clamp(2.2rem, 12vw, 3.8rem);
  }
}

.gameplay-stage.is-complete .attempt-track,
.gameplay-stage.is-complete .guesses-left {
  display: none;
}

@media (max-width: 380px) {
  .share-preview h2 {
    font-size: 1.75rem;
    white-space: nowrap;
  }

  .share-preview-metrics {
    font-size: .75rem;
    white-space: nowrap;
  }

  .share-actions button {
    padding: .5rem .65rem;
    font-size: .84rem;
    white-space: nowrap;
  }

  .completion > .ink-button {
    padding: .45rem .35rem;
    font-size: .84rem;
    white-space: nowrap;
  }

  .calendar-weekdays {
    font-size: .72rem;
  }

  .calendar-number {
    font-size: .9rem;
  }

  .calendar-day .moon-status {
    position: absolute;
    right: .24rem;
    bottom: .2rem;
    width: 1.25rem;
  }
}

@media (max-width: 380px) {
  .issue-line {
    display: none;
  }

  .masthead {
    grid-template-columns: auto 1fr auto auto auto;
  }

  .wordmark {
    font-size: 1.62rem;
  }

  .hint-action {
    justify-self: end;
    padding-inline: .1rem;
  }

  .word-cloud {
    min-height: 49dvh;
  }

  .cloud-word {
    font-size: clamp(1.95rem, 10.1vw, 2.8rem);
  }

  .cloud-word[data-frequency="2"] {
    font-size: clamp(3.5rem, 19vw, 4.8rem);
  }

  .cloud-word[data-frequency="3"] {
    font-size: clamp(4rem, 22vw, 5.4rem);
  }

  .cloud-word[data-frequency="4"] {
    font-size: clamp(5rem, 25vw, 6.9rem);
  }

  .cloud-word[data-frequency="1"][data-length="medium"] {
    font-size: clamp(1.35rem, 7.3vw, 1.85rem);
  }

  .cloud-word[data-frequency="1"][data-length="wide"] {
    font-size: clamp(1.25rem, 6.4vw, 1.65rem);
  }

  .cloud-word[data-frequency="1"][data-length="long"] {
    font-size: clamp(.95rem, 5.2vw, 1.45rem);
  }

  .cloud-word[data-frequency="1"][data-length="very-long"] {
    font-size: clamp(.95rem, 4.6vw, 1.3rem);
  }

  .phrase-form button {
    padding-inline: .75rem;
  }

  .rules-dialog[open] {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .dialog-inkblots {
    padding-inline: .35rem;
  }

  .dialog-copy {
    padding: 1.1rem .9rem 1.3rem;
  }

  .dialog-copy h2 {
    font-size: 2.75rem;
  }
}

@media (max-width: 340px) {
  .wordmark {
    font-size: 1.48rem;
  }

  #hint-button-label {
    font-size: 0;
  }

  #hint-button-label::after {
    content: attr(data-short-label);
    font-size: .76rem;
  }

  .hint-action {
    width: auto;
    min-height: 38px;
  }

  .completion {
    grid-template-areas:
      "heading"
      "inkprint"
      "connection"
      "share"
      "fallback";
    grid-template-columns: minmax(0, 1fr);
  }

  .completion > .ink-button {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cloud-word.just-found .cloud-word-label,
  .found-ledger li.just-found,
  .phrase-form.is-wrong,
  .prompt-cursor { animation: none; }
}

/* Inkprint system refresh */
:root {
  --paper: #f1f1e9;
  --paper-raised: #e4e8df;
  --ink: #263f49;
  --ink-soft: #586e72;
  --rule: #91a097;
  --accent: #315f55;
  --miss: #8b4051;
  --date-ink: #31556f;
  --aside-ink: #71898b;
  --archive-blue: #31556f;
  --archive-gold: #8b6c24;
  --archive-green: #315f55;
  --poster: "Arial Black", "Avenir Next Heavy", "Trebuchet MS", sans-serif;
  --playful: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --typewriter: "American Typewriter", "Courier New", monospace;
  --body: var(--playful);
  --palette-green: #315f55;
  --palette-red: #8b4051;
  --palette-gold: #8b6c24;
  --palette-blue: #31556f;
  --palette-sea: #71898b;
  --palette-rust: #9a5d2d;
  --palette-charcoal: #263f49;
}

:root[data-theme="dark"] {
  --paper: #16201d;
  --paper-raised: #23302b;
  --ink: #d6e2db;
  --ink-soft: #a9bcb2;
  --rule: #667c70;
  --accent: #9cc9b1;
  --miss: #e396a5;
  --date-ink: #91b7c7;
  --aside-ink: #bbcdc5;
  --archive-blue: #7199aa;
  --archive-gold: #b39b62;
  --archive-green: #78a791;
  --palette-green: #9cc9b1;
  --palette-red: #e396a5;
  --palette-gold: #d1b66f;
  --palette-blue: #91b7c7;
  --palette-sea: #bbcdc5;
  --palette-rust: #d49b73;
  --palette-charcoal: #d6e2db;
}

.masthead {
  border-bottom: 0;
}

.wordmark,
.completion h2,
.archive-lead h1,
.stats-heading h1,
.how-rules h1,
.dialog-copy h2,
.share-preview h2 {
  color: var(--ink);
}

.issue-line {
  color: var(--date-ink);
  font-family: var(--poster);
  font-size: clamp(.92rem, 1.35vw, 1.08rem);
  font-weight: 900;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.header-action,
.utility-menu summary,
.primary-nav a,
.text-button {
  font-family: var(--playful);
}

.utility-menu summary {
  font-size: 1.02rem;
  letter-spacing: .01em;
  text-transform: none;
}

.utility-panel {
  width: min(310px, calc(100vw - 1.25rem));
  padding: .8rem;
  border: 3px solid var(--accent);
  background: var(--paper);
}

.primary-nav {
  margin: 0;
  padding: 0;
  border: 0;
}

.appearance-tools {
  margin-top: .45rem;
  padding: .45rem .55rem;
  background: var(--paper-raised);
}

.primary-nav a,
.text-button {
  min-height: 48px;
  padding-inline: .55rem;
  font-size: 1.18rem;
  font-weight: 800;
}

.archive-notice {
  font-family: var(--playful);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  font-weight: 850;
  letter-spacing: -.01em;
  text-transform: none;
}

.found-ledger {
  padding: 1rem;
  border: 0;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.found-ledger h2 {
  font-family: var(--poster);
  font-size: clamp(1.6rem, 2.3vw, 2.25rem);
  letter-spacing: -.06em;
}

.ledger-heading {
  display: grid;
  justify-content: start;
  gap: .35rem;
}

.remaining-readout {
  display: flex;
  align-items: baseline;
  justify-items: initial;
  gap: .35rem;
}

.remaining-readout span {
  color: var(--ink-soft);
  font-family: var(--playful);
  font-size: .94rem;
}

.remaining-readout strong {
  color: var(--accent);
  font-family: var(--poster);
  font-size: 1.75rem;
}

.attempt-track,
.inkprint-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .28rem;
}

.attempt-track {
  width: min(140px, 100%);
  margin: .7rem 0 .4rem;
}

.inkprint-cell {
  --cell-ink: var(--ink);
  --cell-paper: var(--paper);
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--cell-ink) 42%, transparent);
  background: var(--cell-paper);
}

.inkprint-cell.pattern-1 {
  background: repeating-linear-gradient(135deg, var(--cell-paper) 0 4px, var(--cell-ink) 4px 6px);
}

.inkprint-cell.pattern-2 {
  background: conic-gradient(var(--cell-ink) 25%, var(--cell-paper) 0 50%, var(--cell-ink) 0 75%, var(--cell-paper) 0) 0 0 / 8px 8px;
}

.inkprint-cell.pattern-3 {
  background:
    repeating-linear-gradient(45deg, transparent 0 3px, var(--cell-ink) 3px 5px),
    repeating-linear-gradient(135deg, var(--cell-paper) 0 4px, var(--cell-ink) 4px 5px);
}

.inkprint-cell.pattern-4 {
  background:
    repeating-linear-gradient(45deg, transparent 0 2px, var(--cell-ink) 2px 5px),
    repeating-linear-gradient(135deg, var(--cell-paper) 0 2px, var(--cell-ink) 2px 4px);
}

.inkprint-cell.is-miss {
  border-color: color-mix(in srgb, var(--miss) 58%, transparent);
}

.inkprint-cell.is-miss::before {
  position: absolute;
  top: 17%;
  left: 13%;
  width: 72%;
  height: 66%;
  border-radius: 46% 54% 38% 62% / 58% 42% 60% 40%;
  background: var(--miss);
  box-shadow: .32em -.15em 0 -.2em var(--miss), -.24em .32em 0 -.23em var(--miss);
  content: "";
  transform: rotate(-13deg);
}

.inkprint-cell.is-unused {
  border-style: dashed;
  opacity: .32;
}

.guesses-left {
  margin: 0 0 .8rem;
  color: var(--ink-soft);
  font-family: var(--typewriter);
  font-size: .94rem;
  font-weight: 700;
}

.found-ledger ol {
  gap: .5rem;
}

.found-ledger li {
  color: var(--ink);
  font-family: var(--playful);
  font-size: clamp(1.1rem, 1.4vw, 1.4rem);
}

.found-ledger li::before {
  display: inline-block;
  width: .72em;
  aspect-ratio: 1;
  margin-right: .42rem;
  border: 1px solid var(--ink);
  background: repeating-linear-gradient(135deg, var(--paper) 0 2px, var(--ink) 2px 3px);
  content: "";
  vertical-align: .02em;
}

.found-ledger li[data-pattern="2"]::before { background: conic-gradient(var(--ink) 25%, var(--paper) 0 50%, var(--ink) 0 75%, var(--paper) 0) 0 0 / 4px 4px; }
.found-ledger li[data-pattern="3"]::before { background: repeating-linear-gradient(45deg, var(--ink) 0 2px, var(--paper) 2px 3px); }
.found-ledger li[data-pattern="4"]::before {
  background:
    repeating-linear-gradient(45deg, transparent 0 1px, var(--ink) 1px 3px),
    repeating-linear-gradient(135deg, var(--paper) 0 1px, var(--ink) 1px 2px);
}

.phrase-form input {
  border-bottom-color: var(--accent);
  color: var(--ink);
  font-family: var(--playful);
}

.entry-prompt,
.feedback,
.hint-reveal {
  font-family: var(--playful);
}

.feedback {
  font-size: .98rem;
}

.phrase-form button,
.ink-button,
.plain-button {
  font-family: var(--playful);
  font-size: .96rem;
}

.completion {
  gap: .8rem clamp(1.25rem, 3vw, 3rem);
  margin-top: .75rem;
  padding: 1rem;
  border: 0;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.completion h2 {
  font-family: var(--poster);
  font-size: clamp(2.25rem, 3.8vw, 3.7rem);
  letter-spacing: -.065em;
}

.inkprint-card {
  padding: .75rem;
  border: 0;
  background: var(--paper-raised);
}

.inkprint-grid {
  width: min(265px, 100%);
}

.inkprint-details {
  align-items: baseline;
  margin-top: .65rem;
  color: var(--ink);
  font-family: var(--typewriter);
  font-size: .9rem;
  font-weight: 800;
}

.inkprint-details > span:last-child {
  color: var(--accent);
  font-family: var(--poster);
  font-size: 1.4rem;
}

.inkprint-details .inkprint-metric {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  white-space: nowrap;
}

.connection-reveal h3 {
  color: var(--accent);
  font-family: var(--playful);
  font-size: 1.15rem;
  letter-spacing: -.02em;
  text-transform: none;
}

.connection-reveal p {
  font-family: var(--playful);
}

.connection-reveal p:last-child {
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.share-dialog {
  width: min(560px, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  padding: clamp(1.1rem, 4vw, 2rem);
  overflow: auto;
  border: 3px solid var(--accent);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
}

.share-dialog::backdrop {
  background: color-mix(in srgb, var(--ink) 68%, transparent);
}

.share-preview {
  --cell-ink: #24373f;
  --cell-paper: #f4f4ec;
  padding: clamp(1rem, 5vw, 2rem);
  background: var(--cell-paper);
  color: var(--cell-ink);
}

.share-preview h2 {
  margin: 0 0 1.2rem;
  color: var(--cell-ink);
  font-family: var(--poster);
  font-size: clamp(2rem, 8vw, 3.5rem);
  letter-spacing: -.06em;
  line-height: .9;
}

.share-preview h2 span {
  color: #566f70;
}

.share-preview .inkprint-cell {
  --cell-ink: #24373f;
  --cell-paper: #f4f4ec;
}

.share-preview .inkprint-grid {
  width: 100%;
  gap: .45rem;
}

.share-preview-metrics,
.share-preview-date {
  margin: 1.1rem 0 0;
  font-family: var(--typewriter);
  font-size: clamp(.92rem, 3vw, 1.15rem);
  font-weight: 800;
}

.share-preview-date {
  margin-top: .35rem;
  color: #566f70;
  font-family: var(--poster);
  font-size: 1.55rem;
}

.share-actions {
  display: flex;
  justify-content: flex-end;
  gap: .65rem;
  margin-top: 1rem;
}

.plain-button {
  min-height: 48px;
  padding: .6rem 1rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.share-fallback {
  margin-top: 1rem;
}

.share-fallback label {
  font-family: var(--playful);
  font-size: 1rem;
  font-weight: 800;
}

.archive-view,
.statistics-view,
.how-view {
  grid-template-columns: minmax(250px, .55fr) minmax(430px, 1.45fr);
  gap: clamp(2rem, 7vw, 7rem);
}

.archive-lead p,
.stats-heading p {
  max-width: 25ch;
  margin: 1.15rem 0;
  color: var(--ink-soft);
  font-family: var(--playful);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.35;
}

.underlined-link {
  color: var(--accent);
  font-family: var(--playful);
  font-size: 1.15rem;
  text-decoration-thickness: 2px;
}

.archive-calendar {
  padding: clamp(.75rem, 2vw, 1.25rem);
  border: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.calendar-toolbar {
  min-height: 68px;
  border: 0;
}

.calendar-toolbar h2 {
  color: var(--ink);
  font-family: var(--poster);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  letter-spacing: -.05em;
}

.calendar-toolbar button {
  color: var(--accent);
  font-family: var(--poster);
  font-size: 1.75rem;
}

.calendar-weekdays {
  gap: .25rem;
  padding: .7rem 0 .45rem;
  color: var(--ink-soft);
  font-family: var(--playful);
  font-size: clamp(.82rem, 1.5vw, 1.05rem);
  font-weight: 900;
  letter-spacing: -.045em;
  text-transform: none;
}

.archive-list {
  gap: .25rem;
}

.calendar-day {
  border: 0;
  background: color-mix(in srgb, var(--ink) 3%, transparent);
  color: var(--ink-soft);
}

a.calendar-day {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: var(--paper-raised);
}

a.calendar-day:hover {
  outline-width: 4px;
  background: color-mix(in srgb, var(--accent) 14%, var(--paper));
}

.calendar-number {
  top: .3rem;
  left: .4rem;
  color: inherit;
  font-family: var(--poster);
  font-size: clamp(.82rem, 1.8vw, 1.08rem);
  line-height: 1;
}

.moon-status {
  width: clamp(1.25rem, 2.4vw, 1.75rem);
  border: 2px solid var(--accent);
}

.calendar-day .moon-status {
  position: absolute;
  right: .35rem;
  bottom: .3rem;
}

.moon-status.is-complete {
  background: var(--accent);
}

.moon-status.is-progress {
  overflow: hidden;
  background: var(--accent);
}

.moon-status.is-progress::after {
  position: absolute;
  top: -13%;
  left: 42%;
  width: 95%;
  height: 110%;
  border-radius: 50%;
  background: var(--paper-raised);
  content: "";
}

.moon-status.is-unplayed {
  border-style: dashed;
}

.moon-status.is-failed {
  border: 0;
  border-radius: 43% 57% 39% 61% / 58% 42% 60% 40%;
  background: var(--miss);
  transform: rotate(-12deg);
}

.calendar-key {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem 1rem;
  padding-top: 1rem;
  color: var(--ink-soft);
  font-family: var(--playful);
  font-size: .92rem;
}

.calendar-key .moon-status {
  width: 1rem;
}

.statistics-list {
  gap: .55rem;
  border: 0;
}

.statistics-list div {
  padding: 1rem;
  border: 0;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.statistics-list div:nth-child(3n + 2) {
  background: color-mix(in srgb, #8b4051 7%, transparent);
}

.statistics-list dt {
  color: var(--ink-soft);
  font-family: var(--playful);
  font-size: 1.08rem;
  letter-spacing: -.02em;
  text-transform: none;
}

.statistics-list dd {
  color: var(--accent);
}

.how-rules ol {
  gap: 1.2rem;
  font-family: var(--playful);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.hint-explainer,
.color-explainer {
  max-width: 28ch;
  margin-bottom: 1.1rem;
  padding: 0;
  border: 0;
  color: var(--ink-soft);
  font-family: var(--playful);
  font-size: clamp(1.18rem, 2vw, 1.35rem);
  line-height: 1.35;
}

.type-example {
  align-self: start;
}

.sample-cloud {
  position: relative;
  display: block;
  min-height: clamp(180px, 22vw, 220px);
  padding: 0;
  overflow: hidden;
  border: 0;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.sample-cloud strong,
.sample-cloud span {
  position: absolute;
  margin: 0;
  white-space: nowrap;
}

.sample-cloud strong {
  top: 50%;
  left: 50%;
  color: #315f55;
  font-size: clamp(4.8rem, 8vw, 7.4rem);
  letter-spacing: -.055em;
  line-height: .76;
  transform: translate(-50%, -48%);
}

.sample-cloud span {
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  letter-spacing: -.045em;
  line-height: .82;
}

.sample-cloud span:nth-of-type(1) { top: 22%; left: 14%; color: #8b4051; }
.sample-cloud span:nth-of-type(2) { top: 23%; right: 15%; color: #8b6c24; }
.sample-cloud span:nth-of-type(3) { bottom: 18%; left: 18%; color: #31556f; }
.sample-cloud span:nth-of-type(4) { right: 13%; bottom: 17%; color: var(--ink); }

.sample-phrases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem 1rem;
  margin-top: 1rem;
  font-size: clamp(1.35rem, 3vw, 2.25rem);
}

.sample-note {
  margin: 1rem 0 0;
  color: var(--accent);
  font-family: var(--playful);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

.rules-dialog,
.share-dialog {
  box-shadow: .6rem .6rem 0 color-mix(in srgb, var(--accent) 45%, transparent);
}

.dialog-kicker {
  display: none;
}

.dialog-copy ol {
  font-family: var(--playful);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.dialog-hint {
  color: var(--ink-soft);
  font-family: var(--playful);
  font-size: 1.1rem;
}

@media (max-width: 760px) {
  .issue-line {
    font-size: .86rem;
  }

  .found-ledger {
    margin-top: .35rem;
    padding: .8rem;
    border: 0;
  }

  .ledger-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
  }

  .remaining-readout {
    display: grid;
    gap: 0;
  }

  .attempt-track {
    width: min(150px, 55%);
    margin-block: .5rem .3rem;
  }

  .guesses-left {
    margin-bottom: .6rem;
  }

  .completion {
    grid-template-areas:
      "heading heading"
      "inkprint connection"
      "share connection";
    padding: .75rem;
  }

  .completion h2 {
    font-size: clamp(1.9rem, 8.5vw, 2.65rem);
  }

  .inkprint-card {
    padding: .55rem;
  }

  .inkprint-details {
    align-items: flex-start;
    font-size: .76rem;
  }

  .connection-reveal p:last-child {
    font-size: .86rem;
  }

  .archive-view,
  .statistics-view,
  .how-view {
    grid-template-columns: 1fr;
    gap: 2.1rem;
    padding-top: 1.8rem;
    padding-bottom: 1.25rem;
  }

  .archive-lead p,
  .stats-heading p {
    font-size: 1.2rem;
  }

  .archive-calendar {
    padding: .55rem;
  }

  .calendar-weekdays {
    font-size: .86rem;
  }

  .calendar-number {
    font-size: .84rem;
  }

  .moon-status {
    width: clamp(1.25rem, 6vw, 1.8rem);
  }

  .sample-cloud {
    min-height: 164px;
  }

  .word-cloud {
    column-gap: clamp(.14rem, 1vw, .32rem);
    row-gap: .12rem;
    padding: .4rem .35rem;
  }

  .cloud-word {
    letter-spacing: -.035em;
    line-height: .84;
  }

  .gameplay-stage.is-complete .word-cloud {
    row-gap: 0;
    padding-block: .12rem;
  }

  .gameplay-stage.is-complete .cloud-word {
    letter-spacing: -.045em;
    line-height: .79;
  }
}

@media (max-width: 380px) {
  .completion {
    grid-template-areas:
      "heading"
      "inkprint"
      "connection"
      "share";
    grid-template-columns: minmax(0, 1fr);
  }

  .completion > .ink-button {
    width: auto;
  }

  .calendar-weekdays {
    font-size: .82rem;
  }

  .calendar-number {
    font-size: .76rem;
  }

  .sample-cloud strong {
    font-size: clamp(4.3rem, 23vw, 5.5rem);
  }

  .calendar-day .moon-status {
    right: .14rem;
    bottom: .12rem;
    width: .92rem;
  }
}

@media (min-height: 620px) {
  html[data-active-view="today"],
  body[data-active-view="today"] {
    overflow-y: hidden;
  }
}

@media (max-width: 380px) and (max-height: 620px) {
  .gameplay-stage.is-complete .word-cloud {
    min-height: 145px;
  }

  .gameplay-stage.is-complete .cloud-word {
    font-size: clamp(1.7rem, 8.8vw, 2.35rem);
  }

  .gameplay-stage.is-complete .cloud-word[data-frequency="2"] {
    font-size: clamp(3rem, 17.5vw, 4rem);
  }

  .gameplay-stage.is-complete .cloud-word[data-frequency="3"] {
    font-size: clamp(3.4rem, 21vw, 4.7rem);
  }

  .gameplay-stage.is-complete .cloud-word[data-frequency="4"] {
    font-size: clamp(4.2rem, 22vw, 5.8rem);
  }

  .gameplay-stage.is-complete .found-ledger {
    margin-top: .55rem;
    padding-top: .55rem;
  }

  .gameplay-stage.is-complete .found-ledger h2 {
    margin-bottom: .35rem;
  }

  .gameplay-stage.is-complete .found-ledger ol {
    gap: .28rem .65rem;
  }

  .gameplay-stage.is-complete .found-ledger li {
    font-size: 1rem;
  }

  .completion {
    grid-template-areas:
      "heading"
      "inkprint"
      "connection"
      "share"
      "fallback";
    grid-template-columns: minmax(0, 1fr);
    gap: .4rem .75rem;
    margin-top: .55rem;
    padding-top: .55rem;
  }

  .completion h2 {
    font-size: 2rem;
  }

  .completion > .ink-button {
    align-self: center;
    justify-self: start;
    width: auto;
    min-height: 44px;
    padding: .45rem .65rem;
    font-size: .78rem;
  }

  .connection-reveal p:first-of-type {
    margin-top: .18rem;
    font-size: 1.15rem;
  }

  .connection-reveal p:last-child {
    margin-top: .22rem;
    font-size: .78rem;
    line-height: 1.25;
  }
}

/* Keep the painted palette legible against the night canvas. */
:root[data-theme="dark"] .cloud-word {
  filter: brightness(1.45) saturate(.82);
}

@media (min-height: 620px) {
  html[data-active-view="today"],
  body[data-active-view="today"] {
    overflow-y: auto;
  }
}

@media (min-width: 341px) and (max-width: 760px) {
  .completion {
    grid-template-areas:
      "heading heading"
      "inkprint connection"
      "share connection";
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  }
}

@media (min-width: 341px) and (max-width: 820px) {
  .completion {
    grid-template-areas:
      "heading heading"
      "inkprint connection"
      "share connection";
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  }
}

@media (max-width: 760px) {
  .gameplay-stage.is-complete .guesses-left {
    display: none;
  }

  .gameplay-stage.is-complete .found-ledger {
    padding: .6rem .75rem;
  }

  .gameplay-stage.is-complete .attempt-track {
    margin-block: .35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* Final responsive composition adjustments */
.archive-view {
  grid-template-columns: minmax(320px, .62fr) minmax(520px, 1.38fr);
  gap: clamp(2rem, 4vw, 4rem);
}

.archive-lead h1 {
  font-size: clamp(3.5rem, 6vw, 4.5rem);
}

.calendar-day {
  aspect-ratio: 1.25;
}

.calendar-weekdays {
  font-size: clamp(.82rem, 1.4vw, 1rem);
}

.calendar-number {
  font-size: clamp(.9rem, 1.8vw, 1.2rem);
}

.archive-lead .underlined-link {
  display: inline-block;
  margin-top: 1.25rem;
}

.remaining-readout span {
  font-size: 1.08rem;
}

.completion h2 {
  max-width: 100%;
  padding-right: .08em;
  overflow: visible;
  font-size: clamp(2.2rem, 3.4vw, 2.9rem);
  letter-spacing: -.05em;
}

@media (max-width: 900px) {
  .archive-view {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .archive-view {
    grid-template-columns: 1fr;
  }

  .archive-lead h1 {
    font-size: clamp(3.4rem, 18vw, 5rem);
  }

  .calendar-day {
    aspect-ratio: 1.05;
  }

  .calendar-key {
    gap: .65rem .8rem;
  }

  .remaining-readout span {
    font-size: 1.02rem;
  }
}

@media (max-width: 480px) {
  .calendar-day {
    aspect-ratio: .9;
  }
}

@media (max-width: 380px) and (max-height: 620px) {
  .connection-reveal p:last-child {
    font-size: .88rem;
  }

  .completion {
    border: 0;
    background: color-mix(in srgb, var(--accent) 8%, transparent);
  }
}

/* Unified inkblot identity and final share composition */
@property --blot-color {
  syntax: "<color>";
  inherits: false;
  initial-value: #8b4051;
}

.inkblot-mark {
  --blot-color: var(--palette-red);
  position: relative;
  display: inline-block;
  width: .48em;
  height: .46em;
  flex: 0 0 auto;
  border-radius: 61% 39% 34% 66% / 48% 63% 37% 52%;
  background: var(--blot-color);
  box-shadow:
    -.16em -.13em 0 -.105em var(--blot-color),
    .18em -.1em 0 -.115em var(--blot-color),
    .2em .17em 0 -.15em var(--blot-color),
    -.18em .17em 0 -.16em var(--blot-color);
  transform: rotate(-11deg);
}

.help-action {
  border: 2px solid var(--miss);
  color: var(--miss);
  font-family: var(--poster);
  font-size: 1.3rem;
  font-weight: 950;
}

.help-action:hover {
  background: color-mix(in srgb, var(--miss) 12%, transparent);
  color: var(--miss);
}

.utility-menu summary {
  color: var(--ink);
  font-family: var(--poster);
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.attempt-track,
.inkprint-grid {
  gap: .13rem;
}

.ink-status {
  overflow: visible;
  border: 2px solid var(--miss);
  border-radius: 58% 42% 35% 65% / 44% 64% 36% 56%;
  background: transparent;
  box-shadow:
    .22em -.12em 0 -.15em var(--miss),
    -.16em .2em 0 -.16em var(--miss);
  transform: rotate(-10deg);
}

.ink-status.is-complete {
  border-color: var(--miss);
  background: var(--miss);
}

.ink-status.is-progress {
  overflow: visible;
  border-color: var(--miss);
  background: linear-gradient(90deg, var(--miss) 52%, transparent 52%);
}

.ink-status.is-progress::after {
  content: none;
}

.ink-status.is-unplayed {
  border-color: var(--miss);
  border-style: dashed;
  box-shadow: none;
  opacity: .65;
}

.ink-status.is-failed {
  border: 2px solid var(--miss);
  background: repeating-linear-gradient(135deg, var(--miss) 0 2px, transparent 2px 4px);
  box-shadow:
    .22em -.12em 0 -.15em var(--miss),
    -.16em .2em 0 -.16em var(--miss);
}

.sample-cloud {
  display: flex;
  min-height: clamp(220px, 28vw, 300px);
  align-content: center;
  align-items: baseline;
  justify-content: center;
  gap: 0 clamp(.08rem, .45vw, .25rem);
  flex-wrap: wrap;
  padding: clamp(.7rem, 2vw, 1.1rem);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  text-align: center;
}

.sample-cloud > .sample-cloud-word {
  position: static;
  inset: auto;
  display: inline-block;
  flex: 0 0 auto;
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(2.25rem, 4.6vw, 4rem);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .78;
  white-space: nowrap;
  transform: none;
}

.sample-cloud > .sample-cloud-word:nth-child(5n + 1) { color: #8b4051; }
.sample-cloud > .sample-cloud-word:nth-child(5n + 2) { color: #8b6c24; }
.sample-cloud > .sample-cloud-word:nth-child(5n + 3) { color: #315f55; }
.sample-cloud > .sample-cloud-word:nth-child(5n + 4) { color: #31556f; }

.sample-cloud > .sample-cloud-word[data-frequency="2"] {
  font-size: clamp(3.6rem, 7vw, 6.4rem);
}

.sample-cloud > .sample-cloud-word[data-frequency="4"] {
  font-size: clamp(6.4rem, 12.5vw, 11rem);
  line-height: .68;
}

.share-dialog {
  width: min(680px, calc(100vw - 1.25rem));
  padding: clamp(.75rem, 2.2vw, 1.35rem);
}

.share-preview {
  padding: clamp(1rem, 3.5vw, 2.25rem);
}

.share-preview h2 {
  margin-bottom: clamp(.9rem, 2vw, 1.35rem);
  font-size: clamp(2.1rem, 8vw, 4.1rem);
}

.share-preview .inkprint-grid {
  width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: clamp(2px, .35vw, 3px);
  padding: clamp(2px, .35vw, 3px);
  background: var(--cell-ink);
}

.share-preview .inkprint-cell {
  min-width: 0;
  border: 0;
}

.share-preview .inkprint-cell::after {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  min-width: 1.55em;
  height: 1.55em;
  place-items: center;
  border-top: 1px solid var(--cell-ink);
  border-left: 1px solid var(--cell-ink);
  background: var(--cell-paper);
  color: var(--cell-ink);
  content: attr(data-guess);
  font-family: var(--poster);
  font-size: clamp(.68rem, 1.8vw, .88rem);
  font-weight: 900;
  line-height: 1;
}

.share-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .6rem 1rem;
  margin-top: .8rem;
  align-items: end;
}

.share-legend {
  display: flex;
  grid-column: 1 / -1;
  gap: .65rem 1.1rem;
  color: #445e61;
  font-family: var(--playful);
  font-size: clamp(.84rem, 2.2vw, 1rem);
  font-weight: 800;
}

.share-legend span {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
}

.share-legend i {
  display: inline-block;
  width: 1.15rem;
  aspect-ratio: 1;
  border: 1px solid #24373f;
}

.share-legend .is-phrase {
  background: repeating-linear-gradient(135deg, #f4f4ec 0 3px, #24373f 3px 5px);
}

.share-legend .is-blot {
  border: 0;
  border-radius: 43% 57% 38% 62% / 57% 42% 58% 43%;
  background: #8b4051;
  transform: rotate(-10deg);
}

.share-legend .is-open {
  border-style: dashed;
  opacity: .55;
}

.share-preview-metrics {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: .35rem .8rem;
  margin: 0;
  font-size: clamp(.95rem, 2.4vw, 1.15rem);
}

.share-preview-metrics span {
  white-space: nowrap;
}

.share-preview-date {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  text-align: right;
}

.hint-explainer span {
  display: block;
}

@media (max-width: 760px) {
  .issue-line {
    display: none;
  }

  .utility-menu summary {
    min-width: 58px;
    padding-right: 1.05rem;
    font-size: .82rem;
  }

  .utility-menu summary::before,
  .utility-menu summary::after {
    right: 0;
    width: .72rem;
  }

  .sample-cloud {
    min-height: 190px;
    gap: 0 .12rem;
    padding: .65rem .45rem;
  }

  .sample-cloud > .sample-cloud-word {
    font-size: clamp(1.8rem, 8.4vw, 3rem);
  }

  .sample-cloud > .sample-cloud-word[data-frequency="2"] {
    font-size: clamp(2.75rem, 12.5vw, 4.4rem);
  }

  .sample-cloud > .sample-cloud-word[data-frequency="4"] {
    font-size: clamp(5rem, 22vw, 7.5rem);
  }

  .calendar-day .ink-status {
    right: .28rem;
    bottom: .24rem;
  }
}

@media (max-width: 380px) {
  .share-dialog {
    width: calc(100vw - .75rem);
    padding: .55rem;
  }

  .share-preview {
    padding: .85rem .65rem;
  }

  .share-preview h2 {
    font-size: clamp(1.85rem, 10vw, 2.35rem);
  }

  .share-legend {
    flex-wrap: wrap;
    gap: .45rem .65rem;
    font-size: .76rem;
  }

  .share-preview-metrics {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    white-space: normal;
  }

  .share-preview-date {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .calendar-day .ink-status {
    width: 1.05rem;
  }
}

/* Carry each puzzle's print palette into the playable page. */
:root {
  --daily-ink-1: #8d392d;
  --daily-ink-2: #252723;
  --daily-ink-3: #9a741b;
  --daily-ink-4: #334b66;
  --daily-ink-5: #48604b;
  --daily-color-1: var(--daily-ink-1);
  --daily-color-2: var(--daily-ink-2);
  --daily-color-3: var(--daily-ink-3);
  --daily-color-4: var(--daily-ink-4);
  --daily-color-5: var(--daily-ink-5);
  --daily-on-color: #f1f1e9;
  --daily-registration: linear-gradient(
    90deg,
    var(--daily-color-1) 0 20%,
    var(--daily-color-2) 20% 40%,
    var(--daily-color-3) 40% 60%,
    var(--daily-color-4) 60% 80%,
    var(--daily-color-5) 80% 100%
  );
}

:root[data-theme="dark"] {
  --daily-color-1: color-mix(in srgb, var(--daily-ink-1) 54%, var(--ink));
  --daily-color-2: color-mix(in srgb, var(--daily-ink-2) 52%, var(--ink));
  --daily-color-3: color-mix(in srgb, var(--daily-ink-3) 58%, var(--ink));
  --daily-color-4: color-mix(in srgb, var(--daily-ink-4) 54%, var(--ink));
  --daily-color-5: color-mix(in srgb, var(--daily-ink-5) 58%, var(--ink));
  --daily-on-color: var(--paper);
}

.view[data-view="today"] {
  position: relative;
}

body[data-active-view="today"] .masthead::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 5px;
  background: var(--daily-registration);
  content: "";
  pointer-events: none;
}

body[data-active-view="today"] .issue-line {
  color: var(--daily-color-4);
}

body[data-active-view="today"] .found-ledger,
body[data-active-view="today"] .completion {
  position: relative;
  background: color-mix(in srgb, var(--daily-color-1) 8%, transparent);
}

body[data-active-view="today"] .found-ledger {
  border-left: 4px solid var(--daily-color-1);
}

body[data-active-view="today"] .found-ledger::before,
body[data-active-view="today"] .completion::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: var(--daily-registration);
  content: "";
  pointer-events: none;
}

body[data-active-view="today"] .remaining-readout strong,
body[data-active-view="today"] .completion h2,
body[data-active-view="today"] .inkprint-details > span:last-child {
  color: var(--daily-color-1);
}

body[data-active-view="today"] .found-ledger li[data-pattern="1"]::before {
  border-color: var(--daily-color-1);
  background: repeating-linear-gradient(135deg, var(--paper) 0 2px, var(--daily-color-1) 2px 4px);
}

body[data-active-view="today"] .found-ledger li[data-pattern="2"]::before {
  border-color: var(--daily-color-2);
  background: conic-gradient(var(--daily-color-2) 25%, var(--paper) 0 50%, var(--daily-color-2) 0 75%, var(--paper) 0) 0 0 / 5px 5px;
}

body[data-active-view="today"] .found-ledger li[data-pattern="3"]::before {
  border-color: var(--daily-color-3);
  background: repeating-linear-gradient(45deg, var(--daily-color-3) 0 2px, var(--paper) 2px 4px);
}

body[data-active-view="today"] .found-ledger li[data-pattern="4"]::before {
  border-color: var(--daily-color-4);
  background:
    repeating-linear-gradient(45deg, transparent 0 1px, var(--daily-color-4) 1px 3px),
    repeating-linear-gradient(135deg, var(--paper) 0 1px, var(--daily-color-4) 1px 3px);
}

body[data-active-view="today"] .phrase-form input,
body[data-active-view="today"] .guess-builder {
  border-bottom-color: var(--daily-color-1);
}

body[data-active-view="today"] .phrase-form .puzzle-hint {
  border-color: var(--daily-color-4);
  border-bottom-color: var(--daily-color-4);
  background: color-mix(in srgb, var(--daily-color-4) 7%, var(--paper));
  color: var(--daily-color-4);
}

body[data-active-view="today"] .phrase-form .puzzle-hint:disabled {
  border-color: var(--rule);
  background: var(--paper-raised);
  color: var(--ink-soft);
}

body[data-active-view="today"] .phrase-form #submit-button,
body[data-active-view="today"] .completion > .ink-button {
  border-color: var(--daily-color-1);
  background: var(--daily-color-1);
  color: var(--daily-on-color);
}

body[data-active-view="today"] .phrase-form #submit-button:hover:not(:disabled),
body[data-active-view="today"] .phrase-form #submit-button:focus-visible,
body[data-active-view="today"] .completion > .ink-button:hover,
body[data-active-view="today"] .completion > .ink-button:focus-visible {
  border-color: var(--daily-color-4);
  background: var(--daily-color-4);
  color: var(--daily-on-color);
}

body[data-active-view="today"] .phrase-form #submit-button:disabled {
  border-color: var(--rule);
  background: var(--rule);
  color: var(--paper);
}

body[data-active-view="today"] .inkprint-card {
  border-left: 4px solid var(--daily-color-1);
  background: color-mix(in srgb, var(--daily-color-4) 6%, var(--paper-raised));
}

body[data-active-view="today"] .answer-reveal li:nth-child(1)::before { color: var(--daily-color-1); }
body[data-active-view="today"] .answer-reveal li:nth-child(2)::before { color: var(--daily-color-2); }
body[data-active-view="today"] .answer-reveal li:nth-child(3)::before { color: var(--daily-color-3); }
body[data-active-view="today"] .answer-reveal li:nth-child(4)::before { color: var(--daily-color-4); }

@media (max-width: 760px) {
  body[data-active-view="today"] .masthead::after {
    display: none;
  }

  body[data-active-view="today"] .view[data-view="today"]::before {
    position: absolute;
    top: max(1rem, env(safe-area-inset-top));
    right: 3.4rem;
    left: .15rem;
    height: 5px;
    background: var(--daily-registration);
    content: "";
    pointer-events: none;
  }

  body[data-active-view="today"] .found-ledger {
    border-left-width: 3px;
  }
}

@media (max-width: 340px) {
  .utility-menu summary {
    min-width: 36px;
    padding-right: 0;
    color: transparent;
    font-size: 0;
  }

  .utility-menu summary::before,
  .utility-menu summary::after {
    width: 1rem;
    color: var(--ink);
  }
}

@media (max-width: 340px) and (max-height: 620px) {
  .word-cloud {
    min-height: 46dvh;
  }
}

/* Let the completed Inkprint breathe as one piece on phones. */
@media (max-width: 600px) {
  .gameplay-stage.is-complete .completion {
    grid-template-areas:
      "heading"
      "inkprint"
      "connection"
      "share"
      "fallback";
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .gameplay-stage.is-complete .inkprint-card {
    width: 100%;
  }

  .gameplay-stage.is-complete .inkprint-grid {
    width: min(100%, 290px);
  }

  .gameplay-stage.is-complete .inkprint-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .45rem;
    margin-top: .8rem;
  }

  .gameplay-stage.is-complete .inkprint-details span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .gameplay-stage.is-complete .inkprint-details > span:last-child {
    justify-self: start;
    white-space: nowrap;
  }

  .gameplay-stage.is-complete .connection-reveal {
    margin-top: .35rem;
  }

  .gameplay-stage.is-complete .completion > .ink-button {
    width: auto;
  }

  .share-details {
    margin-top: 1.1rem;
  }
}

/* Results, archive, and control refinements */
.masthead {
  position: relative;
  z-index: 20;
}

.utility-menu {
  z-index: 30;
}

.utility-menu summary {
  min-width: 88px;
  padding: 0 1.8rem 0 .65rem;
}

.utility-panel {
  z-index: 40;
}

.primary-nav a,
.text-button {
  width: 100%;
}

.ledger-heading {
  justify-content: flex-start;
  margin-bottom: .9rem;
}

.remaining-readout {
  justify-items: start;
}

.found-ledger ol {
  margin-top: .85rem;
}

.completion {
  grid-template-areas:
    "heading inkprint"
    "share inkprint";
  grid-template-columns: minmax(180px, .42fr) minmax(280px, .58fr);
  width: min(720px, 100%);
}

button.inkprint-card {
  width: 100%;
  appearance: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.inkprint-card:hover,
button.inkprint-card:focus-visible {
  background: color-mix(in srgb, var(--accent) 13%, var(--paper-raised));
}

.share-details {
  margin-top: clamp(1.25rem, 4vw, 2rem);
}

.color-explainer span,
.hint-explainer span,
.dialog-hint span {
  color: var(--aside-ink);
  font-weight: 700;
}

.color-explainer span,
.hint-explainer span {
  display: block;
}

.dialog-hint {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.25rem;
}

.dialog-hint p {
  margin: 0;
}

.dialog-hint strong {
  color: var(--ink);
}

.archive-view {
  display: block;
  max-width: 1180px;
  padding-top: clamp(2rem, 5vw, 4.5rem);
}

.archive-lead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1rem, 2.5vw, 2rem);
}

.archive-lead .underlined-link {
  margin: 0 0 .35rem;
}

.archive-calendar {
  position: relative;
  isolation: isolate;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.archive-calendar::before {
  position: absolute;
  top: .35rem;
  right: 5%;
  z-index: 0;
  width: min(48vw, 470px);
  height: clamp(90px, 13vw, 145px);
  background:
    radial-gradient(ellipse at 18% 58%, color-mix(in srgb, var(--archive-blue) 18%, transparent) 0 23%, transparent 25%),
    radial-gradient(ellipse at 47% 42%, color-mix(in srgb, var(--archive-green) 14%, transparent) 0 32%, transparent 34%),
    radial-gradient(ellipse at 76% 61%, color-mix(in srgb, var(--archive-gold) 14%, transparent) 0 25%, transparent 27%),
    radial-gradient(circle at 94% 35%, color-mix(in srgb, var(--miss) 11%, transparent) 0 9%, transparent 11%);
  content: "";
  opacity: .72;
  transform: rotate(-3deg);
  pointer-events: none;
}

.calendar-toolbar,
.calendar-weekdays,
.archive-list,
.calendar-key {
  position: relative;
  z-index: 1;
}

.calendar-toolbar {
  margin-bottom: .45rem;
}

.calendar-weekdays {
  padding-inline: .2rem;
  font-size: clamp(.95rem, 1.5vw, 1.15rem);
}

.archive-list {
  gap: clamp(3px, .55vw, 7px);
}

.calendar-day,
a.calendar-day {
  aspect-ratio: 1.12;
  outline: 0;
  background: transparent;
}

a.calendar-day:hover {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.calendar-number {
  position: static;
  color: inherit;
  font-size: clamp(1.05rem, 2.2vw, 1.55rem);
}

a.calendar-day.is-complete {
  background: var(--archive-blue);
  color: var(--paper);
}

a.calendar-day.is-progress {
  background: color-mix(in srgb, var(--archive-green) 27%, transparent);
  color: var(--ink);
}

a.calendar-day.is-failed {
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--miss) 60%, transparent) 0 4px, transparent 4px 9px);
  color: var(--ink);
}

a.calendar-day.is-unplayed {
  background: transparent;
  color: var(--ink);
}

.calendar-key {
  display: flex;
  gap: .75rem 1.4rem;
  padding-top: 1.25rem;
  font-size: 1rem;
}

.calendar-swatch {
  display: inline-block;
  width: 1rem;
  aspect-ratio: 1;
}

.calendar-swatch.is-complete {
  background: var(--archive-blue);
}

.calendar-swatch.is-progress {
  background: color-mix(in srgb, var(--archive-green) 27%, transparent);
}

.calendar-swatch.is-failed {
  background: repeating-linear-gradient(135deg, var(--miss) 0 2px, transparent 2px 4px);
}

.calendar-swatch.is-unplayed {
  outline: 1px solid var(--rule);
  outline-offset: -1px;
}

@media (max-width: 600px) {
  .gameplay-stage.is-complete .completion {
    grid-template-areas:
      "heading"
      "inkprint"
      "share";
    grid-template-columns: minmax(0, 1fr);
  }

  .archive-lead {
    display: block;
  }

  .archive-lead .underlined-link {
    margin-top: .9rem;
  }

  .calendar-day,
  a.calendar-day {
    aspect-ratio: 1;
  }

  .calendar-key {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
  }

  .share-details {
    margin-top: 1.4rem;
  }
}

@media (max-width: 340px) {
  .utility-menu summary {
    width: 44px;
    min-width: 44px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
  }

  .utility-menu summary::before,
  .utility-menu summary::after {
    right: 0;
    width: 1rem;
    color: var(--ink);
  }

  .utility-panel {
    width: calc(100vw - .75rem);
  }
}

/* Responsive metadata and header cleanup */
.hint-action > span:first-child {
  font-size: inherit;
}

.inkprint-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem 1rem;
  min-width: 0;
}

#inkprint-metrics {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0 .15rem;
}

#inkprint-date {
  align-self: end;
  white-space: nowrap;
}

.share-details {
  grid-template-columns: minmax(0, 1fr);
  gap: .7rem;
  min-width: 0;
}

.share-preview-metrics,
.share-preview-date {
  min-width: 0;
}

.share-preview-date {
  justify-self: start;
  text-align: left;
}

@media (max-width: 600px) {
  .share-preview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: .5rem .8rem;
  }

  .share-preview-metrics span {
    white-space: normal;
  }

  .gameplay-stage.is-complete .inkprint-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .archive-calendar::before {
    top: 1.15rem;
    right: -8%;
    width: 72vw;
    height: 88px;
    opacity: .55;
  }
}

@media (max-width: 340px) {
  #hint-button-label {
    font-size: .76rem;
  }

  #hint-button-label::after {
    content: none;
  }
}

/* Mobile play states, including the reduced visual viewport above a keyboard */
@media (max-width: 760px) and (max-height: 600px) {
  .masthead {
    min-height: 44px;
  }

  .wordmark {
    font-size: clamp(1.45rem, 7vw, 1.85rem);
  }

  .help-action {
    width: 34px;
    min-height: 34px;
  }

  main,
  .gameplay-stage {
    min-height: calc(100dvh - 44px);
  }

  .word-cloud {
    min-height: clamp(170px, 40dvh, 240px);
    padding-top: 1.8rem;
  }

  .cloud-word {
    font-size: clamp(1.9rem, 9.5vw, 3rem);
    line-height: .82;
  }

  .cloud-word[data-frequency="2"] {
    font-size: clamp(3.4rem, 18.5vw, 4.7rem);
  }

  .cloud-word[data-frequency="3"] {
    font-size: clamp(3.8rem, 21.5vw, 5.4rem);
  }

  .cloud-word[data-frequency="4"] {
    font-size: clamp(4.7rem, 23.5vw, 6.5rem);
  }

  .cloud-word[data-frequency="1"][data-length="medium"] {
    font-size: clamp(1.4rem, 7vw, 2.2rem);
  }

  .cloud-word[data-frequency="1"][data-length="wide"] {
    font-size: clamp(1.25rem, 6.2vw, 1.95rem);
  }

  .cloud-word[data-frequency="1"][data-length="long"] {
    font-size: clamp(1rem, 4.8vw, 1.55rem);
  }

  .cloud-word[data-frequency="1"][data-length="very-long"] {
    font-size: clamp(.95rem, 4.4vw, 1.4rem);
  }

  .puzzle-hint {
    min-height: 36px;
    margin-top: .2rem;
    font-size: clamp(.82rem, 3.6vw, 1rem);
  }

  .hint-reveal {
    padding-block: .28rem .32rem;
    font-size: 1rem;
  }

  .phrase-form {
    margin-top: .05rem;
  }

  .phrase-form input,
  .phrase-form button {
    min-height: 44px;
  }

  .feedback {
    min-height: 1.05rem;
    margin-top: .18rem;
    font-size: .78rem;
  }

  .found-ledger {
    display: grid;
    min-height: 0;
    grid-template-areas:
      "remaining track"
      "guesses phrases";
    grid-template-columns: auto minmax(0, 1fr);
    gap: .25rem .75rem;
    align-items: center;
    margin-top: .25rem;
    padding: .42rem .6rem;
  }

  .ledger-heading {
    grid-area: remaining;
    margin: 0;
  }

  .remaining-readout strong {
    font-size: 1.45rem;
  }

  .remaining-readout span {
    font-size: .8rem;
  }

  .attempt-track {
    grid-area: track;
    justify-self: end;
    width: min(128px, 100%);
    margin: 0;
  }

  .guesses-left {
    grid-area: guesses;
    margin: 0;
    font-size: .78rem;
  }

  .found-ledger ol {
    grid-area: phrases;
    gap: .15rem .5rem;
    margin: 0;
  }

  .found-ledger li {
    font-size: clamp(.82rem, 3.6vw, 1rem);
  }

  .gameplay-stage:focus-within:not(.is-complete) .found-ledger {
    display: none;
  }

  .gameplay-stage.is-complete {
    grid-template-areas:
      "notice"
      "cloud"
      "complete";
    grid-template-rows: auto minmax(105px, .34fr) minmax(0, .66fr);
    min-height: calc(100dvh - 44px);
  }

  .gameplay-stage.is-complete .word-cloud {
    min-height: 105px;
  }

  .gameplay-stage.is-complete .found-ledger {
    display: none;
  }

  .gameplay-stage.is-complete .completion {
    align-self: start;
    gap: .45rem;
    margin-top: .25rem;
    padding-top: .45rem;
  }
}

@media (max-width: 760px) {
  body[data-keyboard-open="true"] .masthead {
    min-height: 44px;
  }

  body[data-keyboard-open="true"] main {
    min-height: calc(var(--visible-viewport-height, 100dvh) - 44px);
  }

  body[data-keyboard-open="true"] .gameplay-stage {
    height: calc(var(--visible-viewport-height, 100dvh) - 44px);
    min-height: 0;
    grid-template-areas:
      "notice"
      "cloud"
      "hint"
      "form";
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    overflow: hidden;
  }

  body[data-keyboard-open="true"] .word-cloud {
    min-height: 0;
    height: 100%;
    padding-top: 1.8rem;
  }

  body[data-keyboard-open="true"] .found-ledger,
  body[data-keyboard-open="true"] .completion {
    display: none;
  }
}

/* Compact puzzle controls and full-viewport secondary pages */
.masthead {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.puzzle-hint {
  grid-area: cloud;
  z-index: 2;
  align-self: start;
  justify-self: end;
  min-height: 44px;
  margin: .55rem .65rem 0 0;
  padding: .35rem .18rem .18rem;
  border: 0;
  border-bottom: 3px solid var(--accent);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  color: var(--accent);
  font-family: var(--poster);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 950;
  letter-spacing: -.025em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.hint-call {
  color: var(--miss);
}

.hint-count {
  color: var(--accent);
}

.puzzle-hint:hover,
.puzzle-hint:focus-visible {
  color: var(--date-ink);
  border-bottom-color: var(--date-ink);
}

.puzzle-hint:hover .hint-count,
.puzzle-hint:focus-visible .hint-count {
  color: var(--date-ink);
}

.puzzle-hint:focus-visible {
  outline: 0;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--date-ink) 22%, transparent);
}

.puzzle-hint:disabled {
  color: var(--rule);
  border-bottom-color: var(--rule);
  cursor: default;
}

.puzzle-hint:disabled .hint-call,
.puzzle-hint:disabled .hint-count {
  color: var(--rule);
}

.word-cloud {
  padding-top: 2.5rem;
}

.hint-reveal {
  margin-top: .1rem;
  margin-bottom: .2rem;
  padding: .38rem .75rem .42rem;
  border-left-width: 5px;
  background: transparent;
  color: var(--accent);
  font-family: var(--poster);
  font-size: clamp(1.18rem, 2vw, 1.5rem);
  font-weight: 950;
  letter-spacing: -.025em;
  line-height: 1.08;
}

.found-ledger ol {
  margin-top: 1.25rem;
}

.archive-view {
  position: relative;
  isolation: isolate;
  display: grid;
  width: auto;
  height: calc(100dvh - 62px);
  max-width: 980px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: .35rem;
  padding-top: clamp(.7rem, 1.8dvh, 1.25rem);
  padding-bottom: clamp(.5rem, 1.2dvh, .9rem);
  overflow: hidden;
}

.archive-view::before {
  position: absolute;
  top: -12rem;
  left: -6rem;
  z-index: 0;
  width: clamp(340px, 42vw, 460px);
  aspect-ratio: 1;
  background: color-mix(in srgb, var(--miss) 10%, transparent);
  content: "";
  -webkit-mask:
    radial-gradient(circle at 48% 52%, #000 0 34%, transparent 34.8%),
    radial-gradient(circle at 20% 27%, #000 0 9%, transparent 9.8%),
    radial-gradient(circle at 79% 31%, #000 0 11%, transparent 11.8%),
    radial-gradient(circle at 78% 77%, #000 0 7%, transparent 7.8%),
    radial-gradient(circle at 21% 78%, #000 0 5%, transparent 5.8%);
  mask:
    radial-gradient(circle at 48% 52%, #000 0 34%, transparent 34.8%),
    radial-gradient(circle at 20% 27%, #000 0 9%, transparent 9.8%),
    radial-gradient(circle at 79% 31%, #000 0 11%, transparent 11.8%),
    radial-gradient(circle at 78% 77%, #000 0 7%, transparent 7.8%),
    radial-gradient(circle at 21% 78%, #000 0 5%, transparent 5.8%);
  transform: rotate(-11deg);
  pointer-events: none;
}

.archive-lead,
.archive-calendar {
  position: relative;
  z-index: 1;
}

.archive-lead {
  margin-bottom: 0;
}

.archive-lead h1 {
  font-size: clamp(3rem, 5.2vw, 4rem);
}

.archive-calendar {
  display: flex;
  width: min(780px, 100%);
  min-height: 0;
  flex-direction: column;
  justify-self: center;
  overflow: visible;
}

.archive-calendar::before {
  content: none;
}

.calendar-toolbar {
  min-height: 44px;
  margin-bottom: 0;
}

.calendar-toolbar h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
}

.calendar-weekdays {
  padding: .3rem .15rem .22rem;
  font-size: clamp(.82rem, 1.25vw, .98rem);
}

.archive-list {
  gap: clamp(2px, .35vw, 4px);
}

.calendar-day,
a.calendar-day {
  height: clamp(30px, 5.6dvh, 54px);
  aspect-ratio: auto;
}

.calendar-number {
  font-size: clamp(.92rem, 1.55vw, 1.18rem);
}

.calendar-key {
  gap: .4rem 1.1rem;
  padding-top: .5rem;
  font-size: .9rem;
}

.calendar-swatch {
  width: .85rem;
}

html[data-active-view="archive"],
body[data-active-view="archive"],
html[data-active-view="how-to-play"],
body[data-active-view="how-to-play"] {
  overflow-y: hidden;
}

.how-view {
  width: auto;
  height: calc(100dvh - 62px);
  padding-top: clamp(.65rem, 1.8dvh, 1.2rem);
  padding-bottom: clamp(.5rem, 1.2dvh, .9rem);
  align-items: center;
  gap: clamp(1.25rem, 4vw, 4rem);
  overflow: hidden;
}

.how-rules h1 {
  color: var(--date-ink);
  font-size: clamp(2.8rem, 6vw, 4.6rem);
}

.how-rules ol {
  gap: clamp(.45rem, 1.2dvh, .85rem);
  margin: clamp(.65rem, 1.6dvh, 1.15rem) 0;
  font-size: clamp(1.05rem, 1.7vw, 1.32rem);
  line-height: 1.25;
}

.hint-explainer,
.color-explainer {
  margin-bottom: clamp(.45rem, 1.1dvh, .8rem);
  font-size: clamp(1rem, 1.65vw, 1.22rem);
  line-height: 1.2;
}

.how-rules .underlined-link {
  color: var(--miss);
}

.type-example {
  min-height: 0;
}

.sample-cloud {
  min-height: clamp(150px, 27dvh, 220px);
}

.sample-phrases {
  gap: .22rem .8rem;
  margin-top: .55rem;
  font-size: clamp(1rem, 2.2vw, 1.65rem);
}

@media (max-width: 760px) {
  html[data-active-view="today"],
  body[data-active-view="today"] {
    overflow-y: hidden;
  }

  .masthead {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }

  .gameplay-stage {
    grid-template-areas:
      "notice"
      "cloud"
      "hint"
      "form"
      "found"
      "complete";
  }

  .puzzle-hint {
    margin: .35rem .3rem 0 0;
    font-size: clamp(.96rem, 4vw, 1.12rem);
  }

  .word-cloud {
    min-height: clamp(290px, 44dvh, 390px);
    padding-top: 2.35rem;
  }

  .found-ledger ol {
    margin-top: 1.05rem;
  }

  .archive-view {
    height: calc(100dvh - 56px);
    gap: .2rem;
    padding-top: .45rem;
    padding-bottom: .35rem;
  }

  .archive-view::before {
    top: -7.2rem;
    left: -19vw;
    width: min(92vw, 350px);
  }

  .archive-lead {
    display: block;
  }

  .archive-lead h1 {
    font-size: clamp(2.3rem, 11vw, 3rem);
    white-space: nowrap;
  }

  .archive-lead .underlined-link {
    display: inline-block;
    margin: .15rem 0 0;
    font-size: clamp(.88rem, 3.4vw, 1.05rem);
    white-space: nowrap;
  }

  .archive-calendar {
    width: 100%;
  }

  .calendar-toolbar {
    min-height: 40px;
  }

  .calendar-toolbar h2 {
    font-size: 1.35rem;
  }

  .calendar-weekdays {
    padding-block: .18rem;
    font-size: clamp(.72rem, 3vw, .86rem);
  }

  .calendar-day,
  a.calendar-day {
    height: clamp(28px, 5.15dvh, 42px);
  }

  .calendar-number {
    font-size: clamp(.78rem, 3.3vw, .96rem);
  }

  .calendar-key {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .28rem .7rem;
    padding-top: .38rem;
    font-size: clamp(.78rem, 3.1vw, .9rem);
  }

  .how-view {
    height: calc(100dvh - 56px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    gap: .5rem;
    padding-top: .4rem;
    padding-bottom: .35rem;
  }

  .how-rules h1 {
    font-size: clamp(2.25rem, 11vw, 3rem);
  }

  .how-rules ol {
    gap: .3rem;
    margin: .45rem 0;
    padding-left: 1.05rem;
    font-size: clamp(.94rem, 3.8vw, 1.08rem);
    line-height: 1.18;
  }

  .hint-explainer,
  .color-explainer {
    margin-bottom: .32rem;
    font-size: clamp(.92rem, 3.5vw, 1.04rem);
    line-height: 1.08;
  }

  .how-rules .underlined-link {
    font-size: clamp(.96rem, 3.6vw, 1.06rem);
  }

  .type-example {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(130px, .9fr);
    gap: .55rem;
    align-items: center;
  }

  .sample-cloud {
    min-height: clamp(120px, 22dvh, 170px);
    padding: .35rem .2rem;
  }

  .sample-cloud > .sample-cloud-word {
    font-size: clamp(1.15rem, 5.7vw, 2rem);
    line-height: .82;
  }

  .sample-cloud > .sample-cloud-word[data-frequency="2"] {
    font-size: clamp(1.8rem, 8.5vw, 3rem);
  }

  .sample-cloud > .sample-cloud-word[data-frequency="4"] {
    font-size: clamp(3rem, 15vw, 5.1rem);
    line-height: .72;
  }

  .sample-phrases {
    grid-template-columns: minmax(0, 1fr);
    gap: .24rem;
    margin: 0;
    font-size: clamp(.82rem, 3vw, 1rem);
    line-height: 1.06;
  }

  .sample-phrases p {
    margin: 0;
  }
}

@media (max-width: 390px) {
  .archive-lead h1 {
    font-size: clamp(2.05rem, 10.5vw, 2.55rem);
  }

  .archive-lead .underlined-link {
    font-size: .82rem;
  }

  .type-example {
    grid-template-columns: minmax(0, 1fr) 128px;
    gap: .4rem;
  }
}

@media (max-width: 340px) {
  #hint-button-label {
    font-size: .76rem;
  }

  #hint-button-label::after {
    content: none;
  }
}

/* Keep the playable core above a phone keyboard. This belongs last so older
   viewport refinements cannot re-expand the cloud in the short state. */
@media (max-width: 760px) and (max-height: 600px) {
  .masthead {
    min-height: 44px;
  }

  main,
  .gameplay-stage {
    min-height: calc(100dvh - 44px);
  }

  .gameplay-stage .word-cloud {
    min-height: clamp(160px, 39dvh, 225px);
    padding-top: 1.8rem;
  }

  .gameplay-stage:focus-within:not(.is-complete) .found-ledger {
    display: none;
  }

  .gameplay-stage.is-complete .word-cloud {
    min-height: 105px;
  }
}

@media (max-width: 760px) {
  .gameplay-stage.is-complete {
    grid-template-areas:
      "notice"
      "cloud"
      "complete";
    grid-template-rows: auto minmax(105px, .34fr) minmax(0, .66fr);
  }

  .gameplay-stage.is-complete .found-ledger {
    display: none;
  }

  body[data-keyboard-open="true"] .gameplay-stage .word-cloud {
    min-height: 0;
    height: 100%;
    padding-top: 1.8rem;
  }
}

@media (min-width: 480px) and (max-width: 760px) and (max-height: 480px) {
  .gameplay-stage.is-complete {
    grid-template-areas:
      "notice"
      "complete";
    grid-template-rows: auto minmax(0, 1fr);
  }

  .gameplay-stage.is-complete .word-cloud {
    display: none;
  }

  .gameplay-stage.is-complete .completion {
    grid-template-areas:
      "heading inkprint"
      "share inkprint";
    grid-template-columns: minmax(145px, .42fr) minmax(260px, .58fr);
    gap: .45rem 1rem;
    align-self: center;
    margin-top: 0;
  }

  .gameplay-stage.is-complete .inkprint-details {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .3rem .65rem;
    margin-top: .35rem;
  }
}

/* Mobile browser chrome and device cutouts change the visible canvas while
   the page is open. Size every mobile view from the live visual viewport. */
@media (max-width: 760px) {
  :root {
    --mobile-header-height: 52px;
  }

  html,
  body {
    height: calc(var(--visible-viewport-height, 100dvh) + var(--visible-viewport-top, 0px));
    min-height: calc(var(--visible-viewport-height, 100dvh) + var(--visible-viewport-top, 0px));
  }

  .masthead {
    min-height: calc(var(--mobile-header-height) + env(safe-area-inset-top));
    margin-left: max(.7rem, env(safe-area-inset-left));
    margin-right: max(.7rem, env(safe-area-inset-right));
    padding-top: env(safe-area-inset-top);
    translate: 0 var(--visible-viewport-top, 0px);
  }

  main {
    height: calc(
      var(--visible-viewport-height, 100dvh)
      - var(--mobile-header-height)
      - env(safe-area-inset-top)
    );
    min-height: 0;
    translate: 0 var(--visible-viewport-top, 0px);
  }

  .view[data-view="today"] {
    height: 100%;
    margin-left: max(.6rem, env(safe-area-inset-left));
    margin-right: max(.6rem, env(safe-area-inset-right));
    padding-bottom: env(safe-area-inset-bottom);
  }

  .gameplay-stage {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
    row-gap: 0;
  }

  .gameplay-stage .word-cloud {
    height: 100%;
    min-height: 0;
    padding-top: 2rem;
  }

  .gameplay-stage.is-complete .completion {
    align-self: start;
    align-content: start;
    grid-auto-rows: max-content;
  }

  .phrase-form {
    margin-top: 0;
  }

  .feedback {
    margin-top: .18rem;
  }

  .found-ledger {
    margin-top: .35rem;
  }

  .archive-view,
  .statistics-view,
  .how-view {
    width: 100%;
    height: 100%;
    margin-inline: 0;
    padding-left: max(1.1rem, env(safe-area-inset-left));
    padding-right: max(1.1rem, env(safe-area-inset-right));
    padding-bottom: max(.75rem, env(safe-area-inset-bottom));
  }

  .archive-view {
    gap: .35rem;
  }

  .archive-calendar {
    width: 100%;
  }

  .statistics-view {
    align-content: start;
    gap: 1.35rem;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .statistics-list {
    gap: .65rem;
  }

  .statistics-list div {
    padding: 1rem .85rem;
  }

  body[data-keyboard-open="true"] main,
  body[data-keyboard-open="true"] .gameplay-stage {
    height: calc(
      var(--visible-viewport-height, 100dvh)
      - var(--mobile-header-height)
      - env(safe-area-inset-top)
    );
  }

  /* Keep the native-keyboard state focused on the puzzle itself. Input focus
     is more reliable than viewport-height heuristics in mobile Chrome. */
  body[data-input-active="true"] .gameplay-stage:not(.is-complete) {
    grid-template-areas:
      "notice"
      "cloud"
      "form";
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  body[data-input-active="true"] .gameplay-stage:not(.is-complete) .puzzle-hint,
  body[data-input-active="true"] .gameplay-stage:not(.is-complete) .hint-reveal,
  body[data-input-active="true"] .gameplay-stage:not(.is-complete) .found-ledger {
    display: none;
  }
}

/* Unused preview cells echo the faint, dashed state shown during play. */
.share-preview .inkprint-cell.is-unused {
  border: 2px dashed color-mix(in srgb, var(--cell-ink) 24%, transparent);
  background: color-mix(in srgb, var(--cell-paper) 97%, var(--cell-ink));
  opacity: 1;
}

.share-preview .inkprint-cell.is-unused::after {
  border-color: color-mix(in srgb, var(--cell-ink) 18%, transparent);
  background: transparent;
  color: color-mix(in srgb, var(--cell-ink) 30%, var(--cell-paper));
}

/* Keep the title as one confident ink mark; the game carries the color. */
.wordmark-letters {
  display: inline-flex;
  align-items: baseline;
}

.wordmark-letters > span {
  display: inline-block;
  color: var(--ink);
  transform-origin: 50% 80%;
}

.dialog-inkblots {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 8%, color-mix(in srgb, var(--palette-blue) 38%, transparent) 0 .22rem, transparent .27rem),
    radial-gradient(circle at 78% 92%, color-mix(in srgb, var(--palette-red) 42%, transparent) 0 .3rem, transparent .35rem),
    var(--ink);
}

.dialog-copy {
  background:
    radial-gradient(ellipse at 97% 5%, color-mix(in srgb, var(--palette-gold) 13%, transparent) 0 12%, transparent 13%),
    radial-gradient(ellipse at 8% 96%, color-mix(in srgb, var(--palette-blue) 9%, transparent) 0 15%, transparent 16%),
    var(--paper);
}

.dialog-copy li:nth-child(1)::marker { color: var(--palette-red); }
.dialog-copy li:nth-child(2)::marker { color: var(--palette-blue); }
.dialog-copy li:nth-child(3)::marker { color: var(--palette-gold); }

@media (prefers-reduced-motion: no-preference) {
  .inkblot-mark {
    animation: inkblot-color-turn 16s ease-in-out infinite;
  }

  .wordmark-letters > span {
    animation: wordmark-settle 620ms cubic-bezier(.2, .8, .25, 1) both;
  }

  .wordmark-letters > span:nth-child(2) { animation-delay: 45ms; }
  .wordmark-letters > span:nth-child(3) { animation-delay: 90ms; }
  .wordmark-letters > span:nth-child(4) { animation-delay: 135ms; }
  .wordmark-letters > span:nth-child(5) { animation-delay: 180ms; }
  .wordmark-letters > span:nth-child(6) { animation-delay: 225ms; }
  .wordmark-letters > span:nth-child(7) { animation-delay: 270ms; }
}

@keyframes inkblot-color-turn {
  0%, 100% {
    --blot-color: var(--palette-red);
    transform: rotate(-11deg) scale(1);
  }
  17% {
    --blot-color: var(--palette-rust);
    transform: rotate(-9deg) scale(1.025);
  }
  34% {
    --blot-color: var(--palette-gold);
    transform: rotate(-12deg) scale(.99);
  }
  51% {
    --blot-color: var(--palette-green);
    transform: rotate(-10deg) scale(1.02);
  }
  68% {
    --blot-color: var(--palette-sea);
    transform: rotate(-12deg) scale(1);
  }
  85% {
    --blot-color: var(--palette-blue);
    transform: rotate(-10deg) scale(1.015);
  }
}

@keyframes wordmark-settle {
  0% { opacity: 0; transform: translateY(-.18em) rotate(-4deg) scale(.96); }
  65% { opacity: 1; transform: translateY(.04em) rotate(1deg) scale(1.02); }
  100% { opacity: 1; transform: none; }
}

@media (max-width: 380px) {
  .rules-dialog[open] {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .dialog-inkblots {
    padding-inline: .3rem;
  }
}

/* Keep the hint attached to the answer it helps on wide screens. */
.phrase-form {
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "input hint-button button"
    "feedback feedback feedback";
  column-gap: .55rem;
}

.phrase-form .puzzle-hint {
  position: static;
  grid-area: hint-button;
  min-height: 48px;
  align-self: start;
  margin: 0;
  padding: .3rem .25rem .18rem;
  border: 0;
  border-bottom: 3px solid var(--accent);
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-family: var(--poster);
  font-size: clamp(.82rem, 1.15vw, 1rem);
  font-weight: 950;
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
}

.phrase-form .puzzle-hint:hover,
.phrase-form .puzzle-hint:focus-visible {
  border-bottom-color: var(--date-ink);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--date-ink);
}

.phrase-form .puzzle-hint:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.phrase-form .puzzle-hint:disabled {
  border-bottom-color: var(--rule);
  background: transparent;
  color: var(--ink-soft);
}

.hint-mobile-icon {
  display: none;
}

.mobile-menu-only {
  display: none !important;
}

/* Phones use a scrolling document, a floating menu, and a single control row. */
@media (max-width: 760px) {
  html,
  body,
  html[data-active-view],
  body[data-active-view] {
    width: 100%;
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto !important;
    overscroll-behavior-y: auto;
  }

  .masthead {
    position: static;
    width: 0;
    height: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    translate: none;
    pointer-events: none;
  }

  .masthead > .wordmark,
  .masthead > .issue-line,
  .masthead > .help-action {
    display: none;
  }

  .utility-menu {
    position: fixed;
    top: max(.5rem, env(safe-area-inset-top));
    right: max(.55rem, env(safe-area-inset-right));
    z-index: 40;
    width: 44px;
    height: 44px;
    pointer-events: auto;
  }

  .utility-menu summary {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent);
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    color: transparent;
    font-size: 0;
  }

  .utility-menu summary::before,
  .utility-menu summary::after {
    right: 11px;
    width: 20px;
    color: var(--ink);
  }

  .utility-panel {
    top: calc(100% + .4rem);
    right: 0;
    width: min(292px, calc(100vw - 1rem));
    max-height: calc(100dvh - 4rem);
    overflow-y: auto;
  }

  .primary-nav .mobile-menu-only {
    display: flex !important;
  }

  main,
  body[data-keyboard-open="true"] main {
    width: 100%;
    height: auto;
    min-height: 100dvh;
    translate: none;
  }

  .view[data-view="today"] {
    width: auto;
    height: auto;
    min-height: 100dvh;
    margin-left: max(.65rem, env(safe-area-inset-left));
    margin-right: max(.65rem, env(safe-area-inset-right));
    padding-top: max(3.5rem, calc(env(safe-area-inset-top) + 3rem));
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    overflow: visible;
  }

  .gameplay-stage,
  body[data-keyboard-open="true"] .gameplay-stage,
  body[data-input-active="true"] .gameplay-stage:not(.is-complete) {
    height: auto;
    min-height: 0;
    grid-template-areas:
      "notice"
      "cloud"
      "hint"
      "form"
      "found"
      "complete";
    grid-template-rows: repeat(6, auto);
    row-gap: .55rem;
    overflow: visible;
  }

  .gameplay-stage .word-cloud,
  body[data-keyboard-open="true"] .gameplay-stage .word-cloud {
    width: 100%;
    height: auto;
    min-height: clamp(330px, 56dvh, 500px);
    margin-bottom: .45rem;
    padding: 1rem .2rem 2rem;
    overflow: visible;
  }

  .hint-reveal {
    width: 100%;
    margin: .15rem 0 .35rem;
    padding: .65rem .75rem .7rem;
    line-height: 1.25;
  }

  .phrase-form {
    grid-template-columns: minmax(0, 1fr) 44px auto;
    grid-template-areas:
      "input hint-button button"
      "feedback feedback feedback";
    gap: 0 .4rem;
    width: 100%;
    margin: .25rem auto 0;
    padding-top: .65rem;
  }

  .phrase-form .puzzle-hint {
    position: relative;
    top: auto;
    right: auto;
    grid-area: hint-button;
    display: inline-flex;
    width: 44px;
    min-width: 44px;
    min-height: 48px;
    align-items: center;
    align-self: start;
    justify-content: center;
    justify-self: stretch;
    margin: 0;
    padding: 0;
    border: 1px solid var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, var(--paper));
    color: var(--accent);
    font-family: var(--poster);
    line-height: 1;
  }

  .phrase-form .puzzle-hint::after {
    position: absolute;
    top: -7px;
    right: -6px;
    display: grid;
    width: 19px;
    height: 19px;
    place-items: center;
    border: 1px solid var(--paper);
    border-radius: 50%;
    background: var(--miss);
    color: var(--paper);
    content: attr(data-remaining);
    font-family: var(--body);
    font-size: .68rem;
    font-weight: 900;
  }

  .phrase-form .puzzle-hint:disabled {
    border-color: var(--rule);
    background: var(--paper-raised);
    color: var(--ink-soft);
  }

  .phrase-form .puzzle-hint:disabled::after {
    background: var(--rule);
  }

  #hint-button-label {
    display: none;
  }

  .hint-mobile-icon {
    display: block;
    font-size: 1.25rem;
    font-weight: 950;
  }

  .phrase-form input,
  .phrase-form #submit-button {
    min-height: 48px;
  }

  .feedback {
    min-height: 1.25rem;
    margin-top: .35rem;
  }

  .found-ledger,
  body[data-keyboard-open="true"] .found-ledger,
  body[data-input-active="true"] .gameplay-stage:not(.is-complete) .found-ledger {
    display: grid;
    margin-top: .7rem;
    margin-bottom: 1rem;
  }

  body[data-input-active="true"] .gameplay-stage:not(.is-complete) .puzzle-hint {
    display: inline-flex;
  }

  body[data-input-active="true"] .gameplay-stage:not(.is-complete) .hint-reveal {
    display: block;
  }

  body[data-input-active="true"] .gameplay-stage:not(.is-complete) .hint-reveal[hidden] {
    display: none;
  }

  .archive-view,
  .statistics-view,
  .how-view {
    width: 100%;
    height: auto;
    min-height: 100dvh;
    margin-inline: 0;
    padding-top: max(4rem, calc(env(safe-area-inset-top) + 3.5rem));
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    overflow: visible;
  }
}

/* A finished puzzle always names every answer, whether solved or inkblotted. */
.completion {
  grid-template-areas:
    "heading inkprint"
    "answers inkprint"
    "share inkprint";
  grid-template-columns: minmax(250px, .52fr) minmax(300px, .48fr);
  width: min(880px, 100%);
}

.answer-reveal {
  grid-area: answers;
  align-self: start;
  padding-top: .45rem;
  border-top: 1px solid var(--rule);
}

.answer-reveal h3 {
  margin: 0 0 .55rem;
  color: var(--ink-soft);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.answer-reveal ol {
  display: grid;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.answer-reveal li {
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  font-weight: 800;
  line-height: 1.12;
}

.answer-reveal li::before {
  margin-right: .45rem;
  color: var(--accent);
  content: "\2022";
}

@media (max-width: 760px) {
  .gameplay-stage.is-complete .completion {
    grid-template-areas:
      "heading"
      "answers"
      "inkprint"
      "share";
    grid-template-columns: minmax(0, 1fr);
    gap: .8rem;
  }

  .answer-reveal {
    padding-top: .55rem;
  }

  .answer-reveal ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .42rem .8rem;
  }

  .answer-reveal li {
    font-size: .94rem;
  }
}

@media (max-width: 380px) {
  .answer-reveal ol {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The answer line remains typographic while each selected word stays removable. */
.guess-builder {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 0 .42rem;
  overflow: hidden;
  padding: 0 .1rem;
  border-bottom: 2px solid var(--accent);
  background: var(--paper);
  box-sizing: border-box;
}

.guess-builder::after {
  width: 2px;
  height: 1.15rem;
  flex: 0 0 auto;
  background: var(--accent);
  content: "";
}

.phrase-input-wrap.has-token-display input {
  position: absolute;
  inset: 0;
  height: 100%;
  color: transparent;
  caret-color: transparent;
}

.phrase-form .guess-word {
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  margin: 0;
  padding: .2rem .08rem .08rem;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 38%, transparent);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--playful);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}

.phrase-form .guess-word:hover,
.phrase-form .guess-word:focus-visible {
  border-bottom-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

.phrase-form .guess-word:active {
  transform: translateY(1px);
}

.phrase-form .puzzle-hint,
.phrase-form #submit-button {
  align-self: center;
}

@media (max-width: 760px) {
  .phrase-form.has-built-guess {
    grid-template-areas:
      "input input input"
      "feedback hint-button button";
    grid-template-rows: auto 48px;
    row-gap: .45rem;
  }

  .phrase-form.has-built-guess .feedback {
    min-height: 0;
    align-self: center;
    margin: 0;
  }
}

.issue-line {
  text-transform: none;
}

/* The share preview is the exact full-color PNG users send or save. */
.share-dialog {
  width: min(620px, calc(100vw - 1rem));
  max-height: calc(100dvh - 1rem);
  padding: clamp(.65rem, 2.5vw, 1.15rem);
  border: 2px solid var(--accent);
  background: var(--paper);
}

.share-preview {
  padding: 0;
  background: transparent;
  color: var(--ink);
}

.share-card {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--ink) 32%, transparent);
  background: #f1f1e9;
  box-sizing: border-box;
}

.share-preview-note {
  margin: .55rem 0 0;
  color: var(--ink-soft);
  font-family: var(--playful);
  font-size: .84rem;
  font-weight: 750;
  text-align: center;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: .65rem;
}

.share-actions .plain-button,
.share-actions .ink-button,
.share-fallback-actions .plain-button,
.share-fallback-actions .ink-button {
  min-height: 48px;
}

.share-fallback {
  margin-top: .8rem;
  padding-top: .75rem;
  border-top: 1px solid var(--rule);
}

.share-fallback p {
  margin: 0 0 .65rem;
  color: var(--ink-soft);
  font-family: var(--playful);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.35;
}

.share-fallback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.share-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.share-fallback textarea {
  width: 100%;
  margin-top: .65rem;
  box-sizing: border-box;
}

@media (max-width: 380px) {
  .share-dialog {
    width: calc(100vw - .5rem);
    max-height: calc(100dvh - .5rem);
    padding: .45rem;
  }

  .share-preview-note {
    margin-top: .4rem;
    font-size: .76rem;
  }

  .share-actions {
    margin-top: .45rem;
  }

  .share-actions button {
    flex: 1 1 0;
    padding-inline: .55rem;
    white-space: nowrap;
  }
}
