html {
	font-size: 62.5%;
	--title-size: 4rem;
	--font-size: 1.6rem;
	--base-margin: 1.6rem;
	--svg-size: 2rem;
	/*--test-section-background-color: #090e24;*/
}

body
{
	font-family: 'Open Sans', sans-serif;
	font-weight: 24;
	font-size: var(--font-size);
	background: black;
	color: white;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
	-webkit-user-drag: none;
	-khtml-user-drag: none;
	-moz-user-drag: none;
	-o-user-drag: none;
}

/* Seems necessary to make iframes work on itch.io on mobile iOS :-( */
#container
{
    position: absolute;
    display: block;
    margin: 0;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    overflow: scroll;
    overflow-x: hidden;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    background-size: cover;
    background-repeat: no-repeat;
	z-index: 10;    
}

#story
{
	position: relative;
	margin: 0 auto;
	overflow: hidden;
	height: 100%;
	width: 70rem;
	min-width: 60vw;
	max-width: 80vw !important;
	transition: opacity 2s ease;
	padding: 0em 1em 0em 1em;
}

@media (hover:none), (hover:on-demand)
{
	#story
	{
		max-width: 90%;
	} 
}

#story > *:first-child {
	/*margin-top: 0 !important;*/
}

#story > *:last-child 
{
	margin-bottom: 15vh !important;
}

p
{
	/*font-size: larger;*/
	margin-block-start: 0px !important;
	line-height: 1.4;
}

p, p > *
{
	-webkit-user-drag: none;
	-khtml-user-drag: none;
	-moz-user-drag: none;
	-o-user-drag: none;
}

a 
{
	text-decoration: none !important;
	transition: all 0.5s linear;
}

a:hover
{
	color: white;
}


.choice
{
	 /*opacity: 0.5;*/
	 /*transition: all 0.1s;*/
	font-weight: 700;
	font-family: sans-serif;
	color: #b97c2c;
	text-align: center;
}

.choice:hover
{
	color: white;
	opacity: 1;
	transition: all 1s;	
}

.choice > a
{
	color: inherit;
}

.choice > a:active
{
	color:red;
}

.chosen
{
	color: white !important;
	opacity: 1 !important;
}

/* ================================================================= */
/* PATCH SPECIFIC CSS                                                */
/* ================================================================= */

/* --------------- */
/* parallax frames */
/* --------------- */
.frame
{
	width: 100%;
	height: calc(100vw * 0.2);
	overflow: hidden;
	position: relative;
}

.frameLayer
{
	position: absolute;
	width: 120%;
	display: block;
	top: -9999px;
	bottom: -9999px;
	left: -9999px;
	right: -9999px;
	margin: auto;
	max-width: auto;
}

/* css for mobile */
@media (hover:none), (hover:on-demand) 
{ 
	.frame 
	{ 
		min-height: calc(100vmax * 0.25);
	}
	.frameLayer
	{
		width: 150%;
	}
}

@media only screen and (max-width : 576px) {
	body {
		background: #232323;
		/*color: #333;*/
	}

	#story
	{
		/*min-width: 60vw;*/
		max-width: calc(100vw - 4rem) !important;
		padding-left: 0;
		padding-right: 0;
		margin-left: 2rem;
		margin-right: 2rem;
	}

	p {
		/*font-family: "Helvetica", "Arial";*/
		line-height: 1.3;
		text-align: left;
	}

	.text {
		line-height: 1.5;
		/*padding-left: 3rem;*/
		/*padding-right: 1rem;*/
		/*margin-left: 0.5rem;*/
	}

	.choice {
		margin-left: 2rem;
		margin-right: 2rem;
		/*padding-left: 1rem;*/
		/*padding-right: 1rem;*/
	}

	p.text + p.choice {
		padding-top: 1.5rem;
	}
}

/* ------- */
/* preload */
/* ------- */

@font-face {
	font-family: jollyRogerRegular;
	src: url(assets/JollyRogerRegular.ttf);
}
/* open-sans-300 - latin */
@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 300;
	src: url('./fonts/OpenSans-Light.ttf');
}
/* open-sans-300italic - latin */
@font-face {
	font-family: 'Open Sans';
	font-style: italic;
	font-weight: 300;
	src: url('./fonts/OpenSans-LightItalic.ttf');
}
/* open-sans-regular - latin */
@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 400;
	src: url('./fonts/OpenSans-Regular.ttf');
}
/* open-sans-italic - latin */
@font-face {
	font-family: 'Open Sans';
	font-style: italic;
	font-weight: 400;
	src: url('./fonts/OpenSans-Italic.ttf');
}
/* open-sans-700 - latin */
@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 700;
	src: url('./fonts/OpenSans-Bold.ttf');
}
/* open-sans-700italic - latin */
@font-face {
	font-family: 'Open Sans';
	font-style: italic;
	font-weight: 700;
	src: url('./fonts/OpenSans-BoldItalic.ttf');
}

