* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #eee2d0; color: #513922; font: 1rem/1.55 Georgia, serif; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#editor { width: min(100%, 1160px); margin: auto; background: #faf5e9; }
.studio-hero {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(150px,.42fr); align-items: center;
  gap: clamp(24px,6vw,85px); padding: clamp(30px,6vw,82px);
  background: linear-gradient(90deg,#f9eedccd 30%,#f9eedc36), url(album/assets/linen.png) center 36% / cover;
  border-bottom: 1px solid #d4bd99;
}
.hero-copy > p { font-size: .92rem; letter-spacing: .12em; margin: 0 0 8px; color: #6f4b23; }
h1, h2 { margin: 0; color: #7e551c; font-weight: 400; line-height: 1.08; }
h1 { font-size: clamp(48px,8vw,99px); letter-spacing: -.06em; }
h2 { font-size: clamp(26px,4vw,42px); letter-spacing: -.025em; }
.privacy { margin-top: clamp(22px,4vw,42px); max-width: 470px; }
.privacy h2 { font-size: clamp(20px,2.5vw,28px); }
.privacy p { margin: 8px 0; }
.privacy p:last-child { color: #775020; }
.hero-print { display: block; width: min(100%,255px); margin: auto; border: 6px solid #fff9eb; box-shadow: 2px 12px 26px #56381f42; transform: rotate(4deg); }
form { padding: 0 clamp(20px,6vw,78px); }
.photo-studio, .finishing, .studio-actions { padding-block: clamp(24px,4vw,45px); }
.section-heading { display: flex; align-items: baseline; gap: 10px 20px; flex-wrap: wrap; }
#photo-count { color: #705537; font-size: .9rem; margin: 0; }
.photo-picker { margin-top: 16px; padding: 17px; border: 1px solid #c7ab82; text-align: center; background: #f4ead9; }
.choose { position: relative; display: inline-grid; place-items: center; min-height: 46px; padding: 8px 19px; border: 1px solid #a17e4f; background: #fffaf1; cursor: pointer; }
.choose input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
.choose:has(input:focus-visible) { outline: 2px solid #795221; outline-offset: 3px; }
.choose:has(input:disabled) { opacity: .6; cursor: default; }
.hint { color: #684e36; font-size: .91rem; margin: 8px 0 0; }
#photos { list-style: none; padding: 0; margin: 20px 0 0; display: grid; align-items: start; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px 22px; }
#photos:empty { display: none; }
#photos li { min-width: 0; }
.print-mat { display: grid; grid-template: minmax(0,1fr) / minmax(0,1fr); place-items: center; aspect-ratio: 5/4; background: #f1e7d7; }
#photos img { width: auto; height: auto; display: block; max-width: 100%; max-height: 100%; object-fit: contain; border: 5px solid #fffefa; box-shadow: 0 4px 10px #5b3f2735; }
#studio-credit a { color: #6b4825; text-decoration-color: #a17e4f; text-underline-offset: .15em; }
.photo-details { border-bottom: 1px solid #ddc9ab; margin-top: 5px; }
.photo-details summary { cursor: pointer; min-height: 44px; padding: 9px 3px; color: #714a23; }
.photo-fields { display: grid; gap: 8px; }
.photo-fields label { display: block; font-size: .9rem; }
.photo-actions, .actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.photo-actions { margin: 9px 0; }
.photo-actions button { font-size: .86rem; padding-inline: 7px; }
.finishing { border-top: 1px solid #d8bc96; display: grid; grid-template-columns: 1.25fr .75fr; gap: 32px; }
.finishing h2 { margin-bottom: 13px; }
.finishing label:not(.sr) { display: block; margin-top: 9px; }
.finishing label span { color: #705537; font-size: .84em; }
input, textarea, select, button { font: inherit; color: inherit; }
input:not([type=file]), textarea, select { width: 100%; min-height: 44px; display: block; background: #fffaf2; border: 1px solid #ad9270; border-radius: 2px; padding: 7px 9px; margin-top: 4px; }
button { min-height: 44px; padding: 7px 13px; border: 1px solid #9d794a; border-radius: 2px; background: #fff9ed; cursor: pointer; }
button:disabled { opacity: .56; cursor: default; }
button:hover:not(:disabled), .choose:hover { background: #f3e5cd; }
:focus-visible { outline: 2px solid #795221; outline-offset: 3px; }
#audition { margin-top: 10px; }
.studio-actions { border-top: 1px solid #d8bc96; }
#preview { background: #6f4924; border-color: #6f4924; color: #fff8ea; padding-inline: 23px; }
#preview:hover:not(:disabled) { background: #54351a; }
#clear { border-color: transparent; background: transparent; text-decoration: underline; text-underline-offset: .2em; }
#status { white-space: pre-line; }
#status:empty { display: none; }
.preview-bar { display: flex; justify-content: center; background: #f5ede1; padding: 7px; }
#preview-view { height: 100vh; height: 100dvh; grid-template-rows: auto minmax(0,1fr); display: grid; }
#preview-view iframe { border: 0; height: 100%; width: 100%; }
@media (max-width: 640px) {
  .studio-hero { grid-template-columns: minmax(0,1fr); gap: 0; padding: 28px 20px 25px; }
  .hero-print { display: none; }
  .privacy { margin-top: 19px; }
  .privacy p { font-size: .93rem; }
  #photos { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  .finishing { grid-template-columns: minmax(0,1fr); gap: 23px; }
  #preview { width: 100%; }
}



#orientation-tip {
  width: min(calc(100% - 36px), 425px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 28px clamp(17px,5vw,33px) 24px;
  border: 1px solid #b99562;
  background: linear-gradient(#faf2e6c9,#faf2e6de), url(album/assets/linen.png) center / cover;
  color: #513922;
  text-align: center;
  box-shadow: 0 18px 52px #3b271a32;
}
#orientation-tip::backdrop { background: #503a2d80; }
#orientation-tip h2 { font-size: clamp(24px,7vw,32px); }
#orientation-tip p { margin: 12px auto 16px; max-width: 28ch; }
#continue-portrait { background: #fffaf1; font-size: .94rem; }
.rotation-phone {
  display: block;
  width: 25px;
  height: 40px;
  margin: 3px auto 24px;
  border: 2px solid #94703f;
  border-radius: 5px;
  position: relative;
  animation: suggest-rotation 2.8s ease-in-out 2;
}
.rotation-phone::after {
  content: "";
  position: absolute;
  inset: auto 6px 4px;
  border-top: 1px solid #94703f;
}
@keyframes suggest-rotation {
  0%, 18% { transform: rotate(0deg); }
  48%, 82% { transform: rotate(90deg); }
  100% { transform: rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  .rotation-phone { animation: none; }
}
