@font-face {
    font-family: 'Necto';
    src: url('../fonts/Necto-Mono.woff2') format('woff2'),
        url('../fonts/Necto-Mono.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}


@font-face {
    font-family: 'Writer';
    src: url('../fonts/Writer-Regular.woff2') format('woff2'),
        url('../fonts/Writer-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root { --background: #b8b097; --text: black; }

body {
	position: absolute;
	inset: 0;

	font-family: 'Necto', monospace;
	display: grid;

	background-color: var(--background);
	color: var(--text);
	line-height: 1.6em;

	image-rendering: pixelated;
	touch-action: manipulation;
}

#images { position: absolute; width: 100%; height: 100%; background-color: var(--background); }

#images img {
  object-fit: cover;
  height: 100%;
  width: 10%; 
  object-position: left;
}

#wrapper { height: 100%;
  width: 90%;
  align-self: center;
  justify-self: end;
  position: absolute;
  display: grid;
  border-left: 1px solid var(--text);
}

[data-ir-role="container"][data-ir-active="true"] {
	display: flex;
	flex-flow: column;
	position: relative;
	height: 100%;
	padding-inline: 5rem;
	padding-top: 10vh;
	padding-bottom: 30vh;
	overflow-y: scroll;
	scroll-behavior: smooth;
	align-items: end;
	justify-self: end;
}

[data-ir-role="container"] > * {
	width: 65ch;
}

[data-ir-role="choicebox"] {
	display: flex;
	flex-flow: column;
	gap: 0.5rem;
}

[data-ir-role="choicebox"] a:hover { 
	background-color: transparent;
	opacity: 1;
	background-image: radial-gradient(#00000040 1px, transparent 1px);
	background-size: 4px 4px;}

.inverted [data-ir-role="choicebox"] a:hover { 
	background-color: transparent;
	opacity: 1;
	background-image: radial-gradient(#b8b09740 1px, transparent 1px);
	background-size: 4px 4px;}

.menu [data-ir-role="choicebox"] a:hover:before { content: '> ' }
.end [data-ir-role="choicebox"] a:hover:before { content: '> ' }
.end p { margin: 0.3em; }

a.credits:hover:before { content: '' !important; }

[data-ir-role="continue"] {
	background-color: var(--text);
	clip-path: polygon(0% 0%, 100% 0%, 50% 100%, 0% 0%);
	margin-left: auto;
	height: calc(0.866 * 1rem);
	width: 1rem !important;
	flex-shrink: 0;
	margin-top: 1rem;
	animation: pulse 1s ease-in alternate infinite;

}

#inkContainer { justify-self: right; }

.continue { margin-block: 1rem; text-align: right;
}

ruby { position: relative; ruby-position: under; ruby-align: center; }
rt { text-transform: uppercase; }

p, a, span, li { font-size: clamp(0.9rem, 2vw, 1rem); }

a { color: var(--text); }
a:hover { background-color: transparent;
	opacity: 1;
	background-image: radial-gradient(#00000040 1px, transparent 1px);
	background-size: 4px 4px; }
.inverted a:hover { background-image: radial-gradient(#b8b09740 1px, transparent 1px);
 }

.poem p { margin: 0.3em; }

.poem .space { margin: 0.8em }

.menu [data-ir-role="choicebox"] a { opacity: 0.4; z-index: 2;}
.menu [data-ir-role="choicebox"] a:last-of-type { opacity: 1; }
.menu [data-ir-role="choicebox"] a:after, .end [data-ir-role="choicebox"] a:after { 
	z-index: 0;
	content: ''; 
	border: 1px solid var(--text);
	display: block; 
	width: 100px; aspect-ratio: 1;
	position: absolute; bottom:5rem; right: 10%; 
}
.menu [data-ir-role="choicebox"] a:hover:after, .menu [data-ir-role="choicebox"] a:active:after, .end [data-ir-role="choicebox"] a:hover:after, .end [data-ir-role="choicebox"] a:active:after { z-index: 0;
	content: ''; 
	border: 1px solid var(--text);
	display: block; 
	width: 100px; aspect-ratio: 1;
	background-size: contain;
	background-image: url(../images/threat.png);
	position: absolute; bottom:5rem; right: 10%; }

a.weaving:hover:after, a.weaving:active:after { background-image: url(../images/cottage.png) !important; }
a.theories:hover:after, a.theories:active:after { background-image: url(../images/underground.png) !important; }
a.deleted:hover:after, a.deleted:active:after { background-image: url(../images/street.png) !important; }
a.photo:hover:after, a.photo:active:after { background-image: url(../images/notfound.png) !important; }
a.poem:hover:after, a.poem:active:after { background-image: url(../images/sky.png) !important; }

.inverted { --background: black;
  --text: #b8b097; }

.txtright { text-align: right; }
.txtcenter { text-align: center; }

.transcript { border-left: 1px solid var(--text); width: 63ch; padding-left: 1rem;  }

hr { border: 0; border-top: 1px solid var(--text); }

#img-polaroid { width: unset; max-height: 75%; }

.credits { margin-top: 1em; border-top: 1px solid var(--text); text-align: right;}

/* credits */
summary { font-size: 1.2em; font-weight: bold; }

summary:hover { 
	background-image: radial-gradient(#00000040 1px, transparent 1px);
	background-size: 4px 4px; 
	cursor: pointer;
}

.inverted summary:hover { 
	background-image: radial-gradient(#b8b09740 1px, transparent 1px);
	background-size: 4px 4px; 
	cursor: pointer;
}

ul { list-style-type: '> '; }

.backbutton { text-align: right; }

@media screen and (max-width: 800px) { 

#wrapper { max-width:90%; }

[data-ir-role="container"][data-ir-active="true"] { align-items: center; padding-inline: 1rem; width: 100%;  padding-bottom: 10vh; }
[data-ir-role="container"] > *, .menu [data-ir-role="choicebox"] a  {
  width: 90%;
}

.menu [data-ir-role="choicebox"] a:hover:after { display: none; }

}