body {
    font-family: 'Quincy CF', serif;
    font-weight: lighter;
    background-color: white;
    overflow: hidden;
}


@media screen and (prefers-reduced-motion: no-preference) {
    body.switched {
        transition: color 0.6s, background-color 0.6s;
    }
    #controls.switched {
        transition: color 0.6, background-color 0.6;
    }
}

h1,
h2 {
    text-align: center;
    font-family: "richmond-display", sans-serif;
    font-weight: 200;
    font-style: normal;
    font-size: 75pt;
    margin: 0;
    padding: 0;
}

h1 {
    font-size: 75pt;
    margin-bottom: 10px;
}

h2 {
    font-size: 14pt;
    font-style: italic;
    font-family: sans-serif;
    font-weight: lighter;
    color: #BBB;
}

.header {
    padding-top: 3em;
    padding-bottom: 3em;
}

/*
  Built-in class:
    # author: Name
*/
.byline {
    font-style: italic;
}

.written-in-ink {
    z-index: 4;
    font-size: 9pt;
    font-family: sans-serif;
    text-align: center;
    font-weight: 700;
   /* position: fixed;  */
    display: none;
  /*  width: 100%; */
    background: white;
    margin: 0;
  /*  padding-top: 6px;
    padding-bottom: 6px; */
    height: 14px;
    top: 0;
}

@media screen and (prefers-reduced-motion: no-preference) {
    .written-in-ink {
        transition: color 0.6s, background 0.6s;
    }
}

/* 
  Enables <iframe> support work on itch.io when using mobile iOS
*/
.outerContainer {
    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;
    padding-top: 50px;
    background-size: cover;
    background-repeat: no-repeat;
}
.container {
    display: block;
    max-width: 450px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 2em;
    padding-bottom: 200px;
    background: white;
}

@media screen and (prefers-reduced-motion: no-preference) {
    .switched .container {
        transition: background-color 0.6s;
    }
}

@media screen and (max-width: 600px) {
    .outerContainer {
        background-size: cover;
        background-repeat: no-repeat;
        padding-top: 100px;
    }
    h1 {
        display:inline-block;
        font-size: 60px;
        line-height: 1;
        }
    
    .container {
        padding-top: 1em;
        padding-bottom: 230px;
        padding-left: 25px;
        padding-right: 35px;
    }

    .gradient {
        height: 150px;
    }
}



p {
    font-size: 16pt;
    color: #000000;
    line-height: 1.7em;
    font-weight: lighter;
}

a {
    color: #100d5b;
    font-family: sans-serif;
    text-decoration: none;
}

.unclickable {
    font-weight: 700;
    color: #4f3411;
    font-family: sans-serif;
    text-decoration: none;
    cursor: not-allowed;
}

a:hover {
    color: rgb(68, 68, 68);
}

@media screen and (prefers-reduced-motion: no-preference) {
    a {
        transition: color 0.6s;
    }

    a:hover {
        transition: color 0.1s;
    }
}

strong {
    font-weight: bold;
}

img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
}

.container .hide {
    opacity: 0.0;
}

.container .invisible {
    display: none;
}

.container>* {
    opacity: 1.0;
}
@media screen and (max-width: 600px) {
    p {
        font-size: 15pt;
        line-height: 1.7;
    }
}

@media screen and (prefers-reduced-motion: no-preference) {
    .container>* {
        transition: opacity 1.0s;
    }
}

/*
  Class applied to all choices
  (Will always appear inside <p> element by default.)
*/
.choice {
    text-align: right;
    line-height: 1.7em;
    font-weight: 700;
}

/* 
  Class applied to first choice
*/
:not(.choice)+.choice {
    padding-top: 1em;
}

/*
  Class applied to choice links
*/
.choice a, .choice span {
    font-size: 20pt;
    font-family: 'corundum-text-sc', serif;
    font-weight: 400;

}


    /* Override for spoken-choice spans */
    .choice .spoken,
    .choice .spoken span {
        font-family: corundum-text, serif;
        font-style: italic;
        font-weight: 400;
    }


