:root {
  --yt-page-bg: #f4f7fb;
  --yt-surface: #ffffff;
  --yt-text: #172033;
  --yt-muted: #667085;
  --yt-line: #e4eaf2;
  --yt-brand: #2878ff;
  --yt-brand-soft: #eaf2ff;
  --yt-teal: #0ba6a6;
  --yt-shadow: 0 10px 28px rgba(28, 49, 82, .08);
  --yt-radius: 8px;
}

.yt-project-page,
.pd-page,
.gp-page,
.yd-appdev-page {
  min-height: 100dvh;
  padding: 0 14px calc(28px + env(safe-area-inset-bottom));
  background: var(--yt-page-bg);
  color: var(--yt-text);
  overflow-x: hidden;
}

.yt-project-nav,
.yd-appdev-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 64px;
  margin: 0 -14px 12px;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
  background: rgba(244, 247, 251, .94);
  border-bottom: 1px solid rgba(228, 234, 242, .9);
  backdrop-filter: blur(16px);
}

.yt-project-nav h1,
.yd-appdev-nav h1 {
  margin: 0;
  color: var(--yt-text);
  font-size: 18px;
  line-height: 24px;
  letter-spacing: 0;
}

.yt-project-nav p,
.yd-appdev-nav p,
.yt-project-nav > span,
.yd-appdev-nav > span {
  color: var(--yt-muted);
  font-size: 11px;
  line-height: 16px;
}

.yt-project-hero,
.pd-hero,
.gp-hero,
.yd-appdev-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  min-height: 156px;
  margin: 0 0 12px;
  overflow: hidden;
  border: 1px solid var(--yt-line);
  border-radius: var(--yt-radius);
  background: #fff;
  box-shadow: var(--yt-shadow);
}

.yt-project-hero-image,
.pd-hero > img,
.gp-hero > img,
.yd-appdev-hero > img {
  grid-column: 2;
  width: 100%;
  height: 100%;
  min-height: 156px;
  object-fit: cover;
  object-position: center;
}

.yt-project-hero-shade,
.gp-hero-shade,
.yd-appdev-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #fff 0 54%, rgba(255,255,255,.82) 68%, rgba(255,255,255,.04) 100%);
}

.yt-project-hero-copy,
.pd-hero > div,
.gp-hero-copy,
.yd-appdev-hero-copy {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 66%;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
}

.yt-project-hero-copy small,
.pd-hero small,
.gp-hero-copy small,
.yd-appdev-hero-copy small {
  color: var(--yt-brand);
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
}

.yt-project-hero-copy b,
.pd-hero b,
.gp-hero-copy b,
.yd-appdev-hero-copy h2 {
  margin: 4px 0 6px;
  color: var(--yt-text);
  font-size: 20px;
  line-height: 26px;
  letter-spacing: 0;
}

.yt-project-hero-copy p,
.pd-hero p,
.gp-hero-copy p,
.yd-appdev-hero-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--yt-muted);
  font-size: 12px;
  line-height: 18px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tool-hero-tags,
