@charset "UTF-8";

/* runic */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/notosansrunic/v18/H4c_BXWPl9DZ0Xe_nHUaus7W68WmWBBuLtg.woff2) format('woff2');
  unicode-range: U+16A0-16F8;
}


@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("EB Garamond Regular"), local("EBGaramond-Regular"), url(https://fonts.gstatic.com/s/ebgaramond/v10/SlGUmQSNjdsmc35JDF1K5GR4SDktYw.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* cyrillic */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("EB Garamond Regular"), local("EBGaramond-Regular"), url(https://fonts.gstatic.com/s/ebgaramond/v10/SlGUmQSNjdsmc35JDF1K5GRxSDktYw.woff2) format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* greek-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("EB Garamond Regular"), local("EBGaramond-Regular"), url(https://fonts.gstatic.com/s/ebgaramond/v10/SlGUmQSNjdsmc35JDF1K5GR5SDktYw.woff2) format("woff2");
  unicode-range: U+1F00-1FFF;
}

/* greek */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("EB Garamond Regular"), local("EBGaramond-Regular"), url(https://fonts.gstatic.com/s/ebgaramond/v10/SlGUmQSNjdsmc35JDF1K5GR2SDktYw.woff2) format("woff2");
  unicode-range: U+0370-03FF;
}

/* vietnamese */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("EB Garamond Regular"), local("EBGaramond-Regular"), url(https://fonts.gstatic.com/s/ebgaramond/v10/SlGUmQSNjdsmc35JDF1K5GR6SDktYw.woff2) format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
}

/* latin-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("EB Garamond Regular"), local("EBGaramond-Regular"), url(https://fonts.gstatic.com/s/ebgaramond/v10/SlGUmQSNjdsmc35JDF1K5GR7SDktYw.woff2) format("woff2");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("EB Garamond Regular"), local("EBGaramond-Regular"), url(https://fonts.gstatic.com/s/ebgaramond/v10/SlGUmQSNjdsmc35JDF1K5GR1SDk.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* cyrillic-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("EB Garamond Regular"), local("EBGaramond-Regular"), url(https://fonts.gstatic.com/s/ebgaramond/v10/SlGUmQSNjdsmc35JDF1K5GR4SDktYw.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* cyrillic */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("EB Garamond Regular"), local("EBGaramond-Regular"), url(https://fonts.gstatic.com/s/ebgaramond/v10/SlGUmQSNjdsmc35JDF1K5GRxSDktYw.woff2) format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* greek-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("EB Garamond Regular"), local("EBGaramond-Regular"), url(https://fonts.gstatic.com/s/ebgaramond/v10/SlGUmQSNjdsmc35JDF1K5GR5SDktYw.woff2) format("woff2");
  unicode-range: U+1F00-1FFF;
}

/* greek */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("EB Garamond Regular"), local("EBGaramond-Regular"), url(https://fonts.gstatic.com/s/ebgaramond/v10/SlGUmQSNjdsmc35JDF1K5GR2SDktYw.woff2) format("woff2");
  unicode-range: U+0370-03FF;
}

/* vietnamese */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("EB Garamond Regular"), local("EBGaramond-Regular"), url(https://fonts.gstatic.com/s/ebgaramond/v10/SlGUmQSNjdsmc35JDF1K5GR6SDktYw.woff2) format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB;
}

/* latin-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("EB Garamond Regular"), local("EBGaramond-Regular"), url(https://fonts.gstatic.com/s/ebgaramond/v10/SlGUmQSNjdsmc35JDF1K5GR7SDktYw.woff2) format("woff2");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("EB Garamond Regular"), local("EBGaramond-Regular"), url(https://fonts.gstatic.com/s/ebgaramond/v10/SlGUmQSNjdsmc35JDF1K5GR1SDk.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* fonts to display IPA characters */
@font-face {
  font-family: "ipa";
  unicode-range: u+0250-02af;
  src: local("Junicode"), url("/res/Junicode.woff") format("woff");
}

@font-face {
  font-family: "ipa";
  unicode-range: u+0250-02af;
  font-weight: bold;
  src: local("Junicode Bold"), url("/res/Junicode-Bold.woff") format("woff");
}

@font-face {
  font-family: "ipa";
  unicode-range: u+0250-02af;
  font-weight: bold;
  font-style: italic;
  src: local("Junicode Bold Italic"), url("/res/Junicode-BoldItalic.woff") format("woff");
}

@font-face {
  font-family: "ipa";
  unicode-range: u+0250-02af;
  font-style: italic;
  src: local("Junicode Italic"), url("/res/Junicode-Italic.woff") format("woff");
}