.progressbar
{
	position: absolute;
	overflow: hidden;
	top: 0;
	background: #7690ac;
	width: 0%;	
	height: 1vh;
}

.description {
	font-style: italic;
}

.title {
	font-size: var(--title-size);
	font-weight: 600;
	padding-top: 230px;
	font-family: jollyRogerRegular, sans-serif;
	text-align: center;
	background-image: url('assets/25352176_skull_pirates_with_sword_illustration.svg');
	background-repeat: no-repeat;
	background-position: center;
	background-size: 260px;
}

svg, .picto {
	margin-bottom: -5px;
	width: 20px;
	height: auto;
}

svg {
	color: snow;
}

.choice:hover > a .add-user-plus-path, .choice:hover > a .remove-user-minus-path {
	animation-play-state: running;
}

.add-user-plus-path, .remove-user-minus-path {
	animation: blinking linear 0.2s alternate infinite;
	animation-play-state: paused;
	/*transform-origin: 50% 50%;*/
	/*transform-box: fill-box;*/
}

.add-user-plus-path {
	color: red;
}

.remove-user-minus-path {
	color: blue;
}

@keyframes blinking {
	to {
		color: currentColor;
		/*transform: rotate(360deg);*/
	}
}

.crossed, .crossed-1200 {
	stroke: red;
	animation: crossed ease 0.20s alternate infinite;
	animation-iteration-count: 40;
	animation-play-state: running;
}
.crossed {
	stroke-width: 50;
}
.crossed-1200 {
	stroke-width: 117;
}

@keyframes crossed {
	to {
		stroke: transparent;
	}
}

.shoot {
	transform: rotate(-90deg);
}

.hound {
	transform: scaleX(-1)
}

.success {
	color: gold;
}

/*
	Scale some path to view box.
*/
.shining-sword-path {
	transform: matrix(1.076945, 0, 0, 1.076945, -17.318239, -22.468512);
}

.dodging-path {
	transform: matrix(1.074917, 0, 0, 1.074917, -18.039251, -17.620647);
}

.shattered-sword-path {
	transform: matrix(1.083444, 0, 0, 1.083444, -25.629959, -16.221363);
}

.eye-target-path {
	transform: matrix(1.090173, 0, 0, 1.090173, -23.084419, -28.468163);
}

.hex-center {
	color: grey;
}

.hex-top, .hex-top-left, .hex-top-right, .hex-back-left, .hex-back-right, .hex-back {
	color: black;
}

.hex-back-red .hex-back, .hex-top-red .hex-top {
	color: red;
	animation: blinking linear 0.2s alternate infinite;
	animation-play-state: paused;
}

.choice:hover > a .hex-back-red .hex-back, .choice:hover > a .hex-top-red .hex-top {
	animation-play-state: running;
}

p.text {
	--character-test-margin: calc(var(--base-margin)/4 + var(--base-margin));
	--rolled-dice-margin: calc(var(--svg-size) + var(--base-margin)/4 + var(--character-test-margin));
	--success-die-margin: calc(var(--base-margin)/2 + var(--base-margin) + var(--rolled-dice-margin));
	--rolled-dice-color: silver;
	--success-die-color: gold;
	--character-test-result-font-color: gold;
	--character-test-result-end-font-color: gold;
	--fight-result-font-color: gold;
	--fight-action-background-color: rgba(36, 131, 255, 0.44);
	--test-section-background-color: rgba(65, 98, 255, 0.22);
	--fight-result-background-color: var(--fight-action-background-color);  /* #002714; */
	/*health health-character health-character-general-status health-character-general-status-fatally*/
	--health-character-name-padding: calc(var(--base-margin)/4 + var(--base-margin));
	--health-character-general-status-padding: calc(var(--health-character-name-padding));
	--health-character-body-status-padding: calc(var(--svg-size) + var(--base-margin)/4 + var(--health-character-general-status-padding));
	--health-character-background-color: rgba(255, 0, 0, 0.1);
	--information-color: rgba(51, 255, 0, 0.61);
	--information-background-color: rgba(55, 255, 0, 0.13);
}

