/* Approved illustrated notebook materials; loaded with the notebook theme before first paint. */
/* Story recap uses the inventory artwork layers, action buttons and collected rows. */
#story-completion-panel{position:absolute;inset:0;z-index:20000;display:grid;place-items:center;padding:28px;box-sizing:border-box;background:rgba(23,54,34,.86);color:var(--v3-ink,#3a2a1f);font-family:var(--font-ui,Nunito,sans-serif);overscroll-behavior:contain}
#story-completion-panel .story-completion-book{position:relative;width:min(100%,540px);height:min(850px,calc(100dvh - 64px));box-sizing:border-box;overflow:visible}
#story-completion-panel.notebook-summary-page {position:absolute;inset:auto 12px 12px;width:calc(100% - 24px);max-width:520px;height:max(92px,calc(100dvh - var(--hud-panel-top) - 12px));max-height:none!important;margin:auto;padding:0;background:none;display:block;z-index:var(--ui-layer-panel,75);transform:none!important}
#story-completion-panel.notebook-summary-page.box-half {height:max(92px,calc((100dvh - var(--hud-panel-top) - 12px) * .675))}
#story-completion-panel.notebook-summary-page .story-completion-book {width:100%;height:100%}
#story-completion-panel.notebook-summary-page.hidden {display:none}
#story-completion-panel .story-completion-paper{position:absolute;inset:25px 16px 30px 29px;overflow-y:auto;box-sizing:border-box;padding:16px 16px 24px;background:none;border:0;box-shadow:none;scrollbar-width:thin;overscroll-behavior:contain;text-align:center}
#story-completion-panel h2{font:400 30px/1.1 'Patrick Hand',cursive;margin:8px 36px 8px 0;text-align:left;color:var(--v3-ink,#3a2a1f)}
#story-completion-panel p{font-size:15px;line-height:1.45;margin:8px 0 12px}
#story-completion-panel .story-completion-route{text-align:left;font-weight:800}
#story-completion-panel .story-completion-badge{width:96px;height:96px;object-fit:contain;margin:12px auto;display:block}
#story-completion-panel .story-completion-earned{font-weight:800;overflow-wrap:anywhere}
#story-completion-panel .story-completion-actions{display:flex;flex-wrap:wrap;gap:14px;justify-content:center;margin:18px 0 24px;padding:2px}
#story-completion-panel .notebook-action-button{flex:1 1 160px;width:auto!important;text-shadow:none;cursor:pointer}
.notebook-action-button.notebook-action-button--secondary{background:var(--v3-paper,#f7f1e4);color:var(--v3-ink,#3a2a1f)}
#story-completion-panel :is(button,[role=button]):focus-visible{outline:3px solid #f2b134;outline-offset:3px}
#story-completion-panel .story-completion-stops{list-style:none;padding:0;margin:18px 0 0;text-align:left}
#story-completion-panel .story-completion-stops li{list-style:none;padding:0;margin:0;width:100%;max-width:none;align-self:stretch;box-sizing:border-box}
#story-completion-panel .story-completion-adventures{flex-basis:100%;display:flex;gap:14px;flex-wrap:wrap;justify-content:center}
#story-completion-panel .story-completion-adventures[hidden]{display:none}
#story-completion-panel .story-completion-close{position:absolute;top:8px;right:20px;z-index:4;display:grid;place-items:center;width:48px;height:64px;padding:0;border:0;background:none;box-shadow:none;cursor:pointer}
#story-completion-panel .story-completion-close img{width:44px;height:61.6px;object-fit:contain;pointer-events:none}
@media(max-height:500px){#story-completion-panel .story-completion-book{width:min(100%,740px)}#story-completion-panel .story-completion-badge{width:72px;height:72px}}
/* Collected places have one status mark at the right edge of a search row. */
html[data-ui-theme="notebook"] #index-panel #index-panel-body.locations-grouped-view .badge-item.is-visited::after {content:none;display:none}
html[data-ui-theme="notebook"] #index-panel #index-panel-body.locations-grouped-view .index-tourist-entry > .badge-checkmark {
  display:block;position:static;flex:0 0 24px;width:24px!important;height:24px!important;
  margin-left:auto;object-fit:contain!important;transform:none;filter:none;
}
html[data-ui-theme="notebook"] .ui-panel.ui-panel--paper-stack .paper-panel__visual-stack::before,
html[data-ui-theme="notebook"] .ui-panel.ui-panel--paper-stack .paper-panel__visual-stack::after{display:none !important;content:none !important}
html[data-ui-theme="notebook"] .ui-panel.ui-panel--paper-stack .paper-panel__visual-stack > .paper-panel__layer,
html[data-ui-theme="notebook"] .ui-panel.ui-panel--paper-stack .paper-panel__visual-stack > .location-panel__mascot{display:none !important}
html[data-ui-theme="notebook"] .ui-panel.ui-panel--paper-stack .paper-panel__visual-stack{background:none !important;border:0 !important;box-shadow:none !important}
html[data-ui-theme="notebook"] .notebook-art-cover{
  position:absolute;inset:-12px;z-index:0;box-sizing:border-box;
  border:40px solid transparent;border-right-width:32px;
  border-image-source:url("../img/notebook/open-cover.png");
  border-image-slice:180 160 180 180 fill;border-image-repeat:stretch;
}
/* A separate backing is below the PNG frame, preserving its drawn edges. */
html[data-ui-theme="notebook"] .notebook-art-backing{
  position:absolute;inset:4px -4px 4px 8px;pointer-events:none;
  z-index:0;border-radius:15px 18px 18px 15px;background:#376d47;
}
html[data-ui-theme="notebook"] .notebook-art-paper{
  position:absolute;inset:13px 1px 16px 13px;box-sizing:border-box;
  background-color:#f7f1e4;
  background-image:url("../img/notebook/paper-grid.svg"),url("../img/notebook/paper-texture.png");
  background-size:72px 72px,512px 512px;
  border-radius:10px 14px 14px 10px;
  border:1.2px solid rgba(105,83,53,.38);
}
html[data-ui-theme="notebook"] .notebook-art-paper--back{transform:translate(1px,3px) rotate(.7deg);transform-origin:center;z-index:1;box-shadow:0 1px 2px rgba(76,59,33,.08)}
html[data-ui-theme="notebook"] .notebook-art-paper--middle{transform:translate(0,1.5px) rotate(-.45deg);transform-origin:center;z-index:2}
html[data-ui-theme="notebook"] .notebook-art-paper--front{z-index:3;border-color:rgba(105,83,53,.42);box-shadow:0 1px 2px rgba(76,59,33,.08)}
html[data-ui-theme="notebook"] .notebook-art-paper--front::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(90deg,transparent 22px,rgba(163,58,50,.22) 22px,rgba(163,58,50,.22) 23px,transparent 23px);
  box-shadow:inset 1px 1px 3px rgba(76,59,33,.05);border-radius:inherit;
}

/* The photograph tape was deliberately removed from this visual direction. */
html[data-ui-theme="notebook"] #location-panel .content-image::after,
html[data-ui-theme="notebook"] #location-panel .gallery-img::after{content:none !important;display:none !important}

/* Reuse the same notebook materials in existing screen owners. */
html[data-ui-theme="notebook"] #inventory-panel .progress-container-frame,
html[data-ui-theme="notebook"] #inventory-panel .progress-container-inner{background:transparent !important;border:0 !important;box-shadow:none !important}
html[data-ui-theme="notebook"] #inventory-panel .progress-container-frame::before,
html[data-ui-theme="notebook"] #inventory-panel .progress-container-frame::after{content:none !important;display:none !important}
html[data-ui-theme="notebook"] .notebook-art-host{isolation:isolate;background:transparent !important;border-color:transparent !important;box-shadow:none !important}
html[data-ui-theme="notebook"] .notebook-art-host::before,
html[data-ui-theme="notebook"] .notebook-art-host::after{display:none !important;content:none !important}
html[data-ui-theme="notebook"] .notebook-art-skin{position:absolute;inset:0;z-index:-1;pointer-events:none}
html[data-ui-theme="notebook"] .notebook-art-host .notebook-art-cover{inset:-12px}
html[data-ui-theme="notebook"] .loading-notebook .loading-notebook__sheet{background:transparent !important;border-color:transparent !important;box-shadow:none !important}
html[data-ui-theme="notebook"] .loading-notebook__bookmark,
html[data-ui-theme="notebook"] .loading-notebook__eraser{display:none !important}
html[data-ui-theme="notebook"] #loading-menu .loading-start__sheet::before,
html[data-ui-theme="notebook"] #loading-menu .loading-start__sheet::after{display:none !important;content:none !important}
/* The existing language screen is a closed green cover with white lettering. */
html[data-ui-theme="notebook"] #loading-menu .notebook-art-paper--front{
  background-color:#2d6543;
  background-image:linear-gradient(160deg,rgba(57,116,75,.94),rgba(29,73,44,.94)),url('../img/notebook/paper-texture.png');
  background-size:100% 100%,512px 512px;
  border-color:rgba(27,54,32,.3);
}
html[data-ui-theme="notebook"] #loading-menu .notebook-art-paper--front::after{background:none;box-shadow:inset 1px 1px 5px rgba(8,31,14,.15)}
/* Message wrappers stay transparent around the actual paper and mascot. */
html[data-ui-theme="notebook"] .distance-popup,
html[data-ui-theme="notebook"] .geo-popup,
html[data-ui-theme="notebook"] .speech-bubble-container,
html[data-ui-theme="notebook"] .inventory-unlock-notification {
  background:none!important;
}
/* Small notes need a quiet, opaque writing surface: no grid or red margin
   through wrapped text. The notebook's large illustrated pages keep their grid. */
