@charset "UTF-8";
:root {
  --color-bg: hsl(100, 15%, 90%);
  --color-txt: hsl(150, 45%, 22%);
  --color-txt-half: hsl(150, 15%, 50%);
  --font-family: 'IBM Plex Mono', Courier, monospace;
  --font-size-base: 16px;
  --width-content: 70ch;
  --margin1x: 1.5rem;
  --margin2x: 3rem;
  --margin3x: 4.5rem;
  --margin4x: 6rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: hsl(150, 5%, 10%);
    --color-txt: hsl(150, 10%, 80%);
    --color-txt-half: hsl(150, 10%, 40%);
  }
}

@keyframes spin {
  from {
    rotate: 0deg;
  }
  to {
    rotate: 360deg;
  }
}

html {
  font-size: var(--font-size-base);
  margin: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  padding-inline: 1rem;
}

@media (min-width: 700px) {
  html {
    padding-inline: 3rem;
  }
}

body {
  background-color: var(--color-bg);
  color: var(--color-txt);
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin-block: 0.2em;
}

h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin-top: var(--margin2x);
}

h3 {
  font-size: 1.1rem;
  line-height: inherit;
}

h4,
h5,
h6 {
  font-size: inherit;
  line-height: inherit;
}

a {
  color: var(--color-txt);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration: none;
}

.button-as-link {
  appearance: none;
  background: none;
  border: 0;
  color: var(--color-txt);
  cursor: pointer;
  display: inline;
  font: inherit;
  padding: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.button-as-link:hover {
  text-decoration: none;
}

.button_to {
  display: inline;
}

p {
  margin: 1em auto;
}

ul {
  list-style: "– ";
  padding-left: 2ch;
}

ol {
  list-style: decimal-leading-zero;
  padding-left: 4ch;
}

blockquote {
  border-left: 2px solid var(--color-txt);
  margin-inline: 0;
  padding-inline: 1rem;
}

img,
iframe {
  aspect-ratio: auto;
  display: block;
  max-width: 100%;
  object-fit: contain;
}

#flash {
  left: 0;
  position: fixed;
  right: 0;
  text-align: center;
  top: 3rem;
}

.nav {
  align-items: center;
  border-bottom: 1px dashed var(--color-txt);
  display: flex;
  font-size: 0.9rem;
  justify-content: space-between;
  margin: 0 auto;
  padding: 1ch 0;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.header {
  align-items: center;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: center;
  margin: var(--margin2x) auto 1rem auto;
  max-width: 384px;
  text-align: center;
}

.header img {
  display: inline-block;
}

@media (prefers-color-scheme: dark) {
  .header img {
    filter: invert(100%) hue-rotate(140deg) grayscale(0.8) brightness(1.1);
  }
}

.header p {
  margin-bottom: 0;
}

.actions {
  margin-bottom: var(--margin2x);
  text-align: center;
}

.article {
  margin: var(--margin2x) auto;
  max-width: 68ch;
}

.footer {
  border-top: 1px dashed var(--color-txt);
  font-size: 0.9rem;
  margin: var(--margin3x) auto var(--margin1x);
  padding: 1ch 0;
}

.footer p {
  margin: 0;
}

.button {
  background-color: var(--color-bg);
  border: 1px solid var(--color-txt);
  border-radius: 3px;
  box-shadow: 3px 3px 0 var(--color-txt);
  color: inherit;
  cursor: pointer;
  display: inline-block;
  font-family: inherit;
  font-size: inherit;
  font-weight: bolder;
  line-height: 1;
  padding: 1ch;
  text-decoration: none;
}

.button:active {
  box-shadow: 2px 1px 0 var(--color-txt);
  transform: translateX(1px) translateY(2px);
}

.button[disabled] {
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.2;
}

.form {
  margin-inline: auto;
  max-width: 600px;
}

.field {
  margin-bottom: 0.5rem;
  margin-left: 105px;
}

.field .label {
  float: left;
  margin: 0.5rem 0 0 -105px;
  text-align: right;
  white-space: nowrap;
  width: 95px;
}

.field input:not([type="checkbox"]),
.field select,
.field textarea {
  background-color: white;
  border: 1px solid #6c9380;
  border-radius: 3px;
  box-sizing: border-box;
  color: #181b1a;
  display: block;
  font-family: var(--font-family);
  font-size: inherit;
  margin: 0;
  padding: 0.5rem;
  width: 100%;
}

.field input[disabled]:not([type="checkbox"]),
.field select[disabled],
.field textarea[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.field input[type="checkbox"] {
  accent-color: var(--color-txt-half);
  display: inline-block;
  margin: -2px -2px 0 0;
  vertical-align: middle;
}

.field .button {
  cursor: pointer;
  margin-top: 0.5rem;
}

.field small,
.field .error-msg {
  display: block;
  font-size: 0.8rem;
  margin-block: 0.2rem 0.5rem;
}

.field .error-msg {
  color: red;
}

#infinite-scroll {
  order: 1;
}

#infinite-scroll div {
  font-size: 0.9rem;
}

#infinite-scroll i {
  animation: spin 0.5s infinite;
  color: inherit;
}

@media (prefers-reduced-motion) {
  #infinite-scroll i {
    animation: none;
  }
}

.pagination {
  margin: var(--margin2x) auto;
  text-align: center;
}

.pagination .pagy {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
}

.pagination .pagy a {
  text-decoration: none;
  color: inherit;
}

.pagination .pagy a[href]:hover {
  text-decoration: underline;
}

.pagination .pagy a:not([href]) {
  cursor: default;
}

.pagination .pagy a[role="link"][aria-disabled="true"] {
  opacity: 0.3;
}

.pagination .pagy a[aria-current="page"] {
  font-weight: bold;
}

