@font-face {
  font-family:"DM Sans";
  src:url(../fonts/dm-sans.ttf) format("truetype");
  font-weight:400;
  font-display:swap;
}

@font-face {
  font-family:"DM Sans";
  src:url(../fonts/dm-sans-semibold.ttf) format("truetype");
  font-weight:550 900;
  font-display:swap;
}

@font-face {
  font-family:"DM Serif Text";
  src:url(../fonts/dm-serif.ttf) format("truetype");
  font-weight:400;
  font-display:swap;
}

:root {
  --paper:#f8f5ec;
  --ink:#392f24;
  --muted:#71685b;
  --teal:#22655a;
  --teal-dark:#174a43;
  --line:#dcd4c4;
  --rust:#a45335;
  --serif:"DM Serif Text",Georgia,serif;
  --sans:"DM Sans",Arial,sans-serif;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  color:var(--ink);
  font:16px/1.5 var(--sans);
  background:var(--paper);
}

body:before {
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:url(../art/grain.svg);
  opacity:.15;
}

button,input {
  font:inherit;
}

button {
  color:inherit;
  cursor:pointer;
  border:0;
  background:transparent;
}

button:disabled {
  cursor:default;
}

button:focus-visible,a:focus-visible,input:focus-visible {
  outline:3px solid #1e7a8c;
  outline-offset:3px;
}

button:active:not(:disabled) {
  filter:brightness(.96);
}

.icon {
  width:20px;
  height:20px;
  display:inline-block;
  flex:none;
}

h1,h2,h3,p {
  margin:0;
}

h1,h2,h3 {
  font-family:var(--serif);
  font-weight:400;
}

.sr {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}

.topbar {
  border-bottom:1px solid var(--line);
  background:#fcfaf3;
}

.topbar-inner,.page {
  width:min(1184px,calc(100% - 80px));
  margin:auto;
}

.topbar-inner {
  height:69px;
  display:flex;
  align-items:center;
}

.brand {
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 2px 0 0;
}

.brand img {
  width:33px;
  height:33px;
}

.brand span {
  font:33px/.95 var(--serif);
  letter-spacing:-1.5px;
}

.topbar nav {
  display:flex;
  gap:5px;
  align-items:center;
  margin-left:auto;
}

.nav-item {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:0 16px;
  border-radius:7px;
  font-size:14px;
  font-weight:600;
  color:#635d50;
  white-space:nowrap;
}

.nav-item .icon {
  width:17px;
  height:17px;
}

.nav-item[aria-current="page"] {
  background:#e5ede3;
  color:var(--teal-dark);
}

.nav-item:hover,.icon-btn:hover,.coordinate-control:hover {
  background:#ece9dc;
}

.tools {
  display:flex;
  gap:7px;
  padding-left:20px;
  margin-left:16px;
  border-left:1px solid var(--line);
}

.icon-btn {
  width:42px;
  height:42px;
  display:inline-grid;
  place-items:center;
  border-radius:50%;
}

.icon-btn .icon {
  width:19px;
  height:19px;
}

.page {
  padding-top:25px;
}

.banner {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  border-radius:13px;
  min-height:171px;
  background:#9e5036;
  color:#fff5dc;
  box-shadow:0 1px 1px #573d2118;
}

.banner-art {
  position:absolute;
  inset:0;
  z-index:-1;
  background:url(../art/savanna.svg) center 54%/cover no-repeat;
}

.banner-title {
  padding:19px 42px 25px;
}

.banner-ornament {
  display:flex;
  align-items:center;
  gap:7px;
  height:12px;
  font-size:15px;
  line-height:1;
  color:#efd09a;
}

.banner-ornament i {
  height:1px;
  width:24px;
  background:currentColor;
  opacity:.8;
}

.banner h1 {
  font-size:clamp(66px,6.3vw,85px);
  line-height:1.02;
  letter-spacing:-3.5px;
}

.banner p {
  font-size:17px;
  letter-spacing:.12px;
  color:#fff2d8;
  margin:3px 0 0;
}