.yd-appdev-hero-copy > div {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.tool-hero-tags span,
.yd-appdev-hero-copy > div span {
  padding: 3px 7px;
  border: 1px solid #d8e6ff;
  border-radius: 6px;
  background: var(--yt-brand-soft);
  color: #255fb4;
  font-size: 10px;
  line-height: 14px;
}

.yt-project-progress,
.yd-appdev-flow,
.pd-flow,
.gp-progress {
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid var(--yt-line);
  border-radius: var(--yt-radius);
  background: var(--yt-surface);
  box-shadow: 0 5px 18px rgba(28, 49, 82, .05);
}

.yt-project-form,
.yt-project-chat,
.yt-project-submit-first,
.pd-form-card,
.pd-brief-card,
.pd-preview-card,
.pd-output-card,
.yd-appdev-form-card,
.yd-appdev-brief,
.yd-appdev-complete,
.gp-create-layout > section,
.gp-complete-layout > section {
  margin: 0 0 12px;
  padding: 16px;
  border: 1px solid var(--yt-line);
  border-radius: var(--yt-radius);
  background: var(--yt-surface);
  box-shadow: 0 7px 22px rgba(28, 49, 82, .06);
}

.yt-form-section-head i,
.yt-project-field > span > i {
  color: #ef4444;
}

.yt-project-field > span,
.pd-field-grid label > span,
.yd-appdev-form-card label > span {
  color: var(--yt-text);
  font-weight: 700;
  line-height: 20px;
}

.yt-project-field input,
.yt-project-field textarea,
.yt-project-field select,
.pd-field-grid input,
.pd-field-grid textarea,
.yd-appdev-form-card input,
.yd-appdev-form-card textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dce4ef;
  border-radius: var(--yt-radius);
  background: #fbfcfe;
  color: var(--yt-text);
  box-shadow: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.yt-project-field textarea,
.pd-field-grid textarea,
.yd-appdev-form-card textarea {
  min-height: 104px;
}

.yt-project-field input:focus,
.yt-project-field textarea:focus,
.yt-project-field select:focus,
.pd-field-grid input:focus,
.pd-field-grid textarea:focus,
.yd-appdev-form-card input:focus,
.yd-appdev-form-card textarea:focus {
  outline: none;
  border-color: #83adff;
  box-shadow: 0 0 0 3px rgba(40, 120, 255, .1);
}

.yt-video-mode-picker,
.yt-mode-card-picker,
.pd-mode-switch,
.yd-appdev-types {
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: 160px;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 1px 6px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.yt-video-mode-picker::-webkit-scrollbar,
.yt-mode-card-picker::-webkit-scrollbar,
.pd-mode-switch::-webkit-scrollbar,
.yd-appdev-types::-webkit-scrollbar { display: none; }

.yt-video-mode-picker button,
.yt-mode-card-picker button,
.pd-mode-switch button,
.yd-appdev-types button {
  min-width: 160px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--yt-line);
  border-radius: var(--yt-radius);
  background: #fff;
  color: var(--yt-text);
  text-align: left;
  scroll-snap-align: start;
}

.yt-video-mode-picker > button,
.yt-mode-card-picker > button {
  padding: 12px;
  text-align: left;
}

.yt-video-mode-picker button b,
.yt-mode-card-picker button b,
.pd-mode-switch button b,
.yd-appdev-types button b {
  display: block;
  overflow: hidden;
  color: var(--yt-text);
  font-size: 13px;
  line-height: 19px;
  white-space: nowrap;
  text-overflow: ellipsis;
  word-break: keep-all;
}

.yt-video-mode-picker button small,
.yt-mode-card-picker button small,
.pd-mode-switch button small,
.yd-appdev-types button small {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--yt-muted);
  font-size: 10px;
  line-height: 15px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.yt-video-mode-picker button.selected,
.yt-mode-card-picker button.selected,
.pd-mode-switch button.active,
.yd-appdev-types button.active {
  border-color: var(--yt-brand);
  background: var(--yt-brand-soft);
  box-shadow: inset 0 0 0 1px var(--yt-brand);
}

.yt-video-mode-picker button i,
.yt-mode-card-picker button i {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  margin-bottom: 7px;
  border-radius: 7px;
  background: var(--yt-brand);
  color: #fff;
  font-size: 12px;
  font-style: normal;
}

.yt-upload-card {
  min-height: 112px;
  border: 1px dashed #9dbcf4;
  border-radius: var(--yt-radius);
  background: #f7faff;
}

.yt-upload-previews {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.yt-upload-preview-card,
.pd-upload-grid article {
  overflow: hidden;
  border: 1px solid var(--yt-line);
  border-radius: var(--yt-radius);
  background: #fff;
  box-shadow: 0 5px 16px rgba(28, 49, 82, .07);
}

.yt-upload-preview-open,
.pd-upload-grid img {
  aspect-ratio: 4 / 3;
}

.yt-upload-preview-open img,
.yt-upload-preview-open video,
.pd-upload-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.primary-btn,
.pd-primary,
.yd-appdev-primary,
.yd-appdev-actions .primary {
  min-height: 48px;
  border: 0;
  border-radius: var(--yt-radius);
  background: var(--yt-brand);
  color: #fff;
  font-weight: 700;
  line-height: 20px;
}

.yt-video-preview-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  max-height: 72dvh;
  border-radius: var(--yt-radius);
  background: #0d1421;
}

.yt-inline-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.yt-video-cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 24px;
  pointer-events: none;
  color: #fff;
  text-align: center;
  background: linear-gradient(180deg, rgba(13,20,33,.12), rgba(13,20,33,.82));
}