@font-face {
  font-family: "mincho";
  unicode-range: u+4e00-9fbf, u+3040-309f, u+30a0-30ff;
  src: local("Kochi Mincho"), local("Hiragino Mincho Pro"), local("Yu Mincho"), local("MS Mincho");
}


@viewport {
  zoom: 1;
  width: device-width;
}

:root {
  --hue: 338;
  --width: 35rem;
  --bright: 12%;
  --link-br: 73%;
  --hover: 22%;

  /* background defaults — no image by default */
  --bg-url: none;
  --bg-size: cover;
  --bg-position: center;
  --bg-attachment: fixed;
  --bg-alpha-x: 0;
  --bg-alpha-y: 0;
}

body {
  display: flex;
  flex-direction: column;
  font-size: 16pt;
  
}

@media (max-width: 900px) {
  body {
    font-size: 14pt;
  }
}

::selection {
  background-color: hsl(var(--hue), 100%, 60%);
  color: white;
}

body {
  /* margin-top: 1em;
  padding: 0 1em; */
  font-family: mincho, ipa, Garamond, GaramondNo8, "Garamond Premier Pro", "Adobe Garamond Pro", "Adobe Garamond", "EB Garamond", "Junicode", serif;
  hanging-punctuation: first last force-end;
  text-align: justify;
}

@media print {
  body {
    --faint-color: #666;
    color: black;
  }
}

@media screen {
  body {
    --fg-color: hsl(var(--hue), 100%, 89%);
    --bg-color: hsl(var(--hue), 84%, var(--bright));
    --faint-color: hsl(var(--hue), 64%, 64%);
    max-width: var(--width);
    margin: auto;
    margin-top: 1em;
    margin-bottom: 95vh;
    background: var(--bg-color);
    color: var(--fg-color);

    border: 2px solid hsl(var(--hue), 64%, 24%);

    padding: 1em 2.5em;
  }
}

@media all and (min-resolution: 400dpi) and (max-width: 1080px) {
  body {
    max-width: calc(1080px - 1em);
    margin: auto;
    margin-top: 1em;
    margin-bottom: 1em;
  }
}

body::-webkit-scrollbar {
  width: 20px;
}

body::-webkit-scrollbar-track {
  background: linear-gradient(to left, var(--bg-color) -50%, hsl(var(--hue), 100%, calc(var(--bright) / 2)) 130%);
}

body::-webkit-scrollbar-thumb {
  background: url(../svg/scroller.svg), hsl(var(--hue), 100%, 21%);
  background-size: 80%;
  background-repeat: no-repeat;
  background-position: center;
  border-left: 1px outset hsl(var(--hue), 60%, 30%);
  border-radius: 1.5px 0 0 1.5px;
}

body::-webkit-scrollbar-thumb:hover {
  background-color: hsl(var(--hue), 100%, 28%);
  border-color: hsl(var(--hue), 60%, 40%);
}

img {
  max-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  all: unset;
  display: block;
  text-align: left;
  line-height: 1em;
  margin-top: 0.3em;
}

@media screen {

  h1 a[href],
  h2 a[href],
  h3 a[href],
  h4 a[href],
  h5 a[href],
  h6 a[href] {
    color: hsl(var(--hue), 60%, 80%);
  }

  h1 a[href]:hover,
  h2 a[href]:hover,
  h3 a[href]:hover,
  h4 a[href]:hover,
  h5 a[href]:hover,
  h6 a[href]:hover {
    color: var(--fg-color);
  }
}

@media print {

  h1 a[href],
  h2 a[href],
  h3 a[href],
  h4 a[href],
  h5 a[href],
  h6 a[href] {
    text-decoration: none;
  }
}

h1 {
  font-size: 1.9666666667em;
}

section>h1~* {
  margin-left: 0.5em;
}

h2 {
  font-size: 1.6333333333em;
}

h2::before {
  display: inline;
  margin-right: 0.2em;
}

section>h2~* {
  margin-left: 1em;
}

h3 {
  font-size: 1.3em;
}

h3::before {
  display: inline;
  margin-right: 0.2em;
}

section>h3~* {
  margin-left: 1.5em;
}

h4 {
  font-size: 0.9666666667em;
}

h4::before {
  display: inline;
  margin-right: 0.2em;
}

section>h4~* {
  margin-left: 2em;
}

h5 {
  font-size: 0.6333333333em;
}

h5::before {
  display: inline;
  margin-right: 0.2em;
}

section>h5~* {
  margin-left: 2.5em;
}

@media screen {

  /* dim the pathbar */
  h1 a[href],
  h3 a[href] {
    color: hsl(var(--hue), 50%, 70%);
  }
}

