/* Daylight temple: immersive game first, compact optional chat. */
.daylight {
  background: #fff9ed;
  color: #645d50;
  overflow-x: hidden;
}
.daylight .topbar {
  height: 66px;
  padding: 0 27px;
  background: linear-gradient(100deg, #766990, #5c557c);
  border: 0;
  color: #fff;
  gap: 20px;
  box-shadow: 0 3px 16px #695d8033;
  position: relative;
  z-index: 20;
}
.iquiz-wordmark {
  font-size: 31px;
  font-weight: 850;
  letter-spacing: -1.5px;
  position: relative;
  color: #fff;
}
.iquiz-wordmark > span {
  position: absolute;
  right: -7px;
  top: -8px;
  color: #e8d5ff;
  font-size: 14px;
}
.daylight .brand {
  gap: 16px;
  flex-shrink: 0;
}
.daylight .brand-divider {
  height: 30px;
  width: 1px;
  background: #d9cfea33;
  margin: 0;
}
.temple-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 27px;
}
.daylight .temple-brand b {
  font-family: Georgia, "Segoe UI", serif;
  color: #ffe5ac;
  font-size: 24px;
  font-style: italic;
  font-weight: 500;
}
.daylight .topbar nav {
  gap: 8px;
  align-items: center;
  align-self: auto;
  margin: auto;
}
.daylight .top-link {
  border: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #f3edf9;
  white-space: nowrap;
  padding: 12px 16px;
  border-radius: 17px;
}
.daylight .top-link.active {
  color: #70562c;
  background: linear-gradient(#fff4b4, #ffe08f);
  border: 1px solid #ffedb8;
  box-shadow:
    0 3px 0 #4f485229,
    inset 0 1px 0 #fff;
}
.daylight .header-end {
  gap: 12px;
}
.daylight .beta {
  color: #ebe2f4;
  border-color: #e4d6f052;
  font-size: 7px;
}
.daylight .profile {
  color: white;
  font-size: 12px;
  gap: 9px;
}
.daylight .profile > span:first-child {
  background: #f2e9fb;
  color: #8a72a9;
  border: 2px solid #fff;
  font-size: 13px;
  width: 35px;
  height: 35px;
}
.daylight .rules-link {
  font-size: 10px;
  padding: 4px;
}
.daylight .profile > span:last-child {
  color: #eee4f5;
}
.temple-app {
  max-width: none;
  margin: 0;
  padding: 14px 21px 8px;
}
.daylight .intro {
  margin: 0 0 12px;
  gap: 20px;
  align-items: center;
}
.daylight .intro h1 {
  font-family: Georgia, "Segoe UI", serif;
  font-size: 22px;
  color: #7e795a;
  margin: 5px 0 0;
  font-weight: 500;
  letter-spacing: -0.5px;
}
.daylight .intro h1 > span {
  font-size: 19px;
}
.daylight .intro .eyebrow {
  font-size: 7px;
  color: #b2a685;
  letter-spacing: 1.3px;
}
.daylight .room-tabs {
  margin: 0;
  gap: 7px;
}
.daylight .room-tabs button {
  color: #a69372;
  background: #fffef8;
  border: 1px solid #eadfc8;
  font-size: 11px;
  padding: 10px 13px;
  box-shadow: 0 2px 4px #b5a27a06;
  border-radius: 10px;
}
.daylight .room-tabs .selected {
  color: #7d673c;
  background: #f6e9c0;
  border-color: #e1c78b;
}
.daylight .layout {
  display: block;
}
.daylight .world-panel {
  border-radius: 17px;
  border: 1px solid #d9caa6;
  box-shadow: 0 4px 18px #8c775417;
  background: #eff2d5;
}
.daylight .canvas-wrap {
  height: calc(100dvh - 205px);
  min-height: 480px;
  max-height: 920px;
  background: #e6edcb;
  isolation: isolate;
}
.daylight canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  cursor: grab;
  touch-action: none;
}
.daylight canvas:active {
  cursor: grabbing;
}
.daylight .world-top {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  z-index: 4;
  background: transparent;
  padding: 0;
  pointer-events: none;
}
.daylight .world-panel {
  position: relative;
}
.daylight .location {
  padding: 10px 13px;
  background: #fffff4e8;
  box-shadow: 0 3px 10px #6b77521a;
  border: 1px solid #c9d3b37d;
  border-radius: 12px;
  color: #7e8b64;
  backdrop-filter: blur(10px);
  font-size: 11px;
}
.daylight .location b {
  color: #6f805a;
}
.daylight .location-dot {
  background: #91b97c;
}
.daylight .online {
  color: #8da176;
  font-size: 10px;
  border-color: #c8d1b0;
}
.daylight .weather {
  color: #fff3cb;
  background: #6c8063c7;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 10px;
  backdrop-filter: blur(8px);
}
.daylight .world-bottom {
  position: relative;
  padding: 10px 14px;
  background: #fffdf2;
  color: #a99a78;
  min-height: 39px;
  gap: 8px;
  display: flex;
  align-items: center;
}
.daylight kbd {
  background: #f6f2e5;
  border-color: #e1d6bd;
  color: #b0a181;
}
.daylight .world-credit {
  font-size: 9px;
  color: #a99977;
  margin: auto;
}
.daylight #fortune-open-small {
  font-size: 10px;
  color: #a98846;
  white-space: nowrap;
  padding: 0;
}
.daylight .world-tip {
  bottom: 96px;
  background: #fffff0db;
  color: #9b9273;
  border: 1px solid #dfd3af;
  font-size: 9px;
  padding: 7px 12px;
  border-radius: 18px;
  box-shadow: 0 3px 8px #6b734c12;
  max-width: 85%;
  white-space: nowrap;
}
.scene-actions {
  position: absolute;
  left: 50%;
  bottom: 15px;
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  gap: 8px;
  padding: 8px;
  background: #fffbecde;
  border: 1px solid #eadbb4;
  border-radius: 19px;
  box-shadow: 0 8px 20px #485b3724;
  backdrop-filter: blur(10px);
}
.scene-actions button {
  min-width: 78px;
  padding: 9px 10px;
  border-radius: 12px;
  background: linear-gradient(#fffef7, #f3ebd8);
  border: 1px solid #dfd0aa;
  color: #a68a53;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 0 #cab9932c;
  transition:
    transform 0.18s,
    background 0.18s;
}
.scene-actions button:hover {
  transform: translateY(-3px);
  background: #fff0bd;
}
.scene-actions span {
  font-size: 24px;
  line-height: 1.2;
}
.scene-actions b {
  font-size: 10px;
  font-weight: 600;
}
.scene-actions button.acting {
  background: #ece6ff;
  border-color: #c5afd8;
  color: #8869aa;
}
.scene-spot {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -50%);
  border: 1px solid #ffe9a6;
  border-radius: 25px;
  background: linear-gradient(180deg, #d7af61f0, #ac7631f0);
  color: #fff9dd;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 650;
  box-shadow:
    0 0 0 2px #bd853d30,
    0 0 18px #fddd72a8,
    inset 0 1px 3px #fff3c4b3;
  white-space: nowrap;
  line-height: 1.4;
  text-shadow: 0 1px 1px #8c5e2d;
  transition: filter 0.2s;
}
.scene-spot:hover {
  filter: brightness(1.16);
}
.scene-spot span {
  color: #fff2a1;
  font-size: 16px;
}
.blessing-card {
  position: absolute;
  right: 24px;
  top: 60px;
  width: 182px;
  z-index: 3;
  padding: 15px 16px;
  text-align: center;
  border: 1px solid #e0c18b;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff9ddeb, #fff2d2ed);
  box-shadow: 0 4px 15px #7f784021;
  transform: rotate(2deg);
  pointer-events: none;
}
.blessing-card > span {
  display: block;
  color: #b07b3e;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
}
.blessing-card p {
  font-family: Georgia, "Segoe UI", serif;
  font-size: 15px;
  line-height: 1.5;
  color: #8c7150;
  margin: 10px 0;
}
.blessing-card small {
  font-size: 8px;
  color: #ba9d6a;
}
.camera-tools {
  position: absolute;
  right: 16px;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 8;
}
.camera-tools button {
  height: 33px;
  width: 33px;
  border-radius: 9px;
  border: 1px solid #d8cca9;
  color: #a3885f;
  background: #fffcf0e8;
  box-shadow: 0 3px 8px #677b5420;
  font-size: 20px;
}
.scene-loading {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #f7f4d8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #a49a6c;
  font-size: 13px;
}
.scene-loading > span {
  font-size: 46px;
}
.temple-footer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 0;
}
.daylight .temple-shortcuts {
  margin: 0;
  gap: 8px;
}
.daylight .temple-shortcuts button {
  font-size: 10px;
  color: #ae9871;
  border-color: #e7dbc0;
  background: #fffdf6;
  padding: 8px 11px;
  border-radius: 9px;
}
.daylight .temple-shortcuts button:first-child {
  background: #f2e8cf;
  color: #a18448;
}
.daylight .prototype-note {
  font-size: 8px;
  margin: 0 150px 0 0;
  color: #b9aa8a;
}
.daylight .connection {
  top: 60px;
  background: #fff4d6e8;
  border: 1px solid #ead4a1;
  color: #a2864a;
  z-index: 11;
}
.chat-toggle {
  position: fixed;
  right: 22px;
  bottom: 17px;
  z-index: 35;
  background: linear-gradient(110deg, #9481bb, #7660a3);
  color: white;
  border: 1px solid #bda5d8;
  border-radius: 20px;
  padding: 12px 18px;
  box-shadow: 0 5px 18px #6c588f3b;
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12px;
  font-weight: 650;
}
.chat-toggle > span {
  font-size: 19px;
}
.chat-toggle b {
  border-radius: 50%;
  background: #f8d783;
  color: #926d34;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 9px;
}
.daylight .chat-panel {
  position: fixed;
  right: 22px;
  bottom: 77px;
  width: 310px;
  height: 580px;
  max-height: calc(100dvh - 105px);
  min-height: 0;
  z-index: 30;
  border: 1px solid #d8cde6;
  border-radius: 17px;
  background: #fffcfa;
  box-shadow: 0 20px 70px #6f63843b;
}
.daylight .chat-header {
  padding: 16px;
  border-bottom: 1px solid #f0e8f1;
  flex-shrink: 0;
}
.daylight .chat-header h2 {
  color: #9c80ac;
  font-size: 13px;
}
.daylight .chat-header p {
  font-size: 9px;
  color: #baa8c0;
}
.daylight .chat-symbol {
  background: #f1e9f9;
  color: #a48bb8;
}
.daylight #chat-close {
  margin-left: auto;
  font-size: 24px;
  color: #b3a0c2;
  align-self: flex-start;
}
.daylight .people-line {
  background: #f8f4fb;
  border-color: #efe9f3;
  color: #b09bbd;
  font-size: 9px;
  flex-shrink: 0;
}
.daylight .people-avatars .mini-avatar {
  background: #e9e0f3;
  border-color: #f8f4fb;
  color: #b298c0;
}
.daylight .chat-banner {
  background: #faf5e9;
  border-color: #eee2c6;
  margin: 10px 12px 0;
  padding: 9px 12px;
  flex-shrink: 0;
}
.daylight .chat-banner p {
  font-size: 9px;
  color: #bb9e70;
}
.daylight .chat-banner > span {
  font-size: 23px;
}
.daylight .messages {
  min-height: 0;
  flex: 1;
  max-height: none;
  padding: 16px 13px;
}
.daylight .message-meta {
  color: #b29ac3;
  font-size: 10px;
}
.daylight .message-bubble {
  font-size: 11px;
  color: #a18aa9;
  background: #f8f2fb;
  border-color: #eee5f3;
}
.daylight .message.mine .message-bubble {
  background: #f0ebf9;
  border-color: #e1d8ee;
  color: #9a7bb0;
}
.daylight .message.emote .message-bubble {
  background: #fff7e6;
  border-color: #f3e6c7;
  color: #b89b66;
}
.daylight .composer {
  background: #faf6fc;
  border-color: #e9dfef;
}
.daylight .composer textarea {
  color: #a18ba9;
  font-size: 11px;
}
.daylight .composer button {
  background: #a38bc0;
}
.daylight .chat-suggestions,
.daylight #chat-form,
.daylight .chat-safety {
  flex-shrink: 0;
}
.daylight .chat-suggestions {
  padding: 0 13px 9px;
}
.daylight .chat-suggestions button {
  color: #b49a83;
  background: #fcf8ef;
  border-color: #eee3cd;
  font-size: 9px;
}
.daylight .chat-safety {
  font-size: 8px;
  margin: 2px 8px 12px;
}
.daylight .composer-foot {
  font-size: 7px;
}
.daylight .toast {
  bottom: 103px;
  border-radius: 14px;
  background: #fffdf2;
  border-color: #e4d4ae;
  color: #ad9367;
  box-shadow: 0 8px 35px #9e886a25;
  z-index: 60;
}
.avatar-choices {
  gap: 10px !important;
}
.daylight .avatar-choice {
  width: 80px;
  height: 105px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #e8ddc3;
  background: #fffbef;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 8px;
}
.daylight .avatar-choice.selected {
  outline: 2px solid #c6a96a;
  outline-offset: 2px;
  background: #faf1da;
}
.avatar-choice .visitor-preview {
  width: 100%;
  height: 84px;
  object-fit: contain;
}
.avatar-choice small {
  font-size: 8px !important;
  color: #aa9468 !important;
  margin: 0 !important;
  position: relative;
  z-index: 1;
}
.visitor-face {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
#welcome {
  max-width: 460px;
}
.daylight #welcome h2 {
  font-size: 27px;
}
.daylight .welcome-art {
  height: 50px;
  margin-bottom: 16px;
}
.daylight #welcome .welcome-art span:first-child {
  font-size: 40px;
}
.daylight #welcome .welcome-art span:last-child {
  font-size: 36px;
}
.daylight .fortune-dialog {
  z-index: 50;
}
.daylight dialog::backdrop {
  background: #7a715c55;
  backdrop-filter: blur(5px);
}
@media (min-width: 1800px) {
  .daylight .topbar {
    padding: 0 40px;
  }
  .temple-app {
    padding: 17px 30px 5px;
  }
  .daylight .canvas-wrap {
    max-height: 1100px;
  }
}
@media (max-width: 1200px) {
  .daylight .topbar {
    padding: 0 18px;
    gap: 15px;
  }
  .daylight .temple-brand b {
    font-size: 20px;
  }
  .daylight .top-link {
    font-size: 12px;
    padding: 11px 12px;
  }
  .daylight .iquiz-wordmark {
    font-size: 26px;
  }
  .daylight .rules-link,
  .daylight .beta {
    display: none;
  }
  .blessing-card {
    width: 160px;
    right: 18px;
    padding: 12px;
  }
  .blessing-card p {
    font-size: 13px;
  }
  .scene-actions button {
    min-width: 69px;
    padding: 8px;
  }
  .scene-spot {
    font-size: 11px;
    padding: 7px 11px;
  }
  .daylight .intro h1 {
    font-size: 20px;
  }
  .daylight .prototype-note {
    margin-right: 170px;
    font-size: 7px;
  }
  .daylight .room-tabs button {
    font-size: 10px;
    padding: 9px 11px;
  }
}
@media (max-width: 850px) {
  .daylight .topbar nav {
    display: flex !important;
    gap: 4px;
  }
  .daylight .topbar {
    height: 61px;
    gap: 10px;
  }
  .daylight .brand {
    gap: 10px;
  }
  .daylight .brand-divider,
  .daylight .temple-brand b {
    display: none;
  }
  .temple-brand {
    font-size: 25px;
  }
  .daylight .topbar nav .top-link {
    padding: 10px;
    font-size: 18px;
  }
  .daylight .topbar nav .top-link span {
    display: none;
  }
  .daylight .header-end {
    gap: 7px;
  }
  .daylight .profile {
    font-size: 9px;
    gap: 6px;
  }
  .daylight #profile-name {
    max-width: 76px;
  }
  .temple-app {
    padding: 11px 12px 3px;
  }
  .daylight .intro {
    flex-wrap: wrap;
    gap: 11px;
    margin-bottom: 11px;
  }
  .daylight .intro h1 {
    font-size: 21px;
  }
  .daylight .room-tabs {
    width: 100%;
    gap: 6px;
  }
  .daylight .room-tabs button {
    flex: 1;
    font-size: 10px;
    padding: 8px 7px;
  }
  .daylight .canvas-wrap {
    height: calc(100dvh - 220px);
    min-height: 430px;
    max-height: none;
  }
  .daylight .world-top {
    top: 10px;
    left: 10px;
    right: 10px;
  }
  .daylight .location {
    font-size: 9px;
    padding: 8px 10px;
    gap: 7px;
  }
  .daylight .location b {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .daylight .online {
    font-size: 8px;
    padding-left: 6px;
  }
  .daylight .weather {
    display: none;
  }
  .blessing-card {
    top: 58px;
    right: 10px;
    width: 126px;
    padding: 11px;
    opacity: 0.96;
  }
  .blessing-card > span {
    font-size: 7px;
  }
  .blessing-card p {
    font-size: 12px;
    margin: 8px 0;
  }
  .blessing-card small {
    display: none;
  }
  .scene-actions {
    bottom: 11px;
    padding: 6px;
    gap: 5px;
    border-radius: 14px;
    width: auto;
    max-width: 96%;
  }
  .scene-actions button {
    min-width: 54px;
    padding: 8px 7px;
    border-radius: 10px;
  }
  .scene-actions span {
    font-size: 21px;
  }
  .scene-actions b {
    font-size: 8px;
  }
  .scene-actions button:last-child {
    display: none;
  }
  .scene-spot {
    font-size: 10px;
    padding: 6px 9px;
    box-shadow:
      0 0 0 1px #bd853d30,
      0 0 10px #fddd7280;
  }
  .scene-spot span {
    font-size: 13px;
  }
  .daylight .world-tip {
    bottom: 95px;
    white-space: normal;
    line-height: 1.5;
    font-size: 8px;
    text-align: center;
    max-width: 70%;
    padding: 6px 10px;
  }
  .camera-tools {
    right: 10px;
    bottom: 100px;
    gap: 5px;
  }
  .camera-tools button {
    width: 29px;
    height: 29px;
    font-size: 18px;
  }
  .daylight .world-credit {
    display: none;
  }
  .daylight .world-bottom {
    font-size: 8px;
    padding: 9px 11px;
    min-height: 35px;
  }
  .daylight #fortune-open-small {
    font-size: 9px;
    margin-left: auto;
  }
  .daylight .temple-footer-tools {
    flex-wrap: wrap;
    padding-top: 9px;
    gap: 8px;
  }
  .daylight .prototype-note {
    margin: 0 130px 0 0;
    font-size: 7px;
  }
  .daylight .temple-shortcuts {
    gap: 6px;
  }
  .daylight .temple-shortcuts button {
    font-size: 9px;
    padding: 8px 9px;
  }
  .daylight .chat-panel {
    bottom: 72px;
    right: 12px;
    width: 310px;
    max-width: calc(100vw - 24px);
    height: 560px;
    max-height: calc(100dvh - 96px);
  }
  .chat-toggle {
    right: 12px;
    bottom: 14px;
    font-size: 11px;
    padding: 11px 14px;
  }
  .daylight .toast {
    bottom: 115px;
    max-width: 85%;
    font-size: 11px;
  }
}
@media (max-width: 420px) {
  .daylight .topbar {
    padding: 0 12px;
  }
  .daylight .iquiz-wordmark {
    font-size: 26px;
  }
  .temple-brand {
    display: none;
  }
  .daylight .profile > span:first-child {
    height: 31px;
    width: 31px;
  }
  .daylight .profile > span:last-child {
    display: none;
  }
  .daylight .topbar nav {
    margin: 0 auto;
  }
  .daylight .topbar nav .top-link {
    padding: 9px;
  }
  .daylight .intro h1 {
    font-size: 19px;
  }
  .daylight .intro .eyebrow {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .daylight .room-tabs button {
    font-size: 9px;
  }
  .scene-actions button {
    min-width: 49px;
    padding: 8px 5px;
  }
  .scene-actions b {
    font-size: 7px;
  }
  .scene-actions span {
    font-size: 20px;
  }
  .scene-actions {
    gap: 4px;
  }
  .blessing-card {
    width: 107px;
    right: 8px;
    top: 51px;
    padding: 9px;
  }
  .blessing-card p {
    font-size: 11px;
  }
  .blessing-card > span {
    font-size: 6px;
  }
  .daylight .location b {
    max-width: 95px;
  }
  .daylight .world-bottom > span:first-child {
    font-size: 7px;
  }
  .daylight kbd {
    display: none;
  }
  .daylight .or {
    display: none;
  }
  .daylight .canvas-wrap {
    min-height: 415px;
  }
  .daylight .avatar-choice {
    width: 76px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scene-actions button {
    transition: none;
  }
  .daylight canvas {
    scroll-behavior: auto;
  }
}

/* Chat remains visible; the two locations share one persistent dock. */
@media (min-width: 851px) {
  .temple-app {
    padding-right: 343px;
  }
  .daylight .chat-panel {
    top: 82px;
    bottom: 16px;
    right: 18px;
    height: auto;
    max-height: none;
    width: 306px;
  }
  .daylight .intro {
    gap: 10px;
    flex-wrap: wrap;
  }
  .daylight .intro h1 {
    font-size: 20px;
  }
  .daylight .room-tabs {
    width: auto;
  }
  .daylight .world-credit {
    font-size: 8px;
  }
  .daylight .world-bottom {
    flex-wrap: wrap;
    gap: 5px;
  }
  .daylight .prototype-note {
    margin: 0;
    font-size: 7px;
  }
  .daylight .scene-actions {
    gap: 5px;
    padding: 6px;
  }
  .daylight .scene-actions button {
    min-width: 65px;
    padding: 8px;
  }
  .daylight .blessing-card {
    width: 145px;
    right: 16px;
    padding: 12px;
  }
  .daylight .blessing-card p {
    font-size: 12px;
  }
  .daylight .intro .eyebrow {
    font-size: 6px;
  }
}
.daylight #chat-close,
.daylight #chat-toggle {
  display: none !important;
}
.daylight .chat-panel[hidden] {
  display: flex !important;
}
.daylight .avatar-choices {
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px !important;
}
.daylight .avatar-choice {
  width: 66px;
  height: 100px;
}
.daylight .visitor-preview {
  height: 78px;
}
.daylight #welcome {
  max-width: 490px;
}
.daylight .spot-gate {
  background: linear-gradient(#9cae8c, #6c8763);
  border-color: #dbe9c8;
  box-shadow: 0 0 12px #e0edb566;
  color: #f7ffe9;
  font-size: 11px;
}
.daylight .camera-tools {
  bottom: 100px;
}
.daylight .camera-tools button:nth-child(2) {
  margin-bottom: 5px;
}
.daylight .world-tip {
  max-width: 60%;
}
@media (max-width: 850px) {
  .daylight .chat-panel {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: none;
    height: 510px;
    max-height: none;
    margin-top: 13px;
    z-index: 1;
  }
  .daylight .temple-footer-tools {
    margin-bottom: 5px;
  }
  .daylight .prototype-note {
    margin: 0;
  }
  .daylight .room-tabs button {
    flex: 1;
  }
  .daylight .camera-tools {
    bottom: 102px;
    gap: 4px;
  }
  .daylight .camera-tools button {
    width: 27px;
    height: 27px;
    font-size: 17px;
  }
  .daylight .blessing-card {
    display: none;
  }
  .daylight .world-tip {
    max-width: 65%;
    font-size: 7px;
  }
  .daylight .spot-gate {
    font-size: 9px;
  }
}

/* iQuiz brand and brighter welcome palette, supplied by the user. */
.daylight .topbar {
  background: #1e3a8a;
  box-shadow: 0 3px 12px #1e3a8a24;
}
.iquiz-official-logo {
  display: flex;
  align-items: center;
  gap: 4px;
}
.iquiz-official-logo img:first-child {
  width: 36px;
  height: 35px;
  object-fit: contain;
}
.iquiz-official-logo img:last-child {
  width: 100px;
  height: 55px;
  object-fit: contain;
}
.daylight .brand {
  gap: 12px;
}
.daylight .temple-brand b {
  color: #ffe4a3;
}
.daylight .topbar .sound-toggle {
  padding: 7px;
  font-size: 16px;
  color: #fff;
  min-width: 31px;
}
.daylight #welcome {
  background: #fff9ec;
  border: 1px solid #ead5aa;
  box-shadow: 0 25px 110px #4f3d2742;
  max-height: 92dvh;
  overflow-y: auto;
}
.daylight #welcome h2 {
  color: #634c3c;
  font-size: 29px;
  line-height: 1.32;
  font-weight: 500;
}
.daylight #welcome p {
  color: #88715a;
  font-size: 12px;
}
.daylight #welcome .eyebrow {
  color: #64866a;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.2px;
}
.daylight #welcome label {
  color: #64866a;
  font-size: 11px;
  font-weight: 600;
}
.daylight #welcome .avatar-choice {
  background: #fffef9;
  border: 1px solid #e4d7bf;
  outline: none;
  box-shadow: 0 3px 8px #bc9c5e0a;
}
.daylight #welcome .avatar-choice.selected {
  border: 2px solid #e5b85c;
  background: #fff3d4;
  box-shadow: 0 0 0 3px #e5b85c22;
}
.daylight #welcome .avatar-choice.selected:after {
  content: "✓";
  position: absolute;
  right: 4px;
  top: 4px;
  background: #64866a;
  color: white;
  font-size: 9px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.daylight #welcome .avatar-choice small {
  color: #7e654a !important;
  font-size: 8px !important;
}
.daylight #nickname {
  background: #ffffff;
  color: #634c3c;
  border: 1px solid #deccb0;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: 0 2px 4px #d8c8a408;
}
.daylight #nickname:focus {
  outline: 2px solid #9fbea3;
  outline-offset: 1px;
  border-color: #64866a;
}
.daylight .join-button {
  background: #a64f32;
  color: #ffffff;
  border: 1px solid #96442c;
  font-size: 13px;
  font-weight: 650;
  min-height: 48px;
  box-shadow: 0 5px 14px #a64f3226;
  border-radius: 11px;
}
.daylight .join-button:hover {
  background: #94432a;
  filter: none;
  transform: translateY(-1px);
}
.daylight #welcome > form > small {
  color: #9a876e;
  font-size: 9px;
  line-height: 1.8;
}
.daylight #welcome .welcome-art {
  background: radial-gradient(ellipse, #f4e3b8 0%, #fdf7e800 70%);
  margin-bottom: 18px;
  height: 60px;
}
.daylight #welcome .welcome-art span:nth-child(2) {
  color: #e5b85c;
}
.daylight .chat-header h2 {
  color: #1e3a8a;
}
.daylight .composer button {
  background: #1e3a8a;
}
.daylight .chat-symbol {
  background: #eaf0fd;
  color: #5474b4;
}
.daylight .chat-panel {
  border-color: #dbe3f3;
}
@media (max-width: 1200px) {
  .iquiz-official-logo img:first-child {
    width: 31px;
    height: 30px;
  }
  .iquiz-official-logo img:last-child {
    width: 88px;
    height: 50px;
  }
  .daylight .brand {
    gap: 9px;
  }
  .daylight .temple-brand b {
    font-size: 18px;
  }
  .daylight .top-link {
    padding: 10px 10px;
    font-size: 11px;
  }
  .daylight .header-end {
    gap: 8px;
  }
}
@media (max-width: 850px) {
  .iquiz-official-logo img:first-child {
    width: 25px;
    height: 25px;
  }
  .iquiz-official-logo img:last-child {
    width: 73px;
    height: 43px;
  }
  .daylight .temple-brand {
    display: none;
  }
  .daylight .topbar {
    padding: 0 12px;
    gap: 9px;
  }
  .daylight .topbar .sound-toggle {
    font-size: 15px;
    padding: 5px;
    min-width: 25px;
  }
  .daylight #profile-name {
    display: none;
  }
  .daylight .profile > span:last-child {
    display: none;
  }
  .daylight .topbar nav .top-link {
    padding: 9px;
  }
  .daylight .profile > span:first-child {
    width: 29px;
    height: 29px;
  }
  .daylight #welcome h2 {
    font-size: 27px;
  }
}
@media (max-width: 420px) {
  .iquiz-official-logo img:first-child {
    width: 21px;
    height: 22px;
  }
  .iquiz-official-logo img:last-child {
    width: 64px;
    height: 40px;
  }
  .daylight .topbar {
    gap: 6px;
  }
  .daylight .topbar nav {
    gap: 2px;
  }
  .daylight .topbar nav .top-link {
    padding: 8px;
    font-size: 16px;
  }
  .daylight .header-end {
    gap: 4px;
  }
  .daylight #welcome {
    padding: 28px 22px;
  }
  .daylight #welcome .avatar-choice {
    width: 66px;
  }
  .daylight #welcome p {
    font-size: 11px;
  }
}

