@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('/fonts/atkinson/AtkinsonHyperlegible-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('/fonts/atkinson/AtkinsonHyperlegible-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('/fonts/atkinson/AtkinsonHyperlegible-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('/fonts/atkinson/AtkinsonHyperlegible-BoldItalic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Serif JP';
  src: url('/fonts/noto-serif-jp/NotoSerifJP-VariableFont_wght.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --external-space: 128px;
  --internal-space: 16px;
  --line-space: 8px;

  --iylc-black: #433e5c;
  --iylc-grey: #676767;
  --iylc-white: #fcfcfa;
}

body {
  background-color: var(--iylc-white);
  font-family: 'Noto Serif JP';
  font-weight: 400;
  color: var(--iylc-black);
  display: flex;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: auto;
}

#page-frame {
  margin: auto;
  --ref-width: calc(100vw - var(--external-space) * 2);
  --ref-height: calc(100vh - var(--external-space) * 2);
  --frame-width: min(var(--ref-width), var(--ref-height) * 4 / 3);
  --frame-height: calc(var(--frame-width) * 0.75);
  width: var(--frame-width);
  min-width: 640px;
  height: var(--frame-height);
  min-height: 480px;
  display: flex;
  gap: var(--internal-space);
}

.box {
  position: relative;
}

.box::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  --corner-len: 5px;
  --corner-thick: 1px;

  background:
    /* top-left */
    linear-gradient(var(--iylc-grey) 0 0) 0 0,
    linear-gradient(var(--iylc-grey) 0 0) 0 0,
    /* top-right */
    linear-gradient(var(--iylc-grey) 0 0) 100% 0,
    linear-gradient(var(--iylc-grey) 0 0) 100% 0,
    /* bottom-left */
    linear-gradient(var(--iylc-grey) 0 0) 0 100%,
    linear-gradient(var(--iylc-grey) 0 0) 0 100%,
    /* bottom-right */
    linear-gradient(var(--iylc-grey) 0 0) 100% 100%,
    linear-gradient(var(--iylc-grey) 0 0) 100% 100%;
  background-repeat: no-repeat;
  background-size: var(--corner-len) var(--corner-thick), var(--corner-thick) var(--corner-len);
}

p {
  margin: 0;
  margin-top: var(--line-space);
}

#content {
  padding: var(--internal-space);
  padding-right: 0;
  flex: 1;
}

#content-inner {
  padding-right: calc(var(--internal-space) * 3 / 4);
  margin-right: calc(var(--internal-space) / 4);
  width: calc(100% - var(--internal-space));
  height: 100%;
  overflow: auto;
}

.post-header {
  display: flex;
  align-items: flex-end;
}

.post-title {
  margin: 0;
  font-size: 1.5em;
  font-family: "Atkinson Hyperlegible", sans-serif;
  font-weight: 400;
}

.post-tstamp {
  font-size: 0.8em;
  margin-left: var(--internal-space);
  margin-bottom: 3px;
  color: var(--iylc-grey);
}

.post-divider {
  width: 24px;
  margin: var(--internal-space) 0;
  border: none;
  border-top: 1px solid var(--iylc-grey);
}

.post > p {
  text-align: justify;
}

#banner {
  writing-mode: vertical-rl;
  text-orientation: sideways;
  padding: var(--internal-space);
  gap: var(--internal-space);

  display: flex;
  align-items: flex-end;
}

#banner > * {
  user-select: none;
  cursor: pointer;
  text-decoration: none;
  color: var(--iylc-black);
}

#banner > .title {
  height: fit-content;
  font-style: italic;
  /* margin-bottom: var(--internal-space); */
  font-size: 1.0em;
}

#banner > .link {
  font-style: normal;
  font-size: 0.8em;
  visibility: hidden;
  transition: all 0.05s linear;
}

#banner > .link:hover {
  text-decoration: underline;
}

.dead-link {
  cursor: no-drop !important;
}
