.hero-search-block .search-error:empty { display: none; }

.hero-search-block .story-rail {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  width: max-content;
  max-width: min(640px, 100%);
  margin: 26px 0 0 8px;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

.hero-search-block .story-kicker {
  margin: 26px 0 0;
  flex: 0 0 auto;
}

.hero-search-block .story-row {
  --story-size: 92px;
  --story-gap: 16px;
  width: auto;
  max-width: 560px;
  padding-bottom: 0;
}

.hero-search-block .story-name {
  font-size: 0.7rem;
}

@media (max-width: 991.98px) {
  .hero-search-block .story-rail {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: none;
    margin: 0 0 16px;
    gap: 10px;
  }

  .hero-search-block .story-kicker { margin: 0; }

  .hero-search-block .story-row {
    --story-size: 76px;
    --story-gap: 12px;
    width: 100%;
    max-width: none;
  }

  .hero-search-block .story-ring {
    width: 68px;
    height: 68px;
  }
}

.story-rail {
  margin: 18px 2px 0;
}

.story-rail[hidden] { display: none !important; }

.story-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px 2px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}

.story-kicker i {
  display: inline-flex;
  font-size: 0.95rem;
  color: var(--gold);
}

.story-row {
  --story-size: 78px;
  --story-gap: 8px;
  display: flex;
  gap: var(--story-gap);
  width: 100%;
  max-width: calc(6 * var(--story-size) + 5 * var(--story-gap) + 4px);
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
}

.story-row.is-overflow { cursor: grab; }

.story-row.is-dragging,
.story-row.is-dragging .story-chip {
  cursor: grabbing;
  user-select: none;
}

.story-row::-webkit-scrollbar { display: none; }

.story-chip {
  flex: 0 0 var(--story-size, 78px);
  width: var(--story-size, 78px);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.story-chip:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
  border-radius: 18px;
}

.story-ring {
  width: 74px;
  height: 74px;
  margin: 0 auto;
  padding: 2.5px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(from 210deg, #f3e2b0, #e4c56a 18%, #c6a046 38%, #0b2f6b 72%, #143e86 88%, #f3e2b0);
  transition: transform 0.2s ease;
}

.story-chip:hover .story-ring { transform: scale(1.045); }

.story-chip.is-seen .story-ring { background: #d5dbe3; }

.story-chip.is-seen .story-face img,
.story-chip.is-seen .story-fallback {
  filter: grayscale(1);
  opacity: 0.78;
}

.story-face,
.story-who-face {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.04);
}

.story-face img,
.story-who-face img {
  width: 72%;
  height: 72%;
  max-width: none;
  object-fit: contain;
  border-radius: 0;
}

.story-fallback {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--navy);
}

.story-name {
  display: block;
  margin: 8px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: #1f2937;
}

.story-chip.is-seen .story-name { color: #9aa3b2; }

.story-viewer {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7, 10, 16, 0.88);
}

.story-viewer[hidden] { display: none !important; }

.story-viewer.is-draft { z-index: 260; }

.story-stage {
  position: relative;
  width: min(420px, 100%, calc(92vh * 9 / 16));
  aspect-ratio: 9 / 16;
  height: auto;
  border-radius: 22px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  touch-action: none;
}

.story-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}

.story-media.is-framed {
  inset: auto;
  object-fit: fill;
  max-width: none;
  transform-origin: center center;
}

.story-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  padding: 12px 12px 28px;
  background: linear-gradient(rgba(0, 0, 0, 0.55), transparent);
}

.story-bars {
  display: flex;
  gap: 4px;
}

.story-bar {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.story-bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left center;
}

.story-who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: #fff;
}

