/* V491: localized avatar/frame repairs — do not alter other frame types. */
[data-avatar-frame="sable_winter"]{--avatar-core-ratio:78%!important}
[data-avatar-frame="sable_winter"] > :is(.ui-avatar-core,.oct15-avatar-core,.avatar-frame-core){
  border-radius:50%!important;overflow:hidden!important;background:transparent!important;
}
[data-avatar-frame="sable_winter"] > :is(.ui-avatar-core,.oct15-avatar-core,.avatar-frame-core) > img{
  display:block!important;width:100%!important;height:100%!important;
  max-width:none!important;object-fit:cover!important;object-position:50% 50%!important;
  transform:none!important;
}
/* The screenshot revealed fixed 112px overlays which clipped after growing the shell. */
[data-avatar-frame="sable_winter"] > :is(img.ui-frame-image,img.oct15-frame-overlay,img.avatar-frame-layer){
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  max-width:none!important;max-height:none!important;object-fit:contain!important;
  border-radius:0!important;pointer-events:none!important;
}
[data-avatar-frame="sable_winter"] > video.sable-frame-video{
  display:block!important;position:absolute!important;top:0!important;left:0!important;
  width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;
  inset:0!important;object-fit:contain!important;transform:none!important;
  pointer-events:none!important;z-index:6!important;border-radius:0!important;
  background:transparent!important;
}
[data-avatar-frame="sable_winter"] > video.sable-frame-video[hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){
  [data-avatar-frame="sable_winter"] > video.sable-frame-video{display:none!important}
}
/* The feature avatar is part of developer profile ONLY; every other avatar
   keeps its normal dimensions. Keep intrinsic dimensions symmetric and responsive. */
.ui-profile-hero-v491{display:flex!important;align-items:center!important;gap:32px!important;justify-content:space-between!important;min-height:340px!important}
.ui-profile-hero-v491 > div:first-child{flex:1 1 360px!important;min-width:0!important}
body .ui-profile-hero-v491 > .ui-avatar-hero-featured{
  --v491-avatar-size:clamp(220px,22vw,290px);
  position:relative!important;width:var(--v491-avatar-size)!important;height:var(--v491-avatar-size)!important;
  min-width:var(--v491-avatar-size)!important;max-width:var(--v491-avatar-size)!important;
  min-height:var(--v491-avatar-size)!important;max-height:var(--v491-avatar-size)!important;
  flex:0 0 var(--v491-avatar-size)!important;aspect-ratio:1!important;overflow:visible!important;
}
body .ui-profile-hero-v491 > .ui-avatar-hero-featured > img.ui-frame-image,
body .ui-profile-hero-v491 > .ui-avatar-hero-featured > video.ui-frame-image{
  position:absolute!important;width:100%!important;height:100%!important;
  inset:0!important;max-width:none!important;max-height:none!important;
  object-fit:contain!important;pointer-events:none!important;
}
.ui-profile-hero-v491 > .ui-avatar-hero-featured > .ui-avatar-core{
  inset:calc((100% - var(--avatar-core-ratio,66%))/2)!important;
  width:auto!important;height:auto!important;overflow:hidden!important;border-radius:50%!important;
}
.ui-profile-hero-v491 > .ui-avatar-hero-featured > .ui-avatar-core img{
  display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;
}
@media(max-width:670px){
  .ui-profile-hero-v491{flex-direction:column-reverse!important;align-items:center!important;gap:16px!important;min-height:0!important}
  .ui-profile-hero-v491 > div:first-child{flex:auto!important;width:100%!important}
  body .ui-profile-hero-v491 > .ui-avatar-hero-featured{
    --v491-avatar-size:min(66vw,246px);
    margin:0 auto 6px!important;
  }
}
/* Native fullscreen-sized preview; no new privileges or data requests. */
.v491-frame-dialog{border:1px solid rgba(148,163,184,.4);border-radius:22px;
  background:#182137;color:#fff;padding:22px;max-width:min(94vw,540px);width:min(94vw,540px);
  max-height:90dvh;box-sizing:border-box;overflow:auto;box-shadow:0 25px 85px rgba(0,0,0,.46)}
