@page {
    size: JIS-B5 landscape;
    width: 860px;
}

@media print {

    nav,
    .text {
        display: none !important;
    }

    section {
        width: 50%;
    }
}

html {
    font-size: 16px;
    font-family: system-ui;
    line-height: 1.5;
    color: #1b1b1b;
}

@media screen and (width < 768px) {
    html {
        font-size: 2.083333333333vw;
    }
}

html,
body {
    width: 100%;
    margin: 0;
}

img {
    display: block;
    width: 100%;
}

nav {
    font-size: 24px;
    text-align: center;
    padding-inline: 1em;
}

nav a {
    color: #fb6f92;
    text-decoration: none;
}

nav a:hover {
    text-decoration: underline wavy;
    text-underline-offset: 0.25em;
}

main {
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: wrap;
    justify-content: center;
}

article {
    position: relative;
    margin: 0;
    padding: 0;
    max-width: 768px;
}

.text {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

.text[lang="ja"] {
    overflow: hidden;
    writing-mode: vertical-rl;
    text-orientation: upright;
    white-space: nowrap;
    color: transparent;
}

.text[lang="ja"] h1,
.text[lang="ja"] h2,
.text[lang="ja"] p {
    font-weight: normal;
    font-size: inherit;
    margin: 0;
    line-height: 1;
}

.text[lang="ja"] span {
    display: block;
}

.text[lang="ja"] span span {
    display: inline-block;
}

.text[lang="ja"] a {
    color: inherit;
    display: inline-block;
    position: relative;
    text-decoration: none;
}

.text[lang="ja"] a:hover::before, 
.text[lang="ja"] a:hover::after {
  content: "♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥";
  color: #fb6f92;
  font-size: 1rem;
  letter-spacing: 0;
  position: absolute;
  top: 0rem;
  bottom: 0rem;
  overflow: hidden;
}

.text[lang="ja"] a:hover::before {
   right: -2rem;
}

.text[lang="ja"] a:hover::after {
  left: -2rem;
}

.text[lang="en"] {
    padding: 3rem;
    border-radius: 3rem;
    z-index: 1;
    transition: opacity 250ms;
    opacity: 0;
    font-size: 3rem;
    background: #ffe5ec;
}

.text[lang="en"]:hover {
    opacity: 1;
}

.text[lang="en"] h1,
.text[lang="en"] h2,
.text[lang="en"] p {
    font-size: inherit;
    margin-block-start: 0;
    line-height: 1.25;
}

.text[lang="en"] p:last-of-type {
    margin-block-end: 0;
}