.collection-mark {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  position: relative;
  border-radius: 8px;
  flex: none;
  background: #bdceaa;
  color: #263220;
}
.collection-mark::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  transform: rotate(45deg);
}
.collection-mark::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.game-heading { display: flex; align-items: center; gap: 17px; }
.game-mark {
  --mark-size: 52px;
  width: var(--mark-size);
  height: var(--mark-size);
  flex: none;
  border-radius: 13px;
  position: relative;
  display: inline-grid;
  place-items: center;
  border: 1px solid #f7c4a75e;
}
.game-mark--mars {
  background: #542e2a;
  color: #ffbd94;
}
.game-mark--mars > span {
  width: 43%;
  aspect-ratio: 1;
  display: block;
  position: relative;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #ffc39a 1%, #df754e 61%, #9b4434);
}
.game-mark--mars > span::after {
  content: "";
  position: absolute;
  inset: 29% -32%;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  transform: rotate(-32deg);
}
.game-mark--castle {
  background: #e1ead6;
  color: #354f30;
  border-color: #acbf9d;
}
.game-mark--castle > span {
  position: relative;
  display: block;
  width: 58%;
  height: 54%;
  background: currentColor;
  clip-path: polygon(9% 0, 25% 0, 25% 16%, 42% 16%, 42% 0, 58% 0, 58% 16%, 75% 16%, 75% 0, 91% 0, 91% 30%, 84% 42%, 84% 84%, 96% 84%, 96% 100%, 4% 100%, 4% 84%, 16% 84%, 16% 42%, 9% 30%);
}
.game-mark--castle > span::after {
  content: "";
  position: absolute;
  width: 20%;
  height: 38%;
  bottom: 8%;
  left: 40%;
  border-radius: 50% 50% 0 0;
  background: #e1ead6;
}
.light {
  min-height: 100vh;
  color-scheme: light;
  --bg: #f7f4ec;
  --panel: #fffcf5;
  --field: #fffdf8;
  --line: #d8d3c4;
  --text: #222c21;
  --muted: #596451;
  --accent: #4a613c;
  --accent-strong: #32472d;
  --alert: #78502b;
  background: var(--bg);
  color: var(--text);
}
.light .top { background: #faf8f0; border-color: #e0dbcd; }
.light .collection-mark { background: #405937; color: #f2f3e4; }
.light .button { color: #3b5235; border-color: #c0c7b1; background: #edf0e4; }
.light .button:hover:not(:disabled) { background: #e3e9d9; }
.light .button.ghost { color: var(--text); background: transparent; border-color: var(--line); }
.light .button.ghost:hover:not(:disabled), .light .quiet-button:hover { background: #eeede3; }
.light .quiet-button:hover { color: var(--text); }
.light .button.primary { color: #fffdf8; background: #405937; border-color: #405937; }
.light .button.primary:hover:not(:disabled) { background: #31492a; }
.light .notice { background: #f8eedc; border-color: #e6d1b4; }
.light .results { background: #f5f6ec; border-color: #d3dbc6; }
.light .point-unit { background: #e7eddf; color: #30462b; border-color: #d0dac5; }

.catalog .shell { max-width: 1136px; }
.catalog-main { padding-top: clamp(42px, 7vw, 88px); }
.catalog-intro { margin-bottom: clamp(26px, 5vw, 46px); }
.catalog-intro h1 { letter-spacing: -.065em; font-size: clamp(2.55rem, 6.6vw, 5.15rem); }
.catalog-intro p { color: var(--muted); max-width: 535px; font-size: clamp(.98rem, 2vw, 1.14rem); margin: 19px 0 0; line-height: 1.55; }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.game-tile {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d5cbb8;
  border-radius: 15px;
  background: #fdfbf5;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.game-tile:hover {
  transform: translateY(-3px);
  border-color: #a79e88;
  box-shadow: 0 10px 30px #4e402114;
}
.tile-art { height: clamp(190px, 23vw, 270px); position: relative; overflow: hidden; }
.tile-art--mars {
  background: radial-gradient(ellipse at 72% 45%, #63382d 0%, #2d2129 56%, #201a23 100%);
}
.tile-art--mars img {
  width: min(82%, 435px);
  height: auto;
  position: absolute;
  aspect-ratio: 1;
  right: -4%;
  top: -33%;
  border-radius: 50%;
  filter: saturate(.87) brightness(.95);
}
.tile-art--mars::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 15% 23%, #ffded3a0 0 1px, transparent 2px), radial-gradient(circle at 31% 52%, #ffdeb580 0 1px, transparent 2px), radial-gradient(circle at 8% 63%, #fff9e297 0 1px, transparent 2px), radial-gradient(circle at 35% 19%, #ffdfb66a 0 1px, transparent 2px), radial-gradient(circle at 21% 75%, #fff9e27a 0 1px, transparent 2px), linear-gradient(0deg, #1c151c50, transparent 60%);
}
.tile-art--castle { background: #d7c8a4; }
.tile-art--castle img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 5% 48%; }
.tile-content {
  min-height: 113px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 19px;
  flex: 1;
}
.tile-text { min-width: 0; }
.tile-text h2 { font-size: clamp(1.17rem, 2.25vw, 1.55rem); }
.tile-text p { color: var(--muted); font-size: .84rem; line-height: 1.4; margin: 5px 0 0; }
.tile-open {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 8px 5px;
  margin-left: auto;
  color: #395535;
  font-size: .85rem;
  font-weight: 670;
  white-space: nowrap;
}
.game-tile--mars .tile-open { color: #863d2f; }
.tile-open span:last-child { font-size: 1.17rem; }

.collection-footer {
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 9px 18px;
  padding-top: 19px;
  padding-bottom: 30px;
  font-size: .76rem;
  line-height: 1.5;
}
.catalog .collection-footer { margin-top: 35px; border-top: 1px solid #ddd8cb; }
.photo-links { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; }
.collection-footer a { text-underline-offset: 2px; }

.carcassonne-banner {
  color: #fff7e7;
  border-color: #77856a;
  background: #293525;
}
.carcassonne-banner::after { background: linear-gradient(90deg, #293525 0%, #293525ef 34%, #29352560 66%, transparent 96%); }
.castle-scene {
  position: absolute;
  inset: 0 0 0 52%;
  z-index: -2;
  mask-image: linear-gradient(90deg, transparent, #000 23%);
  background: #756d47 url("carcassonne-cite.webp") 6% 42% / cover no-repeat;
}
.carcassonne-banner .hero-kicker { color: #dce8ca; }
.carcassonne-banner .hero-copy { color: #f5efd9; }
.carcassonne-banner h1 { font-family: "PT Serif", Georgia, serif; letter-spacing: -.037em; }
.carcassonne-banner .game-mark { background: #e1ead6; }
.cc-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.cc-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 31px;
  grid-template-rows: auto auto;
  gap: 5px 6px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f6ef;
}
.cc-player-label { grid-column: 1 / -1; font-size: .75rem; color: var(--muted); }
.cc-player-input, .cc-number, .cc-field select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border-radius: 7px;
  border: 1px solid #cccdbc;
  padding: 7px 9px;
  color: var(--text);
  background: var(--field);
  font: inherit;
  font-size: .92rem;
}
.cc-player-remove {
  min-height: 35px;
  border: 0;
  border-radius: 6px;
  color: #685947;
  background: #ece9dc;
  font-size: 1.03rem;
}
.cc-player-remove:hover:not(:disabled) { background: #e6d8c7; }
.cc-player-remove:disabled { opacity: .32; }
.cc-select, .cc-field select { padding-right: 30px; }
.cc-form { display: grid; gap: 12px; }
.cc-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.cc-field { display: grid; min-width: 0; gap: 5px; }
.cc-field-label, .cc-owner-group legend { color: var(--muted); font-size: .8rem; font-weight: 640; }
.cc-phase-note { margin: 0; grid-column: 1 / -1; color: var(--muted); font-size: .8rem; }
.cc-owner-group { margin: 1px 0 0; border: 0; padding: 0; min-inline-size: 0; }
.cc-owner-group legend { margin-bottom: 6px; padding: 0; }
.cc-owners { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-owner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 40px;
  border: 1px solid #d3d7c6;
  border-radius: 7px;
  padding: 6px 9px;
  cursor: pointer;
  background: #f5f6ed;
  font-size: .85rem;
  overflow-wrap: anywhere;
}
.cc-owner:has(input:checked) { background: #e3ecd7; border-color: #93a986; }
.cc-owner-input { accent-color: #405937; margin: 0; }
.cc-submit { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cc-preview { color: #385334; font-size: .88rem; font-weight: 660; }
.cc-status { margin: 11px 0 0; color: #35532d; font-size: .83rem; }
.cc-status:empty { display: none; }
.cc-scores, .cc-history { display: grid; gap: 7px; }
.cc-score-row {
  min-height: 51px;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 8px;
  background: #fcfcf5;
  border: 1px solid #d6ddca;
  border-radius: 7px;
}
.cc-score-place { background: #e5ecd9; color: #405937; border-radius: 4px; padding: 3px; text-align: center; font-weight: 700; font-size: .83rem; }
.cc-score-name { overflow-wrap: anywhere; font-size: .9rem; }
.cc-score-value { font-size: 1.18rem; font-variant-numeric: tabular-nums; }
.cc-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #f8f7ed;
  border: 1px solid #dedccd;
  border-radius: 7px;
  padding: 8px 10px;
}
.cc-entry-feature { font-size: .88rem; }
.cc-entry-meta { margin-top: 3px; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.cc-entry-points { white-space: nowrap; font-weight: 720; font-size: .86rem; color: #3c5a35; }
.cc-empty { color: var(--muted); margin: 0; font-size: .84rem; }

@media (max-width: 920px) {
  .tile-open span:first-child { display: none; }
}
@media (max-width: 730px) {
  .game-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .catalog-main { padding-top: 36px; }
  .catalog-intro p { margin-top: 12px; }
  .tile-art { height: clamp(184px, 44vw, 250px); }
  .tile-content { gap: 10px; padding: 13px; min-height: 91px; }
  .tile-open { padding-right: 4px; }
  .tile-open span:first-child { display: block; }
  .game-heading { gap: 10px; }
  .game-heading .game-mark { --mark-size: 40px; border-radius: 10px; }
  .all-games { display: none; }
  .castle-scene { inset-inline-start: 26%; background-position: 8% center; }
  .carcassonne-banner::after { background: linear-gradient(90deg, #263323f5, #263323b7 61%, #26332335); }
  .cc-form input, .cc-form select, .cc-player-input { font-size: 1rem; }
}
@media (max-width: 380px) {
  .tile-open span:first-child { display: none; }
  .tile-content .game-mark { --mark-size: 43px; border-radius: 10px; }
  .game-heading h1 { font-size: 1.96rem; }
  .cc-submit { align-items: stretch; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .game-tile { transition: none; }
}