.banner-hem {
  position:absolute;
  height:9px;
  bottom:0;
  left:0;
  right:0;
  background:#643c2a url(../art/weave.svg) center/64px 9px;
  opacity:.8;
}

.table {
  display:grid;
  grid-template-columns:minmax(0,1.62fr) minmax(306px,1fr);
  gap:32px;
  align-items:start;
  margin:30px auto 0;
}

.board-section {
  min-width:0;
}

.board-shell {
  position:relative;
  padding:18px 14px 19px;
  border:1px solid #593b2c;
  border-radius:17px;
  background:linear-gradient(100deg,#805538,#966b48 28%,#8c6141 69%,#795135);
  box-shadow:0 5px 0 -1px #63452f,0 10px 16px -8px #46351d77,inset 0 0 0 2px #b18a61,inset 0 0 0 4px #805739;
}

.board-shell:before {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-radius:inherit;
  background:url(../art/grain.svg);
  opacity:.72;
}

.board-trim {
  position:absolute;
  height:10px;
  left:30px;
  right:30px;
  background:url(../art/weave.svg) center center/72px 10px repeat-x;
  opacity:.72;
}

.trim-top {
  top:4px;
}

.trim-bottom {
  bottom:4px;
}

.board-sand {
  position:relative;
  padding:2.6% 3.5% 4.3% 4.8%;
  border:1px solid #805731;
  border-radius:6px;
  background-image:url(../art/grain.svg),radial-gradient(ellipse at 25% 0%,#ebc991 0,#dfbb81 58%,#d6b279);
  box-shadow:inset 0 1px 4px #93693d8c,inset 0 0 0 2px #eacc9a;
}

.board {
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  grid-template-rows:repeat(5,1fr);
  aspect-ratio:6/5;
  isolation:isolate;
}

.cell {
  position:relative;
  aspect-ratio:1;
  min-width:0;
  border:0;
  background:transparent;
  padding:0;
  border-radius:13%;
  touch-action:manipulation;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}

.cell:focus-visible {
  outline-offset:-3px;
  z-index:2;
}

.cell:active:not(:disabled) {
  filter:none;
}

.pit {
  position:absolute;
  inset:12%;
  border-radius:50%;
  background:radial-gradient(ellipse at 46% 73%,#caa46c 0%,#c69d62 50%,#b48b53 77%,#a17a48 99%);
  border:1px solid #ac864f;
  box-shadow:inset 1px 3px 4px #74562d35,0 1.6px 1px #f1d6a3,0 -.6px .5px #ae8856;
}

.pit:after {
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:url(../art/grain.svg);
  opacity:.76;
}

.cell.interactive:hover .pit {
  box-shadow:inset 0 1px 4px #74562d44,0 0 0 2px #8d704f88;
}

.piece {
  position:absolute;
  inset:13%;
  height:74%;
  width:74%;
  object-fit:contain;
  pointer-events:none;
  z-index:1;
  filter:drop-shadow(1px 2.7px 1.3px #4e341e66);
}

.piece.stick {
  inset:8%;
  height:84%;
  width:84%;
  filter:drop-shadow(1px 3px 1.1px #4e341e88);
}

.ring {
  position:absolute;
  inset:6%;
  border-radius:50%;
  pointer-events:none;
}

.cell.lit .ring {
  border:2px dashed #8d542b;
  opacity:.88;
}

.cell.selected .ring {
  border:3px solid var(--teal);
}

.cell.capture .ring {
  border:3px dashed #a53728;
  background:#b9512d13;
}

.cell.winning .ring {
  border:3px solid #c88819;
  background:#ffd74c25;
}

.cell.last .pit {
  outline:2px solid #766e47;
  outline-offset:2px;
}

.cell.target:after,.cell.hint:after {
  content:"";
  position:absolute;
  inset:39%;
  border-radius:50%;
  background:#376e5d;
  border:1px solid #31624f99;
}

.cell.hint:after {
  inset:46%;
  background:#4e776185;
}

.cell.forbidden .pit {
  background:repeating-linear-gradient(45deg,#ada58e 0 3px,#c3af8c 3px 7px);
}

.cell.forbidden:after,.cell.removed:after {
  content:"×";
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-size:24px;
  color:#60574b;
}

.cell.arrow:before {
  content:"↓";
  position:absolute;
  right:1%;
  top:-10%;
  font:bold 30px var(--sans);
  color:var(--teal-dark);
  z-index:3;
}

.piece.drop {
  animation:drop .15s ease-out;
}

.piece.slide {
  animation:slide .18s ease-out;
}

.piece.fade {
  animation:fade .25s ease-in forwards;
}

.piece.dragging {
  z-index:7;
  filter:drop-shadow(2px 5px 3px #4e341e77);
}

.cell.drag-cell {
  z-index:4;
}

.cell.draggable {
  touch-action:none;
}

.cell.shake {
  animation:shake .12s linear;
}

.cell.flash .ring {
  animation:glow .3s ease-out;
}

@keyframes drop {
  from {
    transform:scale(.8);
    opacity:.5;
  }
}

@keyframes slide {
  from {
    transform:translate(var(--mx),var(--my));
  }
}

@keyframes fade {
  to {
    transform:scale(.6);
    opacity:0;
  }
}

@keyframes shake {
  25% {
    transform:translateX(-4px);
  }
  75% {
    transform:translateX(4px);
  }
}

@keyframes glow {
  50% {
    box-shadow:0 0 0 4px #f1c143;
  }
}

.ranks,.files {
  position:absolute;
  display:grid;
  pointer-events:none;
  font-weight:600;
  font-size:12px;
  color:#765c38;
}

.ranks {
  left:0;
  top:2.9%;
  bottom:4.9%;
  width:4.6%;
  grid-template-rows:repeat(5,1fr);
}

.files {
  bottom:0;
  left:4.8%;
  right:3.5%;
  height:4.5%;
  grid-template-columns:repeat(6,1fr);
}

.ranks span,.files span {
  display:grid;
  place-items:center;
}

.no-coords .ranks,.no-coords .files {
  visibility:hidden;
}

.corner {
  position:absolute;
  width:5px;
  height:5px;
  background:#edce91;
  transform:rotate(45deg);
  box-shadow:0 1px 1px #563b29;
}

.tl {
  top:7px;
  left:9px;
}

.tr {
  top:7px;
  right:9px;
}

.bl {
  bottom:7px;
  left:9px;
}

.br {
  bottom:7px;
  right:9px;
}

.board-caption {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-top:13px;
}

.coordinate-control {
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  color:var(--muted);
  border-radius:6px;
  min-height:38px;
  font-size:13px;
}

.coordinate-control .icon {
  width:16px;
  height:16px;
}

.coordinate-control[aria-pressed="true"] .icon {
  color:var(--teal);
}

.caption-rule {
  height:1px;
  width:36px;
  background:#c5b99f;
  position:relative;
}

.caption-rule i {
  position:absolute;
  left:0;
  top:-1.5px;
  width:4px;
  height:4px;
  background:#c5b99f;
  transform:rotate(45deg);
}

.caption-rule:last-child i {
  right:0;
  left:auto;
}

.panel {
  background:#fffdf5;
  border:1px solid #d7cfbe;
  box-shadow:0 4px 14px #58462c0b;
  border-radius:13px;
  overflow:hidden;
  min-width:0;
}

.panel-head {
  display:flex;
  gap:13px;
  align-items:center;
  border-bottom:1px solid #dfd7c7;
  padding:19px 24px 18px;
  background:#f6f3e8;
}

.panel-head h2 {
  font-size:27px;
  line-height:1.2;
  letter-spacing:-.8px;
}

.head-icon {
  display:grid;
  place-items:center;
  background:#e2ebe1;
  color:#2c6658;
  width:40px;
  height:40px;
  flex:none;
  border-radius:11px;
  border:1px solid #cbdccc;
}

.head-icon .icon {
  width:22px;
  height:22px;
}

.panel-main {
  padding:24px;
}

.step-line {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.step-count {
  font-size:12px;
  font-weight:700;
  color:#8b5237;
  letter-spacing:1.2px;
  text-transform:uppercase;
}

.progress {
  display:flex;
  gap:4px;
}

.progress i {
  width:18px;
  height:5px;
  background:#e2dccc;
  border-radius:4px;
}

.progress i.done {
  background:var(--teal);
}

.lesson-copy {
  margin:20px 0 21px;
}

.lesson-copy h3 {
  font-size:clamp(27px,2.7vw,39px);
  line-height:1.17;
  letter-spacing:-1.2px;
  margin:0 0 8px;
}

.lesson-copy p,.body-copy {
  font-size:16px;
  line-height:1.55;
  color:#615747;
}

.specimens {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.specimen {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:13px 8px 12px;
  border-radius:9px;
  background:#f5edde;
  border:1px solid #e4d7be;
  font-size:15px;
  font-weight:600;
  gap:3px;
}

.specimen:nth-child(2) {
  background:#ecece2;
  border-color:#d9dbcb;
}

.specimen img {
  height:49px;
  width:55px;
  object-fit:contain;
  filter:drop-shadow(1px 2px 1px #513a2035);
}

.specimen:nth-child(2) img {
  width:63px;
}

.specimen.active {
  outline:2px solid #397561;
  outline-offset:-2px;
}

.specimen small {
  font-size:12px;
  color:#665c4d;
  font-weight:400;
  text-align:center;
}

.panel-actions {
  display:flex;
  gap:10px;
  margin-top:24px;
}

.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-height:45px;
  font-size:15px;
  border-radius:8px;
  border:1px solid #d5cdbb;
  padding:9px 18px;
  font-weight:600;
  background:#fffcf3;
  line-height:1.3;
}

.btn:hover:not(:disabled) {
  background:#f0ecdf;
  border-color:#b4ad9d;
}

.btn.primary {
  background:var(--teal);
  color:#fff9e9;
  border-color:var(--teal);
}

.btn.primary:hover:not(:disabled) {
  background:var(--teal-dark);
}

.btn:disabled {
  opacity:.48;
  background:#f4f1e8;
}

.btn .icon {
  width:18px;
  height:18px;
}

.panel-actions>.btn {
  flex:1;
}

.panel-actions>.primary {
  flex:1.55;
}

.panel-foot {
  display:flex;
  align-items:center;
  justify-content:center;
  padding:7px 16px;
  background:#f9f6ec;
  border-top:1px solid #e5decd;
}

.text-btn {
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:5px 12px;
  font-size:14px;
  color:#716756;
  border-radius:6px;
}

.text-btn:hover {
  background:#eae6d8;
  color:#3f4738;
}

.text-btn .icon {
  width:16px;
  height:16px;
}

.stack {
  display:grid;
  gap:10px;
}

.stack .btn {
  justify-content:flex-start;
}

.stack .btn.primary {
  justify-content:center;
}

.spacer-top {
  margin-top:18px;
}

.hint-line {
  font-size:14px;
  color:#72644e;
  margin-top:12px;
}

.hud-title {
  font-size:34px;
  letter-spacing:-.8px;
  line-height:1.18;
  margin:12px 0 18px;
}

.field {
  border:0;
  padding:0;
  margin:0 0 17px;
}

.field legend {
  font-size:14px;
  font-weight:600;
  margin-bottom:7px;
}

.options {
  display:flex;
  background:#f0ebdf;
  padding:3px;
  gap:3px;
  border-radius:9px;
  border:1px solid #e1d9c7;
}

.option {
  min-height:38px;
  flex:1;
  border-radius:6px;
  font-size:14px;
}

.option[aria-pressed="true"] {
  background:#fffdf5;
  box-shadow:0 1px 4px #503f1f29;
  color:var(--teal);
  font-weight:600;
}

.full {
  width:100%;
}

.scene-note {
  font-size:15px;
  color:#685b48;
  margin-bottom:18px;
}

.finish h3 {
  font-size:35px;
  line-height:1.15;
  margin-bottom:10px;
}

.finish p {
  margin-bottom:20px;
}

.link-input {
  width:100%;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  color:var(--ink);
  background:#faf7ee;
}

.radio-mark {
  border-radius:99px;
  height:8px;
  width:8px;
  background:var(--teal);
  display:inline-block;
  margin-right:7px;
}

footer {
  display:flex;
  align-items:center;
  gap:6px;
  color:#af8d61;
  margin:24px 0 20px;
  opacity:.65;
}

footer span {
  height:1px;
  flex:1;
  background:#cfc1a6;
}

footer b {
  font:18px Georgia;
}

footer i {
  width:4px;
  height:4px;
  transform:rotate(45deg);
  background:currentColor;
}

dialog {
  width:min(490px,calc(100% - 32px));
  max-height:84dvh;
  padding:0;
  border:1px solid #c4baa4;
  border-radius:15px;
  color:var(--ink);
  background:#fffcf2;
  box-shadow:0 20px 80px #25201545;
}

dialog::backdrop {
  background:#312c2170;
  backdrop-filter:blur(3px);
}

.dialog-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0;
  padding:16px 21px;
  border-bottom:1px solid var(--line);
  background:#f6f2e7;
}

.dialog-head h2 {
  font-size:28px;
}

.dialog-body {
  padding:21px 24px;
}

.dialog-body>p+p {
  margin-top:12px;
}

.dialog-body h3 {
  font-size:24px;
  margin-top:22px;
}

.dialog-body ol {
  padding-left:20px;
}

.dialog-body li {
  padding-left:3px;
  margin-bottom:8px;
}

.setting-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  min-height:53px;
  border-bottom:1px solid #e6decd;
  padding:5px 0;
  font-size:16px;
}

.toggle {
  position:relative;
  width:39px;
  height:23px;
  border-radius:20px;
  background:#b7ad9b;
}

.toggle:after {
  content:"";
  width:17px;
  height:17px;
  position:absolute;
  top:3px;
  left:3px;
  background:#fffdf4;
  border-radius:50%;
  box-shadow:0 1px 3px #0002;
}

.setting-row[aria-checked="true"] .toggle {
  background:var(--teal);
}

.setting-row[aria-checked="true"] .toggle:after {
  left:19px;
}

.dialog-body .full {
  margin-top:18px;
}

#toast {
  position:fixed;
  bottom:24px;
  left:50%;
  transform:translate(-50%,12px);
  background:#353b31;
  color:#fffdf0;
  box-shadow:0 4px 16px #302a2524;
  border-radius:9px;
  max-width:calc(100% - 30px);
  width:max-content;
  padding:10px 18px;
  font-size:15px;
  pointer-events:none;
  opacity:0;
  z-index:10;
  transition:opacity .15s,transform .15s;
}

#toast.show {
  transform:translate(-50%,0);
  opacity:1;
}

@media(min-width:1000px) {
  .table {
    grid-template-columns:minmax(0,1.65fr) minmax(340px,1fr);
  }
  .board-sand {
    padding-top:1.7%;
    padding-bottom:3.8%;
  }
  .board {
    aspect-ratio:1.34;
  }
  .cell {
    aspect-ratio:auto;
  }
  .pit {
    inset:9% auto;
    left:50%;
    height:82%;
    aspect-ratio:1;
    transform:translateX(-50%);
  }
  .ranks {
    top:1.9%;
    bottom:4.6%;
  }
  .piece {
    inset:11% 9%;
    width:82%;
    height:78%;
  }
  .piece.stick {
    inset:6%;
    width:88%;
    height:88%;
  }
  .ring {
    inset:3% auto;
    left:50%;
    height:94%;
    aspect-ratio:1;
    transform:translateX(-50%);
  }
  .panel-main {
    padding:26px 28px;
  }
  .panel-head {
    padding-left:27px;
  }
  .specimen {
    padding:14px 8px;
  }
  .specimen img {
    height:55px;
  }
  .lesson-copy {
    margin-top:23px;
    margin-bottom:24px;
  }
  .panel-actions {
    margin-top:26px;
  }
}

@media(min-width:1000px) and (max-height:820px) {
  .topbar-inner {
    height:57px;
  }
  .page {
    padding-top:16px;
  }
  .banner {
    min-height:123px;
  }
  .banner-title {
    padding:12px 32px 17px;
  }
  .banner h1 {
    font-size:61px;
  }
  .banner p {
    font-size:15px;
  }
  .table {
    margin-top:20px;
    gap:26px;
  }
  .board-section {
    width:min(100%,calc((100dvh - 260px)*1.47));
    justify-self:center;
  }
  .panel-main {
    padding:18px 23px;
  }
  .panel-head {
    padding:13px 22px;
  }
  .lesson-copy {
    margin:14px 0;
  }
  .specimen {
    padding:9px;
  }
  .panel-actions {
    margin-top:16px;
  }
  footer {
    margin-top:12px;
  }
}

@media(max-width:999px) {
  .topbar-inner,.page {
    width:calc(100% - 42px);
  }
  .table {
    gap:21px;
    grid-template-columns:minmax(0,1.45fr) minmax(260px,1fr);
  }
  .panel-main {
    padding:18px;
  }
  .panel-head {
    padding:14px 18px;
  }
  .panel-head h2 {
    font-size:24px;
  }
  .lesson-copy {
    margin:15px 0;
  }
  .specimen {
    padding:9px;
  }
  .specimen img {
    height:43px;
  }
  .panel-actions {
    margin-top:17px;
  }
  .progress i {
    width:12px;
  }
  .board-shell {
    padding:15px 11px;
  }
  .nav-item {
    padding:0 10px;
  }
  .banner {
    min-height:145px;
  }
  .banner-title {
    padding:14px 30px 20px;
  }
  .tools {
    padding-left:10px;
    margin-left:10px;
  }
}

@media(max-width:740px) {
  .topbar-inner,.page {
    width:calc(100% - 28px);
  }
  .topbar-inner {
    height:56px;
  }
  .brand span {
    font-size:27px;
  }
  .brand img {
    width:28px;
    height:28px;
  }
  .brand {
    gap:6px;
  }
  .nav-item {
    width:41px;
    height:42px;
    padding:0;
  }
  .nav-item .label {
    display:none;
  }
  .nav-item .icon {
    width:19px;
    height:19px;
  }
  .topbar nav {
    gap:2px;
  }
  .tools {
    gap:1px;
    padding-left:7px;
    margin-left:5px;
  }
  .icon-btn {
    width:38px;
  }
  .page {
    padding-top:12px;
  }
  .banner {
    min-height:98px;
    border-radius:9px;
  }
  .banner-title {
    padding:10px 18px 14px;
  }
  .banner-ornament {
    display:none;
  }
  .banner h1 {
    font-size:47px;
    line-height:1.03;
    letter-spacing:-1.8px;
  }
  .banner p {
    font-size:13px;
    margin:2px 0;
  }
  .banner-art {
    background-size:auto 110%;
    background-position:63% center;
  }
  .banner-art:after {
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(90deg,#85422ee6 0%,#8f492e55 50%,transparent 75%);
  }
  .banner-hem {
    height:5px;
  }
  .table {
    display:flex;
    flex-direction:column;
    gap:16px;
    margin-top:15px;
  }
  .board-section,.panel {
    width:100%;
  }
  .board-section {
    max-width:520px;
    align-self:center;
  }
  .board-shell {
    border-radius:12px;
    padding:12px 9px 13px;
  }
  .trim-top {
    top:1px;
  }
  .trim-bottom {
    bottom:1px;
  }
  .board-trim {
    left:18px;
    right:18px;
    background-size:55px 8px;
  }
  .board-sand {
    padding:1.5% 2.5% 4% 4.2%;
  }
  .ranks {
    top:1.7%;
    bottom:4.5%;
    width:4.3%;
  }
  .files {
    left:4.2%;
    right:2.5%;
    height:4.8%;
  }
  .ranks,.files {
    font-size:10px;
  }
  .corner {
    width:3.5px;
    height:3.5px;
  }
  .tl,.tr {
    top:5px;
  }
  .bl,.br {
    bottom:5px;
  }
  .board-caption,footer {
    display:none;
  }
  .panel {
    margin-bottom:16px;
  }
  .panel-head {
    padding:10px 16px;
    gap:9px;
  }
  .panel-head h2 {
    font-size:22px;
  }
  .head-icon {
    width:31px;
    height:31px;
    border-radius:8px;
  }
  .head-icon .icon {
    width:18px;
    height:18px;
  }
  .panel-main {
    padding:13px 16px;
  }
  .step-count {
    font-size:11px;
  }
  .lesson-copy {
    margin:9px 0 13px;
  }
  .lesson-copy h3 {
    font-size:26px;
    margin-bottom:3px;
  }
  .lesson-copy p {
    font-size:15px;
    line-height:1.4;
  }
  .specimens {
    gap:8px;
  }
  .specimen {
    flex-direction:row;
    gap:8px;
    padding:4px 8px;
    min-height:44px;
  }
  .specimen img,.specimen:nth-child(2) img {
    width:34px;
    height:34px;
  }
  .specimen small {
    font-size:11px;
  }
  .panel-actions {
    margin-top:12px;
  }
  .panel-foot {
    padding:1px 8px;
  }
  .text-btn {
    min-height:38px;
  }
  .hud-title {
    font-size:26px;
    margin:5px 0 10px;
  }
  .table.playing .board-section {
    order:1;
  }
  .table.playing .panel {
    order:0;
    margin-bottom:0;
  }
  .table.playing .panel-main {
    padding:10px 15px;
  }
  .table.playing .panel-actions {
    margin-top:10px;
  }
  .table.playing .panel-foot {
    padding:0;
  }
  .table.playing {
    padding-bottom:15px;
  }
  .field {
    margin-bottom:12px;
  }
  .body-copy {
    font-size:15px;
  }
}

@media(max-width:370px) {
  .brand span {
    display:none;
  }
  .topbar-inner,.page {
    width:calc(100% - 18px);
  }
  .page {
    padding-top:8px;
  }
  .banner {
    min-height:86px;
  }
  .banner-title {
    padding:8px 14px 10px;
  }
  .table {
    margin-top:11px;
    gap:11px;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation-duration:.001ms!important;
    transition-duration:.001ms!important;
  }
}

body.reduced *,body.reduced *:after {
  animation-duration:.001ms!important;
  transition-duration:.001ms!important;
}

.nav-item,.icon-btn,.text-btn,.coordinate-control {
  min-height:44px;
}

.icon-btn {
  width:44px;
}

@media(min-width:741px) and (max-height:990px) {
  footer {
    display:none;
  }
  .board-caption {
    margin-top:8px;
  }
}

@media(max-width:740px) {
  .banner {
    min-height:86px;
  }
  .banner-title {
    padding:7px 18px 12px;
  }
  .banner-art {
    background-position:83% 55%;
  }
  .panel {
    margin-bottom:5px;
  }
  .panel-main {
    padding-top:11px;
    padding-bottom:11px;
  }
  .page {
    padding-top:10px;
  }
  .panel-actions {
    margin-top:10px;
  }
  .icon-btn {
    width:41px;
  }
  .text-btn {
    min-height:44px;
  }
}

@media(max-width:400px) {
  .nav-item {
    width:42px;
  }
  .tools {
    padding-left:4px;
    margin-left:3px;
  }
  .brand {
    gap:5px;
  }
}

.mobile-actions:not([hidden]) {
  display:flex;
  align-items:center;
  gap:9px;
  width:100%;
  order:2;
}

.mobile-actions .panel-actions {
  display:flex;
  flex:1;
  margin:0!important;
}

.mobile-actions .panel-foot {
  background:none;
  border:none;
}

.mobile-actions .text-btn {
  min-height:45px;
  border:1px solid var(--line);
  background:#fffdf5;
  border-radius:8px;
  padding:5px 12px;
}

.brand,.option {
  min-height:44px;
}

@media(max-width:740px) {
  .nav-item,.icon-btn {
    width:44px;
  }
  .table.playing .scene-note {
    margin:0 0 7px;
    font-size:14px;
  }
}

