/* Orchestra 3D */
html:has(.or-wrap), body:has(.or-wrap) { overflow-x: hidden; }
.or-wrap { max-width: none; margin: 0; padding: 0 0 3rem; }
.or-wrap > .or-grid, .or-wrap > .or-keys, .or-wrap > .or-seo, .or-wrap > .or-head { max-width: 1400px; margin-left: auto; margin-right: auto; }
.or-wrap [hidden] { display: none !important; }
.or-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.or-head p { display: none; }
.or-head h1 {
    margin: 0; font-family: Georgia, 'Times New Roman', serif; font-weight: 700; letter-spacing: .06em;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    background: linear-gradient(180deg, #fff3cf, #e0b04a 60%, #a8741d); -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 6px 30px rgba(224, 176, 74, .25);
}
.or-head p { margin: .4rem auto 0; max-width: 700px; color: var(--text-muted, #94a3b8); }

.or-stage-wrap {
    width: 100vw; max-width: 100vw; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%);
    background: #07050a; overflow: hidden; position: relative; border-bottom: 1px solid rgba(224, 176, 74, .35);
}
.or-stage-wrap:fullscreen { display: flex; flex-direction: column; border-radius: 0; }
.or-stage-wrap:fullscreen .or-stage { flex: 1; height: auto; }
.or-stage { position: relative; height: calc(100vh - 72px - 66px); height: calc(100dvh - 72px - 66px); min-height: 380px; }
.or-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.or-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0,0,0,.55) 100%); }

