.app {
  max-width: 640px;
}

.surface,
.dlg {
  background-color: var(--panel-bg);
  background-image: var(--paper-tex, none);
  background-blend-mode: var(--paper-blend, multiply);
  background-size: 160px 160px;
}

.controls.surface {
  border-radius: 22px 26px 24px 20px / 24px 20px 26px 22px;
  box-shadow: var(--panel-shadow), inset 0 0 0 1px var(--panel-inner, rgba(255, 255, 255, 0.35));
}

.top.surface {
  border-radius: 20px 24px 22px 18px / 22px 18px 24px 20px;
}

.top h1 {
  font-size: 23px;
  letter-spacing: 0.01em;
}

.stage {
  position: relative;
  justify-content: flex-start;
}

.trek {
  align-self: center;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  font: 600 12.5px/1.35 var(--font-ui);
  text-align: center;
  color: var(--text);
}

.trek b {
  font-weight: 800;
}

.coach {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--dlg-bg);
  background-image: var(--paper-tex, none);
  background-blend-mode: var(--paper-blend, multiply);
  color: var(--dlg-text);
  border: 1px solid var(--dlg-edge);
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.55);
  font-size: 14px;
  line-height: 1.4;
  animation: coach-in 0.35s ease both;
  z-index: 3;
}

.coach p {
  flex: 1;
  margin: 0;
}

.coach .btn {
  flex: none;
  min-height: 38px;
  padding: 8px 12px;
  font-size: 14px;
}

@keyframes coach-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

#play {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.meter {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: var(--note-bg);
  color: var(--en-c, var(--ok));
}

.meter svg {
  width: 18px;
  height: 18px;
}

.meter .bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--meter-track, rgba(0, 0, 0, 0.12));
  overflow: hidden;
}

.meter .bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--en, 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--en-c, var(--ok)) 75%, #fff), var(--en-c, var(--ok)));
  transition: width 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.meter b {
  min-width: 38px;
  font: 800 13.5px/1 var(--font-num);
  text-align: right;
  color: var(--text);
}

