:root {
  --paper: #f1e6d2;
  --ink: #1c1814;
  --mute: #746b60;
  --tile: #fffaf0;
  --used: #d9d0bf;
  --line: #b7aa94;
  --hair: #e0d4c0;
  --accent: #8f3d1c;
  --gold: #9c7420;
  --page: 36rem;
  --gutter: 1.25rem;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.5 "Iowan Old Style", Palatino, "Palatino Linotype", "Palatino LT STD", Georgia, serif;
}

::selection {
  background: #e6d3b6;
  color: var(--ink);
}

.top {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding: 1.25rem var(--gutter) 0;
}

.back-arrow {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.55rem;
  line-height: 1;
  width: 1.35rem;
  flex-shrink: 0;
}

.top.has-back {
  justify-content: space-between;
}

.top .compose-toggle {
  margin-left: auto;
  margin-top: 0;
}

.top .search-toggle {
  margin-left: auto;
  margin-top: 0;
}

.top .search-toggle + .compose-toggle {
  margin-left: 0;
}

.mark {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.1;
  flex: 1;
}

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

.logout {
  margin-left: auto;
  flex-shrink: 0;
}

.logout button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--mute);
  border: none;
  padding: 0.15rem;
  filter: none;
}

.logout button:hover {
  color: var(--ink);
  filter: none;
  background: transparent;
}

.help-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--mute);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  filter: none;
}

.help-toggle:hover {
  color: var(--ink);
  border-color: var(--ink);
  filter: none;
}

.help {
  width: min(24rem, calc(100% - 2rem));
  padding: 1.2rem 1.25rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--tile);
  color: var(--ink);
  font: inherit;
  box-shadow: none;
}

.help::backdrop {
  background: rgba(28, 24, 20, 0.28);
}

.help p {
  margin: 0 0 0.8rem;
}

.help form {
  margin: 0.2rem 0 0;
}

main {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding: 0.85rem var(--gutter) 5.5rem;
}

.lede {
  font-size: 1.02rem;
  font-style: italic;
  color: var(--mute);
  max-width: 24rem;
  margin: 0.4rem 0 1.6rem;
}

.phrases, .anas, .queue {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 2rem;
}

.home-block {
  margin: 0 0 2.2rem;
}

.home-block h2 {
  margin: 0 0 0.2rem;
}

.home-block h2 a {
  display: inline-flex;
  align-items: center;
  gap: 0.32em;
  color: inherit;
  text-decoration: none;
}

.home-block h2 .ext {
  width: 0.9em;
  height: 0.9em;
  flex-shrink: 0;
}

.home-block h2 a:hover {
  color: var(--accent);
}

.home-block .phrases {
  margin: 0;
}

.home-block + .home-block {
  padding-top: 1.5rem;
  border-top: 1px solid var(--hair);
}

.home-block.latest {
  margin-bottom: 1.4rem;
}

.latest-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.latest-list li {
  padding: 0.32rem 0;
  border-top: 1px solid var(--hair);
}

.latest-list li:last-child {
  border-bottom: 1px solid var(--hair);
}

.latest-list .meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.latest-link {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.latest-link:hover { color: var(--accent); }

.phrases li, .anas li {
  padding: 0.82rem 0;
  border-top: 1px solid var(--hair);
}

.phrases li:last-child,
.anas li:last-child {
  border-bottom: 1px solid var(--hair);
}

.phrase-link {
  display: block;
  color: var(--gold);
  font-size: 1.18rem;
  line-height: 1.3;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.phrase-link:hover { color: var(--accent); }

.phrase-head {
  display: flex;
  align-items: flex-start;
  gap: 0.12rem;
}

.phrase-head .phrase-link {
  flex: 1;
  min-width: 0;
}

.phrase-head .more-toggle {
  margin: -0.2rem -0.2rem 0 0;
}

.top-ana {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  margin-top: 0.16rem;
  min-height: 1.35em;
  color: var(--ink);
  font-size: 1.22rem;
  font-style: italic;
  line-height: 1.35;
  text-decoration: none;
}

.top-ana:hover { color: var(--accent); }

.top-ana.muted {
  color: var(--mute);
}

.fold .sub {
  display: flex;
  align-items: center;
  gap: 0.08rem;
  margin-top: 0.08rem;
}

.more-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.7rem;
  height: 1.7rem;
  margin: -0.4rem 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mute);
  filter: none;
}

