/*
 * Interaction visual hotfixes
 * Scope: completed task cards, Memory Galaxy, skill-card artwork, Zenow prompts.
 * Keep task creation styles out of this file: that flow is maintained separately.
 */

/* Completion is already communicated by the struck-through title and the "撤销" action. */
.task-drawer-panel .task-card.is-completed::after {
  content: none;
  display: none;
}

/* Let the galaxy occupy the actual feature layer instead of stopping at a legacy fixed cap. */
.building-layer[data-building-layer="home"]:has(.home-page.is-galaxy-chapter) {
  overflow: hidden;
  background: #050209;
}

.building-layer[data-building-layer="home"]:has(.home-page.is-galaxy-chapter) > [data-profile-mount],
.home-page.is-galaxy-chapter {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.home-page.is-galaxy-chapter .memory-galaxy.home-memory-card {
  height: 100%;
  min-height: 100%;
  grid-template-rows: 0 minmax(0, 1fr);
  background: #050209;
}

.home-page.is-galaxy-chapter .memory-galaxy-stage,
.home-page.is-galaxy-chapter .memory-galaxy-canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
}

/* The optimized art is tightly trimmed; contain it without stretching the paper frame. */
.skill-card-artwork {
  width: 72px;
  aspect-ratio: .68;
}

.skill-card-art-frame {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.skill-card-art-symbol {
  top: 33%;
  left: 50%;
  width: 47%;
  height: 32%;
  object-fit: contain;
}

/* Preserve touch scrolling while replacing the native desktop-style scrollbar. */
.zenow-chat-suggestions {
  position: relative;
}

.zenow-chat-suggestions > div {
  padding: 2px 15px 5px 1px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 8px,
    #000 calc(100% - 16px),
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 8px,
    #000 calc(100% - 16px),
    transparent 100%
  );
}

.zenow-chat-suggestions > div::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.zenow-chat-suggestions button {
  scroll-snap-align: start;
  border-color: rgba(82, 96, 65, .24);
  background:
    linear-gradient(145deg, rgba(255, 254, 244, .9), rgba(239, 232, 203, .72)),
    url("../../assets/runtime/ui/book/optimized/ui-book-page-oat-seamless.webp") center / cover;
  box-shadow:
    0 2px 6px rgba(70, 76, 52, .08),
    inset 0 1px 0 rgba(255, 255, 255, .7);
}

@media (max-width: 600px) {
  .zenow-chat-suggestions > div {
    padding-right: 12px;
  }
}
