@charset "UTF-8";
:root {
  color-scheme: light;
  --paper: #f7f5ee;
  --ink: #323f3d;
  --muted: #767e75;
  --line: #e3e6da;
  --coral: #d75f43;
  --mint: #e8eee0;
  --green: #3d6756;
  --white: #fffef9;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button,
a {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 5px;
}
button {
  color: inherit;
}
a {
  color: inherit;
}
button:hover:not(:disabled) {
  filter: brightness(0.98);
}
[hidden] {
  display: none !important;
}
.page {
  max-width: 1220px;
  padding: 0 48px;
  margin: auto;
}
.header {
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: 1px;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 2.8px;
  margin-top: 4px;
  font-weight: 550;
  color: var(--muted);
}
.brand-mark {
  display: grid;
  grid-template-columns: 13px 13px;
  gap: 4px;
  background: #f0e8db;
  padding: 11px;
  border-radius: 15px;
  transform: rotate(-5deg);
}
.brand-mark i {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: var(--coral);
}
.brand-mark i:last-child {
  border-radius: 50%;
  background: var(--green);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 32px;
}
.quiet-label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
}
.quiet-label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7f9878;
}
.text-button {
  border: 0;
  background: none;
  padding: 10px 0;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.text-button span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid #acb2a7;
  border-radius: 50%;
  font-size: 12px;
}
.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 64px;
  padding: 48px 0 45px;
  align-items: start;
}
.sidebar {
  padding: 12px 0 0;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 650;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
}
.eyebrow > span {
  width: 21px;
  height: 2px;
  background: var(--coral);
}
h1 {
  font-size: 49px;
  line-height: 1.5;
  letter-spacing: -2px;
  margin: 0;
  font-weight: 650;
}
.accent {
  color: var(--coral);
  position: relative;
  white-space: nowrap;
}
.accent:after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 2px;
  right: 8px;
  height: 6px;
  background: #e6b39b;
  border-radius: 50%;
  transform: rotate(-4deg);
  opacity: 0.45;
}
.description {
  font-size: 14px;
  line-height: 2;
  color: var(--muted);
  margin: 24px 0 0;
}
.tiny-art {
  height: 132px;
  position: relative;
  width: 230px;
  margin: 20px 0 6px;
}
.art-card {
  position: absolute;
  display: grid;
  place-items: center;
  width: 66px;
  height: 80px;
  border-radius: 13px;
  font-family: Georgia, serif;
  font-size: 45px;
  background: #fffcf1;
  border: 1px solid #e7e3d6;
  box-shadow: 0 5px 0 #e9e7db;
  color: #dc835c;
  top: 20px;
}
.art-card-one {
  left: 36px;
  transform: rotate(-13deg);
}
.art-card-two {
  left: 102px;
  transform: rotate(13deg);
  top: 12px;
  background: #e7eddd;
  color: #50745a;
}
.art-spark {
  position: absolute;
  right: 18px;
  top: 5px;
  font-size: 29px;
  color: #d8aa52;
}
.art-line {
  position: absolute;
  bottom: 14px;
  left: 20px;
  width: 160px;
  height: 15px;
  border-bottom: 1px solid #d7ddce;
  border-radius: 50%;
}
h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 13px;
}
.modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mode {
  padding: 13px 12px;
  background: transparent;
  border: 1px solid #d6dcce;
  border-radius: 11px;
  text-align: left;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.mode span {
  font-size: 13px;
  font-weight: 600;
  display: block;
}
.mode small {
  font-size: 11px;
  display: block;
  margin-top: 7px;
  color: var(--muted);
}
.mode.active {
  background: #e8eddf;
  border-color: #73886a;
  box-shadow: inset 0 0 0 1px #73886a;
}
.mode.active span {
  color: var(--green);
}
.setting-note {
  font-size: 10px;
  color: var(--muted);
  margin: 12px 0 0;
}
.record {
  display: flex;
  align-items: center;
  gap: 13px;
  border-top: 1px dashed #d0d6c6;
  margin-top: 30px;
  padding-top: 24px;
}
.record-icon {
  color: #ac7b36;
  font-size: 30px;
}
.record h2 {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 7px;
  font-weight: 500;
}
.record p {
  font-size: 13px;
  margin: 0 0 5px;
  font-weight: 550;
}
.record small {
  font-size: 10px;
  color: var(--muted);
}
.game-panel {
  padding: 25px 28px 19px;
  border: 1px solid #e2e5d9;
  border-radius: 23px;
  background: var(--white);
  box-shadow:
    0 6px 0 #eceee3,
    0 18px 42px -34px #657957;
  min-width: 0;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  gap: 10px;
}
.game-tag {
  border: 1px solid #e0e4d6;
  border-radius: 30px;
  padding: 5px 11px;
  font-size: 10px;
  color: #67725f;
}
.game-tag:before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6e8b62;
  margin-right: 6px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 22px 0 24px;
}
.stats > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: center;
  border-right: 1px solid #e9ece1;
}
.stats > div:last-child {
  border: 0;
}
.stats > div > span {
  font-size: 11px;
  color: var(--muted);
}
.stats strong {
  font-family: "Avenir Next", ui-monospace, monospace;
  font-size: 28px;
  font-weight: 550;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.stats small {
  font-family: system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #8b9186;
}
.board-wrap {
  position: relative;
}
.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.card {
  padding: 0;
  aspect-ratio: 1.08;
  border: 1px solid #dce2d1;
  border-radius: 13px;
  background: #eef1e7;
  box-shadow: 0 3px 0 #dde3d1;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.18s,
    box-shadow 0.18s;
}
.card:not(:disabled):hover {
  background: #e7eddf;
  transform: translateY(-3px);
  box-shadow: 0 6px 0 #dce3cf;
}
.card:not(:disabled):active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #dce3cf;
}
.card.is-open {
  background: #fffaf0;
  border-color: #e6c7ac;
  box-shadow: 0 3px 0 #edd9be;
  animation: turn-in 0.22s ease-out;
}
.card.is-matched {
  background: #edf3e4;
  border-color: #b8c9a5;
  box-shadow: 0 3px 0 #d0dec0;
}
.card.is-matched:after {
  content: "✓";
  position: absolute;
  right: 8px;
  top: 5px;
  color: #4b7256;
  font-size: 11px;
}
.card svg {
  width: 54%;
  height: 54%;
  overflow: visible;
}
.card-back {
  position: relative;
  width: 31px;
  height: 31px;
  display: grid;
  grid-template-columns: repeat(2, 13px);
  gap: 4px;
  opacity: 0.55;
  transform: rotate(-10deg);
}
.card-back i {
  width: 13px;
  height: 13px;
  background: #b8c5ab;
  border-radius: 4px;
}
.card-back i:nth-child(2),
.card-back i:nth-child(3) {
  border-radius: 50%;
  background: transparent;
  border: 2px solid #b8c5ab;
}
.status {
  font-size: 12px;
  color: var(--muted);
  margin: 21px 0 18px;
  min-height: 18px;
  text-align: center;
}
.actions {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 12px;
}
.primary-button,
.secondary-button {
  border: 1px solid transparent;
  min-height: 44px;
  border-radius: 9px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 550;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.primary-button {
  background: var(--green);
  color: #fffef9;
}
.primary-button > span {
  font-size: 18px;
  font-weight: 400;
}
.secondary-button {
  background: transparent;
  border-color: #dce2d3;
  color: #677160;
}
.secondary-button span {
  font-size: 20px;
  line-height: 1;
}
.game-hint {
  font-size: 10px;
  text-align: center;
  color: #8b9185;
  margin: 17px 0 0;
}
.game-hint span {
  color: #b8a372;
  margin-right: 4px;
}
.overlay {
  position: absolute;
  inset: -2px;
  background: #fffef2f2;
  backdrop-filter: blur(7px);
  border: 1px solid #e3e7d8;
  border-radius: 14px;
  display: grid;
  place-items: center;
  z-index: 2;
  text-align: center;
  padding: 18px;
}
.overlay-art {
  font-size: 44px;
  color: var(--coral);
  display: block;
  margin-bottom: 12px;
}
.overlay .eyebrow {
  display: block;
  font-size: 9px;
  margin: 0 0 13px;
}
.overlay h2 {
  font-size: 25px;
  margin: 0 0 13px;
  font-weight: 600;
}
.overlay p:not(.eyebrow) {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0 0 20px;
}
.overlay .primary-button {
  margin: auto;
  min-width: 170px;
}
.board.is-paused {
  visibility: hidden;
}
footer {
  padding: 20px 0 26px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  color: #899080;
  font-size: 10px;
}
.filing-link {
  color: var(--muted);
  font-size: 12px;
  text-underline-offset: 3px;
}
.filing-link:hover,
.filing-link:focus-visible {
  color: var(--ink);
}
.footer-dot {
  padding: 0 5px;
  color: #b3b7a8;
}
dialog {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 32px;
  border-radius: 20px;
  width: min(440px, calc(100% - 32px));
  box-shadow: 0 20px 80px #26332330;
}
dialog::backdrop {
  background: #27352d44;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 23px;
  margin: 12px 0 20px;
}
dialog ol {
  padding-left: 20px;
}
dialog li,
dialog p {
  font-size: 13px;
  line-height: 1.9;
  color: #677160;
}
dialog li + li {
  margin-top: 9px;
}
dialog form:last-child button {
  width: 100%;
  margin-top: 24px;
}
.dialog-art {
  font-size: 35px;
  color: var(--coral);
}
.dialog-close {
  position: absolute;
  right: 17px;
  top: 10px;
  background: none;
  border: 0;
  font-size: 28px;
  color: var(--muted);
  padding: 5px;
}
.skip-link {
  position: absolute;
  left: 20px;
  top: -70px;
  background: var(--green);
  color: white;
  padding: 12px;
  z-index: 5;
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}
.noscript {
  position: fixed;
  bottom: 10px;
  left: 10px;
  padding: 20px;
  background: #fff0cc;
  border: 1px solid #c8a65b;
  z-index: 10;
}
@keyframes turn-in {
  from {
    transform: scale(0.9);
    opacity: 0.7;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@media (min-width: 1350px) {
  .page {
    max-width: 1280px;
  }
  .layout {
    gap: 86px;
    grid-template-columns: 350px minmax(0, 1fr);
    padding-top: 56px;
  }
  h1 {
    font-size: 54px;
  }
  .sidebar {
    padding-top: 22px;
  }
  .tiny-art {
    margin-top: 28px;
    height: 145px;
  }
  .game-panel {
    padding: 26px 32px 22px;
  }
}
@media (max-width: 1000px) {
  .page {
    padding: 0 28px;
  }
  .layout {
    grid-template-columns: 265px minmax(0, 1fr);
    gap: 32px;
  }
  h1 {
    font-size: 42px;
  }
  .board {
    gap: 9px;
  }
  .game-panel {
    padding: 22px 20px 18px;
  }
  .header-right {
    gap: 18px;
  }
  .tiny-art {
    height: 114px;
    margin: 14px 0;
  }
  .card {
    border-radius: 10px;
  }
  .primary-button,
  .secondary-button {
    padding: 10px;
    font-size: 12px;
    gap: 8px;
  }
}
@media (max-width: 760px) {
  .page {
    padding: 0 20px;
    max-width: 560px;
  }
  .header {
    min-height: 84px;
    height: auto;
    padding: 18px 0;
    flex-wrap: wrap;
    gap: 12px;
  }
  .brand {
    font-size: 17px;
    gap: 10px;
  }
  .brand-mark {
    padding: 8px;
  }
  .brand small {
    font-size: 8px;
  }
  .quiet-label {
    display: none;
  }
  .text-button {
    font-size: 11px;
  }
  .layout {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 29px 0 27px;
  }
  .sidebar {
    display: contents;
  }
  .intro {
    order: 0;
    width: 100%;
    position: relative;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.6px;
    margin-bottom: 13px;
  }
  h1 {
    font-size: 34px;
    line-height: 1.45;
    letter-spacing: -1px;
  }
  h1 br {
    display: none;
  }
  .description {
    font-size: 12px;
    line-height: 1.7;
    margin: 13px 0 0;
  }
  .description br {
    display: none;
  }
  .tiny-art {
    display: none;
  }
  .settings {
    order: 1;
    width: 100%;
  }
  .settings h2 {
    display: none;
  }
  .mode {
    text-align: center;
    padding: 11px;
  }
  .mode span {
    font-size: 12px;
  }
  .mode small {
    display: inline;
    margin-top: 0;
    margin-left: 8px;
    font-size: 10px;
  }
  .mode span {
    display: inline;
  }
  .setting-note {
    font-size: 9px;
    margin-top: 9px;
    text-align: right;
  }
  .game-panel {
    order: 2;
    width: 100%;
    padding: 18px 16px 16px;
    border-radius: 18px;
  }
  .record {
    order: 3;
    width: 100%;
    margin: 0;
    padding: 15px 0 0;
    border: 0;
    justify-content: center;
  }
  .record h2 {
    font-size: 10px;
  }
  .record p {
    font-size: 12px;
  }
  .record small {
    font-size: 9px;
  }
  .stats {
    padding: 19px 0 21px;
  }
  .stats strong {
    font-size: 26px;
  }
  .card {
    aspect-ratio: 1;
    box-shadow: 0 3px 0 #dde3d1;
  }
  .status {
    font-size: 11px;
    margin: 18px 0 14px;
  }
  .game-hint {
    font-size: 9px;
  }
  .actions {
    gap: 9px;
  }
  .primary-button,
  .secondary-button {
    min-height: 43px;
  }
  footer {
    font-size: 9px;
    padding-top: 17px;
    text-align: center;
    justify-content: center;
  }
  .overlay-art {
    font-size: 31px;
    margin-bottom: 7px;
  }
  .overlay h2 {
    font-size: 22px;
  }
  .overlay p:not(.eyebrow) {
    margin-bottom: 15px;
  }
  .overlay .eyebrow {
    margin-bottom: 10px;
  }
}
@media (max-width: 350px) {
  .page {
    padding: 0 12px;
  }
  h1 {
    font-size: 30px;
  }
  .game-panel {
    padding: 16px 12px;
  }
  .board {
    gap: 7px;
  }
  .mode small {
    margin-left: 4px;
  }
  .brand small {
    letter-spacing: 2px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .card:not(:disabled):hover {
    transform: none;
  }
}
