/*
Theme Name: Solitaire Zone
Theme URI: https://solitairezone.net/
Author: Solitaire Zone
Description: A retro 1960s and 1970s inspired Solitaire games collection for solitairezone.net.
Version: 1.0.0
Text Domain: solitaire-zone
*/

:root {
  color-scheme: light;
  --cream: #f8edcf;
  --paper: #fff7dd;
  --ink: #2d2118;
  --brown: #6f4326;
  --orange: #d55e2d;
  --mustard: #d9a72f;
  --avocado: #6f8b3d;
  --teal: #207c77;
  --red: #b9312b;
  --shadow: rgba(45, 33, 24, 0.22);
  --table: #236d62;
  --table-dark: #174d45;
  --card-w: clamp(48px, 8vw, 82px);
  --card-h: calc(var(--card-w) * 1.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18px 18px, rgba(111, 67, 38, 0.1) 2px, transparent 2.5px) 0 0 / 36px 36px,
    linear-gradient(135deg, #f8edcf 0%, #f1d99e 45%, #c8793e 100%);
  color: var(--ink);
  font-family: "Libre Franklin", Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 22px;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px clamp(16px, 4vw, 44px);
  background: rgba(248, 237, 207, 0.94);
  border-bottom: 5px solid var(--brown);
  box-shadow: 0 10px 0 rgba(111, 67, 38, 0.08);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 220px;
}

.brand-mark {
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--ink);
  background:
    radial-gradient(circle, var(--paper) 0 31%, transparent 32%),
    conic-gradient(from 35deg, var(--orange), var(--mustard), var(--avocado), var(--teal), var(--orange));
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--brown);
  font-weight: 900;
}

.brand-card {
  position: absolute;
  left: 5px;
  top: 8px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 32px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 1rem;
  line-height: 1;
  transform: rotate(-9deg);
}

.brand-initials {
  position: absolute;
  right: 3px;
  bottom: 5px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--teal);
  color: var(--paper);
  font-size: 0.68rem;
  line-height: 1;
}

.brand strong {
  display: block;
  font-family: "Cooper Black", Georgia, serif;
  font-size: clamp(1rem, 2vw, 1.35rem);
  letter-spacing: 0;
}

.brand small {
  display: block;
  color: #765238;
  font-size: 0.75rem;
}

.top-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.top-nav a,
.quick-games a,
.mode-tabs button {
  text-decoration: none;
  border: 2px solid var(--brown);
  background: var(--paper);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 800;
  padding: 8px 13px;
  box-shadow: 2px 2px 0 var(--brown);
}

.top-nav a:hover,
.quick-games a:hover,
.mode-tabs button:hover,
.button:hover,
.tool-button:hover,
.icon-button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--brown);
}

.icon-button,
.tool-button,
.button,
.mode-tabs button {
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--brown);
  background: var(--mustard);
  color: var(--ink);
  font-size: 1.1rem;
  box-shadow: 2px 2px 0 var(--brown);
}

main {
  overflow: hidden;
}

.hero-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  align-items: center;
  gap: clamp(24px, 5vw, 70px);
  min-height: min(760px, calc(88vh - 70px));
  padding: clamp(30px, 5.5vw, 64px) clamp(16px, 5vw, 72px) clamp(22px, 3vw, 34px);
  background:
    linear-gradient(90deg, rgba(248, 237, 207, 0.92), rgba(248, 237, 207, 0.58)),
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(45, 33, 24, 0.04) 7px 8px);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1,
h2 {
  font-family: "Cooper Black", Georgia, serif;
  font-weight: 900;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(3.4rem, 8vw, 7.2rem);
  color: var(--brown);
  text-shadow: 3px 3px 0 var(--mustard);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--brown);
}

h3 {
  color: var(--teal);
  font-size: 1.1rem;
}

.hero-copy p:not(.eyebrow) {
  max-width: 640px;
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 3px solid var(--brown);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 3px 3px 0 var(--brown);
}

.button.primary {
  background: var(--orange);
  color: var(--paper);
}

.button.secondary {
  background: var(--mustard);
}

.hero-art {
  position: relative;
  min-height: 390px;
}

.sunburst {
  position: absolute;
  inset: 4% 0 0 8%;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from -8deg, rgba(217, 167, 47, 0.95) 0 10deg, rgba(213, 94, 45, 0.9) 10deg 20deg),
    radial-gradient(circle, var(--paper), transparent 62%);
  border: 5px solid var(--brown);
  box-shadow: 14px 16px 0 rgba(111, 67, 38, 0.2);
}

.hero-card {
  position: absolute;
  width: clamp(104px, 16vw, 170px);
  aspect-ratio: 0.72;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 5px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  font-weight: 900;
  line-height: 0.95;
  text-align: center;
  box-shadow: 10px 12px 0 var(--brown);
}

