@font-face {font-family:IRANYekan;src:url("/assets/fonts/IRANYekanX-Regular.woff2") format("woff2");font-weight:400;font-display:swap;}
@font-face {font-family:IRANYekan;src:url("/assets/fonts/IRANYekanX-Medium.woff2") format("woff2");font-weight:500;font-display:swap;}
@font-face {font-family:IRANYekan;src:url("/assets/fonts/IRANYekanX-DemiBold.woff2") format("woff2");font-weight:600;font-display:swap;}
@font-face {font-family:IRANYekan;src:url("/assets/fonts/IRANYekanX-Bold.woff2") format("woff2");font-weight:700;font-display:swap;}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #101512;
  color: #eeeae1;
  font-family: IRANYekan, sans-serif;
  font-size: 14px;
  line-height: 1.8;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #ddc18f;
  outline-offset: 4px;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
  border: 0;
  background: none;
}
svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  vertical-align: middle;
}
header {
  height: 91px;
  border-bottom: 1px solid #ffffff0d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 46px;
  gap: 30px;
}
header .brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.brand img {
  width: 43px;
  height: 49px;
}
.brand strong {
  font-size: 22px;
  font-weight: 700;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  color: #989b90;
}
.topnav {
  display: flex;
  gap: 34px;
  color: #a3a79f;
}
.topnav .active {
  color: #d7bd8d;
  position: relative;
}
.topnav .active:after {
  content: "";
  height: 2px;
  position: absolute;
  bottom: -30px;
  left: 0;
  right: 0;
  background: #c6a36b;
}
.header-tools {
  display: flex;
  gap: 15px;
  align-items: center;
  color: #b2b8ae;
}
.avatar {
  display: flex;
  align-items: center;
  gap: 10px;
  border-right: 1px solid #ffffff17;
  padding-right: 20px;
}
.avatar i {
  font-style: normal;
  border: 1px solid #b29b6e70;
  color: #ddc18f;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}
.page {
  max-width: 1530px;
  margin: 0 auto;
  padding: 30px 46px 50px;
}
.eyebrow {
  font-size: 11px;
  color: #c5a877;
  letter-spacing: 2px;
}
.hero {
  position: relative;
  isolation: isolate;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid #a79b7f38;
  border-radius: 5px;
  display: flex;
  align-items: center;
  background: #17211d;
}
.hero:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("/assets/house-cover.webp") center/cover;
}
.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      270deg,
      rgba(11, 19, 16, 0.96) 0%,
      rgba(11, 19, 16, 0.83) 29%,
      rgba(11, 19, 16, 0.1) 75%
    ),
    linear-gradient(0deg, rgba(8, 14, 11, 0.65), transparent 40%);
}
.hero-copy {
  padding: 50px 54px;
  max-width: 580px;
}
.pill {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: #d4ba8c;
  background: #bba0720d;
  border: 1px solid #bba07240;
  border-radius: 3px;
  padding: 4px 12px;
  font-size: 11px;
}
.dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d9b473;
  box-shadow: 0 0 13px #d9b473;
}
h1 {
  font-size: 49px;
  line-height: 1.65;
  margin: 21px 0 10px;
  letter-spacing: -1.5px;
  font-weight: 600;
}
h1 em {
  font-style: normal;
  color: #cfb586;
}
.hero p {
  color: #b0b5a9;
  max-width: 350px;
  line-height: 2.15;
  font-size: 13px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 27px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 45px;
  padding: 9px 23px;
  border: 1px solid #ffffff29;
  border-radius: 3px;
  font-size: 13px;
  background: #16201c;
}
.btn.gold {
  background: #c5aa79;
  color: #152019;
  border-color: #c5aa79;
  font-weight: 700;
}
.btn:hover {
  filter: brightness(1.14);
}
.btn.small {
  min-height: 36px;
  padding: 6px 13px;
  font-size: 12px;
}
.hero-stats {
  display: flex;
  gap: 23px;
  color: #acb3a6;
  font-size: 11px;
  margin-top: 24px;
}
.hero-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-stats svg {
  width: 15px;
  height: 15px;
}
.hero-mark {
  position: absolute;
  left: 34px;
  bottom: 28px;
  text-align: left;
  color: #d4c8b3;
  font-size: 11px;
  letter-spacing: 1px;
}
.hero-mark strong {
  display: block;
  font-size: 19px;
  font-weight: 400;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 36px 0 20px;
}
.section-head h2 {
  font-size: 22px;
  margin: 0 0 3px;
  font-weight: 500;
}
.section-head p {
  font-size: 12px;
  color: #8a9386;
  margin: 0;
}
.filters {
  display: flex;
  gap: 5px;
}
.chip {
  padding: 5px 15px;
  border-radius: 3px;
  color: #8f998e;
  font-size: 12px;
}
.chip.selected {
  color: #dec79b;
  background: #c9b48412;
  border: 1px solid #c9b48426;
}
.levels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 17px;
}
.level {
  padding: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #ffffff0e;
  background: #151c17;
  border-radius: 4px;
  transition:
    transform 0.2s,
    border-color 0.2s;
}
.level:hover {
  transform: translateY(-4px);
  border-color: #c5aa7970;
}
.cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1.42;
  background: radial-gradient(ellipse at 50% 50%, var(--color), #0c100f 85%);
  overflow: hidden;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  transition: transform 0.5s;
}
.level:hover .cover img {
  transform: scale(1.07);
}
.cover:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0b100dd9, transparent 65%);
}
.level-number {
  position: absolute;
  right: 13px;
  top: 10px;
  font-size: 10px;
  letter-spacing: 1px;
  color: #ece3d1;
  z-index: 1;
}
.level-tag {
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 9px;
  border: 1px solid #cbb37f66;
  background: #101712b3;
  color: #dfc793;
  padding: 1px 7px;
  border-radius: 2px;
  z-index: 1;
}
.cover-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0.7;
}
.cover-icon svg {
  width: 45px;
  height: 45px;
  color: #ded3ba;
}
.level-copy {
  padding: 13px 15px 15px;
}
.level-copy h3 {
  font-size: 16px;
  margin: 0 0 3px;
  font-weight: 500;
}
.level-copy p {
  font-size: 10px;
  color: #899487;
  margin: 0 0 15px;
}
.card-meta {
  border-top: 1px solid #ffffff0c;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #a6afa1;
  font-size: 10px;
}
.card-meta strong {
  font-size: 11px;
  font-weight: 500;
  color: #cbb383;
}
.card-meta svg {
  width: 13px;
  height: 13px;
  margin-left: 3px;
}
.story-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 28px 0;
  border-top: 1px solid #ffffff0d;
  margin-top: 35px;
}
.story-strip article {
  display: flex;
  gap: 14px;
}
.story-strip svg {
  width: 29px;
  height: 29px;
  color: #bda477;
  margin-top: 6px;
}
.story-strip h3 {
  font-size: 13px;
  font-weight: 400;
  margin: 0;
}
.story-strip p {
  color: #778473;
  font-size: 11px;
  margin: 3px 0;
}
.footer {
  font-size: 10px;
  color: #6f7d6c;
  border-top: 1px solid #ffffff0c;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.footer button {
  color: #a9b39f;
}
.modal-scrim {
  position: fixed;
  inset: 0;
  background: #050a08bc;
  backdrop-filter: blur(8px);
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
}
.modal {
  position: relative;
  background: #17201b;
  border: 1px solid #bba57a46;
  border-radius: 6px;
  padding: 32px;
  width: min(520px, 100%);
  max-height: 90vh;
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 30px 100px #0008;
}
.modal h2 {
  font-size: 25px;
  font-weight: 500;
  margin: 8px 0 12px;
}
.modal p {
  color: #a9b4a5;
  line-height: 2.1;
  font-size: 13px;
}
.close {
  position: absolute;
  left: 14px;
  top: 14px;
  color: #a4af9f;
  font-size: 24px;
  line-height: 1;
}
.modal input {
  width: 100%;
  background: #0c140f;
  color: #e1ddce;
  border: 1px solid #ffffff20;
  border-radius: 3px;
  padding: 10px 13px;
  margin: 7px 0 15px;
  min-height: 46px;
}
.modal input[name="code"][inputmode="numeric"] {
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: .15em;
}
@media (max-width: 600px) {
  .modal input { font-size: 16px; }
}
.modal label {
  font-size: 12px;
  color: #c4c8bb;
  display: block;
}
.modal .btn {
  width: 100%;
  margin-top: 8px;
}
.error {
  color: #e6a39a !important;
  min-height: 24px;
  margin: 8px 0;
}
.price {
  font-size: 26px;
  color: #d1b581;
  margin: 15px 0;
}
.muted {
  color: #8f9c89;
  font-size: 11px;
}
.code {
  font-size: 32px;
  letter-spacing: 6px;
  direction: ltr;
  text-align: center;
  color: #ddc18f;
  background: #0e1711;
  border: 1px dashed #b8a37765;
  padding: 13px;
  margin: 16px 0;
}
.recovery {
  overflow-wrap: anywhere;
  direction: ltr;
  font-family: IRANYekan, sans-serif;
  font-size: 11px;
  color: #8c9e88;
  user-select: all;
}
.modal ul {
  padding-right: 18px;
  color: #a6b49f;
  line-height: 2.4;
}
.separator {
  height: 1px;
  background: #ffffff12;
  margin: 20px 0;
}
#toast {
  position: fixed;
  bottom: max(25px, env(safe-area-inset-bottom));
  left: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
  background: #d7c395;
  color: #152219;
  border-radius: 3px;
  padding: 12px 24px;
  z-index: 40;
  transition: opacity 0.2s, transform 0.2s;
  width: max-content;
  max-width: min(90%, 34rem);
  font-size: 14px;
  line-height: 1.85;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.game {
  user-select: none;
  height: 100vh;
  height: 100dvh;
  position: relative;
  overflow: hidden;
  background: #111c17;
}
.game canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.game:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 170px #0009;
}
.game-top {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: max(20px, env(safe-area-inset-top)) 25px 30px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  background: linear-gradient(#06110ee8, transparent);
  z-index: 3;
}
.game-title small {
  color: #cab382;
  font-size: 10px;
}
.game-title h2 {
  font-size: 22px;
  font-weight: 400;
  margin: 0;
}
.game-title p {
  color: #a2ad9c;
  font-size: 11px;
  margin: 0;
}
.game-top .buttons {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.game-top .btn {
  pointer-events: auto;
  background: #102018b3;
  border-color: #adbc9d30;
  backdrop-filter: blur(8px);
}
.connection {
  font-size: 10px;
  color: #c9b786;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid #a3ad9630;
  border-radius: 3px;
  background: #112016b3;
}
.connection.online {
  color: #b8d4a6;
}
.game-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px max(25px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom)) max(25px, env(safe-area-inset-left));
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(transparent, #07130fed);
}
.objects {
  display: flex;
  gap: 8px;
  align-items: center;
}
.object {
  position: relative;
  background: #14251ecf;
  border: 1px solid #b8ba962e;
  border-radius: 3px;
  min-width: 69px;
  padding: 13px 12px;
  backdrop-filter: blur(8px);
}
.object svg {
  display: block;
  margin: auto auto 5px;
  width: 26px;
  height: 26px;
  color: #c5b080;
}
.object span {
  display: block;
  font-size: 10px;
  color: #bcc6b1;
}
.object.done {
  border-color: #b3c58a77;
}
.objective {
  font-size: 12px;
  max-width: 340px;
  color: #c6cfbf;
}
.objective small {
  color: #9ca890;
  font-size: 10px;
  display: block;
  margin-bottom: 5px;
}
.progress {
  display: flex;
  gap: 4px;
  margin-top: 11px;
}
.progress span {
  width: 48px;
  height: 2px;
  background: #798c6a40;
}
.progress .complete {
  background: #c3ac78;
}
.look-guide {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  color: #ddd7be9c;
  text-align: center;
  font-size: 11px;
}
.look-guide i {
  font-size: 28px;
  font-style: normal;
  display: block;
  line-height: 1;
}
.hotspot-label {
  position: absolute;
  top: 65%;
  left: 50%;
  transform: translateX(-50%);
  color: #eed8a6;
  font-size: 12px;
  pointer-events: none;
  text-shadow: 0 2px 10px #000;
}
.game-tip {
  position: absolute;
  top: 110px;
  left: 25px;
  width: 210px;
  background: #12211adc;
  border: 1px solid #a4b49130;
  border-radius: 3px;
  padding: 13px;
  font-size: 11px;
  color: #abbca0;
  z-index: 3;
}
.game-tip button {
  color: #d8c296;
  text-decoration: underline;
}
.inspect {
  position: fixed;
  right: 25px;
  top: 140px;
  bottom: 145px;
  width: 340px;
  background: #102017ee;
  border: 1px solid #bbaa7c50;
  backdrop-filter: blur(15px);
  z-index: 6;
  padding: 27px;
  overflow: auto;
  border-radius: 4px;
  box-shadow: 0 20px 80px #0005;
}
.inspect h2 {
  font-size: 22px;
  font-weight: 400;
  margin: 10px 0 15px;
}
.inspect p {
  font-size: 13px;
  color: #bdc9b4;
  line-height: 2.2;
}
.inspect input {
  width: 100%;
  padding: 10px;
  border: 1px solid #a4b58f44;
  background: #0b140f;
  color: #e4d7b9;
  text-align: center;
  font-size: 24px;
  letter-spacing: 4px;
  border-radius: 3px;
}
.inspect .btn {
  width: 100%;
  margin-top: 14px;
}
.paper {
  padding: 20px;
  background: #cfc3a1;
  color: #3b3f2e !important;
  border: 1px solid #fff2;
  box-shadow: inset 0 0 45px #73623f66;
  transform: rotate(-1deg);
}
.inventory {
  font-size: 11px;
  color: #cdb781;
  padding: 10px 0;
}
.note-demo {
  font-size: 10px;
  color: #85977f;
  position: absolute;
  left: 25px;
  bottom: 120px;
}
.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: #9eac96;
}
.empty-state h2 {
  color: #ddd6bf;
}
.level-detail-image {
  width: calc(100% + 64px);
  height: 175px;
  object-fit: cover;
  margin: -32px -32px 20px;
}
.banner {
  background: #b9a47810;
  border: 1px solid #b9a47835;
  padding: 12px 18px;
  font-size: 12px;
  color: #c1ae86;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (min-width: 1600px) {
  .hero {
    min-height: 560px;
  }
}
@media (max-width: 1100px) {
  header {
    padding: 0 24px;
    gap: 15px;
  }
  .page {
    padding: 24px;
  }
  .topnav {
    gap: 20px;
  }
  .levels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero-copy {
    padding: 40px;
  }
  .hero {
    min-height: 470px;
  }
  .avatar span {
    display: none;
  }
  .story-strip {
    gap: 20px;
  }
}
@media (max-width: 700px) {
  header {
    height: 75px;
    padding: 0 18px;
  }
  .brand strong {
    font-size: 18px;
  }
  .brand small {
    font-size: 9px;
  }
  .brand img {
    width: 35px;
  }
  .topnav {
    display: none;
  }
  .avatar {
    display: none;
  }
  .page {
    padding: 16px;
  }
  .hero {
    min-height: 590px;
    align-items: flex-end;
  }
  .hero:before {
    background-position: 34% center;
  }
  .hero:after {
    background: linear-gradient(
      0deg,
      #0b1310 0%,
      #0b1310df 35%,
      #0b13101a 100%
    );
  }
  .hero-copy {
    padding: 30px 24px;
    max-width: 100%;
  }
  h1 {
    font-size: 37px;
    line-height: 1.65;
    margin-top: 15px;
  }
  .hero p {
    font-size: 12px;
  }
  .hero-mark {
    top: 19px;
    left: 18px;
    bottom: auto;
    font-size: 9px;
  }
  .hero-mark strong {
    font-size: 14px;
  }
  .hero-stats {
    gap: 16px;
    font-size: 10px;
  }
  .actions {
    gap: 8px;
  }
  .actions .btn {
    padding: 9px 16px;
    font-size: 12px;
  }
  .section-head {
    align-items: flex-start;
    gap: 15px;
    flex-direction: column;
    margin-top: 28px;
  }
  .section-head h2 {
    font-size: 20px;
  }
  .levels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .level-copy {
    padding: 10px;
  }
  .level-copy h3 {
    font-size: 14px;
  }
  .level-copy p {
    font-size: 9px;
  }
  .level-tag {
    font-size: 8px;
  }
  .card-meta {
    font-size: 9px;
  }
  .card-meta strong {
    font-size: 10px;
  }
  .story-strip {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 25px 6px;
  }
  .footer {
    flex-direction: column;
  }
  .modal {
    padding: 26px;
  }
  .level-detail-image {
    width: calc(100% + 52px);
    margin: -26px -26px 20px;
  }
  .game-top {
    padding: 16px 12px;
  }
  .game-top .buttons {
    gap: 5px;
  }
  .game-top .btn {
    padding: 7px 10px;
  }
  .game-title h2 {
    font-size: 18px;
  }
  .game-title p {
    max-width: 160px;
  }
  .connection {
    position: absolute;
    left: 12px;
    top: 70px;
    padding: 5px 10px;
    font-size: 9px;
  }
  .game-bottom {
    padding: 20px 12px;
    gap: 12px;
    align-items: stretch;
    flex-direction: column;
  }
  .objective {
    font-size: 11px;
    max-width: 100%;
    text-shadow: 0 2px 5px #000;
  }
  .objective small {
    display: none;
  }
  .objects {
    justify-content: center;
  }
  .object {
    padding: 10px;
    flex: 1;
    min-width: 0;
  }
  .object svg {
    width: 21px;
    height: 21px;
  }
  .object span {
    font-size: 9px;
  }
  .inspect {
    inset: auto 12px 155px;
    width: auto;
    max-height: 55dvh;
    padding: 23px;
  }
  .inspect h2 {
    font-size: 20px;
    margin-bottom: 7px;
  }
  .inspect p {
    font-size: 12px;
  }
  .game-tip {
    top: 110px;
    left: 12px;
    width: 170px;
    font-size: 10px;
  }
  .note-demo {
    left: 12px;
    bottom: 185px;
  }
  .hotspot-label {
    top: 60%;
  }
  .progress span {
    width: 38px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 700px) {
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .hero-stats span {
    flex-direction: column;
    gap: 5px;
    justify-content: flex-start;
    text-align: center;
    font-size: 9px;
  }
  .actions .btn {
    padding: 9px 12px;
    white-space: nowrap;
  }
  .actions .btn svg {
    width: 16px;
    flex-shrink: 0;
  }
  .hero-copy {
    padding-right: 21px;
    padding-left: 21px;
  }
}
/* Brass mechanisms: usable with touch, keyboard and typed numeric answers. */
.mechanism {
  margin: 20px 0 16px;
  padding: 17px 12px;
  border: 1px solid #a58b5866;
  border-radius: 9px;
  background:
    radial-gradient(ellipse at 50% 0%, #78644730, transparent 70%),
    repeating-linear-gradient(0deg, #0a100d 0px, #0a100d 2px, #111a14 3px);
  box-shadow:
    inset 0 0 0 4px #0b100e,
    0 12px 30px #0004;
}
.mechanism-brand {
  text-align: center;
  color: #ab9873;
  font-size: 10px;
  margin-bottom: 12px;
}
.mechanism-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.dial {
  display: flex;
  flex-direction: column;
  width: 49px;
  border: 1px solid #8d79514f;
  border-radius: 5px;
  overflow: hidden;
  background: linear-gradient(
    #2a2c20,
    #1b241b 28%,
    #c5af79 49%,
    #313427 76%,
    #151c17
  );
  box-shadow: 0 4px 8px #0008;
}
.dial button {
  height: 35px;
  background: #0a120c80;
  font-size: 23px;
  color: #c1ac7c;
  line-height: 1;
}
.dial button:hover {
  background: #bba06e33;
}
.dial output {
  display: block;
  color: #e9d8ae;
  text-align: center;
  font-size: 30px;
  height: 43px;
  line-height: 43px;
  text-shadow: 0 2px 3px #000;
  background: linear-gradient(#141d14, #424738, #121d13);
  border-block: 1px solid #ceb98555;
}
.mechanism-unit {
  color: #c1aa76;
  text-align: center;
  font-size: 11px;
  margin-top: 12px;
}
.sequence-slot {
  width: 48px;
  height: 49px;
  border: 1px solid #93835d55;
  border-radius: 4px;
  text-align: center;
  line-height: 49px;
  color: #d6c18e;
  font-size: 25px;
  background: #0a120d;
  box-shadow: inset 0 3px 12px #000;
}
.sequence-slot.filled {
  border-color: #cfb47b99;
}
.sequence-keys {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 15px;
}
.sequence-key {
  flex: 1;
  font-size: 10px;
  padding: 9px 3px;
  border: 1px solid #9e895b77;
  background: linear-gradient(#394031, #20291f);
  border-radius: 5px;
  box-shadow: 0 3px 0 #080e0a;
}
.sequence-key span {
  display: block;
  font-size: 23px;
  color: #d7c393;
}
.sequence-key:active {
  transform: translateY(2px);
  box-shadow: none;
}
.mechanism-reset {
  display: block;
  margin: 12px auto 0;
  color: #a59c84;
  font-size: 11px;
}
.valve .mechanism-controls {
  width: 138px;
  height: 138px;
  margin: auto;
  border: 9px solid #7d6543;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 3px #c1a06966,
    0 7px 15px #0008;
  align-items: center;
  background: radial-gradient(circle, #171f19 40%, #50472e 41%, #111b14 50%);
}
.inspect input#answer {
  font-size: 19px;
  padding: 5px 10px;
  min-height: 40px;
}
.chat-panel {
  position: absolute;
  top: 110px;
  left: 24px;
  bottom: 145px;
  width: 340px;
  z-index: 8;
  border: 1px solid #b6a17655;
  border-radius: 5px;
  background: #101c17f5;
  backdrop-filter: blur(18px);
  padding: 25px 19px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 70px #0007;
}
.chat-panel h2 {
  font-weight: 500;
  font-size: 21px;
  margin: 8px 0 16px;
}
.chat-log {
  flex: 1;
  min-height: 80px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.chat-message {
  background: #27342a;
  border: 1px solid #ffffff0b;
  margin: 0 20px 10px 0;
  padding: 9px 12px;
  border-radius: 7px 0 7px 7px;
}
.chat-message.mine {
  background: #b39c6215;
  border-color: #b39c622b;
  margin: 0 0 10px 20px;
  border-radius: 0 7px 7px 7px;
}
.chat-message small {
  font-size: 9px;
  color: #aa9c7b;
}
.chat-message p {
  margin: 4px 0;
  font-size: 12px;
  line-height: 1.9;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.chat-empty {
  text-align: center;
  color: #96a58d;
  font-size: 12px;
  margin-top: 30px;
  line-height: 2;
}
.quick-messages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 0;
}
.quick-messages button {
  border: 1px solid #bda57544;
  padding: 5px 9px;
  border-radius: 16px;
  font-size: 10px;
  color: #c9b787;
  min-height: 32px;
}
#chat-form {
  display: flex;
  gap: 7px;
}
#chat-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid #b19a633d;
  border-radius: 4px;
  background: #0a130e;
  color: #e1dbc7;
  padding: 9px;
  font-size: 12px;
}
#chat-form .btn {
  min-height: 42px;
  padding: 8px 12px;
}
.chat-error {
  color: #dda69a;
  font-size: 10px;
  margin: 7px 0 0;
}
#chat-toggle {
  position: relative;
}
#chat-badge {
  position: absolute;
  right: -5px;
  top: -8px;
  border-radius: 20px;
  min-width: 19px;
  font-size: 10px;
  color: #142119;
  background: #d3b87f;
}
.game .inspect {
  width: 365px;
  top: 118px;
  bottom: 130px;
}
@media (max-width: 700px) {
  .chat-panel {
    left: 12px;
    right: 12px;
    width: auto;
    top: 116px;
    bottom: 177px;
    padding: 18px 16px 12px;
  }
  .chat-panel h2 {
    font-size: 18px;
    margin: 6px 0 10px;
  }
  .game .inspect {
    top: auto;
    bottom: 166px;
    width: auto;
    max-height: calc(100dvh - 285px);
    padding: 21px;
  }
  .mechanism {
    margin: 12px 0;
    padding: 13px 10px;
  }
  .game-top .btn {
    padding: 7px 8px;
  }
  .game-title h2 {
    font-size: 16px;
  }
}
/* First-person play: only utility controls live outside the 3D world. */
.game-tools {
  display: flex;
  gap: 8px;
  pointer-events: auto;
  flex-shrink: 0;
}
.game-tools .btn {
  gap: 7px;
  padding: 10px 14px;
  font-size: 12px;
  background: #12201bd9;
  backdrop-filter: blur(10px);
}
.game-bottom {
  align-items: flex-end;
  pointer-events: none;
  background: linear-gradient(transparent, #07100cbb);
  padding-top: 48px;
}
.game-bottom .objective {
  min-width: 0;
  max-width: 530px;
  font-size: 13px;
  line-height: 1.9;
  text-shadow: 0 2px 8px #000;
}
.game-bottom .objective small {
  font-size: 10px;
  opacity: 0.55;
}
.game .note-demo,
.game .look-guide {
  display: none;
}
.world-help {
  position: absolute;
  left: 50%;
  bottom: 112px;
  transform: translateX(-50%);
  font-size: 10px;
  color: #d8d5c5a0;
  pointer-events: none;
  text-align: center;
  max-width: 90%;
  white-space: nowrap;
  text-shadow: 0 1px 5px #000;
}
.world-tip {
  position: absolute;
  left: 50%;
  top: 57%;
  transform: translate(-50%, -50%);
  padding: 8px 16px;
  border: 1px solid #c9ae6b66;
  background: #101c17d9;
  color: #e5d7b3;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  border-radius: 4px;
  backdrop-filter: blur(8px);
}
.world-tip.visible {
  opacity: 1;
}
.manor-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #101915f2;
  z-index: 2;
  color: #dfcca5;
}
.manor-loading span {
  font-size: 27px;
}
.manor-loading small {
  color: #a9b2a3;
  font-size: 12px;
}
.manor-loading:after {
  content: "";
  width: 42px;
  height: 2px;
  background: #c3a56b;
  animation: load-manor 1s infinite alternate;
}
@keyframes load-manor {
  to {
    width: 130px;
    opacity: 0.3;
  }
}
.letter-inspect {
  background: linear-gradient(90deg, #3024140d, transparent 8%, transparent 92%, #30241418), url("/assets/materials/noori-paper-v257.png") center / cover, #d5c49d !important;
  border-radius: 2px 5px 3px 2px;
  color: #302f23 !important;
  box-shadow: 0 24px 100px #000b;
  border-color: #8d7c53 !important;
}
.letter-inspect h2,
.letter-inspect .paper,
.letter-inspect small,
.letter-inspect .eyebrow {
  color: #302f23 !important;
}
.letter-inspect .paper {
  background: transparent;
  border: 0;
  padding: 14px 0;
  line-height: 2.3;
}
.letter-inspect .close {
  color: #302f23;
}
@media (max-width: 700px) {
  .game-tools .btn {
    padding: 10px;
    min-height: 44px;
    min-width: 44px;
  }
  .game-tools .btn span {
    display: none;
  }
  .game-bottom {
    padding: 28px max(14px, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }
  .game-bottom .objective {
    font-size: 11px;
    max-width: none;
    min-width: 0;
  }
  .world-help {
    bottom: 112px;
    font-size: 9px;
    white-space: normal;
    width: 85%;
  }
  .game-top {
    padding: 16px 12px;
    background: linear-gradient(#07100cbb, transparent);
  }
  .game-top .connection {
    font-size: 9px;
  }
  .game-title h2 {
    font-size: 20px;
  }
  .game-title p {
    font-size: 10px;
  }
  .world-tip {
    font-size: 11px;
    max-width: 80%;
  }
  .letter-inspect {
    max-height: 65vh;
    overflow: auto;
  }
}
.world-tip {
  transform: none;
  top: 50%;
  left: 50%;
  white-space: nowrap;
  max-width: 240px;
}
/* Exploration HUD: object names stay contextual; collected objects live in the case. */
:lang(fa) {
  letter-spacing: normal;
}
:lang(fa) button,
:lang(fa) input,
:lang(fa) textarea,
:lang(fa) small,
:lang(fa) .eyebrow {
  font-family: IRANYekan, sans-serif;
  letter-spacing: normal;
}
.field-inventory {
  user-select: none;
  position: absolute;
  z-index: 8;
  right: 24px;
  top: 142px;
  width: 208px;
  border: 1px solid #c2b48b32;
  background: linear-gradient(145deg, #17231eed, #0c1511f2);
  box-shadow:
    0 12px 40px #0004,
    inset 0 0 0 4px #c2b48b06;
  border-radius: 12px;
  backdrop-filter: blur(18px);
  overflow: hidden;
}
.inventory-heading {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 14px;
  border-bottom: 1px solid #c2b48b20;
  font-size: 13px;
  text-align: right;
}
.inventory-heading span {
  flex: 1;
  color: #e2d8bd;
}
.inventory-heading b {
  font-size: 11px;
  color: #bbaa7c;
  font-weight: 400;
}
.inventory-heading i {
  font-style: normal;
  color: #88978c;
}
.inventory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 10px;
  max-height: 46vh;
  overflow: auto;
}
.inventory-slot {
  min-width: 0;
  min-height: 85px;
  border: 1px solid #afbb9e21;
  border-radius: 7px;
  background: linear-gradient(145deg, #ffffff05, #0002);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 9px 4px;
  gap: 5px;
  position: relative;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.2s;
}
.inventory-slot svg {
  width: 29px;
  height: 29px;
  stroke: #cbbb8e;
  stroke-width: 1.15;
}
.inventory-slot span {
  font-size: 10px;
  line-height: 1.6;
  color: #d8dace;
}
.inventory-slot small {
  font-size: 8px;
  color: #8b9c90;
}
.inventory-slot:hover:not(:disabled) {
  background: #b7a36e12;
  border-color: #c4b07877;
}
.inventory-slot.selected {
  border-color: #d2b76f;
  background: #bc9a3c15;
  box-shadow: inset 0 0 0 1px #d2b76f55;
}
.inventory-slot.selected::after {
  content: "•";
  position: absolute;
  top: 3px;
  left: 9px;
  color: #dfbf76;
}
.inventory-slot.used {
  opacity: 0.42;
  cursor: default;
}
.inventory-slot.empty {
  border-style: dashed;
  opacity: 0.25;
  min-height: 64px;
}
.inventory-slot.empty i {
  font-size: 18px;
  font-style: normal;
  color: #adbaac;
}
.inventory-foot {
  padding: 0 13px 13px;
  color: #a9b4a6;
  line-height: 1.8;
}
.inventory-foot p {
  font-size: 10px;
  margin: 2px 0 5px;
}
.inventory-foot strong {
  font-size: 11px;
  color: #d7c497;
  font-weight: 500;
}
.inventory-foot small {
  font-size: 9px;
  color: #829587;
}
.inventory-slot.collected {
  animation: item-arrival 0.7s ease-out;
}
@keyframes item-arrival {
  0% {
    transform: translateX(-18px) scale(0.9);
    background: #c5a55c77;
  }
  100% {
    transform: none;
  }
}
.world-tip {
  left: 26px !important;
  right: auto;
  top: auto !important;
  bottom: 116px;
  transform: translateY(5px);
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #c6b88928;
  border-radius: 8px;
  padding: 11px 14px;
  background: #102018ed;
  box-shadow: 0 8px 24px #0004;
  backdrop-filter: blur(14px);
  max-width: 340px;
  text-align: right;
  transition:
    opacity 0.18s,
    transform 0.18s;
}
.world-tip.visible {
  transform: translateY(0);
}
.world-tip strong {
  font-size: 12px;
  font-weight: 500;
  color: #e5ddc7;
}
.world-tip small {
  font-size: 10px;
  color: #98a993;
  border-right: 1px solid #c6b88929;
  padding-right: 13px;
}
.world-help {
  bottom: 101px;
  color: #a9b3a18c;
  font-size: 10px;
  max-width: 46%;
}
.game-bottom {
  padding-top: 35px;
}
.game-bottom .objective {
  max-width: 450px;
  color: #c5cdbb;
  font-size: 12px;
}
.game-bottom .objective small {
  display: none;
}
.game-tools .btn {
  border-radius: 7px;
}
.game-tools #hint.needs-hint {
  border-color: #bca46b88;
}
.evidence-sheet {
  right: 260px;
  left: auto;
  width: 440px;
  max-width: calc(100vw - 310px);
  top: 130px;
  bottom: auto;
  max-height: 65vh;
  overflow: auto;
  box-shadow: 0 24px 100px #0008;
}
.evidence-sheet .paper {
  white-space: pre-line;
  font-size: 17px;
  line-height: 2.25;
}
.evidence-sheet .eyebrow {
  letter-spacing: normal;
}
.audio-mix {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}
.audio-mix label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
}
.audio-mix input {
  accent-color: #c7b078;
  width: 58%;
  min-height: 24px;
}
@media (min-width: 1101px) {
  .field-inventory.expanded .inventory-grid,
  .field-inventory.expanded .inventory-foot {
    display: none;
  }
}
@media (max-width: 900px) {
  .field-inventory {
    width: 172px;
    right: 16px;
    top: 136px;
  }
  .inventory-grid {
    gap: 5px;
    padding: 8px;
  }
  .inventory-slot {
    min-height: 75px;
  }
  .evidence-sheet {
    right: 206px;
    max-width: calc(100vw - 230px);
  }
  .world-help {
    max-width: 55%;
  }
}
@media (max-width: 1100px) {
  .field-inventory {
    width: 62px;
    right: 12px;
    top: 126px;
    border-radius: 9px;
  }
  .inventory-heading {
    padding: 8px 6px;
    justify-content: center;
    gap: 5px;
  }
  .inventory-heading span {
    display: none;
  }
  .inventory-heading i {
    font-size: 12px;
  }
  .inventory-grid {
    grid-template-columns: 1fr;
    padding: 6px;
    gap: 6px;
    max-height: 45vh;
  }
  .inventory-slot {
    min-height: 44px;
    padding: 8px 3px;
  }
  .inventory-slot svg {
    width: 25px;
    height: 25px;
  }
  .inventory-slot span,
  .inventory-slot small,
  .inventory-foot,
  .inventory-slot.empty {
    display: none;
  }
  .field-inventory.expanded {
    width: 208px;
    box-shadow: 0 12px 70px #000b;
  }
  .field-inventory.expanded .inventory-heading span {
    display: block;
  }
  .field-inventory.expanded .inventory-grid {
    grid-template-columns: 1fr 1fr;
  }
  .field-inventory.expanded .inventory-slot {
    min-height: 80px;
  }
  .field-inventory.expanded .inventory-slot span,
  .field-inventory.expanded .inventory-slot small,
  .field-inventory.expanded .inventory-foot {
    display: block;
  }
}
@media (max-width: 700px) {
  .world-tip {
    left: 14px !important;
    bottom: 127px;
    max-width: calc(100vw - 96px);
    padding: 9px 11px;
    gap: 9px;
    flex-wrap: wrap;
  }
  .world-tip strong {
    font-size: 11px;
  }
  .world-tip small {
    font-size: 9px;
    padding-right: 9px;
  }
  .world-help {
    bottom: 105px;
    max-width: 88%;
    font-size: 9px;
  }
  .evidence-sheet {
    right: 12px;
    left: 12px;
    top: 120px;
    width: auto;
    max-width: none;
    max-height: 65vh;
    z-index: 15;
  }
  .evidence-sheet .paper {
    font-size: 15px;
  }
  .game-title h2 {
    font-size: 18px;
  }
  .game-bottom .objective {
    font-size: 10px;
  }
  .inventory-slot.collected {
    animation-duration: 0.5s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .inventory-slot.collected {
    animation: none;
  }
  .world-tip {
    transition: none;
  }
}

/* Explain collaboration prerequisites without revealing either private clue. */
.cooperation-note {position:absolute;left:24px;top:108px;z-index:6;width:300px;padding:15px 17px;background:#0c1916f2;border:1px solid #93815b66;border-radius:10px;box-shadow:0 10px 32px #0005;pointer-events:auto;}
.cooperation-note strong {color:#dfcca0;font-size:14px;font-weight:600;}
.cooperation-note p {margin:8px 0 12px;color:#c9cebf;font-size:13px;line-height:1.95;}
.game-bottom .objective {font-size:13px;line-height:1.9;}
@media(max-width:600px){.cooperation-note {top:112px;left:12px;width:calc(100% - 98px);padding:11px 12px;}.cooperation-note strong {font-size:12px;}.cooperation-note p {font-size:11px;line-height:1.9;margin:5px 0 8px;}.cooperation-note .btn {min-height:36px;font-size:11px;}.game-bottom .objective {font-size:11px;}}



/* Loading recovery survives closing ordinary object inspectors. */
.room-load-error {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(480px, calc(100vw - 40px));
  max-height: calc(100vh - 64px);
  max-height: calc(100dvh - 64px);
  overflow: auto;
  padding: clamp(20px, 4vw, 32px);
  background: #102017fa;
  border: 1px solid #bbaa7c70;
  border-radius: 8px;
  box-shadow: 0 20px 80px #0009;
  z-index: 5;
}
.room-load-error h2 { margin: 0 0 16px; font-size: 24px; }
.room-load-error p { margin: 0 0 20px; font-size: 16px; line-height: 2; color: #d0dac7; }
.room-load-error .btn { width: 100%; min-height: 48px; margin-top: 12px; white-space: normal; }

.chat-panel[hidden] {
  display: none;
}
.chat-content {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.chat-content .voice-host,
.chat-content .quick-messages,
#chat-form {
  flex-shrink: 0;
}
.chat-panel h2 {
  padding-inline-end: 42px;
}
.chat-panel .chat-error:empty {
  display: none;
}
@media (max-width: 700px), (max-height: 520px) {
  .chat-panel {
    top: calc(var(--chat-visible-top, 0px) + max(64px, env(safe-area-inset-top)));
    bottom: calc(var(--chat-visible-bottom, 0px) + max(12px, env(safe-area-inset-bottom)));
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    width: auto;
  }
  .chat-panel .close {
    width: 44px;
    height: 44px;
    top: 8px;
    left: 8px;
  }
  #chat-form input {
    font-size: 16px;
  }
}
@media (max-height: 520px) and (min-width: 701px) {
  .chat-panel {
    right: auto;
    width: min(430px, 48vw);
    top: calc(var(--chat-visible-top, 0px) + max(12px, env(safe-area-inset-top)));
  }
}

.game[data-keyboard-aim] .look-guide {
  display: grid;
  place-items: center;
  top: 50%;
  width: 2rem;
  height: 2rem;
  color: #fff2d9;
  text-shadow: 0 1px 5px #000, 0 1px 8px #000;
}
.keyboard-target {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  max-width: 13rem;
  width: max-content;
  padding: .3rem .65rem;
  border-radius: .4rem;
  background: #101811eb;
  font-size: .875rem;
}
.keyboard-target:empty {
  display: none;
}
