@font-face { font-family: "Ticketing"; src: url("assets/ticketing.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Noto Sans JP"; src: url("assets/noto-jp-subset.woff2") format("woff2"); font-display: swap; }

:root {
  --bg: #050505;
  --panel: #111112;
  --panel-2: #0a0a0b;
  --line: #222225;
  --fg: #f0f0f0;
  --dim: #8c8c8c;
  --blue: #0015ff;
  --blue-l: #9aa3ff;
  --orange: #ff4000;
  --orange-l: #ff7a4a;
  --col: 300px;
  --gap: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--fg); font-family: "Ticketing", "Noto Sans JP", ui-monospace, monospace; text-transform: uppercase; -webkit-font-smoothing: antialiased; }
body.mode-canvas { overflow: hidden; height: 100vh; height: 100dvh; overscroll-behavior: none; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-transform: inherit; }
img { display: block; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* the site's background: grain + a faint grid, behind everything */
.noise { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: url("assets/noise.gif"); opacity: 0.08; }
.bg-grid { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: linear-gradient(rgba(0,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(0,255,255,0.04) 1px, transparent 1px); background-size: 100px 100px; }

/* ---------- header ---------- */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: 64px; display: flex; align-items: center; gap: 28px; padding: 0 24px; background: linear-gradient(180deg, rgba(5,5,5,0.96) 60%, rgba(5,5,5,0)); }
.brand img { height: 22px; width: auto; filter: drop-shadow(0 0 6px rgba(0,21,255,0.9)); }
.home { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; color: #cfcfcf; transition: border-color 0.2s, color 0.2s; }
.home svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.home:hover { border-color: var(--orange); color: var(--orange-l); }
.search { margin-left: auto; display: flex; align-items: center; gap: 8px; height: 36px; width: 280px; padding: 0 10px; border: 1px solid var(--line); background: #0c0c0d; border-radius: 8px; }
.search svg { width: 15px; height: 15px; fill: none; stroke: var(--dim); stroke-width: 2; flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--fg); font: inherit; font-size: 13px; text-transform: uppercase; }
.search input::placeholder { color: #6a6a6a; }
.search kbd { font: inherit; font-size: 11px; color: var(--dim); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }

/* ---------- cards ---------- */
.card { position: absolute; left: 0; width: var(--col); border-radius: 14px; background: var(--panel); border: 1px solid var(--line); padding: 8px; cursor: pointer; transition: border-color 0.25s, transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s; }
.card-h { display: flex; align-items: center; gap: 7px; height: 26px; padding: 0 6px 6px; font-size: 12px; white-space: nowrap; overflow: hidden; }
.card-h .nm { color: var(--fg); }
.card-h .lb { color: #6f6f6f; overflow: hidden; text-overflow: ellipsis; }
.card-h i { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 8px var(--orange); flex: none; }
.well { position: relative; border-radius: 9px; background: var(--panel-2); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.well img { max-width: 100%; max-height: 100%; opacity: 0; filter: blur(5px); transition: opacity 0.6s, filter 0.6s; }
.well img.ld { opacity: 1; filter: blur(0); }
.k-web .well img { width: 100%; height: 100%; object-fit: cover; }
.k-phone .well img { height: 92%; width: auto; }
.k-mobile .well img, .k-poster .well img { height: 92%; width: auto; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.6); }
.k-icon .well img { width: 46%; height: auto; border-radius: 22%; }
.go { position: absolute; left: 10px; bottom: 10px; font-size: 11px; color: #000; background: var(--orange); padding: 4px 8px; border-radius: 4px; opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s; pointer-events: none; }
.card:hover { border-color: rgba(255,64,0,0.6); box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,64,0,0.3); }
.card:hover .go { opacity: 1; transform: none; }

/* ---------- canvas mode ---------- */
.canvas { position: fixed; inset: 0; z-index: 1; overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.canvas.drag { cursor: grabbing; }
.canvas.drag .card { pointer-events: none; }
.tiles { position: absolute; left: 0; top: 0; will-change: transform; }
.col { position: absolute; top: 0; width: var(--col); will-change: transform; }
.canvas img { -webkit-user-drag: none; pointer-events: none; }
body.mode-list .canvas { display: none; }

/* ---------- list mode ---------- */
.list { display: none; position: relative; z-index: 1; padding: 96px 24px 140px; }
body.mode-list .list { display: block; }
.list-head { position: relative; max-width: 1400px; margin: 0 auto 26px; height: 74px; border-bottom: 1.5px dashed #2c2c2c; }
.sec-w { display: flex; flex-direction: column; font-size: 13px; line-height: 1.05; color: #a8a8a8; }
.sec-k { position: absolute; right: 0; bottom: 8px; font-size: 15px; color: #a8a8a8; text-transform: none; }
.cols { position: relative; max-width: 1400px; margin: 0 auto; display: flex; gap: var(--gap); align-items: flex-start; }
.cols .lcol { flex: 1; display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.cols .card { position: relative; width: 100%; }

/* ---------- dock ---------- */
.dock { position: fixed; z-index: 45; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 14px; background: rgba(14,14,15,0.92); border: 1px solid var(--line); backdrop-filter: blur(10px); box-shadow: 0 20px 50px rgba(0,0,0,0.6); }
.dk { height: 40px; min-width: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: #bdbdbd; transition: background 0.2s, color 0.2s; }
.dk svg { width: 18px; height: 18px; fill: currentColor; }
.dk:hover { background: #1c1c1e; color: #fff; }
.dk[aria-pressed="true"] { background: #232326; color: var(--orange-l); }
.dk-txt { padding: 0 14px; font-size: 13px; gap: 8px; white-space: nowrap; }
.dk-txt span { color: var(--orange-l); }
.dk-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.i-play { display: none; }
body.paused .i-play { display: block; }
body.paused .i-pause { display: none; }
.hint { position: fixed; z-index: 44; left: 50%; bottom: 84px; transform: translateX(-50%); font-size: 11px; color: var(--dim); letter-spacing: 0.15em; transition: opacity 0.6s; pointer-events: none; }
body.mode-list .hint { opacity: 0; }

/* ---------- index ---------- */
.index { position: fixed; z-index: 46; left: 50%; bottom: 84px; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); max-height: 62vh; overflow: auto; background: rgba(12,12,13,0.97); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: 0 30px 80px rgba(0,0,0,0.7); }
.ix-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); padding: 4px 8px 12px; border-bottom: 1.5px dashed #2c2c2c; margin-bottom: 6px; }
.ix-head .k { text-transform: none; }
.index ul { list-style: none; }
.index li button { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; align-items: baseline; gap: 10px; padding: 9px 8px; border-radius: 8px; text-align: left; }
.index li button:hover, .index li button.on { background: #19191b; }
.index li .n { color: var(--orange-l); font-size: 12px; }
.index li .t { font-size: 20px; }
.index li .c { font-size: 11px; color: var(--dim); }
.index li button.on .t { color: var(--orange); }

/* ---------- viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: minmax(320px, 420px) 1fr; background: var(--bg); }
.viewer[hidden] { display: none; }
.v-side { position: relative; padding: 28px 32px; display: flex; flex-direction: column; gap: 16px; border-right: 1px solid var(--line); overflow: auto; }
.v-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--dim); }
.v-x { font-size: 12px; color: #cfcfcf; display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; }
.v-x:hover { border-color: var(--orange); color: var(--orange); }
.v-type { margin-top: 18px; font-size: 13px; color: var(--blue-l); }
.v-name { font-weight: normal; font-size: clamp(44px, 5vw, 76px); line-height: 0.95; color: var(--orange); text-shadow: 0 0 22px rgba(255,64,0,0.45); }
.v-line { font-size: 20px; line-height: 1.35; }
.v-out { font-size: 15px; line-height: 1.55; color: #dcdcdc; padding-top: 10px; border-top: 1.5px dashed #2c2c2c; }
.v-out b { font-weight: normal; color: var(--blue-l); }
.v-out p { margin: 6px 0 12px; }
.v-stack { color: var(--fg); }
.v-nav { display: flex; gap: 10px; margin-top: auto; }
.v-nav button { flex: 1; height: 42px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.v-nav button:hover { border-color: #555; background: #141416; }
.v-main { position: relative; min-width: 0; display: flex; flex-direction: column; }
.v-main::before, .v-main::after { content: ""; position: absolute; top: 0; bottom: 64px; width: 90px; z-index: 2; pointer-events: none; transition: opacity 0.3s; }
.v-main::before { left: 0; background: linear-gradient(90deg, rgba(5,5,5,0.95), transparent); }
.v-main::after { right: 0; background: linear-gradient(-90deg, rgba(5,5,5,0.95), transparent); }
.v-main.at-start::before, .v-main.at-end::after { opacity: 0; }
.v-gal { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; gap: 28px; overflow-x: auto; overflow-y: hidden; padding: 0 12vw 0 60px; scroll-snap-type: x proximity; cursor: grab; scrollbar-width: none; }
.v-gal::-webkit-scrollbar { display: none; }
.v-arr { position: absolute; z-index: 3; top: calc(50% - 32px); transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(14,14,15,0.9); border: 1px solid #333; backdrop-filter: blur(8px); transition: opacity 0.3s, border-color 0.2s, color 0.2s, transform 0.2s; }
.v-arr svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.v-arr.l { left: 20px; } .v-arr.r { right: 20px; }
.v-arr:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-50%) scale(1.06); }
.v-arr[disabled] { opacity: 0; pointer-events: none; }
.v-arr.r.nudge { animation: nudge 1.4s ease-in-out 3; border-color: var(--orange); color: var(--orange); }
@keyframes nudge { 0%, 100% { transform: translateY(-50%); } 50% { transform: translateY(-50%) translateX(6px); } }
.v-foot { height: 64px; flex: none; display: flex; align-items: center; gap: 18px; padding: 0 60px; font-size: 12px; color: var(--dim); }
.v-count { white-space: nowrap; } .v-count b { font-weight: normal; color: var(--orange-l); }
.v-track { position: relative; flex: 1; max-width: 520px; height: 2px; background: #222; border-radius: 2px; overflow: hidden; }
.v-track i { position: absolute; left: 0; top: 0; bottom: 0; width: 20%; background: var(--orange); box-shadow: 0 0 10px var(--orange); border-radius: 2px; transition: width 0.15s linear, left 0.15s linear; }
.v-hint { margin-left: auto; white-space: nowrap; letter-spacing: 0.08em; transition: opacity 0.5s; }
.v-hint.gone { opacity: 0; }
.v-gal.drag { cursor: grabbing; scroll-snap-type: none; }
.v-it { flex: none; height: 70vh; display: flex; flex-direction: column; gap: 10px; scroll-snap-align: center; }
.v-it .lab { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); }
.v-it .box { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.v-it img { max-height: 100%; height: 100%; width: auto; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,0.7); -webkit-user-drag: none; user-select: none; }
.v-it:not(.k-web) { width: calc((70vh - 26px) * var(--ar)); }
.v-it .box img { width: 100%; }
.v-it.k-web { height: auto; }
.v-it.k-web img { height: auto; width: min(64vw, 1100px); max-height: 70vh; object-fit: contain; }
.v-it.k-phone img, .v-it.k-icon img { border-radius: 0; box-shadow: none; filter: drop-shadow(0 30px 60px rgba(0,0,0,0.7)); }
.v-it.k-icon { height: 40vh; }
.v-it.hl .lab span:first-child { color: var(--orange-l); }
.v-it.hl .lab span:first-child::before { content: "● "; color: var(--orange); }

/* ---------- intro ---------- */
.intro { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; align-items: center; justify-content: center; pointer-events: none; transition: opacity 0.8s ease; }
.intro.out { opacity: 0; }
/* the logo resolves from heavy blur to sharp by cross-dissolving pre-blurred copies (opacity only:
   each blur is rasterised once, so the focus pull stays smooth at full frame rate, Safari included) */
.in-logo { position: relative; width: min(92vw, 1500px); }
.in-logo .l { position: absolute; inset: 0; width: 100%; opacity: 0; will-change: opacity; animation: 2.6s ease-in-out both; }
.in-logo .l5 { position: relative; display: block; }
.in-logo .l1 { filter: blur(40px); animation-name: f1; }
.in-logo .l2 { filter: blur(18px); animation-name: f2; }
.in-logo .l3 { filter: blur(8px) drop-shadow(0 0 14px var(--blue)); animation-name: f3; }
.in-logo .l4 { filter: blur(3px) drop-shadow(0 0 10px var(--blue)) drop-shadow(0 0 22px var(--blue)); animation-name: f4; }
.in-logo .l5 { filter: drop-shadow(0 0 8px var(--blue)) drop-shadow(0 0 20px var(--blue)); animation-name: f5; }
@keyframes f1 { 0% { opacity: 0; } 15% { opacity: 1; } 38% { opacity: 1; } 56% { opacity: 0; } 100% { opacity: 0; } }
@keyframes f2 { 0%, 24% { opacity: 0; } 40% { opacity: 1; } 58% { opacity: 1; } 73% { opacity: 0; } 100% { opacity: 0; } }
@keyframes f3 { 0%, 44% { opacity: 0; } 60% { opacity: 1; } 74% { opacity: 1; } 87% { opacity: 0; } 100% { opacity: 0; } }
@keyframes f4 { 0%, 61% { opacity: 0; } 76% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes f5 { 0%, 73% { opacity: 0; } 93% { opacity: 1; } 100% { opacity: 1; } }
.in-k { position: absolute; top: 18vh; font-size: clamp(28px, 4vw, 54px); color: #ff6a4a; text-shadow: 0 0 10px #ff2040, 0 0 25px #ff1030, 0 0 40px #ff0020; text-transform: none; animation: fade 1s 0.3s both; }
.in-k.l { left: 4vw; } .in-k.r { right: 4vw; }
.in-rule { position: absolute; left: 0; right: 0; top: calc(18vh + 80px); height: 1px; background: var(--blue); box-shadow: 0 0 8px var(--blue); animation: rule 1.2s 0.2s both cubic-bezier(.7,0,.2,1); }
.in-t { position: absolute; bottom: 16vh; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: clamp(20px, 2.4vw, 34px); letter-spacing: 0.12em; animation: fade 1s 0.6s both; }
.in-t .k { font-size: 14px; color: var(--blue-l); letter-spacing: 0.4em; text-transform: none; }
@keyframes fade { from { opacity: 0; filter: blur(6px); transform: translateY(10px); } to { opacity: 1; filter: none; transform: none; } }
@keyframes rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  :root { --col: 230px; --gap: 12px; }
  /* header, same pieces as desktop: logo · showreel island · home, then the search bar full width */
  .top { flex-wrap: wrap; align-content: flex-start; gap: 10px 8px; height: auto; padding: calc(12px + env(safe-area-inset-top)) 12px 14px; background: linear-gradient(180deg, rgba(5,5,5,0.97) 78%, rgba(5,5,5,0)); }
  .brand { height: 36px; display: flex; align-items: center; }
  .brand img { height: 18px; }
  .home { order: 2; margin-left: auto; height: 36px; padding: 0 10px; }
  .home span { display: none; }
  .search { order: 3; flex: 0 0 100%; width: 100%; height: 42px; padding: 0 6px 0 12px; }
  .search input { font-size: 16px; }
  .search kbd { display: none; }
  .dock { bottom: calc(12px + env(safe-area-inset-bottom)); }
  .hint { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .index { bottom: calc(76px + env(safe-area-inset-bottom)); max-height: 60dvh; }
  .viewer { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .v-side { overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); padding: calc(18px + env(safe-area-inset-top)) 20px 20px; gap: 12px; }
  .v-name { font-size: 46px; }
  .v-line { font-size: 17px; }
  .v-out { font-size: 13px; }
  .v-main { height: 76dvh; min-height: 480px; }
  .v-main::before, .v-main::after { width: 28px; bottom: 56px; }
  .v-foot { height: 56px; }
  .v-nav { margin-top: 6px; }
  .v-gal { padding: 16px 20px; }
  .v-arr { display: none; }
  .v-foot { padding: 0 20px; } .v-hint { display: none; }
  .v-it { height: 60dvh; }
  .v-it:not(.k-web) { width: calc((60dvh - 26px) * var(--ar)); }
  .v-it.k-web img { width: 86vw; }
  .list { padding: calc(132px + env(safe-area-inset-top)) 12px calc(110px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .in-logo .l, .in-k, .in-rule, .in-t { animation: none; } .in-logo .l5 { opacity: 1; } }

.empty { position: absolute; top: 45vh; left: 50vw; transform: translateX(-50%); white-space: nowrap; color: var(--dim); font-size: 14px; letter-spacing: 0.12em; }
.cols .empty { position: static; transform: none; margin: 10vh auto; }

/* ---------- showreel island ---------- */
.island { position: fixed; z-index: 50; top: 12px; left: 50%; transform: translateX(-50%); width: 252px; height: 40px; border-radius: 22px; background: #000; border: 1px solid #1f1f22; box-shadow: 0 12px 40px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.02); overflow: hidden; display: flex; flex-direction: column; padding: 0; text-align: left;
  transition: width 0.55s cubic-bezier(.2,1.25,.3,1), height 0.55s cubic-bezier(.2,1.25,.3,1), border-radius 0.55s cubic-bezier(.2,1.25,.3,1), border-color 0.3s, box-shadow 0.3s; }
.isl-media { position: relative; display: block; flex: 0 0 0; height: 0; margin: 0 10px; border-radius: 16px; overflow: hidden; background: #0b0b0c; opacity: 0; transition: flex-basis 0.55s cubic-bezier(.2,1.25,.3,1), height 0.55s cubic-bezier(.2,1.25,.3,1), margin 0.55s, opacity 0.35s 0.05s; }
.isl-vid { width: 100%; height: 100%; object-fit: cover; display: block; }
.isl-play { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,64,0,0.92); box-shadow: 0 0 0 6px rgba(255,64,0,0.18), 0 0 30px rgba(255,64,0,0.6); transform: scale(0.6); opacity: 0; transition: transform 0.45s 0.15s cubic-bezier(.2,1.4,.3,1), opacity 0.3s 0.15s; }
.isl-play svg { width: 22px; height: 22px; fill: #000; margin-left: 3px; }
.isl-bar { flex: none; height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 16px 0 14px; font-size: 12px; white-space: nowrap; }
.isl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 8px var(--orange); animation: blink 1.6s ease-in-out infinite; flex: none; }
@keyframes blink { 50% { opacity: 0.35; } }
.isl-t { color: #eaeaea; letter-spacing: 0.06em; }
.isl-time { color: #6c6c6c; margin-left: auto; opacity: 0; width: 0; transition: opacity 0.3s; }
.isl-eq { display: flex; align-items: flex-end; gap: 2px; height: 12px; margin-left: auto; }
.isl-eq i { width: 2px; background: var(--orange-l); border-radius: 1px; animation: eq 0.9s ease-in-out infinite; }
.isl-eq i:nth-child(1) { height: 5px; } .isl-eq i:nth-child(2) { height: 11px; animation-delay: -0.3s; } .isl-eq i:nth-child(3) { height: 7px; animation-delay: -0.6s; } .isl-eq i:nth-child(4) { height: 9px; animation-delay: -0.15s; }
@keyframes eq { 50% { transform: scaleY(0.35); } }
.isl-eq i { transform-origin: bottom; }
.island.open { width: 400px; height: 276px; border-radius: 30px; border-color: #2a2a2e; box-shadow: 0 30px 80px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,64,0,0.15); }
.island.open .isl-media { flex-basis: 226px; height: 226px; margin: 10px 10px 0; opacity: 1; }
.island.open .isl-play { transform: scale(1); opacity: 1; }
.island.open .isl-time { opacity: 1; width: auto; }
.island.open .isl-eq { margin-left: 0; }
.island:hover .isl-play { background: var(--orange); }
.island:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

/* ---------- showreel theatre ---------- */
.theatre { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; }
.theatre[hidden] { display: none; }
.th-back { position: absolute; inset: 0; background: rgba(0,0,0,0.86); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.5s ease; }
.theatre.in .th-back { opacity: 1; }
.th-box { position: relative; width: min(88vw, calc((100vh - 140px) * 16 / 9)); aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; border: 1px solid #222; box-shadow: 0 40px 120px rgba(0,0,0,0.8), 0 0 80px rgba(0,21,255,0.12); transform-origin: 0 0; }
.th-box.anim { transition: transform 0.65s cubic-bezier(.2,.9,.2,1), border-radius 0.65s; }
.th-box video { width: 100%; height: 100%; display: block; background: #000; }
.th-x { position: absolute; top: 20px; right: 24px; z-index: 2; font-size: 12px; color: #cfcfcf; display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid #333; border-radius: 8px; background: rgba(10,10,11,0.8); opacity: 0; transition: opacity 0.4s 0.3s, border-color 0.2s, color 0.2s; }
.theatre.in .th-x { opacity: 1; }
.th-x:hover { border-color: var(--orange); color: var(--orange); }
@media (max-width: 760px) {
  /* the island sits in the header, centred, and opens the player on tap */
  .island { top: calc(12px + env(safe-area-inset-top)); bottom: auto; width: 128px; height: 36px; z-index: 41; }
  .isl-bar { height: 34px; gap: 7px; padding: 0 11px 0 11px; font-size: 11px; }
  .isl-w, .isl-time { display: none; }
  .island.open { width: 128px; height: 36px; border-radius: 22px; }
  .island.open .isl-media { flex-basis: 0; height: 0; margin: 0 10px; opacity: 0; }
  .island.open .isl-time { opacity: 0; width: 0; }
  .th-box { width: 94vw; border-radius: 12px; }
  .th-x { top: calc(14px + env(safe-area-inset-top)); right: 14px; }
}
@media (prefers-reduced-motion: reduce) { .island, .isl-media, .isl-play, .th-box.anim { transition: none; } .isl-eq i, .isl-dot { animation: none; } }
@media (max-width: 1000px) and (min-width: 761px) { .search { width: 200px; } }
body.focus .hint { opacity: 0; }
body.focus .well img { height: 100%; width: 100%; object-fit: contain; border-radius: 0; box-shadow: none; }
body.focus .k-mobile .well img, body.focus .k-poster .well img { border-radius: 12px; }

.q-x { display: none; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 6px; color: var(--dim); font-size: 13px; }
.q-x:hover { color: var(--orange); }
.search input::-webkit-search-cancel-button { display: none; }
@media (max-width: 380px) { .island { width: 116px; } .isl-eq { display: none; } }
.search.has-q .q-x { display: grid; }