.hero-card.ace {
  top: 10%;
  left: 12%;
  transform: rotate(-10deg);
}

.hero-card.queen {
  top: 28%;
  right: 12%;
  color: var(--red);
  transform: rotate(11deg);
}

.hero-card.seven {
  bottom: 8%;
  left: 30%;
  color: var(--teal);
  transform: rotate(-2deg);
}

.game-shell,
.collection-section,
.guide-section,
.content-grid,
.quick-games {
  width: min(1180px, calc(100% - 32px));
  margin: clamp(28px, 5vw, 60px) auto;
}

.game-shell {
  padding: clamp(16px, 3vw, 28px);
  background: var(--paper);
  border: 4px solid var(--brown);
  box-shadow: 10px 10px 0 rgba(111, 67, 38, 0.24);
}

.hero-band + .game-shell {
  margin-top: 12px;
}

.game-topbar,
.game-actions,
.upper-row,
.content-grid,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.game-topbar {
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mode-tabs button {
  font: inherit;
  font-weight: 900;
}

.mode-tabs button.is-active {
  background: var(--teal);
  color: var(--paper);
}

.mode-tabs button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.game-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  border: 2px solid var(--brown);
  border-radius: 999px;
  background: #f2c14e;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  box-shadow: 2px 2px 0 var(--brown);
}

.table-wrap {
  position: relative;
}

.score-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.score-panel div {
  min-height: 58px;
  padding: 8px;
  border: 2px solid rgba(248, 237, 207, 0.65);
  background: rgba(23, 77, 69, 0.58);
  color: var(--paper);
  text-align: center;
}

.score-panel span {
  display: block;
  font-weight: 900;
  font-size: clamp(1rem, 2.5vw, 1.45rem);
}

.score-panel small {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #f7dc8a;
  font-weight: 900;
}

.game-table {
  overflow-x: auto;
  min-height: clamp(520px, 64vw, 720px);
  padding: clamp(12px, 2.5vw, 24px);
  border: 6px solid var(--brown);
  background:
    radial-gradient(circle at 14px 14px, rgba(248, 237, 207, 0.12) 2px, transparent 2.5px) 0 0 / 28px 28px,
    linear-gradient(145deg, var(--table), var(--table-dark));
}

.upper-row {
  min-width: calc(var(--card-w) * 7 + 72px);
  justify-content: flex-start;
  margin-bottom: clamp(20px, 4vw, 36px);
}

.spacer {
  flex: 1;
  min-width: clamp(20px, 14vw, 220px);
}

.pile,
.column {
  position: relative;
  flex: 0 0 var(--card-w);
  width: var(--card-w);
}

.pile {
  height: var(--card-h);
  border: 2px dashed rgba(248, 237, 207, 0.7);
  border-radius: 9px;
  background: rgba(248, 237, 207, 0.12);
  color: rgba(248, 237, 207, 0.74);
  font: inherit;
}

.pile span {
  font-size: clamp(1.4rem, 5vw, 2.3rem);
}

.stock.has-cards::before,
.card.back::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 7px;
  border: 2px solid #f3ddb0;
  background:
    linear-gradient(45deg, rgba(248, 237, 207, 0.22) 25%, transparent 25% 50%, rgba(248, 237, 207, 0.22) 50% 75%, transparent 75%) 0 0 / 18px 18px,
    #aa4928;
}

.waste .card,
.foundation .card {
  left: -2px;
  top: -2px;
}

.tableau-row {
  display: grid;
  grid-template-columns: repeat(7, var(--card-w));
  gap: clamp(8px, 1.7vw, 18px);
  min-width: calc(var(--card-w) * 7 + 72px);
}

.column {
  min-height: calc(var(--card-h) + 260px);
  border-radius: 9px;
}

.column::before {
  content: "";
  position: absolute;
  width: var(--card-w);
  height: var(--card-h);
  border: 2px dashed rgba(248, 237, 207, 0.48);
  border-radius: 9px;
}

.card {
  position: absolute;
  width: var(--card-w);
  height: var(--card-h);
  border: 2px solid #271b13;
  border-radius: 9px;
  background: #fff9e8;
  color: #20150f;
  box-shadow: 0 4px 0 rgba(45, 33, 24, 0.22);
  cursor: pointer;
  user-select: none;
}

.card.red {
  color: var(--red);
}

.card.selected {
  outline: 4px solid var(--mustard);
  transform: translateY(-4px);
}

.card-face {
  position: absolute;
  inset: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: Georgia, serif;
  font-weight: 900;
  font-size: clamp(0.9rem, 2.4vw, 1.28rem);
}

