:root{
  --bg0:#070A12;
  --bg1:#0B1020;
  --card:#0F1730cc;
  --stroke:#ffffff14;
  --text:#EAF0FF;
  --muted:#B9C3DE;
  --accent:#7C5CFF;
  --accent2:#00D7FF;
  --good:#35f2a8;
  --shadow: 0 20px 80px rgba(0,0,0,.55);
  --radius: 22px;
}

*{box-sizing:border-box}
html,body{height:100%}
html{background: linear-gradient(180deg, var(--bg0), var(--bg1));}

body{
  margin:0;
  min-height: 100svh;
  background-color: var(--bg0);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color:var(--text);
  background: radial-gradient(1200px 800px at 12% 20%, rgba(124,92,255,.22), transparent 60%),
              radial-gradient(900px 600px at 78% 10%, rgba(0,215,255,.18), transparent 55%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
}

.bg{
  position:fixed;
  inset:-20vmax;
  background:
    radial-gradient(closest-side at 20% 30%, rgba(124,92,255,.18), transparent 55%),
    radial-gradient(closest-side at 75% 40%, rgba(0,215,255,.14), transparent 60%),
    radial-gradient(closest-side at 55% 85%, rgba(53,242,168,.10), transparent 55%);
  filter: blur(50px);
  opacity:.9;
  pointer-events:none;
  transform: translateZ(0);
}

.wrap{max-width:1100px; margin:0 auto; padding:22px 18px}

.header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.brand{display:flex; align-items:center; gap:12px}
.logo{
  width:42px;height:42px;border-radius:14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 40px rgba(124,92,255,.25);
  display:grid; place-items:center;
  font-weight:900; letter-spacing:-.6px;
  color:#081022;
  user-select:none;
}
.title{font-weight:700; letter-spacing:.2px}
.subtitle{color:var(--muted); font-size:13px; margin-top:2px}

.nav{display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end}
.pill{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 12px;
  border:1px solid var(--stroke);
  border-radius:999px;
  color:var(--text);
  text-decoration:none;
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(10px);
}
.pill:hover{background: rgba(255,255,255,.07)}

.hero{padding:24px 0 10px}
.hero h1{
  margin:0;
  font-size: clamp(30px, 4vw, 52px);
  line-height:1.04;
  letter-spacing:-.8px;
}
.lead{color:var(--muted); max-width:68ch; margin:14px 0 0; font-size:16px; line-height:1.6}

.ctaRow{display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin-top:18px}

.cta{
  display:inline-flex; align-items:center; gap:10px;
  padding:12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124,92,255,.92), rgba(0,215,255,.62));
  color:#fff;
  font-weight:700;
  text-decoration:none;
  box-shadow: 0 16px 60px rgba(124,92,255,.25);
  border: 1px solid rgba(255,255,255,.15);
}
.cta:hover{filter:brightness(1.04)}
.ctaIcon{width:20px;height:20px;flex-shrink:0}

button.ghost, a.ghost{
  appearance:none;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color:var(--text);
  padding:12px 14px;
  border-radius: 14px;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font: inherit;
}
button.ghost:hover, a.ghost:hover{background: rgba(255,255,255,.07)}

.note{margin-top:10px; color: rgba(234,240,255,.7); font-size:13px}
.note code{color:rgba(234,240,255,.9)}

