#screen-oracle #modeTabletHall::before { content: 'VIII'; font-size: 7px; }

#screen-tablets {
  --tablet-gold: #d5ad6b;
  --tablet-cyan: #91c9dc;
  --tablet-line: rgba(218, 181, 112, .24);
  min-width: 0;
  overflow: hidden;
  color: #eef3ef;
  background: #03080b;
}

.tablet-hall-shell {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
  background: #02070a;
}

.tablet-hall-shell::before {
  content: '';
  position: absolute;
  z-index: -3;
  inset: 0;
  background: #02070a;
}

.tablet-hall-shell::after {
  content: '';
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 7, 10, .08) 0%, rgba(2, 7, 10, .02) 36%, rgba(2, 7, 10, .64) 68%, rgba(2, 7, 10, .92) 100%),
    linear-gradient(90deg, rgba(2, 7, 10, .25), transparent 28%, transparent 72%, rgba(2, 7, 10, .22));
}

.tablet-hall-header {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 132px;
  align-items: center;
  min-height: 84px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--tablet-line);
  background: linear-gradient(180deg, rgba(3, 9, 13, .88), rgba(3, 9, 13, .5));
  backdrop-filter: blur(14px);
}

.tablet-back {
  display: inline-flex;
  width: max-content;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  color: rgba(231, 238, 235, .72);
  border: 1px solid rgba(207, 219, 216, .16);
  border-radius: 5px;
  background: rgba(2, 8, 12, .62);
  cursor: pointer;
}
.tablet-back:hover,
.tablet-back:focus-visible { color: #fff; border-color: rgba(222, 184, 111, .48); }

.tablet-heading { min-width: 0; text-align: center; }
.tablet-heading h2 {
  margin: 1px 0 2px;
  color: #f6efe1;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0;
  text-shadow: 0 2px 18px rgba(221, 169, 75, .26);
}
.tablet-kicker {
  display: block;
  color: var(--tablet-cyan);
  font-size: 8px;
  letter-spacing: .25em;
  text-transform: uppercase;
}
.tablet-heading p { margin: 0; color: rgba(220, 229, 226, .56); font-size: 10px; }
.tablet-count { display: grid; justify-items: end; color: rgba(236, 217, 177, .76); line-height: 1; }
.tablet-count strong { font-family: Georgia, serif; font-size: 24px; font-weight: 400; }
.tablet-count span { margin-top: 3px; font-size: 8px; letter-spacing: .16em; text-transform: uppercase; }

.tablet-hall-intro {
  align-self: end;
  justify-self: center;
  display: grid;
  max-width: 610px;
  justify-items: center;
  gap: 7px;
  padding: 0 22px 22px;
  text-align: center;
  text-shadow: 0 2px 18px #000;
}
.tablet-hall-intro span { color: rgba(195, 217, 220, .7); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; }
.tablet-hall-intro strong { color: rgba(249, 242, 226, .92); font-family: Georgia, serif; font-size: 16px; font-weight: 400; line-height: 1.45; }

/* The wall is the catalogue: each real tablet in the artwork is clickable. */
.tablet-hall-stage {
  position: relative;
  display: grid;
  flex: 1;
  min-height: 0;
  grid-template-rows: none;
  place-items: center;
  overflow: hidden;
  background: #02070a;
}
.tablet-scene-frame {
  position: relative;
  width: min(100%, calc((100dvh - 84px) * 1.85226));
  aspect-ratio: 1680 / 907;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(0, 0, 0, .68);
}
.tablet-scene-art,
.tablet-scene-art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.tablet-scene-art img {
  object-fit: fill;
  filter: saturate(.93) contrast(1.07) brightness(.91);
}
.tablet-scene-frame::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(1, 5, 8, .08), transparent 35%, rgba(1, 5, 8, .08) 68%, rgba(1, 5, 8, .5));
}
.tablet-hotspots {
  position: absolute;
  z-index: 3;
  inset: 0;
}
.tablet-hotspot {
  position: absolute;
  left: var(--tablet-x);
  top: var(--tablet-y);
  width: var(--tablet-w);
  height: var(--tablet-h);
  padding: 0;
  color: #f5e6c7;
  border: 1px solid transparent;
  border-radius: 42% 42% 8px 8px / 8% 8% 3% 3%;
  outline: none;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, filter .2s ease;
}
.tablet-hotspot::before {
  content: '';
  position: absolute;
  inset: -5px;
  border: 1px solid transparent;
  border-radius: inherit;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.tablet-hotspot:hover,
.tablet-hotspot:focus-visible,
.tablet-hotspot.selected {
  border-color: rgba(242, 201, 124, .62);
  background: rgba(236, 189, 99, .06);
  box-shadow: inset 0 0 22px rgba(255, 224, 165, .12), 0 0 28px rgba(225, 162, 67, .38);
  filter: brightness(1.13);
}
.tablet-hotspot:hover::before,
.tablet-hotspot:focus-visible::before,
.tablet-hotspot.selected::before {
  border-color: rgba(242, 201, 124, .2);
  box-shadow: 0 0 18px rgba(225, 162, 67, .2);
}
.tablet-hotspot-number {
  position: absolute;
  left: 50%;
  bottom: -18px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: rgba(246, 224, 181, .86);
  border: 1px solid rgba(229, 190, 116, .3);
  border-radius: 50%;
  background: rgba(3, 9, 12, .8);
  font-size: 7px;
  letter-spacing: 0;
  opacity: .55;
  transform: translateX(-50%);
  transition: opacity .2s ease, background .2s ease;
}
.tablet-hotspot-label {
  position: absolute;
  left: 50%;
  bottom: -47px;
  width: max-content;
  max-width: 130px;
  padding: 5px 8px;
  color: #f7ead1;
  border: 1px solid rgba(225, 187, 115, .24);
  border-radius: 3px;
  background: rgba(2, 8, 11, .9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .2s ease, transform .2s ease;
}
.tablet-hotspot:hover .tablet-hotspot-number,
.tablet-hotspot:focus-visible .tablet-hotspot-number,
.tablet-hotspot.selected .tablet-hotspot-number { opacity: 1; background: rgba(89, 59, 24, .92); }
.tablet-hotspot:hover .tablet-hotspot-label,
.tablet-hotspot:focus-visible .tablet-hotspot-label { opacity: 1; transform: translate(-50%, 0); }

.tablet-hotspot-tablet_roots { --tablet-x: 6.3%; --tablet-y: 46.4%; --tablet-w: 6.4%; --tablet-h: 34%; }
.tablet-hotspot-tablet_measure { --tablet-x: 18%; --tablet-y: 47.5%; --tablet-w: 5.8%; --tablet-h: 32%; }
.tablet-hotspot-tablet_cycles { --tablet-x: 29.2%; --tablet-y: 47.5%; --tablet-w: 5.8%; --tablet-h: 32%; }
.tablet-hotspot-tablet_living_world { --tablet-x: 40.5%; --tablet-y: 48%; --tablet-w: 5.7%; --tablet-h: 31%; }
.tablet-hotspot-emerald_tablet { --tablet-x: 51.2%; --tablet-y: 47.3%; --tablet-w: 7%; --tablet-h: 34%; }
.tablet-hotspot-tablet_paths { --tablet-x: 62.5%; --tablet-y: 48%; --tablet-w: 5.7%; --tablet-h: 31%; }
.tablet-hotspot-tablet_sky { --tablet-x: 83.4%; --tablet-y: 47.2%; --tablet-w: 5.8%; --tablet-h: 33%; }
.tablet-hotspot-tablet_shadow { --tablet-x: 94.8%; --tablet-y: 46.2%; --tablet-w: 5.8%; --tablet-h: 34%; }

.tablet-scene-frame .tablet-hall-intro {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 5%;
  display: grid;
  max-width: none;
  justify-items: center;
  gap: 7px;
  padding: 10px 18px;
  text-align: center;
  text-shadow: 0 2px 18px #000;
  transform: translateX(-50%);
  pointer-events: none;
}

.tablet-study {
  position: absolute;
  z-index: 20;
  top: 98px;
  right: 14px;
  bottom: 14px;
  display: none;
  width: min(560px, calc(100% - 28px));
  overflow-y: auto;
  border: 1px solid rgba(222, 184, 111, .3);
  border-radius: 7px;
  background: rgba(3, 9, 13, .97);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .76);
  scrollbar-color: rgba(216, 177, 104, .28) transparent;
  scrollbar-width: thin;
}
.tablet-study.is-open { display: block; }
.tablet-study-empty { display: grid; height: 100%; place-items: center; padding: 30px; color: rgba(203, 216, 216, .54); text-align: center; }
.tablet-study-card { padding: 20px 22px 24px; }
.tablet-close-study {
  position: sticky;
  z-index: 3;
  top: 8px;
  float: right;
  display: grid;
  width: 36px;
  height: 36px;
  margin: -8px -5px 4px 10px;
  place-items: center;
  color: #f2e5cd;
  border: 1px solid rgba(222, 184, 111, .3);
  border-radius: 50%;
  background: #0c1316;
  cursor: pointer;
}
.tablet-study-head { display: block; padding: 2px 44px 17px 0; border-bottom: 1px solid rgba(222, 184, 111, .16); }
.tablet-study-head small { color: var(--tablet-cyan); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
.tablet-study-head h3 { margin: 5px 0 9px; color: #f6eddd; font-family: Georgia, serif; font-size: 24px; font-weight: 500; line-height: 1.12; }
.tablet-study-head p { margin: 0; color: rgba(224, 231, 228, .78); font-size: 13px; line-height: 1.6; }
.tablet-reading { display: grid; gap: 7px; padding: 16px 0 10px; }
.tablet-reading h4 { margin: 7px 0 0; color: #dfbc7e; font-family: Georgia, serif; font-size: 15px; font-weight: 500; }
.tablet-reading ul { margin: 0; padding-left: 18px; color: rgba(225, 233, 230, .78); font-size: 13px; line-height: 1.6; }
.tablet-reading li { margin-bottom: 6px; }
.tablet-prompts { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 16px; }
.tablet-prompts button { min-height: 37px; padding: 7px 12px; color: rgba(224, 233, 231, .72); border: 1px solid rgba(158, 198, 209, .17); border-radius: 4px; background: rgba(120, 167, 181, .06); font-size: 11px; cursor: pointer; }
.tablet-dialogue { border-top: 1px solid rgba(222, 184, 111, .16); padding-top: 14px; }
.tablet-dialogue-label { margin-bottom: 10px; color: rgba(222, 184, 111, .72); font-size: 8px; letter-spacing: .2em; text-transform: uppercase; }
.tablet-messages { display: grid; gap: 10px; margin-bottom: 12px; }
.tablet-message { font-size: 14px; line-height: 1.72; }
.tablet-message.user { margin-left: 20px; padding: 9px 11px; color: rgba(224, 233, 231, .72); border-left: 1px solid rgba(141, 195, 212, .42); background: rgba(91, 151, 171, .06); }
.tablet-message.oracle { color: rgba(239, 235, 225, .85); }
.tablet-message.oracle p { margin: 0 0 8px; }
.tablet-message.oracle p:last-child { margin-bottom: 0; }
.tablet-message.oracle .md-h { margin: 18px 0 8px; color: #efd8a7; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.tablet-message.typing { color: rgba(218, 191, 143, .68); font-style: italic; }
.tablet-dialogue-empty { color: rgba(196, 208, 207, .48); font-size: 12px; }
.tablet-question { display: grid; grid-template-columns: 1fr 42px; gap: 7px; align-items: end; }
.tablet-question textarea { width: 100%; min-height: 66px; max-height: 150px; resize: vertical; padding: 10px 11px; color: #edf2ef; border: 1px solid rgba(167, 200, 208, .2); border-radius: 5px; outline: none; background: rgba(1, 6, 9, .68); font-size: 13px; line-height: 1.55; }
.tablet-question textarea:focus { border-color: rgba(222, 184, 111, .55); }
.tablet-question button { width: 42px; height: 42px; padding: 0; color: #071016; border: 0; border-radius: 50%; background: linear-gradient(145deg, #f0d9a6, #b98542); cursor: pointer; }
.tablet-question button:disabled { opacity: .4; cursor: wait; }
.tablet-model-note { margin: 13px 0 0; color: rgba(188, 201, 201, .4); font-size: 8px; line-height: 1.45; }
.tablet-hall-status { position: absolute; z-index: 5; left: 18px; bottom: 18px; color: rgba(214, 226, 225, .65); font-size: 11px; }
.tablet-hall-status:empty { display: none; }

@media (max-width: 899px) {
  #screen-tablets { padding-bottom: var(--mobile-nav-height); }
  .tablet-hall-shell::before { background: #02070a; }
  .tablet-hall-header { grid-template-columns: 44px minmax(0, 1fr) 44px; min-height: 67px; padding: calc(8px + env(safe-area-inset-top, 0px)) 11px 8px; }
  .tablet-back { width: 44px; min-height: 44px; padding: 0; justify-content: center; }
  .tablet-back span:last-child { display: none; }
  .tablet-heading h2 { font-size: 21px; }
  .tablet-heading p { font-size: 9px; }
  .tablet-kicker { font-size: 7px; }
  .tablet-count strong { font-size: 18px; }
  .tablet-count span { font-size: 6px; }
  .tablet-hall-stage { grid-template-rows: none; }
  .tablet-scene-frame { width: min(100%, calc((100dvh - 67px - var(--mobile-nav-height) - env(safe-area-inset-top, 0px)) * .56369)); aspect-ratio: 947 / 1680; }
  .tablet-scene-frame .tablet-hall-intro { bottom: 3.5%; width: max-content; padding: 8px 12px; }
  .tablet-scene-frame .tablet-hall-intro span { font-size: 7px; }
  .tablet-scene-frame .tablet-hall-intro strong { font-size: 13px; }
  .tablet-hotspot-number { bottom: -12px; width: 17px; height: 17px; font-size: 6px; opacity: .78; }
  .tablet-hotspot-label { display: none; }
  .tablet-hotspot-tablet_roots { --tablet-x: 9.7%; --tablet-y: 42.7%; --tablet-w: 11.6%; --tablet-h: 20%; }
  .tablet-hotspot-tablet_measure { --tablet-x: 24.1%; --tablet-y: 43%; --tablet-w: 10.4%; --tablet-h: 19%; }
  .tablet-hotspot-tablet_cycles { --tablet-x: 19.4%; --tablet-y: 14.8%; --tablet-w: 10.8%; --tablet-h: 22%; }
  .tablet-hotspot-tablet_living_world { --tablet-x: 37%; --tablet-y: 43%; --tablet-w: 10.2%; --tablet-h: 18.5%; }
  .tablet-hotspot-emerald_tablet { --tablet-x: 50.4%; --tablet-y: 42.3%; --tablet-w: 12%; --tablet-h: 20.5%; }
  .tablet-hotspot-tablet_paths { --tablet-x: 64%; --tablet-y: 43%; --tablet-w: 10.2%; --tablet-h: 18.5%; }
  .tablet-hotspot-tablet_sky { --tablet-x: 80.9%; --tablet-y: 14.8%; --tablet-w: 10.8%; --tablet-h: 22%; }
  .tablet-hotspot-tablet_shadow { --tablet-x: 90.4%; --tablet-y: 42.6%; --tablet-w: 10.5%; --tablet-h: 20%; }
  .tablet-study { position: fixed; z-index: 24; inset: calc(75px + env(safe-area-inset-top, 0px)) 8px calc(var(--mobile-nav-height) + 8px); width: auto; }
  .tablet-study-card { padding: 16px 14px 22px; }
  .tablet-study-head { display: block; padding-right: 38px; }
  .tablet-study-head h3 { font-size: 20px; }
  .tablet-close-study { width: 44px; height: 44px; }
  .tablet-prompts button { min-height: 44px; font-size: 12px; }
  .tablet-question textarea { min-width: 0; font-size: 16px; }
  .tablet-question { grid-template-columns: minmax(0, 1fr) 44px; }
  .tablet-question button { width: 44px; height: 44px; }
}

@media (min-width: 900px) {
  .app.has-nav #screen-tablets.active { min-width: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .tablet-scene-art img { animation: tabletHallBreath 20s ease-in-out infinite alternate; }
  @keyframes tabletHallBreath {
    from { filter: saturate(.9) contrast(1.06) brightness(.87); }
    to { filter: saturate(.97) contrast(1.08) brightness(.94); }
  }
}