.card-face .center {
  align-self: center;
  font-size: clamp(1.7rem, 5vw, 2.55rem);
}

.game-message {
  min-height: 28px;
  margin: 12px 0 0;
  font-weight: 800;
  color: var(--brown);
}

.quick-games {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.quick-games a:nth-child(3n + 1) {
  background: var(--mustard);
}

.quick-games a:nth-child(3n + 2) {
  background: #e8b58c;
}

.quick-games a:nth-child(3n) {
  background: #b7c06a;
}

.content-grid {
  align-items: stretch;
}

.ranking-board,
.stats-card,
.game-category,
.guide-columns article,
.strategy-strip {
  background: rgba(255, 247, 221, 0.92);
  border: 3px solid var(--brown);
  box-shadow: 6px 6px 0 rgba(111, 67, 38, 0.2);
}

.ranking-board,
.stats-card {
  flex: 1 1 330px;
  padding: clamp(18px, 3vw, 26px);
}

.ranking-board ol {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 22px 0 0;
  list-style-position: inside;
}

.ranking-board li,
.stats-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 2px dotted rgba(111, 67, 38, 0.34);
}

.ranking-board strong,
.stats-card dd {
  color: var(--red);
  font-weight: 900;
}

.stats-card dl {
  margin: 18px 0 0;
}

.stats-card dt,
.stats-card dd {
  margin: 0;
}

.section-heading.wide {
  max-width: 850px;
  margin-bottom: 24px;
}

.game-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.game-category {
  padding: 18px;
}

.game-category h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.game-category h3::before {
  content: "●";
  color: var(--orange);
}

.game-category ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.game-category a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 2px dotted rgba(111, 67, 38, 0.25);
  text-decoration: none;
  font-weight: 800;
}

.game-category a::after {
  content: "Play";
  color: var(--teal);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.guide-section {
  padding-bottom: 30px;
}

.guide-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.guide-columns article,
.strategy-strip {
  padding: 18px;
}

.guide-columns p {
  margin-bottom: 0;
}

.strategy-strip {
  margin-top: 18px;
  background:
    linear-gradient(90deg, rgba(248, 237, 207, 0.88), rgba(248, 237, 207, 0.96)),
    repeating-linear-gradient(90deg, var(--orange) 0 18px, var(--mustard) 18px 36px, var(--teal) 36px 54px);
}

.strategy-strip ul {
  columns: 2 260px;
  padding-left: 20px;
}

.site-footer {
  margin-top: 56px;
  padding: 24px clamp(16px, 5vw, 72px);
  background: var(--brown);
  color: var(--paper);
  flex-wrap: wrap;
}

.site-footer p {
  margin: 4px 0 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer a {
  font-weight: 900;
}

body.harvest {
  --table: #744f8e;
  --table-dark: #46305e;
}

body.harvest .brand-mark {
  background: conic-gradient(from 30deg, #d55e2d, #f2c14e, #6f8b3d, #744f8e, #d55e2d);
}

@media (max-width: 820px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    min-width: 0;
  }

  .hero-band {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-art {
    min-height: 300px;
  }

  .content-grid {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  :root {
    --card-w: 43px;
  }

  .site-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px 14px;
  }

  .brand {
    grid-column: 1;
  }

  .brand small {
    display: none;
  }

  .top-nav {
    grid-column: 1 / -1;
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    gap: 5px;
    padding: 2px 2px 6px;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .top-nav a {
    flex: 0 0 auto;
    padding: 6px 8px;
    font-size: 0.88rem;
  }

  .icon-button {
    grid-column: 2;
    grid-row: 1;
  }

  .hero-band {
    gap: 10px;
    padding-top: 24px;
    padding-bottom: 12px;
  }

  .hero-copy p:not(.eyebrow) {
    margin: 12px 0 0;
  }

  .hero-actions {
    margin-top: 16px;
  }

  .hero-art {
    min-height: 128px;
  }

  .sunburst {
    inset: 0 15% auto;
    height: 128px;
  }

  .hero-card {
    width: 82px;
    border-width: 3px;
    border-radius: 10px;
    box-shadow: 5px 6px 0 var(--brown);
    font-size: 2.25rem;
  }

  .hero-card.ace {
    top: 6px;
    left: 20%;
  }

  .hero-card.queen {
    top: 20px;
    right: 17%;
  }

  .hero-card.seven {
    bottom: 0;
    left: 42%;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .game-shell,
  .collection-section,
  .guide-section,
  .content-grid,
  .quick-games {
    width: min(100% - 20px, 1180px);
  }

  .score-panel {
    grid-template-columns: repeat(2, 1fr);
  }

  .game-table {
    min-height: 520px;
  }
}
