/* The game board follows the approved cream / rose / brass dollhouse mockup. */
:root {
  --paper: #fbf0dd;
  --card: #fff8e9;
  --line: #ddc7a0;
  --gold: #b98d47;
  --rose: #ac4e75;
  --shadow: 0 10px 30px #704e2b14;
}
.build-selection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.build-selection .text-button {
  padding: 2px 0;
  white-space: nowrap;
}
.build-tools {
  display: flex;
  gap: 6px;
  margin: 8px 0;
}
.build-tools button {
  min-height: 44px;
  flex: 1;
  white-space: nowrap;
  padding: 8px 6px;
}
#placement-status {
  display: block;
  color: #4f7550;
  line-height: 1.6;
}
#placement-status.invalid {
  color: #a5455b;
}
.build-shortcuts {
  display: block;
  font-size: 10px;
  opacity: 0.8;
  margin-top: 3px;
}
body {
  background:
    radial-gradient(ellipse at 15% 0, #f6dfdc 0, transparent 55%),
    linear-gradient(135deg, #fbf1dd, #f3e6cf);
}
.app-shell {
  margin-left: 0;
  padding-bottom: 88px;
}
.topbar {
  height: 80px;
  padding: 12px 24px;
  background: linear-gradient(#fff9ec, #f7e7ca);
  border-bottom: 2px solid #d5b57a;
  box-shadow: 0 3px 15px #74553413;
  gap: 16px;
}
.page-identity .eyebrow {
  color: #a07842;
  font-size: 8px;
  letter-spacing: 2px;
}
.page-identity > span:last-child {
  font-size: 23px;
  letter-spacing: 3px;
  color: #85533d;
}
.status-bar {
  gap: 12px;
}
.status-item {
  padding: 8px 15px;
  border: 1px solid #d9bc85;
  border-radius: 13px;
  background: linear-gradient(#fffdf5, #fbefd8);
  box-shadow:
    inset 0 0 0 3px #fffaf0,
    0 2px 0 #dec69e55;
  min-height: 49px;
}
.status-item .icon {
  color: #b4893e;
  width: 25px;
  height: 25px;
}
.status-item small {
  font-size: 10px;
  color: #967a54;
}
.status-item b {
  font-size: 17px;
  color: #6a4937;
}
.account-button {
  background: #fff9eb;
  border: 1px solid #ceb481;
  border-radius: 12px;
  color: #82553e;
  box-shadow: inset 0 0 0 3px #fffdf6;
}
.topbar > .icon-button {
  border: 1px solid #cfad72;
  border-radius: 12px;
  background: #fff7e6;
  color: #9c6f39;
  min-width: 40px;
}
.workspace {
  padding: 12px 20px 0;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 270px;
}
.scene-heading {
  min-height: 44px;
  padding: 0 6px 9px;
}
.scene-heading .eyebrow {
  display: none;
}
.scene-heading h1 {
  font-size: 20px;
  margin: 0;
  letter-spacing: 1px;
  color: #8a5b45;
}
.stamp {
  font-size: 7px;
  padding: 4px 10px;
  border-color: #c98c9d;
  background: #fff2ea;
  transform: rotate(4deg);
}
.scene-frame {
  /* svh, not dvh: the frame keeps its size while a phone's address bar slides
     in and out, so the scene does not re-fit and jump while being touched. */
  height: calc(100svh - 204px);
  min-height: 490px;
  max-height: 1100px;
  border-radius: 24px;
  border: 2px solid #cba56b;
  background: #fbf1dd;
  box-shadow:
    0 5px 0 #dfc69b66,
    0 12px 35px #6b422518,
    inset 0 0 0 4px #fff7e7;
}
.scene-frame:after {
  inset: 5px;
  border-radius: 18px;
  border: 1px solid #fff9e9dd;
  box-shadow: inset 0 0 0 1px #cda66833;
}
.scene-caption {
  top: 12px;
  background: #fff8e9ec;
  border: 1px solid #d7bb86;
  box-shadow: 0 2px 7px #75482714;
  color: #876441;
  border-radius: 10px;
}
.floor-controls {
  right: 12px;
  gap: 7px;
}
.floor-button {
  width: 43px;
  height: 43px;
  border-radius: 12px;
  border: 1px solid #c8a46a;
  background: linear-gradient(#fffbee, #f8e8c9);
  box-shadow:
    inset 0 0 0 3px #fff8e8,
    0 2px 3px #79532e20;
  color: #8b633d;
}
.floor-button.selected {
  background: linear-gradient(#e796ab, #ba587e);
  color: #fff9ec;
  border-color: #a95477;
  box-shadow:
    inset 0 0 0 3px #f5b6c755,
    0 2px 4px #7b3b4d26;
}
.scene-zoom {
  left: 12px;
  bottom: 12px;
  background: #fff8e9;
  border: 1px solid #c9ab76;
  border-radius: 12px;
}
.scene-zoom .icon-button {
  color: #936a3d;
}
.primary {
  background: linear-gradient(#c56a8b, #a94770);
  border: 1px solid #a45070;
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 #ffd5e2,
    0 3px 0 #87364f22;
  color: #fff9ed;
}
.scene-action .primary {
  border: 2px solid #d9b171;
  box-shadow:
    inset 0 0 0 2px #f4adbd55,
    0 3px 8px #5c324127;
  padding: 13px 22px;
}
.daily-column {
  gap: 14px;
}
.daily-column .quote-card {
  display: none;
}
.daily-card {
  background: linear-gradient(#fffdf3, #fcf0db);
  border: 1px solid #d5b982;
  border-radius: 18px;
  padding: 20px;
  box-shadow:
    inset 0 0 0 4px #fff9ed,
    0 8px 24px #73502c10;
}
.daily-card h2 {
  font-size: 22px;
  line-height: 1.6;
  color: #765039;
}
.daily-card .card-label {
  color: #a48050;
  letter-spacing: 2px;
}
.daily-card p {
  font-size: 13px;
}
.progress-track {
  background: #ead5b5;
}
.progress-track i {
  background: #c2708d;
}
.day-strip {
  padding: 10px 5px;
  color: #936e43;
}
.time-controls {
  border: 1px solid #ddc18c;
  background: #fff7e5;
}
.time-controls button.active {
  background: #e9a8ba;
  color: #813d5b;
}
.rail {
  inset: auto 0 0;
  z-index: 20;
  width: 100%;
  height: 80px;
  display: flex;
  padding: 7px 18px 10px;
  background: linear-gradient(#fff9e9f5, #f6e4c4fa);
  border-top: 2px solid #cfab6f;
  box-shadow: 0 -3px 18px #704c2512;
  backdrop-filter: blur(12px);
}
.rail .brand,
.rail .rail-footer {
  display: none;
}
.rail nav {
  display: flex;
  flex-direction: row;
  margin: 0;
  gap: 12px;
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
}
.rail .nav-button {
  flex: 1;
  min-height: 58px;
  padding: 8px 15px;
  flex-direction: row;
  gap: 12px;
  border: 1px solid #d7b884;
  border-radius: 13px;
  background: linear-gradient(#fffef5, #f8e7c8);
  box-shadow:
    inset 0 0 0 3px #fff8eb,
    0 2px 2px #8e603b12;
  font:
    17px "Noto Serif TC",
    serif;
  color: #815339;
}
.rail .nav-button .icon {
  width: 29px;
  height: 29px;
  color: #b17a47;
}
.rail .nav-button.active {
  background: linear-gradient(#f4c0ca, #e79bb1);
  border-color: #c27993;
  color: #884260;
  box-shadow: inset 0 0 0 3px #ffe0e966;
}
.rail .nav-button.active .icon {
  color: #a64f72;
}
.panel {
  background: #fff9ed;
  border-color: #d5b789;
}
.panel-head {
  background: linear-gradient(#fffaf0, #f7e8d0);
  border-color: #e1cba5;
}
.shop-heading {
  margin: 18px 0 8px;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--muted, #8a6a58);
}
.item-card {
  border-color: #e4d0ac;
  background: #fffcf4;
}
.secondary {
  border-color: #d4b78b;
  color: #84583d;
}
@media (max-width: 1100px) and (min-width: 721px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 235px;
    padding-inline: 14px;
    gap: 12px;
  }
  .topbar {
    padding-inline: 16px;
    gap: 10px;
  }
  .status-item {
    padding: 7px 10px;
  }
  .daily-card {
    padding: 17px;
  }
  .rail .nav-button {
    font-size: 15px;
  }
  .scene-frame {
    min-height: 470px;
  }
}
@media (max-width: 720px) {
  .rail {
    display: none;
  }
  .app-shell {
    padding-bottom: 84px;
  }
  .topbar {
    height: auto;
    padding: 10px 12px;
    gap: 8px;
    min-height: 102px;
  }
  .page-identity {
    flex: 1;
  }
  .page-identity .eyebrow {
    font-size: 6px;
  }
  .page-identity > span:last-child {
    font-size: 19px;
    letter-spacing: 1px;
  }
  .account-button {
    font-size: 9px;
    padding-inline: 9px;
    min-height: 34px;
    order: 0;
  }
  .topbar > .icon-button {
    min-width: 33px;
    min-height: 34px;
    width: 33px;
    height: 34px;
    order: 1;
  }
  .status-bar {
    width: 100%;
    gap: 5px;
    order: 2;
  }
  .status-item {
    padding: 6px 7px;
    min-height: 39px;
    flex: 1;
    border-radius: 10px;
    gap: 4px;
    display: flex;
  }
  .status-item .icon {
    width: 16px;
    height: 16px;
  }
  .status-item small {
    font-size: 10px;
    margin: 0 3px 0 0;
  }
  .status-item b {
    font-size: 14px;
  }
  /* Coins, day and reputation stay in view while the page scrolls. */
  .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
  }
  .workspace {
    padding: 8px 7px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .scene-heading {
    min-height: 32px;
    padding: 0 5px 7px;
  }
  .scene-heading h1 {
    font-size: 16px;
  }
  .stamp {
    display: none;
  }
  .scene-frame {
    height: calc(100svh - 238px);
    min-height: 365px;
    max-height: 900px;
    border-radius: 18px;
  }
  .scene-frame:after {
    border-radius: 13px;
  }
  .scene-caption {
    top: 9px;
    font-size: 8px;
    padding: 7px 9px;
  }
  .floor-controls {
    right: 7px;
    gap: 5px;
  }
  .floor-button {
    width: 34px;
    height: 35px;
    min-height: 35px;
    font-size: 10px;
    border-radius: 9px;
  }
  .scene-zoom {
    left: 7px;
    bottom: 8px;
  }
  .scene-zoom .icon-button {
    width: 29px;
    min-width: 29px;
    min-height: 33px;
    height: 33px;
  }
  .scene-action {
    right: 7px;
    bottom: 8px;
  }
  .scene-action .primary {
    padding: 10px 13px;
    font-size: 11px;
    min-height: 36px;
  }
  .day-strip {
    padding: 9px 3px;
  }
  .day-strip .season-note {
    font-size: 9px;
  }
  .daily-column {
    gap: 10px;
  }
  .daily-card {
    padding: 17px;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    border-top: 2px solid #d1af78;
    background: linear-gradient(#fff9e9f5, #f6e5cafa);
    gap: 5px;
    padding: 6px 5px calc(7px + env(safe-area-inset-bottom));
  }
  .mobile-nav .nav-button {
    flex: 1;
    padding: 6px 0;
    font-size: 10px;
    gap: 4px;
    background: linear-gradient(#fffcf0, #f9e6c9);
    border: 1px solid #dec391;
    box-shadow: inset 0 0 0 2px #fff7e9;
    min-height: 54px;
    color: #8b603c;
  }
  .mobile-nav .nav-button.active {
    background: linear-gradient(#f3c0cb, #e49db1);
    border-color: #c9829c;
    box-shadow: inset 0 0 0 2px #ffdae5;
  }
  .mobile-nav .icon {
    color: #ac7447;
  }
  .mobile-nav .nav-button.active .icon {
    color: #a44e70;
  }
}

.panel-cash {
  margin-left: auto;
  margin-right: 10px;
  align-self: center;
  white-space: nowrap;
  padding: 5px 12px;
  border: 1px solid #d9bc85;
  border-radius: 999px;
  background: #fffdf5;
  color: #85533d;
  font-size: 13px;
}
.panel-cash b {
  font-size: 15px;
}