.character-test {
	font-weight: bolder;
	padding-left: var(--character-test-margin);
}

.character-test-result {
	padding-left: var(--character-test-margin);
	padding-top: 0.5rem;
	color: var(--character-test-result-font-color);
}

.character-test-result-end {
	padding-left: var(--character-test-margin);
	padding-top: 0.5rem;
	margin-bottom: calc(var(--base-margin));
	color: var(--character-test-result-end-font-color);
}

.rolled-dice {
	padding-left: var(--rolled-dice-margin);
	color: var(--rolled-dice-background-color);
}

.success-die {
	padding-left: var(--success-die-margin);
	color: var(--success-die-color);
}

.quote {
	text-align: center;
	font-style: italic;
	margin-bottom: calc(var(--base-margin));
}

.test-section {
	margin-bottom: 0;
	padding-bottom: var(--base-margin);
	background-color: var(--test-section-background-color);
}

.test-section-title {
	text-align: center;
	font-weight: bold;
	margin-top: calc(var(--base-margin) / 2);
}

:not(.test-section, .fight-action) + .test-section {
	border-top-left-radius: 1rem;
	border-top-right-radius: 1rem;
}

.test-section:has(+ :not(.test-section, .fight)) {
	border-bottom-left-radius: 1rem;
	border-bottom-right-radius: 1rem;
}

.dice-ten {
	color: aquamarine;
}

.dice-twelve {
	color: cornflowerblue;
}


.dice-twenty {
	color: fuchsia;
}

.fight {
	padding-left: calc( var(--base-margin)/2);
	padding-right: calc( var(--base-margin)/2);
}

.fight:has(+ :not(.test-section, .fight, .health-character)) {
	border-bottom-left-radius: 1rem;
	border-bottom-right-radius: 1rem;
	margin-bottom: var(--base-margin);
	padding-bottom:0;
}

:not(.test-section, .fight, .health-character) + .fight {
	border-top-left-radius: 1rem;
	border-top-right-radius: 1rem;
}

/*.fight-result:has(+ :not(.fight, .health-character)) {*/
/*	border-bottom-left-radius: 1rem;*/
/*	border-bottom-right-radius: 1rem;*/
/*}*/

.fight-action {
	border-bottom: 0;
	margin-bottom: 0;
	padding-bottom: var(--base-margin);
	background-color: var(--fight-action-background-color);
}

.fight-action:has(+ .fight-opposition, .health-character) {
	border-bottom: 0;
	margin-bottom: 0;
	padding-bottom: var(--base-margin);
}

.fight-result {
	color: var(--fight-result-font-color);
	background-color: var(--fight-result-background-color);
}

.fight-result:has(+ .fight, + .health-character) {
	border-bottom: 0;
	margin-bottom: 0;
	padding-bottom: var(--base-margin);
}

.fight-result-no-damage {

}

.fight-result-damage {

}

.fight-result-charge {

}

.fight-result-charge-fail {

}

.fight-result-move {

}

.fight-action-draw-weapon {

}

.fight-action-pick-up-weapon {

}


.turn {
	font-weight: bold;
	text-align: center;
}


.health-character {
	margin-bottom: 0;
	padding-bottom: var(--base-margin);
	background-color: var(--health-character-background-color);
	/*background-color:  #460a0a;*/
}

.health-character-name {
	padding-left: var(--health-character-name-padding);
	/*text-align: center;*/
	/*font-weight: bolder;*/
	/*margin-top: calc(var(--base-margin) / 2);*/
}

.health-character-general-status {
	padding-left: var(--health-character-general-status-padding);
}

.health-character-body-status {
	padding-left: var(--health-character-body-status-padding);
}

:not(.health-character, .fight-result) + .health-character {
	border-top-left-radius: 1rem;
	border-top-right-radius: 1rem;
}

.health-character:has(+ :not(.health-character, .fight)) {
	margin-bottom: var(--base-margin);
	padding-bottom: 0;
	border-bottom-left-radius: 1rem;
	border-bottom-right-radius: 1rem;
}

.information {
	/*border-bottom: 0;*/
	/*margin-bottom: 0;*/
	/*padding-bottom: var(--base-margin);*/
	/*color: var(--information-color);*/
	border-radius: 1rem;
	background-color: var(--information-background-color);
}
