:root {
  color-scheme: light;
  --ink: #1f2c24;
  --muted: #68726a;
  --paper: #fffdf7;
  --cream: #f7f0dd;
  --green: #245a43;
  --green-dark: #174331;
  --lime: #cbe874;
  --orange: #ff8d5b;
  --line: rgba(31, 44, 36, 0.14);
  --shadow: 0 24px 60px rgba(50, 56, 40, 0.12);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--cream); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 5%, rgba(203, 232, 116, 0.28), transparent 26rem),
    linear-gradient(150deg, #fbf7ea 0%, #f2ead5 100%);
  font-family: ui-rounded, "SF Pro Rounded", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  overflow-x: hidden;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.sky-blob {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(1px);
  pointer-events: none;
}

.sky-blob-one {
  width: 230px;
  height: 230px;
  top: 18%;
  right: -130px;
  background: rgba(255, 141, 91, 0.15);
}

.sky-blob-two {
  width: 180px;
  height: 180px;
  bottom: 8%;
  left: -100px;
  background: rgba(36, 90, 67, 0.1);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 560px);
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 0 max(28px, env(safe-area-inset-bottom));
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 54px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 50% 50% 50% 15%;
  color: white;
  background: var(--green);
  transform: rotate(-8deg);
}

.brand-mark::first-letter { transform: rotate(8deg); }

.brand-tag {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.view[hidden], [hidden] { display: none !important; }

.hero { margin-bottom: 28px; }

.back-link {
  display: inline-block;
  margin: -22px 0 24px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 750;
}

.home-hero { margin-bottom: 32px; }

.home-actions {
  display: grid;
  gap: 14px;
}

.choice-card {
  display: grid;
  width: 100%;
  min-height: 108px;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 19px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  color: var(--ink);
  background: rgba(255, 253, 247, 0.92);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  transition: transform 130ms, box-shadow 130ms;
}

.choice-card:hover { transform: translateY(-2px); box-shadow: 0 28px 64px rgba(50, 56, 40, 0.16); }
.choice-card:active { transform: translateY(1px); }

.choice-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 18px;
  color: var(--green-dark);
  background: var(--lime);
  font-size: 28px;
  font-weight: 900;
}

.choice-find .choice-icon { color: white; background: var(--orange); }
.choice-card b, .choice-card small { display: block; }
.choice-card b { margin-bottom: 5px; font-size: 17px; }
.choice-card small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.choice-arrow { color: var(--green); font-size: 21px; font-weight: 900; }

.pool-note {
  margin: 18px 0 0;
  color: #899188;
  text-align: center;
  font-size: 10px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

h1, h2, p { margin-top: 0; }

.hero h1, .treasure-card h1, .reveal-card h1, .state-card h1 {
  margin-bottom: 16px;
  font-size: clamp(42px, 12vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.075em;
}

.hero h1 span { color: var(--orange); }

.lead {
  max-width: 440px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.create-card { padding: 22px; }

.field {
  display: flex;
  position: relative;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 17px;
}

.field > span {
  font-size: 13px;
  font-weight: 800;
}

.field em {
  margin-left: 3px;
  color: #899188;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.field textarea, .field input, .share-link input {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  color: var(--ink);
  background: #fffefb;
  transition: border-color 150ms, box-shadow 150ms;
}

.field textarea {
  min-height: 132px;
  padding: 15px;
  resize: vertical;
  border-radius: 17px;
  line-height: 1.65;
}

.field input { height: 52px; padding: 0 15px; border-radius: 15px; }

.field textarea:focus, .field input:focus, .share-link input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(36, 90, 67, 0.09);
}

.field > small {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: #92988f;
  font-size: 10px;
}

.field.compact { margin-bottom: 18px; }

.photo-picker {
  display: flex;
  position: relative;
  min-height: 76px;
  align-items: center;
  gap: 13px;
  margin-bottom: 17px;
  padding: 12px;
  overflow: hidden;
  border: 1px dashed rgba(36, 90, 67, 0.32);
  border-radius: 17px;
  background: rgba(203, 232, 116, 0.1);
  cursor: pointer;
}

.photo-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.photo-icon {
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: var(--green);
  background: rgba(203, 232, 116, 0.45);
  font-size: 25px;
}

.photo-picker b, .photo-picker small { display: block; }
.photo-picker b { margin-bottom: 4px; font-size: 13px; }
.photo-picker small { color: var(--muted); font-size: 11px; }

.photo-picker img {
  width: 54px;
  height: 54px;
  margin-left: auto;
  border-radius: 13px;
  object-fit: cover;
}

.location-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 16px;
  background: #f0f4e6;
}

.location-dot {
  width: 13px;
  height: 13px;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 2px var(--orange);
}

.location-box b, .location-box small { display: block; }
.location-box b { margin-bottom: 3px; font-size: 12px; }
.location-box small { color: var(--muted); font-size: 10px; }

.primary-button, .secondary-button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 17px;
  text-decoration: none;
  font-weight: 850;
  cursor: pointer;
  transition: transform 130ms, background 130ms, opacity 130ms;
}

