#connection.n1-panel {
  --accent: #f2f2f2;
  width: min(860px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #454545;
  border-radius: 8px;
  color: #f7f7f7;
  background: #101010;
  box-shadow: 0 26px 100px #000a;
}
#connection.n1-panel[open] { animation: n1-open 220ms ease-out both; }
#connection.n1-panel::backdrop { background: #000b; backdrop-filter: blur(7px); }
.n1-panel [hidden] { display: none !important; }
.n1-bar { min-height: 54px; padding: 0 12px 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #363636; }
.n1-bar-title { display: inline-flex; align-items: center; gap: 11px; font-size: 14px; }
.n1-bar-title svg { color: var(--accent); }
.n1-bar button { width: 42px; height: 42px; min-height: 42px; padding: 0; border: none; }
.n1-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.n1-visual { position: relative; isolation: isolate; overflow: hidden; min-height: 390px; background: #080808; border-right: 1px solid #303030; }
.n1-visual { background: #000; }
.n1-poster, .n1-film { position: absolute; top: 50%; left: 50%; width: 100%; height: 93%; transform: translate(-50%,-50%); object-fit: contain; filter: grayscale(1); pointer-events: none; }
.n1-poster { z-index: 1; }
.n1-panel[data-film="playing"] .n1-poster { visibility: hidden; }
.n1-controls { min-width: 0; padding: clamp(25px,3.5vw,40px) clamp(22px,3vw,34px) 26px; }
.n1-controls h2 { margin: 0 0 6px; font-size: clamp(32px,3.2vw,44px); font-weight: 700; letter-spacing: -.055em; line-height: 1.03; }
.n1-subtitle { color: #bfbfbf; font-size: 14px; }
.n1-readings { margin: 25px 0 0; border-top: 1px solid #373737; }
.n1-readings > div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 10px 0; border-bottom: 1px solid #373737; }
.n1-readings dt { color: #c7c7c7; font-size: 13px; }
.n1-readings dd { margin: 0; text-align: right; font: 12px/1.4 ui-monospace,monospace; }
.n1-panel:is([data-phase='connected'],[data-phase='streaming']) [data-n1-transport], .n1-receiving { color: var(--accent); }
.n1-panel .n1-instruction, .n1-help p, .n1-panel .n1-device-name { color: #d4d4d4; font-size: 13px; line-height: 1.5; }
.n1-panel .n1-instruction { margin: 17px 0 18px; }
.n1-panel .n1-device-name { overflow-wrap: anywhere; margin: 12px 0 -9px; }
.n1-buttons { display: grid; gap: 6px; }
.n1-buttons button { min-height: 42px; font-size: 14px; }
.n1-buttons :is(.n1-connect,.n1-return) { color: #101010; border-color: var(--accent); background: var(--accent); font-weight: 700; }
.n1-buttons :is(.n1-connect,.n1-return):hover { background: #ddd; }
.n1-buttons .n1-connect:disabled { color: #d8d8d8; background: #222; border-color: #464646; cursor: wait; }
.n1-buttons .n1-secondary { border-color: #434343; }
.n1-help { margin-top: 12px; color: #c7c7c7; }
.n1-help summary { width: max-content; max-width: 100%; font-size: 12px; min-height: 30px; line-height: 30px; cursor: pointer; }
.n1-help p { margin: 3px 0 0; }
.n1-panel :is(button,summary):focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@keyframes n1-open { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media(max-width:640px) {
  #connection.n1-panel { width: min(430px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); }
  .n1-bar { min-height: 44px; padding-left: 18px; }
  .n1-layout { grid-template-columns: 1fr; }
  .n1-visual { min-height: 0; height: clamp(144px, 24dvh, 210px); border: 0; border-bottom: 1px solid #303030; }
  .n1-poster, .n1-film { top: 47%; width: 100%; height: 142%; }
  .n1-controls { padding: 20px 19px 14px; }
  .n1-controls h2 { font-size: 31px; }
  .n1-readings { margin-top: 16px; }
  .n1-readings > div { padding: 7px 0; }
  .n1-panel .n1-instruction { margin: 12px 0; }
  .n1-help { margin-top: 6px; }
}
@media(prefers-reduced-motion:reduce) {
  #connection.n1-panel, .n1-panel *, .n1-panel *::after { animation: none !important; transition: none !important; }
}
body.reduce-motion #connection.n1-panel, body.reduce-motion .n1-panel *, body.reduce-motion .n1-panel *::after { animation: none !important; transition: none !important; }
