:root {
  --ink:#263b32;
  --green:#295746;
  --dark:#224b3e;
  --muted:#686e60;
  --line:#dcd9c9;
  --ivory:#fffdf6;
  --paper:#f7f5eb;
  --ochre:#c58b44;
  --title:Georgia,'Times New Roman',serif;
  --sans:'Segoe UI',Arial,sans-serif;
  --board-width:clamp(345px,46vh,435px);
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  color:var(--ink);
  font-family:var(--sans);
  font-size:15px;
  background:radial-gradient(#a09b7622 .75px,transparent .85px) 0 0/7px 7px,var(--paper);
  min-height:100vh;
}

button,select,input {
  font:inherit;
}

button {
  cursor:pointer;
  color:inherit;
}

button:disabled {
  cursor:default;
  opacity:.42;
}

button:focus-visible,input:focus-visible,summary:focus-visible {
  outline:3px solid #437ca4;
  outline-offset:3px;
}

button {
  touch-action:manipulation;
}

h1,h2,h3,p {
  margin:0;
}

.icon {
  width:20px;
  height:20px;
  display:inline-block;
  flex:none;
}

i[data-icon],span[data-icon] {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-style:normal;
}

.header {
  background:#fdfbf3;
  border-bottom:1px solid #d6d8c9;
}

.topbar,.wrap {
  max-width:1184px;
  margin:auto;
  padding:0 28px;
}

.topbar {
  min-height:70px;
  display:flex;
  align-items:center;
  gap:24px;
}

.brand,.navitem,.icon-btn,.plain,.guide-row,.hand-token {
  border:0;
  background:none;
}

.brand {
  padding:0;
  display:flex;
  align-items:center;
  gap:11px;
  font:bold 25px/1 var(--title);
  letter-spacing:-1.25px;
  color:#274a3a;
  white-space:nowrap;
}

.brand-mark {
  width:39px;
  height:39px;
  border-radius:11px 11px 13px 8px;
  background:#2b5142;
  color:#f5d399;
  transform:rotate(-3deg);
}

.brand-mark .icon {
  width:27px;
  height:27px;
  transform:rotate(-9deg);
}

nav {
  display:flex;
  gap:7px;
  align-items:center;
  margin-left:auto;
}

.navitem {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:9px;
  font-size:13px;
  line-height:20px;
  font-weight:600;
  color:#5c6355;
}

.navitem .icon {
  width:17px;
  height:17px;
}

.navitem.active,.navitem:hover {
  color:var(--green);
  background:#e8edde;
}

.tools {
  border-left:1px solid var(--line);
  padding-left:17px;
  display:flex;
  gap:7px;
}

.icon-btn {
  display:inline-grid;
  place-items:center;
  width:40px;
  height:40px;
  border:1px solid #d6d7c7;
  border-radius:50%;
  color:#4e6353;
  padding:0;
}

.icon-btn:hover,.plain:hover {
  background:#efefdf;
}

.wrap {
  padding-bottom:38px;
}

.banner {
  position:relative;
  overflow:hidden;
  isolation:isolate;
  margin:22px 0;
  min-height:143px;
  background:#f1ebd7;
  border:1px solid #d8d4bd;
  border-radius:17px;
  display:flex;
  align-items:center;
}

.banner:after {
  content:'';
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:-1;
  background:radial-gradient(#a99c6b25 .6px,transparent .9px) 0 0/4px 4px;
}

.landscape {
  position:absolute;
  z-index:-2;
  right:0;
  bottom:-1px;
  height:111%;
  width:66%;
  object-fit:cover;
  object-position:right bottom;
}

.banner-text {
  padding:23px 36px;
}

.title-line {
  display:flex;
  align-items:center;
  gap:13px;
}

.banner h1 {
  font:700 clamp(36px,4.35vw,63px)/1.08 var(--title);
  letter-spacing:-2.8px;
  color:#254638;
}

.banner p {
  font-size:15px;
  letter-spacing:.15px;
  margin-top:9px;
  color:#545f4e;
}

.seal {
  font-family:Georgia,serif;
  background:#b66d48;
  color:#fff1d1;
  font-size:13px;
  line-height:1.02;
  text-align:center;
  padding:4px 3px;
  border:2px solid #b66d48;
  box-shadow:inset 0 0 0 1px #e2af82;
  border-radius:3px;
  transform:rotate(6deg);
  margin-top:3px;
}

.layout {
  display:grid;
  grid-template-columns:minmax(0,1.64fr) minmax(318px,1fr);
  gap:22px;
  align-items:start;
}

.card {
  border:1px solid var(--line);
  background:var(--ivory);
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 2px 3px #49432707;
}

.board-heading,.guide-heading {
  display:flex;
  align-items:center;
  gap:11px;
}

.board-heading {
  min-height:59px;
  padding:12px 22px;
  border-bottom:1px solid var(--line);
  justify-content:space-between;
}

.board-heading h2,.guide h2 {
  font:700 22px/1.15 var(--title);
  letter-spacing:-.65px;
  display:flex;
  gap:10px;
  align-items:center;
}

.board-heading h2 .icon,.guide-heading .icon {
  color:var(--green);
  width:20px;
  height:20px;
}

.turn {
  border:1px solid #cbd9bc;
  background:#edf2e0;
  color:#3a6145;
  border-radius:20px;
  padding:5px 10px;
  display:flex;
  align-items:center;
  gap:7px;
  font-size:12px;
  font-weight:650;
  white-space:nowrap;
}

.turn:before {
  content:'';
  width:7px;
  height:7px;
  border-radius:50%;
  background:#68935c;
  box-shadow:0 0 0 2px #bed7b757;
}

.turn.check {
  background:#f9ded4;
  color:#953f32;
}

.turn.check:before {
  background:#af4135;
}

.board-area {
  padding:12px 22px 13px;
  background:radial-gradient(ellipse at center,#f2ebd7 0%,#faf8ee 74%);
}

.playmat {
  width:min(100%,var(--board-width));
  margin:auto;
}

.player-bar {
  display:flex;
  align-items:center;
  min-height:46px;
  justify-content:space-between;
  gap:8px;
}

.player-name,.stock {
  display:flex;
  align-items:center;
  gap:7px;
}

.player-name {
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}

.player-mark {
  width:12px;
  height:14px;
  background:#ae704a;
  clip-path:polygon(0 0,100% 0,100% 74%,50% 100%,0 74%);
  display:inline-block;
}

.player-mark.bottom {
  background:#498498;
  width:12px;
  height:12px;
  border-radius:3px;
  clip-path:none;
}

.stock {
  font-size:11px;
  color:#747668;
  gap:5px;
  position:relative;
}

.stock>.icon {
  width:14px;
  height:14px;
}

.hand-label {
  font-size:11px;
  margin-right:1px;
}

.hand-token {
  border:1px solid #d5c8a7;
  border-radius:6px;
  background:#fff7df;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:0 1px;
  width:40px;
  height:36px;
  position:relative;
}

.hand-token:before {
  content:'';
  position:absolute;
  inset:-5px -2px;
}

.hand-token:hover {
  border-color:#9c8c69;
}

.hand-token .animal {
  width:33px;
  height:32px;
}

.hand-token.selected {
  box-shadow:0 0 0 3px #b78b2f;
}

.hand-token small {
  position:absolute;
  bottom:1px;
  right:2px;
  font-weight:700;
  background:#fff1cd;
  border-radius:4px;
}

.stock.glow {
  outline:3px solid #d8a33b;
  outline-offset:3px;
  border-radius:4px;
}

.wood {
  position:relative;
  display:grid;
  grid-template-columns:22px 1fr;
  grid-template-rows:1fr 21px;
  padding:12px 13px 0 0;
  background:repeating-linear-gradient(1.5deg,transparent 0 6px,#aa77391a 6.4px,transparent 7.6px 12px),linear-gradient(92deg,#d9b981,#ebd1a1 53%,#ddbd8c);
  border:1.5px solid #ac8b57;
  border-radius:9px;
  box-shadow:0 4px 0 #af8c57,0 6px 6px #7e60381e;
  margin-bottom:4px;
}

.wood:after {
  content:'';
  position:absolute;
  inset:3px;
  border:1px solid #fbebc141;
  border-radius:6px;
  pointer-events:none;
}

.ranks,.files {
  font:600 11px/1 var(--sans);
  color:#685637;
  align-items:center;
  justify-items:center;
  display:grid;
}

.ranks {
  grid-template-rows:repeat(6,1fr);
}

.files {
  grid-column:2;
  grid-template-columns:repeat(5,1fr);
}

#board {
  display:grid;
  grid-template-columns:repeat(5,1fr);
  grid-template-rows:repeat(6,1fr);
  aspect-ratio:5/5.84;
  border:1.4px solid #957b51;
  isolation:isolate;
  background:#f1deb1;
}

.square {
  position:relative;
  padding:0;
  min-width:0;
  min-height:0;
  display:grid;
  place-items:center;
  border:0;
  border-right:1px solid #a88c60;
  border-bottom:1px solid #a88c60;
  background:radial-gradient(#ad8e5b29 .6px,transparent .9px) 2px 5px/9px 9px,#f3e1bd;
  touch-action:manipulation;
}

.square:nth-child(5n) {
  border-right:0;
}

.square:nth-last-child(-n+5) {
  border-bottom:0;
}

.square.zone {
  background:repeating-linear-gradient(132deg,#ab8b5020 0 .8px,transparent 1px 6px),#ecd4a6;
}

.square:hover {
  box-shadow:inset 0 0 0 2px #997c4788;
}

.square:focus-visible {
  z-index:3;
  outline-offset:-3px;
}

.square .token {
  position:relative;
  width:87%;
  height:89%;
  filter:drop-shadow(0 2px 1px #6a46232b);
  user-select:none;
  pointer-events:none;
}

.inverted {
  transform:rotate(180deg);
}

.square.highlight,.square.selected {
  background-color:#f6dc8c;
  box-shadow:inset 0 0 0 3px #c69732;
}

.square.highlight:after {
  content:'';
  position:absolute;
  inset:4px;
  border:1px solid #ffe9a1;
  pointer-events:none;
}

.square.legal:after {
  position:absolute;
  content:'';
  width:23%;
  aspect-ratio:1;
  border-radius:50%;
  background:#5c9264;
  box-shadow:0 0 0 3px #fff9dbb3;
  border:1px solid #46794e;
}

.square.capture.legal:after {
  width:79%;
  height:79%;
  border-radius:12px;
  background:transparent;
  border:3px dashed #4e8158;
  box-shadow:none;
}

.square.last {
  background-color:#f0d58e;
}

.square.danger {
  box-shadow:inset 0 0 0 4px #bc5943;
}

.square.moved .token {
  animation:place .19s ease-out;
}

.square.selected .token {
  filter:drop-shadow(0 3px 2px #61491e53);
}

.square .hint-arrow {
  position:absolute;
  color:#68521d;
  font-size:30px;
  z-index:2;
  right:2px;
  bottom:0;
}

.sidebar {
  display:grid;
  gap:17px;
}

.lesson-cap {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background:#2b5446;
  color:#fcf4df;
  padding:19px 22px 17px;
}

.lesson-cap:after {
  content:'';
  position:absolute;
  z-index:-1;
  opacity:.14;
  inset:0 0 0 46%;
  background:repeating-radial-gradient(ellipse at 100% 135%,transparent 0 8px,#dbd9ae 9px 10px,transparent 11px 16px);
  mask-image:linear-gradient(90deg,transparent,#000);
}

.cap-line,.guide-heading {
  display:flex;
  align-items:center;
}

.cap-line {
  justify-content:space-between;
  gap:8px;
}

.cap-line h2 {
  display:flex;
  align-items:center;
  gap:9px;
  font:700 24px/1.2 var(--title);
  letter-spacing:-.6px;
}

.cap-line h2 .icon {
  width:20px;
  height:20px;
  color:#e9d9af;
}

.step-count {
  font-size:11px;
  font-weight:600;
  background:#ffffff12;
  color:#f9efd4;
  padding:5px 9px;
  border:1px solid #fcf6da3b;
  border-radius:30px;
  white-space:nowrap;
}

.progress {
  display:flex;
  gap:5px;
  margin-top:15px;
}

.progress span {
  height:4px;
  flex:1;
  background:#ffffff32;
  border-radius:2px;
}

.progress span.on {
  background:#eac478;
}

.lesson-body {
  padding:21px 22px 13px;
}

.lesson-message {
  display:flex;
  align-items:center;
  gap:14px;
  min-height:67px;
}

.medallion {
  display:grid;
  place-items:center;
  width:61px;
  height:61px;
  flex:none;
  background:#f5ead0;
  border:1px solid #dcc89a;
  border-radius:16px;
  transform:rotate(-3deg);
}

.medallion .animal {
  width:51px;
  height:51px;
  transform:rotate(3deg);
}

.lesson-message h3 {
  font:700 22px/1.14 var(--title);
  letter-spacing:-.5px;
}

.lesson-message p {
  font-size:14px;
  line-height:1.5;
  color:#646b5d;
  margin-top:5px;
}

.action-line {
  display:flex;
  gap:9px;
  margin-top:16px;
}

.btn {
  border:1px solid #cfd2be;
  background:#fbfaf0;
  border-radius:8px;
  min-height:43px;
  padding:10px 15px;
  font-weight:650;
  font-size:14px;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:9px;
}

.btn .icon,.plain .icon {
  width:16px;
  height:16px;
}

.btn:not(:disabled):hover {
  background:#ecefdf;
}

.btn.primary {
  border-color:#2d5746;
  background:#2e5848;
  color:#fffdf1;
  box-shadow:0 2px 0 #18392d;
}

.btn.primary:not(:disabled):hover {
  background:#376a54;
}

.btn.primary:active {
  transform:translateY(1px);
}

.action-line .primary {
  flex:1;
}

.plain {
  min-height:37px;
  padding:5px 8px;
  font-size:12px;
  font-weight:600;
  color:#687061;
  border-radius:5px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
}

.skip {
  margin:8px auto 0;
}

.guide {
  padding:0 21px;
}

.guide-heading {
  gap:9px;
  padding:17px 0 15px;
  border-bottom:1px solid var(--line);
}

.guide-heading h2 {
  font-size:22px;
}

.guide-row {
  display:flex;
  align-items:center;
  width:100%;
  text-align:left;
  gap:12px;
  padding:9px 1px;
}

.guide-item+.guide-item {
  border-top:1px solid #e8e5d8;
}

.guide-face {
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid #ddd2b3;
  background:#f5edd8;
  border-radius:10px;
}

.guide-face .animal {
  width:35px;
  height:35px;
}

.guide-row:hover .guide-face {
  background:#efe2ba;
}

.guide-label {
  display:grid;
  gap:1px;
}

.guide-label strong {
  font-size:14px;
  font-weight:700;
}

.guide-label small {
  font-size:12px;
  color:#707365;
}

.diagram {
  width:30px;
  height:30px;
  margin-left:auto;
}

.guide-detail {
  padding:0 10px 13px 56px;
  line-height:1.5;
  font-size:13px;
  color:#656b60;
}

.menu-options,.setup-content,.game-controls,.online-content {
  padding:17px 21px 20px;
}

.menu-options {
  display:grid;
  gap:9px;
}

.menu-options .btn {
  justify-content:flex-start;
}

.menu-options .btn .icon:last-child {
  margin-left:auto;
}

.menu-options .btn .icon:first-child {
  margin-left:0;
}

.field {
  border:0;
  margin:0 0 17px;
  padding:0;
}

.field legend,.control-label {
  font-size:13px;
  font-weight:700;
  margin:0 0 8px;
}

.choices {
  display:flex;
  gap:3px;
  background:#efeee1;
  padding:3px;
  border-radius:9px;
}

.choices button {
  border:0;
  background:transparent;
  min-height:37px;
  border-radius:7px;
  flex:1;
  font-size:13px;
  font-weight:600;
}

.choices button[aria-pressed=true] {
  background:#fffdf4;
  box-shadow:0 1px 4px #383a2529;
  color:#25543c;
}

.hint,.online-content p {
  font-size:13px;
  line-height:1.45;
  color:var(--muted);
  margin:8px 0 0;
}

.game-meta {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:9px;
}

.mode-tag {
  font-weight:700;
  font-size:13px;
}

.game-meta small {
  color:var(--muted);
}

.game-controls .action-line {
  margin-top:10px;
}

.game-controls .btn {
  flex:1;
}

.game-controls .plain {
  margin:8px auto 0;
}

.online-content input {
  border:1px solid var(--line);
  border-radius:6px;
  width:100%;
  padding:10px;
  background:var(--paper);
  color:var(--ink);
  margin:8px 0;
}

.wide {
  width:100%;
}

dialog {
  position:fixed;
  border:1px solid #b7bda7;
  border-radius:16px;
  background:var(--ivory);
  width:min(430px,calc(100% - 28px));
  padding:27px;
  color:var(--ink);
  box-shadow:0 20px 80px #26392e44;
}

dialog::backdrop {
  background:#22362870;
  backdrop-filter:blur(3px);
}

.dialog-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:18px;
}

.dialog-heading h2 {
  font:700 29px/1.15 var(--title);
  letter-spacing:-.8px;
}

.dialog-heading .icon-btn {
  width:34px;
  height:34px;
}

.dialog-copy {
  line-height:1.6;
  font-size:14px;
  color:#535f51;
}

.dialog-copy p+p {
  margin-top:11px;
}

.setting {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  border-bottom:1px solid var(--line);
  min-height:55px;
  font-size:14px;
}

.switch {
  width:41px;
  height:24px;
  border-radius:24px;
  border:0;
  position:relative;
  background:#bdbfae;
}

.switch:after {
  content:'';
  position:absolute;
  top:3px;
  left:3px;
  width:18px;
  height:18px;
  background:#fffdf4;
  border-radius:50%;
}

.switch[aria-checked=true] {
  background:#48765b;
}

.switch[aria-checked=true]:after {
  left:20px;
}

.setting-reset {
  margin:18px 0 0;
}

.dialog-art {
  margin:0 auto 15px;
}

.result-body {
  text-align:center;
  padding:7px 0;
}

.result-body h2 {
  font:700 32px var(--title);
  margin:4px 0 10px;
}

.result-body p {
  color:var(--muted);
  font-size:14px;
}

.result-body .animal {
  width:85px;
  height:85px;
}

#notice {
  pointer-events:none;
  position:fixed;
  z-index:8;
  left:50%;
  bottom:22px;
  transform:translate(-50%,12px);
  opacity:0;
  transition:.16s ease;
  width:max-content;
  max-width:calc(100% - 30px);
  background:#273e32;
  color:white;
  border-radius:10px;
  padding:11px 17px;
  font-size:14px;
  box-shadow:0 4px 20px #0002;
}

#notice.visible {
  opacity:1;
  transform:translate(-50%,0);
}

.fail-help {
  font-size:13px;
  color:#805129;
  margin-top:9px;
}

.flying {
  position:fixed;
  z-index:10;
  pointer-events:none;
  width:48px;
  height:48px;
}

.dragging {
  cursor:grabbing;
}

.sr {
  position:absolute;
  clip-path:inset(50%);
  width:1px;
  height:1px;
  overflow:hidden;
}

.invalid {
  animation:shake .16s linear;
}

@keyframes place {
  from {
    opacity:.75;
    scale:.88;
  }
  to {
    opacity:1;
    scale:1;
  }
}

@keyframes shake {
  25% {
    translate:-3px;
  }
  75% {
    translate:3px;
  }
}

@media(min-width:1400px) {
  .topbar,.wrap {
    max-width:1230px;
  }
  .banner {
    min-height:153px;
  }
  .layout {
    grid-template-columns:minmax(0,1.65fr) minmax(350px,1fr);
  }
}

@media(max-width:940px) {
  .topbar,.wrap {
    padding-left:18px;
    padding-right:18px;
  }
  .layout {
    grid-template-columns:minmax(0,1.35fr) minmax(292px,1fr);
    gap:15px;
  }
  .banner {
    margin:16px 0;
  }
  .board-area {
    padding:8px 14px;
  }
  .board-heading {
    padding:12px 15px;
  }
  .navitem {
    padding:9px 11px;
  }
  .topbar {
    gap:12px;
  }
  .guide {
    padding:0 16px;
  }
  .lesson-cap,.lesson-body {
    padding-left:17px;
    padding-right:17px;
  }
  .banner-text {
    padding-left:25px;
  }
  .guide-row {
    gap:9px;
  }
}

@media(max-width:700px) {
  .topbar {
    min-height:58px;
    gap:5px;
  }
  .brand {
    font-size:22px;
    gap:7px;
  }
  .brand-mark {
    width:33px;
    height:33px;
  }
  .brand-mark .icon {
    width:23px;
    height:23px;
  }
  nav {
    gap:2px;
  }
  .navitem {
    width:41px;
    height:44px;
    padding:0;
    justify-content:center;
  }
  .navitem span {
    display:none;
  }
  .tools {
    padding-left:5px;
    gap:1px;
  }
  .icon-btn {
    border:0;
    width:39px;
    height:44px;
  }
  .topbar,.wrap {
    padding-left:12px;
    padding-right:12px;
  }
  .banner {
    min-height:103px;
    margin:12px 0;
    border-radius:12px;
  }
  .banner-text {
    padding:15px;
  }
  .banner h1 {
    font-size:36px;
    letter-spacing:-1.6px;
  }
  .banner p {
    font-size:12px;
    margin-top:6px;
  }
  .seal {
    font-size:9px;
  }
  .title-line {
    gap:8px;
  }
  .landscape {
    width:57%;
    height:88%;
    object-position:65% bottom;
    opacity:.74;
    mask-image:linear-gradient(90deg,transparent,#000 35%);
  }
  .layout {
    display:flex;
    flex-direction:column;
    gap:12px;
  }
  .sidebar {
    display:contents;
  }
  .lesson-card {
    order:0;
    width:100%;
  }
  .board-card {
    order:1;
    width:100%;
  }
  .guide {
    order:2;
    width:100%;
  }
  .card {
    border-radius:12px;
  }
  .lesson-cap {
    padding:10px 14px;
  }
  .cap-line h2 {
    font-size:19px;
  }
  .cap-line h2 .icon {
    width:17px;
    height:17px;
  }
  .progress {
    margin-top:8px;
  }
  .progress span {
    height:3px;
  }
  .lesson-body {
    padding:10px 12px;
    display:grid;
    grid-template-columns:1fr auto;
    gap:4px 8px;
    align-items:center;
  }
  .lesson-message {
    min-height:43px;
    gap:8px;
  }
  .medallion {
    width:38px;
    height:38px;
    border-radius:10px;
  }
  .medallion .animal {
    width:34px;
    height:34px;
  }
  .lesson-message h3 {
    font-size:17px;
  }
  .lesson-message p {
    font-size:12px;
    margin-top:3px;
  }
  .lesson-body .action-line {
    margin:0;
    gap:3px;
  }
  .lesson-body .back-btn {
    font-size:0;
    padding:7px;
    gap:0;
  }
  .lesson-body .back-btn:disabled {
    display:none;
  }
  .lesson-body .btn {
    min-height:42px;
    padding:8px 10px;
  }
  .lesson-body .skip {
    grid-column:1/-1;
    justify-self:end;
    margin:0;
    padding:0 6px;
    min-height:30px;
    font-size:11px;
  }
  .lesson-body .fail-help {
    grid-column:1/-1;
  }
  .board-heading {
    min-height:43px;
    padding:7px 12px;
  }
  .board-heading h2,.guide-heading h2 {
    font-size:19px;
  }
  .board-area {
    padding:3px 5px 4px;
  }
  .playmat {
    width:min(100%,430px);
  }
  .player-bar {
    min-height:44px;
    padding:0 6px;
  }
  .wood {
    grid-template-columns:17px 1fr;
    grid-template-rows:1fr 17px;
    padding:8px 8px 0 0;
  }
  .board-heading h2 .icon {
    width:17px;
    height:17px;
  }
  .guide-heading {
    padding:11px 0;
  }
  .guide-row {
    min-height:50px;
  }
  .guide-face {
    width:36px;
    height:36px;
  }
  .guide-face .animal {
    width:31px;
    height:31px;
  }
  .step-count {
    font-size:10px;
  }
  .game-controls,.setup-content,.menu-options,.online-content {
    padding:12px;
  }
  .game-controls .plain {
    margin:4px auto 0;
  }
  .btn {
    min-height:44px;
  }
  .guide-label small {
    font-size:11px;
  }
  .stock {
    font-size:10px;
  }
  .hand-token {
    height:39px;
    width:44px;
  }
}

@media(max-width:350px) {
  .topbar,.wrap {
    padding-left:7px;
    padding-right:7px;
  }
  .brand {
    font-size:18px;
  }
  .navitem {
    width:33px;
  }
  .tools .icon-btn {
    width:33px;
  }
  .medallion {
    display:none;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation-duration:0s!important;
    transition-duration:0s!important;
  }
}

.landscape {
  height:100%;
  object-fit:fill;
}

@media(min-width:1000px) {
  .board-area {
    padding:22px 15px 24px;
  }
  .playmat {
    width:100%;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,min(49vh,63%)) minmax(0,1fr);
    gap:11px;
    align-items:start;
  }
  .wood {
    grid-column:2;
    grid-row:1;
  }
  .player-bar {
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    min-height:0;
    padding-top:3px;
  }
  #upper {
    grid-column:1;
    grid-row:1;
  }
  #lower {
    grid-column:3;
    grid-row:1;
    align-self:end;
    padding-bottom:5px;
  }
  .player-name {
    justify-content:center;
    font-size:12px;
    gap:5px;
  }
  .player-mark {
    width:10px;
    height:12px;
  }
  .player-mark.bottom {
    width:10px;
    height:10px;
  }
  .stock {
    flex-wrap:wrap;
    justify-content:center;
    align-content:center;
    padding:9px 4px;
    gap:3px;
    border:1px dashed #ccc6ac;
    border-radius:9px;
    background:#f7f4e7;
    min-height:62px;
    text-align:center;
    line-height:1.4;
  }
  .stock>.icon {
    height:17px;
    width:100%;
  }
  .stock>span {
    width:100%;
    font-size:10px;
  }
  .stock .hand-token {
    width:37px;
    height:36px;
  }
  .stock.glow {
    outline-offset:1px;
  }
}

@media(min-width:701px) and (max-height:800px) {
  .topbar {
    min-height:55px;
  }
  .banner {
    min-height:103px;
    margin:13px 0;
  }
  .banner-text {
    padding:12px 27px;
  }
  .banner h1 {
    font-size:43px;
  }
  .banner p {
    font-size:13px;
    margin-top:5px;
  }
  .board-heading {
    min-height:48px;
  }
  .board-area {
    padding-top:16px;
    padding-bottom:17px;
  }
  .lesson-cap {
    padding-top:13px;
    padding-bottom:13px;
  }
  .lesson-body {
    padding-top:13px;
    padding-bottom:6px;
  }
  .lesson-body .action-line {
    margin-top:10px;
  }
  .guide-heading {
    padding-top:12px;
    padding-bottom:11px;
  }
  .guide-row {
    padding-top:6px;
    padding-bottom:6px;
  }
  .guide-face {
    width:36px;
    height:36px;
  }
  .guide-face .animal {
    width:31px;
    height:31px;
  }
  .sidebar {
    gap:13px;
  }
}

@media(pointer:coarse) {
  .hand-token,.square:has(.token) {
    touch-action:none;
  }
}

.board-area {
  position:relative;
}

.teaching-arrow {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:4;
  overflow:visible;
}

@media(max-width:700px) {
  .topbar,.wrap {
    padding-left:7px;
    padding-right:7px;
  }
  #navplay {
    display:none;
  }
  .navitem,.tools .icon-btn {
    width:44px;
    height:44px;
  }
  .brand {
    font-size:21px;
  }
  .tools {
    gap:0;
  }
  .board-area {
    padding-left:4px;
    padding-right:4px;
  }
  .landscape {
    height:100%;
    width:54%;
    opacity:.55;
    mask-image:linear-gradient(90deg,transparent,#000 65%);
  }
  #lower .hand-token,#upper .hand-token {
    width:48px;
    height:44px;
  }
  .lesson-body .skip {
    min-height:36px;
  }
}

@media(max-width:350px) {
  .brand {
    font-size:17px;
  }
  .brand-mark {
    width:28px;
    height:28px;
  }
  .topbar {
    gap:2px;
  }
  .navitem,.tools .icon-btn {
    width:41px;
  }
}

