.hatira-campus-stand {
  position: absolute;
  z-index: 12;
  left: 51.65%;
  top: 31.6%;
  width: 4.25%;
  height: 6.9%;
  display: grid;
  place-items: center;
  text-decoration: none;
}
.hatira-campus-stand::before {
  position: absolute;
  right: 6%;
  bottom: 1%;
  width: 76%;
  height: 9%;
  border-radius: 50%;
  background: #3f27186b;
  filter: blur(.14cqw);
  content: "";
}
.hatira-campus-stand img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hatira-campus-stand span {
  position: absolute;
  top: 49%;
  width: max-content;
  padding: .06em .35em;
  border-radius: .2em;
  background: #dac49e;
  color: #3e230f;
  font: 800 .58cqw/1.25 var(--heading);
}
.hatira-campus-stand:hover img { filter: brightness(1.12); }
.hatira-campus-shortcut { display: none; }

.hatira-page { --hatira-ink: #432c1c; --hatira-paper: #fff2d9; color: var(--hatira-ink); }
.hatira-room {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  width: min(100%, (100svh - 108px) * 1672 / 941);
  margin-inline: auto;
  aspect-ratio: 1672 / 941;
  background: #6f4830;
}
.admin-bar .hatira-room { width: min(100%, (100svh - 140px) * 1672 / 941); }
.hatira-room-art { position: relative; }
.hatira-room-image { display: block; width: 100%; height: auto; }
.hatira-desk-book {
  position: absolute;
  z-index: 1;
  left: 22%;
  top: 60.6%;
  width: 16%;
  height: 8.3%;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}
.hatira-desk-book:hover { box-shadow: 0 0 20px #ffdf91a0, inset 0 0 14px #fff2c766; }
.hatira-desk-book:focus-visible { outline: 2px solid #653414; outline-offset: 3px; }
.hatira-writing-desk {
  position: absolute;
  top: 18%;
  left: 12%;
  width: 34%;
  text-align: center;
}
.hatira-writing-desk h1 {
  margin: 0 0 1.6cqw;
  color: #573623;
  font: 850 4.2cqw/1.1 var(--heading);
  letter-spacing: -.035em;
}
.hatira-share.button {
  min-height: 40px;
  padding: .7em 1.45em;
  font-size: clamp(13px, 1.6cqw, 24px);
}
.hatira-shelf { position: absolute; left: 51.8%; top: 17.5%; width: 44%; height: 53.7%; }
.hatira-covers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 5%;
  align-items: end;
  justify-items: center;
  height: 100%;
}
.hatira-cover {
  --cover: #742d3c;
  --cover-gold: #d9ad62;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .45em;
  width: 88%;
  height: 89%;
  padding: 10%;
  border: 1px solid #fff5d333;
  border-radius: 4% 4% 3% 3%;
  background:
    linear-gradient(90deg, #0006, #0002 4%, #f5dd9b25 5%, #0003 6%, transparent 9%),
    repeating-linear-gradient(0deg, transparent 0 2px, rgb(255 255 255 / .035) 2px 3px, transparent 3px 4px),
    repeating-linear-gradient(90deg, transparent 0 2px, rgb(0 0 0 / .035) 2px 3px, transparent 3px 4px),
    radial-gradient(ellipse at 31% 17%, #fff1, transparent 72%),
    var(--cover);
  color: #ffdf9e;
  box-shadow: 3px 2px 6px #241308b0, inset 3px 0 #ffffff19;
  text-align: center;
  text-decoration: none;
  overflow: hidden;
}
.hatira-cover--2 { --cover: #504d2b; }
.hatira-cover--3 { --cover: #25374a; }
.hatira-cover--4 { --cover: #314b48; }
.hatira-cover--5 { --cover: #75451f; }
.hatira-cover--6 { --cover: #884737; }
.hatira-cover strong { font: 800 clamp(12px, 1.7cqw, 25px)/1.16 var(--heading); overflow-wrap: anywhere; }
.hatira-cover-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font: 650 clamp(10px, .82cqw, 14px)/1.22 var(--heading);
  overflow-wrap: anywhere;
}
.hatira-cover-frame {
  position: absolute;
  inset: clamp(7px, .61cqw, 12px);
  border: 1px solid #d9ad62a8;
  border-radius: 3px;
  box-shadow: inset 0 0 0 2px #20130f41, inset 0 0 0 3px #d9ad6266;
  pointer-events: none;
}
.hatira-cover-frame > i {
  position: absolute;
  width: clamp(13px, 1.45cqw, 25px);
  aspect-ratio: 1;
  border: 1px solid var(--cover-gold);
  border-width: 1px 0 0 1px;
  border-radius: 5px 0 0;
  color: var(--cover-gold);
  opacity: .88;
}
.hatira-cover-frame > i::before,
.hatira-cover-frame > i::after {
  position: absolute;
  width: 53%;
  height: 53%;
  border: 1px solid currentColor;
  content: "";
}
.hatira-cover-frame > i::before { inset: 3px auto auto 3px; border-radius: 80% 0 80% 0; }
.hatira-cover-frame > i::after { inset: 3px auto auto 3px; transform: rotate(90deg); border-radius: 80% 0 80% 0; }
.hatira-cover-frame > i:nth-child(1) { top: 4px; left: 4px; }
.hatira-cover-frame > i:nth-child(2) { top: 4px; right: 4px; transform: rotate(90deg); }
.hatira-cover-frame > i:nth-child(3) { bottom: 4px; right: 4px; transform: rotate(180deg); }
.hatira-cover-frame > i:nth-child(4) { bottom: 4px; left: 4px; transform: rotate(270deg); }
.hatira-cover-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: min(80%, 76px);
  align-self: center;
  color: var(--cover-gold);
}
.hatira-cover-divider::before,
.hatira-cover-divider::after { flex: 1; height: 1px; background: currentColor; content: ""; opacity: .64; }
.hatira-cover-divider i { width: 5px; height: 5px; border: 1px solid currentColor; transform: rotate(45deg); }
.hatira-cover:hover { color: #fff2cc; transform: translateY(-3px); }
.hatira-cover:focus-visible { outline: 3px solid #ffe3a6; outline-offset: 2px; }
.hatira-shelf--empty { display: grid; place-items: center; }
.hatira-shelf--empty p {
  max-width: 88%;
  margin: 0;
  padding: .65em 1em;
  border: 1px solid #e2be7a60;
  border-radius: .6em;
  background: #342012df;
  color: #fff1cc;
  font-size: clamp(13px, 1.25cqw, 20px);
  text-align: center;
}
.hatira-shelf-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 1.4cqw;
  color: #ffe4ae;
  font-size: clamp(12px, 1.1cqw, 17px);
}
.hatira-shelf-nav a, .hatira-shelf-nav > span:first-child, .hatira-shelf-nav > span:last-child {
  display: grid;
  place-items: center;
  width: 2em;
  height: 2em;
  border: 1px solid #edc38b80;
  border-radius: 50%;
  text-decoration: none;
  color: inherit;
}
.hatira-shelf-nav > span:first-child, .hatira-shelf-nav > span:last-child { opacity: .55; }
.hatira-no-script { width: min(720px, 90%); margin: 24px auto; }

body:has(.hatira-page dialog[open]) { overflow: hidden; }
.hatira-page dialog {
  position: fixed;
  inset: 0;
  max-width: none;
  max-height: 94dvh;
  padding: 0;
  margin: auto;
  border: 1px solid #be8f61;
  border-radius: 18px;
  background: var(--hatira-paper);
  color: var(--hatira-ink);
  box-shadow: 0 24px 90px #21120785;
  overscroll-behavior: contain;
}
.hatira-page dialog::backdrop { background: #2b1b10a6; backdrop-filter: blur(3px); }
.hatira-form-dialog { width: min(620px, calc(100% - 26px)); }
.hatira-dialog-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px clamp(16px, 4vw, 32px) 8px;
}
.hatira-dialog-header h2 { color: #573623; font-size: clamp(26px, 4vw, 42px); margin: 0; }
.hatira-dialog-header form { margin: 0; }
.hatira-close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #bc9467;
  border-radius: 50%;
  background: #fff7e7;
  color: #623915;
  cursor: pointer;
}
.hatira-form { display: grid; gap: 8px; padding: 8px clamp(16px, 4vw, 32px) 24px; }
.hatira-form label, .hatira-form summary { font-weight: 800; }
.hatira-form label span { font-weight: 600; }
.hatira-form input:not([type="hidden"]), .hatira-form textarea {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #b99266;
  border-radius: 8px;
  background: #fffbf4;
  color: inherit;
  font: inherit;
}
.hatira-form textarea { resize: vertical; min-height: 90px; }
.hatira-form-media { display: grid; gap: 5px; }
.hatira-form-media details { min-width: 0; padding: 7px 9px; border: 1px solid #d9b88b; border-radius: 8px; }
.hatira-form-media summary { cursor: pointer; }
.hatira-form-media details[open] summary { margin-bottom: 7px; }
.hatira-form-media small { display: block; margin-top: 3px; }
.hatira-form p { margin: 0; }
.hatira-form-status { padding: 7px 10px; background: #e9dcc5; border-radius: 8px; font-weight: 700; }
.hatira-form-status:empty { display: none; }
.hatira-form > .button { justify-self: start; }
.hatira-form > .button:disabled { opacity: .6; }
.hatira-page .hatira-confirmation {
  width: min(490px, calc(100% - 28px));
  border: 1px solid #bc9467;
  background: radial-gradient(ellipse at top, #fff9ed, #f5e3c3);
  box-shadow: 0 24px 90px #21120785, inset 0 0 0 6px #fffaebad;
}
.hatira-confirmation-close { position: absolute; top: 12px; right: 12px; }
.hatira-confirmation-close form { margin: 0; }
.hatira-confirmation-content { padding: clamp(34px, 8vw, 56px) clamp(22px, 6vw, 44px); text-align: center; }
.hatira-confirmation-seal {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border: 1px solid #be9860;
  border-radius: 50%;
  background: linear-gradient(145deg, #efdbb4, #ceb080);
  color: #5b3a1c;
  box-shadow: inset 0 0 0 3px #fff4df72;
}
.hatira-confirmation-content h2 { margin: 0 0 9px; color: #573623; font-size: clamp(27px, 5vw, 36px); }
.hatira-confirmation-content p { margin: 0 auto 20px; max-width: 34ch; }
.hatira-confirmation-content form { margin: 0; }

.hatira-page .hatira-reader {
  width: min(1050px, calc(100% - 26px));
  overflow: auto;
  border: 7px solid #74313a;
  border-radius: 16px;
  background: #f5e0b9;
}
.hatira-reader .hatira-dialog-header { padding: 8px 10px 0; min-height: 49px; }
.hatira-reader .hatira-dialog-header form { margin-left: auto; z-index: 1; }
.hatira-reader h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.hatira-open-pages {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: min(69dvh, 550px);
  touch-action: pan-y pinch-zoom;
  perspective: 1400px;
  overflow: clip;
}
.hatira-flip {
  position: absolute;
  inset-block: 0;
  z-index: 1;
  width: 50%;
  pointer-events: none;
  transform-style: preserve-3d;
  animation-duration: .52s;
  animation-timing-function: cubic-bezier(.3, .12, .24, 1);
  animation-fill-mode: both;
}
.hatira-flip--forward { right: 0; transform-origin: left center; animation-name: hatira-forward; }
.hatira-flip--backward { left: 0; transform-origin: right center; animation-name: hatira-backward; }
.hatira-flip::after,
.hatira-flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}
.hatira-flip::after {
  content: "";
  transform: rotateY(180deg);
  background: linear-gradient(90deg, #e5c899, #fff2d6 12%, #f6e2bc 95%, #ceaa73);
  box-shadow: 0 4px 12px #44250e36;
}
.hatira-flip--forward > .hatira-flip-face { background: linear-gradient(90deg, #dbc090, #fff3da 8%, #fef0d2); }
@keyframes hatira-forward { to { transform: rotateY(-180deg); } }
@keyframes hatira-backward { to { transform: rotateY(180deg); } }
.hatira-book-page {
  box-sizing: border-box;
  padding: clamp(16px, 3vw, 40px);
  overflow: auto;
  color: #492f20;
  font: 400 clamp(17px, 1.55vw, 23px)/1.53 Georgia, serif;
  background: linear-gradient(90deg, #fef0d2, #fff3da 92%, #d7b88a);
}
.hatira-book-page:nth-child(2) { background: linear-gradient(90deg, #dbc090, #fff3da 8%, #fef0d2); }
.hatira-book-page p { margin: 0 0 .75em; white-space: pre-line; overflow-wrap: anywhere; }
.hatira-book-page .hatira-byline { margin-bottom: .4em; font-size: .83em; font-weight: 700; }
.hatira-book-page h3 { margin: 0 0 .5em; color: #492f20; font: 750 1.35em/1.2 Georgia, serif; overflow-wrap: anywhere; }
.hatira-probe { position: absolute; visibility: hidden; pointer-events: none; inset: 0 auto auto 0; }
.hatira-book-page--media { display: grid; place-items: center; }
.hatira-book-page--media img { display: block; width: 100%; height: 100%; max-height: 100%; object-fit: contain; min-height: 0; }
.hatira-book-page--media iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #2b1b10; }
.hatira-video-cover {
  display: grid;
  place-items: center;
  width: 100%;
  padding: 8px;
  aspect-ratio: 16 / 9;
  border: 1px solid #b18961;
  border-radius: 8px;
  background: linear-gradient(#25170a65, #25170ab5), url('room.webp') center / cover;
  color: #fff4df;
  font: 800 1rem/1.3 var(--heading);
  cursor: pointer;
}
.hatira-video-cover span { padding: .55em .9em; border-radius: 6px; background: #3c2619db; }
.hatira-video-cover:hover span { background: #68391f; }
.hatira-page-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  min-height: 54px;
  background: #f5e0b9;
}
.hatira-page-nav button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.hatira-page-nav button:disabled { opacity: .43; cursor: default; }

@media (max-width: 880px) {
  .hatira-room, .admin-bar .hatira-room { width: 100%; aspect-ratio: auto; }
  .hatira-room-image { height: clamp(160px, 48vw, 290px); object-fit: cover; object-position: center 64%; }
  .hatira-desk-book { top: 60%; transform: translateY(-20%); }
  .hatira-writing-desk, .hatira-shelf { position: static; width: auto; height: auto; }
  .hatira-writing-desk { padding: 22px 16px; background: #f7e7cb; }
  .hatira-writing-desk h1 { margin-bottom: 12px; font-size: clamp(28px, 8vw, 44px); }
  .hatira-shelf { padding: 20px clamp(14px, 5vw, 32px) 25px; background: #56371f; }
  .hatira-covers { grid-template-rows: auto; gap: 14px; }
  .hatira-cover { width: 100%; height: auto; min-height: 132px; aspect-ratio: .82; }
  .hatira-cover strong { font-size: clamp(14px, 3.5vw, 20px); }
  .hatira-cover-title { font-size: 12px; }
  .hatira-shelf-nav { margin-top: 14px; }
}
@media (max-width: 760px) {
  .hatira-campus-shortcut { display: block; margin: 0; padding: 10px 20px; background: #eee6d8; font-size: 12px; font-weight: 750; }
}
@media (max-width: 690px) {
  .hatira-covers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hatira-open-pages { grid-template-columns: minmax(0, 1fr); height: min(71dvh, 660px); }
  .hatira-flip { width: 100%; }
  .hatira-book-page { padding: 14px 18px; }
  .hatira-page .hatira-reader { width: calc(100% - 12px); border-width: 4px; }
}
