* {
  box-sizing: border-box;
}
:root {
  --green: #164a3b;
  --ink: #173f34;
  --paper: #faf9f4;
  --line: #d7dcd1;
  --muted: #576b60;
  --gold: #f4d79b;
  --serif: "Baskervville", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "DM Sans", "Segoe UI", Arial, sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
body {
  margin: 0;
  min-height: 100dvh;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
  touch-action: manipulation;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #ce942c;
  outline-offset: 3px;
}
button {
  transition:
    background 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
button:not(.pile):active {
  transform: translateY(1px);
}
img,
svg {
  display: block;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
}
button svg {
  flex-shrink: 0;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
#mast {
  border-bottom: 1px solid var(--line);
  background: #fcfbf7;
}
.navwrap {
  max-width: 1490px;
  margin: auto;
  height: 76px;
  padding: 0 clamp(18px, 4.5vw, 78px);
  display: flex;
  align-items: center;
  gap: 48px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font: 600 29px var(--serif);
  letter-spacing: -1.4px;
  padding: 0;
}
.brand img {
  width: 39px;
  height: 39px;
}
.navwrap nav {
  display: flex;
  gap: 8px;
  align-items: center;
}
.navitem,
.textbutton,
.gold,
.green,
.outline,
.lightline,
.redbutton,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 0.93rem;
  font-weight: 600;
  white-space: nowrap;
}
.navitem {
  height: 39px;
  padding: 0 15px;
  color: #59675d;
  border-radius: 7px;
}
.navitem.current,
.navitem:hover {
  color: var(--ink);
  background: #e8ede4;
}
.tools {
  display: flex;
  gap: 9px;
  margin-left: auto;
}
.iconbutton {
  padding: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.iconbutton:hover,
.outline:hover {
  background: #eaece3;
}
.home-wrap {
  max-width: 1490px;
  margin: auto;
  padding: clamp(20px, 2.5vw, 40px) clamp(18px, 4.5vw, 78px) 8px;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(340px, 29vw, 445px);
  border-radius: 16px;
  background: #123e34;
  box-shadow: 0 5px 16px #233f2a0f;
  display: flex;
  align-items: center;
}
.hero:after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid #dacb9950;
  border-radius: 9px;
  z-index: 3;
  pointer-events: none;
}
.hero-art,
.land {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-art {
  overflow: hidden;
}
.land {
  background:
    linear-gradient(90deg, #103b32 0%, #103b32f2 25%, #103b3280 52%, #163b302b 78%),
    linear-gradient(0deg, #12372dc4, transparent 55%),
    url(../assets/alpine-landscape.svg) right 50% center / cover no-repeat;
  background-position:
    center,
    center,
    right center;
  background-size:
    auto,
    auto,
    80% auto;
  background-repeat: no-repeat;
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: 36px clamp(28px, 4.2vw, 72px);
  color: #fff9e9;
  width: 58%;
}
.ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 1.05rem var(--serif);
  color: #dac48b;
  letter-spacing: 2px;
  margin-bottom: clamp(20px, 2.5vw, 42px);
}
.ornament i {
  width: 40px;
  height: 1px;
  background: #d2bd86;
}
.kicker,
.table-caption,
.tableau-head {
  font-weight: 700;
  letter-spacing: 0.15em;
  font-size: 0.72rem;
  text-transform: uppercase;
}
.hero .kicker {
  color: #d9d8bc;
}
.hero h1 {
  font-size: clamp(51px, 5.8vw, 92px);
  letter-spacing: -0.057em;
  line-height: 1.09;
  margin: 7px 0 15px;
  white-space: nowrap;
}
.hero-meta {
  font-size: clamp(14px, 1.12vw, 18px);
  color: #e6e8d7;
}
.hero-actions,
.dialog-actions,
.lesson-actions,
.deal-actions,
.boardtools {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-actions {
  margin-top: 32px;
}
.gold,
.green,
.outline,
.lightline,
.redbutton {
  min-height: 44px;
  padding: 0 21px;
  border-radius: 7px;
}
.gold {
  background: var(--gold);
  color: #203e31;
}
.gold:hover {
  background: #ffe5af;
}
.green {
  background: var(--green);
  color: #fffaf0;
}
.green:hover {
  background: #24604e;
}
.lightline {
  background: #133a30a6;
  color: #fff9e9;
  border: 1px solid #d5dec38f;
}
.lightline:hover {
  background: #285746;
}
.outline {
  border: 1px solid #bdc9bd;
  background: transparent;
}
.textbutton {
  padding: 8px 6px;
  color: #3f594c;
}
.textbutton:hover {
  color: #0b6747;
  text-decoration: underline;
}
.redbutton {
  color: white;
  background: #9d3326;
}
.fan {
  position: absolute;
  right: clamp(76px, 10.4vw, 186px);
  top: 51%;
  width: clamp(130px, 12.6vw, 215px);
  aspect-ratio: 5/7;
  transform: translateY(-50%);
  filter: drop-shadow(2px 13px 11px #102b2678);
}
.display-card {
  position: absolute;
  inset: 0;
  background: #f8f3df;
  border: 1px solid #3e503b6b;
  border-radius: 8%;
  transform-origin: 50% 86%;
  box-shadow: 0 1px 4px #10251d57;
}
.display-back {
  transform: translate(-35%, -1%) rotate(-24deg);
  background: #243b4e url(../assets/card-back.svg) center/100% 100%;
  border: 2px solid #f4ebd4;
}
.display-heart {
  transform: translate(-6%, -3%) rotate(-6deg);
  color: #9e483d;
}
.display-heart strong {
  position: absolute;
  inset: 26% 0;
  text-align: center;
  font:
    90px Georgia,
    serif;
}
.display-ace {
  transform: translate(25%, 0) rotate(15deg);
  color: #17493a;
}
.display-ace:before,
.display-heart:before {
  content: "";
  position: absolute;
  inset: 4%;
  border: 1px solid #82927980;
  border-radius: 5%;
}
.display-card b {
  position: absolute;
  left: 8%;
  top: 6%;
  font: 500 clamp(25px, 2.8vw, 46px) / 0.85 var(--serif);
  text-align: center;
}
.display-card small {
  display: block;
  font:
    65%/1.1 Georgia,
    serif;
}
.display-card b.inverted {
  inset: auto 8% 6% auto;
  transform: rotate(180deg);
}
.ace-center {
  position: absolute;
  width: 56%;
  inset: 25% auto auto 22%;
}
.ace-center svg {
  width: 100%;
}
.lesson-home {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 20px 24px;
  border: 1px solid #c6d3c4;
  background: #edf2e9;
  border-radius: 11px;
  margin-top: 20px;
}
.booktile,
.modal-icon {
  display: grid;
  place-items: center;
  background: #d9e5d6;
  color: #285844;
  border-radius: 10px;
  flex: none;
}
.booktile {
  width: 50px;
  height: 53px;
}
.lesson-copy .kicker {
  font-size: 0.66rem;
  color: #51725a;
  letter-spacing: 0.12em;
}
.lesson-copy h2 {
  font-size: 24px;
  letter-spacing: -0.7px;
  line-height: 1.17;
  margin-top: 3px;
}
.lesson-copy p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #455e50;
  margin-top: 3px;
}
.lesson-actions {
  margin-left: auto;
  flex: none;
}
.lesson-actions .green {
  min-height: 38px;
  padding: 0 21px;
}
.lesson-actions .textbutton {
  font-size: 0.84rem;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 29px 0 16px;
}
.section-head h2 {
  font-size: clamp(24px, 2.2vw, 34px);
  letter-spacing: -0.045em;
}
.section-head .textbutton {
  font-size: 0.88rem;
}
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.modebox {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 19px 21px;
  background: #fffefa;
  border: 1px solid #d4d9ce;
  border-radius: 10px;
  text-align: left;
  min-height: 112px;
}
.modebox:hover {
  border-color: #819a80;
  box-shadow: 0 4px 12px #173f3412;
}
.modeart {
  position: relative;
  display: block;
  flex: none;
  width: 64px;
  height: 71px;
  border-radius: 6px;
  background: #e0e9db;
  overflow: hidden;
  color: #3f6951;
}
.standard .modeart {
  background: #efe5d8;
  color: #984936;
}
.classic .modeart {
  background: #dfe6e8;
  color: #294859;
}
.tiny {
  position: absolute;
  display: block;
  width: 28px;
  height: 41px;
  border: 1px solid currentColor;
  border-radius: 3px;
  top: 18px;
  left: 16px;
  font:
    16px/1 Georgia,
    serif;
}
.backtiny {
  transform: rotate(-17deg) translate(-4px, 1px);
  background: repeating-linear-gradient(45deg, transparent 0 2px, currentColor 2px 2.5px);
}
.fronttiny {
  transform: rotate(11deg) translate(4px, -3px);
  background: #fffbed;
  text-align: center;
  padding-top: 16px;
}
.fronttiny b {
  position: absolute;
  top: 2px;
  left: 3px;
  font: 10px Georgia;
}
.modewords strong {
  font: 500 25px var(--serif);
  letter-spacing: -0.7px;
  display: block;
  margin-bottom: 5px;
}
.modewords small {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
  display: block;
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin: 26px 0 0;
  padding: 14px 0;
  color: #738272;
}
footer > span {
  font-family: Georgia, serif;
}
footer .textbutton {
  font-size: 0.82rem;
}
footer > div {
  display: flex;
  gap: 15px;
}
dialog {
  border: 1px solid #c3cdbf;
  background: var(--paper);
  border-radius: 17px;
  width: min(475px, calc(100vw - 24px));
  padding: 0;
  color: var(--ink);
  max-height: 92dvh;
  box-shadow: 0 25px 100px #07191055;
}
dialog::backdrop {
  background: #10271fc7;
  backdrop-filter: blur(3px);
}
#dialog-inner {
  padding: 26px 29px 29px;
}
.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-icon {
  width: 45px;
  height: 45px;
}
.modal-top .iconbutton {
  width: 35px;
  height: 35px;
}
.modal-top + h2 {
  font-size: 36px;
  letter-spacing: -1.5px;
  margin: 18px 0;
}
.modal-top ~ p,
form p {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 12px 0;
}
.formcap {
  margin: 0 0 10px;
}
.segments {
  display: flex;
  gap: 3px;
  padding: 4px;
  background: #e6ebe2;
  border: 1px solid #d2dacd;
  border-radius: 8px;
}
.segments button {
  flex: 1;
  padding: 9px 0;
  border-radius: 5px;
  font-size: 0.88rem;
}
.segments .active {
  background: var(--green);
  color: white;
}
.formrow,
.settingrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
  min-height: 53px;
}
.formrow select,
.numberlabel input {
  background: #fffef9;
  color: var(--ink);
  border: 1px solid #b9c8b8;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.9rem;
}
.formrow select {
  width: 140px;
}
.dialog-actions {
  margin-top: 19px;
  justify-content: flex-end;
}
.wrap {
  flex-wrap: wrap;
}
.numberlabel {
  display: grid;
  gap: 8px;
}
.numberlabel input {
  width: 100%;
  font-size: 1.3rem;
}
.settingrow {
  width: 100%;
  text-align: left;
}
.switch {
  position: relative;
  width: 42px;
  height: 25px;
  border-radius: 18px;
  background: #a7b3a8;
}
.switch:after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: white;
}
.switch.on {
  background: var(--green);
}
.switch.on:after {
  left: 20px;
}
.statgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.statgrid section {
  background: #eaf0e6;
  border-radius: 8px;
  padding: 14px;
}
.statgrid h3 {
  font-size: 23px;
  margin-bottom: 10px;
}
.statgrid section div {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin: 9px 0;
  font-size: 0.85rem;
}
.menulist {
  display: grid;
  gap: 8px;
}
.menulist button {
  justify-content: flex-start;
}
.tag {
  background: #e6ece1;
  border-radius: 20px;
  padding: 8px 13px;
  font-size: 0.83rem;
}
#toast {
  position: fixed;
  z-index: 20;
  bottom: 80px;
  left: 50%;
  transform: translate(-50%, 8px);
  background: #122e27;
  color: #fffbe9;
  padding: 11px 18px;
  border: 1px solid #9faf91;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  max-width: 90vw;
  width: max-content;
  text-align: center;
  transition: 0.15s;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.land {
  background-image: linear-gradient(90deg, #103b32 0%, #103b32f0 24%, #103b3277 51%, #163b3025 78%),
    linear-gradient(0deg, #12372d99, transparent 55%), url(../assets/alpine-landscape.svg);
  background-position:
    center,
    center,
    right center;
  background-size:
    auto,
    auto,
    80% auto;
  background-repeat: no-repeat;
}
body.playing {
  overflow: hidden;
}
.gamewrap {
  height: calc(100dvh - 77px);
  padding: 15px clamp(12px, 2.5vw, 46px) 10px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  max-width: 1710px;
  margin: auto;
}
.gamehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.gamehead h1 {
  font-size: clamp(27px, 2.65vw, 43px);
  letter-spacing: -0.052em;
  line-height: 1.15;
}
.gamehead .kicker {
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.gamehead .outline {
  min-height: 38px;
}
.boardlesson {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 15px;
  border: 1px solid #cbdbc8;
  background: #eaf0e5;
  border-radius: 8px;
}
.boardlesson b {
  display: block;
  color: #53725b;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.boardlesson p {
  margin-top: 2px;
  font-size: 0.94rem;
  line-height: 1.3;
}
.lessonbtns {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
}
.lessonbtns button {
  font-size: 0.82rem;
}
.lessonbtns .green {
  min-height: 34px;
}
.felt {
  background: radial-gradient(ellipse at 43% 22%, #24674d, #1b553f 66%, #154a39);
  color: #fcf7df;
  padding: clamp(12px, 1.55vw, 24px);
  padding-bottom: 0;
  border-radius: 13px;
  border: 1px solid #164733;
  box-shadow:
    inset 0 0 0 5px #17433244,
    0 2px 8px #183c221c;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}
.table-top {
  display: grid;
  grid-template-columns: 2fr 12fr;
  column-gap: clamp(14px, 2vw, 36px);
  row-gap: 10px;
}
.table-caption,
.tableau-head {
  color: #d8e6cb;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
}
.table-caption i {
  font-style: normal;
  color: #a7ba8d;
  font-size: 0.7em;
  margin: 0 4px;
}
.stockgroup,
.foundgroup,
.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(3px, 0.55vw, 10px);
}
.foundgroup {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.pile {
  position: relative;
  color: inherit;
  padding: 0;
  min-width: 0;
  display: block;
  border: 0;
  background: none;
  border-radius: 6px;
  touch-action: none;
  outline-offset: 1px;
}
.stockgroup .pile,
.foundation {
  aspect-ratio: 5/7;
  max-height: clamp(55px, 15vh, 148px);
}
.card,
.slot,
.emptyslot {
  position: absolute;
  display: block;
  inset: 0 auto auto 0;
  width: 100%;
  aspect-ratio: 5/7;
  border-radius: clamp(3px, 0.45vw, 7px);
}
.stockgroup .card,
.foundation .card,
.slot {
  height: 100%;
  aspect-ratio: auto;
}
.card {
  overflow: hidden;
  box-shadow: 0 1.4px 2px #0a211b88;
  pointer-events: auto;
}
.face {
  background: #fffdf5;
  border: 1px solid #b3b7a7;
  color: #18342b;
}
.face.red {
  color: #ad2942;
}
.index {
  font: 600 clamp(14px, 1.6vw, 27px) / 1 var(--serif);
  position: absolute;
  top: 4%;
  left: 6%;
  display: flex;
  align-items: baseline;
  gap: 2px;
  z-index: 1;
}
.index i {
  font:
    normal 0.72em Georgia,
    serif;
}
.lower {
  position: absolute;
  right: 5%;
  bottom: 3%;
  font: 500 clamp(9px, 0.9vw, 16px) / 1 var(--serif);
  transform: rotate(180deg);
}
.royal {
  position: absolute;
  inset: 20% 0 13%;
  display: grid;
  place-items: center;
  font:
    clamp(33px, 3.5vw, 68px) Georgia,
    serif;
}
.pips {
  position: absolute;
  inset: 19% 6% 10%;
}
.pips i {
  position: absolute;
  font:
    normal clamp(12px, 1.35vw, 24px) / 1 Georgia,
    serif;
  transform: translate(-50%, -50%);
}
.back {
  background: #26384f url(../assets/card-back.svg) center / 100% 100% no-repeat;
  border: 1px solid #e4e4cf;
}
.slot,
.emptyslot {
  background: #13463166;
  border: 1px dashed #a4c5a899;
  color: #a7c6ae;
}
.slot {
  display: flex;
  align-items: center;
  justify-content: center;
  font: italic clamp(22px, 2.2vw, 39px) var(--serif);
}
.stockslot {
  flex-direction: column;
  gap: 4px;
}
.stockslot small {
  font: 600 0.65rem var(--sans);
}
.stockcount {
  position: absolute;
  bottom: 5px;
  right: 5px;
  border-radius: 8px;
  background: var(--gold);
  color: #233f2f;
  font: 700 0.73rem var(--sans);
  border: 1px solid #c7c3ab;
  padding: 1px 6px;
}
.tableau-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: clamp(10px, 2.5vh, 28px) 0 5px;
}
.tableau-head i {
  height: 1px;
  flex: 1;
  background: #a0c4a74d;
}
.columns {
  grid-template-columns: repeat(13, minmax(0, 1fr));
  flex: 1;
  min-height: 0;
}
.column {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
}
.colno {
  font: 500 0.65rem var(--sans);
  letter-spacing: 0.13em;
  color: #bed0bb;
  padding: 2px 0 6px;
  text-align: center;
}
.stack {
  display: block;
  position: relative;
  flex: 1;
  min-height: 0;
}
.emptyslot {
  opacity: 0.68;
}
.tablefoot {
  margin: 8px -1px 0;
  padding: 9px 0;
  display: flex;
  align-items: center;
  gap: 18px;
  border-top: 1px solid #bed0ba42;
  color: #e1ebd8;
  font-size: 0.79rem;
}
.tablefoot > span,
.progress {
  display: flex;
  align-items: center;
  gap: 6px;
}
.progress {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.progress i {
  width: 68px;
  background: #b4cbb452;
  height: 4px;
  border-radius: 5px;
  overflow: hidden;
}
.progress b {
  display: block;
  background: #e2cf96;
  height: 100%;
}
.boardtools {
  justify-content: center;
  gap: 8px;
}
.boardtools button {
  min-width: 104px;
  min-height: 40px;
}
.lifted {
  outline: 3px solid #4fc3f7;
  transform: translateY(-4px);
}
.target .card:last-child,
.target .slot,
.target .stack > .emptyslot:only-child,
.cue-target .card:last-child,
.cue-target .slot,
.cue-target .stack > .emptyslot:only-child {
  outline: 3px dashed #ffd54a;
  outline-offset: 1px;
}
.target:after,
.cue-target:after {
  content: "";
  position: absolute;
  right: 1px;
  top: 20px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffd54a;
}
.cue-source .card:last-child,
.cue-auto,
.cue-found {
  outline: 3px solid #80d1ec;
  outline-offset: 2px;
}
.cue-auto {
  background: #22694f;
}
.arrowlayer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  pointer-events: none;
  z-index: 4;
}
.dragghost {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 15;
  pointer-events: none;
  filter: drop-shadow(2px 8px 7px #132e236b);
}
.dragghost .card {
  width: 100%;
  height: 100%;
  pointer-events: none;
}
@media (min-width: 700px) and (max-height: 650px) and (orientation: landscape) {
  .playing .navwrap {
    height: 42px;
  }
  .playing .brand {
    font-size: 23px;
  }
  .playing .brand img {
    width: 29px;
    height: 29px;
  }
  .playing .iconbutton {
    width: 32px;
    height: 32px;
  }
  .playing .navitem {
    height: 32px;
  }
  .gamewrap {
    height: calc(100dvh - 43px);
    gap: 5px;
    padding: 5px 8px;
  }
  .gamehead h1 {
    font-size: 22px;
  }
  .gamehead .kicker {
    font-size: 9px;
    margin-bottom: 1px;
  }
  .gamehead .outline {
    min-height: 31px;
  }
  .boardlesson {
    padding: 3px 10px;
  }
  .boardlesson p {
    font-size: 0.8rem;
  }
  .boardlesson b {
    font-size: 0.62rem;
  }
  .felt {
    padding: 7px 9px 0;
  }
  .table-top {
    row-gap: 3px;
  }
  .table-caption,
  .tableau-head,
  .colno {
    font-size: 9px;
  }
  .tableau-head {
    margin: 5px 0 1px;
  }
  .colno {
    padding: 0 0 2px;
  }
  .tablefoot {
    padding: 3px 0;
    margin-top: 2px;
    font-size: 0.68rem;
  }
  .boardtools button {
    min-height: 31px;
  }
  .stockgroup .pile,
  .foundation {
    max-height: 16vh;
  }
  .column .card,
  .column .emptyslot {
    max-height: 19vh;
  }
  .boardlesson .lessonbtns button {
    padding: 6px;
  }
  .lessonbtns .green {
    min-height: 26px;
  }
}
@media (max-width: 900px) {
  .navwrap {
    gap: 20px;
  }
  .modebox {
    padding: 13px;
    gap: 12px;
  }
  .modeart {
    width: 50px;
  }
  .tiny {
    left: 10px;
  }
  .modewords strong {
    font-size: 22px;
  }
  .lesson-home {
    gap: 12px;
    padding: 15px;
  }
  .lesson-actions {
    gap: 6px;
  }
}
@media (max-width: 699px), (orientation: portrait) and (max-width: 1000px) {
  .navwrap {
    height: 58px;
    gap: 10px;
    padding: 0 14px;
  }
  .brand {
    font-size: 24px;
    gap: 6px;
  }
  .brand img {
    width: 32px;
    height: 32px;
  }
  .navwrap nav {
    gap: 0;
    margin-left: auto;
  }
  .navitem .icon {
    width: 16px;
  }
  .navitem {
    padding: 0 9px;
  }
  .navitem span {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  .tools {
    gap: 5px;
    margin-left: 0;
  }
  .iconbutton {
    width: 34px;
    height: 34px;
  }
  .home-wrap {
    padding: 14px 13px 4px;
  }
  .hero {
    min-height: 340px;
    align-items: flex-end;
  }
  .hero-copy {
    padding: 25px 22px;
    width: 100%;
  }
  .hero h1 {
    font-size: clamp(43px, 9.5vw, 66px);
    margin-bottom: 8px;
  }
  .hero .kicker {
    font-size: 0.62rem;
  }
  .ornament {
    margin-bottom: 12px;
    font-size: 0.8rem;
  }
  .hero-meta {
    font-size: 13px;
  }
  .hero-actions {
    margin-top: 17px;
    gap: 8px;
  }
  .hero-actions button {
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.85rem;
  }
  .land {
    background-image: linear-gradient(0deg, #103b32 0%, #103b32fa 30%, #103b3222 82%),
      url(../assets/alpine-landscape.svg);
    background-size:
      100% 100%,
      100% auto;
    background-position:
      center,
      center top;
  }
  .fan {
    width: 82px;
    right: 19%;
    top: 23%;
    transform: translateY(-50%);
  }
  .display-card b {
    font-size: 18px;
  }
  .display-heart strong {
    font-size: 32px;
  }
  .lesson-home {
    position: relative;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 15px;
    gap: 10px;
  }
  .booktile {
    height: 37px;
    width: 37px;
  }
  .lesson-copy {
    flex: 1;
  }
  .lesson-copy h2 {
    font-size: 21px;
  }
  .lesson-copy p {
    font-size: 0.85rem;
  }
  .lesson-actions {
    gap: 12px;
    flex-basis: 100%;
    padding-left: 47px;
  }
  .section-head {
    margin: 22px 0 10px;
  }
  .section-head .textbutton {
    font-size: 0.8rem;
  }
  .mode-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .modebox {
    min-height: 73px;
    padding: 9px 13px;
  }
  .modeart {
    height: 49px;
    width: 50px;
  }
  .tiny {
    height: 32px;
    width: 23px;
    top: 9px;
    left: 14px;
    padding-top: 10px;
  }
  .modewords strong {
    margin-bottom: 0;
  }
  .modewords small {
    font-size: 0.83rem;
  }
  footer {
    margin-top: 15px;
    padding: 8px 0;
  }
  .gamewrap {
    height: calc(100dvh - 59px);
    padding: 6px 3px 6px;
    gap: 5px;
  }
  .gamehead {
    padding: 0 7px;
  }
  .gamehead h1 {
    font-size: 24px;
  }
  .gamehead .kicker {
    font-size: 0.56rem;
    margin: 0;
  }
  .deal-actions {
    gap: 4px;
  }
  .deal-actions .tag {
    padding: 4px 6px;
    font-size: 0.64rem;
    gap: 4px;
  }
  .deal-actions .outline {
    min-height: 32px;
    padding: 0 8px;
    font-size: 0.8rem;
  }
  .boardlesson {
    gap: 6px;
    padding: 5px 8px;
    margin: 0 3px;
  }
  .boardlesson .lessonicon {
    display: none;
  }
  .boardlesson b {
    font-size: 0.58rem;
  }
  .boardlesson p {
    font-size: 0.77rem;
  }
  .lessonbtns {
    flex-direction: column;
    gap: 0;
    flex: none;
  }
  .lessonbtns button {
    font-size: 0.67rem;
    padding: 4px;
  }
  .lessonbtns .green {
    min-height: 23px;
    padding: 0 8px;
  }
  .felt {
    padding: 7px 3px 0;
    border-radius: 7px;
  }
  .table-top {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .foundcaption {
    grid-row: 1;
    display: block;
  }
  .foundgroup {
    grid-row: 2;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 3px;
  }
  .foundation {
    height: clamp(34px, 5.3vh, 48px);
    max-height: none;
    aspect-ratio: auto;
  }
  .foundgroup .index {
    font-size: 17px;
    left: 5px;
    top: 5px;
  }
  .foundgroup .royal,
  .foundgroup .pips {
    display: none;
  }
  .foundgroup .lower {
    font-size: 10px;
  }
  .stockcaption {
    display: none;
  }
  .stockgroup {
    grid-row: 3;
    grid-template-columns: repeat(2, minmax(44px, 13.4%));
    gap: 4px;
    margin-top: 3px;
  }
  .stockgroup .pile {
    height: clamp(40px, 6.5vh, 60px);
    max-height: none;
    aspect-ratio: auto;
  }
  .stockcount {
    font-size: 0.58rem;
    bottom: 2px;
    right: 1px;
  }
  .table-caption,
  .tableau-head {
    font-size: 0.56rem;
  }
  .tableau-head {
    margin: 3px 0 1px;
    gap: 7px;
  }
  .columns {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 2px 3px;
  }
  .colno {
    font-size: 8px;
    padding: 0 0 2px;
  }
  .tablefoot {
    padding: 4px 3px;
    margin-top: 3px;
    gap: 8px;
    font-size: 0.65rem;
  }
  .progress i {
    width: 26px;
  }
  .boardtools {
    gap: 5px;
  }
  .boardtools button {
    min-height: 43px;
    min-width: 82px;
    font-size: 0.85rem;
  }
  .index {
    font-size: clamp(13px, 3.8vw, 21px);
    gap: 1px;
  }
  .royal {
    font-size: 33px;
  }
  .pips i {
    font-size: 11px;
  }
  .column .face,
  .column .back,
  .column .emptyslot {
    max-height: 15vh;
  }
  .tablefoot .progress {
    gap: 4px;
  }
  .boardtools button,
  .deal-actions button {
    touch-action: manipulation;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}
.no-motion * {
  transition-duration: 0s !important;
  animation-duration: 0s !important;
}
