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

html,
body,
#app {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050a17;
  user-select: none;
  touch-action: none;
  font-family: "Georgia", "Times New Roman", serif;
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

#scene.is-dragging {
  cursor: grabbing;
}

#scene.is-pointer {
  cursor: pointer;
}

#beam-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 32;
}

.corner-actions {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(215, 232, 255, 0.25);
  background: rgba(8, 16, 34, 0.48);
  backdrop-filter: blur(6px);
  color: rgba(240, 247, 255, 0.9);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover {
  background: rgba(20, 36, 70, 0.75);
  border-color: rgba(255, 224, 130, 0.5);
  transform: scale(1.05);
}

.btn-glyph {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
}

.btn-glyph-i {
  font-family: "Georgia", serif;
  font-style: italic;
  font-size: 1.05rem;
}

.fs-dialog,
.info-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(4, 9, 20, 0.68);
  backdrop-filter: blur(6px);
  padding: 16px;
  overflow-y: auto;
}

.fs-dialog.hidden,
.info-modal.hidden,
.hidden {
  display: none !important;
}

.fs-card,
.info-card {
  position: relative;
  width: 100%;
  max-width: 390px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 26px 24px 22px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(16, 30, 62, 0.96), rgba(7, 14, 30, 0.99));
  border: 1px solid rgba(245, 208, 128, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.78);
  text-align: center;
  color: #f4f7ff;
}

.fs-card-intro {
  max-width: 460px;
  padding: 26px 26px 22px;
}

.info-card-wide {
  max-width: 430px;
}

.gift-greeting-banner {
  margin-bottom: 16px;
  padding: 13px 16px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 224, 130, 0.13), rgba(255, 204, 102, 0.05));
  border: 1px solid rgba(255, 224, 130, 0.38);
  text-align: left;
}

.gift-to-line {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffd978;
  margin-bottom: 6px;
}

.gift-message-quote {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1rem;
  font-style: italic;
  line-height: 1.5;
  color: #fff9eb;
  margin: 0 0 8px;
  user-select: text;
}

.gift-from-line {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.84rem;
  color: #dce8ff;
  text-align: right;
  margin: 0;
}

.fs-story {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 0.95rem;
  line-height: 1.62;
  color: #eef4ff;
  text-align: left;
  margin-bottom: 11px;
}

.fs-story-highlight {
  color: #ffe8b0;
  font-style: italic;
  margin-bottom: 0;
}

.fs-divider {
  height: 1px;
  margin: 16px 0 14px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(245, 208, 128, 0.45),
    transparent
  );
}

.fs-card-intro .fs-title {
  margin-bottom: 14px;
  font-size: 1.3rem;
}

.fs-title,
.info-title {
  font-size: 1.38rem;
  font-weight: normal;
  margin-bottom: 12px;
  color: #fff4d6;
}

.info-lead {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.86rem;
  line-height: 1.48;
  color: #d6e4ff;
  margin-bottom: 14px;
}

.info-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #fff3d1;
  margin-bottom: 10px;
}

.info-subtext {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(214, 228, 255, 0.78);
}

.privacy-link {
  color: #ffd978;
  text-decoration: underline;
}

.info-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 230, 170, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff4d6;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.info-close:hover {
  background: rgba(255, 220, 140, 0.22);
}

.gift-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
  text-align: left;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 420px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  color: #dce8ff;
  text-align: left;
}

.field input,
.field textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid rgba(215, 232, 255, 0.26);
  background: rgba(5, 11, 24, 0.78);
  color: #fff8e6;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  outline: none;
  user-select: text;
}

.field textarea {
  resize: vertical;
  min-height: 62px;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(250, 214, 128, 0.75);
}

.sms-counter {
  font-size: 0.75rem;
  color: rgba(214, 228, 255, 0.75);
  text-align: right;
  margin-top: 2px;
}

.sms-counter.is-limit {
  color: #ffd978;
  font-weight: 600;
}

.gift-actions {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.gift-loading {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  color: #ffe8b0;
}

.gift-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 217, 120, 0.25);
  border-top-color: #ffd978;
  animation: giftSpin 0.8s linear infinite;
}

@keyframes giftSpin {
  to {
    transform: rotate(360deg);
  }
}

.gift-error {
  margin-top: 12px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  color: #ff9aa6;
}

.gift-result {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid rgba(215, 232, 255, 0.16);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.gift-sms-preview {
  font-size: 0.84rem !important;
  line-height: 1.45;
  color: #fff4d6 !important;
  background: rgba(8, 16, 36, 0.9) !important;
  border-color: rgba(250, 214, 128, 0.35) !important;
}

.gift-link-input {
  width: 100%;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(250, 214, 128, 0.35);
  background: rgba(5, 11, 24, 0.85);
  color: #ffe8b0;
  font-family: system-ui, monospace;
  font-size: 0.8rem;
  user-select: all;
}

.gift-share-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.fs-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.btn-yes,
.btn-no {
  min-width: 92px;
  padding: 9px 16px;
  border-radius: 999px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn-yes:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-yes {
  background: rgba(245, 204, 112, 0.26);
  border: 1px solid rgba(250, 214, 128, 0.75);
  color: #fff2cc;
}

.btn-yes:hover:not(:disabled) {
  background: rgba(245, 204, 112, 0.42);
  transform: translateY(-1px);
}

.btn-no {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(215, 232, 255, 0.28);
  color: #d6e4ff;
}

.btn-no:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.day-card {
  position: fixed;
  left: 50vw;
  top: 50vh;
  width: min(360px, 84vw);
  min-height: 210px;
  padding: 34px 26px 28px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 15%, rgba(255, 228, 130, 0.24), rgba(11, 23, 50, 0.97) 72%);
  border: 1px solid rgba(255, 224, 120, 0.75);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  color: #fff6df;
  text-align: center;
  z-index: 35;
  pointer-events: none;
  opacity: 0;
  transform-origin: center center;
  will-change: transform, opacity, box-shadow;
}

.day-card.is-closed {
  display: none;
}

.day-card.is-interactive {
  pointer-events: auto;
}

.day-card-num {
  font-size: 2.2rem;
  color: #ffd978;
  margin-bottom: 10px;
  text-shadow: 0 0 18px rgba(255, 206, 105, 0.55);
}

.day-card-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #eef4ff;
}

.day-card-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 230, 170, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff4d6;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.day-card-close:hover {
  background: rgba(255, 220, 140, 0.22);
}