:root {
  color-scheme: light;
  --ink: #334a43;
  --paper: #f8f1db;
  --gold: #d7aa53;
  --muted: #6d7a6c;
  --line: #d2ccb8;
}
* {
  box-sizing: border-box;
}
html,
body,
#app {
  margin: 0;
  width: 100%;
  min-height: 100%;
  font:
    15px/1.65 system-ui,
    "PingFang SC",
    "Microsoft Yahei",
    sans-serif;
  color: var(--ink);
  background: #88bdb7;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  color: inherit;
  background: #faf5e4;
  border: 1px solid #d8d0b8;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button:hover {
  filter: brightness(1.04);
}
button:active {
  transform: translateY(2px);
}
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #cd873e;
  outline-offset: 4px;
}
.primary {
  background: #d5ac60;
  color: #302f22;
  border-color: #b58c43;
  box-shadow:
    inset 0 1px #f2d7a1,
    0 3px 0 #b08a45;
  font-weight: 700;
}
.primary .ico {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}
.quiet {
  background: transparent;
  box-shadow: none;
}
.small {
  font-size: 12px;
  padding: 6px 10px;
}
.ico {
  width: 26px;
  height: 26px;
  display: inline-block;
  flex: none;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbc4ad;
  background: #fffbee;
  border-radius: 8px;
  padding: 10px;
  color: #34483e;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #647a63;
  vertical-align: middle;
}
label {
  display: block;
  margin: 12px 0 7px;
  font-size: 13px;
}
textarea {
  resize: vertical;
  min-height: 70px;
}
h1,
h2,
h3,
p {
  margin: 0 0 12px;
}
h1 {
  font-size: 32px;
  line-height: 1.3;
}
h2 {
  font-size: 23px;
  line-height: 1.4;
}
h3 {
  font-size: 17px;
}
small,
.muted {
  color: var(--muted);
}
.game {
  height: 100dvh;
  min-height: 600px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #86bcb7;
}
.game-world {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: #86bcb7;
}
.world {
  height: 110%;
  width: 100%;
  position: absolute;
  top: -5%;
  object-fit: contain;
}
.vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 130px #416f6430;
  pointer-events: none;
}
.world [role="button"] {
  cursor: pointer;
  outline: none;
}
.world [role="button"]:hover .plotglow,
.world [role="button"]:focus .plotglow {
  stroke: #fff8d6;
  stroke-width: 7;
}
.world .constructed {
  animation: growin 0.7s ease-out;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.sea {
  animation: sea 12s linear infinite;
}
.cloud {
  animation: cloud 15s ease-in-out infinite alternate;
}
.cloud2 {
  animation-delay: -8s;
}
.boat {
  animation: boat 4s ease-in-out infinite;
}
.car {
  animation: car 9s linear infinite;
}
.gulls {
  animation: cloud 8s ease-in-out infinite alternate;
}
@keyframes sea {
  to {
    transform: translate(65px, 48px);
  }
}
@keyframes cloud {
  to {
    translate: 30px 6px;
  }
}
@keyframes boat {
  50% {
    translate: 3px -5px;
  }
}
@keyframes car {
  0% {
    translate: -170px -90px;
  }
  100% {
    translate: 220px 115px;
  }
}
@keyframes growin {
  from {
    opacity: 0;
    scale: 1 0.5;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}
.gamehud {
  position: absolute;
  z-index: 10;
  top: max(18px, env(safe-area-inset-top));
  left: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.gamehud > * {
  pointer-events: auto;
}
.goldcoin,
.daycount {
  background: #fff9e5e8;
  box-shadow: 0 3px 0 #53736530;
  border: 1px solid #fff6d8;
  border-radius: 30px;
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  gap: 9px;
}
.goldcoin .ico {
  color: #b98a31;
}
.goldcoin b {
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}
.daycount {
  font-size: 13px;
  margin-left: auto;
}
.daycount span {
  font-size: 11px;
  color: #6e826e;
}
.roundbutton {
  height: 43px;
  width: 43px;
  padding: 8px;
  border-radius: 50%;
  background: #f5f0da;
}
.mockmark {
  position: absolute;
  right: 12px;
  bottom: 7px;
  font-size: 9px;
  letter-spacing: 1px;
  color: #42665db0;
  z-index: 8;
  pointer-events: none;
}
.opening-shade,
.event-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #183c3526;
  backdrop-filter: blur(2px);
}
.chapter-stamp {
  position: absolute;
  top: 14%;
  left: 10%;
  font-size: 15px;
  letter-spacing: 8px;
  border-left: 2px solid #eee9d4;
  padding-left: 22px;
  color: #fcf6e0;
  text-shadow: 0 2px 8px #315c52;
}
.chapter-stamp small {
  display: block;
  font-size: 26px;
  letter-spacing: 4px;
  margin-top: 12px;
  color: inherit;
}
.vn-character {
  position: absolute;
  bottom: 110px;
  left: calc(50% - 460px);
  height: 82%;
  width: 530px;
  pointer-events: none;
  z-index: 1;
}
.large-portrait {
  height: 100%;
  width: 100%;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(10px 12px 5px #294c5420);
}
.vn-dialogue {
  position: absolute;
  bottom: max(32px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(1000px, calc(100% - 70px));
  padding: 28px 32px 18px;
  background: #fcf6e5f5;
  border: 2px solid #fef9ea;
  border-radius: 8px 22px 8px 22px;
  box-shadow:
    0 0 0 2px #b4b69c,
    0 12px 40px #284b4930;
  z-index: 5;
  min-height: 170px;
}
.nameplate {
  position: absolute;
  top: -24px;
  left: 25px;
  min-width: 160px;
  padding: 5px 23px;
  background: #4d6b61;
  color: #fff3d6;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  font-size: 16px;
  font-weight: 650;
  box-shadow: 0 3px #223e34;
}
.nameplate small {
  font-size: 10px;
  margin-left: 12px;
  color: #cad7c6;
}
.vn-dialogue > p {
  font-size: 16px;
  letter-spacing: 0.5px;
  max-width: 760px;
  margin-bottom: 12px;
}
.vn-controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.skip-dialogue {
  position: absolute;
  top: 24px;
  right: 26px;
  background: #f4efd8ba;
  font-size: 12px;
}
.name-dialogue {
  width: 460px;
  left: auto;
  right: 9%;
  top: 30%;
  bottom: auto;
  transform: none;
  padding-top: 34px;
}
.nameentry {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nameentry input {
  font-size: 22px;
  letter-spacing: 2px;
}
.nameentry span {
  font-size: 23px;
}
.savechoice {
  font-size: 12px;
}
.privacyline {
  display: block;
  font-size: 11px;
  margin: 10px 0 18px;
}
.name-dialogue .primary {
  width: 100%;
}
.game-dock {
  position: absolute;
  bottom: max(30px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: end;
  gap: 18px;
  z-index: 5;
}
.game-dock button {
  width: 74px;
  height: 74px;
  border-radius: 20px 20px 14px 14px;
  border: 2px solid #fff6d9;
  background: #f3ebd4;
  box-shadow:
    0 5px 0 #7c8a6f,
    0 8px 15px #325e4920;
  padding: 9px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.game-dock span {
  font-size: 12px;
  font-weight: 600;
}
.game-dock .nextday {
  background: #e0b866;
  border-color: #fae2a1;
  width: 100px;
  height: 88px;
  box-shadow: 0 5px #ad8b4f;
}
.game-dock .nextday .ico {
  width: 33px;
  height: 33px;
}
.island-name {
  position: absolute;
  left: 34px;
  top: 100px;
  font-size: 24px;
  letter-spacing: 4px;
  color: #edf6e7;
  text-shadow: 0 2px 6px #3e6654;
}
.island-name small {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  color: #e8f0e1;
}
.mail-float {
  position: absolute;
  right: 30px;
  top: 115px;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  padding: 14px;
  box-shadow: 0 4px #6f8b77;
}
.mail-float i {
  position: absolute;
  width: 9px;
  height: 9px;
  background: #c6654b;
  border: 2px solid #fff8e2;
  border-radius: 50%;
  right: 1px;
  top: 1px;
}
.ambient-leaf {
  position: absolute;
  width: 10px;
  height: 5px;
  border-radius: 100% 0;
  background: #ecd996;
  pointer-events: none;
  animation: leaf 14s linear infinite;
  z-index: 2;
}
.leaf1 {
  top: 20%;
  left: 30%;
}
.leaf2 {
  top: 10%;
  left: 75%;
  animation-delay: -7s;
}
@keyframes leaf {
  to {
    translate: -200px 700px;
    rotate: 620deg;
    opacity: 0;
  }
}
.tutorial-banner {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 330px;
  background: #fcf5dd;
  padding: 14px 20px;
  border-radius: 15px;
  box-shadow: 0 5px 20px #43634a20;
  text-align: center;
  z-index: 3;
  font-size: 14px;
}
.tutorial-banner span {
  display: block;
  font-size: 25px;
  animation: point 1s ease-in-out infinite;
}
.tutorial-objective {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 25px;
  background: #4b6d5ced;
  border: 1px solid #99ad8e;
  color: #fff6da;
  border-radius: 30px;
  white-space: nowrap;
}
.tutorial-trend .world [data-id="trend"] .plotglow,
.tutorial-value .world [data-id="value"] .plotglow,
.tutorial-defense .world [data-id="defense"] .plotglow,
.tutorial-research .world [data-id="research"] .plotglow {
  animation: highlight 1.2s infinite;
}
.tutorial-trend .world [data-id]:not([data-id="trend"]),
.tutorial-value .world [data-id]:not([data-id="value"]),
.tutorial-defense .world [data-id]:not([data-id="defense"]),
.tutorial-research .world [data-id]:not([data-id="research"]) {
  opacity: 0.3;
  pointer-events: none;
}
@keyframes highlight {
  50% {
    stroke: #fff;
    stroke-width: 12;
    fill: #fbefbb;
  }
}
@keyframes point {
  50% {
    translate: 0 6px;
  }
}
.backcity {
  position: absolute;
  left: 24px;
  top: 85px;
  z-index: 6;
  background: #f4efda;
  font-size: 12px;
}
.partner-switch {
  position: absolute;
  left: 26px;
  top: 145px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 5;
}
.partner-switch button {
  width: 46px;
  height: 54px;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  background: #d0d6be;
  border: 2px solid #fff0d2;
}
.partner-switch .selected {
  border-color: #c48e36;
}
.partner-face {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}
.drawstage {
  position: absolute;
  left: 56%;
  top: 16%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sealedcard {
  position: relative;
  width: 205px;
  height: 290px;
  border-radius: 12px;
  background: #45695f;
  border: 5px solid #dec58a;
  box-shadow:
    0 8px 0 #344f47,
    0 20px 30px #26463f30;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #f6e8ba;
  transform: rotate(5deg);
  padding: 25px;
  overflow: hidden;
}
.seal-border {
  position: absolute;
  inset: 10px;
  border: 1px solid #cdb67c;
  border-radius: 4px;
}
.seal {
  font-size: 85px;
  line-height: 1.5;
  text-shadow: 0 2px #183c33;
}
.sealedcard b {
  font-size: 20px;
  letter-spacing: 4px;
}
.sealedcard small {
  color: #d8d8b8;
  font-size: 11px;
  margin-top: 15px;
}
.finger-guide {
  margin-top: 28px;
  padding: 6px 15px;
  background: #faf4dd;
  border-radius: 20px;
  font-size: 12px;
  animation: point 1s infinite;
}
.cancel-draw {
  margin-top: 20px;
  font-size: 12px;
}
.cardspinning {
  animation: flip 0.7s ease-in-out infinite;
}
.eventcard {
  position: absolute;
  z-index: 4;
  top: 13%;
  left: 53%;
  width: 355px;
  max-height: calc(100dvh - 340px);
  overflow: auto;
  background: #f9f0d7;
  border: 5px solid #d6c89b;
  border-radius: 14px;
  padding: 18px;
  box-shadow:
    0 6px 0 #a9a682,
    0 20px 50px #183c3333;
}
.card-kicker {
  font-size: 10px;
  text-align: center;
  letter-spacing: 3px;
  color: #7b8066;
  border-bottom: 1px solid #d1c7a8;
  padding-bottom: 8px;
}
.event-illustration {
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border-radius: 50%;
  margin: 12px auto;
  color: #9e7950;
}
.event-illustration .ico {
  width: 48px;
  height: 48px;
}
.event-illustration span {
  font-size: 12px;
  letter-spacing: 3px;
}
.eventcard h2 {
  text-align: center;
  font-family: serif;
  font-size: 24px;
}
.eventcard p {
  font-size: 12px;
  line-height: 1.7;
}
.rules {
  font-size: 11px;
  color: #76806b;
  margin-bottom: 10px;
}
.rules summary {
  cursor: pointer;
}
.gamechoices {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.gamechoices button {
  font-size: 13px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-color: #b7baa2;
  background: #fffbed;
  box-shadow: 0 2px #d1cbb0;
}
.gamechoices small {
  font-size: 9px;
  white-space: nowrap;
  margin-left: 8px;
}
.card-reveal {
  animation: reveal 0.45s ease-out;
}
.receipt {
  text-align: center;
  padding: 25px;
}
.receipt-value {
  font-size: 47px;
  color: #547a5e;
  font-variant-numeric: tabular-nums;
  margin: 22px 0;
}
.receipt-value small {
  display: block;
  font-size: 11px;
  letter-spacing: 4px;
}
.receipt-detail {
  font-size: 12px;
  color: #7b7c69;
  margin: 20px 0;
}
.negative {
  color: #a7604b;
}
.positive {
  color: #537b5b;
}
.coin-flight {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.coin-flight i {
  position: absolute;
  left: 50%;
  top: 50%;
  color: #d2a04b;
  font-style: normal;
  font-size: 20px;
  animation: coin 0.9s calc(var(--n) * 0.08s) both;
}
@keyframes coin {
  0% {
    opacity: 0;
    translate: 0 30px;
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    translate: calc((var(--n) - 3) * 30px) -180px;
    scale: 0.4;
  }
}
@keyframes reveal {
  from {
    rotate: y 90deg;
    opacity: 0;
  }
  to {
    rotate: y 0;
    opacity: 1;
  }
}
@keyframes flip {
  50% {
    rotate: y 90deg;
  }
}
.hintrow {
  display: flex;
  gap: 6px;
}
.hintrow button {
  font-size: 11px;
  padding: 5px 10px;
}
.chatrow {
  display: flex;
  gap: 5px;
  flex: 1;
  max-width: 400px;
}
.chatrow input {
  font-size: 12px;
}
.chatrow button {
  font-size: 12px;
  white-space: nowrap;
}
dialog {
  color: var(--ink);
  background: #faf5e5;
  border: 3px solid #d9c99f;
  border-radius: 18px;
  padding: 25px;
  width: min(580px, calc(100% - 28px));
  max-height: 88dvh;
  overflow: auto;
  box-shadow:
    0 14px 0 #3e5c4420,
    0 20px 80px #173d3b50;
}
dialog::backdrop {
  background: #223e456e;
  backdrop-filter: blur(3px);
}
.modalhead {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  margin-bottom: 15px;
}
.modalhead h2 {
  font-size: 21px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 15px 0;
}
.numbers > div {
  padding: 12px 8px;
  background: #ece7d4;
  border-radius: 8px;
  text-align: center;
}
.numbers small {
  font-size: 10px;
}
.numbers strong {
  display: block;
  font-size: 21px;
}
.facts,
.notice {
  padding: 12px;
  border-left: 3px solid #bda46e;
  background: #eee8d5;
  font-size: 12px;
  margin: 12px 0;
  line-height: 1.8;
}
.badge {
  font-size: 10px;
  border: 1px solid #b9bda8;
  border-radius: 5px;
  padding: 3px 7px;
  display: inline-block;
}
.ledgeritem,
.claim {
  padding: 14px 0;
  border-bottom: 1px solid #d7d1bd;
  margin: 8px 0;
  font-size: 13px;
}
.claim small {
  display: block;
  margin: 5px 0;
}
.lesson {
  font-size: 15px;
  line-height: 1.9;
}
.choices,
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.lesson input[type="range"] {
  padding: 0;
}
.summary {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 25px 70px;
  background: #f7f1df;
  min-height: 100vh;
}
.summary > .eyebrow {
  font-size: 11px;
  color: #8c866c;
  letter-spacing: 2px;
}
.summary .panel {
  padding: 18px;
  border: 1px solid #d2cbb7;
  margin: 20px 0;
  border-radius: 10px;
}
.shell {
  min-height: 100vh;
  background: #e6e4ce;
}
.shell .gamehud {
  position: absolute;
}
.poolselection {
  display: flex;
  gap: 10px;
  padding: 20px 0;
}
.pool-card {
  width: 33%;
  height: 180px;
  background: #4d6c5c;
  border: 3px solid #c8b883;
  color: #fff3d0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px;
  box-shadow: 0 6px #b8b297;
}
.pool-card > span {
  font-size: 43px;
  height: 60px;
}
.pool-card b {
  font-size: 14px;
}
.pool-card small {
  font-size: 10px;
  margin-top: 10px;
  color: #e7ddbd;
}
.blueprint-pool {
  background: #647b8b;
}
.materials-pool {
  background: #997853;
}
.loot-reveal {
  text-align: center;
  padding: 25px 0;
  animation: reveal 0.5s;
}
.loot-icon {
  height: 95px;
}
.loot-icon .ico {
  width: 70px;
  height: 70px;
  color: #a87f3d;
}
.material-row {
  display: flex;
  gap: 15px;
  border-bottom: 1px solid #d5ccb5;
  padding: 15px 0;
}
.material-row small {
  display: block;
  font-size: 12px;
}
.material-icon {
  width: 55px;
  flex: none;
  display: grid;
  place-items: center;
  background: #e8dec0;
  border-radius: 8px;
}
.material-row:nth-child(2) .material-icon {
  background: #cdd7d3;
}
.material-row:nth-child(3) .material-icon {
  background: #cde2df;
}
.material-row:nth-child(4) .material-icon {
  background: #e6c9ab;
}
#toast {
  display: none;
  position: fixed;
  z-index: 100;
  bottom: 130px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 85%;
  width: max-content;
  padding: 12px 20px;
  background: #304e42ec;
  color: #fff8dc;
  border: 1px solid #8ca38a;
  border-radius: 25px;
  box-shadow: 0 6px 20px #24433330;
  font-size: 13px;
}
.cg {
  padding: 15px;
}
.log {
  font-size: 12px;
}
@media (min-width: 1300px) {
  .world {
    width: 1100px;
    left: calc(50% - 550px);
    height: 115%;
    top: -7%;
  }
  .game-world {
    background: radial-gradient(ellipse, #aac6ae, #83bbb7 65%);
  }
  .vn-character {
    left: calc(50% - 520px);
    height: 90%;
  }
  .eventcard {
    left: calc(50% + 70px);
  }
  .drawstage {
    left: calc(50% + 150px);
  }
}
.event-game .eventcard > .rarity-badge {
  display: none;
}
@media (max-width: 700px) {
  .game {
    min-height: 580px;
  }
  .gamehud {
    left: 14px;
    right: 14px;
    top: max(12px, env(safe-area-inset-top));
    gap: 7px;
  }
  .goldcoin,
  .daycount {
    height: 36px;
    padding: 0 12px;
  }
  .goldcoin b {
    font-size: 16px;
  }
  .goldcoin .ico {
    width: 20px;
  }
  .daycount {
    font-size: 12px;
  }
  .daycount span {
    display: none;
  }
  .roundbutton {
    width: 35px;
    height: 35px;
    padding: 6px;
  }
  .roundbutton .ico {
    width: 22px;
    height: 22px;
  }
  .world {
    width: 150%;
    height: auto;
    min-height: 88%;
    left: -25%;
    top: 8%;
  }
  .city-game .world {
    top: 8%;
  }
  .island-name {
    left: 20px;
    top: 78px;
    font-size: 18px;
  }
  .mail-float {
    top: 80px;
    right: 18px;
    width: 44px;
    height: 44px;
    padding: 9px;
  }
  .game-dock {
    gap: 11px;
    width: calc(100% - 28px);
    justify-content: center;
    bottom: max(27px, env(safe-area-inset-bottom));
  }
  .game-dock button {
    width: 56px;
    height: 61px;
    padding: 5px 2px;
    border-radius: 16px;
  }
  .game-dock span {
    font-size: 10px;
  }
  .game-dock .ico {
    width: 24px;
    height: 24px;
  }
  .game-dock .nextday {
    width: 77px;
    height: 77px;
    flex: none;
  }
  .game-dock .nextday span {
    font-size: 11px;
  }
  .game-dock .nextday .ico {
    width: 29px;
    height: 29px;
  }
  .vn-character {
    left: -16%;
    bottom: 135px;
    width: 105%;
    height: 78%;
  }
  .vn-dialogue {
    width: calc(100% - 28px);
    bottom: max(23px, env(safe-area-inset-bottom));
    padding: 25px 17px 15px;
    min-height: 158px;
    border-radius: 8px 17px;
  }
  .vn-dialogue > p {
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 10px;
  }
  .nameplate {
    left: 15px;
    font-size: 14px;
    padding: 4px 18px;
    top: -23px;
    min-width: 135px;
  }
  .nameplate small {
    font-size: 9px;
    margin-left: 9px;
  }
  .vn-controls .primary {
    font-size: 12px;
    padding: 8px 15px;
  }
  .chapter-stamp {
    top: 12%;
    left: 8%;
    font-size: 11px;
    letter-spacing: 5px;
  }
  .chapter-stamp small {
    font-size: 20px;
    letter-spacing: 2px;
    max-width: 180px;
  }
  .opening .vn-character {
    left: 0;
    width: 110%;
    height: 85%;
    bottom: 110px;
  }
  .skip-dialogue {
    right: 15px;
    top: 15px;
    font-size: 10px;
  }
  .name-dialogue {
    top: auto;
    bottom: 25px;
    left: 14px;
    right: 14px;
    transform: none;
    width: auto;
    min-height: 245px;
  }
  .name-dialogue .primary {
    font-size: 13px;
  }
  .nameentry input {
    font-size: 18px;
  }
  .privacyline {
    font-size: 10px;
    margin: 8px 0 12px;
  }
  .savechoice {
    font-size: 11px;
    margin: 9px 0;
  }
  .event-game .vn-character {
    left: -30%;
    width: 100%;
    height: 70%;
    bottom: 160px;
    opacity: 0.95;
  }
  .drawstage {
    left: 46%;
    top: 19%;
  }
  .sealedcard {
    width: 155px;
    height: 223px;
    padding: 15px;
    border-width: 4px;
  }
  .seal {
    font-size: 64px;
  }
  .sealedcard b {
    font-size: 16px;
  }
  .sealedcard small {
    font-size: 10px;
  }
  .finger-guide {
    font-size: 10px;
    margin-top: 22px;
  }
  .eventcard {
    left: auto;
    right: 15px;
    top: 12%;
    width: calc(100% - 68px);
    max-width: 325px;
    max-height: calc(100dvh - 290px);
    padding: 13px;
    border-width: 4px;
  }
  .eventcard h2 {
    font-size: 21px;
    margin: 8px 0;
  }
  .eventcard p {
    font-size: 11px;
    margin-bottom: 9px;
  }
  .event-illustration {
    height: 37px;
    margin: 7px 0;
  }
  .event-illustration .ico {
    width: 29px;
    height: 29px;
  }
  .event-illustration span {
    font-size: 10px;
  }
  .card-kicker {
    font-size: 9px;
    letter-spacing: 2px;
    padding-bottom: 6px;
  }
  .gamechoices {
    gap: 6px;
  }
  .gamechoices button {
    font-size: 12px;
    padding: 8px;
  }
  .gamechoices small {
    font-size: 9px;
  }
  .rules {
    font-size: 10px;
  }
  .backcity {
    top: 58px;
    left: 14px;
    font-size: 10px;
    padding: 5px 10px;
  }
  .partner-switch {
    left: 8px;
    top: 24%;
    gap: 5px;
  }
  .partner-switch button {
    width: 37px;
    height: 43px;
  }
  .event-game .vn-dialogue {
    min-height: 155px;
  }
  .hintrow {
    gap: 4px;
    flex-wrap: wrap;
    justify-content: end;
  }
  .hintrow button {
    font-size: 10px;
    padding: 4px 8px;
  }
  .chatrow {
    width: 100%;
    max-width: none;
    flex: auto;
  }
  .chatrow input {
    font-size: 11px;
    padding: 6px 8px;
  }
  .chatrow button {
    font-size: 11px;
    padding: 5px 10px;
  }
  .receipt {
    top: 20%;
    width: 245px;
    right: 25px;
    max-height: 390px;
  }
  .receipt-value {
    font-size: 40px;
    margin: 15px 0;
  }
  .receipt-detail {
    font-size: 11px;
    margin: 15px 0;
  }
  .tutorial-banner {
    top: 75px;
    left: 20px;
    transform: none;
    max-width: 240px;
    font-size: 12px;
    padding: 12px 15px;
  }
  .tutorial-objective {
    bottom: 65px;
    font-size: 12px;
  }
  .tutorial-build .world {
    top: 18%;
  }
  .city-game:has(.vn-character) .world {
    opacity: 0.75;
  }
  .poolselection {
    gap: 7px;
  }
  .pool-card {
    height: 155px;
    padding: 7px;
  }
  .pool-card b {
    font-size: 12px;
  }
  .pool-card small {
    font-size: 9px;
  }
  .pool-card > span {
    font-size: 35px;
    height: 50px;
  }
  dialog {
    padding: 18px;
  }
  .numbers {
    gap: 5px;
  }
  .numbers strong {
    font-size: 18px;
  }
  .numbers > div {
    padding: 8px 4px;
  }
  .numbers small {
    font-size: 9px;
  }
  .summary {
    padding: 90px 18px 50px;
  }
  .summary h1 {
    font-size: 29px;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .mockmark {
    font-size: 8px;
  }
  .material-icon {
    width: 43px;
  }
  .notice {
    font-size: 11px;
  }
  .gamechoices button:active {
    background: #e6ddc0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.cardspinning,
.poolspin {
  animation: card-flight 2.4s cubic-bezier(0.12, 0.55, 0.3, 1) both;
}
.pool-spin-stage {
  min-height: 340px;
  display: grid;
  place-items: center;
  perspective: 1100px;
}
.poolspin.strategy {
  background: #627c8a;
}
.poolspin.factor {
  background: #987853;
}
.vn-character {
  animation: character-enter 0.55s ease-out;
}
.eventcard.receipt .coin-flight {
  position: fixed;
  inset: 0;
  z-index: 20;
}
.eventcard.receipt .coin-flight i {
  left: 60%;
  top: 40%;
  animation: coin-to-hud 1s calc(var(--n) * 0.07s) both;
}
@keyframes card-flight {
  0% {
    opacity: 0;
    transform: translate(80px, -150px) scale(0.2) rotateY(0) rotateZ(-30deg);
  }
  15% {
    opacity: 1;
  }
  55% {
    transform: translate(0, 0) scale(1.06) rotateY(920deg) rotateZ(6deg);
  }
  85% {
    transform: translate(0, 0) scale(1) rotateY(1060deg) rotateZ(2deg);
  }
  100% {
    transform: translate(0, 0) scale(1) rotateY(1080deg) rotateZ(0deg);
  }
}
@keyframes character-enter {
  from {
    opacity: 0;
    translate: -35px 0;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@keyframes coin-to-hud {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.7);
  }
  20% {
    opacity: 1;
    transform: translate(calc((var(--n) - 3) * 22px), -25px) scale(1);
  }
  100% {
    opacity: 0;
    left: 50px;
    top: 30px;
    transform: scale(0.35);
  }
}

/* Let the character sit naturally beside a soft speech panel. */
.vn-dialogue {
  border: 1px solid #fff9e7;
  border-radius: 24px;
  background: linear-gradient(145deg, #fffaf0f7, #f6efdff2);
  box-shadow:
    0 10px 32px #284b4930,
    0 0 0 1px #a9b29b66;
  backdrop-filter: blur(10px);
}
.nameplate {
  position: static;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  margin: -45px 0 12px;
  padding: 7px 14px;
  border: 1px solid #f1e6c8;
  border-radius: 999px;
  background: #49695ff2;
  clip-path: none;
  box-shadow: 0 5px 16px #284b4930;
  font-size: 14px;
}
.nameplate small {
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid #dbe1d055;
}
.large-portrait {
  object-position: 50% 18%;
  filter: drop-shadow(0 12px 14px #294c5430);
}
@media (max-width: 700px) {
  .event-game .vn-character {
    left: 45%;
    bottom: 148px;
    width: 52%;
    height: 40%;
    z-index: 3;
    opacity: 1;
  }
  .event-game .large-portrait {
    object-fit: contain;
    object-position: 50% 100%;
    border-radius: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 0 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0 88%, transparent 100%);
  }
  .event-game .vn-dialogue {
    left: 14px;
    right: 14px;
    transform: none;
    width: auto;
    min-height: 145px;
    padding: 19px 16px 14px;
    border-radius: 22px;
  }
  .event-game .nameplate {
    margin: -38px 0 10px 2px;
    padding: 6px 12px;
  }
  .event-game .vn-dialogue > p {
    max-width: none;
  }
  .event-game .vn-controls {
    position: relative;
    z-index: 1;
  }
}