html[data-ui-theme="notebook"] :is(.inventory-unlock-notification-card,.message-panel-shell,.speech-box,.notification,.context-help__paper,.unity-scene-transition-error,.location-empty-state,#hospitality-category-drawer) {
  background-color:#f7f1e4 !important;
  background-image:none!important;
  color:#3a2a1f;
}
html[data-ui-theme="notebook"] :is(.inventory-unlock-notification-title,.message-panel-text,.speech-content,#notification-text) {
  line-height:1.25!important;
  overflow-wrap:anywhere;
}
html[data-ui-theme="notebook"] :is(.inventory-unlock-notification-subtitle,.inventory-unlock-notification-detail) {
  line-height:1.4!important;
}

/* v03: real project typography and controls over separate painted artwork. */
html[data-ui-theme="notebook"] .loading-wrapper{
  background:#527a4d !important;
}
/* Blur only the map layer, leaving the cover, language buttons and loading sharp.
   Overscan the background so the filter never exposes a pale viewport edge. */
html[data-ui-theme="notebook"] .loading-wrapper::before{
  display:block;content:"";position:absolute;inset:-16px;z-index:0;
  background:#527a4d url('../img/v3/karta/karta-mobitel.jpg') center/cover no-repeat;
  filter:blur(8px);pointer-events:none;
}
html[data-ui-theme="notebook"] #loading-menu .notebook-art-skin{
  background:url('../img/notebook/closed-cover.png') center/105% 106% no-repeat;
  clip-path:inset(1.8% 2% round 18px);
}
html[data-ui-theme="notebook"] #loading-menu .notebook-art-skin > *{display:none}
/* Front face bounds in closed-cover-v06 at 105% background scale.
   The spine occupies the left strip; align content between the fold and right edge. */
