/* instaPhoto (instaphoto.ql) — profil na laptopie. Wspólne dla scen z serii Kamili Borg, logika w js/instaphoto.js */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
    'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  background: #fff; color: #111; font-size: 14px; line-height: 1.4;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* --- Pasek boczny --- */
.ip-side {
  position: fixed; top: 0; left: 0; bottom: 0; width: 240px; padding: 26px 12px 20px;
  border-right: 1px solid #dbdbdb; background: #fff; display: flex; flex-direction: column; gap: 4px; z-index: 5;
}
.ip-logo {
  font-size: 27px; font-weight: 800; font-style: italic; letter-spacing: -.5px; padding: 0 12px 26px;
  background: linear-gradient(90deg, #f9a03f 0%, #e1306c 45%, #833ab4 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ip-nav { display: flex; align-items: center; gap: 16px; padding: 12px; border-radius: 8px; font-size: 16px; }
.ip-nav:hover { background: #f2f2f2; }
.ip-nav i { font-size: 24px; width: 26px; text-align: center; }
.ip-nav img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.ip-nav.on { font-weight: 700; }
.ip-side .push { margin-top: auto; }

/* --- Profil --- */
.ip-main { margin-left: 240px; padding: 34px 40px 60px; }
.ip-profile { max-width: 935px; margin: 0 auto; display: flex; align-items: center; gap: 70px; padding: 0 40px 40px; }
.ip-avatar-ring {
  flex: none; width: 160px; height: 160px; border-radius: 50%; padding: 4px;
  background: conic-gradient(from 200deg, #f9a03f, #e1306c, #833ab4, #f9a03f);
}
.ip-avatar-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid #fff; display: block; }
.ip-name { font-size: 40px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.ip-buttons { display: flex; gap: 8px; margin-top: 20px; }
.ip-btn { height: 34px; padding: 0 18px; border-radius: 8px; background: #efefef; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.ip-btn:hover { background: #dbdbdb; }
.ip-btn.follow { background: #0095f6; color: #fff; }
.ip-btn.follow:hover { background: #1877f2; }

.ip-tabs { max-width: 935px; margin: 0 auto; border-top: 1px solid #dbdbdb; display: flex; justify-content: center; gap: 60px; }
.ip-tabs span { padding: 16px 0; font-size: 12px; font-weight: 600; letter-spacing: 1px; color: #737373; display: flex; gap: 6px; align-items: center; }
.ip-tabs span.on { color: #111; border-top: 1px solid #111; margin-top: -1px; }

.ip-grid { max-width: 935px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ip-cell { position: relative; aspect-ratio: 1; background: #efefef; overflow: hidden; cursor: pointer; }
.ip-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ip-cell i { position: absolute; top: 10px; right: 10px; color: #fff; font-size: 20px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }

/* --- Otwarty wpis (okienko na profilu) --- */
.ip-modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; }
.ip-modal[hidden] { display: none; }
.ip-close { position: absolute; top: 14px; right: 20px; color: #fff; font-size: 28px; }
.ip-card { display: flex; background: #fff; border-radius: 4px; overflow: hidden; height: min(88vh, 820px); max-width: calc(100vw - 120px); }
.ip-media { position: relative; height: 100%; aspect-ratio: 1; background: #000; overflow: hidden; flex: none; max-width: calc(100vw - 120px - 380px); }
.ip-track { display: flex; height: 100%; transition: transform .3s ease; }
.ip-slide { position: relative; flex: 0 0 100%; height: 100%; }
.ip-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; display: block; user-select: none; }
.ip-slide .frame { visibility: hidden; }
.ip-slide .frame.on { visibility: visible; }
.ip-arrow {
  position: absolute; top: 50%; width: 32px; height: 32px; margin-top: -16px; border-radius: 50%;
  background: rgba(255,255,255,.85); color: #111; font-size: 16px; display: grid; place-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.ip-arrow.prev { left: 12px; }
.ip-arrow.next { right: 12px; }
.ip-arrow[hidden] { display: none; }
.ip-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 5px; }
.ip-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); }
.ip-dots i.on { background: #fff; }
.ip-reel-play { position: absolute; left: 50%; top: 50%; width: 80px; height: 80px; margin: -40px 0 0 -40px; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff; display: grid; place-items: center; font-size: 40px; }

.ip-panel { width: 380px; flex: none; display: flex; flex-direction: column; border-left: 1px solid #efefef; }
.ip-panel-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #efefef; }
.ip-panel-head img, .ip-c img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.ip-panel-head b { font-size: 14px; }
.ip-panel-head .dot { color: #737373; }
.ip-panel-head .follow-link { color: #0095f6; font-weight: 600; }
.ip-panel-head .more { margin-left: auto; font-size: 18px; }
.ip-comments { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 16px; }
.ip-c { display: flex; gap: 12px; align-items: flex-start; }
.ip-c-body { flex: 1; min-width: 0; }
.ip-c-text { white-space: pre-line; word-wrap: break-word; font-size: 15px; }
.ip-c-text b { margin-right: 5px; }
.ip-c-meta { margin-top: 6px; font-size: 12px; color: #737373; display: flex; gap: 14px; font-weight: 600; }
.ip-c-meta span:first-child { font-weight: 400; }
.ip-replies { margin: 14px 0 0 0; display: flex; flex-direction: column; gap: 14px; }
.ip-c.new { animation: ip-in .4s ease; }
@keyframes ip-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ip-empty { color: #737373; text-align: center; margin: auto 0; font-size: 15px; }

.ip-panel-foot { border-top: 1px solid #efefef; padding: 8px 16px 0; }
.ip-actions { display: flex; align-items: center; gap: 16px; font-size: 24px; padding: 4px 0 6px; }
.ip-actions .save { margin-left: auto; }
.ip-like.on i { color: #ed4956; }
.ip-likes { font-weight: 700; }
.ip-time { font-size: 11px; color: #737373; text-transform: uppercase; letter-spacing: .3px; padding: 4px 0 12px; }

.ip-write { display: block; width: calc(100% + 32px); margin: 0 -16px; padding: 14px 16px; border-top: 1px solid #efefef; text-align: left; color: #737373; font-size: 15px; }
.ip-write:hover { background: #fafafa; }
.ip-write[hidden] { display: none; }
.ip-write i { margin-right: 8px; }
.ip-box { margin: 0 -16px; padding: 10px 16px 12px; border-top: 1px solid #efefef; }
.ip-box[hidden] { display: none; }
.ip-box-who { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.ip-box-who img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.ip-box-row { display: flex; align-items: center; gap: 10px; }
.ip-box-row i { font-size: 22px; color: #111; }
.ip-box-row input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 15px; padding: 6px 0; background: transparent; }
.ip-box-row .pub { color: #0095f6; font-weight: 700; opacity: .4; }
.ip-box-row .pub.ready { opacity: 1; }
