:root {
  color-scheme: light;
  --ink: #152941;
  --muted: #4a6177;
  --blue: #155694;
  --navy: #102c47;
  --edge: #d7e1ea;
  background: #f3f7fa;
  color: var(--ink);
  font: 16px/1.55 Inter, "Segoe UI", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--blue); text-decoration: none; }
a:hover, summary:hover { color: #0d72bf; }
:focus-visible { outline: 3px solid #3287ca; outline-offset: 3px; }
.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.top { background: #fff; border-bottom: 1px solid var(--edge); }
.top-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); font-weight: 750; }
.brand small { color: var(--muted); font-weight: 500; margin-left: 7px; font-size: 14px; }
.brand-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--navy); }
.brand-icon::after { content: ""; border: 6px solid transparent; border-left: 10px solid #fff; border-right: 0; margin-left: 2px; }
.nav-link { font-weight: 650; }
.main { padding-block: 44px 60px; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.13; letter-spacing: -0.035em; }
h2 { font-size: 21px; line-height: 1.3; }
h3 { font-size: 17px; line-height: 1.45; }
.page-heading, .list-heading, .row-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-heading { margin-bottom: 25px; }
.panel, .card { border: 1px solid var(--edge); border-radius: 14px; background: #fff; }
.panel { padding: 24px; min-width: 0; }
.studio-grid { display: grid; grid-template-columns: minmax(260px, .77fr) minmax(0, 1.23fr); gap: 22px; align-items: start; }
.login { padding-block: 65px; }
.login .panel { width: min(100%, 480px); margin-inline: auto; padding: 32px; }
.login h1 { font-size: 34px; }
form { display: grid; gap: 14px; margin-top: 18px; }
label { display: grid; gap: 5px; font-weight: 650; }
input, textarea, button, select { font: inherit; color: inherit; }
input:not([type=file]), textarea, select { width: 100%; border: 1px solid #b9c9d7; border-radius: 7px; padding: 8px 10px; background: #fff; }
textarea { resize: vertical; min-height: 64px; }
input[type=file] { width: 100%; font-weight: 450; font-size: 14px; }
input::file-selector-button { font: inherit; color: var(--blue); padding: 6px 9px; border: 1px solid #bbcddd; border-radius: 6px; background: #fff; cursor: pointer; }
.drop { padding: 13px; border: 1px dashed #9ab5cb; background: #f5f9fc; border-radius: 9px; }
.drop .muted { font-size: 14px; font-weight: 450; }
button { border: 1px solid transparent; border-radius: 8px; min-height: 42px; padding: 7px 13px; cursor: pointer; font-weight: 650; }
button:disabled { opacity: .62; cursor: wait; }
.primary { background: var(--navy); color: #fff; justify-self: start; }
.primary:hover:not(:disabled) { background: #174d7c; }
.quiet { background: #eff5f9; color: #124a7b; }
.quiet:hover:not(:disabled) { background: #e3eff8; }
.muted { color: var(--muted); margin-top: 12px; }
.feedback { color: #315371; font-size: 14px; }
.feedback:empty { display: none; }
.error { color: #9c2537; font-size: 14px; }
progress { accent-color: var(--blue); width: 100%; }
.video-row { padding-block: 17px 12px; border-bottom: 1px solid var(--edge); }
.video-row:last-child { border-bottom: 0; }
.state { flex-shrink: 0; padding: 3px 8px; border-radius: 6px; font-size: 13px; background: #eaf1f7; color: #31516a; }
.state-ready { color: #185a49; background: #e4f4ee; }
.state-failed { color: #8b2935; background: #fbe9eb; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-block: 8px; }
.row-actions a { padding: 4px 5px; font-weight: 650; }
.row-actions button { min-height: 36px; font-size: 14px; padding: 4px 8px; }
.file-action { font-size: 14px; font-weight: 600; }
.file-action input { max-width: 185px; }
summary { color: var(--blue); font-weight: 650; cursor: pointer; width: fit-content; }
.video-edit { margin-block: 12px 16px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr)); gap: 20px; margin-top: 25px; }
.card { overflow: hidden; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; display: block; background: var(--navy); }
.card h2 { padding: 14px 17px; font-size: 17px; }
.watch { max-width: 920px; }
.watch h1 { margin-bottom: 21px; }
.video-shell { max-width: 100%; }
.video-shell video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 72vh; background: #101820; border-radius: 10px; }
.description { white-space: pre-wrap; margin-top: 20px; max-width: 70ch; }
.nvv-controls { margin-top: 8px; display: flex; justify-content: flex-end; }
.nvv-controls label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.nvv-controls select { width: auto; max-width: min(220px, 45vw); padding: 4px 6px; }
.embed { min-height: 100dvh; display: grid; place-items: center; background: #101820; color: #fff; }
.embed .video-shell { width: 100%; }
.embed .video-shell video { height: calc(100dvh - 43px); max-height: none; border-radius: 0; }
.embed .nvv-controls { margin: 4px 10px 4px; }
.embed .nvv-controls select { color: var(--ink); }
@media (max-width: 720px) {
  .wrap { width: calc(100% - 30px); }
  .main { padding-top: 29px; }
  .studio-grid { grid-template-columns: 1fr; gap: 14px; }
  .panel { padding: 17px; }
  .brand small { display: none; }
}
.studio-page {
  --navy: #0d3150;
  --blue: #12588e;
  --ink: #2b3d4b;
  --edge: #dce3e9;
  background: #fff;
  font-family: "Segoe UI", Arial, sans-serif;
}
.studio-page .wrap { width: min(1134px, calc(100% - 48px)); }
.studio-page .top-inner { min-height: 98px; justify-content: start; gap: 26px; }
.studio-brand { display: flex; flex: 0 0 auto; }
.studio-brand img { display: block; width: 64px; height: 64px; }
.studio-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-right: auto; }
.studio-nav a, .studio-page .quiet {
  padding: 8px 13px;
  border: 1px solid #e2e7ec;
  border-radius: 6px;
  background: #f7f8fa;
  color: #344e65;
  font-weight: 500;
}
.studio-nav a:hover, .studio-page .quiet:hover:not(:disabled) { background: #edf4fa; color: #12588e; }
.studio-nav a[aria-current] { background: #eaf1f7; border-color: #d6e2ec; color: #0d3150; font-weight: 650; }
.studio-page .main { padding-top: 33px; }
.studio-page h1 { font-size: clamp(25px, 4vw, 32px); letter-spacing: -.025em; color: #394652; }
.studio-page h2 { font-size: 20px; color: #394652; }
.studio-page .panel { border-radius: 8px; }
.studio-page .upload form { gap: 16px; }
.studio-page .drop {
  min-height: 152px;
  place-items: center;
  align-content: center;
  gap: 5px;
  text-align: center;
  font-weight: 450;
  padding: 16px;
  border: 1px dashed #a7b8ca;
  border-radius: 6px;
  background: #f5f7fb;
  cursor: pointer;
  position: relative;
}
.studio-page .drop:hover, .studio-page .drop.dragging { background: #eaf2f9; border-color: #45799f; }
.studio-page .drop:focus-within { outline: 3px solid #3287ca; outline-offset: 3px; }
.studio-page .drop input { position: absolute; width: 1px; height: 1px; inset: 50% auto auto 50%; opacity: 0; }
.drop-action { font-weight: 650; color: #123f65; text-decoration: none; }
.drop-limit { color: #516579; font-size: 14px; }
#file-name { width: 100%; overflow-wrap: anywhere; color: #4a6177; }
.studio-page input:not([type=file]), .studio-page textarea { background: #f8f9fb; border-color: #d7dfe8; border-radius: 5px; }
.studio-page .primary { border-radius: 7px; padding-inline: 18px; }
.studio-page .state { font-weight: 550; }
.studio-page .row-heading { align-items: start; }
@media (max-width: 720px) {
  .studio-page .wrap { width: calc(100% - 30px); }
  .studio-page .top-inner { min-height: 76px; gap: 10px; }
  .studio-brand img { width: 47px; height: 47px; }
  .studio-nav { gap: 5px; }
  .studio-nav a, .studio-page #logout { padding: 7px 8px; font-size: 14px; }
  .studio-page .main { padding-top: 25px; }
}
#login-panel { width: min(100%, 500px); }
#login-panel h1 { font-size: clamp(23px, 5.7vw, 30px); margin-bottom: 20px; }
#password-login { margin-top: 20px; }
.auth-primary button { min-height: 46px; }
.auth-note { margin-top: 10px; color: #516579; font-size: 15px; }
.auth-primary .feedback, .auth-settings .feedback { margin-top: 10px; }
.auth-settings { width: min(100%, 540px); }
.key-list { padding: 0; margin: 12px 0 20px; list-style: none; }
.key-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 7px; border-bottom: 1px solid var(--edge); }
.key-list li span { overflow-wrap: anywhere; }
.key-list small { margin-left: 5px; color: var(--muted); }

video-share { display:grid; gap:9px; margin:14px 0; padding:14px 0; border-top:1px solid var(--edge); }
.share-field { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:8px; }
.share-field label { min-width:0; font-size:14px; }
.share-field input { font:14px/22px "Segoe UI",sans-serif; text-overflow:ellipsis; }
.share-field button { font-size:14px; min-height:40px; }