.or-bigplay {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    display: flex; flex-direction: column; align-items: center; gap: .6rem;
    background: none; border: 0; cursor: pointer; color: #fff3cf;
}
.or-bigplay-ico {
    width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 2.4rem; padding-left: 8px; background: radial-gradient(circle at 35% 30%, #ffe7a3, #d69a2a 60%, #7a4d0c);
    color: #2a1703; box-shadow: 0 0 0 6px rgba(224,176,74,.25), 0 0 60px rgba(255,200,110,.55);
    transition: transform .2s;
}
.or-bigplay:hover .or-bigplay-ico { transform: scale(1.07); }
.or-bigplay-txt { font-family: Georgia, serif; font-size: 1.25rem; letter-spacing: .08em; text-shadow: 0 2px 10px #000; }

.or-titlecard {
    position: absolute; left: 50%; top: 18%; transform: translateX(-50%); text-align: center; pointer-events: none;
    color: #fff3cf; font-family: Georgia, serif; text-shadow: 0 3px 18px #000; opacity: 0; width: 92%;
}
.or-titlecard.show { animation: orCard 5.2s ease forwards; }
.or-titlecard small { display: block; letter-spacing: .3em; text-transform: uppercase; font-size: .8rem; color: #e0b04a; }
.or-titlecard strong { display: block; font-size: clamp(1.6rem, 4vw, 2.8rem); margin: .3rem 0; }
.or-titlecard span { font-style: italic; font-size: 1.1rem; }
@keyframes orCard { 0% { opacity: 0; transform: translate(-50%, 10px); } 15%, 70% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.or-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(7,5,10,.55); color: #fff3cf; font-family: Georgia, serif; font-size: 1.2rem; }
.or-drop { position: absolute; inset: 12px; border: 3px dashed #e0b04a; border-radius: 14px; display: none; align-items: center; justify-content: center; color: #fff3cf; font-size: 1.3rem; background: rgba(7,5,10,.7); pointer-events: none; }
.or-stage-wrap.drag .or-drop { display: flex; }

.or-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .55rem 1.25rem; background: linear-gradient(180deg, #140d0a, #0b0706); border-top: 1px solid rgba(224,176,74,.2); }
.or-btn {
    min-width: 44px; height: 44px; border-radius: 12px; border: 1px solid #3a2a18; background: #1c130c; color: #fff3cf;
    font-size: 1.05rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: 0 .6rem;
}
.or-btn:hover { background: #2a1c10; }
.or-btn.active { background: linear-gradient(180deg, #e0b04a, #a8741d); color: #1a0f03; border-color: #e0b04a; }
.or-btn span { font-size: .85rem; font-weight: 600; }
.or-play { width: 52px; height: 52px; border-radius: 50%; font-size: 1.1rem; background: linear-gradient(180deg, #e0b04a, #a8741d); color: #1a0f03; border: 0; }
.or-piece-sel {
    min-height: 44px; max-width: 360px; flex: 0 1 360px; border-radius: 12px; border: 1px solid #e0b04a; background: #1c130c;
    color: #fff3cf; font-weight: 700; padding: 0 .6rem; font-size: .92rem; cursor: pointer;
}
.or-piece-sel optgroup { color: #e0b04a; background: #120c08; }
.or-piece-sel option { color: #fff3cf; background: #1c130c; }
.or-time { color: #e8d9b5; font-variant-numeric: tabular-nums; font-size: .92rem; min-width: 88px; }
.or-seek { flex: 1; min-width: 90px; accent-color: #e0b04a; height: 44px; }
.or-vol { width: 100px; accent-color: #e0b04a; height: 44px; }
.or-cams { display: flex; gap: .3rem; }

.or-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.5rem; padding: 0 1.25rem; }
.or-card { background: var(--card-bg, #0f172a); border: 1px solid rgba(224,176,74,.18); border-radius: 16px; padding: 1rem; }
.or-card h2 { margin: 0 0 .7rem; font-family: Georgia, serif; font-size: 1.25rem; color: #e0b04a; }
.or-now strong { display: block; font-size: 1.15rem; }
.or-now span { color: var(--text-muted, #94a3b8); font-style: italic; }
.or-now p { margin: .5rem 0 .8rem; color: var(--text-muted, #94a3b8); line-height: 1.55; font-size: .93rem; }
.or-pieces { display: grid; gap: .45rem; }
.or-piece {
    text-align: left; min-height: 52px; border-radius: 12px; border: 1px solid rgba(224,176,74,.18); background: rgba(224,176,74,.04);
    color: inherit; padding: .5rem .8rem; cursor: pointer; display: flex; flex-direction: column; justify-content: center;
}
.or-piece:hover { background: rgba(224,176,74,.1); }
.or-piece.active { border-color: #e0b04a; background: rgba(224,176,74,.16); }
.or-piece-t { font-weight: 700; }
.or-piece-c { font-size: .82rem; color: var(--text-muted, #94a3b8); }
.or-upload { width: 100%; min-height: 48px; margin-top: .7rem; border-radius: 12px; border: 1px dashed #e0b04a; background: transparent; color: #e0b04a; font-weight: 700; cursor: pointer; }
.or-upload:hover { background: rgba(224,176,74,.08); }
.or-note { color: var(--text-muted, #94a3b8); font-size: .85rem; line-height: 1.5; }

.or-mixer { display: grid; gap: .35rem; }
.or-mix { display: grid; grid-template-columns: 12px 1fr 70px 44px 44px 44px; align-items: center; gap: .4rem; }
.or-mix-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.or-mix-name { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.or-mix-meter { height: 8px; border-radius: 4px; background: rgba(148,163,184,.15); overflow: hidden; }
.or-mix-meter i { display: block; height: 100%; background: var(--c); transform-origin: left; transform: scaleX(0); transition: transform .1s linear; }
.or-mix-btn { height: 44px; border-radius: 10px; border: 1px solid rgba(148,163,184,.25); background: transparent; color: inherit; font-weight: 800; cursor: pointer; }
.or-mix-btn.on { background: var(--c); color: #111; border-color: var(--c); }
.or-mix-look { font-size: 1rem; }

.or-keys { color: var(--text-muted, #94a3b8); font-size: .85rem; text-align: center; margin: 1.25rem auto 0; padding: 0 1.25rem; }
.or-keys a { color: #e0b04a; margin-left: .5rem; }
.or-seo { max-width: 860px; margin: 2.5rem auto 0; padding: 0 1.25rem; }
.or-seo h2 { font-family: Georgia, serif; font-size: 1.3rem; }
.or-seo p { color: var(--text-muted, #94a3b8); line-height: 1.7; }

[data-theme="light"] .or-card { background: #fffaf0; }

@media (max-width: 1500px) {
    .or-cams .or-btn span { display: none; }
    .or-bar { flex-wrap: nowrap; }
    .or-piece-sel { flex: 0 1 300px; }
}
@media (max-width: 900px) {
    .or-bar { flex-wrap: wrap; }
    .or-grid { grid-template-columns: 1fr; }
    .or-cams .or-btn span { display: none; }
    .or-stage { height: 62vh; }
    .or-grid { padding: 0 .75rem; }
    .or-vol { display: none; }
}
@media (max-width: 520px) {
    .or-piece-sel { flex-basis: 100%; max-width: none; order: -1; }
    .or-wrap { padding: .5rem .4rem 2rem; }
    .or-seek { order: 10; flex-basis: 100%; }
    .or-time { min-width: 0; }
}

/* ?rec=1: solo la scena, a tutta finestra, per record_orchestra_gui.py */
html.or-rec, html.or-rec body { overflow: hidden !important; background: #000; }
html.or-rec .or-stage { position: fixed !important; inset: 0; z-index: 99999; width: 100vw !important; height: 100vh !important; }
html.or-rec .or-stage > :not(canvas), html.or-rec .or-bar { display: none !important; }
