:root {
    --standard-animation-time: 0.9s;
    --storyture-background: rgb(187,51,182);
    --storyture-color: rgb(187,51,182);
    --storyture-gradient: linear-gradient(357deg, rgba(187,51,182,1) 0%, rgba(249,140,140,1) 94%);
    --text-size: 1em;
    --window-margin: 12px;
    --window-padding: 18px;
    --footer-padding: 20px;
    --border-radius: 7px;
    --color-st-white: #e2e9e8;
    --color-st-black: #333333;
    --color-st-grey: #515151;
    --color-st-grey-light: #706B70;
    --shadow: #00000045;
    --color-st-mauve: #765172;
    --color-st-mauve-bright: #b572b7;
    --color-st-mauve-light: #bd9ece;
    --color-st-mauve-dark: #4A3A4A;
    --color-st-mauve-bright: #B797B5;
    --color-tender-purple: #ddd5e1;
    --color-tender-yellow: #ded7a8;
    --color-white: #dcdcdc;
    --color-hot-pink: #e375df;
    --color-hot-yellow: #ffd504;
    --color-pink: #cb89c5; /* HOVER OVER ME? */
    --color-green: #4ec9b0; /* THE CLICKABLE COLOR */
    --color-blue: #579ed9;
    --color-light-blue: #9fe0ff;
    --color-grey: #717b86;
    --color-grey-fade: #717b8642;
    --color-black: #765173; /* #1f1f1f */
    --color-orange: #d9987e;
    --h3-height: 1em;
    --h4-height: 1em;
    --font-family: futura, sans-serif;
    --nav-allowance: 61px;
}

:root {
    --a: #faf7f7;
    --a-hover: #f98c8c;
    --alert-color: #f85149;
    --background-color: #3b3b4a;
    --background: linear-gradient(0deg, #151515, #292929ab);
    --background-color-transparent: rgb(189 158 206);
    --background-color-inverse: var(--color-st-mauve-dark);
    --border-color: #5a6164;
    --border-color-inverse: #000000;
    --border-radius: 10px;
    --object-filter: saturate(0) brightness(0.8);
    --text-color: #dcdcdc;
    --text-color-inverse: white;
    --box-shadow: 18px 21px 0px 0px var(--shadow);
}


a {
    transition: background-color var(--standard-animation-time) ease-in-out;
}

a:hover {
    background-color: var(--background-color-inverse);
    color: var(--text-color-inverse);
    cursor: pointer;
}

a:hover p {
    color: var(--text-color-inverse);
}

body {
    background-attachment: fixed;
    background-color: var(--background-color);
    color: var(--text-color);
    display: grid;
    font-family: var(--font-family);
    grid-template:
        "main" 1fr
        "footer" auto / 1fr;
    height: 100dvh;
    left: 0;
    margin: 0px;
    overflow-x: hidden;
    padding: 0px;
    top: 0;
    width: 100dvw;
}

#stories {
    width: 70dvw;
    height: 90dvh;
    border-radius: var(--border-radius);
    position: fixed;
    top: 50dvh;
    left: 50dvw;
    transform: translate(-50%, -50%);
    padding: var(--window-padding);
    box-sizing: border-box;
}


#stories .gallery {
  display:flex;
  flex-wrap: wrap;
  gap: var(--window-margin);
}

.story-preview-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 160px;
  height: 220px;
  border: 1px solid var(--border-color);
  box-shadow: var(--box-shadow);
  cursor: pointer;
  gap: var(--window-margin);
  transition: background-color var(--standard-animation-time) ease, transform var(--story-motion-duration) var(--story-motion-easing);
}

.story-preview-card:hover,
.story-preview-card:focus-visible {
  animation: story-card-wiggle 520ms ease-in-out 1;
}

@keyframes story-card-wiggle {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-1px) rotate(-0.2deg); }
  50% { transform: translateX(1px) rotate(0.2deg); }
  75% { transform: translateX(-0.5px) rotate(-0.1deg); }
}

.story-preview-card p {
  width: inherit;
}

.story-preview-card .description {
  color: var(--color-grey);
}

#story {
  position: fixed;
  background: var(--background-color);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--window-padding);
  height: 100dvh;
  max-width: 980px;
  width: min(88dvw, 980px);
  left: 50dvw;
  top: 0;
  transform: translateX(-50%);
  padding: clamp(var(--window-margin), 3vw, 32px);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--box-shadow);
  z-index: 10001;
  animation: story-reader-enter var(--story-motion-duration) var(--story-motion-easing) both;
}

.story-backdrop {
  background: rgb(0 0 0 / 58%);
  inset: 0;
  position: fixed;
  z-index: 10000;
  animation: story-backdrop-enter var(--story-motion-duration) ease-out both;
}

#story.closing {
  animation: story-reader-exit 260ms ease-in both;
}

.story-backdrop.closing {
  animation: story-backdrop-exit 260ms ease-in both;
}

@keyframes story-reader-enter {
  from { opacity: 0; transform: translate(-50%, 28px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes story-reader-exit {
  to { opacity: 0; transform: translate(-50%, 20px); }
}

@keyframes story-backdrop-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes story-backdrop-exit {
  to { opacity: 0; }
}

.story-reader-header {
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex: 0 0 auto;
  gap: var(--window-margin);
  justify-content: space-between;
  padding-bottom: var(--window-margin);
}

#story .close-bttn {
  align-items: center;
  background: transparent;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 8px 12px;
}

#story .close-bttn:hover {
  background: var(--background-color-inverse);
}

#story-content {
  color: var(--text-color);
  flex: 1 1 auto;
  font-family: sans-serif;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.9;
  min-height: 0;
  overflow-y: auto;
  padding: var(--window-margin) clamp(0px, 5vw, 64px);
  scrollbar-gutter: stable;
}

#story-content p {
  color: var(--color-tender-yellow);
  font-family: sans-serif;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.9;
}

.story-chapter-content {
  animation: chapter-content-enter var(--standard-animation-time) ease-out both;
  margin: 0 auto;
  max-width: 68ch;
}

@keyframes chapter-content-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes story-control-wiggle {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-2px) rotate(-0.7deg); }
  50% { transform: translateX(2px) rotate(0.7deg); }
  75% { transform: translateX(-1px) rotate(-0.35deg); }
}

.story-preview-card:focus-visible,
#story button:focus-visible {
  outline: 2px solid var(--color-tender-yellow);
  outline-offset: 3px;
}

.world-transition {
  animation: world-scene-enter var(--story-motion-duration) var(--story-motion-easing) both;
}

@keyframes world-scene-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

#curtain{
    position:fixed;
    z-index:99999;
    width:105vw;
    height:105vh;
    top:-10px;
    background-color:var(--background-color);
}

@keyframes curtain_off {
    0%{
        opacity:1;
    }
    100%{
        opacity:0;
    }
}

button {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    cursor: pointer;
    font-family: var(--font-family);
    padding: 5px 5px;
    outline-color:transparent;
    min-width: -webkit-fill-available;
    min-width: fit-content;
}

button:hover {
    background-color: var(--background-color-inverse);
    color: var(--text-color-inverse);
}

button:hover:disabled {
    background-color: #abaac5;
    color: #745586;
    cursor: not-allowed;
}

h1, h2, h3, h4, h5, p {
    color: var(--text-color);
    margin: 0px;
}

h2 {
    font-size:20px;
    font-weight:normal;
}

h3 {
    font-size:30px;
}

h4 {
    margin: 0px;
}

h5{
    font-size:12px;
}

.enter-scene.opened {
    animation: enter var(--standard-animation-time) ease-in-out forwards;
}

.enter-scene.opened.just-removed {
    animation: unset;
    animation: exit calc(0.5*var(--standard-animation-time)) ease-in-out forwards;
}

@keyframes enter {
    0% {
        opacity: 0;
        scale: 0.8;
    }
    100% {
        opacity: 1;
        scale: 1;
    }
}

@keyframes exit {
    0% {
        opacity: 1;
        scale: 1;
    }
    100% {
        opacity: 0;
        scale: 0.8;
    }
}



p {
    font-family: var(--font-family);
    font-size:12px;
    font-weight:lighter;
    margin: 0px;
}

pre {
    color: var(--background-color-inverse);
    filter: brightness(1.5);
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: lighter;
    height: 1.7em;
    overflow-wrap: break-word;
    margin: 0px;
    text-shadow: 0px 0px 10px var(--background-color-inverse);
}

button::selection, h1::selection, h2::selection, h3::selection, h4::selection, h5::selection, p::selection, pre::selection {
    background-color: var(--background-color-inverse);
    color: var(--background-color);
}

button::-moz-selection, h1::-moz-selection, h2::-moz-selection, h3::-moz-selection, h4::-moz-selection, h5::-moz-selection, p::-moz-selection, pre::-moz-selection {
    background-color: var(--background-color-inverse);
    color: var(--background-color);
}


select {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-sizing: border-box;
}

input {
    background: none;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    outline: none;
    padding: var(--window-margin);
}

input:focus {
    border: 1px solid var(--border-color);
}

textarea {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-family: var(--font-family);
    padding: var(--window-margin);
}
  

.non-selectable, .non-selectable * {
    user-select: none; /* Prevent text selection */
    -webkit-user-drag: none; /* Prevent image dragging in WebKit browsers */
    -moz-user-select: none; /* Prevent text selection in Firefox */
    -ms-user-select: none; /* Pr */
    -webkit-user-select: none; /* Safari */
    -webkit-touch-callout: none; /* iOS Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -webkit-tap-highlight-color: transparent; /* Remove highlight on tap */
}


#footer h5 {
    margin-top:0px;
    margin-bottom:5px;
    padding:0px;
}

#footer a, #footer p{
    margin-top:0px;
    margin-bottom: 0px;
    padding: 0px;
}

a{
    color: var(--a);
    text-decoration: none;
}

.ac{
    align-items:center;
}

.ab{
    align-items:baseline;
}

.c {
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: var(--border-radius);
}

.cent{
    margin-left:auto;
    margin-right:auto;
}

.tt_cent{
    text-align: center;
}

.fr {
    display: -webkit-box;      /* OLD - iOS 6-, Safari 3.1-6 */
    display: -moz-box;         /* OLD - Firefox 19- (buggy but mostly works) */
    display: -ms-flexbox;      /* TWEENER - IE 10 */
    display: -webkit-flex; 
    display:flex;
    gap: var(--window-margin);
}