.story-who-face {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

.story-who-face .story-fallback { font-size: 0.68rem; }

.story-who-link {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.story-who-link strong {
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-who-link:hover strong,
.story-who-link:focus-visible strong {
  text-decoration: underline;
}

.story-who-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 999px;
}

.story-who-link[aria-disabled="true"] {
  cursor: default;
}

.story-who-link[aria-disabled="true"]:hover strong {
  text-decoration: none;
}

.story-who-time {
  flex: 0 0 auto;
  font-size: 0.78rem;
  opacity: 0.85;
}

.story-icon,
.story-sound {
  border: 0;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  cursor: pointer;
}

.story-icon {
  width: 36px;
  height: 36px;
  margin-left: auto;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.story-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.story-sound {
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
}

.story-icon:focus-visible,
.story-sound:focus-visible,
.story-cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.story-shade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: grid;
  gap: 12px;
  padding: 56px 16px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  color: #fff;
}

.story-caption {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
}

.story-caption:empty { display: none; }

.story-cta {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 10px 16px;
  background: #fff;
  color: #111827;
  font-weight: 700;
  text-decoration: none;
}

.story-cta[hidden] { display: none !important; }

.story-hit {
  position: absolute;
  top: 78px;
  bottom: 108px;
  z-index: 3;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.story-hit-prev { left: 0; width: 32%; }
.story-hit-next { right: 0; width: 68%; }

.story-hit i {
  position: absolute;
  top: 50%;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.95rem;
}

.story-hit-prev i { left: 10px; }
.story-hit-next i { right: 10px; }

.story-viewer.is-draft .story-hit i { display: none; }

.story-drop {
  position: relative;
  display: grid;
  min-height: 180px;
  border: 1.5px dashed #d5dbe6;
  border-radius: 18px;
  background: #f8fafc;
  cursor: pointer;
  overflow: hidden;
}

.story-drop-copy {
  display: grid;
  gap: 4px;
  place-items: center;
  align-content: center;
  padding: 22px;
  text-align: center;
  color: var(--muted);
}

.story-drop-copy i { font-size: 1.4rem; color: var(--navy); }
.story-drop-copy strong { color: var(--ink); }
.story-drop-copy em { font-style: normal; font-size: 0.84rem; }

.story-drop-preview {
  position: absolute;
  inset: 0;
  background: #111;
}

.story-drop-preview img,
.story-drop-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-drop[hidden] { display: none !important; }

.story-frame {
  display: grid;
  gap: 12px;
}

.story-frame[hidden] { display: none !important; }

.story-frame-stage {
  position: relative;
  width: min(260px, 100%);
  aspect-ratio: 9 / 16;
  height: auto;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 20px;
  background: #111;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  touch-action: none;
  cursor: grab;
}

.story-frame-stage.is-drag { cursor: grabbing; }

.story-frame-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.story-frame-stage video {
  position: absolute;
  z-index: 1;
  display: none;
  max-width: none;
  object-fit: fill;
  transform-origin: center center;
  pointer-events: none;
}

.story-frame.is-video .story-frame-stage video { display: block; }
.story-frame.is-video .story-frame-stage canvas { display: none; }

.story-frame.is-loading .story-frame-stage::after {
  content: "Hazırlanıyor";
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.84rem;
  background: rgba(0, 0, 0, 0.35);
}

.story-frame-grid,
.story-frame-ratio {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.story-frame-grid {
  inset: 0;
  background:
    linear-gradient(to right, transparent 33%, rgba(255, 255, 255, 0.42) 33%, rgba(255, 255, 255, 0.42) calc(33% + 1px), transparent calc(33% + 1px), transparent 66%, rgba(255, 255, 255, 0.42) 66%, rgba(255, 255, 255, 0.42) calc(66% + 1px), transparent calc(66% + 1px)),
    linear-gradient(to bottom, transparent 33%, rgba(255, 255, 255, 0.42) 33%, rgba(255, 255, 255, 0.42) calc(33% + 1px), transparent calc(33% + 1px), transparent 66%, rgba(255, 255, 255, 0.42) 66%, rgba(255, 255, 255, 0.42) calc(66% + 1px), transparent calc(66% + 1px));
}

.story-frame-ratio {
  top: 10px;
  left: 10px;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.story-frame-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.story-zoom-btn,
.story-reframe,
.story-replace {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.story-zoom-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #eef2f7;
  color: #111827;
}

.story-zoom-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

.story-frame-bar input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: #0b2f6b;
}

.story-reframe,
.story-replace {
  background: transparent;
  color: var(--navy, #0b2f6b);
  font-weight: 700;
}

.story-reframe { padding: 8px 4px; }
.story-replace { justify-self: start; padding: 0; }

.story-frame-note {
  margin: 0;
  color: var(--muted, #667085);
  font-size: 0.84rem;
  line-height: 1.45;
}

.story-frame-rotate { gap: 10px; }

.story-angle-read {
  flex: 0 0 48px;
  text-align: right;
  font-size: 0.84rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.story-trim {
  display: grid;
  gap: 8px;
}

.story-trim[hidden] { display: none !important; }

.story-trim-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted, #667085);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.story-trim-head strong {
  color: var(--ink, #111827);
  font-size: 0.88rem;
}

.story-trim-track {
  position: relative;
  height: 44px;
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 14px 100%,
    #151b28;
  touch-action: none;
  cursor: pointer;
}

.story-trim-marks,
.story-trim-range {
  position: absolute;
}

.story-trim-marks { inset: 0; }

.story-trim-marks i {
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(255, 255, 255, 0.35);
}

.story-trim-range {
  top: 6px;
  bottom: 6px;
  border: 1px solid #e8b84a;
  border-radius: 8px;
  background: rgba(232, 184, 74, 0.32);
  pointer-events: auto;
  cursor: grab;
}

.story-play {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
}

.story-play[hidden] { display: none !important; }

.story-play svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
  fill: currentColor;
}

.story-trim-play {
  position: absolute;
  z-index: 3;
  top: -18px;
  bottom: 0;
  width: 28px;
  margin-left: -14px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: ew-resize;
}

.story-trim-play::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 2px;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

.story-trim-play span {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  pointer-events: none;
}

.story-trim-handle {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 18px;
  height: 32px;
  margin: -16px 0 0 -9px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: ew-resize;
}

.story-trim-handle::before {
  content: "";
  display: block;
  width: 2px;
  height: 14px;
  margin: 9px auto;
  border-radius: 2px;
  background: #111;
}

.story-split {
  margin: 0;
  color: var(--muted, #667085);
  font-size: 0.82rem;
  line-height: 1.45;
}

.story-mine-title {
  margin: 22px 0 8px;
  font-size: 1.05rem;
}

#storySheet.drop-sheet {
  overflow: auto;
}

.story-modal {
  width: min(480px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.story-modal form {
  display: grid;
  gap: 10px;
}

.story-modal .story-drop { min-height: 160px; }

.story-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--dash-line, #e6ebf2);
  border-radius: 16px;
}

.story-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.story-table th,
.story-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef1f6;
  text-align: left;
  vertical-align: middle;
  font-size: 0.92rem;
}

.story-table th {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #667085);
}

.story-table tr:last-child td { border-bottom: 0; }

button.story-thumb {
  display: grid;
  width: 64px;
  height: 84px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  place-items: center;
  color: #fff;
  cursor: zoom-in;
  font: inherit;
}

.story-thumb img,
.story-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.story-col-copy {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-col-del {
  width: 72px;
  text-align: right;
}

.story-table th:last-child,
.story-table td.story-col-del {
  position: sticky;
  right: 0;
  background: #fff;
}

.story-del,
.story-url {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
}

.story-del {
  background: #fff1f2;
  color: #9f1239;
}

.story-url {
  background: #e8eefb;
  color: #0b2f6b;
}

.story-del svg,
.story-url svg,
.story-zoom-close svg,
.story-thumb-empty svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.story-del:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.story-zoom {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(7, 10, 16, 0.88);
}

.story-zoom[hidden] { display: none !important; }

.story-zoom-frame {
  width: min(920px, 100%);
  max-height: 88vh;
}

.story-zoom-frame img,
.story-zoom-frame video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 88vh;
  margin: 0 auto;
  border-radius: 16px;
  background: #111;
  object-fit: contain;
}

.story-zoom-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
}

.story-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.story-record-actions .btn-line { padding: 8px 12px; }

body.story-open { overflow: hidden; }

html[data-theme="dark"] .story-kicker,
html[data-theme="dark"] .story-name { color: #e8edf5; }

html[data-theme="dark"] .story-chip.is-seen .story-name { color: #8b95a7; }

html[data-theme="dark"] .story-face,
html[data-theme="dark"] .story-who-face {
  background: #101826;
  border-color: #101826;
}

html[data-theme="dark"] .story-fallback { color: #f3d78a; }

html[data-theme="dark"] .story-chip.is-seen .story-ring { background: #3a4558; }

html[data-theme="dark"] .story-drop {
  background: #101826;
  border-color: #2a3548;
}

html[data-theme="dark"] .story-zoom-btn {
  background: #182236;
  color: #e8edf5;
}

html[data-theme="dark"] .story-reframe,
html[data-theme="dark"] .story-replace {
  color: #dbe7ff;
}

html[data-theme="dark"] .story-table-wrap {
  background: #121a2b;
  border-color: #2c3b54;
}

html[data-theme="dark"] .story-table th,
html[data-theme="dark"] .story-table td {
  border-bottom-color: #2c3b54;
  color: #e8edf5;
}

html[data-theme="dark"] .story-del {
  background: #3a1d24;
  color: #fda4af;
}

html[data-theme="dark"] .story-url {
  background: #182236;
  color: #dbe7ff;
}

#storyAsk { z-index: 230; }

.story-ask-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 14px;
  background: #fff1f2;
  color: #9f1239;
}

.story-ask-mark svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

html[data-theme="dark"] .story-ask-mark {
  background: #3a1d24;
  color: #fda4af;
}

html[data-theme="dark"] .story-table th:last-child,
html[data-theme="dark"] .story-table td.story-col-del {
  background: #121a2b;
}

@media (max-width: 640px) {
  .story-viewer { padding: 0; }
  .story-stage {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
  }
  .story-top {
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }
  .story-who {
    min-height: 40px;
    padding-right: 52px;
  }
  #storyClose {
    position: absolute;
    top: calc(22px + env(safe-area-inset-top, 0px));
    right: 12px;
    z-index: 6;
    width: 42px;
    height: 42px;
    margin-left: 0;
    background: rgba(0, 0, 0, 0.5);
  }
}
