/* ============================================================
   LoKa home — the stories row's states, the story viewer and the
   "Share a story" dialog (js/loka/home/stories.js). The circles
   themselves are .lkhf-story / .lkhf-ring in feed.css.
   ============================================================ */

/* The authors sit in the row's flex line. */
.lk-home .lkhs-authors { display: contents; }

/* A real photo in a circle. */
.lk-home .lkhf-ring .lkhs-photo,
.lk-home .lkhs-viewer .lk-face .lkhs-photo { display: block; width: 100%; height: 100%; padding: 0; border-radius: 50%; object-fit: cover; }

/* Not seen: the bright ring (feed.css); seen: a quiet one. */
.lk-home .lkhf-story.is-seen .lkhf-ring { border-color: rgba(160, 182, 176, .55); box-shadow: none; }
/* "Your story" with stories live: the ring shows, the ＋ still says you can add. */
.lk-home .lkhf-story.is-you:not(.has-story) .lkhf-ring { border-style: dashed; border-color: rgba(160, 182, 176, .7); box-shadow: none; }

/* The site's base styles show <dialog> even when closed (as feed.css notes for its own). */
.lk-home .lkhs-viewer:not([open]),
.lk-home .lkhs-compose:not([open]) { display: none; }

/* ---------- The viewer ---------- */
.lk-home .lkhs-viewer {
  width: min(440px, 100vw);
  max-width: none;
  height: min(820px, 100vh);
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #050b0a;
  color: #fff;
}
.lk-home .lkhs-viewer::backdrop { background: rgba(3, 8, 7, .86); backdrop-filter: blur(6px); }
.lk-home .lkhs-stage { position: relative; display: flex; flex-direction: column; height: 100%; }
.lk-home .lkhs-bars { position: absolute; top: 10px; left: 12px; right: 12px; z-index: 4; display: flex; gap: 4px; }
.lk-home .lkhs-bars i { flex: 1; height: 3px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .3); }
.lk-home .lkhs-bars b { display: block; width: 0; height: 100%; background: #fff; }
.lk-home .lkhs-viewer header {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: linear-gradient(rgba(0, 0, 0, .45), transparent);
}
.lk-home .lkhs-viewer header .lk-face { flex: none; width: 36px; height: 36px; overflow: hidden; font-size: 12px; }
.lk-home .lkhs-viewer header p { display: grid; flex: 1; min-width: 0; margin: 0; line-height: 1.25; }
.lk-home .lkhs-viewer header strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.lk-home .lkhs-viewer header small { color: rgba(255, 255, 255, .72); font-size: 11px; }
.lk-home .lkhs-x { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .35); color: #fff; font-size: 22px; line-height: 1; }
.lk-home .lkhs-media { display: grid; flex: 1; place-items: center; min-height: 0; background: #000; }
.lk-home .lkhs-media img,
.lk-home .lkhs-media video { width: 100%; height: 100%; object-fit: contain; }
/* Tap left / right for previous / next. */
.lk-home .lkhs-nav { position: absolute; top: 70px; bottom: 120px; z-index: 3; width: 38%; border: 0; background: transparent; cursor: pointer; }
.lk-home .lkhs-nav.is-prev { left: 0; }
.lk-home .lkhs-nav.is-next { right: 0; }
.lk-home .lkhs-nav:focus-visible { outline: 2px solid rgba(255, 255, 255, .6); outline-offset: -4px; }
.lk-home .lkhs-viewer footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: grid;
  gap: 8px;
  padding: 40px 14px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7));
}
.lk-home .lkhs-viewer footer p { margin: 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.lk-home .lkhs-viewer footer p:empty { display: none; }
.lk-home .lkhs-tag { justify-self: start; padding: 7px 12px; border-radius: 999px; background: #62e7ca; color: #07140f; font-size: 12px; font-weight: 800; text-decoration: none; }
.lk-home .lkhs-viewer footer > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lk-home .lkhs-viewer footer > div small { margin-right: auto; color: rgba(255, 255, 255, .8); font-size: 12px; }
.lk-home .lkhs-viewer footer button { padding: 7px 12px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; background: rgba(0, 0, 0, .3); color: #fff; font-size: 12px; font-weight: 700; }
.lk-home .lkhs-viewer footer > div button:last-child { margin-left: auto; }
.lk-home .lkhs-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.lk-home .lkhs-reasons button { background: rgba(255, 255, 255, .12); }

/* ---------- Share a story ---------- */
.lk-home .lkhs-compose {
  width: min(460px, calc(100vw - 28px));
  max-width: none;
  max-height: min(90vh, 760px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: #14221f;
  box-shadow: 0 35px 100px rgba(0, 0, 0, .3);
}
.lk-home .lkhs-compose::backdrop { background: rgba(10, 15, 14, .62); backdrop-filter: blur(8px); }
.lk-home .lkhs-compose form { display: grid; gap: 14px; padding: 18px 20px 20px; }
.lk-home .lkhs-compose header { display: flex; align-items: center; justify-content: space-between; }
.lk-home .lkhs-compose header strong { font-size: 18px; }
.lk-home .lkhs-compose .lkhs-x { background: #eef3f1; color: #14221f; }
.lk-home .lkhs-compose p { margin: 0; color: #55665f; font-size: 13px; }
.lk-home .lkhs-compose label { display: grid; gap: 6px; color: #495852; font-size: 12px; font-weight: 800; }
.lk-home .lkhs-compose textarea,
.lk-home .lkhs-compose select { width: 100%; padding: 10px 12px; border: 1px solid #c9d8d2; border-radius: 12px; background: #fff; color: #14221f; font: inherit; font-weight: 500; }
.lk-home .lkhs-pick { position: relative; justify-items: center; padding: 18px; border: 2px dashed #9fd9c9; border-radius: 16px; background: #f3fbf8; text-align: center; cursor: pointer; }
.lk-home .lkhs-pick > span { color: #087158; font-size: 14px; }
.lk-home .lkhs-pick small { color: #74867f; font-weight: 600; }
.lk-home .lkhs-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.lk-home .lkhs-pick:focus-within { outline: 2px solid #087158; outline-offset: 2px; }
.lk-home .lkhs-preview { overflow: hidden; border-radius: 14px; background: #000; }
.lk-home .lkhs-preview img,
.lk-home .lkhs-preview video { display: block; width: 100%; max-height: 280px; object-fit: contain; }
.lk-home .lkhs-compose footer { display: flex; justify-content: flex-end; gap: 10px; }
.lk-home .lkhs-compose footer button { padding: 10px 16px; border: 1px solid #c9d8d2; border-radius: 999px; background: #fff; color: #14221f; font-weight: 800; }
.lk-home .lkhs-compose footer button[type="submit"] { border-color: #62e7ca; background: #62e7ca; color: #07140f; }
.lk-home .lkhs-compose footer button:disabled { opacity: .55; cursor: wait; }

@media (max-width: 520px) {
  .lk-home .lkhs-viewer { width: 100vw; height: 100vh; border-radius: 0; }
}

/* ---------- Completed stories (2026-10-13): text stories, likes, viewers, pause, sound, several files ---------- */

/* A text story: the text on a colour (also the swatches and the compose preview). */
.lk-home .lkhs-text { display: grid; place-items: center; padding: 28px; color: #fff; font-size: 24px; font-weight: 800; line-height: 1.3; text-align: center; overflow-wrap: anywhere; }
.lk-home .lkhs-text.is-mint { background: linear-gradient(150deg, #0e8f73, #62e7ca); }
.lk-home .lkhs-text.is-pink { background: linear-gradient(150deg, #b8195a, #ff74ae); }
.lk-home .lkhs-text.is-violet { background: linear-gradient(150deg, #4a2a9a, #aa8cff); }
.lk-home .lkhs-text.is-gold { background: linear-gradient(150deg, #a6600c, #ffcf66); color: #241604; }
.lk-home .lkhs-text.is-night { background: linear-gradient(150deg, #050b0a, #1f3d4a); }
.lk-home .lkhs-media .lkhs-text { width: 100%; height: 100%; font-size: clamp(22px, 5vw, 32px); }

/* Header buttons: pause, sound. */
.lk-home .lkhs-icon { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .35); color: #fff; font-size: 13px; line-height: 1; }
.lk-home .lkhs-paused { position: absolute; top: 50%; left: 50%; z-index: 5; padding: 8px 14px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; transform: translate(-50%, -50%); pointer-events: none; }
.lk-home .lkhs-stage { touch-action: pan-y; user-select: none; -webkit-user-select: none; }

/* Like and "seen by". */
.lk-home .lkhs-viewer footer .lkhs-like { width: 40px; height: 40px; padding: 0; font-size: 19px; line-height: 1; }
.lk-home .lkhs-viewer footer .lkhs-like.is-on { border-color: #ff74ae; color: #ff74ae; }
.lk-home .lkhs-viewer footer .lkhs-seen { margin-right: auto; border-color: transparent; background: rgba(255, 255, 255, .12); }

/* The author's viewers list, over the story. */
.lk-home .lkhs-viewers { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; max-height: 70%; overflow: auto; padding: 14px; border-radius: 18px 18px 0 0; background: #fff; color: #14221f; }
.lk-home .lkhs-viewers > header { position: static; display: flex; align-items: center; justify-content: space-between; padding: 0 0 10px; background: none; }
.lk-home .lkhs-viewers .lkhs-x { background: #eef3f1; color: #14221f; }
.lk-home .lkhs-viewers ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.lk-home .lkhs-viewers li { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.lk-home .lkhs-viewers li .lk-face { grid-row: span 2; width: 36px; height: 36px; overflow: hidden; font-size: 12px; }
.lk-home .lkhs-viewers li strong { font-size: 14px; }
.lk-home .lkhs-viewers li small { color: #6f8582; font-size: 12px; }
.lk-home .lkhs-viewers p { margin: 0; color: #6f8582; }

/* Share dialog: Photo / video · Text, the colours, several files. */
.lk-home .lkhs-modes { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: #eef3f1; }
.lk-home .lkhs-modes button { flex: 1; padding: 8px 12px; border: 0; border-radius: 999px; background: transparent; color: #495852; font-weight: 800; }
.lk-home .lkhs-modes button.active { background: #fff; color: #087158; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.lk-home .lkhs-compose [data-for] { display: grid; gap: 14px; }
.lk-home .lkhs-compose [data-for][hidden] { display: none; }
.lk-home .lkhs-compose .lkhs-text[data-lkhs-text-preview] { min-height: 190px; border-radius: 16px; }
.lk-home .lkhs-compose .lkhs-text textarea { width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: center; resize: none; outline: 0; }
.lk-home .lkhs-compose .lkhs-text textarea::placeholder { color: inherit; opacity: .7; }
.lk-home .lkhs-colours { display: flex; gap: 10px; }
.lk-home .lkhs-colours .lkhs-text { flex: none; width: 34px; height: 34px; min-height: 0; padding: 0; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #c9d8d2; }
.lk-home .lkhs-colours button[aria-pressed="true"] { box-shadow: 0 0 0 3px #087158; }
.lk-home .lkhs-preview.is-many { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; padding: 6px; background: #f3fbf8; }
.lk-home .lkhs-preview.is-many img,
.lk-home .lkhs-preview.is-many video { height: 84px; border-radius: 8px; object-fit: cover; }
