@font-face {
  font-family: Inter;
  src: url('/assets/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sandoll MiSaeng';
  src: url('/assets/SDMiSaeng.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  font-family: 'Sandoll MiSaeng', sans-serif;
  font-synthesis: none;
  color: #454545;
  --surface: #fff;
  --button: #97ccd4;
  --button-secondary: #55a4b0;
  --running: #00d254;
  --panel-shadow: 0 2px 5px rgb(0 0 0 / 15%);
  --button-shadow: 0 1px 1px rgb(0 0 0 / 35%);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--surface); }
p { margin: 0; }

.background {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-height: 100svh;
  min-height: 100dvh;
  padding: 16px;
}

.panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: 30px 20px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}

.panel-login { width: 340px; gap: 10px; transform: translateY(.5px); }
.panel-code { width: 350px; gap: 27px; }
.login-fields, .code-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
  min-width: 0;
}

.junimo { display: block; width: 48px; height: 45px; object-fit: cover; flex: none; }
.hint, .server-state { text-align: center; }
.hint { font-size: 20px; line-height: 21px; font-weight: 400; }
.server-state { font-family: Inter, sans-serif; font-size: 16px; line-height: 19px; font-weight: 700; color: #737373; }
.server-state-label { color: #7b7b7b; }
.server-state[data-state='ready'] { color: var(--running); }
.server-state[data-state='starting'] { color: #986a13; }
.server-state[data-state='offline'], .server-state[data-state='unavailable'] { color: #b33b3b; }

#password {
  width: 100%;
  height: 50px;
  padding: 12px 19px;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  background: #fafafa;
  box-shadow: inset 2px 2px 2px rgb(0 0 0 / 15%);
  color: inherit;
  font: inherit;
  font-size: 24px;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  padding: 12px 19px;
  border: 0;
  border-radius: 6px;
  background: var(--button);
  box-shadow: var(--button-shadow);
  color: #fff;
  font: inherit;
  font-size: 40px;
  font-weight: 400;
  line-height: 26px;
  white-space: nowrap;
  cursor: pointer;
}

.button-enter { border-radius: 10px; background: var(--button-secondary); }
.button-refresh { background: var(--button-secondary); }
.button:hover:not(:disabled) { filter: brightness(.97); }
.button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled { opacity: .6; cursor: wait; }
:is(.button, #password):focus-visible { outline: 2px solid #454545; outline-offset: 3px; }

#code {
  display: block;
  max-width: 100%;
  color: inherit;
  font: inherit;
  font-family: Inter, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 29px;
  text-align: center;
  overflow-wrap: anywhere;
}

.code-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; }
#status, #login-error { font-size: 20px; line-height: 23px; text-align: center; overflow-wrap: anywhere; }
#login-error { color: #b33b3b; }

@media (max-width: 360px) {
  .code-actions .button { padding-inline: 8px; }
}
