/* ── Reset & Base ─────────────────────────────── */
*{box-sizing:border-box;margin:0;padding:0}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body{
  font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;
  -webkit-font-smoothing:antialiased;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:url('/static/cat_cursor.svg') 0 0, auto;
  color:#1c1c28;

  /* Rich animated mesh gradient backdrop */
  background: #f4f5f8;
  position: relative;
}

/* Drifting soft color orbs behind everything */
body::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(165,130,255,0.1) 0%, transparent 70%);
  top: -150px;
  left: -150px;
  z-index: -2;
  animation: float-blob-1 25s infinite alternate ease-in-out;
  pointer-events: none;
  filter: blur(80px);
}

body::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,160,120,0.08) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  z-index: -2;
  animation: float-blob-2 20s infinite alternate ease-in-out;
  pointer-events: none;
  filter: blur(65px);
}

html::before {
  content: '';
  position: absolute;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(120,180,255,0.1) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -2;
  animation: float-blob-3 30s infinite alternate ease-in-out;
  pointer-events: none;
  filter: blur(90px);
}

@keyframes float-blob-1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(100px, 80px) scale(1.15); }
  100% { transform: translate(-50px, 150px) scale(0.9); }
}

@keyframes float-blob-2 {
  0% { transform: translate(0, 0) scale(0.9); }
  50% { transform: translate(-80px, -100px) scale(1.2); }
  100% { transform: translate(60px, 40px) scale(1.05); }
}

@keyframes float-blob-3 {
  0% { transform: translate(-50%, -50%) translate(-120px, 60px); }
  50% { transform: translate(-50%, -50%) translate(120px, -60px) scale(1.1); }
  100% { transform: translate(-50%, -50%) translate(-60px, -120px); }
}

a,button,.drop,.x,.history-toggle,.drawer-close,.h-dl{
  cursor:url('/static/cat_cursor_hover.svg') 16 8, pointer;
}

.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.hidden{display:none!important}

/* ── 4. Blueprint Background Accents ─────────── */
.blueprint-axis {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.blueprint-line-x {
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 108, 176, 0.04), transparent);
}

.blueprint-line-y {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(124, 108, 176, 0.04), transparent);
}

.blueprint-circle {
  position: absolute;
  left: 50%; top: 50%;
  width: 600px; height: 600px;
  border: 1px dashed rgba(124, 108, 176, 0.02);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* ── 3. Recent History Toggle & Drawer ───────── */
.history-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: #5a5a6b;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  transition: all 0.2s;
}

.history-toggle:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(124, 108, 176, 0.2);
  color: #1c1c28;
  transform: translateY(-1px);
}

.history-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-left: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.03);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.history-drawer.open {
  right: 0;
}

.drawer-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.drawer-header h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: #1a1a2e;
}

.drawer-close {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #a0a0b2;
  transition: color 0.15s;
}

.drawer-close:hover {
  color: #ef4444;
}

.drawer-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.no-history {
  text-align: center;
  color: #9090a1;
  font-size: 0.8rem;
  margin-top: 2rem;
}

.history-item {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.01);
  transition: border-color 0.2s, background 0.2s;
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(124, 108, 176, 0.15);
}

.h-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.h-time {
  font-size: 0.68rem;
  color: #9a9aab;
  font-family: 'Space Grotesk', monospace;
  font-weight: 500;
}

.h-files {
  font-size: 0.76rem;
  font-weight: 550;
  color: #2c2c3d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h-links {
  display: flex;
  gap: 6px;
}

.h-dl {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.15s;
}

.h-dl:hover {
  opacity: 0.8;
}

