:root {
  --bg: #f4f0e8;
  --ink: #1c1915;
  --muted: #746b62;
  --line: rgba(28, 25, 21, 0.08);
  --card: #fffdf9;
  --sidebar: #171410;
  --sidebar-ink: #f6f1ea;
  --sidebar-muted: #a89e93;
  --accent: #ff5a36;
  --accent-ink: #fff8f5;
  --green: #1f6f5b;
  --shadow: 0 18px 50px rgba(48, 32, 18, 0.08);
  --sans: "Outfit", "Segoe UI", sans-serif;
  --serif: "Fraunces", "Palatino Linotype", Palatino, Georgia, serif;
  --sidebar-w: 280px;
  --radius: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.45;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: #ffd3c6; }

.ico, .nav-btn svg, .btn-upload svg, .side-actions svg, .tool svg, .search-ico svg, .player-btn svg, .selection svg, .dropmask-card svg {
  width: 20px;
  height: 20px;
  display: block;
  flex: none;
}

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 16px 16px;
  background:
    radial-gradient(420px 220px at 0% 0%, rgba(255, 90, 54, 0.22), transparent 60%),
    var(--sidebar);
  color: var(--sidebar-ink);
}

.brand, .brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  padding: 0 6px 12px;
}
.brand-mark, .brand-mark svg { width: 42px; height: 42px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 560;
  font-size: 28px;
  letter-spacing: -0.03em;
}
.brand-text small { color: var(--sidebar-muted); font-size: 12px; margin-top: 3px; }
.gate .brand-text strong, .gate .brand-text small { color: var(--ink); }
.gate .brand-text small { color: var(--muted); }

.btn-upload, .side-actions button, .nav-btn, .tool, .btn, .player-btn, .selection button {
  border: 0;
  background: transparent;
}

.btn-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(255, 90, 54, 0.28);
}
.btn-upload:hover { filter: brightness(1.05); }

.side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  border-radius: 12px;
  color: var(--sidebar-ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13.5px;
}
.side-actions button:hover { background: rgba(255, 255, 255, 0.09); }

.nav-label {
  margin: 16px 8px 6px;
  color: var(--sidebar-muted);
  font-size: 12px;
}
.nav { display: flex; flex-direction: column; gap: 2px; overflow: auto; padding-right: 2px; }
.nav-btn {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: #efe8df;
  border-radius: 12px;
  padding: 9px 10px;
}
.nav-btn em {
  font-style: normal;
  color: var(--sidebar-muted);
  font-size: 12px;
}
.nav-btn:hover { background: rgba(255, 255, 255, 0.05); }
.nav-btn[aria-current="page"] {
  background: var(--accent);
  color: white;
}
.nav-btn[aria-current="page"] em { color: rgba(255, 255, 255, 0.82); }