/* A responsive ad above the persistent chat; it never overlays the game. */
.daylight .chat-dock {
  position: fixed;
  top: 82px;
  right: 18px;
  bottom: 16px;
  width: 306px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  z-index: 25;
}
.daylight .chat-dock .chat-panel {
  position: relative;
  inset: auto;
  flex: 1;
  width: 100%;
  height: auto;
  min-height: 320px;
  max-height: none;
  margin: 0;
  box-shadow: 0 10px 32px #706b7e15;
}
.chat-ad {
  position: relative;
  flex-shrink: 0;
  min-height: 118px;
  max-height: 185px;
  background: #fffdf6;
  border: 1px solid #e7dec9;
  border-radius: 12px;
  overflow: hidden;
  padding: 22px 0 0;
}
.chat-ad-label {
  position: absolute;
  top: 7px;
  left: 10px;
  font-size: 7px;
  letter-spacing: 1.3px;
  color: #b8ad96;
}
.chat-ad .adsbygoogle {
  display: block;
  min-width: 250px;
  min-height: 96px;
}
.chat-ad.ad-preview {
  height: 135px;
  max-height: 135px;
}
.ad-preview .adsbygoogle {
  display: none;
}
.chat-ad #ad-preview-note {
  margin: 19px 12px 0;
  text-align: center;
  font-size: 11px;
  color: #b9aa8d;
  line-height: 1.7;
}
.chat-ad #ad-preview-note small {
  font-size: 8px;
  color: #c1b59f;
}
.chat-ad .adsbygoogle[data-ad-status="unfilled"] {
  display: none;
}
@media (max-width: 850px) {
  .daylight .chat-dock {
    position: relative;
    inset: auto;
    width: 100%;
    bottom: auto;
    gap: 10px;
    margin-top: 12px;
    z-index: 1;
  }
  .daylight .chat-dock .chat-panel {
    height: 510px;
    min-height: 510px;
    flex: none;
  }
  .chat-ad {
    width: 100%;
    min-height: 115px;
  }
  .chat-ad.ad-preview {
    height: 125px;
    max-height: 125px;
  }
  .chat-ad .adsbygoogle {
    min-height: 100px;
  }
}
@media (min-width: 851px) and (max-height: 740px) {
  .daylight .chat-dock {
    gap: 8px;
    top: 76px;
    bottom: 10px;
  }
  .chat-ad,
  .chat-ad.ad-preview {
    height: 105px;
    min-height: 105px;
    max-height: 105px;
  }
  .chat-ad .adsbygoogle {
    min-height: 80px;
  }
  .daylight .chat-dock .chat-panel {
    min-height: 0;
  }
  .daylight .chat-banner {
    display: none;
  }
}

