/**
 * style.horizontal.css
 * version 3.0.0
 * for blog.megakite.icu
 */

* {
  margin: 0;
  padding: 0;
  border: 0;
}

html {
  font-size: 20px;
  text-autospace: normal;
}

:root {
  --color-1: #fff;
  --color-2: #000;
}

#header-title,
#header-about {
  font-family: 'Spectral', serif;
  font-weight: 300;
  font-variation-settings: 'opsz' 60;
}

#title {
  padding: 2rem;
}

#title:has(+ #subtitle) {
  padding-bottom: unset;
}

#subtitle {
  text-align: right;
  font-family: 'Public Sans', 'Noto Sans SC', sans-serif;
  font-weight: 500;
  padding-bottom: 1rem;
}

#center {
  display: flex;
  height: 100dvh;
  text-align: center;
  align-items: center;
  justify-content: center;
}

.audio {
  text-align: center;
  margin-bottom: 2rem;
}

.punc {
  font-family: 'Noto Serif SC', serif;
}

strong .punc {
  font-family: 'Noto Sans SC', sans-serif;
}

.i1 {
  margin-left: 2rem;
}

.i2 {
  margin-left: 4rem;
}

.i3 {
  margin-left: 6rem;
}

.il {
  color: var(--color-2);
}

.bubble-left,
.bubble-right {
  display: flex;
  width: fit-content;
  margin-bottom: 1rem;
}

.bubble-left {
  margin-right: auto;
}

.bubble-right {
  margin-left: auto;
}

.bubble-left-text {
  flex: 1;
  border-left: 1px solid var(--color-2);
}

.bubble-right-text {
  flex: 1;
  border-right: 1px solid var(--color-2);
}

.bubble-left-name,
.bubble-right-name {
  width: 1rem;
  color: var(--color-1);
  background-color: var(--color-2);
  text-align: center;
  line-height: 2rem;
}

body {
  margin: 0 auto;
  max-width: 40rem;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--color-2);
  background-color: var(--color-1);
  font-family: 'Spectral', 'Noto Serif SC', serif;
}

#primary {
  flex: 1;
}

strong {
  font-family: 'Public Sans', 'Noto Sans SC', sans-serif;
  font-weight: 500;
}

h1, h2, h3, h4 {
  font-family: 'Public Sans', 'Noto Sans SC', sans-serif;
  font-weight: 500;
  padding: 1rem 2rem;
}

h1 {
  text-align: center;
  font-size: 1.4rem;
  line-height: 2rem;
}

h2, h3, h4 {
  border-top: 1px solid var(--color-2);
  background-color: var(--color-1);
  color: var(--color-2);
  font-size: 1rem;
  line-height: 2rem;
}

h2:hover, h3:hover, h4:hover {
  background-color: var(--color-2);
  color: var(--color-1);
}

p,
code {
  font-size: 1rem;
  line-height: 2rem;
  margin-bottom: 1rem;
}

p {
  padding: 0 2rem;
}

.post {
  padding: 1rem 0;
}

.post p {
  margin-bottom: 0;
}

.post-wrapper {
  border-top: 1px solid var(--color-2);
}

.post-wrapper:first-of-type {
  border-top: unset;
}

#post-list {
  border-top: 1px solid var(--color-2);
}

.post:hover {
  color: var(--color-1);
  background-color: var(--color-2);
}

.bubble-left p,
.bubble-right p {
  padding: 0;
  margin-bottom: 0;
}

.bubble-left p {
  margin-left: calc(1rem - 1px);
  padding-right: 2rem;
}

.bubble-right p {
  margin-right: calc(1rem - 1px);
  padding-left: 2rem;
}

.bubble-left p:last-of-type,
.bubble-right p:last-of-type {
  margin-bottom: unset;
}

code {
  font-family: 'Spline Sans Mono', monospace;
  font-size: .85rem;
  line-height: 1rem;
}

ul {
  color: unset;
}

main ul {
  list-style: none;
}

nav {
  display: flex;
  justify-content: space-between;
}

small,
.footnotes ol li::marker,
.footnotes ol li p,
figcaption p {
  font-size: 0.7rem;
  line-height: 1rem;
  font-family: 'Spectral', 'Noto Serif SC', serif;
  font-variation-settings: 'opsz' 8;
}

ol,
ul {
  list-style-position: outside;
  padding: 0 2rem;
  margin-block-start: 0;
  margin-block-end: 1rem;
}

p:has(img) {
  padding: 0;
}

ol li,
ul li {
  line-height: 2rem;
}

ol li p {
  padding: 0;
}

figcaption p {
  margin-top: 1rem;
  text-align: center;
}

a {
  color: unset;
  text-decoration: none;
  border-bottom: 1px solid var(--color-2);
}

a:hover {
  color: var(--color-1);
  background-color: var(--color-2);
}

figure {
  margin: 0;
}

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

hr {
  border-top: 1px solid var(--color-2);
}

.footnotes hr {
  border: none;
  margin-bottom: unset;
}

blockquote,
pre {
  border-left: 1rem solid var(--color-2);
  margin-bottom: 1rem;
  overflow-x: auto;
}

pre {
  padding-left: 1rem;
}

blockquote p {
  margin-bottom: unset;
  padding-left: 1rem;
}

textarea {
  background-color: unset;
  color: unset;
  font-family: sans-serif;
  font-size: unset;
  width: 100%;
  resize: none;
}

textarea::placeholder {
  color: var(--color-2);
  opacity: 1;
}

button {
  background-color: unset;
  color: unset;
  font-family: unset;
  font-size: unset;
  cursor: pointer;
  width: 100%;
  height: 2rem;
}

/* sticky footer */
footer {
  position: sticky;
  bottom: 0;
  top: auto;
  background-color: var(--color-2);
  color: var(--color-1);
  z-index: 1;
  padding: 1rem 0;
}

footer p {
  margin-bottom: 0;
}

@media (max-width: 480px) {
  html {
    font-size: 16px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-1: #000;
    --color-2: #fff;
  }
}