.storage {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 14px;
}
.storage-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 10px; }
.storage-top span { color: var(--sidebar-muted); }
.storage.is-tight .storage-top span { color: #ffb1a1; }
.meter {
  display: flex;
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
.meter i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 10px; }
.legend span { display: flex; align-items: center; gap: 6px; color: var(--sidebar-muted); font-size: 11px; }
.legend i { width: 7px; height: 7px; border-radius: 99px; display: block; }
.seg-screenshot { background: #7eb6ff; }
.seg-image { background: #ff8a5b; }
.seg-audio { background: #ff7aa2; }
.seg-video { background: #b79bff; }
.seg-document { background: #7dcea0; }
.seg-archive { background: #e3c27a; }
.seg-other { background: #c3bbb2; }
.sys, .shortcut, .logout {
  color: var(--sidebar-muted);
  font-size: 12px;
}
.sys { margin: 10px 0 0; }
.shortcut { margin: 10px 8px 0; }
.logout-form { margin: 0; }
.logout { padding: 6px 8px; text-align: left; }
.logout:hover { color: white; }

.main {
  min-width: 0;
  padding: 22px 28px 130px;
  background:
    radial-gradient(520px 240px at 100% 0%, rgba(255, 90, 54, 0.09), transparent 55%),
    radial-gradient(420px 220px at 0% 100%, rgba(31, 111, 91, 0.06), transparent 50%),
    var(--bg);
}
.topbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 320px) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}
.crumbs { min-height: 18px; margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.crumbs button {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
}
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover, .crumbs button:hover { color: var(--ink); }
.crumbs .sep { margin: 0 6px; opacity: 0.5; }
h1, h2, h3, p { margin: 0; }
#title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 560;
  font-size: 42px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.subtitle { margin-top: 6px; color: var(--muted); font-size: 14px; }

.search { position: relative; display: block; }
.search-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.search input, .select select, .sheet input, .field input {
  width: 100%;
  height: 48px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0 14px;
}
.search input { padding-left: 42px; }
.select select { padding-right: 32px; }

.tools { display: flex; align-items: center; gap: 8px; }
.tool, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 14px;
  border-radius: 13px;
  background: var(--card);
  border: 1px solid var(--line);
}
.tool:hover, .btn.ghost:hover { background: white; }
.tool.icon-only { width: 42px; padding: 0; }
.tool[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.view-toggle { display: flex; gap: 4px; }
a.btn { text-decoration: none; }
.btn.solid { background: var(--ink); color: #f6f1ea; border-color: var(--ink); }
.btn.danger, .selection button.danger { background: var(--accent); color: white; border-color: transparent; }
.btn.wide { width: 100%; }
.btn.solid:hover { filter: brightness(1.08); }

.progress { height: 4px; border-radius: 99px; background: rgba(28, 25, 21, 0.08); margin: -6px 0 14px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--accent); border-radius: inherit; }

.banner {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff1ec;
  color: #8a341f;
}

.stage { min-height: 280px; }
.section-title {
  margin: 6px 2px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  min-height: 214px;
}
a.card { display: block; color: inherit; text-decoration: none; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255, 90, 54, 0.35); }
.card.is-playing { border-color: #e7a0b4; }
.thumb {
  position: relative;
  height: 132px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb > svg { width: 36px; height: 36px; }
.thumb .ico svg { width: 36px; height: 36px; }
.cat-image { background: #f6e7dc; color: #b85a32; }
.cat-screenshot { background: #e5eef8; color: #2d6cb3; }
.cat-audio { background: #fbe4ec; color: #b1436d; }
.cat-video { background: #eee9fb; color: #6946c6; }
.cat-document { background: #e5f2ea; color: #1f6f5b; }
.cat-archive { background: #f6edd9; color: #8a6a22; }
.cat-other, .cat-folder { background: #eeeae4; color: #5e564e; }
.cat-folder { color: #a9762a; }
.badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(23, 20, 16, 0.78);
  color: white;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.check, .more {
  position: absolute;
  top: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 253, 249, 0.92);
  color: var(--ink);
  opacity: 0;
}
.check { left: 8px; }
.more { right: 8px; }
.card:hover .check, .card:hover .more, .card.is-selected .check, .check:focus-visible, .more:focus-visible { opacity: 1; }
.card.is-selected .check { background: var(--accent); color: white; }
.card-body { padding: 10px 4px 4px; }
.card h3 {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card p, .where { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.eq { display: flex; gap: 2px; align-items: flex-end; height: 12px; margin-top: 8px; }
.eq i {
  width: 3px;
  height: 5px;
  border-radius: 99px;
  background: #b1436d;
  animation: eq 0.7s ease-in-out infinite alternate;
}
.eq i:nth-child(2) { animation-delay: 0.15s; }
.eq i:nth-child(3) { animation-delay: 0.28s; }
@keyframes eq { to { height: 12px; } }

.card.ghost {
  min-height: 214px;
  background: linear-gradient(90deg, #f7f3ed 25%, #fff 50%, #f7f3ed 75%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease infinite;
  border: 0;
}
@keyframes shimmer { to { background-position: 100% 0; } }

.list { display: flex; flex-direction: column; gap: 6px; }
.list-head, .row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 110px 90px 150px 36px;
  gap: 10px;
  align-items: center;
}
.list-head { color: var(--muted); font-size: 12px; padding: 0 12px 4px; }
.row {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 12px;
  width: 100%;
  text-align: left;
}
.row:hover { border-color: rgba(28, 25, 21, 0.16); }
.row.is-selected { border-color: var(--accent); }
.row-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 560; }
.mini {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
}
.mini img { width: 100%; height: 100%; object-fit: cover; }
.mini svg { width: 18px; height: 18px; }
.col-cat, .col-size, .col-date { color: var(--muted); font-size: 13px; }
.icon-hit {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  display: grid;
  place-items: center;
}

.empty {
  text-align: center;
  padding: 54px 16px 24px;
}
.empty .ico svg { width: 72px; height: 72px; margin: 0 auto 8px; color: var(--accent); }
.empty h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 560;
  font-size: 36px;
  letter-spacing: -0.03em;
}
.empty p { color: var(--muted); margin: 8px auto 0; max-width: 420px; }
.load-more { display: flex; justify-content: center; margin: 18px 0; }

.player {
  position: fixed;
  z-index: 30;
  left: calc(var(--sidebar-w) + 20px);
  right: 20px;
  bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.player .seek { flex: 1 1 160px; min-width: 100px; }
.player .volume { width: 88px; }
.player-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f3eee6;
}
.player-btn.play { background: var(--ink); color: white; }
.player-meta { min-width: 0; }
.player-meta strong, #playerTitle {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.player-meta span { color: var(--muted); font-size: 12px; }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 99px;
  background: #e6dfd6;
  border: 0;
  padding: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
}

.selection {
  position: fixed;
  z-index: 32;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 16px;
  background: var(--ink);
  color: #f6f1ea;
  border-radius: 999px;
  box-shadow: 0 16px 40px rgba(20, 14, 10, 0.28);
}
body.has-player .selection { bottom: 92px; }
.selection strong { font-size: 14px; margin-right: 6px; white-space: nowrap; }
.selection button {
  color: inherit;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}
.selection button.danger { background: var(--accent); }
.selection #selectionClear { width: 34px; padding: 0; display: grid; place-items: center; }

.dropmask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(244, 240, 232, 0.82);
  backdrop-filter: blur(8px);
}
.dropmask-card {
  width: min(520px, 100%);
  text-align: center;
  background: var(--card);
  border: 1.5px dashed var(--accent);
  border-radius: 28px;
  padding: 42px 24px;
  box-shadow: 0 20px 60px rgba(255, 90, 54, 0.12);
}
.dropmask-card svg { width: 48px; height: 48px; margin: 0 auto 8px; color: var(--accent); }
.dropmask-card h2 { font-family: var(--serif); font-style: italic; font-size: 32px; font-weight: 560; }
.dropmask-card p { color: var(--muted); margin-top: 6px; }

.menu {
  position: fixed;
  z-index: 45;
  min-width: 196px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 9px 10px;
}
.menu button:hover { background: #f6f1ea; }
.menu button.danger { color: #9d2b1b; }

.toasts {
  position: fixed;
  z-index: 70;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.has-player .toasts { bottom: 104px; }
.toast {
  max-width: 320px;
  background: var(--ink);
  color: #f6f1ea;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}
.toast.bad { background: #9d2b1b; }

dialog.sheet {
  width: min(440px, calc(100vw - 32px));
  margin: auto;
  border: 0;
  border-radius: 24px;
  padding: 22px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(28, 22, 16, 0.24);
}
dialog.sheet.wide {
  width: min(1040px, calc(100vw - 28px));
  padding: 0;
  overflow: hidden;
  max-height: min(920px, calc(100vh - 28px));
}
dialog.sheet h2 { font-family: var(--serif); font-style: italic; font-weight: 560; font-size: 28px; letter-spacing: -0.03em; }
dialog.sheet form h2, dialog.sheet > h2 { margin-bottom: 4px; }
dialog::backdrop { background: rgba(22, 18, 14, 0.48); backdrop-filter: blur(8px); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }
.sheet input { margin: 12px 0 16px; }
dialog.sheet.share-sheet { width: min(520px, calc(100vw - 32px)); }
.share-note { color: var(--muted); margin: 8px 0 12px; font-size: 14px; }
.share-url { display: flex; gap: 8px; align-items: center; }
.share-url input { flex: 1; margin: 0; }
.share-tools { justify-content: space-between; margin: 12px 0; }
.share-people { list-style: none; padding: 0; margin: 8px 0 12px; }
.share-people li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.share-people strong, .share-people small { display: block; }
.share-people small { color: var(--muted); font-size: 12px; }
.shared-pill {
  display: inline-flex;
  margin-top: 6px;
  border-radius: 999px;
  background: #e7f4ee;
  color: #1f6f5b;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
}
.share-actions { margin: 8px 0 16px; }
.share-view img, .share-view video { max-width: 100%; max-height: 70vh; border-radius: 18px; background: #171410; }
.share-view audio { width: min(520px, 100%); }
.share-view iframe { width: 100%; height: 72vh; border: 0; border-radius: 18px; background: white; }
.share-view pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  max-height: 70vh;
  overflow: auto;
}
.share-owner { margin-top: auto; }
.move-list { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow: auto; margin-bottom: 14px; }
.move-list button {
  text-align: left;
  border: 0;
  background: #f6f1ea;
  border-radius: 12px;
  padding: 10px 12px;
}
.move-list button:hover { background: #efe7dc; }
.move-list small { display: block; color: var(--muted); }

.preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 16px 12px;
}
.preview-head h2 {
  font-size: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-actions { display: flex; gap: 8px; flex: none; }
.preview-body { min-height: 240px; background: #141210; display: grid; place-items: center; position: relative; }
.preview-body.is-light { background: #f7f3ed; }
.preview-body img, .preview-body video { max-width: 100%; max-height: 72vh; }
.preview-body iframe { width: 100%; height: 72vh; border: 0; background: white; }
.preview-text {
  width: min(860px, 100%);
  margin: 0;
  padding: 22px;
  white-space: pre-wrap;
  word-break: break-word;
  font: 13.5px/1.55 ui-monospace, "Cascadia Code", Consolas, monospace;
}
.preview-file { text-align: center; padding: 28px 16px 36px; }
.preview-file .ico svg { width: 64px; height: 64px; margin: 0 auto 10px; }
.meta-list { width: min(420px, 100%); margin: 16px auto 0; text-align: left; }
.meta-list div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; text-align: right; }
.lb {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.92);
  display: grid;
  place-items: center;
}
.lb.prev { left: 14px; }
.lb.next { right: 14px; }

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 480px at 8% -10%, #ffd7c8, transparent 50%),
    radial-gradient(800px 420px at 110% 0%, #d7efe4, transparent 46%),
    var(--bg);
}
.gate-card {
  width: min(480px, 100%);
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.gate-wide { width: min(680px, 100%); }
.gate h1, .gate h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.gate h1 { font-size: 36px; margin: 8px 0 8px; }
.gate h2 { font-size: 24px; margin: 18px 0 6px; }
.gate p { color: var(--muted); }
.form-error { color: #9d2b1b !important; font-weight: 600; }
.detail {
  background: #fff1ec;
  color: #8a341f !important;
  border-radius: 12px;
  padding: 10px 12px;
}
.field { display: block; margin: 16px 0; }
.field span { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.check-list, .steps { padding-left: 18px; }
.check-list { list-style: none; padding: 0; margin: 16px 0; }
.check-list li, .steps li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.check-list li { display: flex; justify-content: space-between; gap: 12px; }
.ok { color: var(--green); }
.bad { color: #9d2b1b; }
.warn { color: #8a6a22; }
.hint-line code, .steps code, .gate code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.92em;
  background: #f3eee6;
  padding: 1px 5px;
  border-radius: 6px;
}
pre.sql {
  background: #171410;
  color: #f6f1ea;
  border-radius: 16px;
  padding: 14px;
  overflow: auto;
  font-size: 12.5px;
  line-height: 1.55;
}
.gate .dlg-actions { margin-top: 12px; }
.gate .btn.solid { text-decoration: none; }

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .nav { flex-direction: row; overflow: auto; }
  .nav-btn { width: auto; white-space: nowrap; }
  .storage { margin-top: 12px; }
  .topbar { grid-template-columns: 1fr; align-items: stretch; }
  #title { font-size: 34px; }
  .player { left: 12px; right: 12px; }
  .player .volume { display: none; }
  .list-head { display: none; }
  .list-head, .row { grid-template-columns: 36px minmax(0, 1fr) auto 32px; }
  .col-cat, .col-date { display: none; }
}

.account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.account strong { display: block; font-size: 14px; }
.account small { color: var(--sidebar-muted); }
.account.is-current { box-shadow: inset 0 0 0 1px rgba(255, 90, 54, 0.8); }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-weight: 700;
}
.plan-line { margin: 8px 0 0; color: var(--sidebar-muted); font-size: 12px; line-height: 1.35; }
.auth-tabs { display: flex; gap: 8px; margin: 8px 0 12px; }
.auth-tabs a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
}
.auth-tabs a.is-on { background: var(--ink); color: #f6f1ea; }
.role {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}
.role-free { background: #eeeae4; color: #5c554c; }
.role-premium { background: #f8e7c3; color: #7a5a12; }
.role-moder { background: #e3eefc; color: #24568f; }
.role-administrator { background: #ffe4dc; color: #9d2b1b; }
.role-hints { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 8px; }
.role-hints li { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 13px; }
.role-hints b { flex: none; }
.role-hints.light li { color: var(--ink); }
.cabinet .heading { margin-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 18px 16px;
  margin-bottom: 14px;
}
.panel h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 560;
  font-size: 30px;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }
.role-row { margin: 8px 0; }
.ok-banner { background: #e7f4ee; color: #1f6f5b; }
.table-wrap { overflow: auto; }
.people { width: 100%; border-collapse: collapse; min-width: 640px; }
.people th, .people td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.people th { color: var(--muted); font-size: 12px; font-weight: 600; }
.people select, .inline-form {
  height: 38px;
}
.people select {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: white;
  padding: 0 8px;
}
.inline-form, .people form { display: flex; gap: 6px; align-items: center; }
.sidebar > .nav-btn { margin-bottom: 8px; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px 16px 14px;
}
.stat span, .stat small { color: var(--muted); font-size: 13px; }
.stat b {
  display: block;
  margin: 6px 0 4px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 560;
  font-size: 32px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.search-line { display: flex; gap: 8px; margin-bottom: 12px; }
.search-line input {
  flex: 1;
  height: 42px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0 14px;
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.filters a {
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}
.filters a.is-on { background: var(--ink); color: #f6f1ea; border-color: var(--ink); }
.role-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.role-bar { display: grid; grid-template-columns: 118px minmax(0, 1fr) 28px; gap: 10px; align-items: center; }
.role-bar i { display: block; height: 8px; border-radius: 99px; background: #efeae4; overflow: hidden; }
.role-bar i span { display: block; height: 100%; }
.role-bar em { font-style: normal; color: var(--muted); font-size: 13px; text-align: right; }
.seg-free { background: #c3bbb2; }
.seg-premium { background: #e3c27a; }
.seg-moder { background: #7eb6ff; }
.seg-administrator { background: #ff8a5b; }
.recent-list { list-style: none; padding: 0; margin: 8px 0 14px; }
.recent-list li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.recent-list strong, .recent-list small { display: block; }
.recent-list small { color: var(--muted); font-size: 12px; }
.recent-list .avatar { width: 36px; height: 36px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-head h2 { margin: 0; }
.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
}
.status-active { background: #e7f4ee; color: #1f6f5b; }
.status-blocked { background: #ffe4dc; color: #9d2b1b; }
.mini-meter {
  display: block;
  height: 6px;
  margin-top: 8px;
  border-radius: 99px;
  background: #efeae4;
  overflow: hidden;
}
.mini-meter span { display: block; height: 100%; background: var(--accent); }

@media (max-width: 800px) {
  .grid-2, .stat-grid { grid-template-columns: 1fr 1fr; }
  .role-bar { grid-template-columns: 96px minmax(0, 1fr) 24px; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .card:hover { transform: none; }
}
