/* Proteus Performance / Swim Recap — isolated styles */
.psh-modal{
  box-sizing:border-box;color:#edf4fb;background:#0c141e;
  border:1px solid #36485b;border-radius:20px;
  box-shadow:0 35px 110px rgba(0,0,0,.6);
  width:min(1120px,calc(100vw - 22px));max-width:none;
  max-height:min(94dvh,1000px);height:auto;padding:0;
  overflow:auto;overscroll-behavior:contain
}
.psh-modal::backdrop{background:rgba(0,5,12,.82);backdrop-filter:blur(7px)}
.psh-modal,.psh-modal *{box-sizing:border-box}
.psh-modal button,.psh-modal input,.psh-modal select{font:inherit}
.psh-modal button{cursor:pointer}
.psh-modal button:focus-visible,.psh-modal input:focus-visible,.psh-modal select:focus-visible{
  outline:2px solid #a6d9ff;outline-offset:3px
}
.psh-shell{padding:26px}
.psh-header{display:flex;align-items:start;justify-content:space-between;gap:25px;margin-bottom:22px}
.psh-header h2{color:#fff;font-size:30px;line-height:1.13;letter-spacing:-.03em;margin:5px 0}
.psh-header p{color:#a9b9ca;font-size:13px;line-height:1.5;margin:7px 0 0}
.psh-eyebrow,.psh-section{font-size:11px;letter-spacing:.17em;font-weight:800;color:#9cc8ec}
.psh-close{background:transparent;border:1px solid #415266;border-radius:100%;
  color:#f3f8fd;font-size:28px;min-width:43px;min-height:43px;line-height:1}
.psh-body{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:28px;align-items:start}
.psh-preview{border:1px solid #263649;border-radius:16px;background:#080e17;padding:17px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-width:0}
.psh-preview canvas{display:block;max-width:100%;max-height:min(70dvh,720px);width:auto;height:auto;
  aspect-ratio:auto;object-fit:contain;box-shadow:0 10px 35px rgba(0,0,0,.4)}
.psh-preview p{color:#869caf;font-size:11px;margin:0;text-align:center}
.psh-controls{max-height:780px;overflow-y:auto;overscroll-behavior:contain;padding:0 10px 8px 0;scrollbar-width:thin}
.psh-section{margin:20px 0 13px;padding:0 0 9px;border-bottom:1px solid #2b4055}
.psh-section:first-child{margin-top:0}
.psh-controls label{display:flex;flex-direction:column;gap:7px;color:#c4d5e5;font-size:12px;
  font-weight:700;letter-spacing:.015em;margin:0 0 14px}
.psh-controls input:not([type=checkbox]):not([type=range]):not([type=file]):not([type=color]),
.psh-controls select{
  width:100%;min-height:44px;padding:10px 12px;color:#eff6ff;
  background:#111f2d;border:1px solid #3a5063;border-radius:9px;appearance:auto
}
.psh-controls input[type=file]{width:100%;padding:8px;border:1px dashed #41566b;
  border-radius:9px;background:#111f2d;color:#cbdce9;font-size:12px}
.psh-controls input[type=file]::file-selector-button{background:#263f56;color:#e7f4ff;
  border:0;padding:9px;border-radius:7px;margin-right:10px}
.psh-controls input[type=range]{width:100%;accent-color:#8acbf2}
.psh-controls input::placeholder{color:#7c91a4}
.psh-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.psh-note{font-size:11px;line-height:1.55;color:#94a8bc;margin:-3px 0 15px}
.psh-row{display:flex;justify-content:space-between;align-items:center;gap:12px;
  flex-wrap:wrap;margin:-3px 0 14px}
.psh-row span{font-size:11px;color:#8599ac}
.psh-quiet{padding:5px 0;background:transparent;color:#b9dcf7;border:0;text-decoration:underline}
.psh-check{display:flex!important;flex-direction:row!important;gap:9px!important;align-items:center}
.psh-check input{width:17px;height:17px;accent-color:#a7d5ff}
.psh-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:17px}
.psh-download,.psh-share{border:1px solid #699cc8;border-radius:10px;min-height:47px;padding:10px 14px;
  font-size:12px!important;font-weight:800!important;letter-spacing:.02em}
.psh-download{background:#9bcffa;color:#071522}
.psh-share{background:#15283b;color:#d9edff}
#pshStatus{font-size:12px;line-height:1.4;min-height:18px;margin:12px 0 0;color:#b9dbf6}
@media(max-width:800px){
  .psh-modal{max-height:96dvh;width:calc(100vw - 14px);border-radius:15px}
  .psh-shell{padding:16px}
  .psh-header{margin-bottom:16px}
  .psh-header h2{font-size:26px}
  .psh-body{grid-template-columns:1fr;gap:19px}
  .psh-preview{padding:13px}
  .psh-preview canvas{max-height:49dvh}
  .psh-controls{max-height:none;overflow:visible;padding-right:0}
}
@media(max-width:430px){
  .psh-two{gap:9px}
  .psh-controls select{font-size:12px}
  .psh-actions{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){.psh-modal{scroll-behavior:auto}}

.psh-preview .psh-demo-notice{color:#f9d6a0;font-weight:700}

/* Session history has a permanent action that remains visible on small screens. */
.psh-history-head{gap:12px;flex-wrap:wrap}
.psh-history-actions{display:flex;gap:12px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.psh-history-actions .btn{flex-shrink:0;border-color:#7baed7;color:#d9efff}
.psh-picker{width:min(570px,calc(100vw - 22px));max-height:86dvh}
.psh-session-list{display:grid;gap:10px;max-height:60dvh;overflow-y:auto;scrollbar-width:thin}
.psh-session-choice{width:100%;display:flex;justify-content:space-between;align-items:center;text-align:left;gap:14px;
  color:#eff7ff;background:#111f2d;border:1px solid #35495e;border-radius:11px;padding:16px;min-height:76px}
.psh-session-choice:hover,.psh-session-choice:focus-visible{background:#1a344b;border-color:#8dbbde}
.psh-session-choice span{display:flex;flex-direction:column;gap:7px;min-width:0}
.psh-session-choice strong{font-size:14px;letter-spacing:.035em}
.psh-session-choice small{color:#9aadc0;font-size:11px}
.psh-session-choice b{color:#aedcff;font-size:14px;flex-shrink:0;font-variant-numeric:tabular-nums}
@media(max-width:480px){
 .psh-history-actions{justify-content:flex-start}
 .psh-history-head{align-items:flex-start}
 .psh-picker .psh-shell{padding:18px}
}

/* Background editor: controls stay legible and easy to drag on mobile. */
.psh-photo-instructions{font-size:11px;line-height:1.55;color:#9ab4cb;margin:-4px 0 17px}
.psh-photo-tools{border:1px solid #2d4153;background:#101c2a;border-radius:10px;padding:12px 12px 0;margin-bottom:16px}
.psh-controls label{position:relative}
.psh-controls output{float:right;align-self:flex-end;margin-top:-23px;color:#a7d5f5;font-variant-numeric:tabular-nums;font-size:11px}
.psh-controls input:disabled{cursor:not-allowed;opacity:.35}
.psh-controls input[type=range]:not(:disabled){cursor:ew-resize;min-height:26px}
.psh-preview canvas.psh-croppable{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.psh-preview canvas.psh-croppable:active{cursor:grabbing}
.psh-reset-background{font-weight:700!important}
@media(max-width:480px){
  .psh-photo-tools{padding:10px 9px 0}
  .psh-photo-tools .psh-two{grid-template-columns:1fr}
  .psh-controls output{margin-top:-20px}
}

/* Background type, format and unit use the app-wide themed picker (themed-select.js). */
.psh-modal [hidden]{display:none!important}
.psh-field{display:flex;flex-direction:column;gap:7px;color:#c4d5e5;font-size:12px;
  font-weight:700;letter-spacing:.015em;margin:0 0 14px;min-width:0}
.psh-field .themed-picker{flex:none;width:100%}
.psh-field .themed-picker-trigger{min-height:44px;font-size:13px;font-weight:600;background:#111f2d;border-color:#3a5063;border-radius:9px}
.psh-field .themed-picker-menu{background:#0f1a26;border-color:#3a5063}
.psh-field .themed-picker-menu button{font-size:13px;font-weight:600;min-height:40px}
.psh-color{display:flex;align-items:stretch;gap:8px;min-width:0}
.psh-controls .psh-color input[type=color]{flex:none;width:52px;min-height:44px;padding:4px;border:1px solid #3a5063;
  border-radius:9px;background:#111f2d;cursor:pointer}
.psh-color input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.psh-color input[type=color]::-webkit-color-swatch{border:0;border-radius:6px}
.psh-color input[type=color]::-moz-color-swatch{border:0;border-radius:6px}
.psh-controls .psh-color input[type=text]{flex:1;min-width:0;font-variant-numeric:tabular-nums;
  letter-spacing:.06em;text-transform:uppercase}
.psh-controls .psh-color input[aria-invalid=true]{border-color:#f08a80}
.psh-photo-block{border-top:1px solid #22364a;padding-top:14px;margin-bottom:4px}
@media(max-width:430px){
  .psh-field .themed-picker-trigger{font-size:12px}
}

/* Tactile motion: the editor eases in, revealed controls slide into place, export buttons confirm. */
.psh-download,.psh-share{transition:background-color .2s ease,color .2s ease,border-color .2s ease,box-shadow .25s ease}
.psh-download.is-busy,.psh-share.is-busy{cursor:progress;opacity:.85}
.psh-download.is-busy::after,.psh-share.is-busy::after{content:'';display:inline-block;vertical-align:-1px;width:10px;height:10px;
  margin-left:9px;border-radius:50%;border:1.5px solid currentColor;border-right-color:transparent;animation:psh-spin .7s linear infinite}
.psh-download.is-done{background:#bfe6c9;border-color:#8fcfa3;color:#0b2414}
.psh-share.is-done{border-color:#8fcfa3;color:#c9f0d5;background:#132a1f}
@keyframes psh-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:no-preference){
  .psh-modal[open]{animation:psh-in .3s var(--ease-out, ease-out) both}
  .psh-modal[open]::backdrop{animation:psh-fade .3s ease-out both}
  [data-psh-photo-block]:not([hidden]),[data-psh-photo-tools]:not([hidden]),
  .psh-controls [data-psh-generated-only]:not([hidden]){animation:psh-reveal .26s var(--ease-out, ease-out) both}
  .psh-download.is-done,.psh-share.is-done{animation:psh-done .38s var(--ease-out, ease-out)}
  .psh-session-choice{transition:background-color .18s ease,border-color .18s ease}
  .psh-session-list .psh-session-choice{animation:psh-reveal .3s var(--ease-out, ease-out) both}
  .psh-session-list .psh-session-choice:nth-child(2){animation-delay:.03s}
  .psh-session-list .psh-session-choice:nth-child(3){animation-delay:.06s}
  .psh-session-list .psh-session-choice:nth-child(4){animation-delay:.09s}
  .psh-session-list .psh-session-choice:nth-child(n+5){animation-delay:.12s}
}
@keyframes psh-in{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}
@keyframes psh-fade{from{opacity:0}to{opacity:1}}
@keyframes psh-reveal{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}
@keyframes psh-done{0%{box-shadow:0 0 0 0 rgba(143,207,163,.5)}100%{box-shadow:0 0 0 10px rgba(143,207,163,0)}}