p {
  margin: 0.7em 0;
  line-height: 1.5em;
}

del {
  color: var(--faint-color);
  text-decoration: none;
  position: relative;
}

del::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 60%;
  height: 0.1em;
  background: hsl(var(--hue), 80%, 60%);
  transform: translateY(-50%);
}

ins {
  all: unset;
  border: 1px solid black;
  padding: 0.3ex 0.8ex;
  font-style: italic;
}

@media screen {
  ins {
    color: hsl(calc(var(--hue) - 10), 100%, 70%);
    background-color: hsl(calc(var(--hue) - 10), 84%, 15%);
  }
}

body>code,
pre>code {
  display: inline-block;
  background-color: hsl(var(--hue), 71%, 25%);
  font-size: 0.8em;
  padding: 0 0.5em;
  text-shadow: 0px 1.2px 0px #2A0017;
  border: 1px solid #2A0017;
  font-family: "Inconsolata", monospace;
  box-shadow: 0 0 5px -2px black inset;
}

body>code,
pre>code,
code.listing {
  display: block;
  box-shadow: 0 0 8px -2px black inset;
  white-space: pre-wrap;
  padding: 0.5em 1em;
  line-height: 1.2em;
  tab-size: 4;
  width: 100%;
  overflow: scroll;
}

@media print {
  a[href] {
    color: black;
  }
}

@media screen {
  a[href] {
    --link-t: var(--hue), 100%, var(--link-br);
    --hi-t: var(--hue), 100%, calc(var(--link-br) + var(--hover));
    --link-c: hsl(var(--link-t));
    --ul-c: hsla(var(--link-t), 30%);
    --hi-c: hsl(var(--hi-t));
    --ul-hi-c: hsla(var(--hi-t), 60%);
    --glow-c: hsla(var(--link-t), 50%);
    color: var(--link-c);
    text-decoration-color: var(--ul-c);
    text-decoration-width: 1px;
    text-underline-offset: 2px;
  }

  p a[href]:focus,
  li a[href]:focus,
  span a[href]:focus,
  h1 a[href]:focus,
  h2 a[href]:focus,
  h3 a[href]:focus,
  p a[href]:hover:focus,
  li a[href]:hover:focus,
  span a[href]:hover:focus,
  h1 a[href]:hover:focus,
  h2 a[href]:hover:focus,
  h3 a[href]:hover:focus {

    color: var(--bg-color) !important;
    background: var(--fg-color) !important;
    box-shadow: 0 0 30px var(--ul-c);
    text-decoration: none;
    outline: none;
  }

  a[href]:hover,
  a[href]:active {
    color: var(--hi-c);
    text-decoration: underline;
    text-decoration-color: var(--ul-hi-c);
    text-shadow: 0px 0px 30px var(--glow-c);
    background: none !important;
    box-shadow: none;
  }
}

/* not actually using this, consider removing */
div.dir>div {
  margin-left: 2em;
  text-indent: -2em;
}

div.dir>div>*:first-child {
  font-weight: bold;
}

ol,
ul {
  padding-left: 1.2em;
  list-style: none;
  line-height: 1.4em;
}

ol ol,
ol ul,
ol li,
ul ol,
ul ul,
ul li {
  margin-top: 0.5em;
}

ol li>a[href]:first-child,
ul li>a[href]:first-child {
  display: inline-block;
}

ol li::before,
ul li::before {
  display: inline-block;
  color: hsl(var(--hue), 40%, 60%);
}

ul li::before {
  hanging-punctuation: none;
  content: "»";
  width: 0.7em;
  margin-left: -0.7em;
}

ol {
  counter-reset: li;
}

ol li::before {
  counter-increment: li;
  content: counter(li);
  width: 1.5em;
  margin-left: -1.9em;
  text-align: right;
  padding-right: 0.4em;
}

/* fix for multiple p inside li having blank line on marker */
ol li > p:first-child {
  display: inline;
}

.byline {
  margin-left: 1.5em;
  margin-top: -0.5;
  padding: 0em;
  font-style: italic;
  color: var(--faint-color);
}

hr {
  border: none;
  border-bottom: 1px solid hsl(var(--hue), 50%, 30%);
  width: 90%;
}

hr[data-dec]::before {
  display: block;
  content: attr(data-dec);
  position: relative;
  letter-spacing: 1em;
  text-align: center;
  top: 0.8em;
  color: hsl(var(--hue), 50%, 40%);
  font-size: 60%;
}

hr[data-dec=""]::before {
  content: "◆";
}

/* not actually using this, consider removing */
.imgbox {
  /* margin: 0 calc((20vw - 20%) * -1); */
  break-inside: avoid;
  width: 100%;
}