.more-toggle svg {
  display: block;
  transition: transform 0.2s ease;
}

.more-toggle:hover,
.more-toggle:focus-visible {
  color: var(--ink);
  filter: none;
}

.fold .extra {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease;
}

.fold .extra-inner {
  overflow: hidden;
  min-height: 0;
  padding-top: 0.38rem;
  color: var(--mute);
  font-size: 0.75rem;
  line-height: 1.45;
}

@media (hover: hover) {
  .fold:hover .extra {
    grid-template-rows: 1fr;
    opacity: 1;
  }

  .fold:hover .more-toggle svg {
    transform: rotate(180deg);
  }
}

.fold:has(.more-toggle:focus-visible) .extra,
.fold.open .extra {
  grid-template-rows: 1fr;
  opacity: 1;
}

.fold:has(.more-toggle:focus-visible) .more-toggle svg,
.fold.open .more-toggle svg {
  transform: rotate(180deg);
}

.meta, .muted, .left {
  color: var(--mute);
  font-size: 0.82rem;
}

h1, h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 1.55rem;
  line-height: 1.2;
  margin: 0.2rem 0 1rem;
}

h2 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--mute);
  margin: 0 0 0.65rem;
}

.phrase-title {
  font-size: 1.7rem;
  margin: 0.35rem 0 1rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.field-row {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
}

.field-row input,
.field-row textarea {
  flex: 1;
  min-width: 0;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.8rem;
  margin-top: 0.1rem;
}

.captcha {
  width: max-content;
  max-width: 100%;
  line-height: 0;
  font-size: 0;
  margin-top: 0.45rem;
}

.cf-turnstile {
  display: inline-block;
  max-width: 150px;
  line-height: 0;
}

input[type="text"], input[type="password"], input:not([type]), textarea {
  font: inherit;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--line);
  background: var(--tile);
  color: var(--ink);
  border-radius: 2px;
  width: 100%;
}

input:focus-visible, textarea:focus-visible, button:focus-visible, .tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

textarea { resize: vertical; min-height: 3.2rem; }

button {
  font: inherit;
  font-size: 0.92rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  padding: 0.38rem 0.8rem;
  cursor: pointer;
  border-radius: 2px;
  width: fit-content;
}

button:hover { filter: brightness(1.08); }

button.quiet {
  background: transparent;
  color: var(--mute);
  border-color: var(--line);
}

button.quiet:hover { color: var(--ink); filter: none; }

button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: none;
}