html[data-ui-theme="notebook"] #loading-menu .loading-start__sheet{
  --cover-face-left:9%;
  --cover-face-right:2.5%;
  --cover-face-center:53.25%;
}
html[data-ui-theme="notebook"] #loading-menu .loading-start__controls{
  inset:0 var(--cover-face-right) 0 var(--cover-face-left);width:auto;
}
html[data-ui-theme="notebook"] #loading-menu .loading-start__title{
  top:44%;left:50%;right:auto;width:calc(100% - 58px);margin:0;
  transform:translate(-50%,-50%);text-transform:uppercase;
  font-family:"Patrick Hand",cursive;font-weight:400;
}
html[data-ui-theme="notebook"] .cover-title__eyebrow{display:block;font-family:"Patrick Hand",cursive;font-size:18px;line-height:1.2;letter-spacing:1.8px;margin-bottom:10px}
html[data-ui-theme="notebook"] .cover-title__name{display:block;font-family:"Patrick Hand",cursive;font-size:43px;line-height:1.02;letter-spacing:1px}
html[data-ui-theme="notebook"] #loading-menu .loading-start__title::before,
html[data-ui-theme="notebook"] #loading-menu .loading-start__subtitle{display:none}
html[data-ui-theme="notebook"] #loading-menu .loading-start__logo{
  top:8%;left:var(--cover-face-center);width:190px;height:54px;max-width:65%;object-fit:contain;
}
html[data-ui-theme="notebook"] #loading-menu .cover-start-menu{
  position:absolute;bottom:8%;left:50%;transform:translateX(-50%);
  display:flex;flex-direction:column;align-items:center;gap:18px;
  width:204px;max-width:calc(100% - 76px);
}
html[data-ui-theme="notebook"] #loading-menu .loading-start__language{
  position:static;inset:auto;width:100%;gap:10px;
}
html[data-ui-theme="notebook"] #loading-menu .loading-start__label{
  font-size:15px;line-height:1.2;
}
html[data-ui-theme="notebook"] #loading-menu #language-menu{gap:14px;justify-content:center}
html[data-ui-theme="notebook"] #loading-menu #language-menu .lang-btn,
html[data-ui-theme="notebook"] #loading-menu #language-menu .lang-btn:not(.mute){
  width:82px;flex-basis:82px;height:44px;font-size:23px;
}
html[data-ui-theme="notebook"] #loading-menu #btn-start{
  position:static;inset:auto;transform:none;width:100%;min-height:52px;font-size:26px;
}
@media(min-height:701px){
  html[data-ui-theme="notebook"] #loading-menu .loading-start__logo{width:205px;height:60px}
  html[data-ui-theme="notebook"] .cover-title__eyebrow{font-size:20px;margin-bottom:14px}
  html[data-ui-theme="notebook"] .cover-title__name{font-size:49px}
  html[data-ui-theme="notebook"] #loading-menu .cover-start-menu{gap:22px;width:216px}
  html[data-ui-theme="notebook"] #loading-menu #btn-start{min-height:58px}
}
html[data-ui-theme="notebook"] .loading-visuals #loading-frame-sequence{
  top:25px;left:23px;right:13px;height:46%;
  background:url('../img/notebook/grga-reading.webp') center/cover no-repeat;
}
html[data-ui-theme="notebook"] #loading-frame-sequence .loading-frame-layer{visibility:hidden}
html[data-ui-theme="notebook"] .loading-visuals .loading-notebook__page--art{height:100%}
html[data-ui-theme="notebook"] .loading-visuals .loading-notebook__page--copy{inset:50% 0 0}
html[data-ui-theme="notebook"] .loading-visuals #loading-tutorial-hint{top:18px;height:155px}
html[data-ui-theme="notebook"] .loading-visuals #loading-progressbar-wrapper{bottom:70px}
html[data-ui-theme="notebook"] .loading-visuals #loading-progress-meta{bottom:28px}


/* Remove legacy miniature shells too; panel behaviour and hit targets stay intact. */
html[data-ui-theme="notebook"] .ui-panel.ui-panel--paper-stack.box-minimized{background:transparent!important;border:0!important;outline:0!important;box-shadow:none!important}
html[data-ui-theme="notebook"] .ui-panel.ui-panel--paper-stack.box-minimized .paper-panel__visual-stack{display:block!important}
html[data-ui-theme="notebook"] .notebook-art-skin{pointer-events:none}
html[data-ui-theme="notebook"] :is(#location-panel,#help-panel,#index-panel).ui-panel--paper-stack.box-minimized .paper-panel__visual-stack {display:block!important}
html[data-ui-theme="notebook"] #active-tasks-panel.notebook-art-host {background:transparent!important;border-color:transparent!important;box-shadow:none!important}
html[data-ui-theme="notebook"] #loading-menu .loading-start__sheet{--cover-face-left:9%;--cover-face-right:2.5%;--cover-face-center:53.25%}

/* One shared map backdrop for every full notebook and an open search. The
   stationary cover preserves focus while the previous sheet is being replaced.
   Hidden HUD panels must not blur a game or a scene transition. */
html[data-ui-theme="notebook"] #unity-wrapper {--notebook-map-focus:0}
html[data-ui-theme="notebook"] #unity-wrapper::before {
  content:"";position:absolute;inset:0;z-index:49;pointer-events:none;
  background:rgba(247,241,228,.12)!important;
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
  opacity:var(--notebook-map-focus);
  transition:opacity 220ms ease;
}
html[data-ui-theme="notebook"] #unity-wrapper:has(
  #standard-hud:not(.hidden) :is(#location-panel,#help-panel).show:not(.hidden,.box-half,.box-minimized),
  #standard-hud:not(.hidden) #index-panel.show:not(.hidden,.box-minimized),
  #standard-hud:not(.hidden) #inventory-panel.show.inventory-expanded:not(.hidden),
  #standard-hud:not(.hidden) .notebook-stationary-skin[data-map-focus="true"]
),
html[data-ui-theme="notebook"] #unity-wrapper:not(.hud-suppressed):has(
  > #story-completion-panel.show:not(.box-half,.hidden),
  > #active-tasks-panel.show.tasks-full:not([hidden]),
  > .notebook-stationary-skin[data-map-focus="true"]
) {--notebook-map-focus:1}
@media(prefers-reduced-motion:reduce) {
  html[data-ui-theme="notebook"] #unity-wrapper::before {transition:none}
}

