:root {
  color: #ffffff;
  background: #20211d;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #20211d;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.wallpaper-page {
  min-height: 100vh;
  min-height: 100dvh;
}

.wallpaper-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  padding:
    calc(24px + env(safe-area-inset-top))
    calc(22px + env(safe-area-inset-right))
    calc(18px + env(safe-area-inset-bottom))
    calc(22px + env(safe-area-inset-left));
}

.wallpaper-image,
.wallpaper-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.wallpaper-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wallpaper-shade {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 14, 12, 0.16), rgba(8, 14, 12, 0.1) 34%),
    linear-gradient(0deg, rgba(8, 14, 12, 0.62), rgba(8, 14, 12, 0.08) 58%);
}

.brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.brand-name,
.date-label,
.scenario,
.tap-hint,
.install-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.brand-name {
  font-size: 1rem;
}

.date-label {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
}

.icon-button {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
  backdrop-filter: blur(16px);
}

.phrase-button {
  align-self: end;
  width: 100%;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.phrase-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.38);
  outline-offset: 10px;
}

.scenario,
.tap-hint {
  display: block;
  color: rgba(255, 255, 255, 0.76);
}

.phrase {
  display: block;
  max-width: 880px;
  margin-top: 14px;
  font-size: clamp(3.2rem, 15vw, 7.2rem);
  font-weight: 900;
  line-height: 0.94;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.36);
}

.translation {
  display: block;
  max-width: 720px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.83);
  font-size: 1.05rem;
  font-weight: 650;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.34);
}

.tap-hint {
  margin-top: 30px;
}

.phrase-button:active .phrase,
.phrase-button.speaking .phrase {
  color: #d9ece5;
}

.bottom-action {
  display: flex;
  justify-content: center;
}

.download-button {
  width: min(100%, 420px);
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #20211d;
  cursor: pointer;
  font-weight: 850;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.download-button:active {
  transform: translateY(1px);
}

.ios-install {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right));
  bottom: calc(84px + env(safe-area-inset-bottom));
  left: calc(16px + env(safe-area-inset-left));
  z-index: 10;
  max-width: 430px;
  padding: 16px 46px 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(32, 33, 29, 0.78);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.ios-install-title,
.ios-install-text {
  margin: 0;
}

.ios-install-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 850;
}

.ios-install-text {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  line-height: 1.5;
}

.ios-install-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 1.25rem;
}

@media (min-width: 720px) {
  .wallpaper-stage {
    width: min(100%, 520px);
    margin: 0 auto;
  }
}

@media (max-width: 420px) {
  .phrase {
    font-size: clamp(2.85rem, 14vw, 4.4rem);
  }

  .translation {
    font-size: 0.98rem;
  }
}