.submit-btn {
  position: relative;
  min-width: 5.6rem;
  align-self: stretch;
  overflow: hidden;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.field-row textarea + .submit-btn {
  align-self: flex-end;
  min-height: 2.55rem;
}

.submit-label {
  display: block;
  transition: opacity 0.18s ease;
}

.submit-check {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.18s ease, transform 0.28s cubic-bezier(0.2, 1.4, 0.3, 1);
}

.submit-btn.ok {
  background: #2f6d42;
  border-color: #2f6d42;
  color: #f4f8f4;
}

.submit-btn.ok .submit-label { opacity: 0; }

.submit-btn.ok .submit-check {
  opacity: 1;
  transform: scale(1);
}

.submit-btn.ok:disabled {
  opacity: 1;
  cursor: default;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .submit-btn, .submit-label, .submit-check, .score-name,
  .ana-stage, .compose-card .ana-stage textarea, .compose-toggle, .search-toggle,
  .composer-shell, .suggest-shell, .composer-shell .compose-card,
  .suggest-shell form, .phrase-bar { transition: none; }
}

.composer-shell,
.suggest-shell {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  transition:
    grid-template-rows 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    margin-top 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.composer-shell.open,
.suggest-shell.open {
  grid-template-rows: 1fr;
  margin-top: 0.85rem;
}

.composer-shell > .composer,
.suggest-shell > .suggest {
  overflow: hidden;
  min-height: 0;
}

.composer {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.composer-shell .compose-card,
.suggest-shell form {
  opacity: 0;
  transform: translateY(-0.45rem) scale(0.985);
  transform-origin: top center;
  transition:
    opacity 0.28s ease,
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.composer-shell.open .compose-card,
.suggest-shell.open form {
  opacity: 1;
  transform: none;
}

.compose-card {
  background: var(--tile);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: 1.15rem 1.2rem 1.05rem;
}

.compose-card .error,
.compose-card .form-error {
  color: var(--accent);
  margin: 0 0 0.7rem;
}

.compose-card .rack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12rem 0.18rem;
  align-items: baseline;
  margin: 0 0 0.95rem;
}

.compose-card .tile {
  position: relative;
  width: auto;
  min-width: 0.72em;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ink);
  border: none;
  border-radius: 0;
  padding: 0 0.04rem;
  font: inherit;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
  user-select: none;
  touch-action: manipulation;
  filter: none;
}

.compose-card .tile:hover {
  color: var(--accent);
  filter: none;
}

.compose-card .tile.used {
  color: var(--used);
  text-decoration: line-through;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1.5px;
  background: transparent;
  border: none;
}

.compose-card .tile.used:hover {
  color: var(--mute);
  filter: none;
}

.compose-card .gap {
  width: 0.62rem;
  height: auto;
}

.compose-card .punct {
  font: inherit;
  font-size: 1.55rem;
  font-weight: 700;
  padding: 0 0.04rem;
  color: var(--mute);
}

.ana-stage {
  display: flex;
  align-items: stretch;
  min-height: 5.2rem;
  padding: 0.15rem;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 0.4rem;
  transition: min-height 0.32s ease, border-radius 0.32s ease, border-color 0.32s ease;
}

.compose-card .ana-stage textarea {
  display: block;
  width: 100%;
  min-height: 4.9rem;
  resize: none;
  font: inherit;
  font-size: 1.02rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: left;
  padding: 0.65rem 0.75rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-radius: 0.3rem;
  caret-color: var(--ink);
  transition: font-size 0.32s ease, font-style 0.32s ease, font-weight 0.32s ease, letter-spacing 0.32s ease, text-align 0.32s ease, padding 0.32s ease, min-height 0.32s ease;
}

.compose-card .ana-stage textarea:focus-visible {
  outline: none;
}

.ana-stage:focus-within {
  border-color: var(--line);
}

.js-confirm-submit[data-armed="1"] .ana-stage {
  align-items: center;
  justify-content: center;
  min-height: 6.4rem;
  border-color: var(--line);
  border-radius: 0.9rem;
}

.js-confirm-submit[data-armed="1"] .ana-stage textarea {
  min-height: 5.2rem;
  font-size: 1.52rem;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 1.05rem 1.1rem;
}

.score-name {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(0.4rem);
  transition: opacity 0.28s ease, max-width 0.32s ease, transform 0.28s ease;
}

.score-name.open {
  max-width: 12rem;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  margin-right: 0.55rem;
}

.score-name span {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  white-space: nowrap;
}

.compose-card .score-name input {
  width: 7.6rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-align: center;
  text-transform: uppercase;
  padding: 0.32rem 0.1rem 0.32rem 0.42rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  caret-color: var(--ink);
}

.compose-card .score-name input::placeholder {
  color: var(--line);
  letter-spacing: 0.32em;
}

.compose-card .score-name input:focus-visible {
  outline: none;
  border-color: var(--ink);
}

.compose-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}

.compose-foot .captcha {
  margin: 0;
}

.compose-actions {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
}

.compose-card .submit-btn {
  align-self: auto;
  min-width: 6.2rem;
  min-height: 2.35rem;
  border-radius: 999px;
}

.phrase-bar {
  display: grid;
  grid-template-rows: 1fr;
  margin: 0.2rem 0 0;
  opacity: 1;
  transition:
    grid-template-rows 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.24s ease,
    margin-top 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.phrase-bar > * {
  overflow: hidden;
  min-height: 0;
}

body:has(.composer-shell.open) .phrase-bar {
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}

.phrase-echo {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
  overflow-wrap: anywhere;
}

.compose-toggle,
.search-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-top: 0.12rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 500;
  filter: none;
  transition: transform 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.compose-toggle:hover,
.search-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  filter: none;
}

.compose-toggle[aria-expanded="true"] {
  transform: rotate(45deg);
}

.search-toggle[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--accent);
}

