:root {
  color-scheme: dark;
  --bg: #111716;
  --panel: #1a211f;
  --panel2: #222b27;
  --line: #303b34;
  --text: #edf1e9;
  --muted: #a3aea6;
  --accent: #bbf36b;
  --ink: #172017;
  --danger: #ffb4a5;
  --radius: 16px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  padding: 38px 24px 22px;
  display: flex;
  flex-direction: column;
  background: #141b18;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 23px;
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: 0.04em;
}
.mark {
  background: var(--accent);
  color: var(--ink);
  width: 43px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px 3px 12px 3px;
  font-size: 32px;
  font-weight: 900;
  transform: skew(-5deg);
}
.brand-sub {
  display: block;
  font-size: 12px;
  letter-spacing: 0.38em;
  font-weight: 500;
  margin-top: 7px;
}
.nav-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.13em;
  margin: 54px 10px 15px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 5px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 15px;
}
.nav-item:hover {
  background: var(--panel);
}
.nav-item.active {
  background: #2b3828;
  color: var(--accent);
}
.nav-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 40px;
}
.edition {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.sidebar-bottom p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  color: var(--text);
  border: none;
  border-top: 1px solid var(--line);
  padding: 20px 0 0;
  margin-top: 24px;
  text-align: left;
  width: 100%;
  font-size: 14px;
  overflow: hidden;
}
.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #354634;
  color: var(--accent);
  font-weight: 650;
}
.profile-copy {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding: 0 48px;
  font-size: 14px;
}
.top-note {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}
main {
  padding: 44px 48px 70px;
  min-height: calc(100vh - 142px);
  max-width: 1700px;
  margin: auto;
}
h1 {
  font-size: clamp(30px, 3.4vw, 48px);
  letter-spacing: -0.045em;
  line-height: 1.12;
  margin: 10px 0 15px;
  font-weight: 650;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin: 0 0 14px;
}
h3 {
  font-size: 18px;
  margin: 0 0 7px;
}
.eyebrow {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.15em;
  font-weight: 600;
}
.sub {
  color: var(--muted);
  max-width: 650px;
  margin: 0;
  font-size: 16px;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}