/* Sheet travel owns translate/opacity. Keep CSS height/transform transitions
   from fighting that motion, including when a click reverses it midway. */
html[data-ui-theme="notebook"] :is(.ui-panel,#active-tasks-panel):is(.panel-motion--entering,.panel-motion--exiting) {
  transition:none!important;
  pointer-events:none!important;
  will-change:translate,opacity;
}
html[data-ui-theme="notebook"] .panel-motion--pending {opacity:0!important}
html[data-ui-theme="notebook"] #active-tasks-panel.is-closing {pointer-events:none}
html[data-ui-theme="notebook"] #unity-wrapper.hud-suppressed #active-tasks-panel {visibility:hidden!important;pointer-events:none!important}
html[data-ui-theme="notebook"] #help-panel.ui-panel--floating-shell:is(.box-half,.box-minimized):not(.box-dragged) {
  top:auto!important;
  bottom:12px!important;
  max-height:none!important;
}
html[data-ui-theme="notebook"] #help-panel.ui-panel--floating-shell.box-half:not(.box-dragged) {
  height:min(var(--panel-default-height),calc(100dvh - var(--hud-panel-top) - 12px))!important;
}
html[data-ui-theme="notebook"] #location-panel.ui-panel--composition.box-minimized > .panel-composition__header {
  padding-left:32px;
}
html[data-ui-theme="notebook"] :is(#help-panel,#index-panel).box-minimized .blue-content-box-title {
  left:32px!important;
}

/* The same bottom anchor and easing serve full, half and title-bar sizes. */
html[data-ui-theme="notebook"] :is(#location-panel,#help-panel,#index-panel,#inventory-panel,#active-tasks-panel,#minimap-panel):not(.box-dragged) {
  transition:height 420ms cubic-bezier(.22,1,.36,1),opacity 180ms!important;
}
html[data-ui-theme="notebook"] :is(#location-panel,#help-panel,#index-panel,#inventory-panel,#active-tasks-panel,#minimap-panel):is(.panel-motion--entering,.panel-motion--exiting) {
  transition:none!important;
}
@media(prefers-reduced-motion:reduce) {
  html[data-ui-theme="notebook"] :is(#location-panel,#help-panel,#index-panel,#inventory-panel,#active-tasks-panel,#minimap-panel):not(.box-dragged) {transition:none!important}
}

/* Handoff typography: handwritten labels use Patrick Hand in every shell mode.
   Override the legacy expanded-location rule that forced Nunito. */
html[data-ui-theme="notebook"] #location-panel .panel-title-text {
  font:700 calc(19px * var(--panel-header-scale,1)) / 1.1 var(--font-handwriting)!important;
}

/* Keep header emphasis in every size and enlarged images over the whole view. */
html[data-ui-theme="notebook"] #unity-wrapper :is(#location-panel,#help-panel,#index-panel,#inventory-panel,#active-tasks-panel,#minimap-panel) :is(.panel-title-text,.inventory-v3-title,#active-tasks-title,.v3-minimap-help h2) {
  font-weight:700!important;
}
html[data-ui-theme="notebook"] #img-modal {
  position:fixed;inset:0;width:100%;height:100%;
  z-index:var(--ui-layer-popup,90);
}
html[data-ui-theme="notebook"] #img-modal-close {min-width:44px;min-height:44px}

/* Transient cards sit over the map and HUD; they never resize or move either. */
html[data-ui-theme="notebook"] {
  --hud-panel-top:calc(var(--screen-safe-top) + 68px);
}
html[data-ui-theme="notebook"] :is(#inventory-unlock-notification,#speechBubble,#distancePopup,#geoPopup,.notification).notebook-notice-docked {
  position:fixed!important;inset:var(--notice-top) auto auto var(--notice-center)!important;
  width:var(--notice-width)!important;max-width:calc(100vw - 32px)!important;
  transform:translateX(-50%)!important;animation:none!important;
}
html[data-ui-theme="notebook"] .notebook-notice-waiting {visibility:hidden!important;opacity:0!important}
html[data-ui-theme="notebook"] #speechBubble.notebook-notice-docked {transition:opacity 200ms}
html[data-ui-theme="notebook"] #speechBubble.notebook-notice-docked.show-bubble:not(.fade-out) {opacity:1}
html[data-ui-theme="notebook"] .notebook-notice-character {
  position:fixed!important;inset:var(--notice-top) auto auto var(--notice-center)!important;
  width:232px!important;transform:translateX(-50%)!important;animation:none!important;
}
html[data-ui-theme="notebook"] .notebook-notice-character--compact {display:none!important}
html[data-ui-theme="notebook"] .notebook-notice-compact :is(.v3-unlock-grga,.v3-popup-grga) {display:none!important}
html[data-ui-theme="notebook"] .notebook-notice-compact :is(.inventory-unlock-notification-card,.message-panel-shell,.speech-box) {
  box-sizing:border-box;min-height:68px!important;
  padding:10px 44px 10px 62px!important;
  max-height:var(--notice-max-height);overflow-y:auto;
}
html[data-ui-theme="notebook"] #inventory-unlock-notification.notebook-notice-compact .inventory-unlock-notification-card {padding-right:12px!important}
html[data-ui-theme="notebook"] .notebook-notice-compact :is(.inventory-unlock-notification-thumb,.distance-popup__icon,.geo-popup__icon) {
  left:9px!important;top:12px!important;width:42px!important;height:42px!important;
}
html[data-ui-theme="notebook"] .notebook-notice-compact .inventory-unlock-notification-title {font:700 21px/1.1 "Patrick Hand",cursive!important;padding:0!important}
html[data-ui-theme="notebook"] .notebook-notice-compact :is(.inventory-unlock-notification-subtitle,.inventory-unlock-notification-detail) {font-size:13px!important;line-height:1.25!important}
html[data-ui-theme="notebook"] .notebook-notice-compact :is(.message-panel-text,.speech-content) {font:600 15px/1.35 Nunito,sans-serif!important}
html[data-ui-theme="notebook"] .notebook-notice-compact :is(.speech-content p,.geo-popup__title) {margin:0!important}
html[data-ui-theme="notebook"] .notebook-notice-compact .geo-popup__title {font:700 20px/1.1 "Patrick Hand",cursive!important}
html[data-ui-theme="notebook"] .notebook-notice-compact :is(.v3-popup-close,.close-btn) {
  top:2px!important;right:2px!important;width:44px!important;height:48px!important;
}
html[data-ui-theme="notebook"] .notebook-notice-compact :is(.v3-popup-close,.close-btn) img {height:40px;width:28px;object-fit:contain}
html[data-ui-theme="notebook"] #speechBubble.notebook-notice-compact .speech-box::before {
  display:block!important;content:""!important;position:absolute;inset:12px auto auto 10px;
  width:42px;height:44px;background:url('../img/v3/grga/grga-poruka-opcenito.webp') center/contain no-repeat;
}
html[data-ui-theme="notebook"] .notification.notebook-notice-compact {
  min-height:68px;padding:10px 12px 10px 60px;align-items:center;
  max-height:var(--notice-max-height);overflow-y:auto;
}
html[data-ui-theme="notebook"] .notification.notebook-notice-compact > .icon {width:40px;height:40px;top:12px}
html[data-ui-theme="notebook"] .notification.notebook-notice-compact #notification-text {font-size:15px;line-height:1.35}