.yt-video-cover-fallback b { font-size: 18px; line-height: 24px; }
.yt-video-cover-fallback span { color: rgba(255,255,255,.78); font-size: 12px; }


.pd-model-panel {
  overflow: hidden;
  border: 1px solid var(--yt-line);
  border-radius: var(--yt-radius);
  background: #f8fafc;
}

.pd-model-consistency-grid {
  align-items: stretch;
  gap: 12px;
}

.pd-model-reference,
.pd-model-viewer-host {
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--yt-line);
  border-radius: var(--yt-radius);
  background: #eef2f7;
}

.pd-model-reference img,
.pd-model-viewer,
.pd-model-viewer-host model-viewer {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: contain;
}

.pd-model-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.pd-model-toolbar button {
  min-height: 40px;
  border: 1px solid var(--yt-line);
  border-radius: 7px;
  background: #fff;
  color: var(--yt-text);
}

.pd-model-toolbar button.active {
  border-color: rgba(40,120,255,.5);
  background: #eaf2ff;
  color: var(--yt-brand);
}

.pd-model-viewer-host:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background: #eef2f7;
}

.pd-model-viewer-host:fullscreen model-viewer {
  width: 100%;
  height: 100%;
  min-height: 100vh;
}

@media (min-width: 760px) {
  .yt-project-page,
  .pd-page,
  .gp-page,
  .yd-appdev-page { max-width: 760px; margin: 0 auto; }
  .pd-model-consistency-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .yt-upload-previews { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .yt-project-hero,
  .pd-hero,
  .gp-hero,
  .yd-appdev-hero { grid-template-columns: minmax(0, 1fr) 126px; }
  .yt-project-hero-copy,
  .pd-hero > div,
  .gp-hero-copy,
  .yd-appdev-hero-copy { width: 68%; padding: 14px; }
  .yt-project-hero-copy b,
  .pd-hero b,
  .gp-hero-copy b,
  .yd-appdev-hero-copy h2 { font-size: 18px; line-height: 23px; }
  .pd-model-consistency-grid { grid-template-columns: 1fr; }
  .pd-model-reference,
  .pd-model-viewer-host,
  .pd-model-reference img,
  .pd-model-viewer,
  .pd-model-viewer-host model-viewer { min-height: 300px; }
}

/* 2026-08-11 approved scheme A: clear blue-white mobile workbench */
:root {
  --yt-page-bg: #f3f7fd;
  --yt-surface: #ffffff;
  --yt-text: #14213a;
  --yt-muted: #73829a;
  --yt-line: #dce6f4;
  --yt-brand: #2478f3;
  --yt-brand-strong: #1265dc;
  --yt-brand-soft: #eaf3ff;
  --yt-shadow: 0 10px 28px rgba(45, 84, 145, .09);
  --yt-radius: 8px;
}

/* Secondary pages remain real app pages: scrollable and reachable from bottom navigation. */
body.tool-project-open .tabbar {
  display: grid;
}

/* The tab bar belongs to navigation, not to the software keyboard. */
body.secondary-keyboard-active.tool-project-open .tabbar,
body.secondary-keyboard-active.store-assistant-open .tabbar,
body.secondary-keyboard-active.mine-subpage-open .tabbar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.yt-project-field.is-invalid {
  border-radius: 8px;
  outline: 2px solid #e5484d;
  outline-offset: 6px;
}

.yt-project-field.is-invalid > span:first-child {
  color: #b4232d;
}

body.tool-project-open #view,
body.store-assistant-open #view {
  height: 100%;
  min-height: 0;
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scroll-behavior: smooth;
}

