1330 lines
27 KiB
CSS
1330 lines
27 KiB
CSS
/* @font-face {
|
|
font-family: "Quattrocento";
|
|
font-style: normal;
|
|
src: url("Quattrocento-Regular.ttf");
|
|
}
|
|
|
|
@font-face {
|
|
font-family: "Quattrocento";
|
|
font-weight: bold;
|
|
src: url("Quattrocento-Bold.ttf");
|
|
}
|
|
|
|
@font-face {
|
|
font-family: "Open Sans";
|
|
font-style: normal;
|
|
src: url("OpenSans-VariableFont_wdth,wght.ttf");
|
|
}
|
|
|
|
@font-face {
|
|
font-family: "Open Sans";
|
|
font-style: italic;
|
|
src: url("OpenSans-Italic-VariableFont_wdth,wght.ttf");
|
|
} */
|
|
|
|
@font-face {
|
|
font-family: "EB Garamond";
|
|
font-style: normal;
|
|
src: url("../fonts/EBGaramond12-Regular.otf");
|
|
}
|
|
@font-face {
|
|
font-family: "EB Garamond";
|
|
font-style: italic;
|
|
src: url("../fonts/EBGaramond12-Italic.otf");
|
|
}
|
|
|
|
/* @font-face {
|
|
font-family: "EB Garamond";
|
|
font-style: normal;
|
|
font-weight: normal;
|
|
src: url("../fonts/EBGaramond-Regular.otf") format("opentype");
|
|
}
|
|
|
|
@font-face {
|
|
font-family: "EB Garamond";
|
|
font-style:italic;
|
|
font-weight: normal;
|
|
src: url("../fonts/EBGaramond-Italic.otf") format("opentype");
|
|
} */
|
|
|
|
/* @font-face {
|
|
font-family: "EB Garamond";
|
|
font-style: normal;
|
|
font-weight: bold;
|
|
src: url("../fonts/EBGaramond-Bold.otf") format("opentype");
|
|
}
|
|
|
|
@font-face {
|
|
font-family: "EB Garamond";
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
src: url("../fonts/EBGaramond-BoldItalic.otf") format("opentype");
|
|
} */
|
|
|
|
html {
|
|
font-family: 'EB Garamond', sans-serif;
|
|
/* font-kerning: normal; */
|
|
/* font-variant-ligatures: common-ligatures historical-ligatures; */
|
|
/* font-variant-numeric: oldstyle-nums; */
|
|
font-feature-settings: 'kern' on, 'liga' on, 'onum' on, 'dlig' on, 'clig' on, 'calt' on, 'hlig' off, 'swsh' on, 'locl' off;
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
sup {
|
|
font-feature-settings: "sup" on;
|
|
/* vertical-align: inherit; */
|
|
font-size: inherit;
|
|
}
|
|
|
|
/* sub {
|
|
font-feature-settings: "subs" on;
|
|
} */
|
|
|
|
double {
|
|
font-size: 2rem;
|
|
vertical-align: -10%;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
double.separator {
|
|
display: block;
|
|
margin: 2rem auto 3rem auto;
|
|
}
|
|
|
|
html, body {
|
|
height: 100%;
|
|
margin: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
body {
|
|
overflow: hidden;
|
|
background-image: url('../images/brown-wooden-flooring.jpg');
|
|
/* background-image: url('../images/table.png'); */
|
|
background-position: center center;
|
|
background-size: cover;
|
|
background-repeat: no-repeat;
|
|
}
|
|
|
|
body.switched {
|
|
transition: color 0.6s, background-color 0.6s;
|
|
}
|
|
|
|
:root {
|
|
--book-width: 2727px;
|
|
--book-height: 1691px;
|
|
--book-scale: 1;
|
|
--page-line-count: 25;
|
|
--story-line-height: calc((var(--book-height) * 0.85) / var(--page-line-count));
|
|
--story-font-size: calc(var(--story-line-height) / 1.45);
|
|
font-size: calc(var(--book-height)/(34 * 1.5));
|
|
--img-aspect-ratio: 1.613;
|
|
--aspect-ratio: min(var(--viewport-aspect-ratio), var(--img-aspect-ratio));
|
|
}
|
|
|
|
h1 {
|
|
font-size: 2rem;
|
|
margin-bottom: 0.8rem;
|
|
text-align: center;
|
|
text-transform:uppercase;
|
|
font-weight: normal;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 1.2rem;
|
|
text-align: center;
|
|
font-weight: normal;
|
|
}
|
|
|
|
h2.chapter-heading {
|
|
font-style: italic;
|
|
margin: 2rem auto 3rem auto;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 1.2rem;
|
|
text-align: center;
|
|
font-weight: normal;
|
|
}
|
|
|
|
.header {
|
|
padding-top: 3rem;
|
|
padding-bottom: 3rem;
|
|
}
|
|
|
|
/*
|
|
Built-in class:
|
|
# author: Name
|
|
*/
|
|
.byline {
|
|
font-feature-settings: "smcp";
|
|
}
|
|
|
|
.subtitle {
|
|
font-feature-settings: "scmp" off;
|
|
}
|
|
|
|
.separator {
|
|
text-align: center;
|
|
}
|
|
|
|
/*
|
|
Enables <iframe> support work on itch.io when using mobile iOS
|
|
*/
|
|
.outerContainer {
|
|
position: absolute;
|
|
display: block;
|
|
display: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
-webkit-overflow-scrolling: touch;
|
|
overflow: scroll;
|
|
overflow-x: hidden;
|
|
height: 100%;
|
|
width: 100%;
|
|
top: 0;
|
|
left: 0;
|
|
margin-top: 24px;
|
|
background-size: cover;
|
|
background-repeat: no-repeat;
|
|
}
|
|
|
|
@media screen and (max-width: 980px) {
|
|
.outerContainer {
|
|
margin-top: 44px;
|
|
background-size: cover;
|
|
background-repeat: no-repeat;
|
|
}
|
|
}
|
|
|
|
p, #ruler,#indent {
|
|
font-size: 1.2rem;
|
|
line-height: 1.45;
|
|
color: rgba(0,0,0,0.9);
|
|
margin-block-end: 0;
|
|
margin-block-start: 0;
|
|
/* text-indent: 1.5em; */
|
|
/* text-align: justify; */
|
|
/* hyphens: manual; */
|
|
}
|
|
|
|
a {
|
|
transition: color 0.6s;
|
|
color: #333;
|
|
font-style: italic;
|
|
text-decoration-thickness: 1px;
|
|
}
|
|
|
|
a:hover {
|
|
color: black;
|
|
transition: color 0.1s;
|
|
}
|
|
|
|
strong {
|
|
color: black;
|
|
font-weight: bold;
|
|
}
|
|
|
|
img {
|
|
display: block;
|
|
margin: 0 auto;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.drop-cap {
|
|
font-size: 280%;
|
|
line-height: 1;
|
|
margin: 0;
|
|
padding: 0;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.story-drop-cap {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
font-size: calc(2 * 1.45em);
|
|
line-height: 1;
|
|
}
|
|
|
|
.drop-quote {
|
|
font-size: 180%;
|
|
line-height: 1;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
|
|
cap {
|
|
font-feature-settings: "smcp";
|
|
}
|
|
|
|
.container .hide {
|
|
opacity: 0.0;
|
|
}
|
|
|
|
.container .invisible {
|
|
display: none;
|
|
}
|
|
|
|
.container > *, .container > p > * {
|
|
opacity: 1.0;
|
|
transition: opacity 0.5s;
|
|
}
|
|
|
|
|
|
/*
|
|
Class applied to all choices
|
|
(Will always appear inside <p> element by default.)
|
|
*/
|
|
li.choice {
|
|
text-align: center;
|
|
line-height: 1.7rem;
|
|
}
|
|
|
|
ol.choice {
|
|
position: relative;
|
|
/* list-style-position: inside; To make sure the number is inside the li */
|
|
counter-reset: item; /* Set a counter */
|
|
padding-inline-start: 3rem;
|
|
}
|
|
|
|
/* ol.choice li::before {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
content: "............................................................................";
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-indent: 1.5em;
|
|
} */
|
|
|
|
/*
|
|
Class applied to first choice
|
|
*/
|
|
:not(.choice)+.choice {
|
|
padding-top: 1rem;
|
|
}
|
|
|
|
/*
|
|
Class applied to choice links
|
|
*/
|
|
.choice a {
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
/*
|
|
Built-in class:
|
|
The End # CLASS: end
|
|
*/
|
|
.end {
|
|
text-align: center;
|
|
font-weight: bold;
|
|
color: black;
|
|
padding-top: 2rem;
|
|
padding-bottom: 2rem;
|
|
}
|
|
|
|
#controls {
|
|
z-index: 4;
|
|
text-align: center;
|
|
position: absolute;
|
|
right: 0;
|
|
left: 0;
|
|
top: -0.6rem;
|
|
user-select: none;
|
|
transition: color 0.6s, background 0.6s;
|
|
}
|
|
|
|
#controls [disabled] {
|
|
color: #999;
|
|
}
|
|
|
|
#controls input[type=range] {
|
|
vertical-align: middle;
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
width: 5rem;
|
|
cursor: pointer;
|
|
outline: none;
|
|
height: 0.5rem;
|
|
background-color: transparent;
|
|
box-sizing: border-box;
|
|
border: 1px solid black;
|
|
border-radius: 0.25rem;
|
|
overflow: hidden;
|
|
}
|
|
|
|
#controls input::-webkit-slider-thumb {
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
height: 0.5rem;
|
|
width: 0.5rem;
|
|
border-radius: 0.25rem;
|
|
background-color: rgba(0,0,0,0.9);
|
|
border: none;
|
|
/* slider progress trick */
|
|
box-shadow: -407px 0 0 400px rgba(0,0,0,0.3);
|
|
}
|
|
|
|
#controls input::-webkit-runnable-track {
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
height: 0.5rem;
|
|
border-radius: 0.25rem;
|
|
}
|
|
|
|
#controls>a:not(:last-of-type):after, #controls>span::after {
|
|
content: " | ";
|
|
}
|
|
|
|
#book {
|
|
position: fixed;
|
|
left: 50%;
|
|
top: 50%;
|
|
width: var(--book-width);
|
|
height: var(--book-height);
|
|
background-image: url('../images/book-3057904.png');
|
|
/* background-image: url('../images/book.png'); */
|
|
background-size: contain; /* Changed from cover to contain */
|
|
background-position: center;
|
|
background-repeat: no-repeat; /* Prevents repeating the image when aspect ratio doesn't match */
|
|
perspective: 500px;
|
|
perspective-origin: 50% 50%;
|
|
transform: translate(-50%, -50%) scale(var(--book-scale));
|
|
transform-origin: center center;
|
|
}
|
|
|
|
#page_left, #page_right {
|
|
position: absolute;
|
|
top: 5%; /* Adjust these values as necessary */
|
|
bottom: 10%;
|
|
width: 39%;
|
|
box-sizing: border-box;
|
|
padding: 0 3rem 1rem 1rem;
|
|
/* border: 1px dotted rgba(200,200,200,1); */
|
|
overflow: visible;
|
|
opacity: 0.95;
|
|
mix-blend-mode: darken;
|
|
}
|
|
|
|
#story {
|
|
overflow: visible !important;
|
|
box-sizing: border-box;
|
|
overflow-anchor: none;
|
|
text-align: justify;
|
|
text-justify: inter-word;
|
|
margin-bottom: 0;
|
|
font-size: var(--story-font-size);
|
|
line-height: var(--story-line-height);
|
|
will-change: transform;
|
|
transform: translateY(0);
|
|
}
|
|
|
|
#paragraphs {
|
|
position: relative;
|
|
box-sizing: border-box;
|
|
overflow: visible !important;
|
|
overflow-anchor: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
transition: opacity 220ms ease;
|
|
}
|
|
|
|
#paragraphs.story-history-fading {
|
|
opacity: 0;
|
|
}
|
|
|
|
.story-block-archiving {
|
|
opacity: 0;
|
|
transition: opacity 320ms ease;
|
|
}
|
|
|
|
.story-image-block {
|
|
box-sizing: border-box;
|
|
margin: 0 auto;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
background: transparent;
|
|
}
|
|
|
|
.story-image-block img {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: contain;
|
|
mix-blend-mode: multiply;
|
|
filter: contrast(1.05);
|
|
}
|
|
|
|
.story-image-landscape,
|
|
.story-image-square {
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
|
|
.story-image-portrait {
|
|
margin-left: 0;
|
|
margin-right: 0;
|
|
}
|
|
|
|
.story-image-pending img {
|
|
opacity: 0;
|
|
clip-path: polygon(0 0, 0 0, 0 0);
|
|
}
|
|
|
|
.story-image-visible img {
|
|
opacity: 1;
|
|
clip-path: polygon(0 0, 220% 0, 0 220%);
|
|
transition: opacity 2000ms ease, clip-path 2000ms ease;
|
|
}
|
|
|
|
/* #story p span {
|
|
font-feature-settings: 'kern' on, 'liga' on, 'onum' on, 'clig' on, 'hlig' on;
|
|
} */
|
|
|
|
#page_left {
|
|
left: 11.5%;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
#page_right {
|
|
/* background-color: rgba(200,200,200,0.5); */
|
|
right: 7%;
|
|
padding-bottom: 0;
|
|
overflow: hidden !important;
|
|
overflow-x: hidden !important;
|
|
overflow-y: hidden !important;
|
|
scroll-behavior: auto;
|
|
overscroll-behavior: none;
|
|
overflow-anchor: none;
|
|
scrollbar-width: none;
|
|
/* transform: translateX(-1%) translateY(2%) rotateX(0deg) rotateY(-1deg) rotateZ(0deg); */
|
|
}
|
|
|
|
#page_right::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
#page_right *,
|
|
#page_right *::-webkit-scrollbar {
|
|
scrollbar-width: none;
|
|
}
|
|
|
|
#page_right *::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
#story_scrollbar {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0.35rem;
|
|
bottom: 0;
|
|
width: 0.22rem;
|
|
height: 100%;
|
|
margin: 0;
|
|
border-radius: 999px;
|
|
background: rgba(0, 0, 0, 0.12);
|
|
z-index: 12;
|
|
pointer-events: auto;
|
|
touch-action: none;
|
|
cursor: pointer;
|
|
}
|
|
|
|
#story_scrollbar_thumb {
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
top: 0;
|
|
min-height: 1rem;
|
|
border-radius: inherit;
|
|
background: rgba(0, 0, 0, 0.72);
|
|
transition: top 260ms ease, height 260ms ease;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
#story_scrollbar[data-dragging="true"] #story_scrollbar_thumb {
|
|
transition: none;
|
|
}
|
|
|
|
|
|
/* ===== Scrollbar CSS ===== */
|
|
/* Firefox */
|
|
* {
|
|
scrollbar-width: auto;
|
|
scrollbar-color: #000000 rgba(255,255,255,0);
|
|
}
|
|
|
|
/* Chrome, Edge, and Safari */
|
|
*::-webkit-scrollbar {
|
|
width: calc(1rem/4);
|
|
}
|
|
|
|
*::-webkit-scrollbar-track {
|
|
background: rgba(255,255,255,0.0);
|
|
}
|
|
|
|
*::-webkit-scrollbar-thumb {
|
|
background-color: #000000;
|
|
border-radius: calc(1rem/4/2);
|
|
border: none;
|
|
}
|
|
|
|
.fade-in {
|
|
animation: fadeIn ease 1s;
|
|
-webkit-animation: fadeIn ease 1s;
|
|
-moz-animation: fadeIn ease 1s;
|
|
-o-animation: fadeIn ease 1s;
|
|
-ms-animation: fadeIn ease 1s;
|
|
}
|
|
|
|
/* Style for individual words that need to fade in */
|
|
.word.fade-in {
|
|
animation-fill-mode: forwards;
|
|
opacity: 0; /* Start invisible */
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
0% {opacity:0;}
|
|
100% {opacity:1;}
|
|
}
|
|
|
|
@-moz-keyframes fadeIn {
|
|
0% {opacity:0;}
|
|
100% {opacity:1;}
|
|
}
|
|
|
|
@-webkit-keyframes fadeIn {
|
|
0% {opacity:0;}
|
|
100% {opacity:1;}
|
|
}
|
|
|
|
@-o-keyframes fadeIn {
|
|
0% {opacity:0;}
|
|
100% {opacity:1;}
|
|
}
|
|
|
|
@-ms-keyframes fadeIn {
|
|
0% {opacity:0;}
|
|
100% {opacity:1;}
|
|
}
|
|
|
|
#versions {
|
|
position: fixed;
|
|
top: 0px;
|
|
right: 12px;
|
|
font-size: 10px;
|
|
}
|
|
|
|
#preview {
|
|
position: absolute;
|
|
top: 0px;
|
|
left: 0px;
|
|
border: 1px none red;
|
|
background-color: #fff;
|
|
box-shadow: 2px 2px 2px rgba(0,0,0,0.3);
|
|
}
|
|
|
|
#preview p {
|
|
text-indent: 0;
|
|
text-align: left;
|
|
}
|
|
|
|
#ruler, #indent {
|
|
visibility: hidden;
|
|
position: absolute;
|
|
top: -8000px;
|
|
width: auto;
|
|
display: inline;
|
|
left: -8000px;
|
|
text-indent: 0;
|
|
text-align: left;
|
|
hyphens: none;
|
|
margin-block-end: 0;
|
|
}
|
|
|
|
#ruler i {
|
|
font-style: italic;
|
|
}
|
|
|
|
#indent {
|
|
text-indent: 1.5em;
|
|
}
|
|
|
|
#remark {
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0.65rem;
|
|
text-align: center;
|
|
margin: 0 auto;
|
|
background-color: transparent;
|
|
line-height: 1.1;
|
|
pointer-events: none;
|
|
}
|
|
|
|
#remark_hint {
|
|
font-size: 0.82rem;
|
|
}
|
|
|
|
#game_legal {
|
|
margin-top: 0.18rem;
|
|
font-size: 0.72rem;
|
|
color: rgba(0, 0, 0, 0.62);
|
|
}
|
|
|
|
#lighting {
|
|
position: absolute;
|
|
top: -35%;
|
|
left: -35%;
|
|
width: 180%;
|
|
height: 180%;
|
|
animation: gradient-animation-shrink 1s 1;
|
|
background: radial-gradient(circle, rgba(255,240,182,0.1) 0%, rgba(255,237,165,0.2) 20%, rgba(0,0,0,0.9) 65%, rgba(0,0,0,0.9) 100%);
|
|
mix-blend-mode: color-burn;
|
|
pointer-events: none; /* makes the element ignore mouse events, and pass them to elements underneath */
|
|
z-index: 999; /* should be high enough to be on top of other elements */
|
|
}
|
|
|
|
@keyframes gradient-animation-grow {
|
|
0% { width: 180%; height: 180%; left: -35%; top: -35%; }
|
|
100% { width: 170%; height: 170%; left: -33%; top: -33%; }
|
|
}
|
|
|
|
@keyframes gradient-animation-shrink {
|
|
0% { width: 170%; height: 170%; left: -33%; top: -33%; }
|
|
100% { width: 180%; height: 180%; left: -35%; top: -35%; }
|
|
}
|
|
|
|
/* Command history */
|
|
#command_history {
|
|
max-height: 8rem;
|
|
overflow-y: auto;
|
|
font-size: 1rem;
|
|
line-height: 1.2;
|
|
margin-bottom: 1rem;
|
|
border-top: 1px solid #d1c8b9;
|
|
padding-top: 0.6rem;
|
|
scrollbar-width: thin;
|
|
scrollbar-color: #8b7765 rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
body:not([data-game-running="true"]) #command_history {
|
|
display: none;
|
|
}
|
|
|
|
#command_history .history-item {
|
|
margin-bottom: 0.25rem;
|
|
color: rgba(0, 0, 0, 0.82);
|
|
cursor: pointer;
|
|
transition: color 160ms ease, opacity 160ms ease;
|
|
}
|
|
|
|
#command_history .history-item:hover,
|
|
#command_history .history-item.active {
|
|
color: rgba(0, 0, 0, 1);
|
|
}
|
|
|
|
#command_history .history-item.active {
|
|
font-weight: 600;
|
|
}
|
|
|
|
#command_history::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
#command_history::-webkit-scrollbar-track {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
#command_history::-webkit-scrollbar-thumb {
|
|
background-color: #8b7765;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
/* Input area */
|
|
#input_area {
|
|
display: block;
|
|
margin-top: 15px;
|
|
margin-bottom: 10px;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Command input container */
|
|
#command_input {
|
|
width: 100%;
|
|
position: relative;
|
|
margin-top: 10px;
|
|
transition: opacity 0.5s ease; /* Add transition for fading effect */
|
|
}
|
|
|
|
/* Fade out command input when loading */
|
|
#command_input.fading {
|
|
opacity: 0;
|
|
pointer-events: none; /* Prevent interaction while faded out */
|
|
}
|
|
|
|
.story-choices {
|
|
width: 100%;
|
|
margin: 0 0 1rem 0;
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
transition: opacity 0.45s ease;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.story-choices[hidden] {
|
|
display: none;
|
|
}
|
|
|
|
html[data-history-restoring="true"] .story-choices,
|
|
body:not([data-game-running="true"]) .story-choices,
|
|
html[data-process-state="waiting-generating"] .story-choices,
|
|
html[data-process-state="playing-generating"] .story-choices,
|
|
html[data-process-state="playing-ready"] .story-choices,
|
|
html[data-process-state="command-waiting"] .story-choices {
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
html[data-process-state="ready"] .story-choices[data-choice-ready="true"] {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.choice-list {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.choice-list-item {
|
|
margin: 0 0 0.45rem 0;
|
|
}
|
|
|
|
.choice-list .choice-button {
|
|
display: grid;
|
|
grid-template-columns: 1.8em 1fr;
|
|
align-items: baseline;
|
|
gap: 0.45rem;
|
|
width: 100%;
|
|
padding: 0.15rem 0;
|
|
border: 0;
|
|
background: transparent;
|
|
color: rgba(37, 31, 24, 0.72);
|
|
font-family: inherit;
|
|
font-size: 1rem;
|
|
line-height: 1.25;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
transition: color 0.25s ease, opacity 0.25s ease;
|
|
}
|
|
|
|
.choice-list .choice-button:hover,
|
|
.choice-list .choice-button:focus-visible {
|
|
color: rgba(0, 0, 0, 0.96);
|
|
text-decoration: none;
|
|
outline: none;
|
|
}
|
|
|
|
.choice-list kbd {
|
|
display: inline-block;
|
|
min-width: 1.4em;
|
|
font-family: inherit;
|
|
font-size: 0.85em;
|
|
font-weight: 700;
|
|
text-align: center;
|
|
border-bottom: 0;
|
|
}
|
|
|
|
/* Input wrapper for positioning cursor */
|
|
.input-wrapper {
|
|
position: relative;
|
|
width: 100%;
|
|
display: inline-block;
|
|
min-height: 1.5em; /* Minimum height for one line */
|
|
max-height: 6em; /* Maximum height - about 4 lines */
|
|
overflow: visible; /* Changed from 'auto' to 'visible' to hide scrollbars when not needed */
|
|
}
|
|
|
|
/* Player input styling - now a textarea for multiline support */
|
|
#player_input {
|
|
width: 100%;
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 1px solid #8b7765;
|
|
font-family: 'EB Garamond', serif;
|
|
font-size: 1.1rem;
|
|
color: #333;
|
|
outline: none;
|
|
padding: 5px 0;
|
|
caret-color: transparent; /* Hide the default caret */
|
|
box-sizing: border-box;
|
|
resize: none; /* Disable manual resizing */
|
|
overflow: hidden; /* Hide all scrollbars */
|
|
line-height: 1.2; /* Match paragraph line height */
|
|
height: auto; /* Allow height to adjust */
|
|
min-height: 1.5em; /* Ensure minimum height */
|
|
}
|
|
|
|
/* Custom cursor styling */
|
|
#cursor {
|
|
position: absolute;
|
|
display: inline-block;
|
|
width: 8px;
|
|
height: 1.2em;
|
|
background-color: #333;
|
|
top: 6px;
|
|
left: 0;
|
|
animation: blink 1s step-end infinite;
|
|
pointer-events: none; /* Allow clicks to pass through to the input */
|
|
z-index: 1; /* Ensure cursor appears above text */
|
|
}
|
|
|
|
html[data-process-state="command-waiting"],
|
|
html[data-process-state="command-waiting"] * {
|
|
cursor: var(--process-cursor, wait) !important;
|
|
}
|
|
|
|
html[data-process-state="waiting-generating"],
|
|
html[data-process-state="waiting-generating"] *,
|
|
html[data-process-state="playing-generating"],
|
|
html[data-process-state="playing-generating"] *,
|
|
html[data-process-state="playing-ready"],
|
|
html[data-process-state="playing-ready"] * {
|
|
cursor: var(--process-cursor, progress) !important;
|
|
}
|
|
|
|
/* Placeholder styling - lighter and italic, with padding to avoid cursor overlap */
|
|
#player_input::placeholder {
|
|
color: #aaa;
|
|
font-style: italic;
|
|
padding-left: 15px; /* Add padding to move placeholder text to the right */
|
|
}
|
|
|
|
/* Blinking animation */
|
|
@keyframes blink {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0; }
|
|
}
|
|
|
|
/* Fade-in animation for input area */
|
|
@keyframes fadeInInput {
|
|
from { opacity: 0.3; }
|
|
to { opacity: 1; }
|
|
}
|
|
|
|
.fade-in-input {
|
|
animation: fadeInInput 0.5s ease forwards;
|
|
}
|
|
|
|
/* Text animation and typography styles */
|
|
|
|
/* Fade-in animation for text elements */
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; }
|
|
to { opacity: 1; }
|
|
}
|
|
|
|
.fade-in {
|
|
opacity: 0;
|
|
animation: fadeIn 0.5s ease-in forwards;
|
|
}
|
|
|
|
/* Hyphenation settings */
|
|
.story-paragraph {
|
|
hyphens: auto;
|
|
-webkit-hyphens: auto;
|
|
-ms-hyphens: auto;
|
|
}
|
|
|
|
/* Justified text styles */
|
|
#story p {
|
|
text-align: justify;
|
|
text-justify: inter-word;
|
|
font-size: var(--story-font-size);
|
|
margin: 0;
|
|
line-height: var(--story-line-height);
|
|
}
|
|
|
|
#story p.story-chapter-heading {
|
|
position: relative;
|
|
height: auto;
|
|
text-align: center;
|
|
font-size: var(--story-font-size);
|
|
font-style: italic;
|
|
line-height: var(--story-line-height);
|
|
}
|
|
|
|
#story p.story-section-heading {
|
|
position: relative;
|
|
height: auto;
|
|
text-align: center;
|
|
font-style: normal;
|
|
line-height: var(--story-line-height);
|
|
}
|
|
|
|
/* Typography for word elements in rendered paragraphs */
|
|
.word {
|
|
display: inline-block;
|
|
position: absolute;
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
overflow: hidden;
|
|
clip-path: inset(0 100% 0 0);
|
|
will-change: clip-path, opacity;
|
|
}
|
|
|
|
@keyframes wordReveal {
|
|
0% {
|
|
opacity: 1;
|
|
clip-path: inset(0 100% 0 0);
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
clip-path: inset(0 0 0 0);
|
|
}
|
|
}
|
|
|
|
strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
em {
|
|
font-style: italic;
|
|
}
|
|
|
|
/* Typography for hyphen at line breaks */
|
|
.hyphen-marker {
|
|
display: inline-block;
|
|
}
|
|
|
|
/* Highlight the latest paragraph being rendered */
|
|
.latest-paragraph {
|
|
color: #000;
|
|
}
|
|
|
|
/* Completed paragraphs style */
|
|
.completed-paragraph {
|
|
color: #222;
|
|
}
|
|
|
|
/* Animation speed controls */
|
|
#speed {
|
|
width: 80px;
|
|
vertical-align: middle;
|
|
margin: 0 5px;
|
|
}
|
|
|
|
body:not([data-game-running="true"]) #command_input {
|
|
display: none;
|
|
}
|
|
|
|
#start_prompt {
|
|
position: absolute;
|
|
inset: 0;
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
text-align: center;
|
|
padding: 0 12%;
|
|
font-family: 'EB Garamond', var(--book-font), serif;
|
|
font-size: 34px;
|
|
font-style: italic;
|
|
color: rgba(45, 34, 24, 0.78);
|
|
pointer-events: none;
|
|
}
|
|
|
|
body:not([data-game-running="true"]) #start_prompt {
|
|
display: flex;
|
|
}
|
|
|
|
/* Options Modal Styling */
|
|
.modal {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: none;
|
|
justify-content: center;
|
|
align-items: center;
|
|
z-index: 1000;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
box-sizing: border-box;
|
|
padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
|
|
}
|
|
|
|
.modal-content {
|
|
background-color: rgba(255, 252, 245, 0.97);
|
|
border-radius: 0.4rem;
|
|
box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.4);
|
|
width: min(42rem, calc(100vw - 2rem));
|
|
max-width: 100%;
|
|
max-height: calc(100vh - 2rem);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
font-family: 'EB Garamond', var(--book-font), serif;
|
|
color: #333;
|
|
position: relative;
|
|
border: 1px solid #d9c8a9;
|
|
font-size: 1rem;
|
|
/* Scale like the book */
|
|
transform-origin: center center;
|
|
}
|
|
|
|
.modal-header {
|
|
display: flex;
|
|
flex: 0 0 auto;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 0;
|
|
border-bottom: 1px solid #d9c8a9;
|
|
padding: 1rem 1.5rem 0.7rem 1.5rem;
|
|
}
|
|
|
|
.modal-header h2 {
|
|
margin: 0;
|
|
font-family: 'EB Garamond', var(--book-font), serif;
|
|
font-weight: normal;
|
|
font-size: 1.4rem;
|
|
color: #5a3921;
|
|
letter-spacing: 0.02rem;
|
|
}
|
|
|
|
.close {
|
|
background: none;
|
|
border: none;
|
|
font-size: 1.4rem;
|
|
cursor: pointer;
|
|
color: #7a6e59;
|
|
font-family: 'EB Garamond', var(--book-font), serif;
|
|
line-height: 1;
|
|
}
|
|
|
|
.close:hover {
|
|
color: #5a3921;
|
|
}
|
|
|
|
.options-section {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.modal-body {
|
|
flex: 1 1 auto;
|
|
overflow-y: auto;
|
|
padding: 1rem 1.5rem;
|
|
}
|
|
|
|
.modal-footer {
|
|
flex: 0 0 auto;
|
|
border-top: 1px solid #d9c8a9;
|
|
padding: 0.8rem 1.5rem 1rem;
|
|
text-align: right;
|
|
}
|
|
|
|
.modal-footer button,
|
|
.option-item input[type="text"],
|
|
.option-item input[type="password"],
|
|
.option-item input[type="url"] {
|
|
background-color: transparent;
|
|
border: 1px solid black;
|
|
border-radius: 0.25rem;
|
|
color: rgba(0,0,0,0.9);
|
|
font-family: 'EB Garamond', var(--book-font), serif;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.modal-footer button {
|
|
padding: 0.35rem 1rem;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.modal-footer button:hover {
|
|
background-color: rgba(0,0,0,0.06);
|
|
}
|
|
|
|
.option-item input[type="text"],
|
|
.option-item input[type="password"],
|
|
.option-item input[type="url"] {
|
|
box-sizing: border-box;
|
|
width: min(18rem, 60%);
|
|
padding: 0.3rem 0.5rem;
|
|
}
|
|
|
|
.option-item input[type="text"]:focus,
|
|
.option-item input[type="password"]:focus,
|
|
.option-item input[type="url"]:focus {
|
|
outline: none;
|
|
box-shadow: 0 0 0 2px rgba(90, 57, 33, 0.14);
|
|
}
|
|
|
|
.options-section h3 {
|
|
font-family: 'EB Garamond', var(--book-font), serif;
|
|
font-weight: normal;
|
|
font-size: 1.2rem;
|
|
margin-top: 0;
|
|
margin-bottom: 0.8rem;
|
|
border-bottom: 1px solid #e9ddc8;
|
|
padding-bottom: 0.4rem;
|
|
color: #5a3921;
|
|
}
|
|
|
|
.option-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
margin-bottom: 0.7rem;
|
|
padding: 0.25rem 0;
|
|
}
|
|
|
|
.option-item label {
|
|
font-family: 'EB Garamond', var(--book-font), serif;
|
|
font-size: 1rem;
|
|
color: #4a4234;
|
|
flex: 1 1 auto;
|
|
}
|
|
|
|
.option-item .slider-value {
|
|
min-width: 3rem;
|
|
text-align: right;
|
|
}
|
|
|
|
.provider-status-list {
|
|
margin: 0.5rem 0 1rem;
|
|
border: 1px solid #e9ddc8;
|
|
border-radius: 0.25rem;
|
|
}
|
|
|
|
.provider-status-row {
|
|
display: grid;
|
|
grid-template-columns: minmax(7rem, 1fr) auto;
|
|
gap: 1rem;
|
|
padding: 0.35rem 0.5rem;
|
|
border-bottom: 1px solid #eee4d2;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.provider-status-row:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.provider-status-value {
|
|
font-style: italic;
|
|
text-align: right;
|
|
}
|
|
|
|
/* Elegant checkboxes */
|
|
.option-item input[type="checkbox"] {
|
|
appearance: none;
|
|
-webkit-appearance: none;
|
|
width: 1rem;
|
|
height: 1rem;
|
|
border: 1px solid black;
|
|
border-radius: 0.25rem;
|
|
outline: none;
|
|
cursor: pointer;
|
|
position: relative;
|
|
background-color: transparent;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.option-item input[type="checkbox"]:checked::before {
|
|
content: "✓";
|
|
position: absolute;
|
|
font-family: 'EB Garamond', var(--book-font), serif;
|
|
font-size: 0.9rem;
|
|
top: -0.05rem;
|
|
left: 0.15rem;
|
|
color: rgba(0,0,0,0.9);
|
|
}
|
|
|
|
/* Elegant select dropdowns */
|
|
.option-item select {
|
|
appearance: none;
|
|
-webkit-appearance: none;
|
|
background-color: transparent;
|
|
border: 1px solid black;
|
|
border-radius: 0.25rem;
|
|
padding: 0.3rem 1.5rem 0.3rem 0.5rem;
|
|
font-family: 'EB Garamond', var(--book-font), serif;
|
|
font-size: 1rem;
|
|
color: rgba(0,0,0,0.9);
|
|
cursor: pointer;
|
|
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
|
|
background-repeat: no-repeat;
|
|
background-position: right 0.4rem center;
|
|
background-size: 0.6rem;
|
|
min-width: 8rem;
|
|
}
|
|
|
|
.option-item select:focus {
|
|
outline: none;
|
|
}
|
|
|
|
/* Range inputs (sliders) - match the main menu style */
|
|
.option-item input[type="range"] {
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
width: 8rem;
|
|
height: 0.5rem;
|
|
background-color: transparent;
|
|
box-sizing: border-box;
|
|
border: 1px solid black;
|
|
border-radius: 0.25rem;
|
|
outline: none;
|
|
margin: 0;
|
|
overflow: hidden;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.option-item input[type="range"]::-webkit-slider-thumb {
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
height: 0.5rem;
|
|
width: 0.5rem;
|
|
border-radius: 0.25rem;
|
|
background-color: rgba(0,0,0,0.9);
|
|
border: none;
|
|
box-shadow: -407px 0 0 400px rgba(0,0,0,0.3);
|
|
}
|
|
|
|
.option-item input[type="range"]::-moz-range-thumb {
|
|
height: 0.5rem;
|
|
width: 0.5rem;
|
|
border-radius: 0.25rem;
|
|
background-color: rgba(0,0,0,0.9);
|
|
border: none;
|
|
box-shadow: -407px 0 0 400px rgba(0,0,0,0.3);
|
|
}
|
|
|
|
/* Reload notice */
|
|
.reload-notice {
|
|
margin-top: 1rem;
|
|
padding: 0.5rem;
|
|
border: 1px solid #d9c8a9;
|
|
border-radius: 0.25rem;
|
|
background-color: rgba(233, 221, 200, 0.3);
|
|
font-family: 'EB Garamond', var(--book-font), serif;
|
|
font-style: italic;
|
|
font-size: 0.9rem;
|
|
color: #7a6e59;
|
|
text-align: center;
|
|
}
|
|
|
|
.api-settings {
|
|
margin-top: 1rem;
|
|
padding: 0;
|
|
}
|
|
|
|
.elevenlabs-setting,
|
|
.openai-setting {
|
|
display: none; /* Hidden by default, shown when the relevant provider is selected */
|
|
}
|