.h-dl.pdf { background: rgba(239, 68, 68, 0.08); color: #ef4444; }
.h-dl.docx { background: rgba(59, 130, 246, 0.08); color: #3b82f6; }

/* ── 1. Page & Workspace Layout ──────────────── */
.page{
  width:100%;
  max-width:960px;
  padding:0 2rem;
  z-index: 10;
  margin: 0 auto;
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  justify-content: center;
}

.workspace-left {
  width: 100%;
  max-width: 440px;
}

.workspace-right {
  width: 100%;
  max-width: 420px;
  display: flex;
  justify-content: center;
}

@media (min-width: 768px) {
  .workspace {
    display: grid;
    grid-template-columns: 440px 1fr;
    gap: 3.5rem;
    align-items: center;
  }
}

/* ── Header ──────────────────────────────────── */
header{
  text-align:center;
  margin-bottom:1.5rem;
}

.logo{
  height:44px;
  margin-bottom:6px;
  transition:transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.03));
}
.logo:hover{
  transform:scale(1.04) rotate(-1deg);
  filter: drop-shadow(0 4px 15px rgba(124,108,176,0.12));
}

.tagline{
  font-size:.82rem;
  color:#7e7e8f;
  font-weight:400;
  letter-spacing:.01em;
  line-height:1.4;
}

.tagline-dot {
  color: #7c6cb0;
  margin: 0 4px;
  font-weight: 600;
}

/* ── Card ────────────────────────────────────── */
.card-stack {
  width: 100%;
}

.card{
  position:relative;
  border-radius:24px;
  padding:1.5rem;
  transition:transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;

  background: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.45)) padding-box,
    linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.25) 50%, rgba(130, 110, 200, 0.25) 100%) border-box;
  border: 1px solid transparent;
  
  backdrop-filter:blur(30px) saturate(160%);
  -webkit-backdrop-filter:blur(30px) saturate(160%);
  
  box-shadow:
    0 12px 40px rgba(124, 108, 176, 0.05),
    0 24px 60px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 rgba(255,255,255,0.7);
    
  animation: card-entrance 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(110deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
  background-size: 200% 100%;
  background-position: 150% 0;
  transition: background-position 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 5;
}

.card:hover::after {
  background-position: -50% 0;
}

@keyframes card-entrance {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ── Upload row ──────────────────────────────── */
.upload-row{
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap:.75rem;
  margin-bottom:1.1rem;
}

/* ── Drop zone ───────────────────────────────── */
.drop{
  border: 1.5px dashed rgba(0, 0, 0, 0.08);
  border-radius:16px;
  padding:1.1rem .75rem;
  text-align:center;
  position:relative;
  transition:all .25s cubic-bezier(.16,1,.3,1);
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 110px;
  min-width: 0;
  overflow: hidden;
}

#drop-excel:hover, #drop-excel.over {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(220, 245, 230, 0.5));
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.08);
}

#drop-cover:hover, #drop-cover.over {
  border-color: rgba(59, 130, 246, 0.3);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(235, 240, 255, 0.5));
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.08);
}

.drop-empty{
  display:flex;flex-direction:column;align-items:center;gap:6px;
}

.drop-empty svg{
  color:#a0a0b2;
  transition:color .25s, transform .25s;
}

#drop-excel:hover .drop-empty svg {
  color:#10b981;
  transform: translateY(-2px) scale(1.05);
}

#drop-cover:hover .drop-empty svg {
  color:#3b82f6;
  transform: translateY(-2px) scale(1.05);
}

.drop-empty strong{
  font-size:.82rem;
  font-weight:550;
  color:#2c2c3d;
  letter-spacing: -0.01em;
}

.drop-empty span{
  font-size:.7rem;
  color:#9a9aab;
}

/* file selected state */
.drop-filled{
  display:flex;flex-direction:column;align-items:center;gap:4px;
  padding:4px 0;
  animation: pop .3s cubic-bezier(.16,1,.3,1);
  width: 100%;
  overflow: hidden;
}

/* Status rings when file selected */
.drop.has-file#drop-excel {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.1), 0 8px 24px rgba(16, 185, 129, 0.05);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(240, 255, 245, 0.3));
}

.drop.has-file#drop-cover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.1), 0 8px 24px rgba(59, 130, 246, 0.05);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(240, 245, 255, 0.3));
}

/* Styled Pill Badges for File Formats */
.file-badge {
  font-size: .6rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 5px;
  letter-spacing: .06em;
  margin-bottom: 2px;
  display: inline-block;
  text-transform: uppercase;
}