.margin-left {
  margin-left: 0.5rem !important;
}

.margin-right {
  margin-right: 0.5rem !important;
}

.hidden,
[hidden] {
  display: none !important;
}

@media (max-width: 60rem) {
  .hidden-on-mobile {
    display: none !important;
  }
}

.list {
  align-items: flex-start;
  display: grid;
  gap: 2rem;
  grid-auto-flow: dense;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  justify-content: center;
  list-style: none;
  margin: var(--margin2x) auto auto;
  padding: 0;
  position: relative;
}

.list-item {
  font-size: 0.9rem;
  line-height: 1.5;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.list-item .preview {
  background-color: var(--color-txt-half);
  border-radius: 0.8rem;
  overflow: hidden;
  position: relative;
  transition: 250ms;
}

.list-item .preview:hover {
  border-radius: 0;
}

.list-item .preview a {
  display: block;
}

.list-item .preview img {
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.list-item .preview .duration {
  background-color: rgba(24, 27, 26, 0.9);
  border-radius: 3px;
  bottom: 0.4rem;
  color: #c7d1cc;
  font-size: 0.8rem;
  line-height: 1.1;
  padding: 0.3rem 0.4rem;
  position: absolute;
  right: 0.4rem;
  white-space: nowrap;
  z-index: 1;
}

.list-item .information {
  margin: 1rem 0.5rem;
}

.list-item .information h3 {
  font-size: 1rem;
  margin: 0 0 0.2rem 0;
}

.list-item .information p {
  margin: 0 0 1rem 0;
}

.list-item .information .meta {
  color: var(--color-txt-half);
}

.list-item .draft-message,
.list-item .hidden-message {
  background-color: yellow;
  color: black;
  left: -60px;
  opacity: 0.7;
  padding: 50px 50px 10px 50px;
  pointer-events: none;
  position: absolute;
  top: 40px;
  transform: rotate(-45deg);
  transform-origin: top left;
  z-index: 100;
}

.list-item .hidden-message {
  background-color: brown;
  color: white;
}

.list-tv .preview img {
  aspect-ratio: 16 / 9;
}

.list-guestbook .preview img {
  aspect-ratio: 384 / 463;
}

.list-guestbook .information h3 {
  margin: 0;
}

.paper {
  margin: auto auto var(--margin2x);
}

@media (max-width: 440px) {
  .paper {
    background-color: transparent;
  }
}

.paper .content {
  margin: auto;
  max-width: 384px;
}

.paper .content #controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: var(--margin1x);
  padding: 0.25em 0;
  touch-action: manipulation;
}

.paper .content #controls > div {
  display: flex;
  gap: 0.25em;
}

.paper .content #controls button {
  align-items: center;
  appearance: none;
  background-color: transparent;
  border: 1px solid var(--color-txt-half);
  border-radius: 0.25em;
  color: inherit;
  cursor: pointer;
  display: flex;
  font: inherit;
  height: 28px;
  justify-content: center;
  touch-action: manipulation;
  width: 28px;
}

@media (pointer: fine) {
  .paper .content #controls button:hover {
    border-color: var(--color-txt);
  }
  .paper .content #controls button:active {
    transform: translateY(1px);
  }
}

.paper .content #controls button.selected {
  background-color: var(--color-txt);
  border-color: var(--color-txt);
  color: var(--color-bg);
}

.paper .content #controls i {
  display: block;
  font-size: inherit;
  margin: 0;
  touch-action: manipulation;
}

.paper .content .artboard {
  position: relative;
}

.paper .content canvas {
  aspect-ratio: 1 / 1;
  background-color: white;
  border: 1px solid var(--color-txt-half);
  border-radius: 0.25em;
  box-sizing: border-box;
  cursor: none;
  display: block;
  max-height: 384px;
  max-width: 384px;
  touch-action: none;
  width: 100%;
}

@media (prefers-color-scheme: dark) {
  .paper .content canvas {
    border-color: white;
  }
}

.paper .content .from,
.paper .content .link {
  margin-block: 0.75em 0.5em;
}

.paper .content .from input[type="text"],
.paper .content .link input[type="text"] {
  border: 1px solid var(--color-txt-half);
  border-radius: 0.25em;
  box-sizing: border-box;
  font: inherit;
  line-height: 1;
  padding: 0.5em;
  width: 100%;
}

@media (prefers-color-scheme: dark) {
  .paper .content .from input[type="text"],
.paper .content .link input[type="text"] {
    border-color: white;
  }
}

.paper .content .button {
  margin-top: 0.5rem;
  width: 100%;
}

#mouseCircle {
  background-color: #eee;
  border: 1px solid #999;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0);
  display: none;
  height: 2px;
  margin: -1px 0 0 -1px;
  opacity: 50%;
  pointer-events: none !important;
  position: absolute;
  width: 2;
  z-index: 100;
}

.artboard:hover + #mouseCircle {
  display: block;
}

#picture {
  display: none;
}

figure {
  margin: 0;
  padding: 0;
  text-align: center;
}

figure img {
  display: inline;
}

figure a {
  display: block;
}

figcaption {
  font-size: 0.85rem;
  margin: 0.2rem 0;
  opacity: 0.7;
}

.guestbook-thank-you {
  margin: auto auto var(--margin2x);
  max-width: 384px;
}

.guestbook-thank-you h1 {
  font-size: 1.25rem;
  line-height: 1.4;
  margin: 0;
}

.guestbook-thank-you iframe {
  margin-block: var(--margin1x);
}

.guestbook-show {
  margin-bottom: var(--margin2x);
  text-align: center;
}

.guestbook-show h2 {
  margin-top: 0;
}

.guestbook-show img {
  display: inline-block;
  max-height: 600px;
}