html[data-ui-theme="notebook"] .notebook-notice-top :is(.inventory-unlock-notification-card,.message-panel-shell,.speech-box),
html[data-ui-theme="notebook"] .notification.notebook-notice-top {
  min-height:76px!important;
  padding:12px 50px 12px 68px!important;
  border:1.5px solid rgba(105,83,53,.45)!important;
  border-left:4px solid #2f6b45!important;
  border-radius:10px 14px 12px 10px!important;
  box-shadow:0 3px 12px rgba(35,47,30,.2)!important;
  background:#f7f1e4!important;
}
html[data-ui-theme="notebook"] #inventory-unlock-notification.notebook-notice-top .inventory-unlock-notification-card {padding-right:50px!important}
html[data-ui-theme="notebook"] .notebook-notice-top :is(.inventory-unlock-notification-thumb,.distance-popup__icon,.geo-popup__icon),
html[data-ui-theme="notebook"] .notification.notebook-notice-top > .icon {
  left:13px!important;top:16px!important;width:40px!important;height:40px!important;
  filter:none!important;
}
html[data-ui-theme="notebook"] .notebook-notice-top :is(.inventory-unlock-notification-title,.message-panel-text--meta-title,.geo-popup__title) {
  font:700 21px/1.2 "Patrick Hand",cursive!important;
}
html[data-ui-theme="notebook"] .notebook-notice-top :is(.message-panel-text--meta-detail,.inventory-unlock-notification-detail,.inventory-unlock-notification-subtitle) {
  font:600 14px/1.4 Nunito,sans-serif!important;
}
html[data-ui-theme="notebook"] .notebook-notice-top .message-panel-text--meta-title {margin:0 0 3px!important}
html[data-ui-theme="notebook"] :is(#inventory-unlock-notification,#speechBubble,#distancePopup,#geoPopup,.notification).notebook-notice-top :is(.v3-popup-close,.close-btn) {
  position:absolute!important;top:3px!important;right:4px!important;
  display:grid!important;place-items:center;padding:0!important;
  width:44px!important;height:48px!important;min-height:48px!important;
  border:0!important;border-radius:0;background:none!important;box-shadow:none!important;transform:none!important;
  pointer-events:auto!important;cursor:pointer;
}
html[data-ui-theme="notebook"] .notebook-notice-top :is(.v3-popup-close,.close-btn) img {
  display:block!important;width:30px!important;height:42px!important;object-fit:contain;pointer-events:none;
}
html[data-ui-theme="notebook"] .notebook-notice-top :is(.v3-popup-close,.close-btn)::after {
  content:none!important;display:none!important;
}
html[data-ui-theme="notebook"] .notebook-notice-top :is(.v3-popup-close,.close-btn):hover {background:#ece4d5!important}
html[data-ui-theme="notebook"] .notebook-notice-top :is(.v3-popup-close,.close-btn):focus-visible {outline:3px solid #f2b134;outline-offset:0}

/* All managed pages share the same book bounds in each size. Content length
   changes scrolling, never the cover geometry during a page replacement. */
html.notebook-pages-enabled[data-ui-theme="notebook"] #unity-wrapper :is(#location-panel,#help-panel,#index-panel,#inventory-panel,#active-tasks-panel,#minimap-panel):not(.box-dragged) {
  left:12px!important;right:12px!important;top:auto!important;bottom:12px!important;
  width:calc(100% - 24px)!important;max-width:520px!important;
  margin-left:auto!important;margin-right:auto!important;transform:none!important;
  height:max(92px,calc(100dvh - var(--hud-panel-top) - 12px))!important;max-height:none!important;
}
html.notebook-pages-enabled[data-ui-theme="notebook"] #unity-wrapper :is(#location-panel.box-half,#help-panel.box-half,#index-panel.box-half,#inventory-panel.inventory-compact,#active-tasks-panel.tasks-half,#minimap-panel.box-half):not(.box-dragged) {
  height:max(92px,calc((100dvh - var(--hud-panel-top) - 12px) * .675))!important;
}
html.notebook-pages-enabled[data-ui-theme="notebook"] #unity-wrapper :is(#location-panel.box-minimized,#help-panel.box-minimized,#index-panel.box-minimized,#inventory-panel.inventory-minimized,#active-tasks-panel.tasks-minimized,#minimap-panel.box-minimized):not(.box-dragged) {height:92px!important}
html[data-ui-theme="notebook"] .notebook-page-sheet :is(.notebook-art-backing,.notebook-art-cover,.notebook-art-paper--back,.notebook-art-paper--middle) {visibility:hidden!important}
html[data-ui-theme="notebook"] #unity-wrapper :is(#location-panel,#help-panel,#index-panel,#inventory-panel,#active-tasks-panel,#minimap-panel).notebook-page-sheet.show > .notebook-bookmark-controls {visibility:hidden!important;pointer-events:none!important}
html[data-ui-theme="notebook"] #unity-wrapper .notebook-page-staged {opacity:0!important;pointer-events:none!important}
html[data-ui-theme="notebook"] #unity-wrapper .notebook-page-sheet {overflow:clip!important}
html[data-ui-theme="notebook"] .notebook-stationary-skin {
  position:fixed;z-index:calc(var(--ui-layer-panel) - 1);pointer-events:none;
}
html[data-ui-theme="notebook"] .notebook-stationary-controls {
  position:fixed;z-index:calc(var(--ui-layer-panel) + 1);display:flex;
  align-items:flex-start;justify-content:flex-end;gap:4px;height:64px;
}
html[data-ui-theme="notebook"] .notebook-stationary-controls > button {
  display:grid;place-items:center;flex:0 0 48px;width:48px;height:64px;min-height:64px;
  padding:0;margin:0;border:0;background:none;box-shadow:none;opacity:1;touch-action:manipulation;
}
html[data-ui-theme="notebook"] .notebook-stationary-controls > button:not(:disabled) {cursor:pointer}
html[data-ui-theme="notebook"] .notebook-stationary-controls > button > img {width:44px;height:61.6px;object-fit:contain;pointer-events:none}
html[data-ui-theme="notebook"] .notebook-stationary-controls > button:focus-visible {outline:3px solid #f2b134;outline-offset:2px}
/* Bookmarks stay pinned to the cover, including hover, press and tab changes. */
html[data-ui-theme="notebook"] :is(.notebook-bookmark-controls,.notebook-stationary-controls),
html[data-ui-theme="notebook"] :is(.notebook-bookmark-controls,.notebook-stationary-controls) > button,
html[data-ui-theme="notebook"] :is(.notebook-bookmark-controls,.notebook-stationary-controls) > button > img {
  transform:none!important;
  translate:none!important;
  scale:none!important;
  animation:none!important;
  transition:none!important;
}
html[data-ui-theme="notebook"] .notebook-page-loading {position:fixed;z-index:var(--ui-layer-panel);display:grid;place-items:center;opacity:0;pointer-events:none;font:24px 'Patrick Hand',cursive;color:#695335;transition:opacity 120ms}
html[data-ui-theme="notebook"] .notebook-page-loading.is-visible {opacity:1}
html[data-ui-theme="notebook"] #unity-wrapper.hud-suppressed :is(.notebook-stationary-skin,.notebook-stationary-controls,.notebook-page-loading) {visibility:hidden!important;pointer-events:none!important}

/* Bookmark tops sit halfway between the paper and the painted cover edge. */
html[data-ui-theme="notebook"] :is(#location-panel,#help-panel,#index-panel,#inventory-panel,#active-tasks-panel,#minimap-panel) {
  --notebook-bookmarks-width:152px;
  --notebook-bookmarks-top:8px;
}
html[data-ui-theme="notebook"] #unity-wrapper :is(#location-panel,#help-panel,#index-panel,#inventory-panel,#active-tasks-panel,#minimap-panel) > .notebook-bookmark-controls {
  position:absolute!important;
  inset:var(--notebook-bookmarks-top) 20px auto auto!important;
  display:flex;
  align-items:flex-start;
  gap:4px!important;
  width:var(--notebook-bookmarks-width)!important;
  height:64px!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
  z-index:8;
  visibility:hidden;
  pointer-events:none!important;
}
html[data-ui-theme="notebook"] #unity-wrapper :is(#location-panel,#help-panel,#index-panel,#inventory-panel,#active-tasks-panel,#minimap-panel).show > .notebook-bookmark-controls {visibility:visible}
html[data-ui-theme="notebook"] #unity-wrapper :is(#location-panel,#help-panel,#index-panel,#inventory-panel,#active-tasks-panel,#minimap-panel).show:not(.is-closing):not(.panel-motion--entering):not(.panel-motion--exiting) > .notebook-bookmark-controls {pointer-events:auto!important}
html[data-ui-theme="notebook"] :is(#location-panel,#help-panel,#index-panel,#inventory-panel,#active-tasks-panel,#minimap-panel) > .notebook-bookmark-controls > button {
  position:relative!important;
  inset:auto!important;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 48px;
  width:48px!important;
  min-width:48px!important;
  height:64px!important;
  min-height:64px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  touch-action:manipulation;
  pointer-events:inherit!important;
}
html[data-ui-theme="notebook"] :is(#location-panel,#help-panel,#index-panel,#inventory-panel,#active-tasks-panel,#minimap-panel) > .notebook-bookmark-controls > button > img {
  display:block;
  width:44px!important;
  height:61.6px!important;
  object-fit:contain;
  pointer-events:none;
}
/* Notebook sections follow the yellow / green / red icon palette. */
html[data-ui-theme="notebook"] #inventory-panel .inventory-tabs [data-inventory-tab="stories"] {--notebook-tab-color:#f2b134}
html[data-ui-theme="notebook"] #inventory-panel .inventory-tabs [data-inventory-tab="locations"] {--notebook-tab-color:#2f6b45}
html[data-ui-theme="notebook"] #inventory-panel .inventory-tabs [data-inventory-tab="badges"] {--notebook-tab-color:#a33a32}
html[data-ui-theme="notebook"] #inventory-panel .inventory-tabs [role="tab"][aria-selected="true"] {
  background:linear-gradient(transparent calc(100% - 6px),var(--notebook-tab-color) 0) center / calc(100% - 14px) 100% no-repeat;
}
html[data-ui-theme="notebook"] #inventory-panel .inventory-tabs [role="tab"]:focus-visible {
  outline-color:var(--notebook-tab-color);
}
html[data-ui-theme="notebook"] .notebook-controls-slot {
  display:block;
  flex:0 0 var(--notebook-bookmarks-width);
  width:var(--notebook-bookmarks-width);
  height:64px;
  min-height:64px;
  pointer-events:none;
}
html[data-ui-theme="notebook"] #location-panel .panel-composition__header > .notebook-controls-slot {
  grid-column:2;
  grid-row:1;
}
html[data-ui-theme="notebook"] #location-panel.ui-panel--composition.box-minimized > .panel-composition__header > .notebook-controls-slot {display:block!important}
html[data-ui-theme="notebook"] #location-panel.ui-panel--composition.box-minimized > .panel-composition__header {
  padding-right:20px;
}
html[data-ui-theme="notebook"] :is(#help-panel,#index-panel) .blue-content-box-title {
  height:auto!important;
  min-height:64px!important;
}
html[data-ui-theme="notebook"] #active-tasks-title {flex:1;min-width:0;overflow-wrap:anywhere}
/* Tutorials are loose paper over the book, rather than a second notebook. */
html[data-ui-theme="notebook"] #help-panel.help-panel--tutorial :is(.notebook-art-cover,.notebook-art-backing,.notebook-art-paper--back,.notebook-art-paper--middle),
html[data-ui-theme="notebook"] #context-help :is(.notebook-art-cover,.notebook-art-backing,.notebook-art-paper--back,.notebook-art-paper--middle) {display:none!important}
html[data-ui-theme="notebook"] #help-panel.help-panel--tutorial .notebook-art-paper--front,
html[data-ui-theme="notebook"] #context-help .notebook-art-paper--front {inset:0;border-radius:8px 12px 10px 7px;box-shadow:0 12px 32px rgba(30,35,22,.24)}
/* Centred tutorial modal, with its actions outside the scrolling copy. */
html.notebook-pages-enabled[data-ui-theme="notebook"] #unity-wrapper #help-panel.ui-panel.help-panel--tutorial {
  position:fixed!important;
  inset:50% auto auto 50%!important;
  width:calc(100vw - 40px)!important;max-width:560px!important;
  height:min(640px,calc(100dvh - 40px))!important;max-height:calc(100dvh - 40px)!important;
  margin:0!important;transform:translate(-50%,-50%)!important;
  translate:none!important;transition:opacity 180ms!important;
  z-index:calc(var(--ui-layer-popup,90) + 2)!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
