/* Hikayeler (/home): own-story button, photo picker and viewer overlay. Strip itself lives in pixelia-modern.css (.hst-*). */
button.hst-btn { display: block; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; font: inherit; }
button.hst-btn .hst-ring { display: block; }
.hst-item.hst-own { position: relative; }
.hst-item button.hst-plus { cursor: pointer; padding: 0; position: absolute; top: 48px; left: calc(50% + 10px); }
.hst-ring.has-ring { background: conic-gradient(from 210deg, var(--px-pink), var(--px-yellow), var(--px-btn-blue), var(--px-purple), var(--px-pink)); }
.st-lock { overflow: hidden; }

.st-modal { position: fixed; inset: 0; z-index: 9100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(24, 39, 60, .8); }
.st-modal[hidden], .st-view[hidden] { display: none; }
.st-box { position: relative; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 22px; border-radius: 16px; background: #fff; color: var(--px-ink); box-sizing: border-box; }
.st-box h3 { margin: 0 0 4px; font-size: 20px; }
.st-sub { margin: 0 0 14px; color: #6b7b92; font-size: 14px; }
.st-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: #6b7b92; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-bottom: 14px; }
.st-pick { padding: 0; border: 3px solid transparent; border-radius: 10px; overflow: hidden; background: #e4edf9; cursor: pointer; aspect-ratio: 4 / 3; }
.st-pick img { display: block; width: 100%; height: 100%; object-fit: cover; }
.st-pick.is-sel { border-color: var(--px-btn-blue); }
.st-cap { width: 100%; box-sizing: border-box; margin-bottom: 10px; padding: 10px 12px; border: 1px solid #cfdcf0; border-radius: 10px; font: inherit; }
.st-err { margin: 0 0 10px; color: #d23; font-size: 13px; }
.st-send[disabled] { opacity: .5; cursor: not-allowed; }

/* viewer: phone-sized card like Leet's (430px wide, full screen on phones) */
.st-view { position: fixed; inset: 0; z-index: 10020; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .9); }
.st-card { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; max-width: 430px; overflow: hidden; background: #111; box-shadow: 0 22px 70px rgba(0, 0, 0, .65); user-select: none; }
@media (min-width: 640px) { .st-view { padding: 16px; } .st-card { height: min(760px, calc(100vh - 32px)); border-radius: 16px; } }
.st-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.st-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0, 0, 0, .6), transparent 40%, rgba(0, 0, 0, .55)); }
.st-head { position: absolute; inset: 0 0 auto 0; z-index: 30; padding: 12px; }
.st-bars { display: flex; gap: 4px; }
.st-bars > div { flex: 1; height: 3px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .3); }
.st-bars > div > div { height: 100%; border-radius: 999px; background: #fff; }
.st-top { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.st-user { display: flex; align-items: center; gap: 8px; min-width: 0; color: #fff; text-decoration: none; }
.st-av { display: flex; flex: none; align-items: center; justify-content: center; width: 34px; height: 34px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .6); border-radius: 50%; background: rgba(255, 255, 255, .15); }
.st-av img { max-width: none; transform: translateY(9px) scale(.9); image-rendering: pixelated; }
.st-user strong { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.st-ago { font-size: 10px; font-weight: 500; color: rgba(255, 255, 255, .65); }
.st-acts { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.st-ib { display: flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 6px; border: 0; border-radius: 999px; background: none; color: #fff; font-size: 13px; line-height: 1; cursor: pointer; }
.st-ib:hover { background: rgba(255, 255, 255, .15); }
.st-ib[hidden] { display: none; }
.st-ib[data-story-close] { font-size: 26px; }
.st-zone { position: absolute; top: 72px; bottom: 58px; z-index: 20; padding: 0; border: 0; background: transparent; }
.st-prev { left: 0; width: 42%; cursor: w-resize; }
.st-next { right: 0; width: 58%; cursor: e-resize; }
.st-text { position: absolute; bottom: 74px; left: 50%; z-index: 25; transform: translateX(-50%); max-width: 88%; margin: 0; padding: 8px 14px; border-radius: 12px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 14px; text-align: center; pointer-events: none; }
.st-text[hidden] { display: none; }
.st-foot { position: absolute; inset: auto 0 0 0; z-index: 30; display: flex; align-items: center; gap: 8px; height: 58px; padding: 0 12px; box-sizing: border-box; }
.st-likes { display: flex; flex: 1; align-items: center; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; background: rgba(0, 0, 0, .2); color: rgba(255, 255, 255, .8); font-size: 11px; font-weight: 500; backdrop-filter: blur(4px); box-sizing: border-box; }
.st-heart { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%; background: rgba(0, 0, 0, .2); color: #fff; cursor: pointer; transition: transform .1s; }
.st-heart:active { transform: scale(.9); }
.st-heart.is-liked { border-color: #ff4d6d; background: rgba(255, 77, 109, .25); color: #ff4d6d; }
.st-heart.is-liked svg { fill: currentColor; }

/* viewed: ring turns plain grey (unseen ones are moved to the front by stories.js) */
.hst-item.is-seen .hst-ring { background: #d9e3f1; }

/* ---- real story system (2026-11-18): composer tabs/upload, caption, owner view list ---- */
.st-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.st-tab { padding: 7px 14px; border: 0; border-radius: 999px; background: #eef3fb; color: #4a5a74; font: 600 13px/1 Ubuntu, sans-serif; cursor: pointer; }
.st-tab.is-on { background: var(--px-btn-blue); color: #fff; }
.st-pane[hidden] { display: none; }
.st-drop { display: block; margin-bottom: 12px; padding: 26px 14px; border: 2px dashed #cfdcf0; border-radius: 14px; background: #f6f9fe; color: #6b7b92; text-align: center; font-size: 14px; cursor: pointer; }
.st-drop:hover { border-color: var(--px-btn-blue); }
.st-preview { display: block; max-width: 100%; max-height: 220px; margin: 0 auto 12px; border-radius: 12px; }
.st-preview[hidden], .st-err[hidden] { display: none; }
.hst-btn .hst-plus { pointer-events: none; }
.st-viewers { position: absolute; inset: auto 0 0 0; z-index: 40; max-height: 60%; display: flex; flex-direction: column; border-radius: 18px 18px 0 0; background: #fff; color: var(--px-ink); box-shadow: 0 -14px 30px -16px rgba(0, 0, 0, .6); }
.st-viewers[hidden] { display: none; }
.st-viewers-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 6px 18px; }
.st-viewers-head .st-ib { color: #6b7b92; }
.st-viewers-list { margin: 0; padding: 0 14px 14px; list-style: none; overflow: auto; }
.st-viewers-list li { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.st-viewers-list img { width: 36px; height: 36px; border-radius: 50%; background: #e4edf9; object-fit: cover; object-position: center 20%; image-rendering: pixelated; }
.st-viewers-list b { flex: 1; font-size: 14px; }
.st-viewers-list span { color: #8a98ad; font-size: 12px; }
.st-viewers-empty { color: #6b7b92; font-size: 14px; }
.st-text { pointer-events: none; }
.st-ib { gap: 6px; }
.st-ib svg { display: block; flex: none; }
#stViewersBtn { padding: 0 10px; font-weight: 700; }
#stDel:hover { color: #ff6b81; }

/* "+" badge on the own story: drawn icon instead of a text glyph (colour stays the original flat blue from pixelia-modern.css) */
.hst-plus { padding: 0; line-height: 0; }
.hst-plus svg { display: block; }

/* viewer: spinner while the picture loads, note when it cannot be loaded */
.st-card.is-loading::after { content: ''; position: absolute; top: 50%; left: 50%; z-index: 20; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; animation: st-spin .8s linear infinite; }
.st-card.is-broken::after { content: 'Görsel yüklenemedi'; position: absolute; top: 50%; left: 0; right: 0; z-index: 20; text-align: center; color: rgba(255, 255, 255, .7); font-size: 13px; }
@keyframes st-spin { to { transform: rotate(360deg); } }