.yt-project-page,
.pd-page,
.gp-page,
.yd-appdev-page {
  width: 100%;
  min-height: calc(100% + 1px);
  height: auto;
  padding: 0 12px calc(26px + env(safe-area-inset-bottom));
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(232, 241, 254, .9) 0, rgba(243, 247, 253, .96) 190px, #f3f7fd 100%);
}

.yt-project-nav,
.yd-appdev-nav {
  min-height: 60px;
  margin: 0 -12px 12px;
  padding: calc(7px + env(safe-area-inset-top)) 12px 7px;
  background: rgba(247, 250, 255, .96);
  border-bottom-color: rgba(111, 145, 199, .14);
  box-shadow: 0 4px 16px rgba(45, 84, 145, .05);
}

.yt-project-nav > button,
.yd-appdev-nav > button {
  width: 38px;
  height: 38px;
  border: 1px solid #d5e2f4;
  border-radius: 8px;
  background: #fff;
  color: #28405f;
  box-shadow: 0 4px 12px rgba(45, 84, 145, .08);
}

.yt-project-hero,
.pd-hero,
.gp-hero,
.yd-appdev-hero {
  min-height: 164px;
  margin-bottom: 12px;
  border-color: #d6e2f1;
  background: #fff;
  box-shadow: 0 12px 30px rgba(42, 81, 142, .1);
}

.yt-project-hero-image,
.pd-hero > img,
.gp-hero > img,
.yd-appdev-hero > img {
  min-height: 164px;
}