html[data-ui-theme="notebook"] #unity-wrapper:has(#help-panel.help-panel--tutorial.show:not(.hidden))::after {
  content:"";position:fixed;inset:0;z-index:calc(var(--ui-layer-popup,90) + 1);
  background:rgba(29,54,40,.22);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  pointer-events:auto;
}
html[data-ui-theme="notebook"] #unity-wrapper #help-panel.help-panel--tutorial > .notebook-bookmark-controls,
html[data-ui-theme="notebook"] #help-panel.help-panel--tutorial .blue-content-box-header {display:none!important}
html[data-ui-theme="notebook"] #help-panel.help-panel--minimap-note .paper-panel__visual-stack {display:block!important}
html[data-ui-theme="notebook"] #unity-wrapper #help-panel.help-panel--tutorial .help-panel__body {
  display:block!important;
  inset:0!important;
  padding:28px 24px 28px 36px!important;
  overflow:hidden!important;
}
html[data-ui-theme="notebook"] #help-panel.help-panel--minimap-note .v3-minimap-help {height:100%;min-height:0;gap:20px}
html[data-ui-theme="notebook"] #help-panel.help-panel--minimap-note .v3-minimap-help__reading {
  position:relative;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:2px 4px 4px 0;
}
html[data-ui-theme="notebook"] #help-panel.help-panel--minimap-note .v3-minimap-help__grga {
  top:0;left:4px;height:64px;
}
html[data-ui-theme="notebook"] #help-panel.help-panel--minimap-note .v3-minimap-help h2 {padding-left:72px;min-height:38px;margin:4px 0 0}
html[data-ui-theme="notebook"] #help-panel.help-panel--minimap-note .v3-minimap-help__subtitle {display:block;padding-left:72px;margin:2px 0 22px}
html[data-ui-theme="notebook"] #help-panel.help-panel--minimap-note .v3-minimap-help__row {padding:12px 0}
html[data-ui-theme="notebook"] #help-panel.help-panel--minimap-note .v3-minimap-help__acknowledge {flex:0 0 auto;margin:0;min-height:50px}
html[data-ui-theme="notebook"] #help-panel.help-panel--welcome .welcome-pager {height:100%;min-height:0;gap:16px}
html[data-ui-theme="notebook"] #help-panel.help-panel--welcome .welcome-pager__stage {flex:1;min-height:0;overscroll-behavior:contain}
html[data-ui-theme="notebook"] #help-panel.help-panel--welcome .v3-tutorial .welcome-pager__controls {flex:0 0 auto;padding:0;min-height:50px;display:grid;grid-template-columns:auto auto minmax(112px,1fr);gap:8px;width:100%}
html[data-ui-theme="notebook"] #help-panel.help-panel--welcome .v3-tutorial[data-layout] .welcome-pager__controls button:last-child {
  position:static!important;inset:auto!important;width:auto!important;min-height:50px!important;
  padding:4px 12px;white-space:normal;line-height:1.1;
}
/* Contextual notebook help uses the same centred paper and blur, with its
   acknowledgement outside the scrolling copy. Keep the live notebook behind it. */
