.loading { flex: 1; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); }
.login {
  flex: 1;
  display: grid;
  width: min(var(--page-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 35px 0;
  align-content: center;
}
.login-frame {
  position: relative;
  min-height: 545px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, .64fr);
  gap: clamp(24px, 6vw, 92px);
  align-items: center;
  padding: 60px clamp(26px, 5vw, 76px);
  border: 1px solid transparent;
  background: transparent;
}
.login-frame::before, .login-frame::after {
  content: none;
  position: absolute;
  width: 17px;
  height: 17px;
  border: solid #ededed;
  pointer-events: none;
}
.login-frame::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.login-frame::after { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }
.frame-tag { position: absolute; color: #c1c1c1; }
.frame-tag.top { top: 16px; left: 20px; }
.frame-tag.bottom { bottom: 16px; left: 20px; }
.frame-tag.take { bottom: 16px; right: 20px; }
.restriction {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #ffffff88;
  background: #131313d9;
  padding: 7px 10px;
  color: var(--paper);
}
.restriction::before { content: ""; width: 13px; height: 9px; background: repeating-linear-gradient(125deg, #ddd 0 2px, transparent 2px 4px); }
.identity {
  margin: .11em 0 .13em;
  font: 800 clamp(64px, 9.4vw, 140px)/.98 var(--display);
  letter-spacing: -.098em;
  text-shadow: 0 6px 32px #000b;
}
.hero-description { margin: 18px 0 9px; font-size: clamp(17px, 2vw, 25px); }
.hero-credit { color: #c0c0c0; margin: 0; }
.login-card {
  min-width: 0;
  position: relative;
  border: 1px solid #ffffff45;
  border-top-color: #ffffffaa;
  padding: clamp(23px, 3vw, 38px);
  background: #090909d9;
  box-shadow: 0 24px 64px #0008;
}
.login-intro { align-self: end; padding-bottom: 10px; }
.frame-tag { display: none; }
.restriction { border: 0; border-left: 2px solid white; background: #0009; }
@media (min-width: 751px) {
  .login-frame { min-height: 610px; padding-top: 110px; }
  .login-card { backdrop-filter: blur(12px); }
}
.panel-index {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: #bcbcbc;
}
.panel-index::after { content: ""; width: 38px; height: 10px; background: repeating-linear-gradient(90deg, #bcbcbc 0 2px, transparent 2px 4px, #bcbcbc 4px 5px, transparent 5px 8px); }
.login-card h2 { font: 800 clamp(25px, 2.6vw, 38px)/1.06 var(--display); letter-spacing: -.058em; margin: 0; }
.muted, .subtle { color: var(--muted); }
.login-card .muted { font-size: 14px; line-height: 1.5; margin: 13px 0 24px; }
form label { display: block; margin-bottom: 9px; font-size: 14px; }
.code-wrap { display: flex; align-items: center; gap: 11px; padding-inline: 12px; border: 1px solid #626262; background: #080808; }
.code-wrap:focus-within { outline: 2px solid var(--paper); outline-offset: 2px; }
.code-wrap svg { width: 17px; height: 17px; flex: none; color: #b0b0b0; }
.code-wrap input { flex: 1; min-width: 0; height: 46px; padding: 0; outline: none; border: 0; background: transparent; color: var(--paper); }
.code-wrap input::placeholder { color: #a5a5a5; }
#login-submit { width: 100%; justify-content: space-between; margin-top: 11px; }
.login-card .subtle { margin: 16px 0 0; font-size: 12px; line-height: 1.4; }
.error { margin: 12px 0 0; padding: 9px 12px; border-left: 2px solid #fff; background: #2c2c2c; color: #fff; font-size: 14px; line-height: 1.45; }
.error:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.masthead:has(.logout:not([hidden])) .private { display: none; }
.logout { min-height: 38px; font-size: 13px; padding: 6px 12px; }
.dashboard, .not-found { flex: 1; width: min(1120px, calc(100% - 48px)); margin-inline: auto; padding-block: 52px 66px; }
.page-top { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 26px; }
.page-top h1, .not-found h1 { margin: 8px 0; font: 800 clamp(38px, 6vw, 78px)/1 var(--display); letter-spacing: -.075em; }
.page-top p, .not-found p { color: var(--muted); margin: 14px 0 0; }
.not-found .button { margin-top: 22px; }
.vault-number { display: grid; justify-items: end; font: 800 43px/1 var(--display); }
.vault-number span { display: block; margin-top: 8px; color: var(--muted); white-space: nowrap; }
.upload-panel, .success-panel, .empty-state, .video-card { border: 1px solid var(--line); background: #111111f5; }
.upload-panel { padding: clamp(18px, 3vw, 30px); border-style: dashed; border-color: #777; }
.upload-panel.dragging { background: #303030; border-color: #fff; }
.upload-main { display: grid; align-items: center; gap: 19px; grid-template-columns: auto minmax(0, 1fr) auto; }
.upload-main h2 { margin: 5px 0; font: 800 clamp(20px, 3vw, 27px)/1.15 var(--display); letter-spacing: -.04em; }
.upload-main p, .drop-hint { color: var(--muted); margin: 0; font-size: 13px; }
.upload-icon, .empty-icon { display: grid; place-items: center; width: 51px; height: 51px; color: var(--paper); border: 1px solid #727272; font-size: 27px; }
.drop-hint { margin-top: 13px; }
.upload-panel:has(#file:focus-visible) .file-button { outline: 2px solid white; outline-offset: 4px; }
.upload-panel form { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
.upload-form-row, .selected-file, .progress-heading, .success-actions, .dialog-actions, .card-actions { display: flex; gap: 10px; }
.selected-file { justify-content: space-between; align-items: start; margin-bottom: 16px; color: var(--muted); overflow-wrap: anywhere; }
.text-button { color: var(--paper); background: transparent; border: 0; text-decoration: underline; }
.upload-form-row input { min-width: 0; flex: 1; color: var(--paper); background: #080808; border: 1px solid #666; padding: 9px 12px; }
.progress-heading { justify-content: space-between; margin-top: 24px; font-size: 14px; }
progress { width: 100%; accent-color: var(--paper); margin-top: 6px; }
.success-panel { margin-top: 18px; padding: 22px; }
.success-panel h2 { margin: 4px 0; }
.success-panel p, .collection-heading p, .empty-state p, .local-notice { color: var(--muted); }
.success-actions { flex-wrap: wrap; }
.collection-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 36px 0 14px; }
.collection-heading h2 { margin: 0; font: 800 26px/1.25 var(--display); letter-spacing: -.045em; }
.collection-heading h2 span { display: inline-block; margin-left: 8px; font: 400 12px/1 var(--mono); border: 1px solid #777; padding: 5px 7px; vertical-align: middle; }
.collection-heading p { margin: 6px 0 0; font-size: 13px; }
.collection-label { color: var(--muted); }
.empty-state { padding: 28px 18px; text-align: center; }
.empty-icon { margin: auto; }
.empty-state h3 { margin: 14px 0 6px; }
.empty-state p { margin: 0; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.video-card { min-width: 0; }
.thumbnail { display: block; position: relative; aspect-ratio: 16/9; background: #080808; }
.thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: 0; display: grid; place-items: center; }
.play span { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid #fffa; border-radius: 50%; background: #0c0c0cc4; font-size: 21px; }
.thumbnail:hover .play span { background: var(--paper); color: #101010; }
.duration { position: absolute; right: 8px; bottom: 8px; background: #0a0a0aef; padding: 4px 6px; font: 12px var(--mono); }
.card-content { padding: 15px; }
.card-title { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; margin: 9px 0 14px; color: var(--muted); font-size: 12px; }
.card-actions { gap: 6px; }
.card-actions .button { flex: 1; min-height: 39px; padding: 6px 7px; font-size: 12px; }
.card-actions .delete-button { flex: 0; min-width: 33px; font-size: 20px; }
.local-notice { font-size: 13px; }
dialog { width: min(450px, calc(100% - 36px)); padding: 24px; background: #141414; color: var(--paper); border: 1px solid #888; }
dialog::backdrop { background: #000c; }
dialog p { overflow-wrap: anywhere; }
.dialog-actions { justify-content: flex-end; }
.danger { background: var(--paper); color: #111; }
.danger:hover { background: #ccc; }
#toast { position: fixed; bottom: 20px; left: 50%; z-index: 2; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 13px 18px; border: 1px solid #888; background: var(--paper); color: #111; opacity: 0; pointer-events: none; }
#toast.show { opacity: 1; }
.embed-player { display: block; width: 100%; height: 100svh; background: #000; }

@media (max-width: 900px) {
  .login-frame { grid-template-columns: minmax(0, 1fr) minmax(285px, .86fr); gap: 24px; }
  .identity { font-size: clamp(60px, 10vw, 104px); }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 750px) {
  .login { width: calc(100% - 36px); padding-block: 18px; }
  .login-frame { min-height: 0; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 180px 0 20px; }
  .login-frame .top { top: 12px; left: 15px; }
  .login-frame .bottom { bottom: 12px; left: 15px; }
  .login-frame .take { bottom: 12px; right: 15px; }
  .frame-tag, .hero-credit { font-size: 9px; }
  .identity { font-size: clamp(54px, 14.5vw, 83px); }
  .hero-description { margin: 9px 0 6px; }
  .login-card { padding: 19px; }
  .panel-index { margin-bottom: 12px; }
  .login-card .muted { margin: 9px 0 16px; }
}
@media (max-width: 660px) {
  .dashboard, .not-found { width: calc(100% - 36px); padding-block: 34px 46px; }
  .vault-number { display: none; }
  .upload-main { grid-template-columns: auto minmax(0, 1fr); gap: 13px; }
  .file-button { grid-column: 1 / -1; }
  .upload-form-row { flex-direction: column; }
  .upload-form-row input { min-height: 43px; }
  .collection-label { display: none; }
  .video-grid { grid-template-columns: 1fr; }
}
