/**
 * Mi CIMA — app pública del paciente
 * Archivo  : app/style/mi.css
 * Función  : Estilos de la app. Mismo look del portal del paciente (tarjeta de vidrio, titlebar con el
 *            isotipo, dock glossy con orbe), con la paleta oficial D: navy #04346C + teal #00AFC2.
 *            Claro/oscuro sigue al teléfono vía html[data-pp-scheme] (lo pone app.js).
 *            Solo tokens --pp-*; nada de colores sueltos fuera de este bloque.
 */
:root {
    --pp-logo: url('/app/style/icon/cima_logo_oscuro.svg?v=20261109h');
    --cima-navy: #04346C;
    --cima-teal: #00AFC2;
    --pp-primary: #3FC6D6;
    --pp-accent: var(--cima-teal);
    --pp-success: #10b981;
    --pp-danger: #ef4444;
    --pp-warn: #f59e0b;
    --pp-bg: #061428;
    --pp-text: #F2F7FC;
    --pp-text-muted: rgba(242, 247, 252, 0.58);
    --pp-surface: rgba(255, 255, 255, 0.06);
    --pp-surface-2: rgba(255, 255, 255, 0.1);
    --pp-solid: #0B2140;
    --pp-border: rgba(255, 255, 255, 0.12);
    --pp-dock-bar: #0B2140;
    --pp-on-primary: #04213F;
    --pp-glow: rgba(0, 175, 194, 0.16);
    --pp-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --pp-line-2: #F59E0B;
    --ppd-h: 66px;
}
html[data-pp-scheme="light"] {
    --pp-logo: url('/app/style/icon/cima_logo.svg?v=20260817mc18');
    --pp-primary: var(--cima-navy);
    --pp-bg: #F2F6FB;
    --pp-text: #0A2540;
    --pp-text-muted: rgba(10, 37, 64, 0.6);
    --pp-surface: rgba(255, 255, 255, 0.78);
    --pp-surface-2: rgba(4, 52, 108, 0.06);
    --pp-solid: #FFFFFF;
    --pp-border: rgba(10, 37, 64, 0.12);
    --pp-dock-bar: #FFFFFF;
    --pp-on-primary: #FFFFFF;
    --pp-glow: rgba(0, 175, 194, 0.14);
    --pp-shadow: 0 10px 28px rgba(4, 20, 44, 0.10);
    --pp-line-2: #D97706;
    color-scheme: light;
}
html { color-scheme: dark; background: var(--pp-bg); }

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; min-height: 100%; overscroll-behavior: none; touch-action: pan-x pan-y; }
body {
    font-family: Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    color: var(--pp-text); background: var(--pp-bg);
    -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-font-smoothing: antialiased;
}
input, textarea, select { -webkit-user-select: text; user-select: text; font: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
/* Marca: la palabra CIMA se dibuja con el logo oficial (app/core/brandword.js). */
.cima-word { display: inline-block; height: .95em; aspect-ratio: 251.5 / 76; vertical-align: -.06em; margin: 0 .06em; background: var(--pp-logo) no-repeat center / contain; }
.mi-h1 .cima-word, .mi-h2 .cima-word, .mi-sheet-head .cima-word { height: .95em; vertical-align: -.1em; }
.mi-brand { display: inline-flex; align-items: center; gap: .22em; color: var(--pp-primary); }
.mi-brand .cima-word { height: 1.08em; margin: 0; vertical-align: 0; }
html:not([data-pp-scheme="light"]) .mi-brand { color: #fff; }
/* Sobre fondos invertidos (banner navy, aviso flotante) el logo va con el contraste contrario. */
.mi-install .cima-word, html[data-pp-scheme="light"] .mi-toast .cima-word { background-image: url('/app/style/icon/cima_logo_oscuro.svg?v=20261109h'); }
html:not([data-pp-scheme="light"]) .mi-toast .cima-word { background-image: url('/app/style/icon/cima_logo.svg?v=20260817mc18'); }

/* ── Marco: tarjeta centrada (el portal en el teléfono ocupa todo) ── */
#pp-root {
    min-height: 100vh; min-height: 100dvh; display: flex; justify-content: center;
    background: var(--pp-bg);
    background-image: radial-gradient(ellipse 70% 38% at 50% 0%, var(--pp-glow), transparent 70%);
}
#pp-card {
    position: relative; width: 100%; max-width: 520px;
    height: 100vh; height: 100dvh; overflow: hidden;
    display: flex; flex-direction: column;
    border-left: 1px solid var(--pp-border); border-right: 1px solid var(--pp-border);
}
.pp-titlebar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 10px 10px 16px; padding-top: calc(10px + env(safe-area-inset-top, 0px));
    min-height: 56px; flex-shrink: 0; border-bottom: 1px solid var(--pp-border);
    background: var(--pp-surface); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
}
.pp-tb-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pp-tb-text { font-family: 'Roboto Condensed', Roboto, sans-serif; font-size: 1.3rem; line-height: 1.1; font-weight: 700; color: var(--pp-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-tb-text small { display: block; font-family: Roboto, sans-serif; font-size: .68rem; font-weight: 500; color: var(--pp-text-muted); letter-spacing: .02em; }
.pp-tb-act { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.pp-tb-btn {
    width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px; border: none; background: transparent; color: var(--pp-text-muted);
    font-size: 1.2rem; cursor: pointer; -webkit-appearance: none;
}
.pp-tb-btn:active { transform: scale(.93); background: var(--pp-surface-2); }

#pp-content { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 18px 16px calc(var(--ppd-h) + 44px + env(safe-area-inset-bottom, 0px)); }
.mi-view { animation: mi-in .28s ease both; }
@keyframes mi-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Tipografía y bloques ── */
.mi-h1 { font-family: 'Roboto Condensed', Roboto, sans-serif; font-size: 1.5rem; font-weight: 700; margin: 2px 0 4px; line-height: 1.15; }
.mi-sub { color: var(--pp-text-muted); font-size: .9rem; margin: 0 0 16px; line-height: 1.45; }
.mi-h2 { font-family: 'Roboto Condensed', Roboto, sans-serif; font-size: 1.05rem; font-weight: 700; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.mi-h2 .bi { color: var(--pp-accent); }
.mi-card {
    background: var(--pp-surface); border: 1px solid var(--pp-border); border-radius: 18px;
    padding: 16px; margin-bottom: 12px; box-shadow: var(--pp-shadow);
    -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
}
.mi-row { display: flex; align-items: center; gap: 12px; }
.mi-grow { flex: 1; min-width: 0; }
.mi-muted { color: var(--pp-text-muted); }
.mi-small { font-size: .8rem; }
.mi-note { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; line-height: 1.45; color: var(--pp-text-muted); padding: 12px 14px; border-radius: 14px; background: var(--pp-surface-2); margin: 10px 0; }
.mi-note .bi { color: var(--pp-accent); font-size: 1rem; margin-top: 1px; flex-shrink: 0; }
.mi-note b { color: var(--pp-text); }
.mi-source { font-size: .72rem; color: var(--pp-text-muted); margin-top: 6px; line-height: 1.4; }
.mi-empty { text-align: center; padding: 28px 10px; color: var(--pp-text-muted); font-size: .9rem; }
.mi-empty .bi { font-size: 2rem; display: block; margin: 0 auto 8px; color: var(--pp-accent); opacity: .8; }

/* ── Botones ── */
.mi-btn {
    min-height: 46px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--pp-border);
    background: var(--pp-surface); color: var(--pp-text); font-weight: 600; font-size: .95rem;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; -webkit-appearance: none;
    transition: transform .15s, background .15s;
}
.mi-btn:active { transform: scale(.97); }
.mi-btn.is-primary { background: var(--pp-accent); border-color: var(--pp-accent); color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--pp-accent) 35%, transparent); }
.mi-btn.is-navy { background: var(--pp-primary); border-color: var(--pp-primary); color: var(--pp-on-primary); }
.mi-btn.is-danger { color: var(--pp-danger); border-color: color-mix(in srgb, var(--pp-danger) 40%, transparent); }
.mi-btn.is-block { width: 100%; }
.mi-btn.is-sm { min-height: 38px; padding: 0 12px; font-size: .84rem; border-radius: 11px; }
.mi-btn[disabled] { opacity: .45; pointer-events: none; }
.mi-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.mi-btns > .mi-btn { flex: 1; }
.mi-icon-btn { width: 40px; height: 40px; border-radius: 12px; border: none; background: transparent; color: var(--pp-text-muted); display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; cursor: pointer; }
.mi-icon-btn:active { background: var(--pp-surface-2); }

/* ── Formularios ── */
.mi-field { display: block; margin-bottom: 12px; }
.mi-label { display: block; font-size: .8rem; font-weight: 600; color: var(--pp-text-muted); margin: 0 0 6px 2px; }
.mi-input {
    width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 13px; border: 1px solid var(--pp-border);
    background: var(--pp-solid); color: var(--pp-text); font-size: 1rem; outline: none; -webkit-appearance: none; appearance: none;
}
.mi-input:focus { border-color: var(--pp-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pp-accent) 20%, transparent); }
textarea.mi-input { min-height: 80px; resize: vertical; }
select.mi-input { background-image: linear-gradient(45deg, transparent 50%, var(--pp-text-muted) 50%), linear-gradient(135deg, var(--pp-text-muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.mi-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mi-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.mi-big-input { font-size: 1.7rem; font-weight: 700; text-align: center; min-height: 64px; font-family: 'Roboto Condensed', Roboto, sans-serif; }

/* Chips */
.mi-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mi-chip {
    min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--pp-border);
    background: var(--pp-surface); color: var(--pp-text); font-size: .86rem; font-weight: 500; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
}
.mi-chip.on { background: color-mix(in srgb, var(--pp-accent) 18%, transparent); border-color: var(--pp-accent); color: var(--pp-text); font-weight: 700; }
.mi-chip .bi-x { font-size: .8rem; opacity: .7; }
.mi-seg { display: flex; background: var(--pp-surface-2); border-radius: 13px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.mi-seg button { flex: 1; min-height: 38px; border: none; border-radius: 10px; background: transparent; color: var(--pp-text-muted); font-weight: 600; font-size: .85rem; cursor: pointer; }
.mi-seg button.on { background: var(--pp-solid); color: var(--pp-text); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }

/* ── Inicio ── */
.mi-hello { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.mi-avatar { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-family: 'Roboto Condensed', sans-serif; font-weight: 700; font-size: 1.4rem; background: linear-gradient(135deg, var(--cima-navy), var(--cima-teal)); color: #fff; flex-shrink: 0; }
.mi-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.mi-stat { background: var(--pp-surface); border: 1px solid var(--pp-border); border-radius: 16px; padding: 12px 10px; text-align: left; cursor: pointer; min-width: 0; box-shadow: var(--pp-shadow); }
.mi-stat .bi { color: var(--pp-accent); font-size: 1.05rem; }
.mi-stat-v { font-family: 'Roboto Condensed', sans-serif; font-weight: 700; font-size: 1.25rem; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-stat-u { font-size: .68rem; color: var(--pp-text-muted); }
.mi-stat-l { font-size: .72rem; color: var(--pp-text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mi-quick .mi-btn { min-height: 56px; justify-content: flex-start; padding: 0 14px; }
.mi-quick .mi-btn .bi { color: var(--pp-accent); font-size: 1.2rem; }

/* Dosis del día */
.mi-dose { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--pp-border); }
.mi-dose:first-child { border-top: none; padding-top: 2px; }
.mi-dose-time { font-family: 'Roboto Condensed', sans-serif; font-weight: 700; font-size: 1rem; min-width: 70px; }
.mi-dose.is-done .mi-dose-time, .mi-dose.is-done .mi-dose-name { opacity: .5; text-decoration: line-through; }
.mi-dose-name { font-weight: 600; font-size: .95rem; }
.mi-check { width: 44px; height: 44px; border-radius: 14px; border: 1.5px solid var(--pp-border); background: transparent; color: var(--pp-text-muted); display: grid; place-items: center; font-size: 1.2rem; cursor: pointer; flex-shrink: 0; }
.mi-check.on { background: var(--pp-success); border-color: var(--pp-success); color: #fff; }

/* Listas */
.mi-item { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--pp-surface); border: 1px solid var(--pp-border); margin-bottom: 10px; cursor: pointer; box-shadow: var(--pp-shadow); }
.mi-item-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--pp-accent) 16%, transparent); color: var(--pp-accent); font-size: 1.15rem; flex-shrink: 0; }
.mi-item-t { font-weight: 700; font-size: .98rem; }
.mi-item-s { font-size: .8rem; color: var(--pp-text-muted); margin-top: 2px; }
.mi-pill { font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--pp-surface-2); color: var(--pp-text-muted); white-space: nowrap; }
.mi-pill.on { background: color-mix(in srgb, var(--pp-success) 18%, transparent); color: var(--pp-success); }

/* Horarios de medicina */
.mi-times { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mi-time-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 12px; background: var(--pp-surface-2); border: 1px solid var(--pp-border); }
.mi-time-chip input { border: none; background: transparent; color: var(--pp-text); font-size: 1rem; width: 110px; min-height: 36px; outline: none; }

/* ── Tabla e historial ── */
.mi-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.mi-table th { text-align: left; font-size: .72rem; font-weight: 600; color: var(--pp-text-muted); padding: 6px 6px 8px; border-bottom: 1px solid var(--pp-border); }
.mi-table td { padding: 10px 6px; border-bottom: 1px solid var(--pp-border); vertical-align: middle; }
.mi-table td.num { font-family: 'Roboto Condensed', sans-serif; font-weight: 700; font-size: 1rem; white-space: nowrap; }
.mi-table tr:last-child td { border-bottom: none; }
.mi-avg { display: flex; gap: 10px; margin-bottom: 12px; }
.mi-avg > div { flex: 1; background: var(--pp-surface-2); border-radius: 14px; padding: 10px 12px; }
.mi-avg-v { font-family: 'Roboto Condensed', sans-serif; font-size: 1.3rem; font-weight: 700; }
.mi-avg-l { font-size: .72rem; color: var(--pp-text-muted); }

/* Gráfica (SVG) */
.mi-chart { width: 100%; height: 170px; display: block; }
.mi-chart .ax { stroke: var(--pp-border); stroke-width: 1; }
.mi-chart .grid { stroke: var(--pp-border); stroke-width: 1; stroke-dasharray: 3 4; }
.mi-chart .lbl { fill: var(--pp-text-muted); font-size: 10px; font-family: Roboto, sans-serif; }
.mi-chart .l1 { stroke: var(--pp-accent); stroke-width: 2.4; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.mi-chart .l2 { stroke: var(--pp-line-2); stroke-width: 2.4; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.mi-chart .d1 { fill: var(--pp-accent); }
.mi-chart .d2 { fill: var(--pp-line-2); }
.mi-legend { display: flex; gap: 14px; font-size: .74rem; color: var(--pp-text-muted); margin-top: 6px; }
.mi-legend span::before { content: ''; display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--pp-accent); }
.mi-legend span.s2::before { background: var(--pp-line-2); }

/* ── Medición guiada de tensión ── */
.mi-steps { display: flex; gap: 6px; margin-bottom: 16px; }
.mi-steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--pp-surface-2); }
.mi-steps i.on { background: var(--pp-accent); }
.mi-tips { margin: 0; padding: 0; list-style: none; }
.mi-tips li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; font-size: .92rem; line-height: 1.4; }
.mi-tips li .bi { color: var(--pp-accent); font-size: 1.1rem; margin-top: 1px; flex-shrink: 0; }
.mi-ring { width: 150px; height: 150px; margin: 10px auto 6px; position: relative; }
.mi-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mi-ring circle { fill: none; stroke-width: 10; }
.mi-ring .bg { stroke: var(--pp-surface-2); }
.mi-ring .fg { stroke: var(--pp-accent); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.mi-ring-n { position: absolute; inset: 0; display: grid; place-items: center; font-family: 'Roboto Condensed', sans-serif; font-size: 2.4rem; font-weight: 700; }
.mi-result { text-align: center; padding: 6px 0 4px; }
.mi-result-v { font-family: 'Roboto Condensed', sans-serif; font-size: 2.8rem; font-weight: 700; line-height: 1; }
.mi-result-u { font-size: .9rem; color: var(--pp-text-muted); margin-top: 4px; }

/* ── Hoja inferior (modal propio, nunca alert/confirm) ── */
.mi-sheet-wrap { position: absolute; inset: 0; z-index: 20; display: flex; align-items: flex-end; background: rgba(2, 10, 22, .5); animation: mi-fade .2s ease both; }
.mi-sheet {
    width: 100%; max-height: 92%; overflow-y: auto; background: var(--pp-solid); color: var(--pp-text);
    border-radius: 24px 24px 0 0; padding: 8px 18px calc(22px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .3); animation: mi-up .28s cubic-bezier(.2, .8, .2, 1) both;
}
.mi-sheet-grip { width: 40px; height: 5px; border-radius: 4px; background: var(--pp-border); margin: 4px auto 10px; }
.mi-sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.mi-sheet-head h3 { margin: 0; flex: 1; font-family: 'Roboto Condensed', sans-serif; font-size: 1.25rem; }
@keyframes mi-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mi-up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }

/* Popover de información (ℹ︎) */
.mi-info { display: inline-flex; width: 28px; height: 28px; border: none; border-radius: 50%; background: transparent; color: var(--pp-text-muted); align-items: center; justify-content: center; cursor: pointer; font-size: .95rem; vertical-align: middle; }

/* ── Aviso flotante ── */
.mi-toast {
    position: absolute; left: 50%; bottom: calc(var(--ppd-h) + 52px + env(safe-area-inset-bottom, 0px)); z-index: 40;
    transform: translateX(-50%); background: var(--pp-text); color: var(--pp-bg); padding: 11px 18px; border-radius: 14px;
    font-size: .88rem; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); max-width: calc(100% - 40px); text-align: center;
    animation: mi-up .25s ease both;
}

