/* Reference-inspired underwater windows, with live HTML content. */
#sheet.reef-panel-dialog{width:min(calc(100% - 20px),580px);height:min(91dvh,900px);max-height:91dvh;overflow:hidden;border:1px solid #91eeff;border-radius:25px;background:linear-gradient(#0058987a,#003b80c9),url('/assets/aquarium-background-v3.jpg') center/cover;box-shadow:inset 0 0 8px #73eaff94,0 15px 50px #00142fcc}
#sheet.reef-panel-dialog .sheet-head{padding:8px 39px 5px;background:linear-gradient(#0479bc26,#004a8c36);border:0;flex:0 0 auto}
#sheet.reef-panel-dialog .popup-logo{width:min(84%,300px);height:auto;max-height:88px;margin:0 auto;display:block;object-fit:contain}
#sheet.reef-panel-dialog #sheetTitle{font-size:clamp(25px,6.6vw,34px);line-height:1.15;font-weight:850;margin:2px 0 0;color:#e8ffff;text-shadow:0 2px 0 #0789bf,0 3px 4px #00265f}
#sheet.reef-panel-dialog #closeSheet{top:12px;right:12px;width:32px;height:32px;background:#04649b8a;border:1px solid #94edff;color:#fff;box-shadow:inset 0 0 8px #3edef35c}
#sheet.reef-panel-dialog #sheetBody{max-height:none;min-height:0;flex:1 1 0;overflow-y:auto;padding:0 12px 14px;scrollbar-width:thin}
#sheet.reef-panel-dialog .reef-panel-subtitle{text-align:center;color:#dbf5ff;font-size:12px;line-height:1.4;margin:4px 0 15px}
.reef-profile-card,.reef-balance-card{position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:center;gap:13px;padding:13px 14px;min-height:94px;border-radius:19px;border:1px solid #71e3ff;background:linear-gradient(110deg,#056bbbd9,#003c7adc 58%,#04568724),url('/assets/aquarium-background-v3.jpg') 100% 68%/cover;box-shadow:inset 0 1px 7px #74e6ff90,0 3px 8px #00244d55;margin-bottom:11px}
.reef-profile-card>div{min-width:0}.reef-profile-card small{font-size:9px;letter-spacing:1.8px;color:#bfe5f5}.reef-profile-card h3{font-size:24px!important;margin:5px 0!important;color:#fff}.reef-profile-card>div>span{font-size:11px;color:#b7dfef}.profile-avatar-edit{position:relative;padding:0;background:linear-gradient(#5bdcff,#016cae);border:1px solid #b0f7ff;border-radius:17px;width:67px;height:67px;flex-shrink:0;display:grid;place-items:center;overflow:visible}.profile-avatar-edit .ocean-avatar{width:61px;height:61px}.profile-avatar-edit>span:last-child{position:absolute;top:-6px;right:-6px;border:1px solid #b9f6ff;background:#004776;width:24px;height:24px;border-radius:50%;font-size:19px;line-height:21px;color:#fff}
.reef-balance-card{min-height:96px;background:linear-gradient(110deg,#057fc4c4,#06438bd4 70%,#0b609b55),url('/assets/aquarium-background-v3.jpg') center 85%/cover;padding-right:68px}.reef-balance-card>img:first-child{width:65px;height:65px;flex-shrink:0}.reef-balance-card>div{display:flex;flex-direction:column;min-width:0;gap:4px;position:relative;z-index:1}.reef-balance-card small{font-size:9px;color:#b9dff4}.reef-balance-card strong{font-size:clamp(25px,6.5vw,36px);white-space:nowrap;letter-spacing:-.6px;color:white}.reef-balance-card>div>span{font-size:12px;color:#b4e3f8}.reef-balance-card .reef-mini-treasure{position:absolute;width:90px;height:90px;object-fit:contain;right:-7px;bottom:-10px;z-index:-1}
.reef-themes-title{display:flex;align-items:center;gap:9px;margin:18px 1px 0}.reef-themes-title>span{font-size:27px}.reef-themes-title>div{flex:1;min-width:0}#sheetBody .reef-themes-title h3{font-size:19px;margin:0 0 3px;color:#efffff}#sheetBody .reef-themes-title p{font-size:11px;margin:0;color:#a9d8ec}.reef-themes-title>small{font-size:10px;color:#d7e6f4;white-space:nowrap}
.reef-settings .themes{gap:9px;margin:12px 0}.reef-settings .theme{padding:6px 6px 9px;overflow:hidden;border-radius:15px;border:1px solid #46c5ee;background:linear-gradient(#0678bc70,#00336dd9);color:#f0ffff;box-shadow:inset 0 1px 4px #82e4ff2b}.reef-settings .theme i{height:66px;border-radius:9px;border:1px solid #58c8fa;background:url('/assets/clear-aquarium.webp') center/cover}.reef-settings .theme[data-theme=coral] i{background:url('/assets/coral-kingdom.webp') center/cover}.reef-settings .theme[data-theme=night] i{background:linear-gradient(#00194c55,#000c4cb0),url('/assets/aquarium-background-v3.jpg') center 60%/cover}.reef-settings .theme[data-theme=sunset] i{background:linear-gradient(#ff8c7c88,#c2648d55),url('/assets/coral-kingdom.webp') center/cover}.reef-settings .theme i:after{display:none}.reef-settings .theme.active{outline:1px solid #c8ffff;border-color:#b6ffff;box-shadow:0 0 8px #3bdeff94,inset 0 0 7px #21e3ff5c}.reef-settings .theme strong{font-size:13px;margin:6px 2px 3px}.reef-settings .theme small{font-size:10px;margin:0 2px;color:#b4d9ef}.reef-settings .theme i b{width:24px;height:24px;font-size:20px;right:5px;top:5px}.reef-settings .sound{border-top:1px solid #62d7ff50;padding-top:12px;margin-top:12px;font-size:12px}.theme-sunset .water:after{background:linear-gradient(#ed957847,#5c2b9560)}
/* Fish stock and actions keep their existing catalog, levels and prices. */
#sheet[data-panel=fish] #sheetBody{padding:0 8px 14px}#sheet[data-panel=fish] .reef-panel-subtitle{padding:0 9px}
#sheet .reef-feed-available{position:relative;top:auto;display:flex;align-items:center;justify-content:flex-start;gap:10px;margin:0 9px 12px;padding:10px 13px;min-height:63px;border-radius:35px 25px 25px 35px;border:1px solid #55d9ff;background:linear-gradient(110deg,#087bc9e8,#002b67de),url('/assets/aquarium-background-v3.jpg') right 70%/cover;box-shadow:inset 0 1px 5px #8af1ff75}
.reef-feed-badge{display:grid;place-items:center;width:43px;height:43px;border-radius:50%;background:linear-gradient(#0a83c9,#00457a);border:1px solid #4bb6e1}.reef-feed-badge .feed-art{width:33px;height:35px}#sheet .reef-feed-available>div{display:flex;flex-direction:column;gap:4px}#sheet .reef-feed-available>div>span{font-size:11px;color:#d4ecf9}#sheet .reef-feed-available strong{font-size:21px;color:#ffe79c}
#sheet[data-panel=fish] .fish-row{position:relative;isolation:isolate;display:grid;grid-template-columns:82px minmax(0,1fr) 78px;gap:9px;align-items:center;border:1px solid #4cddff;border-radius:17px;margin:0 0 10px;padding:8px 9px 8px 6px;min-height:97px;background:linear-gradient(110deg,#087dc4b0,#002c67f0 55%,#03457acc),url('/assets/aquarium-background-v3.jpg') center 70%/cover;box-shadow:inset 0 1px 7px #62e4ff87,0 3px 7px #00142b55;overflow:hidden}
#sheet[data-panel=fish] .fish-thumb{width:82px;height:80px;border-radius:12px;background:linear-gradient(#0969af45,#00478517),url('/assets/aquarium-background-v3.jpg') center 85%/cover;border:1px solid #42a9cf66;box-shadow:inset 0 0 8px #30deff47}
#sheet[data-panel=fish] .fish-thumb canvas{width:100%;height:100%;object-fit:contain}#sheet[data-panel=fish] .fish-copy{min-width:0}#sheet[data-panel=fish] .fish-copy h3{font-size:14px;line-height:1.2;margin:0 0 6px;color:#e3fcff}#sheet[data-panel=fish] .fish-copy>strong{font-size:12px;color:#ffe393;line-height:1.4}#sheet[data-panel=fish] .fish-copy>strong>span{font-size:9px;color:#c1e8f7}#sheet[data-panel=fish] .fish-copy>div{font-size:9px;color:#b7d9ef}
#sheet[data-panel=fish] .fish-row>.gold{min-width:0;width:78px;min-height:43px;padding:8px 4px;font-size:11px;border-radius:12px;line-height:1.3}#sheet[data-panel=fish] .fish-row>.gold:disabled{opacity:1;background:linear-gradient(#24c766,#078d54);color:#d3f5e3;border-color:#52d292;box-shadow:inset 0 1px #8aefb5,0 3px #006c4b}#sheet[data-panel=fish] .fish-row .feed-art{width:20px;height:21px;vertical-align:middle}
@media(max-width:360px){#sheet[data-panel=fish] .fish-row{grid-template-columns:66px minmax(0,1fr) 67px;gap:6px;padding-right:6px}.fish-copy h3{font-size:12px!important}#sheet[data-panel=fish] .fish-thumb{width:66px;height:75px}#sheet[data-panel=fish] .fish-row>.gold{width:67px}.reef-balance-card{gap:8px;padding-left:9px}.reef-balance-card>img:first-child{width:51px;height:51px}.reef-balance-card strong{font-size:23px}.reef-balance-card small{font-size:8px}.reef-themes-title h3{font-size:16px!important}}
@media(max-height:700px){#sheet.reef-panel-dialog .popup-logo{max-height:62px}#sheet.reef-panel-dialog #sheetTitle{font-size:25px}.reef-profile-card,.reef-balance-card{min-height:78px;padding-block:9px}.reef-settings .theme i{height:52px}.reef-bubble-art{aspect-ratio:1.4}.reef-bubble-scene{height:85px}}
@media(min-width:700px){#sheet[data-panel=fish] .fish-row{grid-template-columns:105px minmax(0,1fr) 100px;min-height:120px;padding:10px;gap:15px}#sheet[data-panel=fish] .fish-thumb{width:105px;height:98px}#sheet[data-panel=fish] .fish-copy h3{font-size:19px}#sheet[data-panel=fish] .fish-copy>strong{font-size:16px}#sheet[data-panel=fish] .fish-copy>strong>span{font-size:12px}#sheet[data-panel=fish] .fish-copy>div{font-size:11px}#sheet[data-panel=fish] .fish-row>.gold{width:100px;font-size:14px;min-height:52px}.reef-settings .theme i{height:87px}.reef-bubble-scene{height:160px}.reef-prize-plaque h3{font-size:18px!important}}
/* Keep the source bubble atlas at its original scale in both axes. */

/* Frames are native circles: the artwork no longer supplies a clipped ring. */
.ocean-avatar{position:relative;display:inline-block;box-sizing:border-box;aspect-ratio:1 / 1;flex-shrink:0;border:2px solid #a3eaff;border-radius:50%;overflow:hidden;clip-path:none;background:#003d70;box-shadow:inset 0 0 0 1px #1474a7,0 1px 3px #001d4c80;isolation:isolate}
.ocean-avatar:before{content:'';position:absolute;inset:2px;border-radius:50%;background-image:url('/assets/profile-avatars-v14.png');background-size:420% 420%;background-repeat:no-repeat;background-position:var(--ax) var(--ay);pointer-events:none}
.place-1 .ocean-avatar{border:3px solid #ffe181;box-shadow:0 0 6px #ffc83f88,inset 0 0 0 1px #9a6d20}
.place-2 .ocean-avatar{border:2px solid #d9f5ff;box-shadow:0 1px 5px #55b4e74a}
.place-3 .ocean-avatar{border:2px solid #efb897;box-shadow:0 1px 5px #b46f434a}
.podium-player{align-self:center;align-items:center;justify-content:center}
.avatar-choice .ocean-avatar,.rank-player .ocean-avatar,.podium-player .ocean-avatar{margin-inline:0}
/* Quiet, deep water behind each fish keeps the silhouette and detail clear. */
#sheet[data-panel=fish] .fish-thumb{background:radial-gradient(ellipse at 45% 30%,#0c4263 0%,#072d47 43%,#031a30 80%,#021426 100%);border:1px solid #33728d;box-shadow:inset 0 1px 2px #8ddfff26,inset 0 0 16px #000f2699;border-radius:12px;overflow:hidden}

/* Balance card has no chest ornament. */
.reef-balance-card{padding-right:14px}