.meter[data-lvl='hi'] {
  --en-c: var(--en-hi, #3f8f5a);
}

.meter[data-lvl='mid'] {
  --en-c: var(--en-mid, #d9952a);
}

.meter[data-lvl='lo'] {
  --en-c: var(--en-lo, #c2412f);
}

.meter[data-lvl='lo'] .bar i {
  animation: low 1.1s ease-in-out infinite;
}

@keyframes low {
  50% {
    opacity: 0.55;
  }
}

.coins {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 5px 10px 5px 7px;
  border-radius: 999px;
  background: var(--note-bg);
  color: var(--coin, #b97a1c);
  font: 600 12px/1 var(--font-ui);
}

.coins svg {
  width: 19px;
  height: 19px;
}

.coins b {
  font: 800 15px/1 var(--font-num);
  color: var(--text);
}

.coins span {
  color: var(--text-2);
}

.mk-btn {
  min-height: 36px;
  padding: 6px 12px;
  gap: 6px;
  font-size: 13.5px;
}

.mk-btn svg {
  width: 18px;
  height: 18px;
}

.fx {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.fx:empty {
  display: none;
}

.chip {
  display: inline-flex;
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 6px;
  border-radius: 12px;
  background: var(--note-bg);
  font-size: 12px;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: break-word;
}

.chip svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--accent);
}

.chip.day {
  background: var(--day-bg, var(--accent));
  color: var(--day-text, #fff);
  cursor: pointer;
}

.chip.day svg {
  color: currentColor;
}

.chip.warn svg {
  color: var(--en-lo, #c2412f);
}

.tray {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 92px;
  padding: 8px;
  border-radius: 18px;
  background: var(--tray-bg, rgba(0, 0, 0, 0.06));
  box-shadow: inset 0 2px 8px -4px rgba(0, 0, 0, 0.35);
}

.tray[data-state='throw'] {
  grid-template-columns: auto 1fr;
  gap: 12px;
}

.tray[data-state='over'] {
  display: none;
}

.tray-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 8px;
  font: 600 14px/1.35 var(--font-ui);
  text-align: center;
}

.tray-msg svg {
  width: 18px;
  height: 18px;
  color: var(--en-lo, #c2412f);
}

.tray[data-state='wait'] {
  justify-items: center;
}

.tray[data-state='wait'] .tray-msg {
  margin: 6px 0 0;
  color: var(--text-2);
}

.tray-idle,
.tray-roll,
.cubes {
  display: flex;
  align-items: center;
  gap: 14px;
  perspective: 520px;
}

.tray-idle {
  padding: 4px 6px;
  cursor: grab;
  touch-action: none;
}

.tray-roll {
  justify-content: center;
  min-height: 72px;
  gap: 26px;
}

.rollwrap {
  display: inline-block;
  will-change: transform;
}

.btn.throw {
  min-height: 52px;
  font-size: 16px;
}

.cube {
  --cs: 42px;
  position: relative;
  display: inline-block;
  flex: none;
  width: var(--cs);
  height: var(--cs);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
}

.cube.idle {
  transform: rotateX(-22deg) rotateY(34deg) rotateZ(4deg);
  animation: bob 3.2s ease-in-out infinite;
}

.cube.idle.b {
  transform: rotateX(28deg) rotateY(-30deg) rotateZ(-8deg);
  animation-delay: -1.4s;
}

.cube.idle.c {
  transform: rotateX(-12deg) rotateY(-52deg) rotateZ(10deg);
  animation-delay: -0.7s;
}

@keyframes bob {
  50% {
    translate: 0 -4px;
  }
}

.cube.still {
  --cs: 34px;
  transform: rotateX(calc(var(--rx) - 14deg)) rotateY(calc(var(--ry) + 18deg));
}

.cf {
  position: absolute;
  inset: 0;
  border-radius: 22%;
  background: radial-gradient(circle at 30% 26%, var(--die-hi, #fffdf7), var(--die-face, #f4ead8) 62%, var(--die-lo, #dcc9ab));
  box-shadow: inset 0 0 0 1px var(--die-edge, rgba(90, 60, 40, 0.28)), inset -3px -4px 8px rgba(80, 50, 30, 0.18);
  backface-visibility: hidden;
}

.cf i {
  position: absolute;
  width: 17%;
  height: 17%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, var(--pip-hi, #5a3a2a), var(--die-pip, #1f120c));
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.45);
}

.f1 i {
  width: 24%;
  height: 24%;
  background: radial-gradient(circle at 35% 30%, #e46a4a, #9a2c16);
}

.f1 {
  transform: translateZ(calc(var(--cs) / 2));
}

.f6 {
  transform: rotateY(180deg) translateZ(calc(var(--cs) / 2));
}

.f3 {
  transform: rotateY(90deg) translateZ(calc(var(--cs) / 2));
}

.f4 {
  transform: rotateY(-90deg) translateZ(calc(var(--cs) / 2));
}

.f2 {
  transform: rotateX(90deg) translateZ(calc(var(--cs) / 2));
}

.f5 {
  transform: rotateX(-90deg) translateZ(calc(var(--cs) / 2));
}

.cube.fogged {
  --cs: 34px;
  transform: none;
}

.cube.fogged .cf {
  transform: none;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--fog-a, #eef2f6), var(--fog-b, #c9d3de));
  color: var(--text-2);
}

.cube.fogged svg {
  width: 70%;
  height: 70%;
}

.dice-pick {
  display: grid;
  gap: 8px;
}

.dice-pick.n2 {
  grid-template-columns: 1fr 1fr;
}

.dice-pick.n3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.die {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  min-height: 64px;
  padding: 8px 10px;
  border: 1px solid var(--btn-edge);
  border-radius: var(--r-ctl);
  background: var(--btn-bg);
  color: var(--btn-text);
  box-shadow: var(--btn-shadow);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.2s, box-shadow 0.2s;
}

.die .cubes {
  grid-row: span 2;
  gap: 4px;
}

.die:not(:disabled):hover {
  border-color: var(--accent);
  box-shadow: var(--btn-shadow), 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
}

.die:active {
  transform: scale(0.97);
}

.die:disabled {
  opacity: 0.55;
  cursor: default;
}

.die.bonus {
  border-color: var(--ok);
}

.die.wide {
  width: 100%;
}

.dv {
  font: 800 16px/1.15 var(--font-ui);
}

.db {
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--text-2);
}

.dice-pick.n3 .die {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  row-gap: 4px;
  padding: 8px 6px;
}

.dice-pick.n3 .die .cubes {
  grid-row: auto;
}

.acts {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.tray[data-state='throw'] + .acts {
  margin-top: -2px;
}

.hand-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border: 1px dashed var(--card-edge, var(--btn-edge));
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text-2);
}

.hand-empty svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--accent);
}

.acts:empty {
  display: none;
}

.btn.act {
  flex: 0 1 auto;
  min-height: 34px;
  padding: 6px 12px;
  gap: 6px;
  font-size: 13px;
}

.btn.act svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.btn.act.armed {
  border-color: var(--en-lo, #c2412f);
  color: var(--en-lo, #c2412f);
}

.hand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hand-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 6px;
}

.hcard {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 78px;
  padding: 8px 5px 7px;
  border: 1px solid var(--card-edge, var(--btn-edge));
  border-radius: 12px 14px 12px 15px / 14px 12px 15px 12px;
  background-color: var(--card-face, var(--btn-bg));
  background-image: var(--paper-tex, none);
  background-blend-mode: var(--paper-blend, multiply);
  background-size: 160px 160px;
  color: var(--btn-text);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.2s, box-shadow 0.2s;
}

.hcard:active {
  transform: scale(0.96);
}

.hcard.ready {
  border-color: var(--card-ready, var(--accent));
  box-shadow: inset 0 0 0 1px var(--card-ready, var(--accent)), 0 6px 14px -10px var(--card-ready, var(--accent));
}

.hcard.passive {
  border-style: dashed;
}

.hcard.empty {
  cursor: default;
  border-style: dashed;
  opacity: 0.45;
  align-content: center;
  background-image: none;
  min-height: 0;
}

.hc-ic svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.hc-t {
  font: 700 12.5px/1.15 var(--font-ui);
  overflow-wrap: anywhere;
  hyphens: auto;
}

.hc-s {
  font-size: 10.5px;
  color: var(--text-2);
}

.combo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px dashed var(--accent);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: 700 13.5px/1.2 var(--font-ui);
  cursor: pointer;
}

.combo svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.combo.ready {
  border-style: solid;
  background: var(--note-bg);
}

.tools-row {
  display: flex;
  gap: 8px;
}

.tools-row {
  justify-content: center;
}

.tools-row .btn {
  flex: 0 1 120px;
  min-height: 30px;
  padding: 4px 14px;
  font-size: 12.5px;
  border-style: dashed;
  background: transparent;
  box-shadow: none;
}

.tcard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--card-edge, var(--dlg-edge));
  border-radius: 16px;
  background: var(--note-bg);
}

.tcard header {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 800 19px/1.2 var(--font-title);
}

.tcard header svg {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--dlg-h3);
}

.dlg .tcard p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
}

