@font-face { font-family: 'Roboto'; src: url('assets/fonts/Roboto-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; }
@font-face { font-family: 'Roboto'; src: url('assets/fonts/Roboto-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; }
@font-face { font-family: 'Roboto'; src: url('assets/fonts/Roboto-Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; }
@font-face { font-family: 'Roboto'; src: url('assets/fonts/Roboto-BoldItalic.ttf') format('truetype'); font-weight: 700; font-style: italic; }
@font-face { font-family: 'Jura'; src: url('assets/fonts/Jura.ttf') format('truetype'); }

:root {
  --bg: #F4F6FF;
  --accent: #F74806;
  --red: #F44336;
  --grey: #9E9E9E;
  --outline: #79747E;
  --primary: #6750A4;
  --on-surface: #1D1B20;
  --card: #F7F2FA;
}

html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--on-surface);
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  line-height: 1.428571;
  letter-spacing: 0.25px;
  overflow: hidden;
}
[hidden] { display: none !important; }

.screen { position: fixed; inset: 0; }

/* ---------- input screen ---------- */
.screen-input { display: flex; }
.col { flex: 1 1 0; min-width: 0; display: flex; }
.col-left {
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-left: 120px;
}
.col-right { align-items: center; padding: 0 20px 0 100px; }
.character { display: block; width: 100%; height: auto; }

.title {
  margin: 0;
  font-size: 64px;
  font-weight: 900;
  line-height: 1.428571;
  color: #000;
  -webkit-text-stroke: 0.6px #000;
}
.subtitle {
  margin: 8px 0 0;
  font-size: 40px;
  font-weight: 400;
  line-height: 1.428571;
  color: var(--grey);
}

.field {
  position: relative;
  width: 350px;
  height: 104px;
  margin-top: 50px;
}
.field input {
  position: absolute;
  left: 0; right: 0; bottom: 3px;
  width: 100%;
  height: 72px;
  margin: 0; padding: 0;
  border: 0; outline: 0;
  background: transparent;
  font-family: 'Jura', sans-serif;
  font-weight: bold;
  font-size: 48px;
  line-height: 72px;
  letter-spacing: 0.5px;
  color: #000;
  font-synthesis: none;
}
.field-label {
  position: absolute;
  left: 0;
  top: 36px;
  font-size: 24px;
  line-height: 1.5;
  letter-spacing: 0.5px;
  color: #000;
  pointer-events: none;
  transform-origin: left top;
  transition: transform 150ms ease-out, top 150ms ease-out;
}
.field input:focus ~ .field-label,
.field.has-value .field-label {
  top: 1px;
  transform: scale(0.75);
}
.field-underline {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--outline);
}
.field input:focus ~ .field-underline { height: 2px; background: var(--primary); }
.field.is-invalid input,
.field.is-invalid .field-label { color: var(--red); }

.button-wrap { margin-top: 100px; padding: 0 20px; }
.btn-primary {
  display: inline-block;
  margin: 0;
  padding: 22px 30px;
  border: 0;
  border-radius: 9999px;
  background: var(--accent);
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-size: 32px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.btn-primary:hover { background: #F75A1F; }
.btn-primary:active { box-shadow: none; }

.error {
  margin: 20px 0 0;
  font-size: 18px;
  line-height: 1.428571;
  color: var(--red);
  white-space: pre;
}

/* ---------- result screen ---------- */
.appbar { position: absolute; top: 0; left: 0; right: 0; height: 56px; }
.icon-button {
  position: absolute;
  left: 8px; top: 8px;
  width: 48px; height: 48px;
  margin: 0; padding: 0;
  border: 0;
  background: transparent;
  color: var(--on-surface);
  cursor: pointer;
}
.icon-button svg { display: block; fill: currentColor; }

.result-body {
  position: absolute;
  top: 56px; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-box {
  flex: none;
  width: 1250px;
  height: 870px;
  max-width: 100%;
  max-height: 100%;
  background: url('assets/background.png') center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.spacer-20 { flex: none; height: 20px; }
.card {
  flex: none;
  margin: 4px;
  padding: 16px;
  width: fit-content;
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  text-align: center;
}
.result-title { font-size: 64px; font-weight: 700; line-height: 1.428571; color: #000; }
.result-subtitle { margin-top: 8px; font-size: 40px; line-height: 1.428571; color: var(--grey); white-space: pre; }
.result-level { font-size: 50px; font-weight: 700; line-height: 1.428571; color: #000; }
.level-image { display: block; flex: none; }