.fc {
    display: -webkit-box;      /* OLD - iOS 6-, Safari 3.1-6 */
    display: -moz-box;         /* OLD - Firefox 19- (buggy but mostly works) */
    display: -ms-flexbox;      /* TWEENER - IE 10 */
    display: -webkit-flex; 
    display: flex;
    flex-direction: column;
    gap: var(--window-margin);
}

.sb {
    justify-content: space-between;
}

.space{
    height:75px;
    width:100%;
}

form .helptext {
    font-size: 0.7em;
    margin-top: -0.5em;
    opacity: 0.7;
}

#header {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: calc(var(--window-margin)/2) var(--window-margin);
    position: fixed;
    left: 50dvw;
    transform: translate(-50%, 0);
    bottom: var(--window-padding);
    z-index: 100;
    transition: top var(--standard-animation-time) ease-in-out;
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--box-shadow);
}

#feed_expanded{
    overflow-y: scroll;
    overflow-x: hidden;
    border: 1px solid var(--border-color);
    background: var(--storyture-background);
    background: var(--storyture-gradient);
    border-bottom-left-radius:10px;
    border-bottom-right-radius:10px;
    animation: expand_feed .6s ease 0s 1 normal forwards running;
}

#feed_retreat{
    border: 1px solid var(--border-color);
    background: var(--storyture-background);
    border-bottom-left-radius:10px;
    border-bottom-right-radius:10px;
    animation: hide_feed .3s ease 0s 1 normal forwards running;
}

.one_feed{
    padding:7px 11px;
}

.one_feed_txt {
    width:inherit;
    flex-wrap:wrap;
    max-width: 100%;
    overflow-x: hidden;
    border-radius: 10px;
    padding: 2px 19px;
    border: 2px dashed var(--border-color-inverse);
}

#feed_expanded a{
    font-weight: bold; 
}

.feed_seen{
    color: rgba(0, 0, 0, .65);
    background: rgba(255, 255, 255, .15);
}

#feed_expanded .feed_seen a{
    color: rgba(0, 0, 0, .65);
}

.feed_not_seen {
    background: var(--background-color);
}

.add_f{
    border: none;
    background: none;
    background-color: none;
    outline: none;
    cursor: pointer;
    font-size: 12px;
    margin: 0px;
    padding: 0px;
    font-weight: bold;
}

.add_f:hover{
    color: var(--a-hover);
}

.time_feed{
    width: 100%;
    margin-left: auto;
    text-align: right;
    font-style: italic;
}

@keyframes hide_feed{
    0% {
        height:70vh;
    }
    75% {
        opacity:1;
    }
    100% {
        height:0px;
        opacity:0;
    }
}

@keyframes expand_feed{
    0% {
        height:0vh;
        opacity:0;
    }
    15% {
        opacity:1;
    }
    100% {
        height:70vh;
    }
}

@keyframes one_not_hide{
    0% {
        opacity: 1;
        height: 100%;
        line-height: 100%;
        padding: 20px;
        margin-bottom: 10px;
    }
    25% {
        opacity: 0;
        height: 100%;
        line-height: 100%;
        padding: 20px;
        margin-bottom: 10px;
    }
    100% {
        opacity: 0;
        height: 0px;
        line-height: 0px;
        padding: 0px;
        margin-bottom: 0px;
    }
}

.exit_feed{
    position:fixed;
    top:0;
    left:0;
    width:100vw;
    height:100vh;
    z-index:59999;
}

.exit_feed button{
    width:100%;
    height:100%;
    opacity:0;
}

#feed_expanded a{
    cursor:pointer;
}

.remove_feed{
    z-index:40000;
    margin-top:4px;
    margin-right:3px;
    margin-left:auto;
    border:none;
    background:none;
    outline:none;
    height:20px;
    width:20px;
    cursor: pointer;
}

.i_expand{
    width:100%;
    height:100%;
    opacity:0;
}

.nav_down, .nav_top, .n_nav_down, .n_nav_top{
    transition: top var(--standard-animation-time) ease-in-out,bottom .4s ease-in-out;
}

.nav_down{
    top: -30px;
  }

.nav_top{
    top:-80px;
  }

.n_nav_down{
    top: 41px
}

.n_nav_top{
    top: -80px
}

.g{
    display:grid;
    grid-template-rows: 1;
    grid-template-columns: 1;
}

.gg{
    grid-area: 1/1/1/1;
}

#navigator button{
    border: none;
    z-index: 100;
}

#navigator button.active img {
  filter: unset;
}

#navigator button:hover img {
  filter: unset;
}

#navigator img {
    height: 30px;
    width: 30px;
    pointer-events: none;
    filter: saturate(0.1) brightness(0.5);
}

@font-face {
    font-family: 'buenard';
    src: url('/static/fonts/Buenard-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'bebasneue';
    src: url('/static/fonts/BebasNeue-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

#mailbox {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    display: none;
    font-size: var(--text-size);
    justify-self: center;
    padding: var(--window-margin);
    position: absolute;
    top: var(--nav-allowance);
    width: fit-content;
    z-index: 100000;
}

#changetheme {
    position: fixed;
    right: var(--window-margin);
    top: var(--window-margin);
    z-index: 2;
}

#changetheme .button-wrapper {
    border-radius: 50%;
    display: flex;
    height: 30px;
    padding: 1px;
    width: 30px;
}


#changetheme .button-wrapper::after {
    content: "";
    display: inline-block;
    background-image: url(/static/icons/dayTheme.png);
    background-size: contain;
    background-repeat: no-repeat;
    width: 30px;
    height: 30px;
}

#changetheme.day .button-wrapper::after {
    content: "";
    background-image: url(/static/icons/nightTheme.png);
}

#mailbox.active {
    display: block;
}

#mailbox.info {
    background-color: var(--background-color);
}

#mailbox.error {
    background-color: var(--alert-color);
}


#mobile-keyboard {
    bottom: 10dvh;
    box-sizing: border-box;
    display: none;
    height: 30dvh;
    left: 0;
    padding: var(--window-margin);
    pointer-events: all;
    position: absolute;
    width: 100dvw;
    z-index: 1000;
}

#mobile-keyboard.active {
    display: grid;
    grid-template: "keyboard" auto / 1fr;
}

#mobile-keyboard .keyboard-row {
    display: flex;
    gap: var(--window-margin);
    justify-content: space-around;
    padding: 0px var(--window-margin);
}


#mobile-keyboard .keyboard-key {
    background-color: var(--background-color-transparent);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    flex-grow: 1;
}

#mobile-keyboard .keyboard-key.pressed {
    background-color: var(--background-color);
}

.change-btns {
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    gap: var(--window-margin);
    height: fit-content;
    width: fit-content;
}

#loading-screen {
    align-items: center;
    background: var(--background-color-inverse);
    color: var(--background-color);
    display: flex;
    font-family: bebasneue;
    font-size: 24px;
    height: 100dvh;
    justify-content: center;
    left: 0;
    position: absolute;
    top: 0;
    width: 100dvw;
    z-index: 0;
}

#settings-panel {
  animation: modal-pop 220ms ease-out both;
  gap: var(--window-padding);
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  display: none;
  flex-direction: column;
  padding: var(--window-padding);
  align-items: center;
  left: 50dvw;
  top: 50dvh;
  transform: translate(-50%, -50%);
  position: fixed;
  box-sizing: border-box;
  z-index: 10;
}

#settings-panel.visible {
  display: flex;
  z-index: 10;
}

#open-settings-bttn {
  align-items: center;
  display: flex;
  gap: 8px;
  position: fixed;
  top: var(--window-padding);
  right: var(--window-padding);
  width: auto;
  height: 42px;
  padding: 0 10px;
  border: none;
  border-radius: 21px;
  z-index: 11;
}

#open-settings-bttn .settings-lang {
  font-size: 13px;
  text-transform: capitalize;
}

#open-settings-bttn img {
  height: 26px;
  width: 26px;
}

#open-settings-bttn img {
  filter: brightness(1.8);
}

#open-settings-bttn img:hover {
    animation: spin_wheel 0.45s linear 0s infinite;
}

@keyframes spin_wheel {
    0%{
        transform: rotate(0deg);
    }
    100%{
        transform: rotate(360deg);
    }
}

#navigator{
    display: flex;
    transform: translate(0px, 2px);
}

.bw {
    filter: var(--object-filter);
}

.bw:hover {
  filter: unset;
}

#navigator object {
    margin-top:3px;
    width: 30px;
    height: 30px;
    transition: width .1s, height .1s;
}

#navigator .button-wrapper {
    background: none;
    border: none;
    filter: brightness(0);
    opacity: 0.6;
    padding: 0px;
    transition: opacity var(--standard-animation-time);
}

#navigator div.active .button-wrapper {
    filter: brightness(1);
    opacity: 1;
}

#navigator .button-wrapper:hover{
    filter: unset;
    opacity: 1;
}

#model-view-root {
    position: absolute;
    top: 0px;
    left: 0px;
    z-index: 100;
}

#model-view {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    height: 70dvh;
    left: 15dvw;
    opacity: 0;
    padding: var(--window-padding);
    pointer-events: none;
    position: absolute;
    scale: 0.8;
    top: 14dvh;
    visibility: hidden;
    width: 70dvw;
}

#model-view.opened {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

#footer{
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
    bottom: 0px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: var(--window-margin);
    grid-area: footer;
    left: 0px;
    padding: var(--footer-padding);
    position: fixed;
    transform: translate(0px, 100%);
    transition: transform calc(2 * var(--standard-animation-time));
    width: 100dvw;
    z-index: 100;
}

#footer.open {
    transform: translate(0px, 0px);
}

#footer > .fc:first-child p, #footer > .fc:first-child h5 {
    text-align: left;
    width: 100%
}

#footer .fc {
    align-items: flex-end;
    flex: 1 1 0;
}

#footer .fc p, #footer .fc h5 {
    text-align: right;
    width: 100%;
}

#footer div{
    margin: 0px 10px;
}

#footer-lever {
    position: absolute;
    right: 120px;
    transform: translate(0px, -59px);
    transition: transform var(--standard-animation-time);
}

#footer-lever .button-wrapper {
    border-radius: var(--border-radius) var(--border-radius) 0px 0px;
    border-bottom: 1px solid var(--background-color);
}

