/* 展开内容是居中白色平面；无书脊、折痕或叠页，四个章节共享同一外框和内部返回区。 */
.content-panel { left: max(var(--page),calc((100% - var(--panel-max))/2)); right: auto; top: 12px; bottom: auto; width: min(calc(100% - var(--page)*2),var(--panel-max)); max-width: none; height: calc(100% - 24px); max-height: calc(100% - 24px); padding: 24px clamp(28px,3.5vw,52px) 40px; background: #fff; box-shadow: 8px 16px 32px #302a2319; border-radius: 0; animation: page-rise 360ms var(--ease) both; transform-origin: 50% 50%; }
.content-panel::after { display: none; }
/* 返回按钮随原DOM进入面板，吸顶仅占内部导航行；不覆盖标题，也不保留左侧浮动按钮。 */
body:not([data-view=home]) .bubble-navigation { display: none; }
.panel-toolbar { position: sticky; top: 0; z-index: 9; display: flex; align-items: center; min-height: 48px; margin-bottom: 24px; background: #fff; grid-column: 1/-1; }
/* 吸顶行的白底延伸到面板上内边距，避免滚动文字从返回行上方的留白穿出。 */
.panel-toolbar::before { content: ''; position: absolute; inset: calc(-1 * var(--panel-top-padding,24px)) 0 0; z-index: -1; background: #fff; pointer-events: none; }
body:not([data-view=home]) .panel-toolbar .bubble.is-active,body:not([data-view=home]) .panel-toolbar .bubble.is-active:hover { position: relative; left: auto; top: auto; width: auto; height: auto; padding: 8px 0; transform: none; animation: none; transition: none; }
body:not([data-view=home]) .panel-toolbar .bubble.is-active .bubble-surface { display: flex; width: auto; height: auto; padding: 0; align-items: center; justify-content: flex-start; flex-direction: row; gap: 0; background: transparent; box-shadow: none; overflow: visible; }
/* 目录入口的编号与标题共用一个标签容器；进入工具栏后展开，让标题直接成为Back文本。 */
body:not([data-view=home]) .panel-toolbar .bubble.is-active .chapter-label { display: contents; }
body:not([data-view=home]) .panel-toolbar .bubble.is-active .bubble-title { font: inherit; letter-spacing: 0; writing-mode: horizontal-tb; text-decoration: underline; text-underline-offset: 5px; }
.panel-toolbar .bubble.is-active .bubble-subtitle { display: none; }
.panel-toolbar .bubble:focus-visible { outline-offset: 2px; }
/* 收合只做短暂的白色平面淡出；面板临时高于首页，避免章节未退完就被首页内容盖住。 */
.content-panel.is-leaving { z-index: 9; animation: page-fade 220ms ease-out both; pointer-events: none; }
.content-panel h1 { font-size: clamp(42px,4.2vw,64px); }
.oil-layout { grid-template-columns: 1fr 1fr; gap: clamp(48px,7vw,100px); }
.oil-image { background: transparent; padding-top: 36px; }
.oil-image img { height: clamp(300px,47svh,490px); }
.product-description { font-size: 23px; }
.oil-product-facts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin-top: 8px; }
.panel-oil .oil-product-facts .product-price { margin: 0; }
.brand-composition { grid-template-columns: 1fr 1fr; gap: clamp(48px,7vw,100px); }
.brand-rule { margin-top: 32px; }
.film-layout { grid-template-columns: 1fr 1fr; gap: clamp(48px,7vw,100px); min-height: 0; align-items: center; }
.film-view { display: flex; flex-direction: column; align-items: center; }
/* 桌面影片页先扣除返回行和内边距，再让播放器按剩余容器高度缩放；不裁画面或隐藏溢出。 */
@media (min-width:701px) {
  /* 商品页只让左侧资料滚动，顶部返回区与右侧实拍不参与滚动；禁止用旧sticky图片跟随正文。 */
  body:not([data-view=home]) .panel-oil { display: grid; grid-template-rows: auto minmax(0,1fr); gap: 24px; height: calc(100svh - var(--header-height) - var(--scene-bottom-space) - 24px); overflow: hidden; }  .panel-oil .panel-toolbar { position: relative; margin-bottom: 0; }
  .panel-oil .oil-layout { height: 100%; min-height: 0; grid-template-columns: minmax(0,1fr) minmax(0,1fr); grid-template-rows: minmax(0,1fr); }
  /* 保留独立滚动与键盘区域，显示滚动位置并预留轨道，避免内容展开时横向跳动。 */
  .panel-oil .oil-copy { height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--muted) transparent; scrollbar-gutter: stable; padding: 4px 16px 16px 4px; }
  .panel-oil .oil-copy::-webkit-scrollbar { width: 8px; }
  .panel-oil .oil-copy::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 4px; }
  .panel-oil .oil-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .panel-oil .oil-image { position: relative; top: auto; height: 100%; min-height: 0; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; container-type: size; }
  .panel-oil .oil-image img { height: min(47svh,calc(100cqh - 64px)); max-width: 100%; object-fit: contain; flex: 0 1 auto; }
  body:not([data-view=home]) .panel-film { display: grid; grid-template-rows: auto minmax(0,1fr); gap: 24px; height: calc(100svh - var(--header-height) - var(--scene-bottom-space) - 24px); }
  .panel-film .panel-toolbar { margin-bottom: 0; }
  .panel-film .film-layout { height: 100%; min-height: 0; }
  .panel-film .film-view { height: 100%; min-height: 0; justify-content: center; container-type: size; }
  .panel-film .film-frame { width: min(100%,56.25cqh,348.75px); flex: 0 0 auto; }
  /* 重试按钮出现时也要给它留空间，避免出错状态重新撑高面板。 */
  .panel-film .film-view:has(.film-retry:not([hidden])) .film-frame { width: min(100%,calc((100cqh - 48px)*.5625),348.75px); }
}
/* 宽屏章节收紧：图片按可用高度缩放，文字与画面成组居中，避免面板铺满后中间出现大块空白。 */
@media (min-width:1051px) {
  .brand-composition { grid-template-columns: minmax(0,540px) auto; justify-content: start; gap: clamp(40px,4vw,64px); margin-top: 24px; }
  .brand-portrait { display: flex; flex-direction: column; align-items: center; }
  .brand-portrait img { width: auto; height: min(54svh,500px,calc(100svh - 414px)); max-width: 100%; }
  .panel-oil .oil-layout { gap: clamp(40px,4vw,64px); }
  .film-layout { grid-template-columns: minmax(0,360px) minmax(0,349px); justify-content: center; gap: clamp(40px,4vw,64px); }
}
/* 图库按主图在上、缩略条在下排列；两侧按钮翻看缩略图，不改变当前主图选择。 */
.panel-gallery { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(160px,1fr) auto; gap: 20px; }
.panel-gallery .panel-toolbar { margin-bottom: 0; }
.panel-gallery::after { display: none; }
.gallery-frame { border: 0; background: transparent; padding: 0; }
.gallery-strip { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; gap: 8px; align-items: center; min-width: 0; }
/* 隐藏原生滚动条但保留触摸与键盘滚动，鼠标用户使用两侧始终可见的箭头。 */
.gallery-switch { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 4px; scrollbar-width: none; }
.gallery-switch::-webkit-scrollbar { display: none; }
.gallery-arrow { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 0; background: transparent; color: var(--ink); }
.gallery-arrow svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.gallery-arrow:hover:not(:disabled) { background: #e7e5df; }
.gallery-arrow:disabled { opacity: .25; cursor: default; }
.gallery-arrow:focus-visible { outline-offset: -2px; }
.gallery-switch button { flex: 0 0 84px; min-width: 0; width: 84px; min-height: 89px; }
.gallery-switch button img { width: 56px; height: 56px; }
.gallery-status { grid-column: 1/-1; }
/* 目录入口不再复制封面做3D翻页；打开章节只让白色平面轻微上浮淡入，收合则短暂淡出。 */
@keyframes page-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes page-fade { from { opacity: 1; } to { opacity: 0; } }
/* 窄屏保持同一白色平面，正文自然滚动，返回行仍在平面内，不占用额外导航横幅。 */
@media (max-height:760px), (max-width:900px) {
  body:not([data-view=home]) .content-panel { --panel-top-padding: 20px; right: auto; width: min(calc(100% - var(--page)*2),var(--panel-max)); padding: 20px 28px 32px; animation: page-rise 360ms var(--ease) both; }
  body:not([data-view=home]) .content-panel.is-leaving { animation: page-fade 220ms ease-out both; }
  body:not([data-view=home]) .bubble-navigation { display: none; }
  .panel-gallery { grid-template-rows: auto auto auto; }
  .gallery-frame { height: 400px; }
}
@media (max-width:700px) {
  body:not([data-view=home]) .content-panel { --panel-top-padding: 16px; padding: 16px 24px 30px; background: #fff; }
  .oil-layout,.brand-composition,.film-layout,.panel-gallery { grid-template-columns: 1fr; gap: 28px; }
  .oil-image img { height: 280px; }
  .oil-image { padding: 20px 0; }
  .gallery-frame { height: clamp(240px,44svh,500px); }
  .gallery-switch { display: flex; overflow-x: auto; overflow-y: hidden; gap: 8px; }
  .gallery-switch button { flex: 0 0 76px; }
}
@media (prefers-reduced-motion:reduce) {
  .content-panel,.content-panel.is-leaving { animation: none; transform: none; }
  .book-motion-layer { display: none; }
}