.file-badge.xlsx {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.file-badge.cover-badge {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.fname{
  font-size:.78rem;
  font-weight:550;
  color:#1c1c28;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  padding: 0 4px;
}

.fsize{
  font-family: 'Space Grotesk', 'SF Mono', Menlo, monospace;
  font-size:.65rem;
  color:#9a9aab;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.x{
  position:absolute;
  top:6px;right:6px;
  width:20px;height:20px;
  border:none;
  background:rgba(0,0,0,.04);
  border-radius:6px;
  font-size:12px;
  line-height:1;
  color:#a0a0b2;
  display:flex;align-items:center;justify-content:center;
  transition:background .15s,color .15s,transform .1s;
}

.x:hover{
  background:rgba(239,68,68,0.1);
  color:#ef4444;
  transform: scale(1.05);
}

/* ── Generate button ─────────────────────────── */
.btn-gen{
  width:100%;
  padding:.85rem;
  border:none;
  border-radius:12px;
  font-size:.92rem;
  font-weight:600;
  font-family:inherit;
  letter-spacing:-.01em;
  color:#fff;
  position:relative;
  overflow:hidden;
  transition:transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s, opacity 0.2s;

  background: linear-gradient(135deg, #2c2c3d 0%, #151522 50%, #2f254f 100%);
  box-shadow:
    0 4px 12px rgba(45,34,80,.18),
    0 12px 28px rgba(45,34,80,.12);
}

.btn-gen:hover:not(:disabled){
  transform:translateY(-2px);
  box-shadow:
    0 6px 16px rgba(45,34,80,.25),
    0 16px 36px rgba(45,34,80,.18);
}

.btn-gen:active:not(:disabled){
  transform:translateY(1px);
  box-shadow:
    0 2px 6px rgba(45,34,80,.1),
    0 6px 14px rgba(45,34,80,.08);
}

.btn-gen:disabled{
  opacity:.18;
  cursor:not-allowed;
  transform:none!important;
  box-shadow:none!important;
}

.btn-gen::after{
  content:'';
  position:absolute;
  top:0;left:-100%;
  width:50%;height:100%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,0.08),transparent);
  animation:shimmer 4s ease-in-out infinite;
}

@keyframes shimmer{
  0%{left:-100%}
  30%{left:150%}
  100%{left:150%}
}

/* Click Ripple effect styling */
.click-ripple {
  position: fixed;
  width: 10px;
  height: 10px;
  background: rgba(124, 108, 176, 0.22);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  animation: ripple-out 0.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
  pointer-events: none;
  z-index: 99999;
}

@keyframes ripple-out {
  to {
    transform: translate(-50%, -50%) scale(5);
    opacity: 0;
  }
}

/* ── Loading card ────────────────────────────── */
#card-loading{
  text-align:center;
  padding:2rem 1.5rem;
}

.loader-icon{
  font-size:2.2rem;
  animation:bounce .8s ease-in-out infinite alternate;
  margin-bottom:1rem;
  display: inline-block;
}

@keyframes bounce{
  from{transform:translateY(-4px) rotate(-3deg)}
  to{transform:translateY(4px) rotate(8deg)}
}

.loader-label{
  font-weight:600;
  color:#2c2c3d;
  margin-bottom:1.5rem;
  font-size: 1rem;
}