.page-head .button {
  flex-shrink: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  min-height: 44px;
}
.button:hover {
  filter: brightness(1.07);
}
.button.secondary {
  background: transparent;
  border-color: #455144;
  color: var(--text);
}
.button.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}
.button.small {
  padding: 8px 14px;
  min-height: 36px;
}
.button.danger {
  background: transparent;
  border-color: #745044;
  color: var(--danger);
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 24px;
}
.search {
  flex: 1;
}
.toolbar input {
  max-width: 480px;
}
.toolbar select {
  max-width: 240px;
}
.counter {
  font-size: 14px;
  color: var(--muted);
  margin-left: auto;
  white-space: nowrap;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  transition:
    transform 0.18s,
    border-color 0.18s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #536544;
}
.cover {
  height: auto;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: #25332b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cover-empty {
  color: #738d6d;
  font-size: 48px;
  font-weight: 300;
  letter-spacing: -0.06em;
}
.cover .tag {
  position: absolute;
  left: 14px;
  top: 14px;
  background: #172019e8;
  color: var(--text);
}
.card-body {
  padding: 20px;
}
.card-author {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.card-title {
  font-size: 20px;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin: 0 0 14px;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.card-actions {
  display: flex;
  gap: 8px;
  padding: 0 20px 20px;
}
.card-actions .button {
  flex: 1;
  padding: 9px;
  font-size: 13px;
}
.tag {
  display: inline-block;
  border: 1px solid #43503f;
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--accent);
}
.tag.muted {
  color: var(--muted);
  border-color: var(--line);
}
.tag.warning {
  color: #f7ce89;
  border-color: #6a5837;
}
.empty {
  border: 1px dashed #40503f;
  border-radius: var(--radius);
  padding: 66px 30px;
  text-align: center;
  background: linear-gradient(120deg, #1a251b, #18201d);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.empty-icon {
  width: 62px;
  height: 62px;
  border: 1px solid #4c6145;
  border-radius: 17px;
  display: grid;
  place-items: center;
  color: var(--accent);
  margin-bottom: 22px;
}
.empty-icon svg {
  width: 28px;
  height: 28px;
}
.empty p {
  color: var(--muted);
  max-width: 480px;
  margin: 0 0 22px;
}
.empty h2 {
  font-size: 24px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 25px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.panel.accent {
  background: #233222;
  border-color: #50633a;
}
.panel p {
  color: var(--muted);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.stat strong {
  display: block;
  font-size: 30px;
  letter-spacing: -0.04em;
  color: var(--accent);
}
.stat span {
  color: var(--muted);
  font-size: 14px;
}
.row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.row.between {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 18px;
}
label {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 7px;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #3c483e;
  border-radius: 8px;
  background: #131b16;
  color: var(--text);
  padding: 11px 12px;
  min-height: 44px;
}
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}
input[type="file"] {
  font-size: 14px;
}
textarea {
  resize: vertical;
  min-height: 105px;
}
input::placeholder,
textarea::placeholder {
  color: #7f8d82;
}
.help {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
}
.error {
  border: 1px solid #72463f;
  background: #3c2924;
  color: #ffc4b5;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.notice {
  background: #303324;
  border: 1px solid #5d623f;
  color: #e2e5b8;
  padding: 14px 16px;
  border-radius: 9px;
  font-size: 14px;
  margin-bottom: 20px;
}
.notice a {
  text-decoration: underline;
}
footer {
  height: 60px;
  border-top: 1px solid var(--line);
  margin: 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.loading {
  color: var(--muted);
  padding: 40px;
  text-align: center;
}
.tabs {
  display: flex;
  gap: 4px;
  background: #111914;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 24px;
}
.tab {
  flex: 1;
  border: 0;
  border-radius: 6px;
  padding: 10px 18px;
  color: var(--muted);
  background: none;
  font-size: 14px;
}
.tab.active {
  background: #33432d;
  color: var(--accent);
}
dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: 90vh;
  border: 1px solid #465240;
  border-radius: 18px;
  background: #1b231e;
  color: var(--text);
  padding: 0;
  box-shadow: 0 30px 100px #0009;
}
dialog::backdrop {
  background: #070c09c9;
  backdrop-filter: blur(6px);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 0;
}
.modal-head h2 {
  margin-bottom: 6px;
}
.modal-body {
  padding: 24px 28px 28px;
}
.close {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  width: 32px;
  height: 32px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
.dropzone {
  border: 1px dashed #607451;
  border-radius: 10px;
  padding: 24px;
  background: #212e20;
}
.dropzone p {
  color: var(--muted);
  font-size: 14px;
}
.detail {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 32px;
}
.detail-cover {
  border-radius: 16px;
  overflow: hidden;
}
.detail-cover .cover {
  aspect-ratio: 16 / 9;
}
.detail-copy h1 {
  font-size: 38px;
}
.description {
  white-space: pre-wrap;
  color: var(--muted);
  margin: 22px 0;
  overflow-wrap: anywhere;
}
.file-row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.file-row:last-child {
  border-bottom: none;
}
.file-row .file-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.file-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: 360px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  text-align: left;
}
td,
th {
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  background: #182119;
  position: sticky;
  top: 0;
}
td small {
  display: block;
  color: var(--muted);
}
.mapping {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.mapping-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 14px;
}
.mapping-fields {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 10px;
}
.mapping-fields select {
  font-size: 14px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  margin: 18px 0;
}
.check input {
  flex-shrink: 0;
  margin-top: 3px;
}
.check label {
  margin: 0;
}
progress {
  width: 100%;
  height: 12px;
  accent-color: var(--accent);
}
.bonus-card {
  border: 1px solid #52673e;
  background: #23301e;
  padding: 28px;
  border-radius: 16px;
}
.bonus-number {
  font-size: 50px;
  line-height: 1.2;
  letter-spacing: -0.05em;
  margin: 18px 0;
  color: var(--accent);
}
.bonus-card .help {
  margin: 12px 0 20px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 22px;
  border: 1px solid #536b41;
  border-radius: 10px;
  background: #2c3d24;
  color: var(--text);
  box-shadow: 0 10px 40px #0008;
  max-width: 90vw;
  z-index: 100;
  display: none;
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 1000;
  background: var(--accent);
  color: var(--ink);
  padding: 12px;
}
.skip:focus {
  top: 12px;
}
.muted {
  color: var(--muted);
}
.spaced {
  margin-top: 28px;
}
.full {
  width: 100%;
}
.inline-link {
  color: var(--accent);
  text-decoration: underline;
}
.screen-title {
  margin-bottom: 24px;
}
.progress-label {
  color: var(--muted);
  font-size: 14px;
  margin-top: 10px;
}
.preview-list {
  margin: 18px 0;
}
.preview-list summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
@media (min-width: 1500px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .sidebar {
    padding: 30px 16px;
  }
  .topbar {
    padding: 0 28px;
  }
  main {
    padding: 32px 28px 50px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  footer {
    margin: 0 28px;
  }
  .top-note {
    display: none;
  }
  #account {
    margin-left: auto;
  }
  .detail {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    padding: 18px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 20px;
  }
  .brand-sub {
    font-size: 10px;
  }
  .mark {
    width: 34px;
    height: 38px;
    font-size: 26px;
  }
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  nav {
    display: flex;
    gap: 6px;
    overflow: auto;
    margin-top: 20px;
  }
  .nav-item {
    white-space: nowrap;
    padding: 9px 12px;
    font-size: 14px;
    margin: 0;
  }
  .nav-icon {
    width: 18px;
  }
  .topbar {
    height: 62px;
    padding: 0 20px;
  }
  main {
    padding: 28px 20px 40px;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 26px;
  }
  h1 {
    font-size: 36px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .toolbar input,
  .toolbar select {
    max-width: none;
  }
  .toolbar .search {
    flex-basis: 100%;
  }
  .toolbar select {
    flex: 1;
  }
  .grid {
    gap: 15px;
  }
  .card-body {
    padding: 14px;
  }
  .card-title {
    font-size: 18px;
  }
  .card-actions {
    padding: 0 14px 14px;
    flex-direction: column;
  }
  .card-author {
    font-size: 11px;
  }
  .card-meta {
    font-size: 12px;
  }
  .cover {
    aspect-ratio: 16 / 9;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 14px 10px;
  }
  .stat strong {
    font-size: 25px;
  }
  .stat span {
    font-size: 12px;
  }
  .panel {
    padding: 20px;
  }
  .modal-head {
    padding: 22px 20px 0;
  }
  .modal-body {
    padding: 20px;
  }
  .mapping-fields {
    grid-template-columns: 1fr;
  }
  .modal-actions {
    flex-wrap: wrap;
  }
  .modal-actions .button {
    flex: 1;
  }
  .empty {
    padding: 42px 20px;
  }
  footer {
    margin: 0 20px;
  }
  footer span {
    display: none;
  }
  .detail-copy h1 {
    font-size: 32px;
  }
}
@media (max-width: 400px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .cover {
    aspect-ratio: 16 / 9;
  }
}
#toast.visible {
  display: block;
}

.login-code { font-size: 30px; text-align: center; letter-spacing: .35em; font-variant-numeric: tabular-nums; }

.file-folder { padding: 12px 0; } .file-folder summary { cursor: pointer; font-weight: 600; overflow-wrap: anywhere; } .folder-content { padding-left: 20px; border-left: 1px solid #354638; }

.profile-avatar { position:relative; overflow:hidden; flex-shrink:0; } .profile-avatar img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; } .account-identity { display:flex; align-items:center; gap:20px; } .account-identity .avatar { width:80px; height:80px; font-size:28px; } .account-identity p { margin:6px 0; overflow-wrap:anywhere; } .account-footer { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-top:24px; padding-top:20px; border-top:1px solid #354638; } #points-balance { margin-left:auto; color:#bcf56b; font-weight:600; white-space:nowrap; }

#logout { background: #b42332; border-color: #b42332; color: #fff; }
#logout:hover { background: #941c29; border-color: #941c29; color: #fff; }
#logout:focus-visible { outline: 2px solid #ff9ba5; outline-offset: 3px; }

.topbar #breadcrumb { margin-right: auto; } .topbar #points-balance { margin-left: 0; } .project-tabs { margin-bottom: 24px; } .project-tabs a { text-decoration: none; }

.bulk-project-list { max-height:320px; overflow:auto; padding:12px; border:1px solid var(--line); border-radius:12px; } .bulk-project-list .check { padding:8px 0; }