/* Chat styled as a clean community feed with colorful character portraits. */
.daylight .chat-dock .chat-panel {
  background: #fffdfd;
  border-color: #e7dfeb;
}
.daylight .chat-header {
  background: #faf7fc;
  border-color: #ebe5ef;
  padding: 14px;
}
.daylight .chat-header h2 {
  font-size: 13px;
  color: #38315e;
}
.daylight .chat-header p {
  font-size: 9px;
  color: #aaa0ba;
}
.daylight .chat-symbol {
  background: #ede5ff;
  color: #8962d7;
}
.daylight .people-line {
  background: #f9f6fb;
  color: #91849d;
}
.daylight .messages {
  padding: 8px 12px;
  scrollbar-color: #ded4e7 transparent;
}
.daylight .message {
  padding: 14px 0;
  margin: 0;
  border-bottom: 1px solid #eee7ef;
  gap: 9px;
}
.daylight .message-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #c6dce7;
  background: #f4f0fa;
  overflow: hidden;
  box-shadow: 0 1px 4px #47315f10;
}
.daylight .message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.daylight .message-avatar[data-visitor="aodai"] {
  border-color: #efb5cf;
  background: #fceaf1;
}
.daylight .message-avatar[data-visitor="aodai-white"] {
  border-color: #e9ce87;
  background: #fff4d5;
}
.daylight .message-avatar[data-visitor="nam"] {
  border-color: #cfbd91;
  background: #fbefd9;
}
.daylight .message-avatar[data-visitor="viet-boy"] {
  border-color: #a1cda2;
  background: #eff9eb;
}
.daylight .message-meta {
  gap: 5px;
  margin: 0 0 4px;
  color: #38315e;
  font-size: 11px;
  flex-wrap: wrap;
}
.daylight .message-meta strong {
  font-weight: 750;
  max-width: 143px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.daylight .message-meta time {
  margin-left: auto;
  font-size: 8px;
  color: #a39caf;
}
.daylight .message-meta button {
  margin-left: 0;
  color: #b7a9c3;
  font-size: 10px;
  opacity: 0;
}
.daylight .message:hover .message-meta button,
.daylight .message:focus-within .message-meta button {
  opacity: 1;
}
.daylight .chat-name-badge {
  font-size: 12px;
}
.daylight .message .message-bubble,
.daylight .message.mine .message-bubble,
.daylight .message.emote .message-bubble {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 12px;
  line-height: 1.65;
  color: #4f4563;
  border-radius: 0;
}
.daylight .message.mine .message-meta strong {
  color: #7252b0;
}
.daylight .message.emote .message-bubble {
  color: #846b43;
}
.daylight .composer {
  border-radius: 16px;
  background: #fff;
  border-color: #ded3e6;
  padding: 6px;
}
.daylight .composer textarea {
  font-size: 11px;
  color: #4f4264;
  padding: 7px 5px;
}
.daylight .composer button {
  height: 32px;
  width: 32px;
  border-radius: 50%;
  background: linear-gradient(#a080f0, #8254dc);
  color: #fff;
  font-size: 17px;
}
.daylight .chat-banner {
  background: #fff7eb;
  border-color: #f0e2ce;
  padding: 10px 12px;
  margin: 10px 12px 0;
  border-radius: 10px;
}
.daylight .chat-banner p {
  font-size: 10px;
  color: #9b815c;
}
.daylight .chat-safety {
  font-size: 7px;
}
.daylight .mini-avatar {
  overflow: hidden;
}
.daylight .mini-avatar img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.daylight #profile-initial {
  overflow: hidden;
}
.daylight #profile-initial img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.daylight .prototype-note {
  color: #b4a38a;
  font-size: 8px;
}
.daylight .beta {
  display: none;
}

