:root {
  --bg: #0f1b1d;
  --bg-2: #162a2d;
  --card: #1a2f32;
  --line: rgba(232, 224, 200, 0.12);
  --text: #ece6d6;
  --muted: #9bb2ab;
  --gold: #d9b46c;
  --gold-soft: rgba(217, 180, 108, 0.14);
  --sage: #86b8a8;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 50% -80px, rgba(217, 180, 108, 0.16), transparent 70%),
    radial-gradient(700px 500px at 100% 100%, rgba(134, 184, 168, 0.09), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
}

.top {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 20px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 16px;
}
.brandrow { display: flex; align-items: center; gap: 4px; }
.info {
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  font: italic 500 0.95rem var(--serif);
  position: relative;
}
.info::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(155, 178, 171, 0.5);
  border-radius: 50%;
}
.info:hover, .info[aria-expanded="true"] { color: var(--gold); }
.info:hover::before, .info[aria-expanded="true"]::before { border-color: var(--gold); }
.infocard {
  grid-column: 1 / -1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px 6px;
  margin-top: 10px;
  font-size: 0.92rem;
  animation: rise 0.4s ease both;
}
.infocard[hidden] { display: none; }
.infocard p { margin: 0 0 10px; }
.infocard .heb { font-family: var(--serif); font-size: 1.8rem; color: var(--gold); text-align: left; margin-bottom: 4px; }
.infocard em { color: var(--text); }
.brand {
  font-family: var(--serif);
  font-size: 1.7rem;
  letter-spacing: 0.4em;
  color: var(--gold);
  font-weight: 500;
}
.motto {
  grid-column: 1;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.sos {
  grid-row: 1 / span 2;
  grid-column: 2;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(217, 180, 108, 0.4);
  border-radius: 999px;
  padding: 10px 18px;
  font: 400 0.9rem var(--sans);
  cursor: pointer;
}
.sos:hover { background: rgba(217, 180, 108, 0.24); }

main { max-width: 760px; margin: 0 auto; padding: 0 20px 40px; }

.hero { text-align: center; padding: 56px 0 28px; }
.date { margin: 0 0 10px; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.08em; }
h1 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.2;
}
.lead { margin: 0; color: var(--muted); font-size: 1.02rem; }

.tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 16px 0 28px;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  background: none;
  border: none;
  color: var(--muted);
  font: 400 0.95rem var(--sans);
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--gold); border-bottom-color: var(--gold); }

.panel { animation: rise 0.6s ease both; }
.panel[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.quote {
  text-align: center;
  padding: 36px 8px 24px;
}
.quote blockquote {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  line-height: 1.4;
}
.quote cite { color: var(--gold); font-style: normal; font-size: 0.95rem; letter-spacing: 0.1em; }

.again {
  display: block;
  margin: 28px auto 0;
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 20px;
  font: 300 0.85rem var(--sans);
  cursor: pointer;
}
.again:hover { color: var(--text); border-color: var(--muted); }

.cardbox {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 26px;
}
.tag { margin: 0 0 6px; color: var(--sage); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.cardbox h2 { margin: 0 0 12px; font-family: var(--serif); font-weight: 500; font-size: 2rem; }
.cardbox .intro { margin: 0 0 18px; color: var(--muted); }
.steps { margin: 0 0 24px; padding-left: 1.3em; }
.steps li { margin-bottom: 8px; padding-left: 4px; }
.steps li::marker { color: var(--gold); font-family: var(--serif); }
.reflection {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.reflection span { display: block; color: var(--gold); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 4px; }
.reflection p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.3rem; line-height: 1.45; }

.story {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
}
.story summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.story summary::-webkit-details-marker { display: none; }
.story summary::after { content: "+"; color: var(--gold); font-family: var(--sans); font-weight: 300; }
.story[open] summary::after { content: "–"; }
.story .body { padding: 0 22px 22px; }
.story .body p { margin: 0 0 12px; }
.story .note { color: var(--gold); font-family: var(--serif); font-style: italic; font-size: 1.15rem; }

footer { text-align: center; padding: 30px 20px 50px; color: var(--muted); font-size: 0.82rem; }
footer p { margin: 0; }

/* Azonnali segítség */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  background: radial-gradient(700px 600px at 50% 40%, #17302f, #0b1415 80%);
  display: flex;
  animation: rise 0.5s ease both;
}
.overlay[hidden] { display: none; }
.close {
  position: fixed;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
}
.sos-inner { margin: auto; padding: 60px 24px 40px; text-align: center; max-width: 480px; }
.breath {
  width: 200px;
  height: 200px;
  margin: 0 auto 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 40% 35%, rgba(217, 180, 108, 0.5), rgba(134, 184, 168, 0.25) 70%);
  box-shadow: 0 0 60px rgba(217, 180, 108, 0.2);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.6rem;
  transform: scale(0.6);
  transition: transform 4s ease-in-out;
}
.breath.in { transform: scale(1); transition-duration: 4s; }
.breath.out { transform: scale(0.6); transition-duration: 6s; }
.sos-line { font-family: var(--serif); font-size: 1.6rem; margin: 0 0 6px; }
.sos-hint { color: var(--muted); margin: 0 0 28px; font-size: 0.9rem; }
.ground {
  background: none;
  border: 1px solid rgba(217, 180, 108, 0.4);
  color: var(--gold);
  border-radius: 999px;
  padding: 10px 20px;
  font: 400 0.9rem var(--sans);
  cursor: pointer;
}
.ground-steps { text-align: left; margin: 22px auto 0; padding-left: 1.4em; color: var(--text); }
.ground-steps li { margin-bottom: 8px; }
.ground-steps li::marker { color: var(--gold); }

button:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .panel, .overlay { animation: none; }
  .breath, .breath.in, .breath.out { transition: none; }
}

