/* Card previews share the GAS app's icon paths, spacing and colors. */
.app-icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.app-icon { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.preview-tag .app-icon { width: 18px; height: 18px; stroke-width: 1.5; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; height: 44px; margin-bottom: 12px; color: #182338; }
.preview-tool { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; }
.preview-progress-label { display: flex; justify-content: space-between; gap: 12px; color: #4f5d74; font-size: 14px; font-weight: 600; }
.preview-progress { height: 5px; margin: 9px 0 12px; overflow: hidden; border-radius: 4px; background: #dce3ef; }
.preview-progress > span { display: block; height: 100%; background: #2855b5; transition: width .25s; }
.preview-card { display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; height: 355px; min-height: 0; padding: 16px; border: 1px solid #e0e5ee; border-radius: 20px; background: #fff; box-shadow: 0 5px 18px #1c335108; }
.preview-card-side { min-height: 0; overflow: auto; }
.preview-card-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 44px; margin-bottom: 4px; }
.preview-heading-label, .preview-heading-actions { display: flex; align-items: center; min-width: 0; }
.preview-heading-label { gap: 4px; color: #64738a; font-size: 13px; font-weight: 600; }
.preview-heading-actions { justify-content: flex-end; gap: 8px; color: #182338; }
.preview-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 12px; }
.preview-tag { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: #182338; }
.preview-question { margin: 0; color: #182338; font-size: clamp(28px, 4vw, 35px); font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.preview-answer-side { border-top: 1px solid #e8ecf2; padding-top: 12px; }
.preview-answer { margin: 0; color: #8090a7; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.preview-answer.is-visible { color: #182338; font-size: 26px; }
.preview-controls { margin-top: 12px; }
.preview-flag-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; }
.preview-directions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.preview-control { display: flex; justify-content: center; align-items: center; min-height: 52px; padding: 10px 12px; border: 1px solid #ccd4e1; border-radius: 12px; background: #fff; color: #182338; text-align: center; font-size: 14px; font-weight: 600; }
.preview-control.preview-primary { background: #2855b5; border-color: #2855b5; color: #fff; }
.preview-control.preview-reset { min-width: 44px; padding: 0; }
.preview-reveal { width: 100%; margin-top: 8px; }
.preview-flag-row b, #demo-flag-count { color: #9b351a; font-weight: inherit; }
.demo-flag .demo-flag-label, #demo-flag-count { margin-left: 0; }
.hero-visual-note { position: absolute; right: 0; bottom: -10px; color: #687178; font-size: 10px; letter-spacing: .05em; }
.hero-app { color: #182338; background: #f3f5f9; }
.hero-app .preview-toolbar { height: 28px; margin-bottom: 6px; }
.hero-app .preview-toolbar .preview-tool { height: 28px; }
.hero-app .preview-progress-label { font-size: 11px; }
.hero-app .preview-progress { margin: 8px 0 10px; }
.hero-app .preview-card { height: 250px; padding: 12px; gap: 6px; border-radius: 15px; }
.hero-app .preview-card-head { min-height: 32px; margin-bottom: 2px; }
.hero-app .preview-tool, .hero-app .preview-tag { width: 30px; height: 30px; flex-basis: 30px; }
.hero-app .preview-heading-actions { gap: 2px; }
.hero-app .preview-heading-label { font-size: 11px; }
.hero-app .preview-tags { gap: 0; margin-bottom: 5px; }
.hero-app .preview-question { font-size: 24px; }
.hero-app .preview-answer-side { padding-top: 5px; }
.hero-app .preview-answer { font-size: 10px; }
.hero-app .preview-controls { margin-top: 8px; }
.hero-app .preview-flag-row { grid-template-columns: minmax(0, 1fr) 34px; gap: 6px; }
.hero-app .preview-directions { gap: 8px; margin-top: 6px; }
.hero-app .preview-control { min-height: 34px; padding: 5px; border-radius: 8px; font-size: 11px; }
.hero-app .preview-reveal { margin-top: 6px; }
.demo-panel { color: #182338; background: #f3f5f9; }
.demo-tag:hover, .demo-tag[aria-pressed="true"] { color: #2855b5; background: #edf2ff; }
.demo-flag.is-marked { color: #9b351a; border-color: #dfad96; background: #fff0e7; }
.demo-panel button:hover { background: #f0f4fc; }
.demo-panel button.preview-primary:hover { background: #21499e; }
.demo-panel button:focus-visible { outline: 3px solid #8caffb; outline-offset: 3px; }
.demo-info-icon { cursor: help; border-radius: 8px; }
.demo-info-icon:hover, .demo-info-icon:focus-visible { background: #edf2ff; }
.demo-info-icon:focus-visible { outline: 3px solid #8caffb; outline-offset: 2px; }
#demo-icon-tooltip { position: fixed; z-index: 30; width: max-content; max-width: min(260px, calc(100vw - 16px)); padding: 8px 11px; border-radius: 8px; background: #182338; color: #fff; font-size: 12px; line-height: 1.5; box-shadow: 0 6px 18px #18233830; pointer-events: none; }
#demo-icon-tooltip[hidden] { display: none; }
.screens-grid { grid-template-columns: 1fr 1fr; }
.screen-frame, .phone-frame { height: 660px; }
.screenshot-wide .screen-frame img, .phone-frame img { width: 100%; height: 100%; object-fit: contain; transform: none; }
@media (max-width: 700px) {
  .screens-grid { grid-template-columns: 1fr; }
  .screen-frame, .phone-frame { height: 460px; }
  .hero-visual-note { bottom: -25px; }
}
@media (max-width: 390px) {
  .demo-panel { padding: 15px; }
  .demo-card { height: 480px; padding: 12px; }
  .demo-card .preview-heading-actions { gap: 0; }
  .demo-card .preview-tags { gap: 0; }
  .demo-card .preview-tag { width: 36px; flex-basis: 36px; }
  .demo-card .preview-card-head { gap: 0; }
}
@media (prefers-reduced-motion: reduce) { .preview-progress > span { transition: none; } }
