.photo-text-badge { color: #382d1e; background: #fff0c8; border: 1px solid #b89259; }
.photo-dialog-head { position: sticky; z-index: 5; top: 0; background: #10262f; border-bottom: 1px solid #33545d; }
.photo-workspace { display: grid; min-width: 0; }
.photo-viewport { min-width: 0; }
.photo-dialog-stage { isolation: isolate; }
.photo-dialog-stage img { opacity: 1; transition: opacity .16s ease; }
.photo-dialog-stage img.photo-pending { opacity: 0; }
.photo-viewport > .log-btn { z-index: 3; }
.photo-loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; margin: 0; color: #c5d5d3; font-size: .9rem; }
.photo-annotations { position: absolute; inset: 0; pointer-events: none; }
.photo-annotation-frame { position: absolute; outline: 2px solid #ffdc85; background: #ffcc5b1a; box-shadow: 0 0 0 1px #42291a; border-radius: 3px; }
.photo-pin {
  position: absolute; transform: translate(-50%, -50%); pointer-events: auto;
  width: 44px; height: 44px; border: 0; padding: 0; border-radius: 50%;
  display: grid; place-items: center; isolation: isolate;
  font: 800 .88rem/1 system-ui,sans-serif; color: #282715; background: none; cursor: pointer;
}
.photo-pin::before { content: ''; position: absolute; inset: 8px; z-index: -1; border: 1px solid #3c3722; border-radius: 50%; background: #fff0b9; box-shadow: 0 2px 6px #0008; }
.photo-pin:is(:hover,[aria-pressed=true])::before { inset: 6px; background: #ffc77b; outline: 2px solid #fff0a0; }
.photo-pin[aria-pressed=true] { z-index: 2; }
.photo-pin:focus-visible { outline-offset: -2px; }
.photo-guide {
  min-width: 0; padding: clamp(10px, 2vw, 19px);
  color: #fbf2d5; background: #18353e;
}
.photo-guide-header { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.photo-guide-header h2 { font: 700 clamp(1.1rem, 2.5vw, 1.4rem)/1.15 Georgia,serif; margin: 0; }
.photo-guide-toggle[aria-pressed=true] { background: #294a49; border-color: #a9955e; }
.photo-guide-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.photo-guide-chip {
  display: inline-flex; gap: 7px; align-items: center; padding: 4px 9px; min-height: 44px;
  color: #f8edcf; background: #254750; border: 1px solid #5b766e; border-radius: 8px;
  font: 700 .79rem/1.2 system-ui,sans-serif; cursor: pointer; text-align: start;
}
.photo-guide-chip span { font-size: .8rem; color: #fff0ab; }
.photo-guide-chip[aria-pressed=true] { background: #f7e4b3; color: #16383b; border-color: #ffd586; }
.photo-guide-chip[aria-pressed=true] span { color: #67451f; }
.photo-guide-prompt, .photo-guide-note { margin: 9px 0 0; line-height: 1.4; color: #cedbd5; font-size: .84rem; }
.photo-guide-note:empty { display: none; }
.photo-guide-note { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.photo-guide-note.is-error { position: static; width: auto; height: auto; clip-path: none; }
.photo-translation {
  margin-top: 11px; padding: 13px; border-inline-start: 4px solid #bc804d; border-radius: 4px 8px 8px 4px;
  background: #fff4d4; color: #233e3c; overflow-wrap: anywhere;
}
.photo-translation h3 { font: 700 1.1rem/1.2 Georgia,serif; margin: 2px 0 7px; }
.photo-translation p { margin: 0; font-size: .92rem; line-height: 1.5; }
.photo-translation .photo-translation-kind { color: #704f2e; font-size: .77rem; font-weight: 700; }
.photo-guide-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; }
.photo-guide-actions .log-btn { justify-content: flex-start; min-height: 44px; }
.photo-guide-actions .primary { background: #176457; border-color: #176457; }
.photo-guide-source { margin-top: 10px; font-size: .84rem; }
.photo-guide-source summary { cursor: pointer; }
.photo-guide-source p { color: #584834; margin-top: 4px; }
@media (min-width: 761px) {
  .photo-workspace:has(.photo-guide:not([hidden])) { grid-template-columns: minmax(0,1fr) clamp(280px,34%,410px); }
  .photo-guide { max-height: clamp(148px,64dvh,840px); overflow: auto; overscroll-behavior: contain; border-inline-start: 1px solid #48646a; }
}
@media (max-width: 760px) {
  .photo-workspace:has(.photo-guide:not([hidden])) .photo-dialog-stage { height: clamp(194px,42dvh,470px); }
  .photo-guide { border-top: 1px solid #48646a; }
}
@media print { .photo-dialog { display: none !important; } }