/* not actually using this, consider removing */
.entry {
  margin-left: 1em;
  text-indent: -1em;
}

nav {
  padding-bottom: 1em;
}

@media print {
  nav {
    display: none;
  }
}

nav::after {
  display: table;
  content: "";
  clear: both;
}

nav a[href] {
  --fg-color: hsl(var(--hue), 100%, 80%);
  display: block;
  color: var(--fg-color);
  background-color: hsl(var(--hue), 100%, calc(var(--bright) / 2));
  border: 1px solid var(--fg-color);
  text-decoration: none;
  line-height: .7em;
  transition-property: border-color, text-shadow, color, --fg-color, background;
  transition-duration: 0.2s;
}

nav a[href]:hover {
  --fg-color: hsl(var(--hue), 80%, 90%);
  background: hsl(var(--hue), 70%, 10%) !important;
  text-decoration: none;
}

nav a[href]:active,
nav a[href]:focus {
  padding: 0;
  margin: 0;
}

nav a[href].next::after,
nav a[href].prev::before {
  display: inline-block;
  color: var(--bg-color);
  font-weight: bold;
  background-color: var(--fg-color);
  padding: 1.7ex 1.5ex;
  text-shadow: none;
  transition-property: background-color, --fg-color;
  transition-duration: 0.2s;
}

nav a[href].next {
  float: right;
  padding-left: 2ex;
  border-radius: 0 0 0 10px;
}

nav a[href].next::after {
  margin-left: 2ex;
  content: "⮞";
}

nav a[href].prev {
  float: left;
  padding-right: 2ex;
  border-radius: 0 0 10px 0;
}

nav a[href].prev::before {
  margin-right: 2ex;
  content: "⮜";
}

blockquote,
aside {
  /* page-break-inside: avoid; */
  margin-left: 1em;
  margin-right: 1em;
  padding: 0.1px 1em;

  font-size: 90%;
}

@media screen {

  blockquote,
  aside {
    background: rgba(0, 0, 0, 0.5);
    outline: 1px solid hsl(var(--hue), 100%, calc(var(--bright) - 8%));
  }
}

blockquote>blockquote,
aside>blockquote,
blockquote>aside,
aside>aside {
  margin-bottom: 1em;
}

blockquote+blockquote,
aside+blockquote,
blockquote+aside,
aside+aside {
  margin-top: 1em;
}

blockquote {
  margin: 0;
  border-left: 5px solid hsl(var(--hue), 60%, calc(var(--bright) + 20%));
}

@media print {
  blockquote {
    border-color: black;
  }
}

.rune-wrapper {
  position: relative;
  display: inline-block;
  text-decoration: none;
  list-style: none;        /* for summary */
  cursor: pointer;
}

.rune-wrapper::-webkit-details-marker { display: none; }

.rune-wrapper.cw-90   { --rune-rotate:  90deg; }
.rune-wrapper.ccw-90  { --rune-rotate: -90deg; }
.rune-wrapper.cw-180  { --rune-rotate: 180deg; }
.rune-wrapper.ccw-180 { --rune-rotate: -180deg; }

.rune {
  display: inline-block;
  transition: transform 0.3s ease;
  font-weight: bolder;
}

.rune-wrapper::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--ul-c);
  transition: background 0.3s ease;
  padding-bottom: 4px;
}

.rune-wrapper:hover .rune,
details[open] > .rune-wrapper .rune {
  transform: rotate(var(--rune-rotate, 90deg));
  text-shadow: 0px 0px 30px var(--glow-c);
}

.rune-wrapper:hover::after,
details[open] > .rune-wrapper::after {
  background: var(--ul-hi-c);
}




#metadata {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  flex-direction: row-reverse;
  margin-bottom: 25px;
}
#metadata summary {
  list-style: none;  /* Firefox */
  cursor: pointer;
  user-select: none;
  color: var(--faint-color);
  font-size: 1.5em;
}
#metadata summary::-webkit-details-marker {
  display: none;     /* Chrome/Safari */
}
#metadata aside {
  display: none;
  margin-bottom: 0.2em;
}
#metadata[open] aside {
  display: block;
  position: absolute;
  width: 200px;
  padding-bottom: 5px;
  border: 1px solid var(--faint-color);
  transform: translate(-275px, -50px);
  background-color: hsl(var(--hue), 84%, calc(var(--bright) - 5%));
}


.stanza, .verse {
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 8px;
  margin-bottom: 28px;
  white-space: pre-line;
  margin: 20px auto;
  margin-top: -20px;
}

.stanza::before {
  content: attr(data-num);
  font-size: 0.75rem;
  margin-top: 25px;
  color: var(--faint-color);
}
