@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  /* Color Palette */
  --bg: #EDE9E3;
  --gold: #D6B174;
  --graphite: #4A4A43;
  --olive: #A0ABA9;
  --white: #FFFFFF;
  
  /* Functional Colors */
  --text: var(--graphite);
  --text-muted: rgba(74, 74, 67, 0.7);
  --card: var(--white);
  --card-translucent: rgba(255, 255, 255, 0.85);
  --accent: var(--gold);
  --accent-2: var(--olive);
  --error: #cc6666;
  --success: #88aa88;
  
  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* UI Properties */
  --shadow-sm: 0 2px 8px rgba(74, 74, 67, 0.07);
  --shadow-md: 0 8px 24px rgba(74, 74, 67, 0.1);
  --shadow-lg: 0 16px 32px rgba(74, 74, 67, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --blur: blur(12px);
}
html,body{height:100%}
@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap{min-height:100%; display:grid; grid-template-rows:auto 1fr auto}
header {
  padding: 1.25rem clamp(1.25rem, 5vw, 2.5rem);
  background: var(--card-translucent);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(214, 177, 116, 0.15);
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand .logo {
  height: 38px;
  width: auto;
  filter: brightness(0) saturate(100%) invert(76%) sepia(14%) saturate(662%) hue-rotate(355deg) brightness(89%) contrast(84%);
  transition: transform 0.3s ease;
}

.brand h1 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin: 0;
  font-weight: 600;
  color: var(--text);
}
.lang-toggle {
  display: flex;
  gap: 0.5rem;
}

.chip {
  border: 1px solid rgba(214, 177, 116, 0.3);
  background: var(--card-translucent);
  color: var(--text);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: var(--accent);
  background: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

main {
  padding: clamp(2rem, 5vw, 3rem);
  display: grid;
  place-items: start center;
}

.card {
  width: min(100%, 960px);
  background: var(--card-translucent);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(214, 177, 116, 0.15);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('pics/moon.jpeg') center/50% no-repeat;
  opacity: 0.2;
  z-index: -1;
  filter: grayscale(30%) contrast(110%);
}

/* Larger moon on mobile */
@media (max-width: 680px) {
  .card::before {
    background-size: 85%;
  }
}

.intro {
  text-align: center;
  margin-bottom: 2.5rem;
}

.intro h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  position: relative;
}

.intro p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 42ch;
  margin: 0 auto;
  position: relative;
}

.controls {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 680px) {
  .controls {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    align-items: end;
  }
}

label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

select,
input[type="number"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(214, 177, 116, 0.3);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--text);
  font-size: 1rem;
  transition: all 0.2s ease;
}

select:hover,
input[type="number"]:hover {
  border-color: var(--accent);
}

select:focus,
input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(214, 177, 116, 0.15);
}

button {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.status-bar {
  margin-top: 2rem;
  text-align: center;
}

.banner {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  background: var(--card-translucent);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--text-muted);
  font-size: 0.95rem;
  border: 1px solid rgba(214, 177, 116, 0.15);
}

.banner.ok {
  background: rgba(136, 170, 136, 0.1);
  color: var(--success);
  border-color: rgba(136, 170, 136, 0.2);
}

.banner.err {
  background: rgba(204, 102, 102, 0.1);
  color: var(--error);
  border-color: rgba(204, 102, 102, 0.2);
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.04;
  transition: opacity 0.3s ease;
}

footer {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--card-translucent);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-top: 1px solid rgba(214, 177, 116, 0.15);
}