.pin-slot {
  margin-top: 1.4rem;
}

.pinned-anas {
  margin: 0;
}

.anas li {
  display: block;
  scroll-margin-top: 1.4rem;
  margin: 0 -0.35rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  border-radius: 0.4rem;
}

@keyframes ana-flash {
  0%, 22% { background: #ead6a8; }
  100% { background: transparent; }
}

.anas li:target,
.anas li.flash {
  animation: ana-flash 2.8s ease;
}

.ana-top {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: flex-start;
}

.anas li.pinned .ana-name {
  color: var(--ink);
}

.ana-main { flex: 1; min-width: 0; }

.ana-text { font-size: 1.08rem; overflow-wrap: anywhere; }

.ana-name {
  margin-top: 0.08rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--mute);
}

.has-tip { position: relative; }

.has-tip .tip {
  position: absolute;
  left: 0;
  top: calc(100% + 0.12rem);
  z-index: 8;
  display: none;
  min-width: 10.5rem;
  max-width: min(18rem, calc(100vw - 3rem));
  padding: 0.38rem 0.5rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.75rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  white-space: pre-line;
  pointer-events: none;
}

.has-tip:hover .tip,
.has-tip:focus-within .tip {
  display: block;
}

.has-tip:hover,
.has-tip:focus-within {
  z-index: 9;
}

.vote {
  display: flex;
  align-items: center;
  gap: 0.12rem;
  flex-shrink: 0;
}

.crown {
  color: #c9a227;
  flex-shrink: 0;
  display: block;
  margin-right: 0.08rem;
}

.vote button {
  background: transparent;
  color: var(--mute);
  border: none;
  padding: 0.1rem 0.28rem;
  font-size: 0.72rem;
  filter: none;
}

.vote button:hover { color: var(--ink); }

.vote button.on { color: var(--accent); font-weight: 700; }

.score {
  min-width: 1.35rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--mute);
  font-size: 0.82rem;
}

.error { color: var(--accent); }
.notice {
  font-style: italic;
  color: var(--mute);
  margin: 0 0 1rem;
}

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.tabs {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
  margin: 0 0 1.1rem;
}

.tabs a {
  color: var(--mute);
  text-decoration: none;
  font-size: 0.92rem;
}

.tabs a:hover { color: var(--ink); }

.tabs a.here {
  color: var(--ink);
  font-weight: 700;
}

.inline { display: inline; }

.inline button {
  background: transparent;
  color: var(--mute);
  border: none;
  padding: 0;
  font-size: 0.82rem;
  filter: none;
}

.inline button:hover { color: var(--accent); }

.inline button.danger,
.inline button.danger:hover {
  color: var(--accent);
}

.queue {
  margin-top: 0.15rem;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 1.65rem;
  padding: 0.08rem 0;
  border-top: 1px solid var(--hair);
}

.queue-item:last-child { border-bottom: 1px solid var(--hair); }

.q-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1.3;
  font-size: 0.9rem;
}

