:root {
  color-scheme: dark;
  --bg: #000000;
  --fg: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --dim: rgba(255, 255, 255, 0.28);
  --panel: rgba(255, 255, 255, 0.08);
  --line-width: 1;
  --font-ui: "ReliefSingleLine", "NanumSquareAc", "NanumSquare", "Noto Sans KR", sans-serif;
}

@font-face {
  font-family: "ReliefSingleLine";
  src: url("./assets/fonts/ReliefSingleLineOutline-Regular.woff2")
    format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NanumSquareAc";
  src: url("./assets/fonts/NanumSquareAcL.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NanumSquareAc";
  src: url("./assets/fonts/NanumSquareAcR.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NanumSquareAc";
  src: url("./assets/fonts/NanumSquareAcB.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NanumSquareAc";
  src: url("./assets/fonts/NanumSquareAcEB.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
}

body {
  font-family: var(--font-ui);
  font-size: 200%;
  letter-spacing: 0;
}

button,
select {
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--fg);
  border-radius: 999px;
  padding: 0.6rem 1rem;
}

button:hover,
select:hover,
button:focus-visible,
select:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}

.app {
  min-height: 100dvh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 1;
  transition: opacity 3000ms ease;
}

.app--hidden {
  opacity: 0;
  pointer-events: none;
}

.launch-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  opacity: 1;
  transition: opacity 240ms ease;
  z-index: 20;
}

.launch-screen--hidden {
  opacity: 0;
  pointer-events: none;
}

.start-button {
  min-width: min(72vw, 420px);
  min-height: min(18vw, 120px);
  padding: 0.9em 1.6em;
  border-radius: 0;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  font-size: clamp(24px, 4vw, 42px);
  letter-spacing: 0.12em;
}

.stage {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 24px;
  min-height: 0;
  width: 100%;
}

.panel {
  position: relative;
  min-height: 0;
  border: 1px solid var(--panel);
  background: var(--bg);
}

.process-svg,
.hexagram-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.process-panel {
  min-height: 720px;
}

.result-panel {
  min-height: 720px;
}

.svg-text {
  fill: var(--fg);
  font-family: var(--font-ui);
  font-weight: 400;
  dominant-baseline: hanging;
}

@media (max-width: 900px) and (orientation: portrait) {
  .app {
    padding: 12px;
  }

  .stage {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .process-panel {
    min-height: 0;
    height: 42dvh;
  }

  .result-panel {
    min-height: 0;
    height: 34dvh;
  }
}
