.photo-tag-gallery-layer{position:absolute;pointer-events:none;z-index:3}.photo-tag-gallery-layer.is-drawing{pointer-events:auto;touch-action:none;cursor:crosshair}.photo-tag-rect{position:absolute;box-sizing:border-box;border:1px solid var(--tag-color,#82d5b4);border-radius:7px 7px 0 0;box-shadow:0 0 0 1px #0005,inset 0 0 0 1px #ffffff12}.photo-tag-rect.is-pending{border-style:dashed}.photo-tag-name{position:absolute;top:100%;left:-1px;width:calc(100% + 2px);box-sizing:border-box;padding:4px 3px;background:linear-gradient(180deg,#22303df5,#101b27fa);border:1px solid var(--tag-color,#82d5b4);border-top:0;border-radius:0 0 7px 7px;color:#f4f8fc;font:700 11px/1.25 system-ui;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-decoration:none;pointer-events:auto}.photo-tag-rect.is-small .photo-tag-name{font-size:9px;padding:3px 1px}.is-drawing .photo-tag-name{pointer-events:none}.photo-tag-rect.is-draft{--tag-color:#fff;background:#ffffff12}.photo-tag-bar{position:absolute;z-index:15;left:50%;bottom:calc(18px + env(safe-area-inset-bottom));transform:translateX(-50%);max-width:calc(100% - 110px);box-sizing:border-box;font:12px/1.4 system-ui;color:#edf5ff;text-align:center}.photo-tag-bar button{font:600 12px/1.2 system-ui;color:#eef6ff;background:#1b2635ed;border:1px solid #ffffff26;border-radius:24px;min-height:38px;padding:9px 14px;cursor:pointer;white-space:nowrap;box-shadow:0 3px 16px #0003}.photo-tag-bar button:hover{background:#304154}.photo-tag-bar button:disabled{opacity:.5;cursor:default}.photo-tag-bar button:focus-visible,.photo-tag-name:focus-visible{outline:2px solid #fff;outline-offset:3px}.photo-tag-bar.is-expanded{width:360px;padding:10px;border:1px solid #ffffff20;border-radius:18px;background:#101a28f2;backdrop-filter:blur(14px)}.photo-tag-controls{display:inline-flex;gap:6px;margin-left:6px}.photo-tag-controls:empty{display:none}.photo-tag-controls button{background:#82d5b4;color:#10291e;border-color:transparent}.photo-tag-status{font-size:11px;color:#b5c4d5;margin-top:7px}.photo-tag-status:empty{display:none}.photo-tag-list{max-height:20dvh;overflow:auto;overscroll-behavior:contain}.photo-tag-row{display:flex;align-items:center;gap:6px;text-align:left;padding-top:8px}.photo-tag-row>span{flex:1;min-width:0;overflow-wrap:anywhere;font-size:11px}.photo-tag-row button{font-size:10px;min-height:32px;padding:6px 9px}:is(.photo-lightbox,.wall-gallery-active).is-tagging .photo-swipe-stage{touch-action:none}:is(.photo-lightbox,.wall-gallery-active).is-tagging .photo-swipe-hint{visibility:hidden}:is(.photo-lightbox,.wall-gallery-active).is-tagging .photo-lightbox-nav{visibility:hidden}:is(.photo-lightbox,.wall-gallery-active) .photo-swipe-hint{bottom:68px}@media(max-width:600px){.photo-tag-bar{bottom:calc(14px + env(safe-area-inset-bottom));max-width:calc(100% - 96px)}.photo-tag-bar.is-expanded{max-width:calc(100% - 24px);bottom:calc(62px + env(safe-area-inset-bottom))}}

/* Shared gallery actions stay below the photograph. */
.photo-tag-dock{position:absolute;z-index:15;left:50%;bottom:calc(16px + env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:10px;width:max-content;max-width:calc(100% - 24px);font-family:system-ui,sans-serif}
.photo-tag-dock .photo-tag-bar,.photo-tag-dock .photo-tag-bar.is-expanded{position:static;transform:none;width:auto;max-width:none;padding:0;border:0;background:none;backdrop-filter:none}
.photo-tag-dock .photo-tag-toggle{display:flex;align-items:center;justify-content:center;gap:9px;height:42px;padding:0 14px;border-radius:13px;border-color:#a8c5d532;background:linear-gradient(145deg,#263847,#16232f);box-shadow:inset 0 1px #ffffff10,0 6px 20px #0004;font-size:12px;color:#edf6fc}
.photo-tag-toggle i{font-size:15px;color:#9bc8dc}.photo-tag-toggle[aria-expanded=true]{border-color:#82d5b46b}.photo-tag-toggle[aria-expanded=true] i{color:#82d5b4}
:is(.photo-lightbox,.wall-gallery-active) .photo-tag-dock .photo-lightbox-heart{position:static;transform:none;inset:auto;min-width:82px;height:42px;padding:0 14px;gap:9px;border-radius:13px;font-size:13px}
:is(.photo-lightbox,.wall-gallery-active) .photo-tag-dock .photo-lightbox-heart>i{font-size:20px}:is(.photo-lightbox,.wall-gallery-active) .photo-tag-dock .photo-lightbox-heart>b{padding-left:10px}
.photo-tag-panel{display:none;position:absolute;bottom:calc(100% + 12px);left:50%;transform:translateX(-50%);width:min(360px,calc(100vw - 24px));box-sizing:border-box;padding:9px 11px;border:1px solid #adc8dd26;border-radius:14px;background:#111e2bdc;box-shadow:0 12px 40px #0005;backdrop-filter:blur(14px);text-align:center}
.is-expanded .photo-tag-panel{display:block}.photo-tag-controls{margin:0}.photo-tag-list:empty{display:none}.photo-tag-status{margin-top:6px}.photo-tag-row{border-top:1px solid #ffffff0c;margin-top:8px;padding-top:8px}.photo-tag-row button{border-radius:9px}.photo-tag-rect{border-radius:7px 7px 0 0;box-shadow:0 0 0 1px #0005,inset 0 0 0 1px #ffffff12,0 3px 12px #0002}.photo-tag-name{padding:6px 5px;border-radius:0 0 7px 7px;box-shadow:inset 0 -2px 0 color-mix(in srgb,var(--tag-color,#82d5b4) 24%,transparent),0 4px 10px #0004;letter-spacing:.15px;text-shadow:0 1px 2px #0008}.photo-tag-rect.is-small{border-radius:3px 3px 0 0}.photo-tag-rect.is-small .photo-tag-name{padding:3px 1px;border-radius:0 0 3px 3px}.photo-tag-rect:focus-within{z-index:4;filter:brightness(1.12)}
@media(max-height:500px){.photo-tag-panel{padding:8px}.photo-tag-list{max-height:16dvh}.photo-tag-dock{bottom:8px}}

/* Mini profile identity, using the gallery's slate surfaces and badge artwork. */
.photo-tag-rect{
  border:1px solid var(--tag-color,#82d5b4);
  border-color:color-mix(in srgb,var(--tag-color,#82d5b4) 68%,transparent);
  border-radius:10px;
  box-shadow:0 0 0 1px #0004,inset 0 0 0 1px #ffffff08;
}
.photo-tag-rect::before,.photo-tag-name::before{display:none}
.photo-tag-name{
  display:flex;align-items:center;justify-content:center;gap:5px;
  top:calc(100% + 4px);left:-1px;width:calc(100% + 2px);
  padding:4px 5px;border:1px solid #b8d4e32b;border-top-color:#cde6ee45;
  border-radius:8px;
  background:linear-gradient(125deg,#233542d9,#101b28e6);color:#e5eff6;
  font:650 11px/1.4 system-ui,sans-serif;letter-spacing:.1px;
  text-shadow:0 1px 2px #0004;
  box-shadow:inset 2px 0 0 var(--tag-color,#82d5b4),inset 0 1px 0 #ffffff07,0 4px 10px #0003;
}
.photo-tag-identity{display:flex;align-items:center;justify-content:center;flex:0 0 16px;width:16px;height:16px;color:var(--tag-color,#82d5b4);font-size:9px}
:is(.photo-lightbox,.wall-gallery-active) .photo-tag-identity>img{position:static;display:block;width:16px;height:16px;max-width:16px;max-height:16px;object-fit:contain;border:0;border-radius:0;box-shadow:none}
.photo-tag-name .photo-tag-nick{min-width:0}
.photo-tag-rect.is-pending{border-style:dashed}
.photo-tag-rect.is-small{border-radius:6px}
.photo-tag-rect.is-small .photo-tag-name{
  top:calc(100% + 3px);padding:3px 2px;border-radius:5px;gap:0;
  font-size:9px;font-weight:650;letter-spacing:0;
}
.photo-tag-rect.is-small .photo-tag-identity{display:none}
.photo-tag-rect:focus-within{filter:none;z-index:4}
.photo-tag-name:hover,.photo-tag-name:focus-visible{background:linear-gradient(125deg,#2b4252,#162536);color:#fff;border-color:var(--tag-color,#82d5b4)}
.photo-tag-rect.is-draft{border:2px solid #e5eff6;border-radius:10px;background:#ffffff06;box-shadow:0 0 0 1px #0006}

/* Reuse the active profile nickname effect on the text only. */
.photo-tag-nick{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(prefers-reduced-motion:reduce){.photo-tag-nick,.photo-tag-nick::before,.photo-tag-nick::after{animation:none!important;transition:none!important}}

/* Minimal frame; the existing badge sits quietly in the upper corner. */
.photo-tag-rect{border-radius:5px;box-shadow:0 0 0 1px #0003;animation:photo-tag-reveal .22s ease-out both}
.photo-tag-name{top:calc(100% + 3px);padding:3px 4px;border-radius:5px;background:#13202dcc;border:1px solid #cde6ee24;box-shadow:0 2px 6px #0002;font-size:10px}
.photo-tag-identity,.photo-tag-rect.is-small .photo-tag-identity{position:absolute;top:3px;right:3px;display:flex;width:10px;height:10px;pointer-events:none}
:is(.photo-lightbox,.wall-gallery-active) .photo-tag-identity>img{width:10px;height:10px;max-width:10px;max-height:10px}
.photo-tag-rect.is-small .photo-tag-name{padding:2px 1px;font-size:9px}
.photo-tag-rect.is-draft{animation:none}
:is(.photo-lightbox,.wall-gallery-active).is-dragging .photo-tag-gallery-layer{opacity:.2}
:is(.photo-lightbox,.wall-gallery-active).is-dragging .photo-tag-nick{animation-play-state:paused!important}
@keyframes photo-tag-reveal{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.photo-tag-rect{animation:none}}

/* Keep tags out of the way during gallery navigation. */
.photo-tag-gallery-layer{transition:opacity .12s ease-out}
:is(.photo-lightbox,.wall-gallery-active).is-dragging .photo-tag-gallery-layer{opacity:0}
@media(prefers-reduced-motion:reduce){.photo-tag-gallery-layer{transition:none}}

/* Match the existing gallery owner card rather than a separate label theme. */
.photo-tag-rect:not(.is-draft){
  border:1px solid var(--tag-color,#82d5b4);
  border-color:color-mix(in srgb,var(--tag-color,#82d5b4) 70%,transparent);
  border-radius:8px 8px 0 0;box-shadow:0 0 0 1px #0003;
}
.photo-tag-name,.photo-tag-rect.is-small .photo-tag-name{
  top:100%;bottom:auto;left:-1px;width:calc(100% + 2px);
  padding:4px 4px;border:1px solid #b8d4e323;border-top-color:#cde6ee3b;
  border-radius:0 0 8px 8px;
  background:linear-gradient(125deg,#233542eb,#101b28eb);
  box-shadow:0 4px 12px #0003,inset 0 1px 0 #ffffff07;
  color:#e5eff6;font-size:11px;font-weight:650;line-height:1.4;
  text-shadow:0 1px 2px #0004;
}
.photo-tag-rect.is-small .photo-tag-name{padding:2px 1px;font-size:9px;border-radius:0 0 5px 5px}
.photo-tag-name:hover,.photo-tag-name:focus-visible{background:linear-gradient(125deg,#2b4152ed,#162536ed);color:#fff;border-color:#b8d4e34d;box-shadow:0 4px 12px #0003;text-decoration:none}
.photo-tag-rect.is-pending{border-style:dashed}
.photo-tag-identity,.photo-tag-rect.is-small .photo-tag-identity{top:3px;bottom:auto;right:3px;width:8px;height:8px;background:none;padding:0}
:is(.photo-lightbox,.wall-gallery-active) .photo-tag-identity>img{width:8px;height:8px;max-width:8px;max-height:8px}

/* Only the surface is translucent; text effects and the outline stay opaque. */
.photo-tag-rect:not(.is-draft){border-color:var(--tag-color,#82d5b4)}
.photo-tag-name,.photo-tag-rect.is-small .photo-tag-name{
  opacity:1;border:1px solid var(--tag-color,#82d5b4);
  background:linear-gradient(125deg,#233542b8,#101b28cc);color:#e5eff6;
}
.photo-tag-name:hover,.photo-tag-name:focus-visible{border-color:var(--tag-color,#82d5b4)}

/* One continuous outline, with a single dividing line above the nickname. */
.photo-tag-rect:not(.is-draft){border-radius:7px 7px 0 0}
.photo-tag-name,.photo-tag-rect.is-small .photo-tag-name{
  top:100%;left:-1px;width:calc(100% + 2px);
  border-top:0;border-radius:0 0 7px 7px;
  padding:4px 5px;
  background:linear-gradient(135deg,#233542b3,#101b28d1);
  box-shadow:inset 0 -1px 0 #ffffff06,0 3px 8px #0003;
  letter-spacing:.1px;
}
.photo-tag-rect.is-small{border-radius:4px 4px 0 0}
.photo-tag-rect.is-small .photo-tag-name{padding:2px 1px;border-radius:0 0 4px 4px;letter-spacing:0}
.photo-tag-name:hover,.photo-tag-name:focus-visible{
  border-top:0;background:linear-gradient(135deg,#2b4152ce,#162536e3);
  box-shadow:inset 0 -1px 0 #ffffff0c,0 3px 8px #0003;
}

/* Small badge centered on the upper edge, clear of the photo and caption. */
.photo-tag-identity,.photo-tag-rect.is-small .photo-tag-identity{
  top:-9px;right:auto;bottom:auto;left:50%;transform:translateX(-50%);
  width:16px;height:16px;padding:0;box-sizing:border-box;
  border:1px solid var(--tag-color,#82d5b4);border-radius:6px;
  background:#142130;box-shadow:0 1px 3px #0004;pointer-events:none;
}
:is(.photo-lightbox,.wall-gallery-active) .photo-tag-identity>img{width:11px;height:11px;max-width:11px;max-height:11px}
.photo-tag-rect.is-small .photo-tag-identity{top:-7px;width:12px;height:12px;border-radius:4px}
:is(.photo-lightbox,.wall-gallery-active) .photo-tag-rect.is-small .photo-tag-identity>img{width:8px;height:8px;max-width:8px;max-height:8px}

.photo-tag-zoom-surface{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;transform-origin:0 0;transition:transform var(--photo-zoom-time,280ms) cubic-bezier(.22,.68,.18,1)}
.photo-tag-zoom{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:inherit;background:transparent;box-shadow:none;pointer-events:auto;cursor:zoom-in;touch-action:none}
.is-person-zoomed .photo-tag-zoom{cursor:zoom-out}
.is-drawing .photo-tag-zoom{pointer-events:none}
.photo-tag-zoom:focus-visible{outline:2px solid #fff;outline-offset:2px}
:is(.photo-lightbox,.wall-gallery-active).is-person-zoomed .photo-swipe-stage{overflow:hidden}

/* A dimensional badge reveal, followed by a single reflected highlight. */
@keyframes photo-badge-focus{
  0%{transform:translateX(-50%) perspective(160px) rotateY(-55deg);scale:.7;opacity:0}
  38%{transform:translateX(-50%) perspective(160px) rotateY(6deg);scale:1.9;opacity:1}
  62%{transform:translateX(-50%) perspective(160px) rotateY(0);scale:1.9;opacity:1}
  100%{transform:translateX(-50%) perspective(160px) rotateY(0);scale:1.35;opacity:1}
}
@keyframes photo-badge-halo{
  0%,20%{opacity:0;transform:scale(.85)}
  55%{opacity:.85;transform:scale(1.25)}
  100%{opacity:.2;transform:scale(1)}
}
@keyframes photo-badge-polish{
  0%,25%{background-position:150% 0;opacity:0}
  40%{opacity:.9}
  80%,100%{background-position:-50% 0;opacity:0}
}
:is(.photo-lightbox,.wall-gallery-active).is-person-zoomed .photo-tag-rect:not([hidden]) .photo-tag-identity{
  scale:1.35;
  border-color:#ffecc2;
  box-shadow:inset 0 1px 0 #fff8,0 0 9px 1px color-mix(in srgb,var(--tag-color,#82d5b4) 55%,transparent);
}
@keyframes photo-badge-sparkle{
  0%,22%,100%{opacity:0;scale:.3;rotate:-20deg}
  40%{opacity:1;scale:1.15;rotate:0deg}
  65%{opacity:.6;scale:.8;rotate:15deg}
}
.photo-badge-spark{position:absolute;pointer-events:none;width:12px;height:12px;opacity:0;background:linear-gradient(90deg,transparent 40%,#fff5ce 50%,transparent 60%),linear-gradient(0deg,transparent 40%,#fff 50%,transparent 60%);filter:drop-shadow(0 0 3px #ffe5a5);border-radius:50%}
.photo-badge-spark:first-of-type{top:-7px;right:-7px}
.photo-badge-spark:last-of-type{bottom:-5px;left:-5px;width:8px;height:8px}
@media(prefers-reduced-motion:no-preference){
  :is(.photo-lightbox,.wall-gallery-active).is-person-zoomed .photo-tag-rect:not([hidden]) .photo-badge-spark{animation:photo-badge-sparkle 1350ms ease-in-out both}
  :is(.photo-lightbox,.wall-gallery-active).is-person-zoomed .photo-tag-rect:not([hidden]) .photo-badge-spark:last-of-type{animation-delay:180ms}
  :is(.photo-lightbox,.wall-gallery-active).is-person-zoomed .photo-tag-rect:not([hidden]) .photo-tag-identity{
    backface-visibility:hidden;
    animation:photo-badge-focus 1250ms cubic-bezier(.22,.61,.36,1) both;
  }
  :is(.photo-lightbox,.wall-gallery-active).is-person-zoomed .photo-tag-rect:not([hidden]) .photo-tag-identity::before{
    content:'';position:absolute;inset:-7px;border:0;
    border-radius:inherit;pointer-events:none;
    background:radial-gradient(ellipse,var(--tag-color,#82d5b4),transparent 70%);
    z-index:-1;
    animation:photo-badge-halo 1100ms ease-out both;
  }
  :is(.photo-lightbox,.wall-gallery-active).is-person-zoomed .photo-tag-rect:not([hidden]) .photo-tag-identity::after{
    content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;
    background:linear-gradient(115deg,transparent 38%,#ffdf9633 44%,#fff 49%,#fff0ba88 53%,transparent 62%);
    background-size:250% 100%;
    animation:photo-badge-polish 1100ms ease-in-out 120ms both;
  }
}
@media(prefers-reduced-motion:reduce){.photo-tag-zoom-surface{transition:none}}

.photo-tag-like{position:absolute;top:3px;right:3px;display:flex;align-items:center;gap:3px;padding:3px 4px;border:0;border-radius:5px;background:#101b28dc;color:#f4c0cf;font:600 9px/1.2 system-ui;pointer-events:auto;cursor:pointer;z-index:2}
.photo-tag-like b{font:inherit;color:#fff}.photo-tag-like.is-liked{color:#ff729b}.photo-tag-like:disabled{opacity:.55}.is-drawing .photo-tag-like{pointer-events:none}
.photo-tag-dock-heart{height:42px;padding:0 14px;display:flex;align-items:center;gap:8px;border:1px solid #e8b4ae88;border-radius:13px;background:#382331;color:#ffb5c5;cursor:pointer}.photo-tag-dock-heart.is-liked{background:#78304f}.photo-tag-dock-heart b{color:#fff}
.photo-tag-dock [hidden]{display:none!important}

/* Gallery gestures take over after movement; taps remain available at rest. */
.photo-tag-name,.photo-tag-like{touch-action:none;-webkit-user-drag:none;user-select:none}
:is(.photo-lightbox,.wall-gallery-active).is-dragging .photo-tag-gallery-layer,:is(.photo-lightbox,.wall-gallery-active).is-dragging .photo-tag-gallery-layer *{pointer-events:none!important}

/* Compact nickname strip below the photo tag. */
.photo-tag-name{padding:2px 4px;font-size:10px;line-height:1.25}
.photo-tag-rect.is-small .photo-tag-name{padding:1px;font-size:9px;line-height:1.2}

/* Overlay follows the crop through layout, without scaling text or borders. */
.photo-tag-gallery-layer{transition:left var(--photo-zoom-time,280ms) cubic-bezier(.22,.68,.18,1),top var(--photo-zoom-time,280ms) cubic-bezier(.22,.68,.18,1),width var(--photo-zoom-time,280ms) cubic-bezier(.22,.68,.18,1),height var(--photo-zoom-time,280ms) cubic-bezier(.22,.68,.18,1),opacity .12s ease-out}
.photo-tag-gallery-layer.is-drawing{transition:none}
@media(prefers-reduced-motion:reduce){.photo-tag-gallery-layer{transition:none}}


/* Smaller usernames at rest; preserve the current size when zoomed. */
:is(.photo-lightbox,.wall-gallery-active):not(.is-person-zoomed) .photo-tag-name{font-size:8px}
:is(.photo-lightbox,.wall-gallery-active):not(.is-person-zoomed) .photo-tag-rect.is-small .photo-tag-name{font-size:7px}

/* Focused-person like control, with a one-shot flight to the photo counter. */
.photo-tag-dock-heart{height:44px;gap:9px;padding:0 13px;border:1px solid #f4abc64d;border-top-color:#ffd4e377;border-radius:14px;background:linear-gradient(135deg,#543348,#241f32);box-shadow:inset 0 1px #ffffff12,0 5px 16px #0003;color:#ffb5d0;font:600 11px/1.2 system-ui}
.photo-tag-dock-heart>i{font-size:19px;filter:drop-shadow(0 0 5px #ff729b40)}
.photo-tag-dock-heart>b{padding-left:9px;border-left:1px solid #ffffff20;font-size:12px;font-variant-numeric:tabular-nums}
.photo-tag-dock-heart.is-liked{background:linear-gradient(135deg,#79384f,#3b253b);border-color:#ffb3ce88}
.photo-tag-dock-heart:disabled{opacity:.65;cursor:wait}
.photo-tag-flying-heart{position:fixed;z-index:2147483646;width:0;height:0;pointer-events:none;color:#ff74aa;filter:drop-shadow(0 0 6px #ff74aa99) drop-shadow(0 0 16px #ff74aa55)}
.photo-tag-flying-heart>i{position:absolute;left:-14px;top:-14px;font-size:28px}
.photo-tag-heart-spark{position:fixed;z-index:2147483646;width:4px;height:4px;margin:-2px;border-radius:50%;background:#ffd1e4;box-shadow:0 0 6px #ff74aa;pointer-events:none}
@media(max-width:360px){.photo-tag-heart-label{font-size:10px}.photo-tag-dock-heart{padding:0 10px;gap:6px}}

/* Separate requests from accepted tags, with comfortable touch controls. */
.photo-tag-group{margin:14px 0 4px;text-align:left;color:#9ec8b7;font:700 11px/1.4 system-ui}
.photo-tag-row{flex-wrap:wrap;gap:8px;padding:10px 0}
.photo-tag-row-person{flex-basis:100%!important}
.photo-tag-row-person strong,.photo-tag-row-person small{display:block}
.photo-tag-row-person strong{font-size:13px;color:#edf5ff}
.photo-tag-row-person small{margin-top:3px;font-size:11px;color:#b5c4d5}
.photo-tag-row-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px;width:100%}
.photo-tag-row-actions button{min-height:44px;padding:9px 12px;font-size:12px;flex:1}
.photo-tag-row-actions .photo-tag-accept{background:#82d5b4;color:#10291e;border-color:transparent}
.photo-tag-row-actions .photo-tag-accept:hover{background:#a3e5c9}
.photo-tag-confirm{flex-basis:100%;font-size:12px;color:#f2ced2}
.photo-tag-list{max-height:32dvh}
.photo-tag-panel{max-height:60dvh;overflow:auto;overscroll-behavior:contain}
.photo-tag-controls{flex-wrap:wrap;justify-content:center;max-width:100%}
.photo-tag-person-picker{display:flex;flex-direction:column;gap:6px;width:100%;text-align:left;color:#b5c4d5;font:12px/1.4 system-ui}
.photo-tag-person-picker label{display:flex;flex-direction:column;gap:8px}
.photo-tag-person-picker input{box-sizing:border-box;width:100%;min-height:46px;padding:12px;border:1px solid #adc8dd40;border-radius:12px;background:#172635;color:#edf5ff;font:16px/1.4 system-ui}
.photo-tag-person-picker input::placeholder{color:#a5b8c9;font-size:13px}
.photo-tag-person-picker input:focus-visible{outline:2px solid #82d5b4;outline-offset:2px}
.photo-tag-search-results{display:flex;flex-direction:column;gap:5px;max-height:23dvh;overflow:auto;overscroll-behavior:contain}
.photo-tag-bar .photo-tag-search-result{display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:8px 10px;border-radius:11px;text-align:left;box-shadow:none;white-space:normal}
.photo-tag-search-initial{display:grid;place-items:center;flex:0 0 34px;height:34px;border-radius:11px;background:#82d5b420;color:#a3e5c9;font-size:16px;text-transform:uppercase}
.photo-tag-search-name{min-width:0;overflow-wrap:anywhere;font-size:13px}
.photo-tag-search-name small{display:block;margin-top:3px;color:#a5b8c9;font-size:11px;font-weight:400}
.photo-tag-search-hint{padding:4px 0;color:#a5b8c9;font-size:11px}
.photo-tag-selected{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid #82d5b440;border-radius:12px;background:#82d5b410}
.photo-tag-selected>span{flex:1;min-width:0;overflow-wrap:anywhere;color:#caf3e2}
.photo-tag-selected button{flex:none;min-height:44px}
@media(max-height:500px){.photo-tag-list{max-height:24dvh}}

/* The editor owns a reserved strip below the photo, never an overlay on it. */
.photo-tag-heading{display:none}
.photo-people-rail{position:absolute;left:50%;transform:translateX(-50%);bottom:calc(68px + env(safe-area-inset-bottom));width:max-content;max-width:calc(100% - 24px);box-sizing:border-box;padding:4px;border:1px solid #a9d6c424;border-radius:14px;background:linear-gradient(135deg,#1c303cf5,#101c2bf5);color:#cde3dc;font:12px/1.3 system-ui;z-index:14}
.photo-people-rail[hidden]{display:none}
.photo-controls-box{position:absolute;inset:0;z-index:15;pointer-events:none}
.photo-controls-box.is-loading{visibility:hidden}
.photo-controls-box>.photo-tag-dock,.photo-controls-box>.photo-people-rail{pointer-events:auto}
/* Fade once at mount; data updates must not restart the dock animation. */
@keyframes photo-dock-appear{from{opacity:0}to{opacity:1}}
@keyframes photo-controls-sheen{
  from{transform:translateX(-110%);opacity:0}
  20%{opacity:1}
  to{transform:translateX(110%);opacity:0}
}
.photo-people-rail{isolation:isolate;overflow:hidden}
@media(prefers-reduced-motion:no-preference){
  :is(.photo-lightbox,.wall-gallery-active) .photo-tag-bar.is-expanded{animation:photo-dock-appear 450ms cubic-bezier(.22,.61,.36,1) both}
  .photo-people-rail.is-revealing::after{
    content:'';position:absolute;inset:0;pointer-events:none;z-index:2;
    background:linear-gradient(110deg,transparent 25%,#b9f5e22b 48%,transparent 70%);
    animation:photo-controls-sheen 1100ms cubic-bezier(.22,.61,.36,1) 220ms both;
  }
}
.photo-people-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:32px;margin-bottom:7px}
.photo-people-head>span{font-weight:650}
.photo-people-head>small{color:#9aafbb;font-size:10px}
.photo-people-paging{display:flex;align-items:center;gap:8px;font-size:10px}
.photo-people-paging button{width:36px;height:36px;border:1px solid #ffffff16;border-radius:10px;background:#ffffff08;color:#d9f4e9;font:22px/1 system-ui;cursor:pointer}
.photo-people-paging button:disabled{opacity:.3;cursor:default}
.photo-people-grid{display:flex;gap:6px;max-width:min(700px,calc(100vw - 34px));overflow-x:auto;overscroll-behavior-x:contain;touch-action:pan-x;scrollbar-width:thin;scrollbar-color:#638779 transparent;padding:2px;scroll-snap-type:x proximity}
.photo-people-grid>button{flex:0 0 auto;max-width:160px;scroll-snap-align:start}
.photo-people-grid>button{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:0;min-height:40px;padding:6px 8px;border:1px solid #ffffff12;border-bottom-color:var(--person-color);border-radius:10px;background:#ffffff05;color:#e6f1ed;cursor:pointer;font:600 12px/1.3 system-ui}
.photo-people-nick{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.photo-people-grid small{font:9px/1.2 system-ui;color:#c8b98e}
.photo-people-grid>button[aria-pressed=true]{background:#82d5b422;border-color:#a7efcd;box-shadow:inset 0 0 0 1px #a7efcd44}
.photo-people-rail button:focus-visible{outline:2px solid #a7efcd;outline-offset:2px}
:is(.photo-lightbox,.wall-gallery-active):not(.is-tags-open) .photo-swipe-stage{bottom:calc(132px + env(safe-area-inset-bottom))}
:is(.photo-lightbox,.wall-gallery-active).has-photo-people .photo-swipe-hint{display:none}
.photo-tag-gallery-layer [hidden]{display:none!important}
.photo-tag-gallery-layer:focus{outline:none}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open{--tag-editor-height:min(330px,45dvh)}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open.is-tag-person-selected{--tag-editor-height:min(224px,40dvh)}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-swipe-stage{
  bottom:calc(var(--tag-editor-height) + 32px + env(safe-area-inset-bottom));
}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-dock{
  bottom:calc(12px + env(safe-area-inset-bottom));
  width:min(560px,calc(100% - 24px));max-width:none;
  height:var(--tag-editor-height);display:block;
}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-bar{
  display:flex;flex-direction:column;height:100%;box-sizing:border-box;
  padding:10px 12px;gap:8px;border:1px solid #adc8dd26;border-radius:16px;
  background:#111e2b;box-shadow:0 8px 28px #0004;
}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-toggle{
  order:2;align-self:flex-end;flex-shrink:0;height:36px;min-height:36px;
  padding:6px 14px;box-shadow:none;font-size:11px;
}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-panel{
  position:static;transform:none;inset:auto;width:100%;max-height:none;
  flex:1;min-height:0;padding:0;border:0;border-radius:0;
  background:none;box-shadow:none;backdrop-filter:none;overflow:auto;
}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-controls{display:flex;width:100%;gap:8px}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-controls:empty{display:none}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-person-picker{gap:6px}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-search-results{max-height:130px}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-search-result{min-height:44px;padding:5px 9px;background:#1b2c3b;color:#edf5ff}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-selected{padding:6px 10px}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open [data-tag-send]{width:100%;min-height:42px;border-radius:10px}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open:not(.is-tag-person-selected) [data-tag-send]{display:none}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-list{max-height:none}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-dock>.photo-lightbox-heart,
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-dock>.photo-tag-dock-heart,
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-swipe-hint{display:none}
@media(max-height:500px){
  :is(.photo-lightbox,.wall-gallery-active).is-tags-open{--tag-editor-height:42dvh}
  :is(.photo-lightbox,.wall-gallery-active).is-tags-open.is-tag-person-selected{--tag-editor-height:38dvh}
  :is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-bar{padding:6px 10px;gap:4px}
}

/* A guided editor with one primary action and a consistent header. */
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto minmax(0,1fr);gap:8px 12px;padding:12px 14px;border-radius:20px;background:linear-gradient(145deg,#1b2c38,#111e2b);border-top-color:#b4dec94d}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-heading{display:block;text-align:left;min-width:0}
.photo-tag-heading>strong{display:block;font:650 15px/1.35 system-ui;color:#edf8f3}
.photo-tag-steps{display:flex;gap:12px;margin-top:7px;color:#9aaebd;font:11px/1.3 system-ui}
.photo-tag-steps .is-current{color:#a7efcd;font-weight:700}
.photo-tag-steps .is-done{color:#c2d9ce}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-toggle{order:0;grid-column:2;grid-row:1;align-self:start;min-width:40px;height:40px;padding:8px;border-radius:12px;background:#ffffff08;border-color:#ffffff12}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-toggle>span{display:none}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-panel{grid-column:1/-1;grid-row:2;text-align:left}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-status{margin:0 0 8px;color:#c1d1dd;font-size:12px;line-height:1.4}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-controls{justify-content:stretch}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-search-result{border:1px solid #ffffff0a;background:#ffffff04;border-radius:12px}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-search-result:hover,:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-search-result:focus-visible{background:#82d5b41a;border-color:#82d5b455}
.photo-tag-result-arrow{margin-left:auto;color:#a7efcd;font:22px/1 system-ui}
.photo-tag-close-symbol{font:24px/1 system-ui;color:#c1d1dd}
.photo-tag-row{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;padding:8px 0}
.photo-tag-bar .photo-tag-person{display:flex;align-items:center;gap:9px;flex:1;min-width:0;padding:4px 0;text-align:left;white-space:normal;background:transparent;border:0;box-shadow:none}
.photo-tag-person-initial{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:11px;background:#82d5b41a;color:#b5edd2;text-transform:uppercase}
.photo-tag-person-caption{min-width:0;overflow-wrap:anywhere}
.photo-tag-person-caption strong{display:block;font-size:13px}
.photo-tag-person-caption small{display:block;margin-top:3px;color:#e0c68e;font-size:10px;font-weight:400}
.photo-tag-row-actions{width:auto;flex:none;gap:5px}
.photo-tag-row-actions button{flex:none;min-height:40px;padding:8px;font-size:11px;box-shadow:none}
.photo-tag-row.is-confirming{flex-wrap:wrap}
.photo-tag-row.is-confirming .photo-tag-row-actions{width:100%}
.photo-tag-row.is-confirming .photo-tag-row-actions button{flex:1}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open:not(.is-tagging) .photo-tag-controls>button{width:100%;min-height:44px;border-radius:12px;box-shadow:none;font-size:13px}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-selected{background:#82d5b40c;border:0;padding:0}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-selected button{background:transparent;box-shadow:none;color:#adc9bc;border-color:#ffffff12;font-size:11px;padding:6px 9px;min-height:36px}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open [data-tag-send]{background:#a7efcd;color:#102a20;font-size:14px;box-shadow:none}
:is(.photo-lightbox,.wall-gallery-active).is-tags-open [data-tag-send]:disabled{background:#ffffff08;color:#a7b9c5;opacity:1;border:1px dashed #ffffff20;cursor:default}
@media(max-height:500px){:is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-bar{padding:7px 10px;gap:5px}.photo-tag-steps{margin-top:3px}.photo-tag-heading>strong{font-size:13px}}

/* Give short and wide screens a full-height editor beside the photograph. */
@media(min-width:1000px),(min-width:600px) and (max-height:540px){
  :is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-dock{
    left:auto;right:16px;top:72px;bottom:calc(16px + env(safe-area-inset-bottom));
    transform:none;width:310px;height:auto;
  }
  :is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-swipe-stage{
    left:16px;right:346px;top:72px;bottom:calc(16px + env(safe-area-inset-bottom));
  }
  :is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-search-results{max-height:none}
  :is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-bar{padding:12px}
  :is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-panel{scrollbar-width:thin}
}
@media(min-width:600px) and (max-height:540px){
  :is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-tag-dock{top:54px;right:10px;width:280px;bottom:10px}
  :is(.photo-lightbox,.wall-gallery-active).is-tags-open .photo-swipe-stage{top:54px;right:306px;left:10px;bottom:10px}
}