.steps{
  list-style:none;
  text-align:left;
  max-width:240px;
  margin:0 auto;
  background: rgba(255, 255, 255, 0.2);
  padding: 1rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.steps li{
  font-size:.82rem;
  color:#b0b0c2;
  padding:6px 0 6px 22px;
  position:relative;
  transition:color .3s, font-weight .3s;
}

.steps li::before{
  content:'';
  position:absolute;
  left:0;top:50%;
  transform:translateY(-50%);
  width:6px;height:6px;
  border-radius:50%;
  background:#d0d0e1;
  transition:all .3s;
}

.steps li.active{
  color:#151522;
  font-weight:600;
}

.steps li.active::before{
  background:#7c6cb0;
  box-shadow:0 0 10px rgba(124,108,176,0.5);
  transform:translateY(-50%) scale(1.4);
}

.steps li.done{color:#9090a1}
.steps li.done::before{
  background:#10b981;
  box-shadow:none;
  transform:translateY(-50%) scale(1);
}

/* ── Done card ───────────────────────────────── */
#card-done{
  text-align:center;
  padding:2.25rem 1.5rem;
}

.done-check{
  width:50px;height:50px;
  border-radius:50%;
  color:#fff;
  font-size:1.3rem;
  font-weight:700;
  display:inline-flex;align-items:center;justify-content:center;
  margin-bottom:1rem;
  animation:pop .5s cubic-bezier(.16,1,.3,1);
  background:linear-gradient(135deg,#10b981,#059669);
  box-shadow:0 6px 20px rgba(16,185,129,.25);
}

@keyframes pop{
  from{transform:scale(.4);opacity:0}
  to{transform:scale(1);opacity:1}
}

.done-label{
  font-weight:600;
  color:#2c2c3d;
  margin-bottom:1.5rem;
  font-size: 1.05rem;
}

.dl-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.75rem;
  margin-bottom:1.5rem;
}

.dl-row.single-btn {
  grid-template-columns: 1fr;
}

.dl{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  padding:1.1rem .75rem;
  border:1px solid rgba(0,0,0,.03);
  border-radius:14px;
  text-decoration:none;
  color:#2c2c3d;
  font-size:.85rem;
  font-weight:650;
  transition:all .25s cubic-bezier(.16,1,.3,1);
  background:linear-gradient(135deg,rgba(255,255,255,.5),rgba(255,255,255,.2));
  box-shadow: 0 4px 12px rgba(0,0,0,0.01);
}

.dl:hover{
  background:linear-gradient(135deg,rgba(255,255,255,.8),rgba(240,235,255,.4));
  border-color:rgba(124,108,176,.18);
  transform:translateY(-3px);
  box-shadow:0 10px 24px rgba(124,108,176,.08);
}

.dl-badge{
  font-size:.68rem;
  font-weight:800;
  padding:3px 8px;
  border-radius:6px;
  letter-spacing:.04em;
}

.dl-badge.pdf{background:rgba(239,68,68,.08);color:#ef4444}
.dl-badge.doc{background:rgba(59,130,246,.08);color:#3b82f6}

.btn-again{
  background:transparent;
  border:1px solid rgba(0,0,0,.08);
  color:#5a5a6b;
  padding:.65rem 1.5rem;
  border-radius:10px;
  font-size:.84rem;
  font-family:inherit;
  font-weight: 500;
  transition:all .2s;
}

.btn-again:hover{
  background:rgba(0,0,0,.02);
  border-color:rgba(0,0,0,.15);
  color: #1c1c28;
}

/* ── Satisfying Uploader Ripple Flash on Drop ── */
.drop-pulse {
  position: relative;
}

.drop-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  z-index: 4;
  animation: drop-ripple 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#drop-excel.drop-pulse::after {
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

#drop-cover.drop-pulse::after {
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.05);
}

@keyframes drop-ripple {
  0% {
    transform: scale(0.95);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.1);
    opacity: 0;
  }
}

/* ── Step-by-Step Toy loader bounce animation ── */
.toy-jump {
  animation: toy-jump-anim 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

@keyframes toy-jump-anim {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-12px) scaleY(1.2) scaleX(0.85); }
  50% { transform: translateY(-15px) rotate(12deg) scale(1.1); }
  80% { transform: translateY(2px) scaleY(0.85) scaleX(1.15); }
  100% { transform: translateY(0) scale(1); }
}

/* ── 2. Clean "Quick Specs" Technical Footer ── */
.tech-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 1.5rem;
  padding: 0 4px;
}

@media (min-width: 480px) {
  .tech-footer {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

.spec-card {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.01);
}

.spec-card h5 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: #7c6cb0;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.spec-card p {
  font-size: 0.68rem;
  color: #7e7e8f;
  line-height: 1.35;
}

