/* Bubble: portrait videos, quiet chrome, coral interaction. */
:root {
  --ink: #15171d; --muted: #777b84; --coral: #ff5758; --line: #e5e7ec;
  --surface: #f4f5f7; --white: #fff; --watch: #101213;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink); background: var(--white); font-synthesis: none; color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; }
button, a, input, select, summary { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }
[hidden] { display: none !important; }
.bubble-icon { display: block; width: 24px; height: 24px; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 12px; background: var(--ink); color: white; padding: 12px 20px; z-index: 100; transform: translateY(calc(-100% - 20px)); }
.skip-link:focus-visible { transform: translateY(0); }

.brand-symbol { display: block; width: 43px; height: 39px; position: relative; color: var(--coral); }
.brand-symbol i { position: absolute; width: 33px; height: 33px; border: 2px solid currentColor; border-radius: 50%; }
.brand-symbol i:nth-child(2) { left: 22px; top: 16px; width: 22px; height: 22px; background: white; }

.search-submit:focus-visible { position: fixed; top: 10px; right: 10px; width: auto; height: auto; clip: auto; padding: 10px; background: white; z-index: 20; }
.library-main { max-width: 1480px; margin: auto; padding: 0 40px 60px; }
.saved-heading { margin: 26px 0 0; font-size: 24px; }
.category-scroller { position: relative; border-bottom: 1px solid var(--line); padding: 0 38px; }
.category-tabs { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-behavior: auto; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tabs a { position: relative; display: block; padding: 23px 29px 21px; font-size: 14px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.category-tabs a[aria-current] { color: var(--coral); }
.category-tabs a[aria-current]::after { content: ""; position: absolute; bottom: 0; height: 2px; left: 14px; right: 14px; background: currentColor; }
.category-tabs a:hover { color: var(--coral); }
.category-arrow { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #727986; z-index: 3; padding: 8px; }
.category-arrow::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #f0f2f5; z-index: -1; }
.category-arrow .bubble-icon { width: 16px; height: 16px; }
.category-arrow:disabled { color: #bfc3cb; }
.category-arrow:disabled::before { background: #f6f7f9; }
.category-arrow-prev { left: -7px; }
.category-arrow-next { right: -7px; }
.category-scroller::before, .category-scroller::after { content: ""; position: absolute; top: 0; bottom: 1px; width: 33px; z-index: 2; pointer-events: none; }
.category-scroller::before { left: 30px; background: linear-gradient(90deg, white, #ffffff00); }
.category-scroller::after { right: 30px; background: linear-gradient(270deg, white, #ffffff00); }
.category-scroller[data-start="true"]::before, .category-scroller[data-end="true"]::after { opacity: 0; }
.category-scroller[data-overflow="false"] { padding: 0; }
.category-scroller[data-overflow="false"]::before, .category-scroller[data-overflow="false"]::after { display: none; }
.category-scroller[data-overflow="false"] .category-arrow { display: none; }
.browse-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0 23px; scroll-margin-top: 20px; }
.browse-filters { display: flex; gap: 12px; min-width: 0; }
.filter-select { display: flex; align-items: center; position: relative; border: 1px solid #dce0e7; border-radius: 6px; height: 43px; background: white; }
.filter-select > .bubble-icon:first-child { position: absolute; left: 12px; width: 20px; height: 20px; pointer-events: none; }
.filter-select > .bubble-icon:last-child { position: absolute; right: 11px; width: 13px; height: 13px; pointer-events: none; }
.filter-select select { appearance: none; border: 0; border-radius: 6px; background: transparent; height: 100%; padding: 0 32px 0 40px; color: var(--ink); max-width: 230px; min-width: 160px; font-size: 13px; cursor: pointer; }
.sort-tabs { display: flex; align-self: stretch; flex-shrink: 0; }
.sort-tabs a { display: grid; place-items: center; min-width: 78px; padding: 9px 17px; border-bottom: 2px solid transparent; font-size: 14px; }
.sort-tabs a[aria-current] { color: var(--coral); border-bottom-color: var(--coral); font-weight: 600; }
.demo-notice { margin: -5px 0 18px; color: #7d828a; font-size: 11px; display: flex; align-items: center; gap: 8px; line-height: 1.6; }
.demo-notice > span { border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; color: #69707c; font-size: 10px; }
.filter-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -5px 0 20px; font-size: 12px; }
.filter-summary p { margin: 0; }
.filter-summary p span { color: var(--muted); margin-left: 12px; }
.filter-summary a { text-decoration: underline; text-underline-offset: 3px; }
.library-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
.library-card { min-width: 0; }
.card-picture { display: block; position: relative; aspect-ratio: 3 / 4; border-radius: 7px; overflow: hidden; background: var(--surface); }
.card-picture img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; transition: transform .25s ease; }
.card-category { position: absolute; top: 10px; left: 10px; max-width: calc(100% - 20px); font-size: 11px; font-weight: 500; color: white; padding: 4px 9px; background: #15171d9e; border-radius: 5px; }
.card-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #15171d75; color: white; opacity: 0; transition: opacity .15s; }
.card-play .bubble-icon { width: 23px; height: 23px; fill: white; stroke: none; margin-left: 3px; }
.card-picture:hover .card-play, .card-picture:focus-visible .card-play { opacity: 1; }
.card-picture:hover img { transform: scale(1.025); }
.card-duration { position: absolute; right: 9px; bottom: 9px; color: white; background: #15171dd9; padding: 3px 6px; border-radius: 4px; font-size: 12px; font-variant-numeric: tabular-nums; }
.card-copy { padding: 10px 0 0; }
.library-card h2 { font-size: 14px; line-height: 1.55; font-weight: 650; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.library-card h2 a:hover { color: var(--coral); }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 4px; margin-top: 4px; min-height: 42px; }
.card-person { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #5f6571; min-width: 0; }
.card-person img { width: 27px; height: 27px; object-fit: cover; object-position: center 30%; border-radius: 50%; flex-shrink: 0; }
.card-person > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-person small { font-size: inherit; margin-left: 7px; color: #8a909a; }
.save-button { display: grid; place-items: center; width: 38px; height: 42px; border: 0; border-radius: 5px; background: transparent; color: #4b5260; flex-shrink: 0; }
.save-button .bubble-icon { width: 21px; height: 21px; }
.save-button[aria-pressed="true"] { color: var(--coral); }
.save-button[aria-pressed="true"] svg, .watch-action[aria-pressed="true"] svg { fill: currentColor; }
.saved-note { font-size: 12px; line-height: 1.8; color: var(--muted); margin: -4px 0 22px; }
.library-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 42px; }
.library-pagination a { min-width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 6px; display: grid; place-items: center; padding: 0 12px; font-size: 13px; }
.library-pagination a[aria-current] { background: var(--coral); border-color: var(--coral); color: white; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 11px 20px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.5; }
.button-primary { color: white; background: var(--coral); border-color: var(--coral); }
.library-empty { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 42px 12px; }
.library-empty > .bubble-icon { width: 38px; height: 38px; color: #b8bdc6; margin-bottom: 14px; }
.library-empty h2 { font-size: 21px; margin: 0 0 12px; }
.library-empty p { font-size: 13px; color: var(--muted); line-height: 1.9; margin: 0 0 24px; }

.library-toast { position: fixed; z-index: 110; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); width: max-content; border-radius: 8px; box-shadow: 0 8px 30px #0002; color: white; background: #25282e; padding: 14px 20px; margin: 0; font-size: 12px; line-height: 1.7; }

.message { max-width: 1320px; margin: 20px auto; padding: 16px 24px; background: var(--surface); border-radius: 7px; font-size: 13px; }

/* The desktop watch layout keeps the portrait and its context together. */
.bubble-watch-page { background: var(--watch); }

.detail-main { max-width: 1320px; margin: auto; color: #f6f6f7; }
.watch-shell { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, .85fr); min-height: calc(100dvh - 86px); position: relative; }
.watch-media { position: relative; background: #070808; padding: 58px 42px 42px; display: flex; justify-content: center; align-items: center; min-width: 0; }
.watch-topline { position: absolute; top: 16px; left: 20px; right: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; z-index: 5; color: #f8f8f8; font-size: 12px; }
.watch-back { display: inline-flex; align-items: center; gap: 4px; min-height: 38px; padding: 6px 9px 6px 4px; border-radius: 6px; background: #15171970; }
.watch-back .bubble-icon { width: 22px; }
.queue-position { color: #9b9ea4; font-size: 10px; min-width: 56px; text-align: right; }
.bubble-player { position: relative; height: min(760px, calc(100dvh - 190px)); min-height: 420px; aspect-ratio: 9 / 16; width: auto; max-width: 100%; background: #070808; }
.bubble-player video, .bubble-player iframe, .player-empty { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; border-radius: 6px; }
.bubble-player video { touch-action: pan-x; }
.player-empty { position: relative; display: grid; place-items: center; }
.player-empty img { width: 100%; height: 100%; object-fit: contain; }
.player-empty p { position: absolute; bottom: 60px; background: #111c; color: white; padding: 12px 20px; border-radius: 8px; font-size: 13px; }
.player-start { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; padding: 0; border: 1px solid #ffffff60; border-radius: 50%; display: grid; place-items: center; background: #0004; color: white; }
.player-start .bubble-icon { width: 31px; height: 31px; fill: white; stroke: none; margin-left: 4px; }
.bubble-player-controls { position: absolute; z-index: 4; left: 0; right: 0; bottom: -34px; padding: 0 0 3px; color: white; }
.player-seek { height: 22px; display: flex; align-items: center; padding: 0 1px; }
.player-seek input { appearance: none; width: 100%; margin: 0; height: 4px; border: 0; border-radius: 3px; background: linear-gradient(to right, var(--coral) var(--progress, 0%), #ffffff70 var(--progress, 0%)); cursor: pointer; accent-color: var(--coral); }
.player-seek input::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--coral); }
.player-seek input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--coral); }
.player-controls-row { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.player-controls-row button { display: grid; place-items: center; height: 40px; min-width: 36px; padding: 6px; border: 0; background: none; color: white; border-radius: 5px; }
.player-controls-row .bubble-icon { width: 21px; height: 21px; }
.player-controls-row [data-play-icon] .bubble-icon { fill: white; stroke: none; }
.player-time { font-size: 12px; font-variant-numeric: tabular-nums; margin-right: auto; }
.player-controls-row .player-quality { font-size: 10px; }
.player-message { position: absolute; left: 12px; right: 12px; top: 20%; background: #191919db; color: white; border-radius: 7px; padding: 14px; font-size: 12px; line-height: 1.8; z-index: 6; }
.watch-neighbors { position: absolute; right: 10px; top: 50%; display: flex; flex-direction: column; gap: 14px; }
.watch-neighbors a, .watch-neighbors button { display: grid; place-items: center; width: 36px; height: 36px; padding: 7px; border-radius: 50%; border: 1px solid #ffffff13; color: white; background: #242728; }
.watch-neighbors button:disabled { color: #616366; background: #161819; }
.watch-neighbors .bubble-icon { width: 19px; height: 19px; }
.swipe-hint { display: none; }
.watch-information { padding: 34px 30px 28px; min-width: 0; max-height: calc(100dvh - 86px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #36393d transparent; }
.watch-heading h1 { font-size: 24px; line-height: 1.5; font-weight: 650; margin: 0 0 18px; letter-spacing: -.5px; }
.watch-person { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.watch-avatar { flex-shrink: 0; }
.watch-avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: center 30%; border: 1px solid #ffffff80; }
.watch-person > div { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 22px; min-width: 0; }
.watch-person-name { font-size: 14px; font-weight: 600; }
.watch-store { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #c8cbce; text-decoration: underline; text-underline-offset: 4px; }
.watch-store .bubble-icon { width: 14px; height: 14px; }
.performer-shortcut { display: none; }
.watch-category { display: inline-block; color: white; background: #b34c48; padding: 4px 9px; border-radius: 4px; font-size: 11px; margin-bottom: 12px; }
.watch-description-preview { font-size: 12px; line-height: 1.9; color: #d2d4d6; margin: 0 0 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.watch-actions { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 4px; }
.reaction-buttons, .watch-secondary-actions { display: contents; }
.engagement-button { border: 0; border-radius: 8px; background: transparent; color: white; min-width: 0; min-height: 86px; padding: 10px 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; -webkit-tap-highlight-color: transparent; }
.engagement-button > .bubble-icon { width: 29px; height: 29px; fill: currentColor; stroke-width: 1.2; transition: color 160ms ease; }
.engagement-button > .engagement-label { font-size: 10px; line-height: 1.3; white-space: nowrap; }
.engagement-count { display: block; font-size: 13px; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.reaction-like { --reaction-color: #ff5758; }
.reaction-type { --reaction-color: #ee81bf; }
.reaction-sparkle { --reaction-color: #f0d785; }
.engagement-save { --reaction-color: #f0d785; }
.engagement-button[aria-pressed="true"] > .bubble-icon { color: var(--reaction-color, var(--coral)); }
.engagement-button:disabled { cursor: wait; opacity: .55; }
.engagement-button.is-busy { opacity: .65; }
.engagement-button:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.engagement-button.is-counting > .bubble-icon { animation: engagement-pop 420ms cubic-bezier(.2,.8,.2,1); }
.engagement-button.is-counting > .engagement-count { animation: engagement-count-up 360ms ease-out; }
@media (hover: hover) { .engagement-button:not(:disabled):hover { background: #ffffff10; } }
@keyframes engagement-pop { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.22); } 72% { transform: scale(.96); } }
@keyframes engagement-count-up { 0% { opacity: .4; transform: translateY(4px); } 100% { opacity: 1; transform: translateY(0); } }
.description-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: transparent; color: white; padding: 20px 0; width: 100%; border: 0; border-top: 1px solid #ffffff25; border-bottom: 1px solid #ffffff25; font-size: 12px; text-align: left; margin: 23px 0; }
.description-trigger .bubble-icon { width: 18px; height: 18px; }
.mobile-description-label { display: none; }
.related-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.related-heading h2 { font-size: 16px; margin: 0; font-weight: 600; }
.related-heading a { font-size: 10px; display: flex; align-items: center; gap: 3px; }
.related-heading .bubble-icon { width: 12px; height: 12px; }
.watch-related .library-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.watch-related .card-picture { aspect-ratio: 9 / 14; border-radius: 4px; }
.watch-related .card-category, .watch-related .save-button { display: none; }
.watch-related .card-duration { right: 4px; bottom: 4px; font-size: 10px; }
.watch-related .card-copy { padding-top: 6px; }
.watch-related .library-card h2 { font-size: 11px; line-height: 1.6; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 34px; }
.watch-related .card-bottom { margin-top: 0; min-height: 34px; }
.watch-related .card-person { font-size: 10px; color: #d7dade; gap: 5px; }
.watch-related .card-person > span { white-space: normal; }
.watch-related .card-person img { width: 22px; height: 22px; }
.watch-related .card-person small { display: block; margin: 2px 0 0; color: #aaaeb6; font-size: 9px; }
.performer-link { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 13px; font-size: 11px; border: 1px solid #ffffff35; border-radius: 5px; }
.performer-link .bubble-icon { width: 15px; height: 15px; }
.watch-notice { font-size: 10px; line-height: 1.9; margin-top: 22px; color: #999fa8; }
.watch-notice summary { cursor: pointer; }
.watch-notice input { accent-color: var(--coral); }
.bubble-dialog { color: var(--ink); background: white; border: 0; border-radius: 13px; width: min(500px, calc(100% - 32px)); padding: 24px; max-height: 80dvh; box-shadow: 0 20px 80px #0006; font-size: 13px; }
.bubble-dialog::backdrop { background: #0009; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.dialog-heading h2 { margin: 0; font-size: 18px; }
.dialog-heading button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); }
.dialog-heading button .bubble-icon { width: 20px; height: 20px; }
.dialog-scroll { max-height: 60dvh; overflow: auto; }
.dialog-scroll h3 { font-size: 16px; margin: 0 0 16px; }
.dialog-scroll p, .transcript { font-size: 13px; line-height: 2; }
.dialog-meta { color: var(--muted); font-size: 11px !important; margin-top: 22px; }
.transcript summary { cursor: pointer; padding: 12px 0; border-top: 1px solid var(--line); }
.share-video-title { margin: 0 0 20px; line-height: 1.7; }
.share-social-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.share-social-link { display: flex; align-items: center; justify-content: center; min-height: 50px; border-radius: 12px; padding: 12px 8px; color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; text-align: center; }
.share-social-line { background: #07843c; }
.share-social-x { background: #15151b; }
.share-social-link:hover { filter: brightness(1.08); }
.share-social-link:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.share-social-link[aria-disabled="true"] { opacity: .6; cursor: wait; }
.share-url-label { display: block; margin: 22px 0 8px; color: var(--muted); font-size: 12px; }
.share-dialog input { width: 100%; padding: 12px; border-radius: 6px; border: 1px solid var(--line); font-size: 12px; color: var(--ink); background: var(--surface); }
.share-dialog-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.share-dialog [data-share-status] { margin: 12px 0 0; color: var(--muted); min-height: 20px; font-size: 13px; line-height: 1.6; }
.quality-dialog h2 { margin-top: 0; font-size: 18px; }
.quality-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.draft-notice { background: #ffefbe; color: #5f4b22; margin: 18px; padding: 18px; border-radius: 8px; font-size: 13px; }
.draft-notice p { margin: 6px 0; }
.draft-notice a { text-decoration: underline; }
.bubble-player:fullscreen { width: 100vw; height: 100dvh; max-width: none; min-height: 0; aspect-ratio: auto; padding-bottom: 58px; }
.bubble-player:fullscreen .bubble-player-controls { left: 20px; right: 20px; bottom: 8px; }

/* Narrow screens put the controls around the same portrait, not below a new page. */
@media (min-width: 1440px) { .library-grid { grid-template-columns: repeat(6,minmax(0,1fr)); } }
@media (max-width: 1180px) {

  .library-main { padding-left: 28px; padding-right: 28px; }

  .watch-information { padding: 28px 22px; }
  .watch-heading h1 { font-size: 22px; }
  .watch-actions { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 4px 12px; }
}
@media (max-width: 900px) and (min-width: 701px) {

  .library-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .watch-shell { grid-template-columns: minmax(0,1fr) 330px; }
  .watch-media { padding-left: 16px; padding-right: 37px; }
  .bubble-player { min-height: 0; height: auto; width: 100%; }
  .watch-information { padding: 26px 18px; }
  .watch-heading h1 { font-size: 19px; }
  .watch-neighbors { right: 2px; }
  .watch-neighbors a, .watch-neighbors button { width: 29px; height: 32px; }
}
@media (max-width: 700px) {

  .brand-symbol { transform: scale(.85); transform-origin: left center; width: 37px; height: 34px; }

  .library-main { padding: 0 14px 40px; }
  .saved-heading { font-size: 22px; margin-top: 22px; }
  .category-scroller { margin: 0 -2px; }
  .category-tabs a { padding: 18px 15px 16px; min-width: 72px; text-align: center; font-size: 12px; }
  .category-tabs a[aria-current]::after { left: 10px; right: 10px; }
  .category-scroller[data-overflow="false"] { padding: 0; }
  .browse-toolbar { padding: 14px 0 13px; display: block; }
  .browse-filters { gap: 8px; }
  .filter-select { flex: 1; min-width: 0; height: 42px; }
  .filter-select select { min-width: 0; max-width: none; width: 100%; font-size: 12px; padding: 0 27px 0 35px; }
  .filter-select > .bubble-icon:first-child { left: 10px; width: 18px; height: 18px; }
  .filter-select > .bubble-icon:last-child { right: 8px; width: 12px; height: 12px; }
  .sort-tabs { margin: 11px -14px -13px; border-bottom: 1px solid var(--line); }
  .sort-tabs a { flex: 1; padding: 16px 10px 14px; font-size: 13px; }
  .demo-notice { font-size: 9px; margin: 13px 0 12px; gap: 6px; }
  .demo-notice > span { font-size: 9px; }
  .library-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 12px; margin-top: 14px; }
  .card-picture { border-radius: 6px; aspect-ratio: 3 / 4; }
  .card-category { font-size: 10px; padding: 4px 8px; left: 7px; top: 7px; }
  .card-duration { font-size: 11px; right: 6px; bottom: 6px; padding: 3px 5px; }
  .card-copy { padding-top: 8px; }
  .library-card h2 { font-size: 12px; font-weight: 650; }
  .card-bottom { gap: 2px; margin-top: 0; min-height: 41px; }
  .card-person { font-size: 10px; gap: 6px; }
  .card-person img { width: 25px; height: 25px; }
  .card-person small { margin-left: 0; font-size: 9px; display: block; }
  .save-button { width: 32px; height: 44px; }
  .save-button .bubble-icon { width: 19px; height: 21px; }

  .library-toast { bottom: calc(78px + env(safe-area-inset-bottom)); padding: 12px 16px; font-size: 11px; }
  .filter-summary { margin-top: 16px; font-size: 11px; }
  .saved-note { font-size: 11px; margin: 16px 0 10px; }
  .library-empty { min-height: 340px; }
  .library-empty h2 { font-size: 18px; }
  .library-empty p { font-size: 12px; }

  .detail-main { margin: 0; height: calc(100dvh - 60px - env(safe-area-inset-bottom)); min-height: 480px; overflow: hidden; }
  .watch-shell { display: block; min-height: 0; height: 100%; overflow: hidden; }
  .watch-media { display: block; height: 100%; padding: 0; }
  .watch-topline { top: calc(14px + env(safe-area-inset-top)); left: 12px; right: 16px; font-size: 12px; text-shadow: 0 1px 6px #0007; }
  .watch-back { background: #0005; padding: 4px 8px 4px 3px; font-size: 12px; }
  .watch-back .bubble-icon { width: 20px; height: 20px; }
  .queue-position { color: #f0f0f0; min-width: 54px; }
  .bubble-player { height: 100%; min-height: 0; width: 100%; max-width: none; aspect-ratio: auto; }
  .bubble-player video, .bubble-player iframe { width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
  .bubble-player[data-orientation="landscape"] video { object-fit: contain; }
  .bubble-player::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, #0004, transparent 17%, transparent 43%, #0002 57%, #000b 84%, #050606 100%); }
  .player-start { z-index: 3; width: 57px; height: 57px; opacity: .9; }
  .bubble-player-controls { left: 16px; right: 16px; bottom: 35px; padding: 0; z-index: 7; }
  .player-controls-row { gap: 5px; min-height: 38px; }
  .player-controls-row button { height: 38px; min-width: 35px; }
  .player-time { font-size: 11px; margin-right: auto; }
  .player-seek { height: 21px; }
  .player-seek input { height: 3px; }
  .watch-information { max-height: none; overflow: visible; padding: 0; }
  .watch-heading { position: absolute; z-index: 5; bottom: 137px; left: 16px; right: 77px; text-shadow: 0 1px 6px #0005; pointer-events: none; }
  .watch-heading a { pointer-events: auto; }
  .watch-heading h1 { font-size: 18px; line-height: 1.45; margin: 0 0 9px; letter-spacing: -.4px; max-height: 53px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .watch-person { gap: 7px; margin: 0; flex-wrap: wrap; }
  .watch-avatar img { width: 33px; height: 33px; }
  .watch-person > div { gap: 4px; flex: 1; }
  .watch-person-name { font-size: 11px; }
  .watch-store { font-size: 10px; text-decoration: none; color: #f0f0f0; }
  .watch-store .bubble-icon { display: none; }
  .performer-shortcut { display: inline-flex; gap: 1px; align-items: center; font-size: 10px; padding: 5px 6px 5px 9px; border: 1px solid #ffffffa0; border-radius: 15px; margin-left: 1px; white-space: nowrap; background: #0002; }
  .performer-shortcut .bubble-icon { width: 11px; height: 15px; }
  .watch-category, .watch-description-preview { display: none; }
  .watch-actions { position: absolute; z-index: 8; right: 8px; bottom: 143px; width: 54px; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  .engagement-button { min-height: 59px; padding: 3px 0; gap: 3px; text-shadow: 0 1px 5px #0009; }
  .engagement-button > .bubble-icon { width: 29px; height: 29px; filter: drop-shadow(0 1px 4px #0005); }
  .engagement-button > .engagement-label { font-size: 9px; line-height: 1.2; }
  .engagement-count { font-size: 12px; }
  .description-trigger { position: absolute; left: 16px; bottom: 102px; width: auto; margin: 0; z-index: 6; border: 0; padding: 5px 0; min-height: 35px; justify-content: start; font-size: 11px; gap: 4px; }
  .description-trigger .bubble-icon { width: 13px; height: 13px; }
  .desktop-description-label { display: none; }
  .mobile-description-label { display: inline; }
  .watch-related, .watch-notice { display: none; }
  .watch-neighbors { display: none; }
  .swipe-hint { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 0; left: 16px; right: 16px; bottom: 4px; z-index: 4; margin: 0; color: #eee; font-size: 11px; line-height: 14px; pointer-events: none; }
  .bubble-dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 18px 18px 0 0; padding: 20px 20px calc(22px + env(safe-area-inset-bottom)); max-height: 78dvh; }
  .dialog-scroll { max-height: 55dvh; }
  .dialog-heading h2 { font-size: 17px; }
  .dialog-scroll h3 { font-size: 15px; }
  .dialog-scroll p { font-size: 12px; }
  .bubble-player:fullscreen { padding: 0; }
  .bubble-player:fullscreen::after { background: linear-gradient(transparent 70%, #0009); }
  .bubble-player:fullscreen video { object-fit: contain; }
  .bubble-player:fullscreen .bubble-player-controls { bottom: 10px; }
}
@media (max-width: 700px) and (max-height: 760px) {
  .watch-actions { bottom: 133px; gap: 5px; }
  .engagement-button { min-height: 52px; gap: 2px; }
  .engagement-button > .bubble-icon { width: 25px; height: 25px; }
  .engagement-count { font-size: 11px; }
  .watch-heading h1 { font-size: 16px; }
}
@media (max-width: 360px) {
  .library-main { padding-left: 10px; padding-right: 10px; }
  .sort-tabs { margin-left: -10px; margin-right: -10px; }
  .card-person img { width: 22px; height: 22px; }
  .card-person { font-size: 9px; gap: 4px; }
  .card-person small { font-size: 8px; }
  .watch-person { gap: 5px; }
  .performer-shortcut { font-size: 9px; }
}
@media (max-width: 700px) and (max-height: 650px) {
  .watch-actions { bottom: 126px; gap: 4px; }
  .engagement-button { min-height: 45px; padding: 2px 0; gap: 1px; }
  .engagement-button > .bubble-icon { width: 22px; height: 22px; }
  .engagement-button > .engagement-label { font-size: 8px; }
  .engagement-count { font-size: 10px; }
}
@media (max-width: 700px) and (max-height: 550px) {
  .detail-main { min-height: 0; }
  .bubble-player video { object-fit: contain; }
  .watch-topline { top: 5px; }
  .watch-heading { bottom: 100px; right: 140px; }
  .watch-heading h1 { font-size: 14px; margin-bottom: 5px; -webkit-line-clamp: 1; }
  .watch-avatar img { width: 26px; height: 26px; }
  .watch-actions { top: 53px; bottom: auto; width: 108px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 3px; }
  .engagement-button { min-height: 50px; }
  .engagement-button > .bubble-icon { width: 22px; height: 22px; }
  .description-trigger { bottom: 68px; min-height: 28px; }
  .bubble-player-controls { bottom: 5px; }
  .swipe-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
.library-embed { background: #070808; }
.library-embed main { height: 100dvh; display: flex; flex-direction: column; }
.embed-player { flex: 1; min-height: 0; display: grid; place-items: center; color: white; }
.embed-player video, .embed-player iframe { display: block; width: 100%; height: 100%; object-fit: contain; border: 0; }
.library-embed main > a { background: white; color: var(--coral); font-weight: 600; padding: 15px; text-align: center; font-size: 13px; }

/* Fallback for browsers that do not grant the native fullscreen request. */
.bubble-player.is-expanded {
  position: fixed; inset: 0; z-index: 1000;
  width: 100vw; height: 100dvh; min-height: 0; max-height: none; max-width: none;
  aspect-ratio: auto; padding: 48px 18px 70px; margin: 0;
  background: #070808; border-radius: 0; overscroll-behavior: contain;
}
.bubble-player.is-expanded video { object-fit: contain; border-radius: 0; }
.bubble-player.is-expanded::after { display: none; }
.bubble-player.is-expanded .bubble-player-controls { left: 22px; right: 22px; bottom: calc(8px + env(safe-area-inset-bottom)); }

/* A single active player, with inert poster previews during a vertical swipe. */
.detail-main { position: relative; }
.detail-main.is-feed-moving { overflow: hidden; }
.is-feed-moving > .watch-shell { will-change: transform; }
.watch-media { touch-action: pan-x pinch-zoom; }
.bubble-player video { touch-action: pan-x pinch-zoom; }
.feed-preview { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--watch); pointer-events: none; user-select: none; }
.feed-poster, .player-embed-poster { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.feed-preview .bubble-player-controls { display: block; }
.detail-main[aria-busy="true"]::after { content: "読み込み中…"; position: absolute; top: 70px; left: 50%; transform: translateX(-50%); z-index: 20; color: #fff; background: #101213ce; border-radius: 20px; padding: 8px 16px; font-size: 12px; animation: feed-loading 0s .4s both; pointer-events: none; }
@keyframes feed-loading { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 700px) {
  .feed-poster, .player-embed-poster { object-fit: cover; border-radius: 0; }
  .bubble-player[data-orientation="landscape"] :is(.feed-poster, .player-embed-poster) { object-fit: contain; }
}
@media (prefers-reduced-motion: reduce) { .is-feed-moving > .watch-shell { will-change: auto; } }
.player-expanded-close {
  position: absolute; z-index: 12; top: calc(10px + env(safe-area-inset-top)); right: 16px;
  min-width: 68px; min-height: 40px; padding: 9px 16px; color: white; background: #242729;
  border: 1px solid #ffffff45; border-radius: 6px; font-size: 12px;
}
