:root {
  --ink: #1a2e1a;
  --ink-soft: #2f4a2f;
  --saffron: #c45c12;
  --saffron-deep: #9a3f08;
  --leaf: #1f5c3a;
  --paper: #f3ead8;
  --paper-deep: #e6d5b5;
  --cream: #faf6ee;
  --line: rgba(26, 46, 26, 0.14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Noto Serif Devanagari", "Source Serif 4", Georgia, serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 80% at 10% -10%, rgba(196, 92, 18, 0.18), transparent 55%),
    radial-gradient(ellipse 90% 70% at 100% 0%, rgba(31, 92, 58, 0.16), transparent 50%),
    linear-gradient(165deg, var(--cream) 0%, var(--paper) 45%, var(--paper-deep) 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeUp 0.7s ease-out both;
}

.photo-ring {
  width: 9rem;
  height: 9rem;
  border-radius: 999px;
  overflow: hidden;
  border: 4px solid rgba(196, 92, 18, 0.85);
  box-shadow: 0 12px 40px rgba(26, 46, 26, 0.18);
  animation: softPulse 3.2s ease-in-out infinite;
  margin-bottom: 1.25rem;
}

.photo-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.brand-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.04em;
}

.tagline {
  margin: 0.75rem 0 0;
  max-width: 28rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.5;
}

.panel {
  margin-top: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(250, 246, 238, 0.78);
  box-shadow: 0 18px 50px rgba(26, 46, 26, 0.08);
  padding: 1.25rem;
  animation: fadeUp 0.7s ease-out 0.12s both;
}

@media (min-width: 640px) {
  .page { padding: 3rem 1.5rem 4rem; }
  .photo-ring { width: 11rem; height: 11rem; }
  .panel { padding: 2rem; }
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tab {
  flex: 1 1 auto;
  min-width: 5.5rem;
  border: 0;
  border-radius: 0.75rem;
  padding: 0.65rem 0.6rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
}

.tab.active {
  background: var(--saffron);
  color: #fff;
}

.matches {
  margin-top: 1rem;
  display: grid;
  gap: 0.6rem;
}

.matches-title {
  margin: 0 0 0.25rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.match-item {
  display: grid;
  gap: 0.2rem;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.85rem 1rem;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
}

.match-item:hover {
  border-color: var(--saffron);
  box-shadow: 0 0 0 2px rgba(196, 92, 18, 0.2);
}

.match-item span {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

label {
  display: block;
  margin-bottom: 1rem;
}

label span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 1.1rem;
  outline: none;
}

input:focus {
  box-shadow: 0 0 0 2px var(--saffron);
}

.grid-2 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

.btn-leaf,
.btn-saffron {
  width: 100%;
  border: 0;
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

.btn-row {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .btn-row {
    grid-template-columns: 1fr 1fr;
  }
}

.btn-leaf { background: var(--leaf); }
.btn-leaf:hover { filter: brightness(1.1); }
.btn-saffron { background: var(--saffron); }
.btn-saffron:hover { background: var(--saffron-deep); }

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.msg {
  margin: 1rem 0 0;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

.msg.error {
  background: #fef2f2;
  color: var(--saffron-deep);
}

.msg.success {
  background: #ecfdf5;
  color: var(--leaf);
}

.result {
  animation: fadeUp 0.55s ease-out both;
}

.details {
  font-size: 1.15rem;
  line-height: 1.6;
}

.greet {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 700;
}

.muted { color: var(--ink-soft); }
.epic-line { font-size: 1rem; }
.thanks {
  margin-top: 0.75rem;
  font-weight: 600;
  color: var(--saffron-deep);
}

.update {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

footer {
  margin-top: 2.5rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.hidden { display: none !important; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes softPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 92, 18, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(196, 92, 18, 0); }
}