#footer-lever .button-wrapper:hover {
    border-bottom: 1px solid var(--border-color);
}

.ft_col{
    width: 60%;
    justify-content: space-between;
}


#copyright{
    align-items: center;
    justify-content: space-between;
    flex-basis: 100%;
}

#handle-foot{
    height: 25px;
    border-left: 2px solid var(--border-color);
    border-right: 2px solid var(--border-color);
    width: 65vw;
}


#header.collapsable {
    overflow: hidden;
    transition: max-height 1.4s cubic-bezier(0.4, 0, 0.2, 1), max-width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 56px;
    max-width: 56px;
}

#header.collapsable.collapsed {
    max-height: 56px;
    max-width: 56px;
}

#header.collapsable:not(.collapsed) {
    max-height: 400px;
    max-width: 400px;
}

#header.collapsable .fr.cent > * {
    width: 100%;
}

@keyframes butt_reveal{
    0%{
      transform: translate(0px, 0px);
    }
    100%{
      transform: translate(0px, -5vh);
    }
  }

@keyframes foot_reveal{
    0%{
      transform: translate(0px, -5vh);
    }
    100%{
      transform: translate(0px, -86vh);
    }
  }

  @keyframes foot_hide{
    0%{
      transform: translate(0px, -86vh);
    }
    100%{
      transform: translate(0px, -5vh);
    }
  }

@keyframes scroll{
    0%{
      transform: translate(0px, 0px);
    }
    70%{
      transform: translate(-40px, 0px);
    }
    100%{
      transform: translate(0px, 0px);
    }
  }
  
  @keyframes scroll_col{
    0%{
      transform: translate(0px, 0px);
    }
    70%{
      transform: translate(0px, -40px);
    }
    100%{
      transform: translate(0px, 0px);
    }
  }


@media screen and (max-width: 600px) {
    body {
        max-width: 100%;
        overflow-x: hidden;
    }
    #footer{
        bottom: 65px;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--window-margin);
        left: 22dvw;
        transform: translate(112%, 0);
        width: 70dvw;
    }
    #footer-lever {
        bottom: 30px;
        left: -50px;
        transform: rotate(90deg) translate(0px, 0px);
    }
    #footer-lever .button-wrapper {
        border: 1px solid var(--border-color);
        border-radius: 0px 0px var(--border-radius) var(--border-radius);
        transform: rotate(0deg);
    }
    #footer.open {
        left: 15dvw;
    }
    #footer div {
        margin: 0px;
    }
    #footer > .fc:first-child p, #footer > .fc:first-child h5 {
        text-align: center;
        width: 100%
    }
    #footer .fc p, #footer .fc h5 {
        text-align: center;
        width: 100%;
    }
    #footer .fc {
        align-items: center;
        flex: auto;
    }
    #footer text{
        text-align: center;
    }
    #header{
        width: 20px;
        box-shadow: 10px 17px 16px 0px #00000038;
        width: fit-content;
        height: fit-content;
    }
    #navigator object {
        height: 36px;
        width: 36px;
    }
    #navigator span {
        opacity: 1;
    }
    .ft_col,#copyright{
        flex-direction: column;
        width: 100%;
        align-items: center;
    }
    .ft_col div{
        text-align: center;
    }
}

#planet {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100dvw;
    height: 100dvh;
    pointer-events: auto;
}

#planet-hud {
    position: fixed;
    top: 0px;
    left: 0px;
    box-shadow: inset 0 0 0 12px var(--border-color-inverse), inset 0 0 0 13px var(--border-color);
    width: 100dvw;
    height: 100dvh;
    z-index: 10000;
    pointer-events: auto;
}

#main.toPoint {
    cursor: pointer;
}

.floating-scene {
    color: var(--text-color);
    display: none;
    justify-self: end;
    height: 100%;
    overflow-y: scroll;
    text-align: right;
    width: 100%
}

.floating-scene.active {
    display: block;
}

.floating-scene h2 {
    margin-top: 0px;
    font-size: 1em;
    color: var(--text-color);
}

#heading {
    align-self: flex-end;
    bottom: var(--padding);
    color: var(--base-color);
    cursor: default;
    font-family: fangsong;
    grid-area: main;
    justify-self: center;
    left: var(--padding);
    margin-bottom: var(--padding);
    text-align: center;
    text-shadow: 0px 0px 1px var(--sidekick-color);
    z-index: 2;
}

#dream-navigator {
    align-self: center;
    cursor: grab;
    display: none;
    grid-area: main;
    grid-template: "main" 1fr / 1fr;
    height: 350px;
    justify-self: center;
    pointer-events: all;
    -webkit-user-select: none;
    user-select: none;
    width: 200px;
}

#nav-bg {
    background-color: #afafaf;
    border: 2px solid #51535b;
    border-radius: 20px;
    box-shadow: -1px -1px 20px 1px var(--accent-color);
    box-sizing: border-box;
    grid-area: main;
    height: auto;
    width: 200px;
}

#nav-icon {
    background: none;
    border: none;
    cursor: pointer;
    pointer-events: all;
    right: 0px;
    top: 9px;
    position: absolute;
    transition: transform 0.2s;
}

#nav-icon:hover {
    transform: scale(1.1)
}

#scene-levers-container {
    border-left: 2px solid var(--border-color);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: var(--window-margin);
    left: calc(3 * var(--window-margin));
    opacity: 0.2;
    padding-left: var(--window-margin);
    position: absolute;
    top: calc(3 * var(--window-margin));
    transition: opacity var(--standard-animation-time);
    max-height: 80px;
    overflow-y: scroll;
}

#scene-levers-container:hover {
    opacity: 1
}

.lever .button-wrapper {
    background: none;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}


.lever.active .button-wrapper {
    background-color: var(--background-color-inverse);
    color: var(--text-color-inverse);
}

.lever:hover .button-wrapper {
    background-color: var(--background-color-inverse);
    color: var(--text-color-inverse);
}

#message-box {
    background-color: var(--background-color);
    border: var(--window-padding) solid var(--background-color);
    border-radius: calc(2 * var(--border-radius));
    box-shadow: 0px 0px 13px 3px #1717194f;
    box-sizing: border-box;
    color: var(--text-color);
    display: none;
    flex-direction: column;
    gap: var(--window-margin);
    height: 60dvh;
    overflow-y: scroll;
    position: fixed;
    left: 30dvw;
    outline: 1px solid var(--border-color);
    text-align: justify;
    top: 20dvh;
    width: 40dvw;
    z-index: 1000000;
    pointer-events: all;
}

#message-box img {
    border: 0.5px solid var(--border-color);
    border-radius: var(--border-radius);
}

#message-box.active {
    display: flex;
}

#message-box p {
    color: var(--text-color);
}

#a-dreaming-hud {
    background-color: var(--padding);
    box-sizing: border-box;
    display: grid;
    grid-template: "main" 1fr / 1fr;
    height: 100dvh;
    left: 0px;
    padding: calc(5px + var(--window-margin));
    pointer-events: none;
    position: absolute;
    top: 0px;
    transition: border 0.5s;
    width: 100dvw;
    z-index: 2;
}

#warning-box {
    box-shadow: inset 0px 0px 20px 12px var(--alert-color);
    display: none;
    grid-area: main;
}

#a-dreaming-hud.warning #warning-box {
    display: block;
}

@media only screen and (max-width: 600px) {
    #root {
        box-sizing: border-box;
        grid-area: root;
        display: grid;
        grid-template:
            "heading" auto
            "main" 1fr
            "." calc(var(--padding)/2)
            "introduction-levers" auto
            "." calc(var(--padding)/4)
            "utility-levers" auto
            / 1fr;
        height: 100dvh;
        width: 100dvw;
    }
    #main {
        flex-direction: column;
        gap: var(--padding);
        height: 100%;
        justify-content: unset;
        overflow-y: scroll;
    }
    #introduction-levers-container {
        justify-content: center;    
        font-size: 1.156em;
    }
    .floating-scene {
        height: fit-content;
        text-align: justify;
        overflow-y: unset;
    }
    #introduction-container {
        height: fit-content;
        overflow-y: unset;
    }
    #introductory-text {
        text-align: justify;
    }
    #message-box{
        left: 10dvw;
        top: 15dvh;
        width: 80dvw;
        height:70dvh;
    }

}


html  {
  overflow: hidden;
  overscroll-behavior: none;
  --store-open-height: 150px;
  --about-panel-edge-inset: 20dvw;
  --production-panel-width: 74dvw;
  --production-panel-edge-inset: calc((100dvw - max(var(--production-panel-width), 320px)) / 2);
  --story-motion-duration: 1.1s;
  --story-motion-easing: cubic-bezier(0.22, 1, 0.36, 1);
  --store-motion-duration: var(--story-motion-duration);
  --store-motion-easing: var(--story-motion-easing);
}

body:has(#universes.open) #wrapper {
  pointer-events: none;
  z-index: 0;
}

h1,h2,h3,h4{
  text-align:center;
}

#wrapper {
  border: 1px solid var(--border-color);
  box-sizing: border-box;
  margin: 12px;
  outline: 12px solid var(--border-color-inverse);
  overflow: hidden;
  grid-area: main;
}

#about, #store {
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-sizing: border-box;
  height: 100%;
  max-height: 70dvh;
  overflow: visible;
  padding: var(--window-margin) var(--window-padding) var(--window-padding) var(--window-padding);
  width: 60dvw;
}

#about {
  border-radius: 0;
  border-bottom: none;
  border-left: none;
  border-top: none;
  bottom: 0;
  height: auto;
  left: 0;
  max-height: none;
  overflow-y: auto;
  position: fixed;
  top: 0;
  transform: translateX(-100%);
  transition: transform var(--store-motion-duration) var(--store-motion-easing), box-shadow var(--store-motion-duration) ease;
  width: min(440px, 90dvw);
  z-index: 9500;
}

#store .mass {
  height: 100%;
  overflow-y: scroll;
}

#about .mass {
  height: 100%;
  overflow-y: scroll;
  font-family: sans-serif;
  line-height: 1.8em;
  font-weight: 200;
}

#about .mass p {
  margin-bottom: 1em;
}


#about p, #store p {
  font-size: 14px;
  line-height: 1.5;
  font-family: sans-serif;
}

