/* Stanze Zen 3D - il palco occupa tutta la larghezza della finestra */
:root {
    --zr-ink: #eef4f8;
    --zr-glass: rgba(8, 20, 30, 0.58);
    --zr-glass-strong: rgba(6, 16, 26, 0.9);
    --zr-line: rgba(255, 255, 255, 0.16);
    --zr-accent: #6fd6c4;
    --zr-accent-warm: #ffc98a;
    --zr-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* La pagina apre il contenitore centrato del sito: una vista stretta su un
   paesaggio non rilassa nessuno. */
body.zen-rooms-active .main-container {
    max-width: 100%;
    padding: 0;
}

.zr-app {
    position: relative;
    width: 100%;
    background: #060d14;
    color: var(--zr-ink);
    font-family: var(--zr-font);
}

.zr-stage {
    position: relative;
    width: 100%;
    height: 92vh;
    min-height: 620px;
    max-height: 1250px;
    overflow: hidden;
    background: #060d14;
    cursor: grab;
    touch-action: pan-y;
}
.zr-stage.is-grabbing { cursor: grabbing; }
.zr-stage:fullscreen { height: 100vh; max-height: none; }
#zrCanvas { display: block; width: 100%; height: 100%; }

.zr-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    background: #0b1720;
    font-size: 1rem;
}
.zr-app [hidden] { display: none !important; }

/* --- barra comandi ------------------------------------------------- */
.zr-bar {
    position: absolute;
    left: 14px;
    right: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    z-index: 12;
}
.zr-bar-top { top: 14px; }
.zr-bar-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.zr-bar-top .zr-bar-group:last-child { margin-left: auto; }

.zr-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--zr-line);
    background: var(--zr-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--zr-ink);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.zr-btn:hover { background: rgba(14, 34, 48, 0.78); border-color: rgba(111, 214, 196, 0.5); }
.zr-btn:active { transform: translateY(1px); }
.zr-btn.is-on {
    border-color: var(--zr-accent);
    background: rgba(111, 214, 196, 0.22);
    color: #eafff9;
}
.zr-btn-icon {
    min-width: 44px;
    justify-content: center;
    padding: 0 10px;
    font-size: 1.1rem;
}
.zr-counter {
    margin-left: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--zr-accent);
    letter-spacing: 0.04em;
}

.zr-volume {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--zr-line);
    background: var(--zr-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.zr-volume input {
    width: 108px;
    accent-color: var(--zr-accent);
    cursor: pointer;
}

/* --- timer ---------------------------------------------------------- */
.zr-timers {
    position: absolute;
    top: 70px;
    right: 14px;
    z-index: 12;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 7px 10px;
    border-radius: 14px;
    border: 1px solid var(--zr-line);
    background: var(--zr-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.zr-timer-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9fb6c2;
    margin-right: 2px;
}
.zr-timer-btn {
    min-height: 34px;
    min-width: 44px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.08);
    color: var(--zr-ink);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}
.zr-timer-btn:hover { background: rgba(255, 255, 255, 0.16); }
.zr-timer-btn.is-on {
    background: rgba(111, 214, 196, 0.24);
    border-color: var(--zr-accent);
}
.zr-timer-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #9fb6c2;
    min-width: 52px;
    text-align: center;
}
.zr-timer-label.is-on { color: var(--zr-accent-warm); }