html[data-ui-theme="notebook"] body:has(#context-help[data-kind="inventory"]:not([hidden])) #inventory-panel {display:block!important;visibility:visible!important}
html[data-ui-theme="notebook"] #context-help:not([hidden]) {display:grid!important;place-items:center;inset:0;padding:32px;z-index:calc(var(--ui-layer-popup,90) + 4)!important}
html[data-ui-theme="notebook"] #context-help .context-help__backdrop {background:rgba(29,54,40,.22);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
html[data-ui-theme="notebook"] #context-help[data-kind] .context-help__paper {
  position:relative!important;inset:auto!important;transform:none!important;box-sizing:border-box;
  width:min(560px,calc(100vw - 64px))!important;height:min(560px,calc(100dvh - 64px));min-height:0;
  display:flex;flex-direction:column;gap:20px;padding:24px 24px 24px 36px!important;
  background:none!important;border:0!important;box-shadow:none!important;
}
html[data-ui-theme="notebook"] #context-help[data-kind] .context-help__reading {position:relative;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:4px 4px 4px 0}
html[data-ui-theme="notebook"] #context-help[data-kind] .context-help__actions {flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:12px}
html[data-ui-theme="notebook"] #context-help[data-kind] .context-help__grga {inset:0 auto auto 0!important;max-height:none;width:auto;height:64px!important}
html[data-ui-theme="notebook"] #context-help[data-kind] .context-help__paper h2 {padding-left:72px;min-height:38px;margin:0 0 4px;font:700 30px/1.05 var(--font-handwriting)}
html[data-ui-theme="notebook"] #context-help[data-kind] .context-help__subtitle {padding-left:72px;margin:0 0 24px;min-height:20px}
html[data-ui-theme="notebook"] #context-help[data-kind] .context-help__inventory-row {padding:14px 0}
html[data-ui-theme="notebook"] #context-help[data-kind] #context-help-ok {min-height:50px;margin:0}
@media(max-width:360px) {
  /* Give the two notebook headings a full line on the narrowest phones. */
  html[data-ui-theme="notebook"] #inventory-panel:not(.inventory-minimized) .progress-container-header,
  html[data-ui-theme="notebook"] #active-tasks-panel:not(.tasks-minimized) .active-tasks-header {
    display:block;
    padding-top:64px;
  }
  html[data-ui-theme="notebook"] #inventory-panel:not(.inventory-minimized) .notebook-controls-slot,
  html[data-ui-theme="notebook"] #active-tasks-panel:not(.tasks-minimized) .notebook-controls-slot {display:none}
  html[data-ui-theme="notebook"] :is(#index-panel,#help-panel:not(.help-panel--welcome):not(.help-panel--minimap-note)) .panel-title-text {font-size:24px!important}
  html[data-ui-theme="notebook"] #inventory-panel.inventory-minimized .inventory-v3-title,
  html[data-ui-theme="notebook"] #active-tasks-panel.tasks-minimized #active-tasks-title {
    font-size:20px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
}