#about h1, #about h2, #about h3,
#store h1, #store h2, #store h3 {
  margin: 16px;
}

#about h3, #store h3 {
  font-size: 20px;
  font-weight: normal;
}

#about.open {
  box-shadow: 12px 0 32px rgb(0 0 0 / 35%);
  transform: translateX(0);
}

#store {
    background-color: var(--background-color);
    border-bottom: none;
    border-left: none;
    border-radius: 0px;
    border-right: none;
    bottom: 0px;
    box-sizing: border-box;
    height: var(--store-open-height);
    left: 0px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: var(--footer-padding);
    position: fixed;
    right: auto;
    top: auto;
    display: flex;
    flex-direction: column;
    align-items: baseline;
    gap: var(--window-padding);
    transform: translate(0px, 100%);
    transition: transform var(--store-motion-duration) var(--store-motion-easing);
    width: 100dvw;
    z-index: 100;
}

#store.open {
  transform: translate(0px, 0px);
}

#store .links {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: var(--window-margin);
  justify-content: center;
}

.store-link {
  padding: 4px var(--window-padding);
  font-family: sans-serif;
}

/* Vertical tab on the left edge that slides out together with the about panel. */
#about-lever {
  position: fixed;
  left: 0;
  top: 30%;
  padding: 14px 8px;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  box-shadow: var(--box-shadow);
  color: var(--color-grey);
  font-size: 14px;
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
  transition: translate var(--store-motion-duration) var(--store-motion-easing);
  z-index: 9400;
}

#about-lever.open {
  translate: min(440px, 90dvw) 0;
}

@media screen and (max-width: 600px) {
  #about-lever.open {
    translate: 80dvw 0;
  }
}

.drawer-backdrop {
  background: rgb(0 0 0 / 55%);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 280ms ease;
  z-index: 9300;
}

.drawer-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.settings-backdrop {
  z-index: 9;
}

#store-lever {
  bottom: 0px;
  position: fixed;
  right: 100px;
  transform: translate3d(0px, 0px, 0px);
  transition: transform var(--store-motion-duration) var(--store-motion-easing), translate 180ms ease-out;
  z-index: 99;
  font-size: 16px;
  color: var(--color-grey);
  padding: 8px;
  border-radius: var(--border-radius) var(--border-radius) 0px 0px;
  box-shadow: var(--box-shadow);
}

#store-lever.open {
  transform: translate3d(0px, calc(-1 * var(--store-open-height, 0px)), 0px);
}

#store-lever .button-wrapper {
  border-radius: 0px 0px var(--border-radius) var(--border-radius);
  border-top: none;
}

#about-lever .button-wrapper {
  border-radius: var(--border-radius) var(--border-radius) 0px 0px;
  border-bottom: none;
}

#store-lever .button-wrapper {
  border-radius: var(--border-radius) var(--border-radius) 0px 0px;
  border-bottom: 1px solid var(--background-color);
  border-top: 1px solid var(--border-color);
}

#store-lever .button-wrapper:hover {
  border-bottom: 1px solid var(--border-color);
}

#about-lever:not(.open):hover {
  translate: 4px 0px;
}

#production-design-lever:hover {
  translate: -4px 0px;
}

#about a, #store a {
  border-bottom: 1px solid var(--background-color-inverse);
  cursor: pointer;
  transition: background-color 0.1s ease-in-out;
}

#store .mass {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: var(--window-margin);
  justify-content: center;
  margin: 0 auto;
  max-width: 900px;
  overflow-y: auto;
  text-align: center;
}

#store a {
  align-self: flex-start;
  padding-bottom: 2px;
  text-decoration: none;
}

#store-link {
  min-width: 140px;
}

#universes {
  transition: left var(--story-motion-duration) var(--story-motion-easing);
  position: absolute;
  display: grid;
  grid-template: "map" 1fr / 1fr;
  height: 78dvh;
  width: 80dvw;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 0px 0px 14px 0px black;
  top: 11dvh;
  left: 100dvw;
  overflow: visible;
}

#universes.open {
  left: 10dvw;
  z-index: 10;
}

#universe-lever {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: var(--window-margin);
  position: absolute;
  left: 0px;
  top: 40px;
  transition: transform var(--story-motion-duration) var(--story-motion-easing);
  transform: translate(-47px, 0px) rotate(270deg);
}

#universe-lever.open {
  transform: translate(-50px, 0px) rotate(270deg);
}

#universe-lever .button-wrapper {
  border-radius: 0px 0px var(--border-radius) var(--border-radius);
  text-align: center;
  transition: width var(--story-motion-duration) var(--story-motion-easing);
  width: 100%;
  transform: rotate(180deg);
}

.storyture-home-content {
  position: fixed;
  inset: 42px 28px 28px;
  z-index: 8;
  overflow: auto;
  padding: 8px 12px 40px;
  box-sizing: border-box;
  scrollbar-gutter: stable;
}

.storyture-home-section {
  margin: 0 auto 42px;
  max-width: 1440px;
}

.gallery-heading {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.gallery-heading h1,
.gallery-heading h2 {
  margin: 0;
  text-align: left;
}

.eyebrow,
.concept-kind {
  color: var(--color-grey);
  font-size: 11px;
  letter-spacing: 0.12em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.concept-search input {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  box-sizing: border-box;
  color: var(--text-color);
  font-size: 14px;
  min-width: min(420px, 80vw);
  padding: 12px 16px;
}

.concept-gallery,
.published-story-gallery {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.concept-gallery-card {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  padding: 0 0 12px;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.concept-gallery-card:hover,
.concept-gallery-card:focus-visible {
  box-shadow: 12px 14px 0 var(--shadow);
  transform: translateY(-3px);
}

.concept-gallery-card img {
  aspect-ratio: 4 / 3;
  background: var(--background-darker-color);
  object-fit: cover;
  width: 100%;
}

.concept-gallery-card span {
  font-weight: 600;
  padding: 0 12px;
}

.gallery-empty,
.gallery-error {
  color: var(--color-grey);
  padding: 16px 0;
}

.gallery-error {
  color: #ff9a9a;
}

.concept-modal-backdrop {
  animation: backdrop-fade 240ms ease-out both;
  align-items: center;
  background: rgb(0 0 0 / 72%);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 40;
}

.concept-modal {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 16px 18px 0 var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  max-height: min(86vh, 900px);
  max-width: 1080px;
  overflow: auto;
  position: relative;
  width: min(100%, 1080px);
}

.concept-modal-close {
  background: rgb(0 0 0 / 65%);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: white;
  font-size: 28px;
  height: 42px;
  line-height: 1;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 42px;
  z-index: 1;
}

.concept-modal-image {
  background: var(--background-darker-color);
  height: 100%;
  max-height: 78vh;
  object-fit: contain;
  width: 100%;
}

.concept-modal-copy {
  overflow-y: auto;
  padding: 32px;
}

.concept-modal-copy h2 {
  margin: 8px 0 14px;
  text-align: left;
}

.concept-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.concept-tags span {
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 12px;
  padding: 6px 10px;
}

.stories-section {
  border-top: 1px solid var(--border-faded-color);
  padding-top: 26px;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.story-mode-toggle {
  display: flex;
  gap: 6px;
}

.story-mode-toggle button {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  opacity: 0.55;
  padding: 8px 12px;
}

.story-mode-toggle button.active {
  border-color: var(--text-color);
  opacity: 1;
}

.published-film-gallery {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.film-card {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  padding: 0 0 12px;
  text-align: left;
}

.film-card img,
.film-card-placeholder {
  aspect-ratio: 16 / 9;
  background: var(--background-darker-color);
  object-fit: cover;
  width: 100%;
}

.film-card-placeholder {
  align-items: center;
  display: flex;
  font-size: 40px;
  justify-content: center;
}

.film-card strong,
.film-card .description {
  padding: 0 12px;
}

.film-card .description {
  color: var(--color-grey);
  font-size: 13px;
}

.film-modal {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  max-height: 90vh;
  max-width: 1080px;
  overflow: auto;
  position: relative;
  width: min(100%, 1080px);
}

.film-modal video {
  background: black;
  display: block;
  max-height: 72vh;
  width: 100%;
}

.film-modal-copy {
  padding: 16px 24px 24px;
}

.film-modal-copy h2 {
  margin: 0 0 8px;
  text-align: left;
}

.published-story-gallery .story-preview-card {
  box-sizing: border-box;
  height: auto;
  min-height: 190px;
  padding: 16px;
  text-align: left;
  width: auto;
}

.published-story-gallery .story-preview-card strong {
  color: var(--text-color);
  font-size: 17px;
}

.published-story-gallery .story-preview-card .description {
  color: var(--color-grey);
  font-size: 13px;
}

@media (max-width: 700px) {
  .storyture-home-content {
    inset: 60px 10px 84px;
    padding: 6px 6px 28px;
  }

  .gallery-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .concept-search input {
    min-width: 0;
    width: 100%;
  }

  .concept-gallery,
  .published-story-gallery {
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  }

  .concept-modal-backdrop {
    padding: 12px;
  }

  .concept-modal {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }

  .concept-modal-image {
    max-height: 48vh;
  }

  .concept-modal-copy {
    padding: 22px;
  }
}

#production-design {
    position: absolute;
    top: 50dvh;
    right: var(--window-margin);
    width: var(--production-panel-width);
    right: 50dvw;
    min-width: 320px;
    height: 80dvh;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    display: grid;
    margin: 0px;
    padding: var(--window-padding);
    z-index: 12;
    overflow: hidden;
    contain: layout paint;
    transition: transform var(--story-motion-duration) var(--story-motion-easing);
    transform: translate(200%, -50%);
    box-shadow: 19px 20px 0px 0px var(--shadow);
}

#production-design select {
  position: absolute;
  right: var(--window-padding);
}

#production-design.open {
  opacity: 1;
  transform: translate(50%, -50%);
}

#production-design-lever {
  right: -40px;
  top: 140px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 76px;
  position: fixed;
  transform: translate(0px, 0px);
  opacity: 0.96;
  z-index: 11;
  font-size: 16px;
  padding: 20px 8px;
  transition: right var(--store-motion-duration) var(--store-motion-easing), transform var(--store-motion-duration) var(--store-motion-easing), translate 180ms ease-out;
  box-shadow: 19px 20px 0px 0px var(--shadow);
}


#production-design-lever.open {
  right: calc(100dvw - var(--production-panel-edge-inset) - min(40px, var(--production-panel-edge-inset)));
  transform: translateX(0px);
}


#production-design-lever p {
    width: 1em;
    height: 1.3em;
    font-size: 16px;
    color: var(--color-grey);
}