.q-text {
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-main .muted,
.q-main .meta {
  flex-shrink: 0;
  font-size: 0.78rem;
}

.queue-item .row {
  display: flex;
  gap: 0.22rem;
  margin: 0;
  flex-shrink: 0;
  margin-left: auto;
}

.q-entry .q-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}

.q-entry .q-foot {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  min-width: 0;
  margin-left: auto;
}

.q-entry .q-sub {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.q-entry .q-foot .row {
  margin-left: 0;
}

.queue-item button {
  font-size: 0.7rem;
  padding: 0.08rem 0.38rem;
  line-height: 1.2;
}

.hist-action {
  flex-shrink: 0;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

.hist-action.approved { color: #2f6d42; }
.hist-action.rejected { color: var(--mute); }

.clear-history {
  margin: 0 0 0 auto;
}

.clear-history button {
  background: transparent;
  color: var(--mute);
  border: none;
  padding: 0;
  font-size: 0.92rem;
  filter: none;
}

.clear-history button:hover {
  color: var(--ink);
  filter: none;
}

button.quiet.danger,
button.quiet.danger:hover,
.clear-history button.danger,
.clear-history button.danger:hover {
  color: var(--accent);
}

.queue-item a.q-text {
  color: inherit;
  text-decoration: none;
}

.queue-item a.q-text:hover { color: var(--accent); }

.library-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: stretch;
  margin: 0 0 1rem;
}

.library-search input {
  flex: 1;
  min-width: 0;
}

.library-search select {
  font: inherit;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--line);
  background: var(--tile);
  color: var(--ink);
  border-radius: 2px;
}

.library-search select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.admin-edit {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.35rem 0 1.1rem;
}

.admin-edit textarea { min-height: 2.6rem; }

.admin-edit-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
}

.admin-anas {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-ana {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  align-items: flex-start;
  padding: 0.55rem 0;
  border-top: 1px solid var(--hair);
}

.admin-ana-edit {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 12rem;
}

.admin-ana-edit textarea {
  flex: 1;
  min-width: 12rem;
  min-height: 2.4rem;
}

.admin-ana-edit .ana-name {
  width: 6.2rem;
  flex-shrink: 0;
}

.admin-ana-meta {
  flex: 1 0 100%;
  margin: 0;
  font-size: 0.78rem;
}

.suggest {
  margin: 0;
}

.suggest .field-row {
  margin: 0;
  align-items: flex-end;
  gap: 0.55rem;
}

.suggest input:not([type]),
.suggest input[type="text"],
.suggest input[type="search"] {
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0.2rem 0 0.32rem;
}

.suggest input:focus-visible {
  outline: none;
  border-bottom-color: var(--ink);
}

.suggest .submit-btn {
  align-self: flex-end;
  min-height: 0;
  padding: 0.2rem 0.7rem;
}

.suggest .captcha {
  margin-top: 0.55rem;
}

.form-error {
  color: var(--accent);
  font-size: 0.88rem;
  margin: 0 0 0.45rem;
}

.posted {
  margin-top: 1.1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--hair);
}

a { color: var(--accent); }
a:hover { color: var(--ink); }

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

@media (max-width: 40rem) {
  :root { --gutter: 0.8rem; }
  html, body { font-size: 16px; }
  .phrase-title, .phrase-echo { font-size: 1.4rem; }
  .compose-card { padding: 1rem 0.85rem 0.95rem; border-radius: 1rem; }
  .compose-card .tile,
  .compose-card .punct { font-size: 1.28rem; }
  .js-confirm-submit[data-armed="1"] .ana-stage { min-height: 5.6rem; }
  .js-confirm-submit[data-armed="1"] .ana-stage textarea { font-size: 1.32rem; min-height: 4.6rem; }
  .ana-top { gap: 0.45rem; }
  .q-entry {
    flex-direction: column;
    align-items: stretch;
    gap: 0.28rem;
    padding: 0.5rem 0;
  }
  .q-entry .q-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
  .q-entry .q-foot {
    margin-left: 0;
  }
  .q-entry .q-sub {
    flex: 1;
    max-width: none;
  }
}