.tcard p span {
  display: block;
  margin-bottom: 2px;
  font: 700 10.5px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dlg-h3);
}

.dlg .tc-n,
.dlg .tc-pair {
  font-size: 13px;
  opacity: 0.8;
}

.dlg .tc-q {
  font-weight: 700;
}

.tcard .row-btns {
  margin-top: auto;
  padding-top: 2px;
  justify-content: center;
}

.tcard .row-btns .btn {
  flex: 0 1 220px;
  min-height: 44px;
}

.camp-sub {
  margin-top: -6px;
}

.camp-cards {
  display: grid;
  gap: 10px;
  margin: 10px 0;
}

.camp-both {
  margin: 8px 0 2px;
}

.dlg .camp-q {
  margin: 4px 0 8px;
  font-weight: 700;
}

.camp-drops {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.camp-drops .btn {
  min-height: 44px;
}

.mk-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-right: 34px;
}

.mk-bal {
  display: flex;
  gap: 8px;
  margin: 0;
}

.mk-bal span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 7px;
  border-radius: 999px;
  background: var(--note-bg);
  font: 800 14px/1 var(--font-num);
}

.mk-bal svg {
  width: 17px;
  height: 17px;
}

.mk-sk svg {
  color: var(--coin, #b97a1c);
}

.mk-en svg {
  color: var(--en-hi, #3f8f5a);
}

.dlg .mk-sale {
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--day-bg, var(--accent));
  color: var(--day-text, #fff);
  font-weight: 700;
  font-size: 13.5px;
}

.mk-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 6px 0 10px;
  padding: 4px;
  border-radius: 14px;
  background: var(--note-bg);
}

.mk-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--dlg-text);
  font: 700 14px/1 var(--font-ui);
  cursor: pointer;
}