/* The minimap is a live Unity viewport inside the shared notebook shell. */
/* Hidden map panels retain their stack state during a game. Their :has() focus
   rules must not blur the game's header and footer through the old map cutout. */
html[data-ui-theme="notebook"] #unity-wrapper.hud-suppressed::before{display:none!important}
html[data-ui-theme="notebook"] #unity-wrapper:has(#minimap-panel.show:not(.box-minimized)) :is(#unity-left-ui,#unity-ui > :not(#btn-active-tasks)){
  visibility:hidden;pointer-events:none;
}
html[data-ui-theme="notebook"] #unity-wrapper:has(#minimap-panel.show:not(.box-half,.box-minimized)){--notebook-map-focus:1}
html[data-ui-theme="notebook"] #unity-wrapper:has(#minimap-panel.show:not(.box-minimized))::before{clip-path:var(--minimap-backdrop-clip,none)}
html[data-ui-theme="notebook"] #minimap-panel{pointer-events:none!important}
html[data-ui-theme="notebook"] #minimap-panel .notebook-art-skin{pointer-events:auto}
/* Share the bookmark row, keeping two lines available for longer region names. */
html[data-ui-theme="notebook"] #minimap-panel .notebook-controls-slot{display:none!important}
html[data-ui-theme="notebook"] #minimap-panel .blue-content-box-title{top:16px!important;left:26px!important;width:calc(100% - 212px)!important;max-width:calc(100% - 212px)!important;height:58px!important;display:flex!important;align-items:center}
html[data-ui-theme="notebook"] #minimap-panel .panel-title-text{
  text-transform:uppercase;font:700 clamp(22px,4.8vw,30px)/1.05 var(--font-handwriting)!important;
  white-space:normal!important;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;
}
html[data-ui-theme="notebook"] #minimap-panel-viewport{
  position:absolute;top:90px;left:38px;right:24px;bottom:72px;pointer-events:none;
}
html[data-ui-theme="notebook"] #minimap-panel-help{
  position:absolute;top:auto;right:22px;bottom:16px;width:var(--button-panel-button-size);height:var(--button-panel-button-size);z-index:10;pointer-events:auto;
}
html[data-ui-theme="notebook"] #minimap-panel-help img{width:100%;height:100%;object-fit:contain}
html[data-ui-theme="notebook"] #minimap-panel.box-minimized :is(#minimap-panel-viewport,#minimap-panel-help){display:none}
html[data-ui-theme="notebook"] #minimap-panel.box-minimized .blue-content-box-title{top:30px!important;left:24px!important;width:calc(100% - 200px)!important;max-width:calc(100% - 200px)!important}
html[data-ui-theme="notebook"] #minimap-panel.box-minimized .panel-title-text{font-size:20px!important;white-space:normal!important}

#location-quiz-button:disabled{opacity:.55;cursor:default}
