:root {
  color-scheme: light;
  --paper: #fff2dc;
  --paper-deep: #f0dcc0;
  --ink: #182825;
  --muted: #67716d;
  --line: #dbc59d;
  --tile: #fffaf1;
  --tile-edge: #d59f23;
  --selected: #f5c84b;
  --selected-edge: #ad7a12;
  --green: #6ba784;
  --green-dark: #226150;
  --blue: #266f95;
  --blue-dark: #194d72;
  --red: #c8523e;
  --orange: #e7802b;
  --shadow: 0 12px 30px rgba(62, 43, 18, 0.16);
  --radius: 8px;
  font-family: ui-rounded, "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background-color: #d7e7df;
  background-image: repeating-linear-gradient(135deg, rgba(25, 77, 114, 0.08) 0 1px, transparent 1px 18px);
  color: var(--ink);
  overflow: hidden;
}

button {
  font: inherit;
}

.app {
  width: min(100%, 34rem);
  height: 100dvh;
  min-height: 30rem;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.38rem;
  padding: max(0.7rem, env(safe-area-inset-top)) 0.8rem max(0.55rem, env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, #fff 0 80%, #d9ecff 100%);
  border-left: 1px solid rgba(34, 97, 80, 0.12);
  border-right: 1px solid rgba(34, 97, 80, 0.12);
  overflow: hidden;
}

.topbar {
  display: block;
  min-height: 5.2rem;
}

.brand {
  width: min(100%, 28rem);
  margin: 0 auto;
  text-align: center;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  display: inline-grid;
  place-items: center;
  min-height: 2.85rem;
  padding: 0 0.9rem;
  color: #fff8e8;
  background: var(--green-dark);
  border: 2px solid #14392f;
  border-radius: var(--radius);
  box-shadow: 0 4px 0 #14392f, 0 10px 20px rgba(20, 57, 47, 0.18);
  font-size: 2.02rem;
  line-height: 1;
  letter-spacing: 0;
}

.tagline {
  width: min(100%, 24rem);
  margin: 0.46rem auto 0;
  color: #36514b;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
}

.small-button,
.mini-button,
.control-button,
.link-button,
.close-button,
.archive-item,
.tile {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.small-button,
.mini-button,
.control-button {
  min-height: 2.4rem;
  border-radius: var(--radius);
  font-weight: 800;
}

.small-button {
  padding: 0 0.62rem;
  background: #fff6e3;
  color: var(--green-dark);
  border: 1px solid var(--line);
}

.small-button:disabled,
.mini-button:disabled,
.control-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.game {
  --play-width: min(100%, 25rem);
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.meta-row {
  width: var(--play-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.meta-card {
  width: min(100%, 8.6rem);
  min-height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), transparent 50%),
    #fff6e3;
  border: 2px solid rgba(213, 159, 35, 0.5);
  box-shadow: 0 2px 0 rgba(181, 124, 23, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  padding: 0.18rem 0.54rem;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.meta-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-row {
  width: var(--play-width);
  margin: 0 auto;
  min-height: 1.72rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.progress-row.score-visible {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dot-meter,
.score-meter {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.24rem;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.78);
  border: 1px solid rgba(214, 199, 168, 0.72);
  white-space: nowrap;
}

.dot-label {
  color: #4e5f5a;
  font-size: 0.68rem;
  line-height: 1;
}

.status-dot {
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 999px;
  background: #cfd4cf;
  box-shadow: inset 0 1px 1px rgba(24, 40, 37, 0.18);
}

.status-dot.right {
  background: var(--green-dark);
}

.status-dot.wrong {
  background: var(--red);
}

.solved-groups {
  width: var(--play-width);
  min-height: 1.18rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr));
  align-items: stretch;
  gap: 0.24rem;
  flex: 0 0 auto;
}

.solved-groups:empty {
  min-height: 1.18rem;
}

.solved-group {
  min-width: 0;
  min-height: 1.56rem;
  display: inline-grid;
  place-items: center;
  gap: 0.02rem;
  padding: 0.12rem 0.4rem 0.15rem;
  border-radius: 8px;
  background: #d9ebe1;
  border: 1px solid #92bea5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
  animation: groupIn 220ms ease-out both;
  text-align: center;
}

.solved-group strong {
  min-width: 0;
  color: #20332f;
  font-size: 0.62rem;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.solved-group-words {
  min-width: 0;
  color: rgba(32, 51, 47, 0.72);
  font-size: 0.54rem;
  font-weight: 800;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-wrap {
  width: var(--play-width);
  margin: 0 auto;
  min-height: 0;
  flex: 1 1 0;
  container-type: size;
  display: grid;
  align-content: center;
  justify-items: center;
  overflow: hidden;
  padding: 0.1rem 0;
}

.tile-grid {
  width: min(100%, 25rem);
  max-width: 100%;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

.tile {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0.44rem 0.35rem;
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.95) 0 0.48rem, transparent 0.52rem),
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), transparent 46%),
    var(--tile);
  color: var(--ink);
  border: 2px solid rgba(213, 159, 35, 0.88);
  box-shadow:
    0 2px 0 #b57c17,
    0 8px 16px rgba(63, 38, 5, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.74);
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.05;
  overflow: hidden;
  white-space: nowrap;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

@supports (width: 100cqh) {
  .tile-grid {
    width: min(100%, 25rem, 100cqh);
  }
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0.28rem;
  z-index: -1;
  border-radius: 7px;
  border: 1px solid rgba(80, 50, 12, 0.1);
  pointer-events: none;
}

.tile:hover:not(:disabled) {
  transform: translateY(-1px);
}

.tile.solved-tile {
  color: #1f302d;
  border-color: rgba(34, 97, 80, 0.34);
  box-shadow: 0 3px 0 rgba(54, 88, 78, 0.58), 0 8px 14px rgba(63, 38, 5, 0.07);
}

.solved-color-0.tile,
.solved-group.solved-color-0 {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 48%),
    #d9eddf;
}

.solved-color-1.tile,
.solved-group.solved-color-1 {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 48%),
    #f8ebaa;
}

.solved-color-2.tile,
.solved-group.solved-color-2 {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 48%),
    #dcecff;
}

.solved-color-3.tile,
.solved-group.solved-color-3 {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 48%),
    #eee4ff;
}

