/* CRYOTALE V3.1.3 — Ocean Depth: lightweight, responsive, isolated styling. */
:root{--cryo313-ice:#94edff;--cryo313-border:rgba(98,217,245,.25)}
.cryo313-particles{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0;contain:layout paint}
.cryo313-particle{position:absolute;bottom:-11%;left:var(--x);width:var(--s);height:var(--s);border-radius:50%;border:1px solid rgba(162,236,255,.35);background:radial-gradient(circle at 28% 26%,rgba(198,252,255,.25),rgba(39,148,195,.06) 34%,transparent 68%);box-shadow:inset -2px -2px 4px rgba(42,156,190,.15),0 0 7px rgba(24,150,223,.12);opacity:0;animation:cryo313-rise var(--d) linear var(--delay) infinite;will-change:transform,opacity}
@keyframes cryo313-rise{0%{transform:translate3d(0,0,0) scale(.75);opacity:0}8%{opacity:var(--a)}85%{opacity:var(--a)}100%{transform:translate3d(var(--drift),-125vh,0) scale(1.15);opacity:0}}
/* Recent and stories scene backgrounds */
@media(max-width:770px){
 html.cryo-ui-v31 #chatPage.mobile-list .chat-sidebar{background:linear-gradient(180deg,rgba(3,18,32,.12),rgba(2,11,24,.22)),url('/static/cryo_ui_v313/ocean-recent.svg') center/cover no-repeat!important;}
 html.cryo-ui-v31 #chatPage.mobile-list .chat-sidebar::before,html.cryo-ui-v31 #chatPage.mobile-list .chat-sidebar::after{content:none!important}
 html.cryo-ui-v31 #chatPage.mobile-list .cryo313-particles{position:absolute!important;inset:0!important;z-index:0!important}
 html.cryo-ui-v31 #chatPage.mobile-list .cryo-v23-role-pick{min-height:75px!important;gap:13px!important;border-bottom:1px solid rgba(149,213,238,.17)!important;background:linear-gradient(95deg,rgba(5,28,51,.48),rgba(7,33,54,.21))!important;border-radius:14px!important;padding:10px 12px!important;margin:2px 0!important}
 html.cryo-ui-v31 #chatPage.mobile-list .cryo-v23-role-labels{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;align-items:center}
 html.cryo-ui-v31 #chatPage.mobile-list .cryo-v23-role-labels strong{grid-column:1!important;max-width:100%;width:max-content;background:rgba(22,72,98,.52)!important;box-shadow:inset 0 0 0 1px rgba(102,217,240,.29)!important;font-size:13px!important;font-weight:700;padding:5px 11px!important}
 html.cryo-ui-v31 #chatPage.mobile-list .cryo-v23-role-labels .cryo-v313-date{grid-column:2!important;grid-row:1;white-space:nowrap;margin:0!important;border-radius:40px;padding:4px 8px;background:rgba(9,40,69,.72);border:1px solid rgba(107,209,239,.24);font-size:11px!important}
 html.cryo-ui-v31 #chatPage.mobile-list .cryo-v31-last-line{grid-column:1/-1;min-width:0;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px!important;margin-top:0!important}
 html.cryo-ui-v31 #chatPage.mobile-list .cryo-v23-role-avatar{width:55px!important;height:55px!important;border-radius:50%!important;border:2px solid rgba(117,215,242,.38)!important;box-shadow:0 0 0 3px rgba(21,110,151,.14),0 0 19px #2996be33}
 html.cryo-ui-v31 #chatPage .chat-main{isolation:isolate}
 html.cryo-ui-v31 #chatPage.cryo-immersive-active.cryo-v313-default-ocean #cryoImmersiveWallpaper{background:linear-gradient(180deg,rgba(3,13,29,.12),rgba(4,17,31,.24)),url('/static/cryo_ui_v313/ocean-chat.svg') center/cover no-repeat!important}
 html.cryo-ui-v31 #chatPage.cryo-immersive-active.cryo-v313-default-ocean #cryoImmersiveWallpaper .cryo313-particles{inset:0;z-index:1}
 html.cryo-ui-v31 #chatPage.cryo-immersive-active:not(.cryo-v313-default-ocean) #cryoImmersiveWallpaper .cryo313-particles{display:none!important}
}
@media(min-width:771px){html.cryo-ui-v31 #chatPage.mobile-list .cryo313-particles{display:none}}
/* Storyline sheet mood and single-list focus */
.cryo-v31-sheet-backdrop{background:rgba(1,10,23,.65)!important}
.cryo-v31-sheet{background:linear-gradient(180deg,rgba(6,35,59,.93),rgba(4,20,39,.98)),url('/static/cryo_ui_v313/ocean-stories.svg') center/cover!important;border-color:rgba(99,214,249,.4)!important;box-shadow:0 -20px 65px rgba(0,5,23,.65),inset 0 1px rgba(133,242,255,.2)!important}
.cryo-v31-story-entry{background:rgba(9,38,68,.48)!important;backdrop-filter:blur(8px)}
.cryo-v31-story-entry.is-active{background:rgba(32,96,129,.5)!important}
/* V3.1.3a: compact, icon-only more menu; storyline/model functionality unchanged. */
.cryo-v31-conversation-top .cryo-v313-more-trigger{pointer-events:auto!important;display:grid;place-items:center;flex:none;width:39px;height:39px;padding:0!important;border:1px solid rgba(139,231,250,.36);border-radius:14px;background:rgba(7,36,61,.80);backdrop-filter:blur(14px);color:#d0f7ff;font:800 21px/1 system-ui,sans-serif;letter-spacing:1.5px;cursor:pointer;box-shadow:0 5px 19px rgba(1,11,29,.19)}
.cryo-v31-conversation-top .cryo-v313-more-trigger[aria-expanded="true"]{background:rgba(32,101,133,.87);border-color:rgba(144,244,255,.65)}
.cryo-v31-conversation-top .cryo-v313-more-trigger:focus-visible,.cryo-v31-conversation-top .cryo-v313-more-item:focus-visible{outline:2px solid #a0f4ff;outline-offset:2px}
.cryo-v31-conversation-top .cryo-v313-more-menu{pointer-events:auto;position:absolute;top:calc(100% + 9px);right:0;z-index:24;min-width:156px;display:flex;flex-direction:column;gap:4px;padding:7px;border:1px solid rgba(141,229,247,.43);border-radius:17px;background:linear-gradient(140deg,rgba(12,49,76,.98),rgba(5,26,48,.98));box-shadow:0 13px 36px rgba(0,8,22,.62),inset 0 1px rgba(193,244,255,.10);backdrop-filter:blur(18px)}
.cryo-v31-conversation-top .cryo-v313-more-menu[hidden]{display:none!important}
.cryo-v31-conversation-top .cryo-v313-more-item{pointer-events:auto;display:flex;align-items:center;gap:11px;min-height:43px;width:100%;padding:9px 12px;border:0;border-radius:11px;background:transparent;text-align:left;color:#dff7ff;font-size:14px;font-weight:600;cursor:pointer}
.cryo-v31-conversation-top .cryo-v313-more-item:hover,.cryo-v31-conversation-top .cryo-v313-more-item:focus-visible{background:rgba(47,139,171,.35)}
.cryo-v31-conversation-top .cryo-v313-more-icon{width:21px;text-align:center;font-size:17px;color:#91eaff;flex:none}
@media(max-width:770px){.cryo-v31-conversation-top{justify-content:flex-end!important}.cryo-v31-conversation-top .cryo-v31-title{flex:1;max-width:none;min-width:0;margin-right:auto;font-size:12px}.cryo-v31-conversation-top .cryo-v313-more-menu{max-width:calc(100vw - 32px)}}
.cryo-v313-model-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px;margin:12px 0 18px}
.cryo-v313-model-option{display:flex;align-items:center;gap:11px;padding:12px;background:rgba(4,25,44,.63);border:1px solid rgba(113,208,237,.25);border-radius:13px;color:#e3f9ff;text-align:left;cursor:pointer}
.cryo-v313-model-option:hover{border-color:#70e4ff}
.cryo-v313-model-option i,.cryo-v313-model-dot{display:inline-block;flex:0 0 17px;width:17px;height:17px;border:2px solid #568bad;border-radius:50%;position:relative}
.cryo-v313-model-option.is-selected i,.cryo-v313-model-row.current .cryo-v313-model-dot{border-color:#75eeff;box-shadow:0 0 12px #60dbff44}
.cryo-v313-model-option.is-selected i::after,.cryo-v313-model-row.current .cryo-v313-model-dot::after{content:'';position:absolute;inset:3px;background:#8bffff;border-radius:50%}
.cryo-v313-model-option small{margin-left:auto;color:#86bdcf}
.cryo-v313-model-default{margin:14px 0 23px}
.cryo-v313-model-sheet{display:flex;flex-direction:column;gap:7px;max-height:54vh;overflow:auto}
.cryo-v313-model-row{display:flex;gap:13px;align-items:center;text-align:left;width:100%;padding:12px 13px;border:1px solid rgba(113,204,233,.15);border-radius:12px;background:rgba(9,40,66,.65);color:#e4faff;cursor:pointer}
.cryo-v313-model-row.current{border-color:#6fdaed;background:rgba(27,90,119,.55)}
.cryo-v313-model-row.unavailable{opacity:.47;cursor:not-allowed}
.cryo-v313-model-row small{margin-left:auto;white-space:nowrap;color:#acd1df}
.cryo-v313-model-status{font-size:13px;color:#b5d7e4;margin:5px}
/* Official conversations get the same default ocean atmosphere but only when no other theme overrides it. */
@media(max-width:770px){
 body.cryo313-official-default #chat-view:not(.hidden) .conversation-feed{background:linear-gradient(rgba(3,14,28,.2),rgba(3,14,28,.35)),url('/static/cryo_ui_v313/ocean-chat.svg') center/cover no-repeat!important;position:relative}
 body.cryo313-official-default #chat-view:not(.hidden) .conversation-feed .cryo313-particles{position:absolute;inset:0}
 body.cryo313-official-default #chat-view:not(.hidden) .conversation-feed .message{position:relative;z-index:1}
}
@media(prefers-reduced-motion:reduce){.cryo313-particle{animation:none!important;opacity:.14;transform:none}}

/* V3.1.3b: desktop story selection already exists inside the conversation tools. */
@media(min-width:771px){#chatPage #chatBack,#chatPage #chatNewHeader{display:none!important}}

/* V3.1.3c: immersive mobile chat scroll fades beneath fixed character title.
   No overlay intercepts touch. Do not mask wallpaper, menu, or composer. */
@media(max-width:770px){
 html.cryo-ui-v31 #chatPage.cryo-immersive-active.mobile-conversation .chat-messages{
   -webkit-mask-image:linear-gradient(to bottom,transparent 0px,rgba(0,0,0,.05) 35px,rgba(0,0,0,.7) 83px,#000 116px);
   mask-image:linear-gradient(to bottom,transparent 0px,rgba(0,0,0,.05) 35px,rgba(0,0,0,.7) 83px,#000 116px);
   -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
 }
}

/* 2026-12-04 (owner): model list LED - an ice-blue breathing light (like 「可以聊天」) when the model can be used now,
   a red one when it cannot. Only opacity/scale animate; it stops for "reduce motion". */
.cryo-v313-model-row .cryo-v313-model-dot{flex:0 0 10px;width:10px;height:10px;margin:0 4px 0 3px;border:0;border-radius:50%;
  background:#9be8ff;box-shadow:0 0 7px rgba(143,226,255,.9),0 0 14px rgba(110,190,255,.45);animation:cryoLedBreathe 2.4s ease-in-out infinite}
.cryo-v313-model-row .cryo-v313-model-dot::after,.cryo-v313-model-row.current .cryo-v313-model-dot::after{content:'';position:absolute;inset:-3px;
  background:none;border:1px solid rgba(155,232,255,.75);border-radius:50%;animation:cryoLedHalo 2.4s ease-out infinite}
.cryo-v313-model-row.current .cryo-v313-model-dot{border:0;box-shadow:0 0 9px rgba(143,226,255,1),0 0 18px rgba(110,190,255,.6)}
.cryo-v313-model-row.unavailable .cryo-v313-model-dot{background:#ff6b7d;box-shadow:0 0 7px rgba(255,107,125,.9),0 0 14px rgba(255,80,100,.45)}
.cryo-v313-model-row.unavailable .cryo-v313-model-dot::after{border-color:rgba(255,130,145,.75)}
.cryo-v313-model-row.unavailable small{color:#ff9aa6}
@keyframes cryoLedBreathe{0%,100%{opacity:.55;transform:scale(.85)}50%{opacity:1;transform:scale(1)}}
@keyframes cryoLedHalo{0%{opacity:.8;transform:scale(.6)}100%{opacity:0;transform:scale(1.9)}}
@media(prefers-reduced-motion:reduce){.cryo-v313-model-row .cryo-v313-model-dot,.cryo-v313-model-row .cryo-v313-model-dot::after{animation:none}}
/* keep the lights bright: fade only the name of an unavailable model, not the whole row (and not the current one) */
.cryo-v313-model-row.unavailable,.cryo-v313-model-row:disabled{opacity:1}
.cryo-v313-model-row.unavailable>span:not(.cryo-v313-model-dot){opacity:.5}