.mk-tabs button[aria-selected='true'] {
  background: var(--btn-bg);
  box-shadow: var(--btn-shadow);
}

.dlg .mk-note {
  margin: 0 0 8px;
  font-size: 13px;
  opacity: 0.8;
}

.mk-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--dlg-edge);
}

.mk-ic svg {
  width: 26px;
  height: 26px;
  color: var(--dlg-h3);
}

.mk-tx {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mk-tx b {
  font-size: 15px;
}

.mk-tx span {
  font-size: 12.5px;
  line-height: 1.35;
  opacity: 0.82;
}

.btn.mk-buy {
  flex: none;
  width: 96px;
  min-height: 38px;
  padding: 6px 8px;
  font: 800 14px/1 var(--font-num);
}

.dlg.cyber {
  border: 2px solid var(--cy-edge, #c2412f);
}

.cy-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cy-ring {
  --p: 1;
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: conic-gradient(var(--cy-edge, #c2412f) calc(var(--p) * 360deg), var(--note-bg) 0);
}

.cy-ring::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--dlg-bg);
}

.cy-ring b {
  position: relative;
  z-index: 1;
  font: 800 20px/1 var(--font-num);
}

.cy-ring[data-hot='1'] b {
  color: var(--cy-edge, #c2412f);
  animation: low 0.6s ease-in-out infinite;
}

.dlg .cy-k {
  margin: 0 0 2px;
  font: 700 11px/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cy-edge, #c2412f);
}

.dlg .cy-head h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.cy-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cy-list {
  display: grid;
  gap: 8px;
}

.cy-opt {
  display: grid;
  gap: 4px;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid var(--btn-edge);
  border-radius: 14px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font: 600 14.5px/1.35 var(--font-ui);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.12s;
}

.cy-opt:not(:disabled):hover {
  border-color: var(--accent);
}

.cy-opt:active {
  transform: scale(0.98);
}

.cy-opt.right {
  border-color: var(--ok);
  box-shadow: inset 0 0 0 2px var(--ok);
}

.cy-opt.wrong {
  border-color: var(--bad);
  box-shadow: inset 0 0 0 2px var(--bad);
}

.cy-opt:disabled {
  cursor: default;
}

.cy-mail .cy-from,
.cy-mail .cy-link {
  font: 500 11.5px/1.35 var(--mono);
  overflow-wrap: anywhere;
  opacity: 0.8;
}

.cy-mail .cy-link {
  color: var(--link, #2f6fb8);
  text-decoration: underline;
}

.cy-mail b {
  font-size: 14px;
}

.cy-app {
  justify-items: start;
}

.cy-appic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(140deg, #2f6fb8, #2a4f86);
  color: #fff;
  font: 800 20px/1 var(--font-ui);
}

.cy-app span {
  font-size: 12.5px;
  opacity: 0.85;
}

.cy-pick {
  margin-top: 4px;
  font: 700 12px/1 var(--font-ui);
  color: var(--accent);
  opacity: 1 !important;
}

.dlg .cy-pass {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--note-bg);
  font: 700 15px/1.3 var(--mono);
  overflow-wrap: anywhere;
}

.cy-scr {
  margin: 0 0 10px;
  border: 1px solid var(--btn-edge);
  border-radius: 16px;
  background: var(--note-bg);
  overflow: hidden;
}

.cy-scr-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--btn-edge);
  font: 700 12.5px/1.3 var(--mono);
  overflow-wrap: anywhere;
}

.cy-scr-h svg {
  flex: none;
  width: 18px;
  height: 18px;
}

.cy-scr-b {
  display: grid;
  gap: 6px;
  padding: 9px 12px 10px;
}

.dlg .cy-scr-b p {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.dlg .cy-scr-sms .cy-scr-b p,
.dlg .cy-scr-chat .cy-scr-b p {
  justify-self: start;
  max-width: 94%;
  padding: 6px 10px;
  border-radius: 4px 14px 14px 14px;
  background: var(--btn-bg);
}

.cy-scr-call .cy-scr-b {
  justify-items: center;
  text-align: center;
}

.dlg .cy-scr-call .cy-scr-b p:first-child {
  font-weight: 800;
  font-size: 15px;
}

.cy-kv {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  font-size: 13.5px;
}

.cy-kv span {
  opacity: 0.75;
}

.cy-kv b {
  font: 700 13px/1.35 var(--mono);
  text-align: right;
  overflow-wrap: anywhere;
}

.cy-mono .cy-opt {
  font: 600 13.5px/1.35 var(--mono);
  overflow-wrap: anywhere;
}

.cy-sw {
  display: grid;
  gap: 6px;
}

.cy-t {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 12px;
  background: var(--switch-bg);
  font-size: 14px;
  line-height: 1.3;
}

.cy-meter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  padding: 0;
}

.cy-meter::before {
  content: '';
  grid-area: 1 / 1;
  height: 8px;
  border-radius: 999px;
  background: var(--meter-track, rgba(0, 0, 0, 0.12));
}

#cy-meter-bar {
  grid-area: 1 / 1;
  height: 8px;
  width: 0;
  border-radius: 999px;
  background: var(--en-lo, #c2412f);
  transition: width 0.3s, background 0.3s;
}

#cy-meter-bar[data-lvl='mid'] {
  background: var(--en-mid, #d9952a);
}

#cy-meter-bar[data-lvl='hi'] {
  background: var(--en-hi, #3f8f5a);
}

.cy-meter b {
  font: 800 13px/1 var(--font-num);
}

.cy-res {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--note-bg);
  animation: coach-in 0.3s ease both;
}