/* Engine Active Pulse */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulse-dot-anim 1.8s infinite ease-in-out;
}

@keyframes pulse-dot-anim {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* ── 1. Interactive Preview Sheet Mockup ─────── */
.preview-sheet {
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  padding: 1rem;
  box-shadow: 
    0 12px 36px rgba(124, 108, 176, 0.03),
    0 2px 8px rgba(0,0,0,0.01);
  width: 100%;
  max-width: 380px;
  display: none;
  animation: card-entrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

@media (min-width: 768px) {
  .preview-sheet {
    display: block; /* only visible on desktop viewports */
  }
}

.sheet-paper {
  background: #ffffff;
  aspect-ratio: 1 / 1.414; /* A4 aspect ratio */
  width: 100%;
  border-radius: 16px;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.03),
    0 1px 3px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.03);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding-bottom: 8px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.sheet-logo-placeholder {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.65rem;
  color: #7c6cb0;
  letter-spacing: 0.06em;
}

.sheet-meta-placeholder {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
}

.sheet-meta-placeholder .line {
  height: 3px;
  background: rgba(0,0,0,0.06);
  border-radius: 2px;
}

.sheet-meta-placeholder .line.short {
  width: 40px;
}

/* Document Cover Slot */
.sheet-cover-container {
  height: 120px;
  border: 1px dashed rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  background: rgba(244, 245, 248, 0.5);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.sheet-cover-empty {
  text-align: center;
  color: #b0b0c2;
}

.cover-placeholder-icon {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.sheet-cover-empty p {
  font-size: 0.6rem;
  font-weight: 500;
}

.sheet-cover-filled {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pop .3s cubic-bezier(.16,1,.3,1);
}

.sheet-cover-filled img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* PDF cover message attachment slot */
.pdf-attached-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.pdf-icon-big {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 5px;
}

.pdf-attached-text {
  font-size: 0.6rem;
  color: #7e7e8f;
  font-weight: 500;
}

/* Mock lines matching questions checklist */
.sheet-content-mock {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.sheet-empty-prompt {
  margin: auto;
  text-align: center;
  color: #b0b0c2;
}

.sheet-empty-prompt p {
  font-size: 0.65rem;
  font-weight: 500;
}

.sheet-filled-questions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: pop .3s cubic-bezier(.16,1,.3,1);
}

.mock-question {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.q-title {
  display: flex;
  align-items: center;
  gap: 4px;
}

.q-title .bullet {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  color: #7c6cb0;
}

.q-title .q-text-line {
  height: 5px;
  background: rgba(0,0,0,0.1);
  border-radius: 3px;
  width: 80%;
}

.q-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding-left: 20px;
}

.opt-line {
  height: 4px;
  background: rgba(0,0,0,0.05);
  border-radius: 2px;
  width: 60%;
}

/* Watermark */
.sheet-watermark {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 0.52rem;
  color: #d0d0e1;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  user-select: none;
}

/* Mode tabs and panels styling */
.mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 1.25rem;
  background: rgba(0, 0, 0, 0.03);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.mode-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: #7e7e8f;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-tab.active {
  background: #ffffff;
  color: #1a1a2e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mode-tab:hover:not(.active) {
  color: #1a1a2e;
}

.mode-panel {
  animation: fade-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.single-drop {
  width: 100%;
  margin-bottom: 1.1rem;
  min-height: 130px;
}

#drop-word:hover, #drop-word.over {
  border-color: rgba(124, 108, 176, 0.4);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(240, 235, 255, 0.5));
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(124, 108, 176, 0.08);
}

#drop-word:hover .drop-empty svg {
  color: #7c6cb0;
  transform: translateY(-2px) scale(1.05);
}

.drop.has-file#drop-word {
  border-color: rgba(124, 108, 176, 0.4);
  box-shadow: inset 0 0 0 1px rgba(124, 108, 176, 0.1), 0 8px 24px rgba(124, 108, 176, 0.05);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(245, 240, 255, 0.3));
}