/* --- didascalia ------------------------------------------------------ */
.zr-caption {
    position: absolute;
    left: 16px;
    bottom: 18px;
    max-width: min(440px, calc(100% - 32px));
    z-index: 11;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid var(--zr-line);
    background: var(--zr-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.zr-caption.is-in { opacity: 1; transform: none; }
.zr-caption-head { display: flex; align-items: center; gap: 10px; }
.zr-caption-icon { font-size: 1.5rem; }
.zr-caption-name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}
.zr-caption-desc {
    margin: 6px 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #c8d8e2;
}

.zr-hint {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11;
    padding: 9px 16px;
    border-radius: 30px;
    background: rgba(6, 16, 26, 0.7);
    border: 1px solid var(--zr-line);
    font-size: 0.82rem;
    color: #cfdde6;
    text-align: center;
    max-width: min(560px, calc(100% - 40px));
    transition: opacity 1.2s ease;
}
.zr-hint.is-hidden { opacity: 0; pointer-events: none; }

/* --- respirazione ---------------------------------------------------- */
.zr-breath {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.zr-breath-circle {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    background: radial-gradient(circle at 50% 45%, rgba(255,255,255,0.22), rgba(255,255,255,0.05) 70%);
    box-shadow: 0 0 60px rgba(160, 230, 255, 0.35);
    transform: scale(0.8);
    transition: transform linear;
}
.zr-breath-circle.is-in   { transform: scale(1.32); }
.zr-breath-circle.is-hold { transform: scale(1.32); }
.zr-breath-circle.is-out  { transform: scale(0.8); }
.zr-breath-text {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.zr-breath-count {
    font-size: 2rem;
    font-weight: 300;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

/* --- cassetto delle stanze ------------------------------------------- */
.zr-drawer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    max-height: 72%;
    display: flex;
    flex-direction: column;
    background: var(--zr-glass-strong);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--zr-line);
    transform: translateY(102%);
    transition: transform 0.4s cubic-bezier(0.25, 0.9, 0.3, 1);
}
.zr-drawer.is-open { transform: none; }
.zr-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--zr-line);
}
.zr-drawer-head strong { display: block; font-size: 1rem; }
.zr-drawer-head span { font-size: 0.82rem; color: #9fb6c2; }
.zr-drawer-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--zr-line);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
.zr-drawer-close:hover { background: rgba(239, 68, 68, 0.28); }

.zr-grid {
    overflow-y: auto;
    padding: 14px 18px 22px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}
.zr-room-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 116px;
    padding: 12px 14px 14px;
    border-radius: 14px;
    border: 1px solid var(--zr-line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--zr-ink);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease;
}
.zr-room-card:hover { transform: translateY(-2px); border-color: var(--zr-accent); }
.zr-room-card.is-active {
    border-color: var(--zr-accent);
    box-shadow: 0 0 0 1px var(--zr-accent) inset;
}
.zr-card-sky {
    position: absolute;
    inset: 0;
    opacity: 0.42;
}
.zr-room-card:hover .zr-card-sky, .zr-room-card.is-active .zr-card-sky { opacity: 0.62; }
.zr-card-icon, .zr-card-name, .zr-card-desc { position: relative; }
.zr-card-icon { font-size: 1.35rem; }
.zr-card-name {
    font-weight: 800;
    font-size: 0.92rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.55);
}
.zr-card-desc {
    font-size: 0.76rem;
    line-height: 1.4;
    color: #dbe7ee;
    text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}

/* --- testo sotto ------------------------------------------------------ */
.zr-article {
    max-width: 1080px;
    margin: 0 auto;
    padding: 44px 20px 56px;
    line-height: 1.7;
    color: #c7d6e0;
}
.zr-article h1 {
    color: #fff;
    font-size: 1.9rem;
    margin: 0 0 12px;
}
.zr-article h2 {
    color: #fff;
    font-size: 1.4rem;
    margin: 34px 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(111, 214, 196, 0.25);
}
.zr-lead { font-size: 1.05rem; color: #dbe9f1; }
.zr-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin: 26px 0 8px;
}
.zr-feature {
    background: #0b1722;
    border: 1px solid rgba(111, 214, 196, 0.16);
    border-radius: 14px;
    padding: 18px 20px;
}
.zr-feature h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    color: var(--zr-accent);
    display: flex;
    align-items: center;
    gap: 8px;
}
.zr-feature p { margin: 0; font-size: 0.9rem; }
.zr-related { margin-top: 30px; font-size: 0.92rem; }
.zr-related a { color: var(--zr-accent); font-weight: 600; text-decoration: none; }
.zr-related a:hover { text-decoration: underline; }

/* Sotto i 1120px la barra andava a capo e finiva sotto i timer:
   da qui in giù i pulsanti restano solo icone. */
@media (max-width: 1120px) {
    .zr-stage { height: 86vh; min-height: 520px; }
    .zr-bar-top .zr-bar-group:last-child { margin-left: 0; }
    .zr-btn span:nth-child(2) { display: none; }      /* solo icone: la barra resta su una riga */
    .zr-btn-wide span:nth-child(2) { display: inline; }
    .zr-volume input { width: 78px; }
}

@media (max-width: 760px) {
    .zr-timer-title { display: none; }
    .zr-stage { height: 82vh; min-height: 500px; }
    .zr-timers { top: auto; bottom: 96px; right: 10px; left: 10px; justify-content: center; }
    .zr-caption { left: 10px; right: 10px; bottom: 10px; max-width: none; }
    .zr-hint { bottom: 176px; }
    .zr-drawer { max-height: 80%; }
    .zr-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