.tile.multi-shade.shade-count-2 {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent 50%),
    linear-gradient(135deg, var(--shade-1) 0 50%, var(--shade-2) 50% 100%);
}

.tile.multi-shade.shade-count-3 {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent 50%),
    conic-gradient(from -45deg, var(--shade-1) 0 33.33%, var(--shade-2) 33.33% 66.66%, var(--shade-3) 66.66% 100%);
}

.tile.multi-shade.shade-count-4 {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent 50%),
    conic-gradient(from -45deg, var(--shade-1) 0 25%, var(--shade-2) 25% 50%, var(--shade-3) 50% 75%, var(--shade-4) 75% 100%);
}

.tile.multi-solved {
  border-color: var(--blue-dark);
  box-shadow: 0 3px 0 var(--blue-dark), 0 8px 14px rgba(25, 77, 114, 0.1);
}

.tile.selected {
  background: var(--selected);
  border-color: var(--selected-edge);
  box-shadow:
    0 0 0 3px #1687e4,
    0 3px 0 #0c5e9f,
    0 10px 18px rgba(22, 135, 228, 0.18);
  transform: translateY(-2px);
}

.tile.selected::after {
  border-color: rgba(22, 135, 228, 0.64);
  box-shadow: inset 0 0 0 1px rgba(22, 135, 228, 0.26);
}

.tile.solved-tile.selected,
.tile.multi-shade.selected {
  border-color: #1687e4;
  transform: translateY(-3px) scale(1.015);
}

.tile.final-word:not(.multi-shade) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent 44%),
    #d9eadf;
}

.tile.final-word {
  border-color: var(--green-dark);
  box-shadow: 0 3px 0 var(--green-dark);
}

.tile.correct {
  animation: correctPop 280ms ease-out both;
}

.tile.moving {
  z-index: 2;
  pointer-events: none;
  filter: saturate(1.05);
}

.tile.shake {
  animation: shake 310ms ease-in-out both;
}

.tile.pulse {
  animation: pulse 240ms ease-out both;
}

