:root {
  --app-height: 100svh;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #3a1c15;
  background: #c44250;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: var(--app-height);
  min-height: var(--app-height);
  overflow: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: var(--app-height);
  display: grid;
  justify-items: center;
  align-items: end;
  overflow: hidden;
  background: #c44250;
}

button, input { font: inherit; }

.page {
  position: relative;
  width: min(100vw, calc(var(--app-height) * 9 / 16));
  height: min(var(--app-height), calc(100vw * 16 / 9));
  margin: 0 auto;
  background: url("/images/bg.jpg") center / 100% 100% no-repeat;
  overflow: hidden;
}

.wish-card {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 92.222222%;
  aspect-ratio: 996 / 1764;
}

.card-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.hand-overlay {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  width: 39.558233%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.card-content {
  position: absolute;
  z-index: 1;
  inset: 43.2% 13.4% 20.75% 11.5%;
}

.suggestion-list {
  position: absolute;
  inset: 0 10% 16% 1.5%;
  display: flex;
  flex-direction: column;
  gap: clamp(7px, 1.15vh, 12px);
  overflow-y: auto;
  scrollbar-width: none;
  mask-image: linear-gradient(to bottom, #000 0, #000 92%, transparent 100%);
}

.suggestion-list::-webkit-scrollbar { display: none; }

.suggestion {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: clamp(9px, 1.25vh, 14px) 18px;
  color: #381b14;
  background: linear-gradient(100deg, rgba(255, 209, 122, .72), rgba(255, 220, 156, .9));
  box-shadow: inset 0 1px rgba(255, 255, 255, .7);
  font-size: clamp(14px, 3.4vw, 20px);
  line-height: 1.45;
  text-align: center;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}

.suggestion.multiline {
  text-align: left;
}

.suggestion:active { transform: scale(.98); }
.suggestion:focus-visible, .send-button:focus-visible { outline: 3px solid rgba(213, 9, 22, .36); outline-offset: 2px; }

.message-field {
  position: absolute;
  left: 0;
  right: 21%;
  bottom: -3.5%;
  height: 12.6%;
  min-height: 42px;
  padding: 0 0 0 12%;
  display: flex;
  align-items: center;
  border: 0;
  background: transparent;
}

#message-input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  outline: none !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  color: #351810;
  background: transparent;
  font-size: clamp(16px, 3.2vw, 18px);
}

#message-input::placeholder { color: #b8b8b8; }

.input-meta {
  position: absolute;
  left: 18px;
  right: 45px;
  top: 102.5%;
  min-height: 18px;
  padding: 2px 4px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #af5a50;
  font-size: 12px;
}

#form-message { color: #c20c16; }

.send-button {
  position: absolute;
  z-index: 2;
  left: 23.333333%;
  bottom: -0.3%;
  width: 53.333333%;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 7px 10px rgba(117, 6, 15, .16));
  transition: transform .15s ease, opacity .15s ease;
}

.send-button img { display: block; width: 100%; height: auto; }
.send-button:active { transform: translateY(2px) scale(.98); }
.send-button:disabled { cursor: wait; opacity: .65; }

.toast {
  position: fixed;
  z-index: 10;
  left: 50%;
  top: max(22px, env(safe-area-inset-top));
  max-width: calc(100% - 40px);
  padding: 11px 20px;
  border-radius: 999px;
  color: #fff;
  background: rgba(78, 18, 18, .88);
  box-shadow: 0 7px 24px rgba(63, 0, 0, .2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -16px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