.primary-button {
  width: 100%;
  padding: 0 20px;
  color: white;
  background: var(--green);
}

.primary-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.primary-button:active, .secondary-button:active { transform: translateY(1px); }
.primary-button:disabled { opacity: 0.58; cursor: wait; transform: none; }

.secondary-button {
  padding: 0 18px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fffefb;
}

.fine-print {
  margin: 12px 0 0;
  color: #92988f;
  text-align: center;
  font-size: 10px;
}

.form-error {
  margin: 12px 0 0;
  padding: 11px 13px;
  border-radius: 12px;
  color: #9a3b2c;
  background: #fff0e9;
  font-size: 12px;
  line-height: 1.5;
}

.success-card, .reveal-card, .state-card, .treasure-card { padding: 30px 24px; text-align: center; }
.success-card h2 { margin-bottom: 8px; font-size: 26px; letter-spacing: -0.04em; }
.success-card > p:not(.eyebrow, .share-feedback) { color: var(--muted); font-size: 13px; line-height: 1.65; }

.success-badge {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  margin: 0 auto 22px;
  border-radius: 50%;
  color: var(--green-dark);
  background: var(--lime);
  font-size: 30px;
  font-weight: 900;
}

.share-link { display: block; margin: 24px 0 14px; text-align: left; }
.share-link span { display: block; margin: 0 0 8px 3px; font-size: 11px; font-weight: 800; }
.share-link input { height: 49px; padding: 0 12px; border-radius: 14px; color: var(--muted); font-size: 12px; }
.button-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; }
.button-row .primary-button { min-height: 54px; }
.share-feedback { min-height: 18px; margin: 10px 0 0; color: var(--green); font-size: 11px; }
.text-link { color: var(--green); font-size: 12px; font-weight: 800; }
.success-links { display: flex; justify-content: center; gap: 22px; }

.find-view { padding-top: 20px; }
.find-view .brand + & { margin-top: 0; }

.spinner {
  display: block;
  width: 34px;
  height: 34px;
  margin: 4px auto 16px;
  border: 3px solid rgba(36, 90, 67, 0.15);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

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

.state-card p { color: var(--muted); font-size: 13px; line-height: 1.6; }

.pin-illustration {
  display: grid;
  position: relative;
  width: 118px;
  height: 118px;
  place-items: center;
  margin: -4px auto 24px;
}

.pin-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(36, 90, 67, 0.16);
  border-radius: 50%;
  box-shadow: inset 0 0 0 20px rgba(203, 232, 116, 0.14);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse { 50% { transform: scale(1.08); opacity: 0.62; } }

.pin-core {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50% 50% 50% 12%;
  color: white;
  background: var(--orange);
  box-shadow: 0 12px 24px rgba(255, 141, 91, 0.24);
  font-size: 22px;
  transform: rotate(-45deg);
}

.pin-core::first-letter { transform: rotate(45deg); }
.treasure-card h1 { font-size: clamp(38px, 10vw, 54px); }
.treasure-card .lead { margin: 0 auto 22px; }

.distance-panel {
  margin: 22px 0 14px;
  padding: 17px;
  border-radius: 18px;
  background: #f0f4e6;
}

.distance-panel span, .distance-panel small { display: block; color: var(--muted); font-size: 10px; }
.distance-panel strong { display: block; margin: 5px 0; font-size: 24px; letter-spacing: -0.04em; }
.distance-panel .coordinates { margin-top: 9px; color: #899188; font-variant-numeric: tabular-nums; }
.navigation-button { width: 100%; margin-bottom: 10px; }

.reveal-card { overflow: hidden; }
.confetti { margin-bottom: 8px; color: var(--orange); font-size: 44px; }
.reveal-card h1 { font-size: 48px; }
.reveal-card img { width: 100%; max-height: 380px; margin: 8px 0 22px; border-radius: 20px; object-fit: cover; }
.reveal-card blockquote { margin: 12px 0 14px; white-space: pre-wrap; font-size: 20px; font-weight: 750; line-height: 1.65; }
.reveal-sender { color: var(--muted); font-size: 12px; }

.burn-note {
  margin: 25px 0 14px;
  padding: 12px;
  border: 1px dashed rgba(154, 59, 44, 0.24);
  border-radius: 13px;
  color: #8a5d50;
  background: #fff7f1;
  font-size: 10px;
  line-height: 1.55;
}

.make-own { margin-top: 10px; }
.gone-icon { margin-bottom: 10px; color: #aab0a8; font-size: 70px; font-weight: 200; }
.state-card h1 { font-size: 34px; }

footer {
  margin-top: 28px;
  color: rgba(31, 44, 36, 0.46);
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.04em;
}

@media (max-width: 430px) {
  .shell { width: min(100% - 22px, 560px); }
  .brand { margin-bottom: 40px; }
  .brand-tag { display: none; }
  .create-card, .success-card, .reveal-card, .state-card, .treasure-card { padding: 21px 17px; }
  .hero h1 { font-size: 46px; }
  .choice-card { min-height: 100px; padding: 16px; }
}

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