.card{
  margin-top:14px;
  border-radius: var(--radius);
  border:1px solid var(--stroke);
  background: var(--card);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.cardHeader{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  padding:16px 16px 10px;
}
.cardTitle{font-weight:700}
.cardSub{margin-top:4px; color:var(--muted); font-size:13px}

.status{
  display:inline-flex; align-items:center; gap:10px;
  padding:9px 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(0,0,0,.12);
  color:rgba(234,240,255,.85);
  font-size:13px;
  white-space:nowrap;
}
.status .dot{width:9px;height:9px;border-radius:99px;background:rgba(255,255,255,.35)}
.status.good .dot{background: var(--good)}
.status.bad .dot{background: #ff5d5d}

.frame{
  position:relative;
  margin: 0 12px 10px;
  border-radius: 18px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
}

.frame::before{
  content:"";
  display:block;
  padding-top: 56.25%; /* 16:9 */
}

.frame img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  background: rgba(0,0,0,.35);
}

.row{display:flex; gap:10px; flex-wrap:wrap; padding: 0 12px 14px}

.footer{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:center;
  color: rgba(234,240,255,.65);
  font-size:13px;
  padding: 18px 0 calc(30px + env(safe-area-inset-bottom));
}

.footer a{color: rgba(234,240,255,.75)}
.sep{opacity:.5}

/* Currently printing (card body) */
.nowBody{
  padding: 0 16px 16px;
}
.nowGrid{
  display:grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 12px;
}
.nowBlock{
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
.nowKey{
  color: rgba(234,240,255,.75);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 8px;
}
.nowVal{
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.nowUnit{
  margin-left: 2px;
  font-size: 16px;
  opacity: .85;
}
.bar{
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  overflow:hidden;
}
.barFill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(124,92,255,.92), rgba(0,215,255,.75));
  transition: width 500ms ease;
}

/* Past Prints section */
.pastBody{
  padding: 0 16px 16px;
}
.pastEmpty{
  color: var(--muted);
  font-size: 14px;
  padding: 12px 0;
}
.pastGrid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.pastCard{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.pastCard:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.pastGif{
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: rgba(0,0,0,.3);
  opacity: 0;
  transition: opacity .4s ease;
}
.pastGif.loaded{
  opacity: 1;
}
.pastInfo{
  padding: 12px 14px;
}
.pastName{
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.1px;
}
.pastMeta{
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

/* Past Print card interactions */
.pastCard.hasPhoto{
  cursor: pointer;
}
.pastCard.interactive{
  cursor: pointer;
}
.pastImgWrap{
  position: relative;
  overflow: hidden;
}
.pastTapHint{
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 10px;
  color: rgba(255,255,255,.7);
  font-size: 11px;
  text-align: center;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.pastTapExpand{
  background: linear-gradient(transparent, rgba(0,0,0,.7));
}
.pastTapCollapse{
  background: rgba(0,0,0,.45);
  color: rgba(255,255,255,.9);
  display: none;
}
.pastCard.interactive .pastTapExpand{
  opacity: 1;
}
.pastCard.expanded .pastTapExpand{
  opacity: 0 !important;
  display: none;
}
.pastCard.expanded .pastTapCollapse{
  display: block;
  opacity: 1;
  font-weight: 700;
}
.pastGif{
  transition: opacity .4s ease, transform .3s ease;
}
.pastCard.expanded .pastGif{
  /* subtle zoom on the final photo */
  transform: scale(1);
}

/* Action buttons row */
.pastActions{
  display: flex;
  gap: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .3s ease, opacity .25s ease, padding .3s ease;
  border-top: 1px solid transparent;
}
.pastCard.expanded .pastActions{
  max-height: 60px;
  opacity: 1;
  padding: 0;
  border-top-color: rgba(255,255,255,.08);
}
.pastAction{
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255,255,255,.06);
  cursor: pointer;
  transition: color .2s, background .2s;
  font-family: inherit;
}
.pastAction:last-child{
  border-right: none;
}
.pastAction:hover{
  color: var(--accent2);
  background: rgba(0,215,255,.06);
}
.pastAction svg{
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Description modal */
.descModal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.descModal.open{
  opacity: 1;
  pointer-events: auto;
}
.descBackdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
}
.descContent{
  position: relative;
  max-width: 480px;
  width: calc(100% - 40px);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--card);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transform: translateY(10px);
  transition: transform .25s ease;
}
.descModal.open .descContent{
  transform: translateY(0);
}
.descTitle{
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 12px;
}
.descText{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.descClose{
  margin-top: 16px;
  width: 100%;
}

/* Reactions */
.pastReactions{
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px 12px;
}
.reactBtn{
  appearance: none;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background .2s, border-color .2s, box-shadow .2s;
  font-family: inherit;
}
.reactBtn:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
}
.reactBtn.reacted{
  background: rgba(124,92,255,.15);
  border-color: rgba(124,92,255,.4);
  box-shadow: 0 0 8px rgba(124,92,255,.2);
  color: var(--text);
}
.reactCount{
  font-size: 12px;
  min-width: 8px;
  text-align: center;
}

@media (max-width: 720px){
  .nowGrid{grid-template-columns: 1fr}
  .pastGrid{grid-template-columns: 1fr}
}

@media (max-width: 520px){
  .status{display:none}
}
