.camera-divider {
  margin: 14px 4px 8px;
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: .5;
}

#site-watermark {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 9;
  pointer-events: none;
  color: rgba(255,255,255,.52);
  font: 600 10px/1.2 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .35px;
  text-shadow: 0 1px 8px rgba(0,0,0,.75);
}

.pair-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  text-align: center;
}

.pair-code {
  margin: 6px 0;
  color: #d4b8ff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 5px;
}

.pair-url { font-size: 11px; opacity: .65; word-break: break-all; }
.pair-status { margin-top: 10px; font-size: 12px; color: #b8d4ff; }
.pair-qr, .share-qr {
  width: min(230px, 78vw);
  margin: 10px auto;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  color: #111;
}
.pair-qr svg, .share-qr svg { display: block; width: 100%; height: auto; }

.gallery-actions { display: grid; gap: 6px; }
.share-results-btn {
  width: 100%;
  padding: 8px 6px;
  border: 1px solid rgba(201,179,255,.35);
  border-radius: 9px;
  background: rgba(201,179,255,.16);
  color: #fff;
  font-size: 10px;
  cursor: pointer;
}
.share-results-btn:disabled { opacity: .45; cursor: wait; }

.share-state, .share-ready, .share-error { padding: 18px 6px; text-align: center; }
.share-state p, .share-ready p { margin: 8px 0; }
.share-state small, .share-expiry { opacity: .6; font-size: 12px; }
.share-spinner {
  width: 32px; height: 32px; margin: 4px auto 14px;
  border: 3px solid rgba(255,255,255,.16);
  border-top-color: #d4b8ff;
  border-radius: 50%;
  animation: share-spin .8s linear infinite;
}
@keyframes share-spin { to { transform: rotate(360deg); } }
.share-link {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 15px;
  border-radius: 12px;
  background: #d4b8ff;
  color: #1a1228;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 680px) {
  #start-screen {
    min-height: 100dvh;
    justify-content: center;
    gap: 14px;
    padding: max(20px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
    overflow-y: auto;
  }
  #start-screen h1 { font-size: clamp(31px, 10vw, 44px); line-height: 1.08; }
  #start-screen .artist { font-size: 10px; letter-spacing: 2.4px; }
  #start-screen .desc { max-width: 340px; font-size: 13px; line-height: 1.55; }
  .start-actions { width: min(330px, 100%); flex-direction: column; gap: 8px; margin-top: 4px; }
  #start-btn, #pair-start-btn { width: 100%; margin: 0; padding: 13px 18px; font-size: 14px; }

  #hud {
    top: max(8px, env(safe-area-inset-top));
    left: 8px;
    max-width: calc(100vw - 112px);
    padding: 8px 10px;
    font-size: 11px;
  }
  #status { font-size: 12px; }
  #audio-hint { font-size: 9px; }

  #toolbar {
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(6px, env(safe-area-inset-left));
    right: max(6px, env(safe-area-inset-right));
    width: auto;
    max-width: none;
    transform: none;
    flex-wrap: nowrap;
    gap: 3px;
    padding: 5px;
    border-radius: 18px;
    overflow: hidden;
  }
  .tb-btn {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .tb-btn.snap { flex-basis: 40px; width: 40px; height: 40px; font-size: 18px; }
  .tb-btn.picker {
    flex-basis: 32px;
    width: 32px;
    min-width: 32px;
    padding: 0;
    justify-content: center;
  }
  .tb-btn.picker .lbl { display: none; }
  .blur-ctrl {
    flex: 1 1 82px;
    min-width: 74px;
    max-width: 94px;
    height: 32px;
    gap: 3px;
    padding: 4px 6px;
  }
  .blur-ctrl .blur-icon { font-size: 12px; }
  #blur-range { width: 40px; min-width: 30px; }
  #blur-value { min-width: 14px; font-size: 10px; }
  #vol-range { flex: 1 1 38px; width: 38px; min-width: 28px; max-width: 46px; }

  #lyric {
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + 62px);
    max-width: calc(100vw - 32px);
    width: max-content;
    padding: 8px 14px;
  }
  #lyric .line1, #lyric.session-mode .line1 { font-size: clamp(24px, 8vw, 36px); }
  #lyric .line2 { margin-top: 6px; font-size: 13px; }

  #gallery-panel {
    top: max(68px, calc(env(safe-area-inset-top) + 60px));
    right: 6px;
    width: 96px;
    max-height: calc(100dvh - 154px);
    transform: none;
    gap: 6px;
    padding: 6px;
  }
  .share-results-btn { font-size: 9px; }
  #site-watermark {
    right: 8px;
    bottom: calc(max(6px, env(safe-area-inset-bottom)) + 50px);
    font-size: 8px;
  }

  #picker-modal { max-height: min(86dvh, 720px); }
  #modal-body { max-height: calc(min(86dvh, 720px) - 66px); padding: 8px 12px 20px; }
  .modal-header { padding: 14px 16px 10px; }
  .theme-grid { gap: 8px; }
  .theme-card { padding: 9px; border-radius: 14px; }
  .theme-swatch { height: 42px; margin-bottom: 7px; }
  .camera-item { gap: 9px; padding: 11px 12px; border-radius: 13px; }
  .pair-card { padding: 10px; }
  .pair-qr, .share-qr { width: min(210px, 62vw, 34dvh); padding: 8px; }
  .pair-code { margin: 4px 0; font-size: 24px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  #start-screen {
    justify-content: center;
    gap: 7px;
    padding: max(8px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  }
  #start-screen h1 { font-size: clamp(28px, 7vh, 38px); }
  #start-screen .artist { font-size: 9px; }
  #start-screen .desc { max-width: 620px; font-size: 11px; line-height: 1.4; }
  .start-actions { width: auto; flex-direction: row; gap: 8px; margin-top: 2px; }
  #start-btn, #pair-start-btn { width: auto; min-width: 190px; padding: 10px 18px; font-size: 12px; }

  #hud { top: max(6px, env(safe-area-inset-top)); left: max(6px, env(safe-area-inset-left)); }
  #toolbar {
    bottom: max(5px, env(safe-area-inset-bottom));
    width: auto;
    max-width: calc(100vw - 24px);
    flex-wrap: nowrap;
    padding: 5px 8px;
    border-radius: 24px;
  }
  .tb-btn { width: 34px; height: 34px; }
  .tb-btn.snap { width: 42px; height: 42px; }
  .tb-btn.picker .lbl { display: none; }
  .blur-ctrl { padding: 4px 7px; }
  #blur-range, #vol-range { width: 52px; }

  #lyric { bottom: 58px; max-width: 68vw; padding: 5px 12px; }
  #lyric .line1, #lyric.session-mode .line1 { font-size: clamp(22px, 8vh, 34px); }
  #lyric .line2 { margin-top: 3px; font-size: 11px; }

  #gallery-panel {
    top: max(6px, env(safe-area-inset-top));
    right: max(6px, env(safe-area-inset-right));
    bottom: 58px;
    width: 86px;
    max-height: none;
    transform: none;
  }
  #site-watermark { right: 8px; bottom: 4px; font-size: 8px; }

  #modal-backdrop { align-items: center; padding: 8px; }
  #picker-modal {
    width: min(620px, calc(100vw - 16px));
    max-height: calc(100dvh - 16px);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 20px;
  }
  #modal-body { max-height: calc(100dvh - 78px); padding-bottom: 12px; }
  .modal-header { padding: 10px 16px 7px; }
  .modal-header h2 { font-size: 17px; }
  .modal-close { width: 30px; height: 30px; }
  .theme-grid { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .theme-card { padding: 7px; }
  .theme-swatch { height: 28px; }
  .camera-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .camera-item { padding: 8px 10px; }
  .pair-qr, .share-qr { width: min(150px, 35dvh); margin: 5px auto; padding: 6px; }
  .pair-code { margin: 2px 0; font-size: 20px; }
  .pair-status { margin-top: 5px; }
}
