* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/inter-latin-600-normal.woff2") format("woff2");
}

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

@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/noto-sans-sc-chinese-simplified-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Sans JP";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("./fonts/noto-sans-jp-japanese-800-normal.woff2") format("woff2");
}

html,
body {
  height: 100%;
}

[hidden] {
  display: none !important;
}

body {
  background: #FFFFFF;
  color: #000000;
  font-family: "Inter", "Noto Sans SC", "Noto Sans JP", "Helvetica Neue", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#top-left {
  position: fixed;
  top: 24px;
  left: 24px;
  font-family: "Noto Sans JP", "Noto Sans SC", "Inter", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

#top-right {
  position: fixed;
  top: 24px;
  right: 24px;
  font-size: 15px;
  font-weight: 600;
}

#stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

#game {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#word {
  font-family: "Noto Sans JP", "Noto Sans SC", "Inter", "Yu Gothic", "Meiryo", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-weight: 800;
  font-size: 76px;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-align: center;
  word-break: break-all;
  overflow-wrap: anywhere;
  margin-bottom: 16px;
  max-width: 95vw;
}

#answer-form {
  display: flex;
  justify-content: center;
  width: 100%;
}

#input {
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  width: min(420px, 72vw);
  background: transparent;
  border: none;
  border-bottom: 2px solid #000000;
  outline: none;
  color: #000000;
  padding: 6px 0;
}

#input::placeholder {
  color: #000000;
  font-weight: 700;
  font-family: inherit;
  opacity: 1;
}

#input:focus {
  border-bottom-width: 3px;
}

#input:disabled {
  border-bottom-style: dashed;
}

#prev {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Inter", "Noto Sans SC", "Noto Sans JP", "Helvetica Neue", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 6px 16px;
  background: #FFFFFF;
  color: #000000;
  border: 1px solid #000000;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

#prev:hover {
  background: #000000;
  color: #FFFFFF;
}

#prev:disabled {
  border-style: dashed;
  cursor: default;
}

#prev:disabled:hover {
  background: #FFFFFF;
  color: #000000;
}

#skip {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Inter", "Noto Sans SC", "Noto Sans JP", "Helvetica Neue", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 6px 16px;
  background: #FFFFFF;
  color: #000000;
  border: 1px solid #000000;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

#skip:hover {
  background: #000000;
  color: #FFFFFF;
}

#skip:disabled {
  border-style: dashed;
  cursor: default;
}

#skip:disabled:hover {
  background: #FFFFFF;
  color: #000000;
}

#hint {
  position: fixed;
  right: 24px;
  bottom: 24px;
  font-family: "Inter", "Noto Sans SC", "Noto Sans JP", "Helvetica Neue", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 6px 16px;
  background: #FFFFFF;
  color: #000000;
  border: 1px solid #000000;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

#hint:hover {
  background: #000000;
  color: #FFFFFF;
}

#hint:disabled {
  border-style: dashed;
  cursor: default;
}

#hint:disabled:hover {
  background: #FFFFFF;
  color: #000000;
}

#feedback {
  font-family: "Inter", "Noto Sans SC", "Noto Sans JP", "Helvetica Neue", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 700;
  min-height: 24px;
  margin-top: 18px;
  text-align: center;
  line-height: 1.5;
  max-width: 90vw;
  word-break: break-all;
}

#level {
  font-size: 15px;
  font-weight: 700;
  margin-top: 14px;
}

#done {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#score {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 28px;
  text-align: center;
  white-space: pre-line;
  line-height: 1.5;
}

#again {
  font-family: "Inter", "Noto Sans SC", "Noto Sans JP", "Helvetica Neue", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 6px 16px;
  background: #FFFFFF;
  color: #000000;
  border: 1px solid #000000;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

#again:hover {
  background: #000000;
  color: #FFFFFF;
}

#error {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

#retry {
  font-family: "Inter", "Noto Sans SC", "Noto Sans JP", "Helvetica Neue", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 6px 16px;
  background: #FFFFFF;
  color: #000000;
  border: 1px solid #000000;
  cursor: pointer;
  margin-top: 18px;
  transition: background 150ms ease, color 150ms ease;
}

#retry:hover {
  background: #000000;
  color: #FFFFFF;
}