.choice a:hover {
    color: rgb(104, 104, 104);
}

/* 
  Built-in class:
    The End # CLASS: end
*/
.end {
    text-align: center;
    font-weight: bold;
    color: black;
    padding-top: 20px;
    padding-bottom: 20px;
}

#controls {
    z-index: 5;
    position: fixed;
    height: 20px;
    width: 100%;
    top: auto;
    bottom: 0;
    user-select: none;
    background: white;
}

#header-content {
    max-width: 100%;
  margin: 0 auto;         
  text-align: center;
  font-size: 9pt;
    font-weight: 400;
    align-items: center;
    display: flex;
    justify-content: center;
    gap: 1em;
}


/*
fade-in effect for new content
*/
.fade-out {
    opacity: 0;
    transition: opacity 0.7s ease-out;
}
.fade-in {
    opacity: 0;
    transition: opacity 0.7s ease-in;
    animation: fadeInAnimation 0.7s forwards;
}

@keyframes fadeInAnimation {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media screen and (prefers-reduced-motion: no-preference) {
    #controls {
        transition: color 0.6s, background-color 0.6s;
    }
}

#controls [disabled] {
    color: #ccc;
}

#controls>*:not(:last-child):after {
    content: " | ";
}

@media screen and (max-width: 980px) {
    #controls {
        z-index: 5;
        padding-top: 24px;
        padding-bottom: 20px;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0px;
        top: auto;
    }
}

/* 
  Dark Theme (Added in Inky 0.10.0)
    # theme: dark
*/

body.dark {
    background: rgb(30, 30, 30);
    color: white;
}

.dark h2 {
    color: #666;
}

.dark .container {
    background: rgb(30, 30, 30);
}

.dark .written-in-ink {
    background: rgb(30, 30, 30);
}

.dark p {
    color: rgb(150, 150, 150);
}

.dark a {
    color: #ffffff;
}
.dark .unclickable{
    color: #afafaf;
    cursor:not-allowed;
}

.dark a:hover {
    color: rgb(99, 99, 99);
}

@media screen and (prefers-reduced-motion: no-preference) {
    .dark a {
        transition: color 0.6s;
    }
}

.dark strong {
    color: white;
}

.dark #controls {
    background: rgb(30, 30, 30);
}

.dark .end {
    color: white;
}


/* ==================================================================
   Scroll-fade container
   ================================================================== */
   .gradient {
    position: fixed;
    top: 0px; left: 0;
    width: 100%; height: 250px;     /* adjust height as needed */
    pointer-events: none;
    z-index: 3;
  
    /* hide by default; fade in/out on scroll */
    opacity: 0;
    transition: opacity 0.6s;
  }
  .gradient.visible {
    opacity: 1;
  }
  
  /* ==================================================================
     Two overlaid layers for light vs. dark cross-fade
     ================================================================== */
  .gradient::before,
  .gradient::after {
    content: "";
    position: absolute;
    inset: 0;                       /* shorthand for top/right/bottom/left:0 */
    pointer-events: none;
  
    /* always animate opacity when it changes */
    transition: opacity 0.6s;
  }
  
  /* light mode = white→transparent */
  .gradient::before {
    background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgb(30, 30, 30,0) 100%);
    opacity: 1;
  }
  
  /* dark mode = black→transparent */
  .gradient::after {
    background: linear-gradient(to bottom, rgb(30, 30, 30), rgba(0,0,0,0));
    /* default opacity = hidden in light mode */
    opacity: 0;
  }
  
  /* when `.dark` is on <html> or <body>, flip them */
  html.dark .gradient::before,
  body.dark .gradient::before {
    opacity: 0;
  }
  html.dark .gradient::after,
  body.dark .gradient::after {
    opacity: 1;
  }