#production-design-lever .button-wrapper {
  border-radius: var(--border-radius);
  text-align: center;
  width: auto;
  transform: none;
}

#production-design:not(.open) .production-design-card img {
  display: none;
}

.production-design-heading {
  grid-area: heading;
  margin: 0px;
  text-transform: lowercase;
}

.production-design-subheading {
  grid-area: subheading;
  margin: 0px;
  font-size: 12px;
}

.production-design-gallery {
  border-top: 1px solid var(--border-color);
  display: grid;
  gap: var(--window-margin);
  grid-area: gallery;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  overflow-y: auto;
  padding-top: var(--window-margin);
  justify-content: center;
  text-align: center;
}

.production-design-card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: zoom-in;
  display: grid;
  gap: 6px;
  margin: 0px;
  overflow: hidden;
  padding: 6px;
}

@keyframes annotation-card-wiggle {
  0% {
    transform: rotate(0deg) translateX(0px);
  }
  25% {
    transform: rotate(-1deg) translateX(-1px);
  }
  50% {
    transform: rotate(1deg) translateX(1px);
  }
  75% {
    transform: rotate(-0.6deg) translateX(-1px);
  }
  100% {
    transform: rotate(0deg) translateX(0px);
  }
}

.production-design-card:hover,
.production-design-card:focus-visible {
  animation: annotation-card-wiggle 280ms ease-in-out 1;
}

.production-design-card:focus-visible {
  outline: 2px solid var(--text-color);
  outline-offset: 2px;
}

.production-design-card img {
  border-radius: calc(var(--border-radius) - 4px);
  display: block;
  height: 150px;
  object-fit: cover;
  width: 100%;
}

.production-design-caption {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.production-design-tags {
  color: var(--text-color-fade);
  font-size: 11px;
}

.production-design-empty {
  color: var(--text-color-fade);
  font-size: 13px;
  margin: 0px;
}

.annotation-viewer {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 72%);
  backdrop-filter: blur(3px);
  display: none;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
  z-index: 9999;
}

.annotation-viewer.open {
  display: grid;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  z-index: 2147483647;
  transition: opacity 220ms ease;
}

.annotation-viewer-image {
  display: none;
}

.annotation-viewer:not(.open) .annotation-viewer-image {
  display: none;
}

.annotation-viewer.open.has-image .annotation-viewer-image {
  display: block;
}

.annotation-viewer-panel {
  border: 1px solid #d0d0d014;
  border-radius: var(--border-radius);
  box-shadow: 0 18px 44px rgb(0 0 0 / 35%);
  box-sizing: border-box;
  display: grid;
  gap: var(--window-margin);
  grid-template: "header" auto "stage" 1fr / 1fr;
  height: min(88dvh, 860px);
  padding: var(--window-padding);
  width: min(92dvw, 1240px);
}

.annotation-viewer-header {
  align-items: center;
  display: flex;
  gap: var(--window-margin);
  justify-content: space-between;
}

.annotation-viewer-title {
  margin: 0px;
  font-size: 14px;
}

.annotation-viewer-controls {
  display: flex;
  gap: 6px;
}

.annotation-viewer-controls button,
.annotation-viewer-close {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-color);
  cursor: pointer;
  min-height: 32px;
  min-width: 32px;
  padding: 4px 10px;
}

.annotation-viewer-stage {
  align-items: center;
  background: rgb(0 0 0 / 8%);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: default;
  display: flex;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  position: relative;
  touch-action: none;
  user-select: none;
}

.annotation-viewer-stage.annotation-viewer-pannable {
  cursor: grab;
}

.annotation-viewer-stage.annotation-viewer-panning {
  animation: none;
  border-radius: 0px;
  cursor: grabbing;
  transition: none;
}

.annotation-viewer-image {
    max-height: 100%;
    max-width: 100%;
  top: 50%;
  left: 50%;
  position: absolute;
    z-index: 11;
    will-change: transform;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

  .annotation-viewer-stage.annotation-viewer-panning .annotation-viewer-image {
    animation: none;
    border-radius: 0px;
    transition: none;
  }

#universe-list {
  background-color: var(--background-color);
  border-right: 1px solid var(--border-color);
  border-radius: var(--border-radius) 0px 0px var(--border-radius);
  box-sizing: border-box;
  flex-direction: column;
  grid-area: list;
  gap: var(--window-margin);
  overflow-y: scroll;
  padding: var(--window-margin);
  transition: max-height var(--standard-animation-time);
  width: 100%;
  z-index: 20;
}

#universe-list .pty-button {
  width: 100%;
}

#universe-list .button-wrapper {
  border: none;
  width: 100%;
}

.map-wrapper {
  background-color: var(--background-color);
  cursor: grab;
  display: none;
  grid-template: "main" 1fr / 1fr;
  grid-area: map;
  align-self: center;
  justify-self: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: var(--border-radius);
  z-index: 3;
}

.map {
  cursor: grab;
  display: grid;
  grid-template: "main" 1fr / 1fr;
  width: fit-content;
}

.map-wrapper.open {
  display: grid;
}

.map object {
  height: 100%;
  width: auto;
  pointer-events: none;
}

.map.dragging {
  cursor: grabbing;
}


.pin {
  background: none;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  grid-area: main;
  height: 30px;
  padding: 0px;
  position: absolute;
  width: 30px;
  z-index: 2;
}

.pin .button-wrapper {
  background-color: var(--color-grey-fade);
  border-radius: 50%;
  box-sizing: border-box;
  border: 5px solid var(--background-color-transparent);
  height: 25px;
  padding: 0px;
  width: 25px;
  overflow: hidden;
}

.pin .button-wrapper:hover {
  border-radius: 50%;
  box-shadow: 0px 0px 20px 0px var(--color-pink);
  height: 25px;
  padding: 0px;
  width: 25px;
  overflow: hidden;
}

.pin .tooltip {
  background-color: var(--background-color);
  border: 0.5px solid var(--background-color-inverse);
  box-shadow: 0px 0px 14px 3px var(--background-color);
}

.pin .tooltip p {
  color: var(--text-color);
}

.pin .button-wrapper:first-child {
  width: 100%;
}

.story-showcase-wrapper {
    align-self: center;
    justify-self: center;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    display: none;
    grid-gap: var(--window-padding);
    grid-area: map;
    grid-template:
        "heading stories" auto
        "description stories" 1fr / 1fr 3fr;
    height: -webkit-fill-available;
    padding: var(--window-padding);
    position: absolute;
    margin: var(--window-margin);
    text-align: right;
    transition: width 0.5s, left 0.5s;
    z-index: 10;
}

.story-showcase-wrapper.open {
  display: grid;
  animation: fadeIn var(--standard-animation-time) ease-in-out;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

#story-content {
  font-family: sans-serif;
  line-height: 1.9em;
  color: var(--color-tender-yellow);
  overflow-y: scroll;
}

#story-chapters {
display: flex;
  overflow-x: scroll;
  gap: var(--window-margin);
  height: fit-content;
  min-height: 42px;
}

#story-chapters button {
  padding: var(--window-margin);
  background: var(--color-grey-fade);
}

#story-chapters button:hover {
  background:var(--background-color-inverse);
}

#story-chapters button.active {
  background: var(--color-tender-yellow);
  color: var(--color-st-grey);
}

#story #story-chapters {
  display: block;
  flex: 0 1 auto;
  min-height: 0;
  overflow: visible;
  position: relative;
  width: min(52vw, 420px);
}

#story-chapters .chapter-menu-toggle {
  align-items: center;
  background: transparent;
  display: flex;
  gap: var(--window-margin);
  justify-content: space-between;
  max-width: 100%;
  min-height: 42px;
  overflow: hidden;
  padding: 8px 12px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.chapter-menu-indicator {
  flex: 0 0 auto;
  transition: transform 180ms ease-out;
}

#story-chapters.expanded .chapter-menu-indicator {
  transform: rotate(180deg);
}

#story-chapters .chapter-list {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  display: none;
  left: 0;
  max-height: min(48dvh, 420px);
  overflow-y: auto;
  padding: 6px;
  position: absolute;
  top: calc(100% + 8px);
  width: 100%;
  z-index: 2;
}

#story-chapters.expanded .chapter-list {
  animation: chapter-menu-enter 180ms ease-out both;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#story-chapters .chapter-list button {
  background: transparent;
  border: 0;
  text-align: left;
  transition: background-color 160ms ease, color 160ms ease;
  width: 100%;
}

#story-chapters .chapter-list button:hover,
#story-chapters .chapter-list button:focus-visible {
  background: var(--background-color-inverse);
  color: var(--text-color-inverse);
}

#story-chapters .chapter-list button.active {
  background: var(--color-tender-yellow);
  color: var(--color-st-grey);
}

@keyframes chapter-menu-enter {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.store-link:hover,
.store-link:focus-visible {
  animation: story-control-wiggle 320ms ease-in-out 1;
}

.production-design-card:hover,
.production-design-card:focus-visible {
  animation: story-control-wiggle 320ms ease-in-out 1;
}

.story-showcase-wrapper.empty {
  grid-template:
    "heading" auto
    "description" 1fr / 1fr;
  text-align: center;
}

.story-showcase-wrapper .heading {
  grid-area: heading;
  margin: 0px;
  text-align: right;
}


.story-showcase-wrapper.empty .heading {
  text-align: center;
}

.story-showcase-wrapper .description {
  grid-area: description;
  overflow: scroll;
}

.story-showcase-wrapper .story-showcase {
  border-left: 1px solid var(--border-color);
  grid-area: stories;
  padding: 0px var(--window-margin);
}


.story-showcase-wrapper.empty .story-showcase {
  display: none;
}

.story-showcase::before {
  content: "stories that happened here";
  display: block;
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: lighter;
  margin-bottom: var(--window-margin);
  text-align: left;
  width: 100%;
}

.story-showcase a {
  background-color: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  height: auto;
  overflow: hidden;
}

.story-showcase a:hover {
  background-color: var(--background-color-inverse);
  border: 1px solid var(--border-color);
}

.story-showcase img {
  height: 100%;
  width: 100%;
}

#portal_body {
  box-sizing: border-box;
  display: grid;
  flex-direction: column;
  grid-area: main;
  grid-gap: var(--window-margin);
  grid-template: "map" 1fr / 1fr;
  padding: var(--window-padding);
}