.yt-project-hero-shade,
.gp-hero-shade,
.yd-appdev-hero-shade {
  background: linear-gradient(90deg, #f5f9ff 0 45%, rgba(245,249,255,.93) 55%, rgba(245,249,255,.16) 83%, transparent 100%);
}

.yt-project-hero-copy,
.pd-hero > div,
.gp-hero-copy,
.yd-appdev-hero-copy {
  width: 67%;
  padding: 17px;
  color: #14213a;
}

.yt-project-page:not(.pd-page) .yt-project-hero-copy small,
.pd-hero small,
.gp-hero-copy small,
.yd-appdev-hero-copy small {
  color: #2478f3 !important;
}

.yt-project-page:not(.pd-page) .yt-project-hero-copy b,
.pd-hero b,
.gp-hero-copy b,
.yd-appdev-hero-copy h2 {
  color: #14213a !important;
}

.yt-project-page:not(.pd-page) .yt-project-hero-copy p,
.pd-hero p,
.gp-hero-copy p,
.yd-appdev-hero-copy p {
  color: #66758c !important;
}

.tool-hero-tags span,
.yd-appdev-hero-copy > div span {
  border-color: #cfe0fb;
  background: rgba(255, 255, 255, .82);
  color: #2d64ae;
}

.yt-project-progress,
.yt-project-flow-guide,
.yd-appdev-flow,
.pd-flow,
.gp-progress,
.yt-project-form,
.yt-project-chat,
.yt-project-submit-first,
.pd-form-card,
.pd-brief-card,
.pd-preview-card,
.pd-output-card,
.yd-appdev-form-card,
.yd-appdev-brief,
.yd-appdev-complete,
.gp-create-layout > section,
.gp-complete-layout > section,
.yt-project-status,
.yt-project-plan-ready,
.yt-project-prompt-ready-card,
.yt-prompt-workspace,
.yt-artifact-showcase,
.yt-complete-card {
  border: 1px solid #dce6f4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(45, 84, 145, .075);
}

.yt-project-flow-guide {
  margin: 0 0 12px;
  padding: 14px;
}

/* Mode choices: no single-character badges, no clipped horizontal cards. */
.yt-video-mode-picker,
.yt-mode-card-picker,
.pd-mode-switch,
.yd-appdev-types {
  display: grid;
  grid-auto-flow: row;
  grid-auto-columns: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
  padding: 0;
  overflow: visible;
}

.yt-video-mode-picker {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.yt-video-mode-picker button,
.yt-mode-card-picker button,
.pd-mode-switch button,
.yd-appdev-types button {
  display: flex;
  min-width: 0;
  width: 100%;
  min-height: 94px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 13px 10px;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  background: #fff;
  color: var(--yt-text);
  text-align: center;
  box-shadow: 0 5px 14px rgba(45, 84, 145, .05);
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.yt-video-mode-picker button:active,
.yt-mode-card-picker button:active,
.pd-mode-switch button:active,
.yd-appdev-types button:active {
  transform: scale(.975);
}

.yt-video-mode-picker button b,
.yt-mode-card-picker button b,
.pd-mode-switch button b,
.yd-appdev-types button b {
  display: block;
  width: 100%;
  white-space: normal;
  overflow: visible;
  color: #17233b;
  font-size: 13px;
  line-height: 18px;
  text-overflow: clip;
}

.yt-video-mode-picker button small,
.yt-mode-card-picker button small,
.pd-mode-switch button small,
.yd-appdev-types button small {
  display: -webkit-box;
  width: 100%;
  margin-top: 0;
  color: #78879c;
  font-size: 10px;
  line-height: 14px;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.yt-video-mode-picker button.selected,
.yt-mode-card-picker button.selected,
.pd-mode-switch button.active,
.yd-appdev-types button.active {
  border-color: #2478f3;
  background: #edf5ff;
  box-shadow: inset 0 0 0 1px #2478f3, 0 7px 18px rgba(36, 120, 243, .1);
}

.yt-video-mode-picker button i,
.yt-mode-card-picker button i {
  display: none !important;
}

/* Upload before/after states share one stable component. */
.yt-material-field {
  display: block;
}

.yt-upload-card,
.pd-upload.yt-upload-card,
.gp-upload.yt-upload-card,
.yd-appdev-upload.yt-upload-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 94px;
  margin-top: 8px;
  padding: 15px;
  overflow: hidden;
  border: 1px dashed #8fb5ec;
  border-radius: 8px;
  background: linear-gradient(145deg, #f6faff 0%, #edf5ff 100%);
  color: var(--yt-text);
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7);
}

.yt-upload-card.has-assets {
  border-style: solid;
  border-color: #cdddf2;
  background: #f8fbff;
}

.yt-upload-card-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: #2478f3;
  color: #fff;
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 7px 18px rgba(36, 120, 243, .22);
}

.yt-upload-card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.yt-upload-card-copy strong,
.yt-upload-card-copy b {
  overflow: hidden;
  color: #17233b;
  font-size: 14px;
  font-weight: 750;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yt-upload-card-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: #7a899d;
  font-size: 10px;
  line-height: 15px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.yt-upload-card > em {
  padding: 6px 8px;
  border: 1px solid #cbdcf4;
  border-radius: 7px;
  background: rgba(255,255,255,.92);
  color: #2768bc;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

/* Match the approved material uploader: one centered, calm mobile-app panel. */
.yt-upload-card,
.pd-upload.yt-upload-card,
.gp-upload.yt-upload-card,
.yd-appdev-upload.yt-upload-card {
  display: flex;
  min-height: 164px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 22px 18px;
  border-color: #a8c3e8;
  background: #f4f8ff;
  text-align: center;
}

/* Older product-design CSS styled every direct span as the round plus icon. */
.pd-upload.yt-upload-card > .yt-upload-card-copy {
  display: flex !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-size: inherit !important;
  box-shadow: none !important;
}

.pd-upload.yt-upload-card > .yt-upload-card-copy > b {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #17233b !important;
  font-size: 15px !important;
  line-height: 22px !important;
  box-shadow: none !important;
}

.pd-upload.yt-upload-card > .yt-upload-card-icon {
  display: grid !important;
  width: 56px !important;
  height: 56px !important;
  margin: 0 !important;
  padding: 0 !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #2478f3 !important;
  color: #fff !important;
  font-size: 34px !important;
  line-height: 1 !important;
}

.yt-sa-file-picker.yt-upload-card {
  display: flex !important;
  min-height: 164px !important;
  padding: 22px 18px !important;
  border: 1px dashed #a8c3e8 !important;
  border-radius: 8px !important;
  background: #f4f8ff !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  gap: 9px !important;
  text-align: center !important;
}

.yt-sa-file-picker.yt-upload-card.has-assets {
  min-height: 132px !important;
  border-style: solid !important;
  border-color: #cdddf2 !important;
  background: #f7faff !important;
}

.yt-sa-file-picker.yt-upload-card .yt-upload-card-copy strong {
  color: #17233b !important;
  font-size: 15px !important;
  line-height: 22px !important;
}

.yt-sa-file-picker.yt-upload-card .yt-upload-card-copy small {
  color: #7b899e !important;
  font-size: 11px !important;
  line-height: 17px !important;
}

.yt-upload-card.has-assets {
  min-height: 132px;
  background: #f7faff;
}

.yt-upload-card-icon {
  width: 56px;
  height: 56px;
  font-size: 34px;
  box-shadow: 0 9px 20px rgba(36, 120, 243, .22);
}

.yt-upload-card-copy {
  width: 100%;
  align-items: center;
  text-align: center;
}

.yt-upload-card-copy strong,
.yt-upload-card-copy b {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #17233b;
  font-size: 15px;
  line-height: 22px;
  white-space: normal;
  box-shadow: none;
}

.yt-upload-card-copy small {
  width: min(100%, 290px);
  color: #7b899e;
  font-size: 11px;
  line-height: 17px;
  -webkit-line-clamp: 3;
}

.yt-upload-card > em {
  display: none;
}

.yt-upload-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 8px;
}

.yt-upload-preview-heading > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.yt-upload-preview-heading b {
  color: #17233b;
  font-size: 13px;
  line-height: 19px;
}

.yt-upload-preview-heading small {
  color: #8491a4;
  font-size: 10px;
  line-height: 15px;
}

.yt-upload-preview-heading > span {
  padding: 4px 8px;
  border-radius: 6px;
  background: #eaf3ff;
  color: #246bc9;
  font-size: 10px;
  white-space: nowrap;
}

.yt-upload-previews.has-items,
.pd-upload-grid,
.gp-asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
  padding: 0;
}

.yt-upload-preview-card,
.pd-upload-grid article,
.gp-asset-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(45, 84, 145, .07);
}

.yt-upload-preview-open,
.pd-upload-grid article > img,
.gp-asset-card > img,
.gp-asset-card > video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #edf3fb;
}