/* Banner de instalar */
.mi-install { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; margin-bottom: 14px; background: linear-gradient(135deg, var(--cima-navy), #0A5AA8); color: #fff; }
.mi-install img { width: 40px; height: 40px; border-radius: 10px; background: #fff; padding: 4px; flex-shrink: 0; }
.mi-install b { display: block; font-size: .95rem; }
.mi-install span { font-size: .78rem; opacity: .85; }
.mi-install .mi-btn { background: var(--cima-teal); border-color: var(--cima-teal); color: #fff; min-height: 38px; padding: 0 14px; font-size: .85rem; flex-shrink: 0; }

/* ── Dock glossy (calcado del portal del paciente) ── */
.ppd-dock {
    position: absolute; z-index: 5; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    height: var(--ppd-h); max-width: 480px; margin: 0 auto; --ppd-item: var(--pp-accent);
    --ppd-tint: color-mix(in srgb, var(--pp-dock-bar) 55%, transparent);
    --ppd-gloss: color-mix(in srgb, white 22%, transparent);
    --ppd-edge-top: color-mix(in srgb, white 45%, transparent);
    --ppd-edge: color-mix(in srgb, white 16%, transparent);
    --ppd-drop: color-mix(in srgb, black 35%, transparent);
}
html[data-pp-scheme="light"] .ppd-dock {
    --ppd-tint: color-mix(in srgb, var(--pp-dock-bar) 62%, transparent);
    --ppd-gloss: color-mix(in srgb, white 60%, transparent);
    --ppd-edge-top: color-mix(in srgb, white 90%, transparent);
    --ppd-edge: color-mix(in srgb, black 9%, transparent);
    --ppd-drop: color-mix(in srgb, black 16%, transparent);
}
.ppd-glass { position: absolute; inset: -40px 0 0 0; pointer-events: none; }
.ppd-bar, .ppd-bump { background: var(--ppd-tint); -webkit-backdrop-filter: blur(44px) saturate(180%); backdrop-filter: blur(44px) saturate(180%); }
.ppd-bar { position: absolute; left: 0; right: 0; bottom: 0; height: var(--ppd-h); border-radius: 24px; box-shadow: inset 0 1px 0 var(--ppd-edge-top), inset 0 0 0 1px var(--ppd-edge), 0 10px 30px var(--ppd-drop); }
.ppd-bump { position: absolute; bottom: calc(var(--ppd-h) - 42px); left: 0; width: 66px; height: 66px; border-radius: 50%; clip-path: inset(0 0 40px 0); box-shadow: inset 0 1px 0 var(--ppd-edge-top), inset 0 0 0 1px var(--ppd-edge); transform: translateX(var(--x, 0px)); transition: transform .55s cubic-bezier(.5, 1.6, .4, 1); }
.ppd-bar::before, .ppd-bump::before { content: ""; position: absolute; left: 0; right: 0; top: 0; border-radius: inherit; pointer-events: none; }
.ppd-bar::before { height: 50%; background: linear-gradient(180deg, var(--ppd-gloss), transparent); }
.ppd-bump::before { bottom: 0; background: var(--ppd-gloss); }
.ppd-orb {
    position: absolute; top: -22px; left: 0; width: 48px; height: 48px; border-radius: 16px; background: var(--ppd-item); color: #fff;
    display: grid; place-items: center; transform: translateX(var(--xo, 0px)); pointer-events: none;
    transition: transform .55s cubic-bezier(.5, 1.6, .4, 1); box-shadow: 0 6px 22px color-mix(in srgb, var(--ppd-item) 55%, transparent);
}
.ppd-orb .bi { font-size: 23px; }
.ppd-items { position: absolute; inset: 0; display: flex; z-index: 2; }
.ppd-item { flex: 1; min-width: 0; border: 0; background: none; color: var(--pp-text-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; padding: 0 0 4px; -webkit-appearance: none; }
.ppd-item .bi { font-size: 21px; transition: opacity .25s, transform .35s; }
.ppd-item .ppd-lbl { font-size: 9.5px; font-weight: 600; line-height: 1; white-space: nowrap; transition: opacity .2s; }
.ppd-item.on .bi { opacity: 0; transform: translateY(-10px); }
.ppd-item.on .ppd-lbl { opacity: 0; }
.ppd-noanim .ppd-bump, .ppd-noanim .ppd-orb { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
    .mi-view, .mi-sheet, .mi-sheet-wrap, .mi-toast { animation: none; }
    .ppd-bump, .ppd-orb, .mi-ring .fg { transition: none; }
}
@media (min-width: 560px) { #pp-card { box-shadow: 0 0 60px rgba(0, 0, 0, .25); } }