.v491-frame-dialog::backdrop{background:rgba(3,7,18,.82);backdrop-filter:blur(9px)}
.v491-dialog-header{display:flex;justify-content:space-between;gap:12px;align-items:center}
.v491-frame-dialog > .v491-dialog-avatar{
  --v491-dialog-size:min(74vw,380px);
  display:block!important;position:relative!important;
  width:var(--v491-dialog-size)!important;height:var(--v491-dialog-size)!important;
  min-width:0!important;max-width:100%!important;
  flex:0 0 auto!important; margin:20px auto 8px!important;
}
.v491-frame-dialog .v491-dialog-avatar > img.ui-frame-image,
.v491-frame-dialog .v491-dialog-avatar > video.ui-frame-image{
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  object-fit:contain!important;max-width:none!important;max-height:none!important;
}
.v491-frame-dialog .v491-dialog-avatar > .ui-avatar-core{
  inset:calc((100% - var(--avatar-core-ratio,66%))/2)!important;
  height:auto!important;width:auto!important;border-radius:50%!important;overflow:hidden!important;
}
.v491-dialog-avatar > .ui-avatar-core img{width:100%!important;height:100%!important;object-fit:cover!important}
.v491-dialog-caption{text-align:center!important;font-size:15px;font-weight:750;margin:8px 0 0}
html[data-theme="light"] .v491-frame-dialog{background:#fff9ef;color:#1e293b}

/* V492: larger profile avatar, consistent film coverage and guarded gifts. */
[data-avatar-frame="sable_winter"]{--avatar-core-ratio:90%!important}
[data-avatar-frame="sable_winter"] > :is(.ui-avatar-core,.oct15-avatar-core,.avatar-frame-core){
  position:absolute!important;inset:5%!important;width:auto!important;height:auto!important;
  display:grid!important;place-items:center!important;max-width:none!important;max-height:none!important;
  overflow:hidden!important;z-index:1!important;border-radius:50%!important;
}
[data-avatar-frame="sable_winter"] > :is(.ui-avatar-core,.oct15-avatar-core,.avatar-frame-core) > img{
  display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;
  object-position:center!important;max-width:none!important;max-height:none!important;
}
/* Smooth visible fallback even while a video is blocked, paused or waiting to play. */
[data-avatar-frame="sable_winter"] > video.sable-frame-video{
  opacity:0!important;transition:opacity .18s ease!important;z-index:5!important;
}
[data-avatar-frame="sable_winter"] > video.sable-frame-video[data-v492-playing="1"]{opacity:1!important}
[data-avatar-frame="sable_winter"] > :is(img.ui-frame-image,img.oct15-frame-overlay,img.avatar-frame-layer){z-index:3!important}
@media(prefers-reduced-motion:reduce){
 [data-avatar-frame="sable_winter"] > video.sable-frame-video{display:none!important}
}
/* Normal college profiles: make photo-frame a feature, not a tiny badge. */
body .profile-hero{min-height:285px!important;align-items:center!important;gap:24px!important}
body .profile-hero > .profile-avatar-large.oct15-avatar-shell{
 --v492-profile-size:clamp(196px,22vw,246px);
 width:var(--v492-profile-size)!important;height:var(--v492-profile-size)!important;
 min-width:var(--v492-profile-size)!important;min-height:var(--v492-profile-size)!important;
 max-width:var(--v492-profile-size)!important;max-height:var(--v492-profile-size)!important;
 flex:0 0 var(--v492-profile-size)!important;background:transparent!important;border:0!important;
 box-shadow:none!important;border-radius:50%!important;overflow:visible!important;
}
body .profile-hero > .profile-avatar-large.oct15-avatar-shell > .oct15-frame-overlay{
 width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;
 inset:0!important;object-fit:contain!important;position:absolute!important;
}
body .public-profile-hero{min-height:290px;gap:26px!important}
body .public-profile-hero > .public-profile-avatar{
 position:relative!important;
 --v492-profile-size:clamp(190px,21vw,242px);
 width:var(--v492-profile-size)!important;height:var(--v492-profile-size)!important;
 min-width:var(--v492-profile-size)!important;min-height:var(--v492-profile-size)!important;
 max-width:var(--v492-profile-size)!important;max-height:var(--v492-profile-size)!important;
 flex:0 0 var(--v492-profile-size)!important;overflow:visible!important;border-radius:50%!important;
}
body .public-profile-hero > .public-profile-avatar.oct15-avatar-shell > .oct15-frame-overlay{
 width:100%!important;height:100%!important;inset:0!important;position:absolute!important;object-fit:contain!important;
}
@media(max-width:680px){
 body .profile-hero{min-height:0!important;flex-direction:column-reverse!important;align-items:center!important;padding:24px!important}
 body .profile-hero > div:first-child{width:100%;min-width:0}
 body .profile-hero > .profile-avatar-large.oct15-avatar-shell{--v492-profile-size:min(65vw,230px)}
 body .public-profile-hero{flex-direction:column!important;align-items:center!important;min-height:0;padding:24px!important}
 body .public-profile-hero > .public-profile-avatar{--v492-profile-size:min(62vw,220px)}
}
/* Dev hero remains prominently enlarged and is unaffected by student sizes. */
.v492-gift-card{max-width:920px;display:grid;gap:12px}
.v492-gift-card form{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:end}
.v492-gift-card label{display:grid;gap:7px;font-size:14px;font-weight:700}
.v492-gift-card select,.v492-gift-card input{width:100%;box-sizing:border-box;min-height:46px;
 background:var(--input-bg,rgba(15,23,42,.75));color:inherit;border:1px solid var(--line,rgba(148,163,184,.4));
 border-radius:12px;padding:10px 12px}
.v492-gift-recipient{grid-column:1/-1;border:1px solid rgba(148,163,184,.28);border-radius:14px;
 padding:13px 15px;min-height:42px;box-sizing:border-box;background:rgba(125,125,150,.09)}
.v492-gift-card button[data-v492-send]{grid-column:1/-1;justify-self:start}
.v492-gift-card small,.v492-gift-card p{line-height:1.55;max-width:75ch}
@media(max-width:640px){.v492-gift-card form{grid-template-columns:minmax(0,1fr)}.v492-gift-card button[data-v492-send]{width:100%}}

/* V497 — frame picker: stable equal-size cards instead of displaced labels. */
body[data-oct30-preview="1"] .v497-frame-grid{
  display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,172px),1fr))!important;
  align-items:stretch!important;gap:14px!important;margin:18px 0 20px!important;
}
body[data-oct30-preview="1"] .v497-frame-grid > .ui-frame-choice-v406{
  box-sizing:border-box!important;position:relative!important;display:flex!important;
  flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;
  gap:9px!important;min-width:0!important;min-height:245px!important;
  padding:15px 12px 14px!important;overflow:hidden!important;
  border-radius:18px!important;
}
body[data-oct30-preview="1"] .v497-frame-grid .ui-frame-choice-group-head{
  width:100%!important;flex:0 0 43px!important;display:flex!important;
  flex-direction:column!important;align-items:center!important;justify-content:center!important;
  gap:2px!important;line-height:1.3!important;
}
body[data-oct30-preview="1"] .v497-frame-grid .ui-frame-choice-group-head b,
body[data-oct30-preview="1"] .v497-frame-grid > .ui-frame-choice-v406 > b{
  display:block!important;font-size:13px!important;line-height:1.35!important;
  text-align:center!important;overflow-wrap:anywhere!important;margin:0!important;
}
body[data-oct30-preview="1"] .v497-frame-grid .ui-frame-choice-group-head small{
  display:block!important;line-height:1.25!important;font-size:12px!important;
}
body[data-oct30-preview="1"] .v497-frame-grid > .ui-frame-choice-v406 > b{
  min-height:43px!important;order:-1!important;display:grid!important;place-items:center!important;
}
body[data-oct30-preview="1"] .v497-frame-grid .ui-avatar-shell{
  order:1!important;width:108px!important;height:108px!important;min-width:108px!important;
  flex:0 0 108px!important;margin:0 auto!important;
}
body[data-oct30-preview="1"] .v497-frame-grid .ui-frame-image{
  width:100%!important;height:100%!important;object-fit:contain!important;
}
body[data-oct30-preview="1"] .v497-frame-grid .ui-frame-selected-mark{
  display:none!important;position:absolute!important;top:8px!important;right:8px!important;
  left:auto!important;z-index:10!important;padding:3px 7px!important;
  font-size:10px!important;line-height:1.25!important;
}
body[data-oct30-preview="1"] .v497-frame-grid .ui-frame-choice-v406.is-selected > .ui-frame-selected-mark{
  display:inline-flex!important;
}
body[data-oct30-preview="1"] .v497-frame-grid .ui-variant-swatch-row{
  order:2!important;display:flex!important;flex-wrap:wrap!important;
  justify-content:center!important;align-items:center!important;gap:6px!important;
  min-height:32px!important;width:100%!important;margin:0!important;
}
body[data-oct30-preview="1"] .v497-frame-grid .ui-variant-swatch{
  display:inline-flex!important;position:relative!important;cursor:pointer!important;
  align-items:center!important;justify-content:center!important;
  padding:0!important;min-width:0!important;
}
body[data-oct30-preview="1"] .v497-frame-grid .ui-variant-swatch input[type=radio]{
  position:absolute!important;width:1px!important;height:1px!important;
  margin:0!important;opacity:0!important;pointer-events:none!important;
}
body[data-oct30-preview="1"] .v497-frame-grid .ui-variant-swatch span{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  width:auto!important;height:auto!important;min-height:27px!important;
  padding:4px 8px!important;box-sizing:border-box!important;
  border-radius:999px!important;font-size:11px!important;font-weight:700!important;
  line-height:1.15!important;background:rgba(148,163,184,.11)!important;
  color:var(--text,#f8fafc)!important;border:1px solid rgba(148,163,184,.42)!important;
  box-shadow:none!important;white-space:nowrap!important;
}
body[data-oct30-preview="1"] .v497-frame-grid .ui-variant-swatch:has(input:checked) span{
  border-color:#f59e0b!important;background:rgba(245,158,11,.17)!important;
  color:var(--text,#f8fafc)!important;box-shadow:0 0 0 1px rgba(245,158,11,.32)!important;
}
body[data-oct30-preview="1"] .v497-frame-grid .ui-variant-swatch:focus-within span{
  outline:2px solid #f59e0b!important;outline-offset:2px!important;
}
/* Mobile public/student profile only. Desktop visuals intentionally unchanged. */
@media(max-width:680px){
  body .public-profile-hero{min-height:0!important;padding:18px!important;gap:12px!important}
  body .public-profile-hero > .public-profile-avatar{
    --v492-profile-size:132px!important;width:132px!important;height:132px!important;
    min-width:132px!important;min-height:132px!important;
    max-width:132px!important;max-height:132px!important;flex:0 0 132px!important;
  }
  body .public-profile-hero > .public-profile-avatar.oct15-avatar-shell > .oct15-frame-overlay{
    width:100%!important;height:100%!important;
  }
  body[data-oct30-preview="1"] .v497-frame-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  body[data-oct30-preview="1"] .v497-frame-grid > .ui-frame-choice-v406{
    min-height:219px!important;padding:13px 7px 11px!important;gap:7px!important;
  }
  body[data-oct30-preview="1"] .v497-frame-grid .ui-avatar-shell{
    width:88px!important;height:88px!important;min-width:88px!important;flex-basis:88px!important;
  }
  body[data-oct30-preview="1"] .v497-frame-grid .ui-frame-choice-group-head{flex-basis:47px!important}
  body[data-oct30-preview="1"] .v497-frame-grid .ui-variant-swatch span{
    font-size:10px!important;padding:4px 6px!important;
  }
}

/* V498: picker does not depend on data-oct30-preview or season. */
body .ui-settings-panel .v498-frame-grid{
 display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr))!important;
 align-items:stretch!important;gap:12px!important;margin:20px 0!important;
}
body .ui-settings-panel .v498-frame-card{
 position:relative!important;box-sizing:border-box!important;display:flex!important;
 flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;
 gap:8px!important;min-width:0!important;min-height:230px!important;
 border:1px solid rgba(148,163,184,.32)!important;border-radius:18px!important;
 padding:14px 10px 13px!important;overflow:hidden!important;
 background:rgba(15,23,42,.36)!important;color:var(--text,#f8fafc)!important;
 text-align:center!important;box-shadow:none!important;cursor:pointer!important;
}
body .ui-settings-panel .v498-frame-card.is-selected{
 border-color:#f59e0b!important;background:rgba(245,158,11,.10)!important;
 box-shadow:0 0 0 1px rgba(245,158,11,.3)!important;
}
body .ui-settings-panel .v498-frame-card:focus-within{outline:2px solid rgba(245,158,11,.8)!important;outline-offset:2px!important;}
body .ui-settings-panel .v498-frame-heading{
 display:flex!important;flex:0 0 43px!important;width:100%!important;min-width:0!important;
 flex-direction:column!important;align-items:center!important;justify-content:center!important;
 gap:2px!important;margin:0!important;order:0!important;
}
body .ui-settings-panel .v498-frame-heading b{
 display:block!important;max-width:100%!important;margin:0!important;
 font-size:13px!important;font-weight:750!important;line-height:1.28!important;
 overflow-wrap:break-word!important;white-space:normal!important;
}
body .ui-settings-panel .v498-frame-heading small{font-size:11px!important;line-height:1.2!important;color:var(--muted,#b6c0d1)!important;}
body .ui-settings-panel .v498-frame-preview{
 display:block!important;order:1!important;position:relative!important;
 flex:0 0 106px!important;width:106px!important;height:106px!important;
 min-width:106px!important;min-height:106px!important;max-width:106px!important;max-height:106px!important;
 margin:0 auto!important;isolation:isolate!important;
}
body .ui-settings-panel .v498-frame-preview > img.ui-frame-image,
body .ui-settings-panel .v498-frame-preview > video.ui-frame-image{
 position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
 max-width:none!important;max-height:none!important;object-fit:contain!important;
}
body .ui-settings-panel .v498-frame-preview .ui-avatar-core{position:absolute!important;}
body .ui-settings-panel .v498-frame-variants{
 display:flex!important;flex:0 0 auto!important;order:2!important;flex-wrap:wrap!important;
 justify-content:center!important;align-items:center!important;gap:5px!important;
 min-width:0!important;width:100%!important;min-height:28px!important;margin:auto 0 0!important;
}
body .ui-settings-panel .v498-frame-variant{
 display:inline-flex!important;position:relative!important;flex:0 1 auto!important;
 align-items:center!important;justify-content:center!important;margin:0!important;padding:0!important;
 min-width:0!important;width:auto!important;height:auto!important;cursor:pointer!important;
}
body .ui-settings-panel .v498-frame-variant input[type="radio"],
body .ui-settings-panel .v498-single-radio{
 position:absolute!important;width:1px!important;height:1px!important;min-width:0!important;
 padding:0!important;margin:0!important;border:0!important;opacity:0!important;
 appearance:none!important;pointer-events:none!important;
}
body .ui-settings-panel .v498-frame-variant span{
 display:block!important;box-sizing:border-box!important;min-width:0!important;
 font-size:11px!important;line-height:1.2!important;font-weight:700!important;
 border-radius:999px!important;padding:5px 8px!important;
 color:var(--text,#f8fafc)!important;background:rgba(148,163,184,.10)!important;
 border:1px solid rgba(148,163,184,.35)!important;white-space:normal!important;
 box-shadow:none!important;width:auto!important;height:auto!important;
}
body .ui-settings-panel .v498-frame-variant input:checked + span{
 color:#ffd78b!important;background:rgba(245,158,11,.17)!important;
 border-color:#f59e0b!important;box-shadow:0 0 0 1px rgba(245,158,11,.18)!important;
}
body .ui-settings-panel .v498-frame-choice-hint{
 display:block!important;order:2!important;font-size:11px!important;font-weight:600!important;
 color:var(--muted,#b6c0d1)!important;margin:auto 0 0!important;line-height:28px!important;
}
body .ui-settings-panel .v498-frame-card.is-selected .v498-frame-choice-hint{color:#f59e0b!important;}
html[data-theme="light"] body .ui-settings-panel .v498-frame-card{background:rgba(255,255,255,.78)!important}
/* Give the gifts selector its own flow space: never cover the next panel. */
.v492-gift-card form .v498-gift-selector{display:flex!important;flex-direction:column!important;gap:7px!important;min-width:0!important;}
.v498-gift-label{font-size:14px;font-weight:700;}
.v498-gift-details{display:block;min-width:0;}
.v498-gift-details summary{
 display:flex;justify-content:space-between;align-items:center;gap:12px;cursor:pointer;
 border:1px solid rgba(148,163,184,.45);border-radius:12px;min-height:46px;
 box-sizing:border-box;padding:11px 13px;color:inherit;background:var(--input-bg,rgba(15,23,42,.75));
}
.v498-gift-details summary::marker{content:""}.v498-gift-details summary::-webkit-details-marker{display:none}
.v498-chevron{color:#f59e0b;font-size:20px;line-height:1;}
.v498-gift-options{
 display:grid;gap:2px;padding:6px;margin-top:5px;border-radius:12px;
 border:1px solid rgba(148,163,184,.35);background:rgba(15,23,42,.7);
 max-height:230px;overflow-y:auto;overscroll-behavior:contain;
}
.v498-gift-option{position:relative!important;display:block!important;min-width:0!important;cursor:pointer!important;}
.v498-gift-option input{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important;pointer-events:none!important;}
.v498-gift-option span{display:block;padding:10px 12px;border-radius:8px;font-size:13px;font-weight:600;line-height:1.25;}
.v498-gift-option:has(input:checked) span{color:#f59e0b;background:rgba(245,158,11,.12)}
.v498-gift-option:focus-within span{outline:2px solid #f59e0b;outline-offset:-2px}
@media(max-width:680px){
 body .ui-settings-panel .v498-frame-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
 body .ui-settings-panel .v498-frame-card{min-height:212px!important;padding:12px 7px!important;gap:7px!important}
 body .ui-settings-panel .v498-frame-preview{width:88px!important;height:88px!important;min-width:88px!important;min-height:88px!important;max-width:88px!important;max-height:88px!important;flex-basis:88px!important}
 body .ui-settings-panel .v498-frame-variant span{font-size:10px!important;padding:5px 6px!important}
}

