.dazai-photo-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin: 12px 0 16px;
  padding: 10px 20px;
  border: 1px solid #e8b785;
  border-radius: 999px;
  background: linear-gradient(135deg, #a8392d, #74231f);
  color: #fff7e8;
  font: 700 15px/1.2 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  letter-spacing: .02em;
  box-shadow: 0 6px 24px rgba(80, 13, 12, .28);
  cursor: pointer;
}
.dazai-photo-open:hover { filter: brightness(1.12); transform: translateY(-1px); }
.dazai-photo-open:focus-visible,
.dazai-photo-modal button:focus-visible,
.dazai-photo-modal input:focus-visible { outline: 3px solid #e1ae73; outline-offset: 3px; }
.dazai-photo-modal[hidden], .dazai-photo-modal [hidden] { display: none !important; }
.dazai-photo-modal {
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: auto;
  background: rgba(21, 10, 12, .82);
  backdrop-filter: blur(12px);
}
.dazai-photo-dialog {
  width: min(100%, 1020px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid rgba(235, 198, 150, .5);
  border-radius: 22px;
  background: #23191a;
  color: #f7e9d3;
  box-shadow: 0 25px 100px rgba(0, 0, 0, .6);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.dazai-photo-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 13px;
  border-bottom: 1px solid rgba(235, 198, 150, .16);
}
.dazai-photo-kicker { color: #e9b989; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.dazai-photo-header h2 { margin: 5px 0 0; color: #fff3df; font-size: clamp(20px, 2.8vw, 28px); line-height: 1.3; }
.dazai-photo-close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(235, 198, 150, .35);
  border-radius: 50%;
  background: transparent;
  color: #fff3df;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.dazai-photo-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .82fr); gap: 24px; padding: 23px 28px 28px; }
.dazai-photo-shoot, .dazai-photo-output { min-width: 0; }
.dazai-photo-camera {
  display: block;
  width: min(100%, 300px);
  margin: 0 auto;
  padding: 14px 17px 20px;
  border: 0;
  border-radius: 26px 26px 22px 22px;
  background: linear-gradient(140deg, #fff9e9, #eadcc3);
  color: #702e29;
  text-align: left;
  box-shadow: inset 0 2px 2px rgba(255,255,255,.9), inset 0 -8px 15px rgba(119,75,49,.14), 0 18px 35px rgba(0,0,0,.35);
  cursor: pointer;
}
.dazai-photo-camera:hover { transform: translateY(-2px); }
.dazai-photo-camera-top { display: flex; align-items: center; justify-content: space-between; height: 46px; }
.dazai-photo-mark { color: #702e29; font-size: 12px; font-weight: 900; letter-spacing: .14em; }
.dazai-photo-lens {
  width: 31px;
  height: 31px;
  border: 6px solid #77332a;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #a8bcc0, #142a34 45%, #0c1117 68%);
  box-shadow: 0 0 0 2px #e5b985;
}
.dazai-photo-viewfinder {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 570 / 744;
  overflow: hidden;
  border: 8px solid #442426;
  border-radius: 12px;
  background: radial-gradient(circle at 35% 32%, #5d4a4b, #211c20 75%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  --figure-scale: .78;
  --figure-x: .65;
  background-size: cover;
  background-position: center;
}
.dazai-photo-viewfinder video,
.dazai-photo-uploaded { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dazai-photo-duo-preview video,
.dazai-photo-duo-preview .dazai-photo-uploaded {
  width: 62%;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 74%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0%, #000 74%, transparent 100%);
}
.dazai-photo-mirrored { transform: scaleX(-1); }
.dazai-photo-shot-preview { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; }
.dazai-photo-figure {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: calc(var(--figure-x) * 100%);
  width: auto;
  height: calc(var(--figure-scale) * 100%);
  max-width: none;
  transform: translateX(-50%);
  object-fit: contain;
  pointer-events: none;
}
.dazai-photo-viewhint {
  position: absolute;
  z-index: 2;
  right: 15px;
  bottom: 16px;
  left: 15px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(17, 14, 17, .72);
  color: #fff8e8;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.dazai-photo-camera-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 16px; }
.dazai-photo-slot { width: 44%; height: 8px; border-radius: 999px; background: #442426; box-shadow: inset 0 2px 3px #180e0f; }
.dazai-photo-shutter { font-size: 13px; font-weight: 800; }
.dazai-photo-status { min-height: 40px; margin: 14px 0 8px; color: #f1cfaa; font-size: 13px; line-height: 1.5; text-align: center; }
.dazai-photo-controls, .dazai-photo-actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.dazai-photo-upload-button, .dazai-photo-controls button, .dazai-photo-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 8px 13px;
  border: 1px solid rgba(232, 183, 133, .48);
  border-radius: 9px;
  background: #3b2726;
  color: #fff1dc;
  font: 700 13px/1.2 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  cursor: pointer;
}
.dazai-photo-start-camera { background: #a8442e !important; border-color: #e8b785 !important; }
.dazai-photo-upload-button { position: relative; overflow: hidden; }
.dazai-photo-upload-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dazai-photo-actions button { background: #8d352b; }
.dazai-photo-actions button:disabled { opacity: .43; cursor: not-allowed; }
.dazai-photo-sliders { display: grid; gap: 12px; margin: 19px auto 0; max-width: 405px; }
.dazai-photo-sliders label { display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: 8px; color: #e6d3bd; font-size: 13px; }
.dazai-photo-sliders input { width: 100%; accent-color: #cd7b55; }
.dazai-photo-scene {
  display: grid;
  gap: 10px;
  max-width: 405px;
  margin: 16px auto 0;
  padding: 12px 15px 13px;
  border: 1px solid rgba(232, 183, 133, .35);
  border-radius: 14px;
  background: rgba(255, 238, 208, .055);
}
.dazai-photo-scene legend { padding: 0 5px; color: #f5d7aa; font-size: 14px; font-weight: 800; }
.dazai-photo-scene-choice { display: flex; align-items: center; gap: 12px; }
.dazai-photo-scene-thumb { flex: 0 0 auto; width: 54px; height: 64px; object-fit: cover; border: 1px solid #a2775f; border-radius: 7px; }
.dazai-photo-scene-choice strong, .dazai-photo-scene-choice small { display: block; }
.dazai-photo-scene-choice strong { color: #fff0d7; font-size: 13px; }
.dazai-photo-scene-choice small { margin-top: 4px; color: #bfa78f; font-size: 11px; line-height: 1.4; }
.dazai-photo-scene label { display: flex; align-items: center; gap: 6px; color: #e6d3bd; font-size: 12px; }
.dazai-photo-scene input { accent-color: #ce8267; }
.dazai-photo-beauty {
  display: grid;
  gap: 9px;
  max-width: 405px;
  margin: 16px auto 0;
  padding: 13px 15px 12px;
  border: 1px solid rgba(232, 183, 133, .35);
  border-radius: 14px;
  background: rgba(255, 238, 208, .055);
}
.dazai-photo-beauty legend { padding: 0 5px; color: #f5d7aa; font-size: 14px; font-weight: 800; }
.dazai-photo-beauty legend small { margin-left: 7px; color: #bfa78f; font-size: 11px; font-weight: 400; }
.dazai-photo-beauty label:not(.dazai-photo-beauty-toggle) {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  color: #e6d3bd;
  font-size: 13px;
}
.dazai-photo-beauty input[type="range"] { width: 100%; accent-color: #db8a6a; }
.dazai-photo-beauty output { color: #e8b989; font-variant-numeric: tabular-nums; text-align: right; }
.dazai-photo-beauty-toggle { display: flex; align-items: center; gap: 6px; color: #f2d3b7; font-size: 12px; }
.dazai-photo-beauty-toggle input { accent-color: #ce8267; }
.dazai-photo-beauty p { margin: 2px 0 0; color: #ab9585; font-size: 11px; line-height: 1.5; }
.dazai-photo-result-wrap {
  position: relative;
  width: min(100%, 315px);
  margin: 0 auto;
  aspect-ratio: 638 / 1010;
  overflow: hidden;
  border: 1px solid #d9c5a8;
  background: #fffdf6;
  box-shadow: 0 12px 33px rgba(0,0,0,.3);
}
.dazai-photo-result { display: block; width: 100%; height: 100%; }
.dazai-photo-has-result .dazai-photo-result-wrap { animation: dazai-photo-eject .55s ease-out both; }
.dazai-photo-empty {
  position: absolute;
  inset: 20px 20px 120px;
  display: grid;
  place-items: center;
  border: 1px dashed #cfb89b;
  color: #815d4b;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}
.dazai-photo-spec, .dazai-photo-privacy { margin: 12px 0; color: #d9bea0; font-size: 12px; line-height: 1.5; text-align: center; }
.dazai-photo-privacy { color: #a9917f; }
@keyframes dazai-photo-eject { from { transform: translateY(-24px); opacity: .3; } to { transform: translateY(0); opacity: 1; } }
@media (max-height: 800px) and (min-width: 761px) {
  .dazai-photo-header { padding-top: 15px; padding-bottom: 9px; }
  .dazai-photo-content { padding-top: 14px; padding-bottom: 14px; }
  .dazai-photo-camera, .dazai-photo-result-wrap { width: min(100%, 245px); }
  .dazai-photo-sliders { gap: 8px; margin-top: 10px; }
}
@media (max-width: 760px) {
  .dazai-photo-modal { display: block; padding: 8px; }
  .dazai-photo-dialog { max-height: calc(100dvh - 16px); margin: auto; border-radius: 16px; }
  .dazai-photo-header { padding: 16px 16px 12px; }
  .dazai-photo-content { grid-template-columns: 1fr; gap: 20px; padding: 17px 16px 24px; }
  .dazai-photo-camera { width: min(100%, 320px); }
  .dazai-photo-result-wrap { width: min(100%, 300px); }
}
@media (prefers-reduced-motion: reduce) {
  .dazai-photo-open:hover, .dazai-photo-camera:hover { transform: none; }
  .dazai-photo-has-result .dazai-photo-result-wrap { animation: none; }
}
