/* SEKCJA 1 — żywy telefon w hero: cztery klikalne zakładki na dole ekranu, widoki zmieniają się płynnie. */

.hp { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 680px; padding: 28px 0 32px; }
.hp-label { position: relative; z-index: 3; margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #FFFDF8; box-shadow: 0 6px 18px -10px rgba(43,35,32,.4); font: 500 13px/1 var(--font-text); color: #2B2320; }
.hp-label__dot { width: 8px; height: 8px; border-radius: 50%; background: #C0705A; animation: hp-ping 1.6s ease-out infinite; }
@keyframes hp-ping { 0% { box-shadow: 0 0 0 0 rgba(192,112,90,.6); } 100% { box-shadow: 0 0 0 10px rgba(192,112,90,0); } }

.hp-phone { flex: none; width: 296px; height: 604px; z-index: 1; transition: transform .5s ease; }
.hp:hover .hp-phone { transform: translateY(-4px); }
.hp-screen { display: flex; flex-direction: column; font-family: Georgia, serif; color: #2B2320; }

.hp-status { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 12px 22px 0; height: 34px; font: 600 12px/1 var(--font-text); }
.hp-status span { display: flex; gap: 6px; align-items: center; }
.hp-status svg { height: 11px; width: auto; }

.hp-views { position: relative; flex: 1; overflow: hidden; }
.hp-view { position: absolute; inset: 0; padding: 18px 16px 10px; display: flex; flex-direction: column; gap: 10px; }
.hp-view[hidden] { display: none; }
.hp-view.is-in { animation: hp-in .45s cubic-bezier(.2,.8,.2,1); }
@keyframes hp-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }

/* Dziś */
#hp-dzis { align-items: center; text-align: center; }
.hp-hello { margin: 0; font: 500 12px/1 var(--font-text); color: #8A7E70; }
.hp-big { margin: 0; font-size: 25px; line-height: 1.15; }
.hp-streak { padding: 6px 12px; border-radius: 999px; background: #FBE9DF; font: 600 11px/1 var(--font-text); color: #A4553F; }
.hp-luni { width: 150px; height: 150px; cursor: pointer; }
.hp-mic { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: #C0705A; color: #fff; animation: hp-ping-big 2.2s ease-out infinite; }
.hp-mic svg { width: 28px; height: 28px; }
@keyframes hp-ping-big { 0% { box-shadow: 0 0 0 0 rgba(192,112,90,.5); } 100% { box-shadow: 0 0 0 18px rgba(192,112,90,0); } }
.hp-small { margin: 0; font: 500 11.5px/1.3 var(--font-text); color: #8A7E70; text-align: center; }

/* Moja historia */
.hp-row-head { display: flex; align-items: baseline; justify-content: space-between; }
.hp-title { margin: 0; font-size: 21px; line-height: 1.2; }
.hp-count, .hp-kicker { margin: 0; font: 600 10.5px/1.3 var(--font-text); letter-spacing: .06em; text-transform: uppercase; color: #8A7E70; }
.hp-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.hp-dots i { aspect-ratio: 1; border-radius: 50%; background: var(--c, #EFE6D8); }
.hp-view.is-in .hp-dots i { animation: hp-pop .4s cubic-bezier(.3,1.6,.5,1) backwards; }
.hp-dots i:nth-child(n) { animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes hp-pop { from { transform: scale(0); } }
.hp-list { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.hp-entry { width: 100%; display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 9px; padding: 7px; border: 1px solid #E7DDCB; border-radius: 15px; background: #FFFDF8; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; }
.hp-entry:hover { transform: translateY(-2px); border-color: #C0705A; box-shadow: 0 8px 18px -10px rgba(43,35,32,.35); }
.hp-entry img { width: 46px; height: 46px; border-radius: 11px; object-fit: cover; }
.hp-entry b { display: block; font-size: 13px; line-height: 1.25; }
.hp-entry small { display: block; margin-top: 2px; font: 500 10px/1.2 var(--font-text); color: #8A7E70; }
.hp-entry i { font: 600 9.5px/1 var(--font-text); font-style: normal; padding: 5px 7px; border-radius: 999px; background: color-mix(in srgb, var(--m) 35%, #fff); }

/* Narrator */
.hp-trend { width: 100%; height: 70px; }
.hp-trend__line { stroke-dasharray: 300; stroke-dashoffset: 300; }
.hp-view.is-in .hp-trend__line, #hp-narrator:not([hidden]) .hp-trend__line { animation: hp-draw 1.2s .1s ease-out forwards; }
@keyframes hp-draw { to { stroke-dashoffset: 0; } }
.hp-narr { margin: 0; padding: 12px; border-radius: 16px; background: #FFFDF8; border: 1px solid #C9A96A; font-size: 13.5px; line-height: 1.55; font-style: italic; }
.hp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hp-chips span { padding: 6px 9px; border-radius: 999px; background: #F3EBDD; font: 500 11px/1 var(--font-text); }

/* Album */
.hp-view--book { background: #EFE3C8; color: #4A3B26; }
.hp-page { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 0; border-radius: 6px 14px 14px 6px; background: #FBF4E4; box-shadow: inset 8px 0 12px -10px rgba(74,59,38,.5), 0 6px 14px -8px rgba(74,59,38,.45); text-align: left; font: inherit; color: inherit; cursor: pointer; transform-origin: left center; }
.hp-page.is-turn { animation: hp-turn .55s ease; }
@keyframes hp-turn { 0% { transform: perspective(700px) rotateY(0); } 45% { transform: perspective(700px) rotateY(-80deg); opacity: .3; } 100% { transform: perspective(700px) rotateY(0); } }
.hp-page__meta { font: 600 10px/1.3 var(--font-text); letter-spacing: .1em; text-transform: uppercase; color: #A9772F; }
.hp-page__h { font-size: 19px; }
.hp-page__img { width: 100%; height: 150px; object-fit: cover; border: 6px solid #fff; border-bottom-width: 18px; transform: rotate(-1.2deg); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.hp-page__body { font-size: 13px; line-height: 1.5; }

/* wpis otwarty z listy */
.hp-detail { position: absolute; inset: 34px 0 0; z-index: 4; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 8px; background: #FBEEF2; transform: translateX(100%); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.hp-screen.is-detail .hp-detail { transform: none; }
.hp-back { align-self: flex-start; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #FFFDF8; font-size: 18px; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.hp-detail__img { width: 100%; height: 180px; border-radius: 16px; object-fit: cover; }
.hp-detail__meta { margin: 0; font: 600 10px/1.3 var(--font-text); letter-spacing: .12em; text-transform: uppercase; color: #9A6B7C; }
.hp-detail__title { margin: 0; font-size: 21px; }
.hp-detail__body { margin: 0; font-size: 13.5px; line-height: 1.6; }
.hp-detail__mood { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: #F5DDE5; font: 500 11px/1 var(--font-text); color: #9A6B7C; }

/* pasek zakładek */
.hp-tabs { position: relative; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 6px 10px; background: #FFFDF8; border-top: 1px solid #EFE6D8; }
.hp-tabs button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; border: 0; border-radius: 12px; background: none; font: 600 10px/1 var(--font-text); color: #8A7E70; cursor: pointer; transition: color .2s; }
.hp-tabs svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.hp-tabs button[aria-selected="true"] { color: #C0705A; }
.hp-tabs button[aria-selected="true"] svg { transform: translateY(-2px) scale(1.08); }
.hp-tabs button[aria-selected="true"]::before { content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: #C0705A; }
.hp-tabs button:focus-visible { outline: 2px solid #C0705A; outline-offset: -2px; }
.hp-tabs button.is-hinted { animation: hp-nudge .7s ease; }
@keyframes hp-nudge { 30% { transform: translateY(-4px); } 60% { transform: translateY(1px); } }

/* karteczka obok telefonu */
.hp-note { position: absolute; z-index: 2; bottom: 90px; right: 3%; width: 220px; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #FFFDF8; border: 1px solid #E7DDCB; border-radius: 18px; box-shadow: 0 18px 40px -18px rgba(43,35,32,.45); font: 500 12.5px/1.4 var(--font-text); animation: hp-bob 5s ease-in-out infinite; }
.hp-note__head { display: flex; justify-content: space-between; align-items: center; }
.hp-note__done { padding: 4px 9px; border-radius: 999px; background: #E3EEDF; color: #3F6B48; font-size: 11px; opacity: 0; transition: opacity .3s; }
.hp-note__line { margin: 0; display: flex; gap: 8px; align-items: center; opacity: .25; transform: translateX(-6px); transition: opacity .35s, transform .35s; }
.hp-note__line i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #C0705A; color: #fff; font-size: 10px; font-style: normal; }
.hp-note[data-step="1"] .hp-note__line:nth-of-type(1),
.hp-note[data-step="2"] .hp-note__line:nth-of-type(-n+2),
.hp-note[data-step="3"] .hp-note__line,
.hp-note[data-step="4"] .hp-note__line { opacity: 1; transform: none; }
.hp-note[data-step="4"] .hp-note__done { opacity: 1; }
@keyframes hp-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (max-width: 1023px) { .hp { min-height: 0; flex: none; height: auto; } }
@media (max-width: 639px) {
  .hp { padding: 18px 0 24px; }
  .hp-phone { width: 284px; height: 584px; }
  .hp-note { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hp-label__dot, .hp-mic, .hp-view.is-in, .hp-view.is-in .hp-dots i, .hp-page.is-turn, .hp-note, .hp-tabs button.is-hinted { animation: none; }
  .hp-trend__line { stroke-dashoffset: 0; animation: none !important; }
  .hp-detail { transition: none; }
}