.bg_over{
  justify-content:space-between;
}

.bg_filter_1,.bg_filter_2{
  z-index:1000;
  height:100%;
  width:20%;
}

.bg_filter_1{
  background: linear-gradient(90deg, rgba(255,255,255,1) 84%, rgba(255,255,255,0) 100%);
}

.bg_filter_2{
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 16%);
}

.l_gallery:hover{
  opacity:1;
}

.cent {
  margin-right:auto;
  margin-left:auto;
  text-align: center;
}

.tr_data_country{
  font-size: 15px;
  margin:0px;
}

.tr_data h1{
  margin:0px 5px;
  font-size:24px;
}

.take_me button{
  width:50%;
  background:transparent;
  padding:10px 20px;
  border-radius: var(--border-radius);
  border:2px solid var(--border-color);
  outline:none;
}

.take_me button span{
  padding-right:2px;
}

.take_me button:hover{
  background: var(--background-color-inverse);
  border:2px solid var(--border-color);
  color: var(--text-color-inverse);
  font-weight:bold;
}

.play_but{
  margin-left:auto;
}

.play_but button:hover, .tr_data:hover {
  cursor: pointer;
}

.tr_intro {
  display:flex;
  flex-wrap:wrap;
  border-radius: var(--border-radius);
  grid-area:1/4/4/6;
  width:auto;
  padding:18px;
  height:auto;
  overflow: hidden;
  justify-content:space-around;
}

.tr_data {
  border-radius: var(--border-radius);
  background: var(--background-color);
  border:2px solid var(--border-color);
  justify-content: space-between;
  height:88%;
  width:69%;
  padding:10px;
  overflow-y:hidden;
}

.tr_data:hover {
  border: 2px solid var(--border-color);
}

.tr_data_grain {
  width:60%;
  margin-right:4px;
  margin-left:10px;
  overflow-y:scroll;
  justify-content: space-around;
}

.container{
  border-radius: var(--border-radius);
  padding: 15px;
  width:80%;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  justify-content: center;

}

#collection_gallery{
  flex-wrap:wrap;
  width:90%;
}

.collections{
  width:50%;
  align-self:center;
  justify-content:space-around;
}


.collections .container{
  width: fit-content
}


.text_align{
  width:100%;
  height:40px;
  align-items:center;
  border-bottom: 1px solid var(--border-color);
  text-align:center;
  justify-content:space-around;
}

.img_background {
  border-radius:6px;
  height:160px;
  width:108px;
  padding:5px;
  z-index:1;
  background:transparent;
  border-color: transparent;
}

.on_top {
  padding:10px;
  display:grid;
  align-content:center;
  align-items:center;
}



.on_top span, .on_top img{
  margin-right:auto;
  margin-left:auto;
  grid-column:1;
  grid-row:1;
}

.on_top:hover {
  filter:brightness(95%);
}

.collections img {
  align-self:center;
  border-radius:6px;
  height: 144px;
  width: 192px;
  transition: width .4s, height .4s, transform .4s;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

#w_map{
  bottom: 0;
  display: grid;
  grid-template: "main" 1fr / 1fr;
  height:100%;
  left: 0;
  right: 0;
  top: 0;
  width:100%;
}


#map_cover {
  width:100%;
  height:inherit;
  grid-area:main;
  opacity:0;
}

#world {
  grid-area: main;
  width: 70dvw;
}

#portal {
  z-index: 0;
  position: sticky;
  height: 100dvh;
  justify-content: center;
  -webkit-user-select: none;
  user-select: none;
  overflow: hidden;
}

#c_prof {
  position:absolute;
  padding: 10px;
  max-height: 60dvh;
  max-width: 50dvw;
  z-index: 10000;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  flex-direction:column;
  background-color: var(--background-color);
  display:none;
  overflow-y:scroll;
  animation-name: reveal;
  animation-duration:.3s;
  animation-fill-mode:forwards;
  animation-play-state:paused;
}

#c_tt{
  min-height:70px;
  text-align:center;
  align-items:center;
}

#c_tt .return > * {
pointer-events: none;
}

#c_tt .return{
  cursor: pointer;
  padding:0px 30px;
  height:27px;
  width:27px;
}

#c_tt .return button {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 50%;
}

#c_tt .return:hover button{
  background: var(--background-color-inverse);
}


#c_tt .return:hover object{
  filter: invert();
}

#c_tt .tt_box{
  margin-right:auto;
  margin-left:auto;
}


.h_gal {
  align-content: flex-start;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  gap: var(--window-margin);
  overflow-x: scroll;
}

.h_gal .selectin {
  display: flex;
  flex: 0;
  flex-direction: column;
  flex-grow: 1;
  gap: var(--window-margin);
  width: 128px;
  max-width: 174px;
}


.h_gal .selectin:hover{
  filter:brightness(92%);
}

.h_gal .selectin:hover small{
  color: var(--text-color);
}

.selectin small{
  color: var(--border-color);
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
  padding: 0px 2px;
  text-align: center;
  width: inherit;
}

.c_r{
  height:30px;
  width:100%;
  border-bottom:1px solid var(--border-color);
}

.tt_box{
  margin-left:20px;
  font-size:20px;
}

.return{
  display:grid;
}

.return{
  display:grid;
}

.c_r button, .c_r object{
  grid-row:1;
  grid-column:1;
  opacity:1;
}

#intro-text {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: var(--window-padding);
  justify-self: center;
  width: 65%;
  height: 50%;
  overflow: scroll;
}

#intro-text.loaded p {
  opacity: 0;
  transform: translateY(10px);
  animation: introTextFadeIn 0.9s forwards;
  animation-delay: var(--intro-block-delay, 0s);
}

#intro-text.loaded p:nth-child(1) { --intro-block-delay: 0s; }
#intro-text.loaded p:nth-child(2) { --intro-block-delay: 0.6s; }
#intro-text.loaded p:nth-child(3) { --intro-block-delay: 1.2s; }
#intro-text.loaded p:nth-child(4) { --intro-block-delay: 15s; }

@keyframes introTextFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#intro-text p {
  color: var(--color-st-white);
  font-size: 18px;
  font-family: unset;
}


  
@keyframes reveal {
  0% {
    opacity:0;
    height:0%;
    width:0%;
    margin-right: 0%;
    transform: translate(0, 0);
  }
  100% {
    opacity:1;
    top:50%;
    left:50%;
    height:100%;
    width:100%;
    margin-right: -50%;
    transform: translate(-50%, -50%);
  }
}
#portal_body{
  overflow-x:hidden;
}

  @media screen and (max-width: 900px) {


    .text_align{
      max-height:fit-content;
    }
    .text_align h3{
      font-size:18px;
    }
    .img_background{
      height:144px;
      width:87px;
      margin:0px;
      margin-top:10px;
      margin-left:auto;
      margin-right:auto;
    }
    .bg_over{
      display:none;
    }
    .tr_intro{
      height:170px;
      max-height:170px;
    }
    .tr_data{
      width:300px;
      height:fit-content;
      max-height:160px;
    }
    #da_collections{
      display:flex;
      flex-direction:column;
      width:100%;
      padding:0px;
      margin-left:0px;
      margin-right:0px;
      align-items:center;
    }
    .collections{
      width:100%;
    }

    .container{
      width:90%;
      max-width:inherit;
      margin-bottom:10px;
      border:none;
    }

  }
  @media screen and (max-width:600px){
    html {
      --store-open-height: 34dvh;
      --about-panel-edge-inset: 10dvw;
    }
    #universe-list {
      border-left: none;
      border-bottom: 1px solid var(--border-color);
    }
    #about {
      width: 80dvw;
    }
    #store {
      max-height: var(--store-open-height);
      padding-bottom: calc(var(--footer-padding) + env(safe-area-inset-bottom));
      width: 100dvw;
    }
    #store.open {
      transform: translate(0px, 0px);
    }
    .story-showcase-wrapper.open { 
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      overflow: scroll;
    }
    .story-showcase-wrapper {
      text-align: center;
    }
    .story-showcase-wrapper .heading {
      text-align: center;
    }
    .story-showcase::before {
      text-align: center;
    }
    .story-showcase-wrapper .story-showcase {
      border-left: none;
      justify-content: center;
      padding: 0px;
    }
    #production-design {
        height: 90dvh;
    }
    #story {
      height: calc(100dvh - 24px);
      padding: max(var(--window-padding), env(safe-area-inset-top)) var(--window-padding) var(--window-padding);
      top: 12px;
      width: calc(100dvw - 24px);
      border-radius: var(--border-radius);
    }
    #story-content {
      font-size: 16px;
      padding: var(--window-margin) 4px;
    }
    #story .close-bttn {
      gap: 4px;
      padding: 8px;
    }
    #story-chapters .chapter-menu-toggle {
      padding: 8px;
    }
    .production-design-gallery {
      grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    .annotation-viewer-panel {
      height: min(92dvh, 860px);
      width: 96dvw;
    }
    .annotation-viewer-title {
      font-size: 12px;
    }
    .tr_intro{
      height:260px;
      max-height:260px;
    }
    .tr_data_grain{
      display:none;
    }
    .tr_data{
      margin-top:10px;
    }
    .play_but{
      margin-left:auto;
      margin-right:auto;
    }
    .tr_data{
      max-height:fit-content;
    }
    #intro-text{
      transform: translateY(calc(-1*var(--window-padding)));
    }
  }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

button.emoji {
  text-shadow: 0px 0px 8px #ffffffba;
}

p.emoji {
  border-radius: 50%;
  color: var(--text-color);
  font-weight: bold;
  height: 20px;
  overflow: hidden;
  text-align: center;
  width: 20px;
}

.tab-titles .button-wrapper {
  border: none;
}

.tab-titles .tab-title.active .button-wrapper {
  background-color: var(--background-color-inverse);
  color: var(--text-color-inverse);
}
.tab-titles .tab-title.active .button-wrapper p {
  color: var(--text-color-inverse);
}



.tab-content > * {
  display: none;
}