.dlg .cy-res p {
  margin: 0 0 6px;
  font-size: 14.5px;
}

.cy-res .ok {
  color: var(--ok);
}

.cy-res .bad {
  color: var(--bad);
}

.dlg .cy-why {
  font-size: 13.5px;
  opacity: 0.85;
}

.day-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 6px 4px 12px;
  text-align: center;
}

.day-ic {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--day-bg, var(--accent));
  color: var(--day-text, #fff);
  animation: sun 6s linear infinite;
}

.day-ic svg {
  width: 36px;
  height: 36px;
}

@keyframes sun {
  to {
    rotate: 360deg;
  }
}

.dlg .day-k {
  margin: 4px 0 0;
  font: 700 11px/1.3 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dlg-h3);
}

.dlg .day-card h2 {
  margin: 0;
  font-size: 27px;
}

.dlg .day-card p {
  margin: 0;
  font-size: 15px;
}

.dlg .day-hit {
  color: var(--bad);
  font-weight: 700;
}

.dlg .day-ok {
  color: var(--ok);
  font-weight: 700;
}

.res-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0 12px;
}

.res-stats span {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 12px;
  background: var(--note-bg);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.res-stats svg {
  width: 18px;
  height: 18px;
  color: var(--dlg-h3);
}

.res-stats b {
  font: 800 17px/1.1 var(--font-num);
}

.album {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.acard {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--dlg-edge);
  border-radius: 12px;
  background: var(--note-bg);
}

.acard svg {
  width: 22px;
  height: 22px;
  color: var(--dlg-h3);
}

.acard b {
  font-size: 14px;
}

.dlg .acard p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  opacity: 0.85;
}

