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

@font-face {
  font-family: "OpenTUI Mono";
  src: url("./fonts/OpenTUIMono-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "OpenTUI Mono", monospace;
  color: #002b8f;
  background: #fcfdfd;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

button, a { -webkit-tap-highlight-color: transparent; }
button, code { font: inherit; }
button { color: inherit; cursor: pointer; }

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 40px;
}

.portrait {
  position: relative;
  display: block;
  width: min(100%, 760px);
  padding: 0;
  border: 0;
  background: none;
  touch-action: manipulation;
}

.portrait img, .portrait svg { display: block; width: 100%; height: auto; }
.portrait svg { position: absolute; inset: 0; }
.portrait.ready img { visibility: hidden; }

h1 {
  margin: 42px 0 44px;
  font-size: clamp(18px, 3.4vw, 36px);
  line-height: 1.4;
  text-align: center;
}

.play {
  min-height: 44px;
  padding: 12px;
  background: #d0faff;
  color: inherit;
  text-decoration: none;
  font-size: clamp(14px, 2.7vw, 26px);
  font-weight: 700;
  line-height: 1.4;
}

.play:hover { background: #00e5ff; }

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px 20px;
  color: #627498;
}

#sound { display: grid; place-items: center; width: 44px; height: 44px; padding: 8px; border: 0; background: none; }
#sound:hover { color: #002b8f; }
#sound[aria-pressed="false"] .sound-waves,
#sound[aria-pressed="true"] .sound-cross { display: none; }
:focus-visible { outline: 2px solid #002b8f; outline-offset: 6px; }
::selection { color: #002b8f; background: #00e5ff; }

@media (max-height: 600px) and (min-width: 600px) {
  main { padding-top: 16px; padding-bottom: 16px; }
  .portrait { width: 420px; }
  h1 { margin: 8px 0 20px; font-size: 24px; }
}