/* A concealed card builds anticipation before its result is revealed. */
.fortune-dialog { position: relative; }
.fortune-suspense { position: absolute; inset: 0; z-index: 5; border-radius: inherit; background: radial-gradient(ellipse at center, #fff1bf, #fff9ec 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; padding: 24px; text-align: center; }
.fortune-suspense h3 { color: #634c3c; font-size: 23px; margin: 28px 0 8px; }
.fortune-suspense p { color: #86664c; font-size: 13px; }
.mystery-card { width: 146px; height: 228px; flex-shrink: 0; border: 3px solid #e5b85c; outline: 1px solid #b97e31; outline-offset: 5px; border-radius: 14px; background: repeating-linear-gradient(45deg, #a64f32, #a64f32 10px, #99472f 10px, #99472f 11px); color: #ffe8a1; box-shadow: 0 20px 55px #a16b3340; display: flex; flex-direction: column; justify-content: center; gap: 18px; transform: translateY(50px) scale(.5) rotate(-15deg); opacity: 0; transition: transform .85s cubic-bezier(.2,.8,.2,1), opacity .6s; }
.mystery-card span { font-size: 28px; }
.mystery-card b { font: bold 28px Georgia, serif; letter-spacing: 5px; }
.mystery-card small { font-size: 9px; letter-spacing: 2px; }
.card-arrived .mystery-card { opacity: 1; transform: translateY(0) scale(1) rotate(-4deg); }
.card-turning .mystery-card { transform: perspective(700px) rotateY(90deg) scale(1.1); transition-duration: .65s; }
.draw-sparkles { color: #bc8430; font-size: 32px; letter-spacing: 20px; margin-bottom: 26px; animation: draw-glimmer .7s ease-in-out infinite alternate; }
.fortune-mischief { background: linear-gradient(145deg, #fff3ec, #f7ebff) !important; border-color: #b58ac8 !important; }
.fortune-mischief .fortune-grade { background: #744997; color: #fff3d9; }
@keyframes draw-glimmer { to { opacity: .35; transform: scale(.85); } }
@media (prefers-reduced-motion: reduce) { .draw-sparkles { animation: none; } .mystery-card, .card-turning .mystery-card { transition: none; } }

/* Wine red, lotus gold and warm ivory, matching the temple reference. */
.daylight { background: radial-gradient(ellipse at 15% 95%, #ffe4bd70, transparent 48%), linear-gradient(120deg, #fff9ee, #fff5e9 65%, #ffeddc); color: #63452f; }
.daylight .topbar { background: radial-gradient(ellipse at 32% 120%, #dc652752, transparent 45%), linear-gradient(110deg, #780d26, #a1202b 44%, #623049); border-bottom: 1px solid #e4a34d; box-shadow: 0 3px 16px #7a21272b; }
.daylight .temple-brand b { color: #ffeaa0; text-shadow: 0 2px 10px #ffb94c70; }
.daylight .brand-divider { background: #ffd39555; }
.daylight .top-link { color: #fff8eb; }
.daylight .top-link:hover { background: #ffffff15; }
.daylight .top-link.active { background: linear-gradient(#fff3a9, #ffd24f); color: #71330d; border-color: #fff0ac; box-shadow: inset 0 2px 2px #fff8d8, 0 3px 9px #55132940; }
.daylight .intro .eyebrow { color: #b36336; }
.daylight .intro h1 { color: #a72f20; }
.daylight .room-tabs button { background: #fffaf3; border-color: #e7c6a1; color: #795138; }
.daylight .room-tabs button.selected { background: linear-gradient(#f7c75d, #d99223); color: #fff; border-color: #f9d78e; box-shadow: inset 0 0 0 2px #fff1b9, 0 2px 7px #a56c2933; }
.daylight .world-panel { border-color: #edd3b5; box-shadow: 0 4px 18px #a56b2420; }
.daylight .world-bottom { background: linear-gradient(100deg, #fff8e9, #fff0d8); border-top: 1px solid #ead3ae; color: #82552f; }
.daylight .world-credit { color: #875634; }
.daylight #fortune-open-small { color: #a45b13; }
.daylight .temple-footer-tools { color: #8d613b; }
.daylight .temple-shortcuts button { background: #fff6e7; border-color: #ead1b0; color: #85502d; }
.daylight .chat-dock .chat-panel { border-color: #eed3bd; box-shadow: 0 3px 12px #ac673018; background: #fffdfb; }
.daylight .chat-header { background: linear-gradient(110deg, #f5e8ff, #fcf4ff); border-color: #ead9f2; }
.daylight .chat-header h2 { color: #79289b; }
.daylight .chat-header p { color: #88609a; }
.daylight .blessing-card { background: linear-gradient(#fff8df, #ffefc9); border-color: #f4da94; }
.daylight .blessing-card > span { color: #a53720; }

/* Stronger contrast for fortune and prayer dialogs. */
.daylight .fortune-dialog, .daylight .prayer-dialog { background: #fff9ec; border: 1px solid #c99142; color: #63402c; box-shadow: 0 20px 80px #3e160b55; }
.daylight .fortune-dialog h2, .daylight .prayer-dialog h2, .daylight .fortune-result-card h3 { color: #922f24; font-weight: 700; }
.daylight .fortune-dialog .temple-eyebrow, .daylight .prayer-dialog .temple-eyebrow { color: #936020; font-weight: 700; }
.daylight .fortune-dialog p, .daylight .prayer-dialog p { color: #704b32; }
.daylight .fortune-result-card { background: linear-gradient(145deg, #fff9e8, #f7e6be); border: 1px solid #bf842e; }
.daylight .fortune-result-card .card-number { color: #86551c; }
.daylight .fortune-result-card .fortune-grade { color: #fff9e6; background: #925c1e; border-color: #925c1e; font-weight: 700; }
.daylight .fortune-result-card .fortune-verse { color: #79471f; }
.daylight .fortune-result-card .fortune-exam { color: #795333; }
.daylight .fortune-result-card .fortune-score-label { color: #87571f; font-weight: 700; }
.daylight .fortune-result-card .fortune-score { color: #9b3524; }
.daylight .fortune-score small { color: #81562b; }
.daylight .fortune-result-card .score-note { color: #785638; }
.daylight .fortune-reading { border-color: #cda96f; }
.daylight .fortune-reading strong { color: #8e3a25; }
.daylight .fortune-reading p { color: #60412f; }
.daylight .fortune-result-footer { color: #775638; }
.daylight .fortune-seal { color: #a13b27; border-color: #a13b27; }
.daylight .fortune-dialog .fortune-disclaimer { color: #775638; }
.daylight .fortune-result-actions button { background: #fffaf0; color: #8d3b27; border: 1px solid #b98043; font-weight: 600; }
.daylight .fortune-result-actions button:first-child, .daylight .fortune-dialog .draw-trigger, .daylight .prayer-dialog .draw-trigger { background: linear-gradient(110deg, #b45b32, #963d27); border: 1px solid #923820; color: #fff; font-weight: 700; box-shadow: 0 4px 12px #a64f3226; }
.daylight .fortune-result-actions button:hover, .daylight .prayer-dialog .draw-trigger:hover, .daylight .fortune-dialog .draw-trigger:hover { filter: brightness(1.08); }
.daylight .fortune-dialog form label, .daylight .prayer-dialog label { color: #70462d; font-weight: 600; }
.daylight .fortune-dialog input, .daylight .fortune-dialog select, .daylight .prayer-dialog textarea { background: #fffefa; border-color: #bf945d; color: #543b2d; }
.daylight .prayer-dialog textarea::placeholder, .daylight .fortune-dialog input::placeholder { color: #806d5d; opacity: 1; }
.daylight .prayer-dialog small { color: #775638; }
.daylight .fortune-dialog .dialog-close, .daylight .prayer-dialog .dialog-close { color: #895735; }
.daylight .fortune-mischief .fortune-grade { background: #744997; border-color: #744997; color: #fff; }

.daylight .temple-lotus { width: 42px; height: 40px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 0 5px #ffb49a66); }
@media(max-width:850px){ .daylight .temple-lotus { width: 29px; height: 29px; } }

.fortune-maxim { margin: 22px 0; padding: 15px 18px; border-left: 3px solid #b8792d; border-radius: 0 10px 10px 0; background: #fffaf0c9; text-align: left; }
.fortune-maxim strong { color: #936020; font-size: 10px; letter-spacing: .7px; }
.daylight .fortune-maxim p { color: #853920; font: italic 17px/1.65 Georgia, serif; margin: 8px 0 0; }
.fortune-suspense .suspense-tube { position: absolute; top: 22%; left: 50%; margin-left: -70px; transition: opacity .4s, scale .5s; }
.fortune-suspense.card-arrived .suspense-tube { opacity: 0; scale: .8; pointer-events: none; }
.card-arrived .mystery-card { animation: mysterious-hover .8s ease-in-out infinite alternate; }
.card-turning .mystery-card { animation: none; }
@keyframes mysterious-hover { to { translate: 0 -9px; box-shadow: 0 18px 70px #e3a33188; } }
@media(prefers-reduced-motion:reduce){.card-arrived .mystery-card { animation: none; }}

.daylight .fortune-dialog { max-width: 600px; background: #fff7e6; border: 2px solid #d2983c; box-shadow: 0 18px 70px #3b120b66, inset 0 0 0 5px #ffedc4; }
.daylight .fortune-result-card { background: #fff5df url("assets/fortune-share-background.png") center/100% 100% no-repeat !important; border: 1px solid #d29b42; border-radius: 20px; padding: 35px 32px 95px; }
.daylight .fortune-result-card:before { display: none; }
.daylight .fortune-result-card h3 { color: #951e19; font-style: italic; font-size: 34px; line-height: 1.25; margin: 23px 0 16px; }
.daylight .fortune-result-card .fortune-grade { background: linear-gradient(#bc4327, #8b1e1a); color: #fff0bd; border: 2px solid #dca847; padding: 7px 18px; box-shadow: 0 0 0 2px #fff0c4; }
.daylight .fortune-result-card .fortune-verse { background: #ffe8b56b; padding: 16px 10px; border-radius: 12px; color: #85261e; font-style: italic; }
.daylight .fortune-result-card .fortune-score { display: block; margin: 10px auto; width: fit-content; min-width: 65%; background: linear-gradient(115deg, #bd4029, #951f1c); color: #fff0b6; border: 2px solid #d9a23d; border-radius: 20px; padding: 10px 20px; }
.daylight .fortune-score small { color: #ffe8a5; }
.fortune-share-brand { display: flex; align-items: center; justify-content: center; gap: 8px; background: #861f2c; border: 1px solid #dba54c; border-radius: 12px; width: fit-content; padding: 4px 12px; margin: 0 auto 24px; }
.fortune-share-brand img:first-child { width: 27px; height: 27px; object-fit: contain; }
.fortune-share-brand img:last-child { width: 85px; height: 43px; object-fit: contain; }
.daylight .fortune-result-actions button { border-radius: 22px; }
@media(max-width:600px){.daylight .fortune-result-card { padding: 28px 18px 85px; }.daylight .fortune-result-card h3 { font-size: 28px; }}

.daylight #chat-close { display: inline-flex !important; align-items: center; justify-content: center; color: #744383; background: #f4e9fb; border: 1px solid #dec9e8; border-radius: 8px; }
.daylight #chat-toggle { display: none !important; }
.daylight.chat-collapsed #chat-toggle { display: flex !important; position: fixed; right: 20px; bottom: 18px; z-index: 80; background: #8137b0; color: white; }
.daylight .chat-dock .chat-panel[hidden] { display: none !important; }
.daylight.chat-collapsed .chat-dock { bottom: auto; }