.acard.locked {
  opacity: 0.6;
  border-style: dashed;
}

.acard .lock {
  font: 800 22px/1 var(--font-num);
  color: var(--dlg-h3);
}

.res-tools {
  margin: 12px 0;
}

.rt-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--dlg-edge);
}

.rt-row svg {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--dlg-h3);
}

.dlg .rt-row p {
  margin: 2px 0 0;
  font-size: 13.5px;
  line-height: 1.4;
  opacity: 0.85;
}

.res-acts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 12px 0;
}

.dlg .res-more {
  margin: 4px 0 12px;
  font-size: 13.5px;
  text-align: center;
}

.res-more a {
  color: var(--dlg-h3);
}

.help-legend {
  display: grid;
  gap: 6px;
  margin: 8px 0 12px;
  padding: 0;
  list-style: none;
}

.help-legend li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.help-legend i {
  font-style: normal;
  font-weight: 800;
  text-align: center;
}

@media (min-width: 720px) {
  .camp-cards {
    grid-template-columns: 1fr 1fr;
  }

  .dlg.wide {
    width: min(720px, calc(100vw - 24px));
  }

  .cube {
    --cs: 46px;
  }

  .cube.still {
    --cs: 36px;
  }
}

@media (max-width: 400px) {
  .hud {
    gap: 6px;
  }

  .mk-btn span {
    display: none;
  }

  .mk-btn {
    padding: 6px 9px;
  }

  .cy-pair {
    grid-template-columns: 1fr;
  }

  .res-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .die {
    min-height: 58px;
    column-gap: 7px;
    padding: 6px 8px;
  }

  .cube {
    --cs: 36px;
  }

  .cube.still {
    --cs: 30px;
  }

  .dv {
    font-size: 14.5px;
  }

  .hcard {
    min-height: 70px;
  }

  .hc-t {
    font-size: 11.5px;
  }
}

@media (max-height: 700px) {
  .tray {
    min-height: 80px;
    padding: 6px;
  }

  .hcard {
    min-height: 66px;
    padding: 6px 4px;
  }

  .tools-row .btn {
    min-height: 32px;
  }
}

@media (max-height: 500px) {
  .fx {
    max-height: 52px;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  #controls {
    min-height: 0;
    overflow-y: auto;
  }
}

@media (min-width: 980px) {
  .controls.surface {
    width: min(1180px, calc(100vw - 24px));
    align-self: center;
  }

  #play {
    display: grid;
    grid-template-columns: minmax(230px, 0.85fr) minmax(400px, 1.5fr) minmax(300px, 1.15fr);
    grid-template-areas:
      'hud tray hand'
      'fx acts tools';
    column-gap: 12px;
    row-gap: 8px;
    align-items: center;
  }

  .hud {
    grid-area: hud;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'meter meter'
      'coins mk';
    align-content: center;
  }

  .hud .meter {
    grid-area: meter;
  }

  .hud .coins {
    grid-area: coins;
    justify-self: start;
  }

  .hud .mk-btn {
    grid-area: mk;
  }

  .fx {
    grid-area: fx;
  }

  .tray {
    grid-area: tray;
  }

  .acts {
    grid-area: acts;
  }

  .tray[data-state='throw'] + .acts {
    margin-top: 0;
  }

  .hand {
    grid-area: hand;
  }

  .tools-row {
    grid-area: tools;
    justify-content: flex-end;
  }

  .after:not([hidden]) {
    display: grid;
    grid-template-columns: auto minmax(0, 520px);
    justify-content: center;
    align-items: center;
    gap: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cube.idle,
  .day-ic,
  .meter[data-lvl='lo'] .bar i {
    animation: none;
  }
}
