.world-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; padding-block: 5px; border-top: 1px solid var(--line); color: var(--ink); }
.world-breadcrumb, .world-toolbar-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .875rem; }
.world-breadcrumb { color: var(--muted); }
.world-toolbar button { min-height: 36px; padding: 3px 11px; }
.world-toolbar-controls label { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; cursor: pointer; }
.world-toolbar input { accent-color: var(--green); }
.world-toolbar [aria-current] { color: var(--ink); font-weight: 700; }
.world-toolbar #journey-sound[aria-pressed="true"] { color: white; background: var(--green); }

.world[data-world] {
  --card-border: #ffd4919c;
  --card-ink: #312331;
  --card-bg: #fff7e9e8;
  --card-accent: #713619;
  --world-action: #ffb86e;
  padding-bottom: clamp(42px, 9vw, 90px);
}
.world[data-world="muslim"] { --card-border: #77dbc2a8; --card-ink: #143b33; --card-bg: #edf9f1ee; --card-accent: #165847; --world-action: #80d9b1; }
.world[data-world="christian"] { --card-border: #ede0ffbc; --card-ink: #272740; --card-bg: #fcf8ffed; --card-accent: #54377c; --world-action: #f1d7f7; }
.world[data-world="sikh"] { --card-border: #ffe29db5; --card-ink: #35281d; --card-bg: #fff8e7ec; --card-accent: #694718; --world-action: #fbd177; }

.world .world-copy {
  width: min(100%, 1080px);
  margin-inline: auto;
  padding: clamp(220px, 41svh, 480px) clamp(18px, 5vw, 58px) 0;
  display: grid;
  gap: 12px;
}
.world-card {
  border: 1px solid var(--card-border);
  border-radius: 19px;
  padding: clamp(16px, 3.3vw, 28px);
  background: var(--card-bg);
  color: var(--card-ink);
  box-shadow: 0 12px 42px #060a1629;
  backdrop-filter: blur(10px);
}
.world .world-title-card {
  background: color-mix(in srgb, var(--world-bg) 76%, transparent);
  color: #fffaf0;
  box-shadow: 0 14px 64px color-mix(in srgb, var(--world-gold) 13%, transparent);
}
.world h2 { font-size: clamp(3rem, 10vw, 7.6rem); margin-bottom: 10px; }
.world h3 { font: 1.4rem/1.15 Georgia, serif; margin: 0 0 8px; color: var(--card-accent); }
.world h4 { margin: 0 0 5px; font-size: 1rem; }
.world .world-copy p { max-width: 62ch; margin-block: 0 10px; }
.world .world-copy .world-label { color: var(--world-gold); }
.world .world-copy .actions { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 10px; max-width: none; }
.world-links :is(button,a), .world-highlight a { color: var(--card-accent); }
.world-links :is(button,a):is(:hover,:focus-visible) { background: #fffdf7; box-shadow: 0 3px 16px var(--card-border); }
.world-offering { margin-top: 0; }
.world-offering .world-primary { background: linear-gradient(110deg, #fff8e8, var(--world-action)); color: var(--card-ink); }
.world-offering input { color: var(--card-ink); background: white; border-color: var(--card-border); }
.world-offering input::placeholder { color: var(--card-ink); opacity: .7; }
.world .world-copy #offering-status { color: var(--card-ink); margin: 7px 0 0; font-size: .9rem; }
.world-highlights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.world-highlight { padding: 12px; border: 1px solid var(--card-border); border-radius: 12px; background: #ffffff95; }
.world-highlight > :last-child { margin-bottom: 0; }
.world-copy .world-card { animation: world-card-arrive .55s var(--card-delay, 0s) ease-out both; }
.world-links { --card-delay: .18s; }
.world-stories { --card-delay: .28s; }
.world-offering { --card-delay: .38s; }
@keyframes world-card-arrive { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  .world-copy .world-stories { animation: world-card-arrive linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
}
@media (min-width: 601px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .world-scene { animation: world-scene-drift linear both; animation-timeline: scroll(root); animation-range: 0px 720px; }
    @keyframes world-scene-drift { to { translate: 0 45px; } }
  }
}
.world[data-journey] .world-mote { visibility: visible; }
.world[data-journey]:has(.journey-film.ready) .world-mote { visibility: visible; }
.world-effects { height: min(100%, 100svh); }
.world-ambient { position: absolute; inset: 0; pointer-events: none; }
.world-ambient::before, .world-ambient::after { content: ""; position: absolute; }
.world[data-world="hindu"] .world-ambient::before,
.world[data-world="christian"] .world-ambient::before,
.world[data-world="christian"] .world-ambient::after {
  inset: 3% 8% auto 4%;
  height: 35%;
  background: radial-gradient(ellipse at 22% 55%, #fff3d762, transparent 42%), radial-gradient(ellipse at 75% 40%, #fce7af55, transparent 56%);
  animation: cloud-layer 80s ease-in-out infinite alternate;
}
.world[data-world="christian"] .world-ambient::before { animation-duration: 120s; background: radial-gradient(ellipse at 25% 46%, #f7f9ff95, transparent 42%), radial-gradient(ellipse at 75% 60%, #f3eeff74, transparent 43%); }
.world[data-world="christian"] .world-ambient::after { inset: 18% 0 auto 27%; animation-duration: 60s; animation-direction: alternate-reverse; }
@keyframes cloud-layer { from { transform: translateX(-7%); opacity: .45; } to { transform: translateX(10%); opacity: .85; } }
.world[data-world="hindu"] .world-ambient::after {
  inset: 0;
  background: conic-gradient(from 179deg at 74% 2%, transparent 0 9deg, #ffda8f45 12deg 15deg, transparent 18deg 22deg, #fff0ba38 24deg 27deg, transparent 29deg 35deg, #ffca8b35 37deg 40deg, transparent 44deg);
  animation: stained-light 7s ease-in-out infinite alternate;
}
.world[data-world="hindu"] .world-mote:nth-child(odd)::before { animation: diya-ember .6s ease-in-out infinite alternate; transform-origin: bottom center; }
@keyframes diya-ember { to { transform: rotate(9deg) scaleY(.8); } }
.world[data-world="hindu"] .world-mote:nth-child(even) {
  width: 16px; height: 12px; background: radial-gradient(ellipse at center, #ffd7a2 4%, #f7a7c5 35%, #d85c9e 70%, transparent 74%);
  clip-path: polygon(0 46%, 22% 32%, 25% 0, 50% 27%, 75% 0, 78% 32%, 100% 46%, 83% 85%, 51% 100%, 17% 85%);
}
.world[data-world="muslim"] .world-ambient::before {
  inset: 13% 0 auto; height: 37%;
  background: radial-gradient(ellipse at 63% 49%, #d6fff971, transparent 53%);
  animation: cloud-layer 100s ease-in-out infinite alternate;
}
.world[data-world="muslim"] .world-ambient::after {
  left: 67%; top: 41%; width: 18%; height: 19%;
  border-radius: 55% 55% 0 0;
  background: repeating-linear-gradient(108deg, transparent 0 10px, #d2fff285 12px, transparent 15px 25px);
  mask-image: radial-gradient(ellipse, #000 0 16%, transparent 63%);
  animation: fountain-stream 3s ease-in-out infinite;
}
@keyframes fountain-stream { 0%,100% { transform: translateY(5%) scaleY(.83); opacity: .4; } 52% { transform: translateY(-6%) scaleY(1.13); opacity: .82; } }
.world[data-world="christian"] .world-mote {
  width: calc(var(--size) * 2.6); height: calc(var(--size) * 2.6);
  border: 1px solid #f5edffc4;
  background: radial-gradient(circle at 34% 25%, #fff9, #c5eaff38 19%, #b39dff1a 52%, #eaddff58 82%);
  box-shadow: 0 0 12px #e8dafa67;
}
.world[data-world="sikh"] .world-ambient::before {
  inset: 50% 0 3% 32%;
  background: repeating-radial-gradient(ellipse at 58% 67%, transparent 0 10px, #ffd47659 11px 13px, transparent 15px 23px);
  mask-image: radial-gradient(ellipse at 58% 67%, #000 12%, transparent 62%);
  animation: sarovar-ripples 6s ease-out infinite;
}
.world[data-world="sikh"] .world-ambient::after {
  inset: 44% 0 10% 40%;
  background: radial-gradient(ellipse at 68% 58%, #ffcd6c88, transparent 56%);
  animation: stained-light 5s ease-in-out infinite alternate;
}
@keyframes sarovar-ripples { 0% { transform: scale(.82); opacity: .12; } 45% { opacity: .65; } 100% { transform: scale(1.15); opacity: .14; } }

.offering-scene.langar .offering-object {
  z-index: 1; width: 38%; height: 20%;
  border-radius: 50%; border: 2px solid #ffe5a3;
  background: radial-gradient(ellipse at 68% 40%, #d5b187 0 9%, transparent 10%), radial-gradient(ellipse at 48% 36%, #ffe7bd 0 15%, transparent 16%), radial-gradient(ellipse, #b87f41 35%, #e7bd7b 63%, #62472e 66%, #fbd895 75%);
  box-shadow: 0 0 26px #ffe397a3;
}
.offering-scene.diya { animation: diya-release 2.8s ease-out both; }
@keyframes diya-release {
  from { transform: translate(-50%, -39%); }
  to { transform: translate(-50%, -73%); }
}
.placed-dua { display: block; position: absolute; left: 50%; bottom: 95%; width: max-content; max-width: min(210px, 45vw); transform: translateX(-50%); overflow-wrap: anywhere; padding: 4px 8px; border-radius: 8px; background: #0c302de8; color: #fff; text-align: center; font-size: .8rem; }

body:has(.portal:not([hidden])) :is(.launch,.chat), .launch { z-index: 9999; }
.portal[data-exit] { animation: portal-exit .9s ease-in-out both; }
.portal[data-exit]::before { animation: portal-ring .9s ease-in both reverse; }
@keyframes portal-exit { 0%,100% { opacity: 0; } 37%,56% { opacity: 1; } }
.launch[data-community="hindu"] { color: #352015; background: #ffd081; border-color: #ffc264; box-shadow: 0 0 20px #ffb456d4; }
.launch[data-community="muslim"] { color: #10362a; background: #adf4d7; border-color: #78d7c5; box-shadow: 0 0 20px #65ead6bc; }
.launch[data-community="christian"] { color: #352651; background: #fff5e8; border-color: #ead9fa; box-shadow: 0 0 20px #f6dfffbf; }
.launch[data-community="sikh"] { color: #302312; background: #ffe29b; border-color: #f4b851; box-shadow: 0 0 20px #fbc45ad6; }
.launch[data-community]:not([data-community="universal"])::first-letter { color: currentColor; }
.launch[data-community]:not([data-community="universal"]):hover { filter: brightness(1.09); }
.chat .world-greeting { margin: 0 0 8px; }
@media (max-width: 600px) {
  .world-toolbar { gap: 2px 12px; }
  .world-toolbar-controls { gap: 2px 6px; }
  .world-toolbar button { padding-inline: 8px; font-size: .79rem; }
  .world-toolbar-controls label { font-size: .79rem; }
  .world .world-copy { padding-top: clamp(155px, 37svh, 350px); }
  .world-card { backdrop-filter: none; }
  .world-highlights { grid-template-columns: 1fr; }
  .world .world-copy .actions { display: flex; }
  .world-ambient::after { animation-duration: 12s; }
}
.world-offering { display: grid; column-gap: 12px; align-items: center; }
.world-offering:has(#offering-visual:not(:empty)) { grid-template-columns: minmax(0, 1fr) clamp(100px, 20vw, 210px); }
#offering-visual { position: relative; align-self: stretch; min-height: 100px; }
#offering-visual:empty { display: none; }
#offering-visual .offering-scene { top: 53%; left: 50%; width: min(100%, 160px); }
#offering-visual .offering-flame { width: clamp(9px, 1.7vw, 15px); height: clamp(16px, 3vw, 26px); }
#offering-visual .offering-halo { background-color: #34253719; }
#offering-visual .offering-scene.leaf .offering-object { z-index: 1; }
.chat { z-index: 10000; }
body:has(.portal:not([hidden])) .chat { z-index: 10000; }
@media (max-width: 600px) {
  .world-offering:has(#offering-visual:not(:empty)) { grid-template-columns: 1fr; }
  #offering-visual { min-height: 100px; margin-top: 8px; }
  #offering-visual .offering-scene { width: 112px; }
  .world-offering form button { flex-basis: auto; }
}
#private-reflection { margin-top: 8px; }
#private-reflection summary { cursor: pointer; font-weight: 650; }
#private-reflection textarea { width: 100%; min-height: 72px; margin-top: 6px; padding: 8px; border: 1px solid var(--card-border); border-radius: 8px; font: inherit; }

.world .world-card { min-width: 0; }
.world .world-copy :is(p,h2,h3,h4) { overflow-wrap: anywhere; }
.world .world-copy .actions > * { max-width: 100%; white-space: normal; }
.world-offering input { flex: 1 1 12rem; }
.launch { right: max(12px, env(safe-area-inset-right)); }

@media (min-width: 900px) {
  .world .world-copy {
    width: min(100%, 1280px);
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(14px, 2vw, 24px);
  }
  .world .world-links { align-self: end; }
  .world-offering:has(#offering-visual:not(:empty)) { grid-template-columns: 1fr; }
}

@media (min-width: 601px) and (max-height: 510px) and (orientation: landscape) {
  :root { --header-height: 56px; }
  .world .world-copy { padding-top: clamp(76px, 27svh, 150px); }
  .world h2 { font-size: clamp(2.6rem, 10svh, 4.5rem); }
}

@media (max-width: 360px) {
  header > .shell { padding-inline: 12px; }
  header nav { gap: 8px; }
  header .navlinks { gap: 8px; }
  header .brand { padding-inline: 8px; }
  header .navlinks a { overflow-wrap: anywhere; }
  .world-toolbar-controls button { padding-inline: 6px; }
  .world-offering form { flex-wrap: wrap; }
}