.tab-content > *.active {
  display: unset;
}

.pty-button {
  display: flex;
  gap: var(--window-margin);
  height: fit-content;
  justify-content: center;
  pointer-events: none;
  width: fit-content;
}

.pty-button .button-wrapper {
  pointer-events: all;
}

.button-wrapper {
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  padding: 8px;
  width: fit-content;
  transition: background-color 0.1s linear;
}

.button-wrapper:hover {
  background-color: var(--background-color-inverse);
  color: var(--text-color-inverse);
}

.button-wrapper:hover p {
  color: var(--text-color-inverse);
}

.pty-button.low-key .button-wrapper {
  border: none;
  transition: text-shadow var(--standard-animation-time);
}

.pty-button.low-key .button-wrapper:hover {
  background-color: var(--background-color-inverse);
  color: var(--text-color-inverse);
  text-shadow: 0px 0px 10px var(--text-color-inverse);

}



select {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    color: var(--text-color);
    padding: var(--window-margin);
    outline: none;
    width: fit-content;
    text-align: center;
    appearance: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select:hover {
    background-color: var(--background-color-inverse);
    cursor: pointer;
}

.tooltip {
  background-color: var(--background-color-inverse);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  display: none;
  font-size: small;
  padding: var(--window-margin);
  position: absolute;
}

.pty-button:has(.tooltip.active) {
  z-index: 3;
}

.tooltip.active {
  display: block;
  animation: slide-up 0.6s ease-in-out forwards;
}

#navigator button {
  position: relative;
}

#navigator .nav-tooltip {
  bottom: calc(100% + 8px);
  left: 50%;
  pointer-events: none;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 101;
}

#navigator button:hover .nav-tooltip,
#navigator button:focus-visible .nav-tooltip {
  animation: slide-up 0.6s ease-in-out forwards;
  display: block;
}

#navigator button:hover,
#navigator button:focus-visible {
  z-index: 102;
}

@keyframes slide-up {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tooltip.active.bottom-bound {
  margin-top: 0px;
  transform: translate(0%, 120%);
  animation: slide-down var(--standard-animation-time) ease-in-out forwards;
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translate(0%, 0%);
  }
  to {
    opacity: 1;
    transform: translate(0%, 120%);
  }
}


.insertable-marker {
  background-color: var(--color-grey);
  border-radius: var(--border-radius);
  display: none;
  width: 100%;
  color: var(--color-white);
  cursor: pointer;
  height: 2px;
}

.insertable-marker.active {
  display: block;
}

.draggable {
  border-radius: var(--border-radius);
  cursor: grab;
  max-height: fit-content;
  max-width: fit-content;
}

.draggable img {
    user-select: none; /* Prevent text selection */
    -webkit-user-drag: none; /* Prevent image dragging in WebKit browsers */
    -moz-user-select: none; /* Prevent text selection in Firefox */
    -ms-user-select: none; /* Pr */
    -webkit-user-select: none; /* Safari */
    -webkit-touch-callout: none; /* iOS Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -webkit-tap-highlight-color: transparent; /* Remove highlight on tap */
  }
  

.draggable.dragging {
  top: -100dvh;
  left: -100dvw;
  position: absolute !important;
  cursor: grabbing !important;
  box-sizing: border-box !important;
  border-width: 100dvh 100dvw !important;
  border-style: solid !important;
  border-color: transparent !important;
  z-index: 4 !important;
}

.draggable.dragging img {
  animation: pulseX 0.66s cubic-bezier(0.18, -0.01, 1, 1) alternate infinite;
  border-radius: 50%;

}

@keyframes pulseX {
  0% {
    transform: scale(1, 1)
  }
  100% {
    transform: scale(1.2, 1.2)
  }
}

.ghost {
  position: absolute;
  display: none;
  z-index: 1000;
}


.clickable-text p {
  overflow: hidden;
  text-overflow: ellipsis;
}

.clickable-text [contenteditable="true"] {
  border: none;
  outline: none;
}

.clickable-text:hover {
  cursor: text;
}

.image-frame {
  height: fit-content;
  max-height: 100%;
  max-width: 100%;
  overflow: hidden;
  width: fit-content;
}

.image-container {
  display: grid;
  flex-wrap: wrap;
  grid-gap: var(--window-margin);
  grid-template-columns: 1fr 1fr 1fr;
}

.image-container img {
  height: auto;
  min-width: 64px;
  width: 100%;
}

#ascertains {
  align-items: center;
  background-color: var(--background-color-inverse);
  border: 1px solid var(--color-st-grey);
  border-radius: var(--border-radius);
  box-sizing: border-box;
  display: flex;
  gap: var(--window-margin);
  justify-content: space-between;
  left: 25dvw;
  padding: var(--window-margin);
  position: absolute;
  text-align: center;
  top: 40dvh;
  width: 50dvw;
  z-index: 10000;
}

#ascertains p {
  color: var(--text-color-inverse);
}

#ascertains .button-container {
  display: flex;
  gap: var(--window-margin);
}

#ascertains .button-container .button-wrapper {
  background-color: var(--color-tender-purple);
  border: none;
  border-radius: var(--border-radius);
  color: var(--color-black);
  cursor: pointer;
  padding: calc(var(--window-margin)/2);
}

#ascertains .button-container .button-wrapper:hover {
  background-color: var(--color-black);
  color: var(--color-st-white);
}

@media screen and (max-width: 700px) {
  #ascertains {
    flex-direction: column;
    left: 5dvw;
    width: 90dvw;
  }
}
/* Concept page, story mentions, footnotes, math */
.concept-page-backdrop {
  align-items: stretch;
  padding: 0 24px;
  z-index: 20000;
}

.concept-page {
  animation: panel-rise 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  border-top: none;
  box-shadow: 16px 18px 0 var(--shadow);
  max-height: 100dvh;
  overflow: auto;
  padding: 32px;
  position: relative;
  width: min(100%, 1000px);
}

.concept-page-header {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.concept-page-header img {
  background: var(--background-darker-color);
  max-height: 50vh;
  object-fit: contain;
  width: 100%;
}

.zoom-thumb,
.concept-page-header img,
.concept-page-images img {
  border-radius: var(--border-radius);
  cursor: zoom-in;
}

.zoom-backdrop {
  align-items: center;
  background: rgb(0 0 0 / 88%);
  display: flex;
  inset: 0;
  justify-content: center;
  overflow: hidden;
  position: fixed;
  touch-action: none;
  z-index: 40000;
}

.zoom-image {
  border-radius: var(--border-radius);
  max-height: 92dvh;
  max-width: 94dvw;
  object-fit: contain;
  user-select: none;
}

.zoom-controls {
  display: flex;
  gap: 8px;
  position: absolute;
  right: 16px;
  top: 16px;
}

@media (min-width: 701px) {
  .concept-page-backdrop {
    align-items: center;
  }

  .concept-page {
    border-radius: var(--border-radius);
    border-top: 1px solid var(--border-color);
    max-height: 86dvh;
  }

  #story {
    border-radius: var(--border-radius);
    height: 88dvh;
    top: 6dvh;
  }
}

.concept-page-section {
  margin-top: 32px;
}

.concept-page-images {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.concept-page-images img {
  background: var(--background-darker-color);
  object-fit: contain;
  width: 100%;
}

.concept-page-note {
  border-left: 3px solid var(--border-color);
  margin-bottom: 14px;
  padding-left: 14px;
}

.story-concept-mention {
  background: rgb(255 214 102 / 28%);
  border: 0;
  border-bottom: 2px solid rgb(255 214 102 / 80%);
  border-radius: 3px;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0 2px;
}

.story-concept-mention:hover,
.story-concept-mention:focus-visible {
  background: rgb(255 214 102 / 50%);
}

.story-footnote-ref button,
.story-footnote-back {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0 1px;
  text-decoration: underline;
}

.story-footnotes {
  border-top: 1px solid var(--border-faded-color);
  font-size: 0.9em;
  margin-top: 32px;
  padding-left: 1.4em;
}

.story-footnotes li:target {
  background: rgb(255 214 102 / 18%);
}

.story-math {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .concept-page-header {
    grid-template-columns: 1fr;
  }
}

/* Explorer account, library and bookmarks */
::highlight(explorer-bookmark) {
  background-color: rgb(255 213 4 / 35%);
}

.bookmark-selection-button {
  background: var(--color-hot-yellow);
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px var(--shadow);
  color: #1f1f1f;
  cursor: pointer;
  padding: 6px 12px;
  position: fixed;
  transform: translate(-50%, calc(-100% - 8px));
  z-index: 100000;
}

#account-dock {
  align-items: center;
  aspect-ratio: 1;
  display: flex;
  flex: none;
  justify-content: center;
  max-width: 48px;
  min-width: 48px;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  bottom: var(--window-padding);
  cursor: pointer;
  height: 48px;
  left: var(--window-padding);
  padding: 6px;
  box-sizing: border-box;
  position: fixed;
  width: 48px;
  z-index: 9000;
}

#account-dock img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.account-preview {
  animation: modal-pop 240ms ease-out both;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  bottom: calc(var(--window-padding) + 60px);
  box-shadow: 8px 10px 0 var(--shadow);
  left: var(--window-padding);
  padding: 18px;
  position: fixed;
  width: min(340px, calc(100vw - 2 * var(--window-padding)));
  z-index: 9001;
}

.account-preview-close {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  position: absolute;
  right: 8px;
  top: 4px;
}

.account-preview-gallery {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto 1fr auto;
}

.account-preview-gallery > button {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  font-size: 28px;
}

.account-slide {
  min-height: 140px;
  text-align: center;
}

.account-slide-icon {
  font-size: 36px;
}

.account-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 8px 0 12px;
}

.account-dots span {
  background: var(--border-color);
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.account-dots span.active {
  background: var(--color-green);
}

.account-login {
  background: var(--color-green);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  color: #1f1f1f;
  cursor: pointer;
  padding: 10px;
  width: 100%;
}

.account-login:hover:not(:disabled),
.account-login:focus-visible,
#account-dock:hover {
  animation: story-control-wiggle 420ms ease-in-out 1;
}

.tribe-picker {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 16px 18px 0 var(--shadow);
  max-height: 90vh;
  max-width: 960px;
  overflow: auto;
  padding: 28px;
  width: 100%;
}

.tribe-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 16px 0;
}

