
@font-face {
  font-family: "MRT-Sukuteramu";
  src: url("/assets/fonts/MRT-すくてらむ/MRT-すくてらむ.otf") format("opentype");
  font-display: swap;

  unicode-range: U+0000-002E, U+0030-10FFFF;
}

@font-face {
  font-family: "GLT-GonunneObsolete";
  src: url("/assets/fonts/GLT-Gonunne/GLT-GonunneObsolete-heading.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "UDEV Gothic 35NF";
  src: url("/assets/fonts/UDEVGothic_NF_v2.2.0/UDEVGothic35NF-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "x12y12pxMaruMinya";
  src: url("/assets/fonts/x12y12pxMaruMinya_2023-07-14/x12y12pxMaruMinya.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "x12y12pxMaruMinya Bubble";
  src: url("/assets/fonts/x12y12pxMaruMinya_2023-07-14/x12y12pxMaruMinya-bubble.woff2") format("woff2");
  font-display: swap;
}

@property --offset {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

@property --side {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

@property --depth {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

@property --near {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

:root {
  --bg: #3b4062;
  --text: #f1f0fa;
  --text-sub: #d3d5ea;
  --text-quiet: #b9bcda;
  --chip-bg: #2e3352;
  --chip-border: #5a6190;
  --accent: #f5d58e;
  --neon: #aab4ff;
  --card-shadow: rgba(20, 22, 40, 0.22);
  --grid: #4b5179;
  --overlay-bg: rgba(46, 51, 82, 0.8);
  color-scheme: dark;
}

:root {
  --font-sans: "M PLUS Rounded 1c", system-ui, sans-serif;
  --font-mono: "M PLUS Rounded 1c", ui-monospace, monospace;
  --font-pixel: "x12y12pxMaruMinya", var(--font-sans);
  --font-bubble: "x12y12pxMaruMinya Bubble", var(--font-pixel);
  --font-code: "UDEV Gothic 35NF", ui-monospace, monospace;

  --font-link: "MRT-Sukuteramu", var(--font-sans);
  --font-home-heading: "GLT-GonunneObsolete", var(--font-sans);
  --gutter: 24px;
  --header-height: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

html {
  scrollbar-gutter: stable;

  font-size: 106.25%;
}

html:has(dialog[open]) {
  overflow: hidden;

  scrollbar-gutter: auto;
}

@media (min-width: 721px) {
  html:has([data-home-intro]) {
    overflow: hidden;
    scrollbar-gutter: auto;
  }
}

html {
  -webkit-tap-highlight-color: transparent;
}

@media (hover: none) {
  a:active,
  button:active {
    opacity: 0.6;
  }
}

body {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  word-break: auto-phrase;
  transition:
    background-color 0.6s ease,
    color 0.6s ease;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

a[target="_blank"]:not(:has(img, svg))::after {
  content: "";
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  margin-left: 0.2em;
  vertical-align: -0.05em;
  background-color: var(--text-sub);
  -webkit-mask: url("/assets/icons/ui/open-in-new.svg") center / contain no-repeat;
  mask: url("/assets/icons/ui/open-in-new.svg") center / contain no-repeat;
}

.fade-in-image {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.fade-in-image[data-loaded] {
  opacity: 1;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.4;
}

h2 {
  margin: 32px 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
}

pre,
code,
kbd {
  font-family: var(--font-code);
}

h1[tabindex="-1"]:focus {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  body,
  .fade-in-image {
    transition: none;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 16px;
  }
}

html[data-dive="in"] {
  background: var(--dive-bg, var(--bg));
}

html[data-dive="in"] body {
  animation: dive-reveal 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes dive-reveal {
  from {
    clip-path: circle(0% at var(--dive-x, 50%) var(--dive-y, 50%));
  }

  to {
    clip-path: circle(150% at var(--dive-x, 50%) var(--dive-y, 50%));
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-dive="in"] body {
    animation: none;
  }
}

html[data-deal="gathering"]::view-transition-group(*) {
  animation-duration: 0.8s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-deal="dealing"]::view-transition-group(*) {
  animation-duration: 0.65s;
  animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html[data-deal]::view-transition-old(*),
html[data-deal]::view-transition-new(*) {
  animation-duration: 0.3s;
}

html[data-deal="gathering"]::view-transition-old(*),
html[data-deal="gathering"]::view-transition-new(*) {
  animation-duration: 0.7s;
}

html.router-outlet-0::view-transition-group(page) {
  animation-duration: 0.2s;
}

html.router-outlet-0::view-transition-old(page),
html.router-outlet-0::view-transition-old(root) {
  animation: none;
  opacity: 0;
}

html.router-outlet-0::view-transition-new(root) {
  animation: none;
}

html.router-outlet-0::view-transition-new(page) {
  animation: page-enter 0.2s ease-out both;
}

@keyframes page-enter {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