.yt-upload-preview-card figcaption,
.pd-upload-grid article footer,
.gp-asset-card footer {
  display: flex;
  min-width: 0;
  min-height: 52px;
  padding: 8px 9px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  background: #fff;
}

.yt-upload-preview-card figcaption b,
.pd-upload-grid article footer b,
.gp-asset-card footer b {
  overflow: hidden;
  color: #1e2b43;
  font-size: 11px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yt-upload-preview-card figcaption small,
.pd-upload-grid article footer small,
.gp-asset-card footer small {
  display: flex;
  justify-content: space-between;
  color: #8794a7;
  font-size: 9px;
  line-height: 14px;
}

.yt-upload-preview-card figcaption small span {
  color: #16845e;
}

.yt-upload-preview-remove,
.pd-upload-grid article > button {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 3;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 50%;
  background: rgba(19, 31, 51, .76);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.yd-appdev-upload-field > span {
  display: block;
  margin-bottom: 2px;
  color: #17233b;
  font-size: 13px;
  font-weight: 700;
}

.yd-appdev-uploaded-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  padding: 11px 12px;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  background: #fff;
}

.yd-appdev-uploaded-file > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.yd-appdev-uploaded-file b {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yd-appdev-uploaded-file small { color: #7d8ba0; font-size: 10px; }
.yd-appdev-uploaded-file > span { color: #2478f3; font-size: 11px; font-weight: 800; }

.yd-appdev-form-card .yd-appdev-checks label {
  min-height: 48px;
  align-items: center;
}

.yd-appdev-form-card .yd-appdev-checks input[type="checkbox"] {
  appearance: auto;
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  accent-color: #2478f3;
  box-shadow: none;
}

.yd-appdev-form-card .yd-appdev-checks span {
  display: block;
  margin: 0 !important;
  color: #263651;
  font-size: 11px !important;
  line-height: 16px;
}

/* Generation and delivery feel like one product, not separate legacy pages. */
.yt-project-status,
.yt-project-plan-ready,
.yt-project-prompt-ready-card,
.yt-artifact-showcase,
.yt-complete-card,
.pd-status,
.pd-preview-card,
.pd-output-card,
.yd-appdev-progress,
.yd-appdev-complete,
.gp-complete {
  margin-bottom: 12px;
  overflow: hidden;
}

.yt-artifact-head,
.yt-complete-title,
.yd-appdev-complete-head,
.gp-complete-head {
  border-bottom-color: #e2eaf5;
  background: linear-gradient(180deg, #fbfdff, #f5f9ff);
}

.yt-video-delivery-player,
.yt-code-artifact-preview,
.yd-appdev-preview,
.pd-output-grid article,
.pd-model-panel {
  overflow: hidden;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  background: #edf3fb;
}

.yt-complete-actions,
.yd-appdev-main-actions,
.gp-complete-actions {
  gap: 8px;
}

.yt-complete-actions button,
.yd-appdev-main-actions button,
.gp-complete-actions button,
.pd-output-card button,
.pd-output-card a {
  min-height: 44px;
  border-radius: 8px;
}

@media (max-width: 370px) {
  .yt-video-mode-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yt-upload-card,
  .pd-upload.yt-upload-card,
  .gp-upload.yt-upload-card,
  .yd-appdev-upload.yt-upload-card {
    display: flex;
    min-height: 150px;
  }
  .yt-upload-card-icon { width: 50px; height: 50px; font-size: 30px; }
}

/* 2026-08-13 secondary-page bottom reachability */
body.tool-project-open,
body.store-assistant-open,
body.mine-subpage-open,
body.tool-project-open #app,
body.store-assistant-open #app,
body.mine-subpage-open #app {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body.tool-project-open #view,
body.store-assistant-open #view,
body.mine-subpage-open #view {
  box-sizing: border-box;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  padding-bottom: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

body.tool-project-open #view > .yt-project-page,
body.tool-project-open #view > .pd-page,
body.tool-project-open #view > .gp-page,
body.tool-project-open #view > .yd-appdev-page,
body.store-assistant-open #view > .yt-project-page {
  min-height: calc(100% + 1px);
  padding-bottom: calc(84px + env(safe-area-inset-bottom)) !important;
}

body.mine-subpage-open .yt-mine-subpage {
  min-height: calc(100% + 1px);
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

body.tool-project-open .yt-project-submit-first {
  position: static !important;
  inset: auto !important;
  width: 100%;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none !important;
}

/* Every secondary-page action area stays in document flow. */
body.tool-project-open .yt-prompt-action-row,
body.tool-project-open .yt-sa-actions,
body.tool-project-open .yd-appdev-actions,
body.tool-project-open .yd-appdev-main-actions,
body.tool-project-open .gp-complete-actions,
body.tool-project-open .pd-output-actions {
  position: static !important;
  inset: auto !important;
  transform: none !important;
}

@supports not (height: 100dvh) {
  body.tool-project-open,
  body.store-assistant-open,
  body.mine-subpage-open,
  body.tool-project-open #app,
  body.store-assistant-open #app,
  body.mine-subpage-open #app,
  body.tool-project-open #view,
  body.store-assistant-open #view,
  body.mine-subpage-open #view {
    height: var(--app-height, 100vh);
    max-height: var(--app-height, 100vh);
  }
}