.tribe-card {
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
}

.tribe-cover {
  aspect-ratio: 16 / 10;
  border-radius: var(--border-radius);
  object-fit: cover;
  width: 100%;
}

.tribe-cover-placeholder {
  align-items: center;
  display: flex;
  font-size: 56px;
  justify-content: center;
}

.tribe-group {
  color: var(--color-grey);
  margin: 0;
}

.tribe-lore {
  font-size: 0.9em;
  margin: 0;
}

.tribe-actions {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: auto;
}

.tribe-info {
  border-radius: 50%;
  font-style: italic;
  height: 32px;
  width: 32px;
}

.tribe-confirm {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tribe-later {
  background: none;
  border: none;
  color: var(--color-grey);
  cursor: pointer;
  margin-top: 12px;
}

/* Library: the cartoon farm scene, framed with the same panels, buttons and type as the rest of the app */
.library {
  --world-bg: #dcebf2;
  --panel-top: var(--background-color);
  --panel-bottom: var(--background-color);
  --panel-border: var(--border-color);
  --panel-text: var(--text-color);
  --panel-muted: var(--color-grey);
  --accent: var(--color-green);
  background: var(--world-bg);
  color: var(--text-color);
  font-family: var(--font-family);
  inset: 0;
  position: fixed;
  transition: background 0.6s ease;
  z-index: 30000;
}

.library.night {
  --world-bg: #182038;
}

.library button,
.library select,
.library input,
.library textarea {
  font: inherit;
}

.library select {
  background: var(--background-color);
  color: var(--text-color);
  padding: 6px 8px;
}

.library button:disabled {
  opacity: 0.55;
}

.library-choice {
  align-items: flex-start;
  display: flex !important;
  flex-direction: row !important;
  gap: 10px;
}

.library-choice span {
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  font-size: 12px;
  gap: 2px;
}

.library-notes {
  white-space: pre-wrap;
}

.library-canvas {
  cursor: grab;
  display: block;
  height: 100%;
  touch-action: none;
  width: 100%;
}

.farm-labels {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
}

.farm-label {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 4px 5px 0 var(--shadow);
  color: var(--text-color);
  font-size: 12px;
  left: 0;
  max-width: 180px;
  overflow: hidden;
  padding: 2px 8px;
  position: absolute;
  text-overflow: ellipsis;
  top: 0;
  white-space: nowrap;
}

.library-gui {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  bottom: 16px;
  box-shadow: 8px 10px 0 var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  left: 16px;
  padding: var(--window-padding);
  position: absolute;
  top: 16px;
  transition: transform 0.3s ease, visibility 0s;
  width: min(320px, calc(100vw - 32px));
}

.library-gui.hidden {
  transform: translateX(calc(-100% - 24px));
  transition: transform 0.3s ease, visibility 0s 0.3s;
  visibility: hidden;
}

.library-gui-toggle {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  box-shadow: 4px 5px 0 var(--shadow);
  color: var(--text-color);
  cursor: pointer;
  font-size: 22px;
  height: 56px;
  left: calc(min(320px, 100vw - 32px) + 16px);
  line-height: 1;
  padding: 0;
  position: absolute;
  top: 50%;
  transition: left 0.3s ease;
  width: 28px;
  z-index: 2;
}

.library-gui-toggle.hidden {
  left: 0;
}

@media (max-width: 700px) {
  /* Open: sits inside the panel's top-right corner so it stays on screen. */
  .library-gui-toggle:not(.hidden) {
    border-radius: var(--border-radius);
    height: 36px;
    left: calc(100vw - 16px - 36px - 8px);
    top: 24px;
    width: 36px;
  }
}

.library-gui header {
  border-bottom: 1px dashed var(--panel-border);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 10px;
}

.library-tribe {
  font-size: 1.05em;
  font-weight: bold;
}

.library-menu {
  display: grid;
  gap: 8px;
}

.library-menu button {
  text-align: left;
}

.library-menu button.active {
  background: linear-gradient(var(--accent), var(--accent));
  color: #fff;
  text-shadow: 0 1px 1px rgb(0 0 0 / 30%);
}

.library-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.library-gui footer {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.library-form,
.library-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.library-form label,
.library-item label {
  color: var(--panel-muted);
  display: flex;
  flex-direction: column;
  font-size: 12px;
  gap: 3px;
}

.library-item h3 {
  margin: 0;
}

.library-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.library-list button {
  text-align: left;
  width: 100%;
}

.library-actions {
  display: flex;
  gap: 8px;
}

.library-empty {
  color: var(--panel-muted);
  font-style: italic;
}

.library-bookmarks h4 {
  margin: 8px 0 4px;
}

.library-bookmarks blockquote {
  align-items: flex-start;
  display: flex;
  gap: 6px;
  margin: 4px 0;
}

.library button.library-quote {
  background: none;
  border: none;
  box-shadow: none;
  color: inherit;
  flex: 1;
  font-family: Georgia, serif;
  font-style: italic;
  padding: 2px 0;
  text-align: left;
  text-shadow: none;
}

.library-hint {
  background: linear-gradient(var(--panel-top), var(--panel-bottom));
  border: 2px solid var(--panel-border);
  border-radius: 20px;
  box-shadow: 0 4px 10px rgb(0 0 0 / 20%);
  left: 50%;
  padding: 8px 16px;
  position: absolute;
  top: 16px;
  transform: translateX(-50%);
}

.graph-editor {
  background: var(--world-bg);
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: auto 1fr;
  inset: 0;
  position: absolute;
  z-index: 2;
}

.graph-editor-header {
  align-items: center;
  background: linear-gradient(var(--panel-top), var(--panel-bottom));
  border-bottom: 3px solid var(--panel-border);
  display: flex;
  gap: 16px;
  grid-column: 1 / -1;
  padding: 10px 16px;
}

.graph-editor-header h2 {
  flex: 1;
  font-size: 1.1em;
  margin: 0;
}

.graph-save-error {
  color: #b5482f;
}

.graph-palette {
  background: linear-gradient(var(--panel-top), var(--panel-bottom));
  border-right: 3px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.graph-palette h3 {
  margin: 0 0 4px;
}

.graph-palette-hint {
  color: var(--panel-muted);
  font-size: 12px;
}

.graph-canvas {
  cursor: grab;
  overflow: hidden;
  position: relative;
  touch-action: none;
}

.graph-world {
  left: 0;
  position: absolute;
  top: 0;
}

.graph-edges {
  height: 1px;
  left: 0;
  overflow: visible;
  position: absolute;
  top: 0;
  width: 1px;
}

.graph-edge {
  pointer-events: none;
  stroke: var(--panel-border);
  stroke-linecap: round;
  stroke-width: 3;
}

.graph-edge-hit {
  pointer-events: stroke;
  stroke: transparent;
  stroke-width: 14;
}

.graph-node {
  background: linear-gradient(var(--panel-top), var(--panel-bottom));
  border: 2px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: 0 3px 8px rgb(0 0 0 / 20%);
  cursor: move;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  position: absolute;
}

.graph-node.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent), 0 3px 8px rgb(0 0 0 / 20%);
}

.graph-node.linking {
  border-style: dashed;
}

.graph-node-root {
  border-width: 3px;
}

.graph-node-counterexample {
  border-color: #c4602f;
}

.graph-node-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.graph-node textarea {
  resize: vertical;
}

.graph-quote {
  font-family: Georgia, serif;
  font-size: 12px;
  margin: 0;
}

.tribe-backdrop {
  z-index: 30000;
}

.account-providers {
  display: grid;
  gap: 8px;
}

.account-or {
  color: var(--color-grey);
  font-size: 12px;
  margin: 10px 0 6px;
  text-align: center;
}

.account-form {
  display: grid;
  gap: 8px;
}

.account-form input {
  background: var(--background-color-inverse);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-color-inverse);
  padding: 8px;
}

.account-switch {
  background: none;
  border: none;
  color: var(--color-grey);
  cursor: pointer;
  margin-top: 8px;
  text-decoration: underline;
  width: 100%;
}

/* #portal disables selection; readable text must stay selectable so it can be bookmarked. */
.story-chapter-content,
.concept-page {
  -webkit-user-select: text;
  user-select: text;
}

/* The global p::selection colours clash with the story palette; keep selected text legible. */
.story-chapter-content *::selection,
.concept-page *::selection {
  background-color: rgb(255 213 4 / 70%);
  color: #1b1b1b;
}

@keyframes backdrop-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes panel-rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modal-pop {
  from { opacity: 0; scale: 0.96; }
  to { opacity: 1; scale: 1; }
}

.reveal-image {
  filter: blur(14px);
  opacity: 0;
  scale: 1.05;
  transition: opacity 700ms ease-out, filter 900ms ease-out, scale 900ms ease-out;
}

.reveal-image.loaded {
  filter: blur(0);
  opacity: 1;
  scale: 1;
}

.concept-page-loading {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  left: 50%;
  padding: 8px 16px;
  position: fixed;
  top: 40%;
  transform: translateX(-50%);
  z-index: 20000;
}

.concept-labeled-image {
  margin: 0;
}

.concept-labeled-image figcaption {
  display: flex;
  flex-direction: column;
  font-size: 0.85em;
  gap: 2px;
  opacity: 0.8;
  padding-top: 6px;
}

.image-note-frame { line-height: 0; position: relative; }
.image-note-layer { inset: 0; pointer-events: none; position: absolute; }
.image-note-pin { position: absolute; transform: translate(-50%, -50%); }
.image-note-button { background: rgb(0 0 0 / 55%); border: 1px solid rgb(255 255 255 / 80%); border-radius: 50%; color: #fff; cursor: pointer; font: 700 13px/1 Georgia, serif; height: 24px; padding: 0; pointer-events: auto; touch-action: none; width: 24px; }
.image-note-layer.is-passive .image-note-button { pointer-events: none; }
.image-note-button.is-open { background: rgb(255 255 255 / 85%); color: #111; }
.image-note-text { border-radius: 6px; line-height: 1.3; max-width: min(280px, 70vw); padding: 6px 10px; pointer-events: none; position: absolute; white-space: pre-wrap; width: max-content; z-index: 1; }
.image-note-text.to-right { left: -12px; }
.image-note-text.to-left { right: -12px; }
.image-note-text.below { top: 30px; }
.image-note-text.above { bottom: 30px; }