.message {
  width: var(--play-width);
  margin: 0 auto;
  min-height: 1.38rem;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.message[data-tone="success"] {
  color: var(--green-dark);
}

.message[data-tone="error"] {
  color: var(--red);
}

.message[data-tone="warn"] {
  color: #8b620a;
}

.message[data-tone="score"] {
  min-height: 1.38rem;
}

.score-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.score-link:hover,
.score-link:focus-visible {
  color: var(--blue-dark);
}

.controls {
  width: var(--play-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

.control-button {
  min-width: 0;
  padding: 0 0.5rem;
  background: #fff6e3;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 2px 0 #c5ac78;
  white-space: nowrap;
}

.control-button.primary {
  background: var(--blue-dark);
  color: #fffaf0;
  border-color: var(--blue-dark);
  box-shadow: 0 2px 0 #0e2f48;
}

.modal.result-panel {
  background: rgba(29, 37, 35, 0.32);
}

.modal.result-panel.open {
  animation: modal-fade-in 180ms ease-out both;
}

.modal.result-panel.show-flair {
  background:
    radial-gradient(circle at 24% 18%, rgba(87, 186, 114, 0.24), transparent 18rem),
    radial-gradient(circle at 78% 28%, rgba(243, 189, 19, 0.2), transparent 17rem),
    rgba(29, 37, 35, 0.38);
}

.result-card {
  width: min(100%, 24rem);
  max-height: min(92dvh, 42rem);
  min-width: 0;
  display: grid;
  gap: 0.55rem;
  padding: 0.82rem;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), transparent 46%),
    #fff6e8;
  border: 1px solid #d59d78;
  box-shadow: 0 16px 42px rgba(62, 43, 18, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.68);
  overflow: auto;
  position: relative;
  isolation: isolate;
}

.result-card > * {
  position: relative;
  z-index: 2;
}

.result-panel.show-flair .result-card {
  animation: result-pop 620ms cubic-bezier(.15, 1.2, .28, 1) both;
}

.result-panel.show-flair .result-card::before,
.result-panel.show-flair .result-card::after {
  content: "";
  position: absolute;
  inset: 0.45rem;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
}

.result-panel.show-flair .result-card::before {
  border-radius: inherit;
  background:
    radial-gradient(circle, rgba(87, 186, 114, 0.95) 0 0.18rem, transparent 0.2rem) 8% 12% / 3.2rem 3.2rem,
    radial-gradient(circle, rgba(243, 189, 19, 0.95) 0 0.16rem, transparent 0.18rem) 92% 16% / 3rem 3rem,
    radial-gradient(circle, rgba(91, 141, 232, 0.85) 0 0.15rem, transparent 0.17rem) 14% 86% / 3.4rem 3.4rem,
    radial-gradient(circle, rgba(155, 105, 223, 0.82) 0 0.16rem, transparent 0.18rem) 86% 82% / 3.1rem 3.1rem;
  animation: result-sparkle 980ms ease-out both;
}

.result-panel.show-flair .result-card::after {
  border-radius: inherit;
  background: linear-gradient(110deg, transparent 18%, rgba(255, 255, 255, 0.78) 45%, transparent 68%);
  transform: translateX(-105%);
  animation: result-shine 860ms 120ms ease-out both;
}

.result-panel.result-loss.show-flair .result-card {
  animation: result-pop 520ms cubic-bezier(.18, 1, .28, 1) both, result-wobble 420ms 220ms ease-out both;
}

.result-panel.result-loss.show-flair .result-card::before {
  background:
    radial-gradient(circle, rgba(199, 84, 63, 0.9) 0 0.18rem, transparent 0.2rem) 12% 16% / 3rem 3rem,
    radial-gradient(circle, rgba(243, 189, 19, 0.85) 0 0.16rem, transparent 0.18rem) 88% 18% / 3.1rem 3.1rem,
    radial-gradient(circle, rgba(124, 113, 96, 0.72) 0 0.15rem, transparent 0.17rem) 16% 84% / 3.2rem 3.2rem,
    radial-gradient(circle, rgba(199, 84, 63, 0.82) 0 0.16rem, transparent 0.18rem) 84% 82% / 3rem 3rem;
}

.result-card .control-button {
  justify-self: stretch;
}

.share-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

#resultText {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.score-breakdown {
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.18rem;
  justify-content: center;
  align-content: center;
  overflow: visible;
  padding-right: 0;
  text-align: center;
}