@media (max-width: 480px) {
  .top { padding-top: 20px; }
  .brand { font-size: 1.4rem; }
  .cardbox { padding: 24px 20px; }
}

/* Érintőképernyők, kis és nagy kijelzők */
.tabs button, .again, .ground, .sos { min-height: 44px; }
.top { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
main { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.sos-inner { padding-bottom: max(40px, env(safe-area-inset-bottom)); }
.close { top: max(14px, env(safe-area-inset-top)); width: 48px; height: 48px; }
.panel { overflow-wrap: anywhere; }

@media (max-width: 380px) {
  .tabs button { padding: 12px 9px; font-size: 0.88rem; }
  .breath { width: 160px; height: 160px; }
  .sos-line { font-size: 1.4rem; }
}
@media (min-width: 1100px) {
  body { font-size: 1.06rem; }
  .top, main { max-width: 840px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding: 24px 0 12px; }
  .breath { width: 120px; height: 120px; margin-bottom: 14px; }
  .sos-inner { padding-top: 24px; }
}

/* Rács elhelyezés a fejlécben */
.brandrow { grid-row: 1; grid-column: 1; }
.motto { grid-row: 2; grid-column: 1; }
.sos { grid-row: 1 / span 2; grid-column: 2; }
.infocard { grid-row: 3; grid-column: 1 / -1; }

.quote .cat { margin: 14px 0 0; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* Fényhatások a szélein: lassan lélegző, meleg és hűvös derengés */
body::before, body::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  width: min(34vw, 420px);
  pointer-events: none;
  z-index: -1;
  animation: glow 14s ease-in-out infinite alternate;
}
body::before {
  left: 0;
  background: radial-gradient(ellipse 100% 70% at 0% 35%, rgba(217, 180, 108, 0.20), rgba(217, 180, 108, 0.06) 45%, transparent 75%);
}
body::after {
  right: 0;
  background: radial-gradient(ellipse 100% 70% at 100% 65%, rgba(134, 184, 168, 0.20), rgba(134, 184, 168, 0.06) 45%, transparent 75%);
  animation-delay: -7s;
}
@keyframes glow { from { opacity: 0.55; } to { opacity: 1; } }

/* Tűvékony fénycsík elválasztó */
.rule {
  position: relative;
  height: 1px;
  width: min(70%, 380px);
  margin: 30px auto;
  background: linear-gradient(90deg, transparent, rgba(217, 180, 108, 0.7) 50%, transparent);
  box-shadow: 0 0 8px rgba(217, 180, 108, 0.35);
}
.rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -1px;
  width: 64px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 233, 180, 0.85), transparent 70%);
  filter: blur(1px);
}
.rule.short { width: min(40%, 200px); margin: 22px auto; }
.hero .rule { margin: 26px auto 0; }
footer .rule { margin: 0 auto 24px; }

/* A kis információ ikon halkabb */
.info { font-size: 0.72rem; }
.info::before { inset: 16px; }

/* Naptár */
.calnav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.calnav h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.5rem; }
.navb {
  width: 44px; height: 44px; border-radius: 50%;
  background: none; border: 1px solid var(--line); color: var(--muted);
  font: 300 1.4rem var(--sans); cursor: pointer; line-height: 1;
}
.navb:hover { color: var(--gold); border-color: rgba(217, 180, 108, 0.4); }
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.dow { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.1em; padding-bottom: 6px; }
.day {
  position: relative;
  aspect-ratio: 1;
  min-height: 40px;
  background: none;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--text);
  font: 300 0.95rem var(--sans);
  cursor: pointer;
}
.day:hover:not(:disabled) { background: var(--gold-soft); }
.day.future { color: rgba(155, 178, 171, 0.35); cursor: default; }
.day.today { border-color: rgba(217, 180, 108, 0.6); color: var(--gold); }
.day.picked { background: var(--gold-soft); box-shadow: 0 0 14px rgba(217, 180, 108, 0.25); }
.day.done::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 5px;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 6px var(--sage);
}
.calday { text-align: center; padding: 6px 4px 0; }
.calday .tag { }
.calday blockquote { margin: 8px 0 10px; font-family: var(--serif); font-style: italic; font-size: 1.6rem; line-height: 1.4; }
.calday cite { color: var(--gold); font-style: normal; font-size: 0.85rem; letter-spacing: 0.08em; }
.calday h3 { margin: 4px 0 6px; font-family: var(--serif); font-weight: 500; font-size: 1.5rem; }
.calday .reflect { margin: 0 0 6px; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 1.15rem; }

@media (max-width: 600px) {
  body::before, body::after { width: 46vw; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
}

.calnav, .calgrid { max-width: 420px; margin-left: auto; margin-right: auto; }
.calnav { margin-bottom: 14px; }
.calday { max-width: 560px; margin: 0 auto; }
.info::before { inset: 15px; }

cite[hidden] { display: none; }
