:root{
  --bg:#f6f7f8;
  --card:#ffffff;
  --muted:#666;
  --accent:#1f8ceb;
}

*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  background:var(--bg);
  color:#111;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.container{
  width:100%;
  max-width:900px;
  background:var(--card);
  border-radius:12px;
  box-shadow:0 8px 24px rgba(16,24,40,0.08);
  padding:12px;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
}

/* Photo */
.photo-card{
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  margin-right:12px;
}
.photo-card img{
  width:100%;
  max-height:64vh;
  object-fit:contain;
  border-radius:8px;
  background:#eee;
  touch-action: manipulation;
}
.photo-card figcaption{
  font-size:13px;
  color:var(--muted);
  text-align:center;
  user-select:none;
}

/* Controls */
.controls{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:120px;
}
button{
  background:transparent;
  border:1px solid rgba(16,24,40,0.08);
  padding:10px 12px;
  border-radius:8px;
  font-weight:600;
  color:#111;
  min-height:44px;
  cursor:pointer;
}
button#download{
  background:linear-gradient(180deg,var(--accent),#0f6fb8);
  color:#fff;
  border:0;
}
button:active{transform:scale(.995)}
@media (max-width:640px){
  .container{
    flex-direction:column;
    padding:10px;
  }
  .controls{
    flex-direction:row;
    width:100%;
    justify-content:space-between;
    min-width:0;
  }
}