.share-preview {
  width: min(100%, 16.5rem);
  justify-self: center;
  aspect-ratio: 1;
  border-radius: 0.72rem;
  overflow: hidden;
  background: #f8f5ee;
  border: 1px solid rgba(124, 113, 96, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.share-preview canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.score-badge,
.score-detail {
  min-width: 0;
  padding: 0.08rem 0.28rem;
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.72);
  color: #2c3f3a;
  border: 1px solid rgba(34, 97, 80, 0.16);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.2;
}

.score-badge {
  background: #fff0a6;
  border-color: #d6b145;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes result-pop {
  0% {
    opacity: 0;
    transform: translateY(1.2rem) scale(0.88);
  }
  62% {
    opacity: 1;
    transform: translateY(-0.18rem) scale(1.035);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes result-wobble {
  0%, 100% {
    transform: translateX(0) scale(1);
  }
  30% {
    transform: translateX(-0.22rem) scale(1);
  }
  62% {
    transform: translateX(0.16rem) scale(1);
  }
}

@keyframes result-sparkle {
  0% {
    opacity: 0;
    transform: scale(0.78) rotate(-5deg);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.18) rotate(4deg);
  }
}

@keyframes result-shine {
  0% {
    opacity: 0;
    transform: translateX(-105%);
  }
  24% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateX(105%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal.result-panel.open,
  .result-panel.show-flair .result-card,
  .result-panel.result-loss.show-flair .result-card,
  .result-panel.show-flair .result-card::before,
  .result-panel.show-flair .result-card::after {
    animation: none;
  }
}

.credits {
  min-height: 2.85rem;
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 0.24rem;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: center;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 0.28rem;
}

.mini-button {
  min-height: 1.52rem;
  padding: 0 0.44rem;
  background: rgba(255, 250, 241, 0.82);
  color: var(--green-dark);
  border: 1px solid rgba(34, 97, 80, 0.24);
  box-shadow: 0 1px 0 rgba(34, 97, 80, 0.22);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.credits a {
  color: var(--green-dark);
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.link-button {
  padding: 0;
  background: transparent;
  color: var(--blue);
  font-size: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  place-items: center;
  padding: 1rem;
  background: rgba(29, 37, 35, 0.42);
}

.modal.open {
  display: grid;
}

.modal-card {
  width: min(100%, 26rem);
  max-height: min(88dvh, 38rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.85rem;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.modal-card.compact {
  grid-template-rows: auto minmax(0, 1fr);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.modal-head h2 {
  font-size: 1.25rem;
}

.quiet-trigger {
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.close-button {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: var(--green-dark);
  color: #fffaf0;
  font-size: 1.35rem;
  line-height: 1;
}

.archive-list {
  min-height: 0;
  display: grid;
  gap: 0.45rem;
  overflow: auto;
  padding-right: 0.1rem;
}

.archive-item {
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius);
  background: #fff6e3;
  color: var(--ink);
  border: 1px solid var(--line);
  text-align: left;
}

.archive-item span,
.archive-item strong {
  min-width: 0;
}

.archive-item strong {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.archive-item.current {
  border-color: var(--green-dark);
  box-shadow: inset 0 0 0 1px var(--green-dark);
}

.archive-item.future strong {
  color: var(--blue-dark);
}

.archive-item.daily span::after {
  content: "Vandaag";
  margin-left: 0.35rem;
  padding: 0.08rem 0.28rem;
  border-radius: 999px;
  background: var(--selected);
  color: #412f00;
  font-size: 0.65rem;
  font-weight: 900;
}

.score-rules {
  display: grid;
  gap: 0.5rem;
  color: #3d4844;
  line-height: 1.32;
  overflow: auto;
  padding-right: 0.12rem;
}

.score-rules h3 {
  margin: 0.18rem 0 0;
  color: var(--green-dark);
  font-size: 0.92rem;
}

.score-rules ul {
  margin: 0;
  padding-left: 1.1rem;
}

.score-rules li {
  margin: 0.14rem 0;
}

.copy-buffer {
  position: fixed;
  left: -999rem;
  top: 0;
}

@keyframes groupIn {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes correctPop {
  0% {
    transform: translateY(-2px) scale(1);
  }
  55% {
    transform: translateY(-5px) scale(1.05);
  }
  100% {
    transform: translateY(-2px) scale(1);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0) translateY(-2px);
  }
  25% {
    transform: translateX(-0.35rem) translateY(-2px);
  }
  75% {
    transform: translateX(0.35rem) translateY(-2px);
  }
}

@keyframes pulse {
  50% {
    transform: translateY(-2px) scale(1.03);
  }
}

@keyframes shufflePop {
  from {
    opacity: 0.76;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-height: 780px) {
  .app {
    gap: 0.24rem;
    padding-top: max(0.45rem, env(safe-area-inset-top));
    padding-bottom: max(0.35rem, env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 4.35rem;
  }

  h1 {
    min-height: 2.34rem;
    font-size: 1.62rem;
  }

  .tagline {
    margin-top: 0.34rem;
    font-size: 0.74rem;
    line-height: 1.12;
  }

  .small-button,
  .control-button {
    min-height: 2.08rem;
  }

  .meta-card {
    min-height: 1.72rem;
  }

  .progress-row {
    min-height: 1.3rem;
    font-size: 0.66rem;
  }

  .solved-group {
    min-height: 1.24rem;
    padding-top: 0.18rem;
    padding-bottom: 0.18rem;
  }

  .solved-group strong {
    font-size: 0.64rem;
  }

  .tile {
    font-size: 0.84rem;
  }

  .solved-group-words {
    font-size: 0.5rem;
  }

  .message {
    min-height: 1.24rem;
    font-size: 0.74rem;
  }

  .result-card {
    min-height: 2.38rem;
  }

  .credits {
    min-height: 2.48rem;
  }
}

@media (max-width: 360px) {
  .app {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  .small-button {
    padding: 0 0.44rem;
    font-size: 0.84rem;
  }

  .meta-card {
    font-size: 0.82rem;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
  }

  .progress-row {
    gap: 0.22rem;
    font-size: 0.66rem;
  }

  .control-button {
    font-size: 0.86rem;
  }

  .credits {
    font-size: 0.62rem;
  }

  .mini-button {
    padding: 0 0.32rem;
    font-size: 0.62rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
