/* Pebbble player: arrival, the pebbble sheet, mini player. Shared parts live in shared/ui.css. */

/* arrival */
.arrival { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 0 32px; }
.arrival .stone { width: min(62vw, 250px); }
.arrival h1 { font-size: 2rem; line-height: 1.15; margin: 28px 0 6px; }
.arrival .dedication { font-family: var(--serif); font-style: italic; color: var(--soft); font-size: 1.1rem; margin: 0 0 4px; }
.arrival .count { margin: 0 0 36px; }
.arrival .primary { max-width: 280px; }
.owner-note { margin-top: 40px; font-size: .85rem; color: var(--soft); line-height: 1.55; max-width: 300px; }
.owner-note b { color: var(--ink); font-weight: 600; }

/* voices in the player */
.player .voice.sleeping { cursor: default; }
.eq { display: inline-flex; gap: 2px; align-items: end; height: 12px; }
.eq i { width: 3px; background: var(--accent); border-radius: 1px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; }
.eq.paused i { animation: none; height: 4px; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 12px; } }
.foot-note { margin: 28px 0 0; font-size: .82rem; color: var(--faint); text-align: center; line-height: 1.6; }

/* mini player */
.mini { position: fixed; left: 0; right: 0; bottom: 0; max-width: 440px; margin: 0 auto; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); z-index: 10; transform: translateY(130%); transition: transform .45s var(--ease); }
.mini.on { transform: none; }
.mini-inner { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: 18px; padding: 10px 10px 10px 12px; box-shadow: 0 6px 24px rgba(0,0,0,.10); position: relative; overflow: hidden; cursor: pointer; }
.mini .stone { width: 38px; flex: 0 0 38px; }
.mini .txt { flex: 1; min-width: 0; }
.mini .txt b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .txt span { font-size: .8rem; color: var(--faint); }
.mini .line { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--ink); }

/* full player */
.player { top: 0; border-radius: 0; padding-top: calc(8px + env(safe-area-inset-top)); display: flex; flex-direction: column; max-width: 440px; }
.player .top { display: flex; justify-content: space-between; align-items: center; margin: 0 -10px; }
.player .top .from { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.player .stage { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-height: 0; }
.player .stone { width: min(64vw, 270px); }
.player h2 { font-size: 1.6rem; margin: 26px 0 2px; }
.progress { margin: 24px 0 6px; height: 20px; position: relative; cursor: pointer; }
.progress .track { position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: var(--line); border-radius: 1px; }
.progress .fill { position: absolute; left: 0; top: 9px; height: 2px; background: var(--ink); border-radius: 1px; }
.progress .dot { position: absolute; top: 4px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--ink); }
.times { display: flex; justify-content: space-between; font-size: .8rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.transport { display: flex; justify-content: center; align-items: center; gap: 28px; margin: 18px 0 22px; }
.play-big { width: 72px; height: 72px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.play-big .icon { width: 28px; height: 28px; fill: currentColor; stroke: none; }
.modes { display: flex; justify-content: space-between; gap: 10px; }
.mode { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); font-size: .88rem; }
.mode.active { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.sleep-choices { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.sleep-choices button { flex: 1; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); font-size: .85rem; white-space: nowrap; }
.sleep-choices button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* status line (opening, offline, errors) */
.status { text-align: center; color: var(--soft); font-size: .9rem; padding: 40vh 24px 0; }
.status.inline { padding: 0 0 12px; font-size: .85rem; }
.saved-note { text-align: center; font-size: .8rem; color: var(--faint); margin: 14px 0 0; }

/* The pebbble sheet: stone + controls + voices, scrolls as one; drag the top down to fold it. */
.sheet.player { top: 0; overflow-y: auto; overscroll-behavior: contain; display: block; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.player .drag-zone { touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.player .handle { margin-bottom: 4px; }
.player .stage { display: block; text-align: center; padding: 8px 0 0; }
.player .stone { width: min(48vw, 210px); margin: 0 auto; }
.player h2 { font-size: 1.5rem; margin: 20px 0 2px; }
.player .voices { margin-top: 26px; }
.sheet.dragging { transition: none; }
.mini-inner { touch-action: none; transition: transform .25s var(--ease), opacity .25s var(--ease); }
.mini-inner.dragging { transition: none; }

/* Fixed top, scrolling voices; on a long list the stone shrinks so more voices fit. */
.sheet.player { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; max-height: none; }
.player .drag-zone, .player #controls { flex: none; }
.player .scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 14px -24px 0; padding: 0 24px calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid transparent; transition: border-color .3s; }
.player .scroll .voices { margin-top: 0; }
.player .scroll .voice:first-child { border-top: 0; }
.player .stone { transition: width .35s var(--ease); }
.player h2 { transition: font-size .35s var(--ease), margin .35s var(--ease); }
.player.compact .stone { width: 76px; }
.player.compact h2 { font-size: 1.2rem; margin-top: 10px; }
.player.compact .scroll { border-top-color: var(--line); }

/* Gentle install suggestion (owned phones, not yet on the home screen) */
.install { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; margin: 4px 0 24px; text-align: left; }
.install b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.15rem; margin-bottom: 4px; }
.install p { margin: 0 0 12px; color: var(--soft); font-size: .9rem; }
.install .row { display: flex; gap: 10px; align-items: center; }
.install .add { padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: .9rem; }
.install .later { padding: 10px 8px; color: var(--soft); font-size: .9rem; }
.install .ios { margin: 0; color: var(--ink); font-size: .9rem; }
.player .install { margin: 18px 0 0; }
