.tool-overlay-tell_the_story {
  padding: 0;
  place-items: stretch;
}

.tool-overlay-tell_the_story .tool-panel {
  width: 100vw;
  height: 100dvh;
  max-height: none;
  border-radius: 0;
  background: #111820;
}

.tool-overlay-tell_the_story .tool-panel-header {
  padding: 9px 12px;
  background: linear-gradient(125deg, #284e5b, #3c5d68 52%, #705a7a);
}

.tool-overlay-tell_the_story .tool-panel-header h2 {
  font-size: 17px;
}

.tool-overlay-tell_the_story .tool-panel-header small {
  font-size: 10px;
}

.tool-overlay-tell_the_story .tool-panel-body {
  padding: 0;
  overflow: hidden;
}

.tell-story-app {
  height: 100%;
  min-height: 0;
  padding: 10px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  color: #f8fbfd;
  background:
    radial-gradient(circle at 20% 0%, rgba(156,198,209,.18), transparent 34%),
    linear-gradient(180deg, #111820, #1b2230);
}

.tell-story-app.unavailable {
  place-items: center;
}

.tell-story-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tell-story-topbar p {
  margin: 0 0 2px;
  color: rgba(255,255,255,.72);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.tell-story-topbar h3 {
  margin: 0;
  font: 800 18px/1.1 Arial,Helvetica,sans-serif;
}

.tell-story-progress {
  display: flex;
  gap: 5px;
}

.tell-story-progress span {
  width: 28px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
}

.tell-story-progress span.done {
  background: #9ed8b7;
}

.tell-story-progress span.current {
  outline: 2px solid rgba(255,255,255,.55);
  outline-offset: 2px;
}

.tell-story-stage {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: 10px;
}

.tell-story-image-wrap {
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: #0d1219;
  box-shadow: 0 18px 50px rgba(0,0,0,.3);
}

.tell-story-image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #0d1219;
}

.tell-story-compose,
.tell-story-final-card,
.tell-story-empty {
  min-height: 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  backdrop-filter: blur(12px);
}

.tell-story-compose {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}

.tell-story-compose label {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
  color: rgba(255,255,255,.88);
  font-size: 11px;
  font-weight: 800;
}

.tell-story-compose textarea {
  width: 100%;
  min-height: 260px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  color: #18222c;
  background: rgba(255,255,255,.96);
  font: 500 13px/1.45 Arial,Helvetica,sans-serif;
  resize: none;
}

.tell-story-compose textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(158,216,183,.25);
}

.tell-story-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.tell-story-actions .button,
.tell-story-final-card .button {
  min-height: 0;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1;
}

.tell-story-final-card {
  align-self: start;
  justify-self: center;
  width: min(760px, calc(100% - 20px));
  margin-top: 10px;
  color: #18222c;
  background: rgba(255,255,255,.96);
}

.tell-story-final-card h3,
.tell-story-empty h3 {
  margin: 0 0 8px;
  font: 850 20px/1.15 Arial,Helvetica,sans-serif;
}

.tell-story-final-card p,
.tell-story-empty p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
}

.tell-story-final-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.tell-story-final-grid section {
  padding: 10px;
  border-radius: 10px;
  background: #eef5f8;
}

.tell-story-final-grid h4 {
  margin: 0 0 6px;
  color: #284e5b;
  font-size: 10px;
  text-transform: uppercase;
}

.tell-story-final-grid ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.4;
}

.tell-story-empty {
  width: min(520px, calc(100% - 28px));
  color: #18222c;
  background: rgba(255,255,255,.96);
}

@media (max-width: 820px) {
  .tool-overlay-tell_the_story .tool-panel {
    max-height: none;
    border-radius: 0;
  }
  .tell-story-app {
    padding: 7px;
    gap: 7px;
  }
  .tell-story-topbar h3 {
    font-size: 15px;
  }
  .tell-story-progress span {
    width: 17px;
  }
  .tell-story-stage {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(210px, 34dvh);
  }
  .tell-story-compose textarea {
    min-height: 130px;
    font-size: 12px;
  }
  .tell-story-final-grid {
    grid-template-columns: 1fr;
  }
}
