:root {
  color-scheme: dark;

  --bg: #081018;

  --surface: #101923;
  --surface-2: #152433;
  --surface-3: #1b3044;

  --text: #f2f8ff;
  --muted: #92a6ba;

  --line: #294158;

  --accent: #5cc8ff;
  --accent-strong: #2ea8e6;
  --accent-soft: rgba(92, 200, 255, 0.16);

  --blue: #7dd3fc;
  --yellow: #ffd54f;
  --red: #ff6b6b;

  --shadow:
    0 12px 34px rgba(0, 0, 0, 0.36),
    0 0 45px rgba(92, 200, 255, 0.08);

  --radius: 14px;
  --radius-sm: 10px;

  --font: "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7faf7;
  --surface: #ffffff;
  --surface-2: #eef6f0;
  --surface-3: #e3f2e8;
  --text: #172018;
  --muted: #627067;
  --line: #d7e4da;
  --accent: #0f9d58;
  --accent-strong: #0a7d45;
  --accent-soft: rgba(15, 157, 88, 0.14);
  --blue: #1a73e8;
  --yellow: #bb7d00;
  --red: #d93025;
  --shadow: 0 20px 50px rgba(38, 57, 45, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(66, 194, 109, 0.18), transparent 32rem),
    linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 88%, #000 12%));
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-size: 1.25rem;
  line-height: 1;
  vertical-align: middle;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(20rem, 28rem);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(1rem, 5vw, 5rem);
}

.auth-art {
  min-height: 34rem;
  display: grid;
  place-items: center;
  position: relative;
}

.brand-emblem {
  width: 13rem;
  height: 13rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(from 180deg, var(--accent), var(--blue), var(--yellow), var(--accent)),
    var(--surface-2);
  box-shadow: var(--shadow);
  color: #07100a;
}

.brand-emblem .material-symbols-rounded {
  font-size: 5rem;
  font-variation-settings: "FILL" 1;
}

.auth-phone {
  position: absolute;
  right: 7%;
  bottom: 2%;
  width: 15rem;
  min-height: 25rem;
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
  padding: 1.15rem;
}

.phone-status {
  width: 4.5rem;
  height: 0.35rem;
  margin: 0 auto 1.1rem;
  border-radius: 999px;
  background: var(--line);
}

.phone-app-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.app-dot {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.7rem;
}

.app-dot.green {
  background: var(--accent);
}

.app-dot.blue {
  background: var(--blue);
}

.app-line {
  width: 55%;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--line);
}

.app-line.wide {
  width: 70%;
}

.phone-screenshot {
  height: 11rem;
  margin: 1.3rem 0;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(66, 194, 109, 0.82), rgba(114, 167, 255, 0.72)),
    var(--surface-3);
}

.phone-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.phone-tabs span {
  height: 3.1rem;
  border-radius: var(--radius);
  background: var(--surface-3);
}

.auth-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  backdrop-filter: blur(18px);
}

.auth-title,
.brand,
.top-actions,
.section-heading,
.dialog-header,
.project-title-row,
.detail-owner,
.comment-author,
.profile-mini-row {
  display: flex;
  align-items: center;
}

.auth-title {
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.auth-title p,
.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-title h1,
.section-heading h2,
.dialog-header h2,
.hero-band h2,
.security-panel h2 {
  margin: 0;
  line-height: 1.05;
}

.auth-title h1 {
  font-size: 1.6rem;
}

.logo-mark {
  width: 2.8rem;
  height: 2.8rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent);
  color: #07100a;
}

.logo-mark .material-symbols-rounded {
  font-variation-settings: "FILL" 1;
}

.field {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.search-bar input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input,
.field select {
  min-height: 3rem;
  padding: 0 0.85rem;
}

.field textarea {
  resize: vertical;
  padding: 0.8rem 0.85rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-error {
  min-height: 1.25rem;
  margin: 0 0 0.75rem;
  color: var(--red);
  font-size: 0.9rem;
}

.primary-button,
.outline-button,
.text-button,
.icon-button,
.chip-button,
.rail-item,
.avatar-button,
.avatar-upload-button,
.download-button,
.star-button {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  border-radius: 999px;
  font-weight: 800;
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    opacity 160ms ease;
}

.primary-button {
  width: 100%;
  padding: 0 1.05rem;
  background: var(--accent);
  color: #07100a;
}

.primary-button:hover,
.outline-button:hover,
.icon-button:hover,
.chip-button:hover,
.rail-item:hover,
.download-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.outline-button:disabled,
.download-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.primary-button.compact {
  width: auto;
  min-width: 7rem;
}

.outline-button {
  border: 1px solid var(--line);
  padding: 0 1rem;
  background: var(--surface);
  color: var(--text);
}

.text-button {
  width: 100%;
  margin-top: 0.5rem;
  background: transparent;
  color: var(--accent);
}

.icon-button {
  width: 2.75rem;
  padding: 0;
  background: var(--surface-2);
  color: var(--text);
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(14rem, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
}

.brand-copy {
  display: grid;
  gap: 0.05rem;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.75rem;
}

.search-bar {
  min-height: 3rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 0 0.9rem;
}

.search-bar input {
  min-height: 2.7rem;
  border: 0;
  padding: 0;
  background: transparent;
}

.search-bar .material-symbols-rounded {
  color: var(--muted);
}

.top-actions {
  gap: 0.6rem;
}

.avatar-button {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  overflow: hidden;
  background: var(--surface-3);
  color: var(--text);
}

.avatar-button img,
.profile-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-button span,
.profile-avatar-wrap > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.workspace {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1rem, 3vw, 2rem);
}

.side-rail {
  position: sticky;
  top: 5.4rem;
  align-self: start;
  display: grid;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.55rem;
}

.rail-item {
  justify-content: flex-start;
  min-height: 2.8rem;
  padding: 0 0.85rem;
  background: transparent;
  color: var(--muted);
}

.rail-item.active,
.rail-item:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.rail-item.danger {
  color: var(--red);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-band,
.security-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-2) 88%, var(--accent) 12%), var(--surface)),
    var(--surface);
  padding: clamp(1rem, 3vw, 2rem);
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
}

.hero-band h2 {
  max-width: 48rem;
  font-size: clamp(1.8rem, 3vw, 3.6rem);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(5.5rem, 1fr));
  gap: 0.6rem;
}

.stat-strip div {
  min-height: 5rem;
  display: grid;
  align-content: center;
  gap: 0.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  padding: 0.85rem;
}

.stat-strip strong {
  font-size: 1.55rem;
}

.stat-strip span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.category-strip {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 1.2rem 0 0.25rem;
  scrollbar-width: thin;
}

.chip-button {
  flex: 0 0 auto;
  min-height: 2.4rem;
  padding: 0 0.95rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.chip-button.active {
  border-color: transparent;
  background: var(--accent);
  color: #07100a;
}

.section-heading {
  justify-content: space-between;
  gap: 1rem;
  margin: 1.6rem 0 1rem;
}

.section-heading h2 {
  font-size: 1.45rem;
}

.compact-heading {
  margin-top: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
  gap: 1rem;
}

.project-card {
  min-height: 27rem;
  display: grid;
  grid-template-rows: 10.5rem auto 1fr auto auto;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.8rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card:hover,
.project-card:focus-within {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.project-cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 70%, #fff 10%), color-mix(in srgb, var(--blue) 70%, #fff 10%)),
    var(--surface-3);
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-cover .material-symbols-rounded {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  color: rgba(7, 16, 10, 0.8);
  font-size: 3.2rem;
  font-variation-settings: "FILL" 1;
}

.project-title-row {
  gap: 0.75rem;
}

.project-icon {
  width: 3.1rem;
  height: 3.1rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-3);
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 900;
}

.project-icon img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.project-title-row h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.project-title-row p,
.project-description,
.detail-description,
.comment-body,
.empty-state p,
.security-panel p {
  color: var(--muted);
}

.project-title-row p {
  margin: 0.18rem 0 0;
  font-size: 0.82rem;
}

.project-description {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.45;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.project-meta,
.rating-row,
.download-row,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 1.8rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  padding: 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.meta-pill .material-symbols-rounded {
  font-size: 1rem;
}

.rating-row {
  justify-content: space-between;
}

.stars {
  display: inline-flex;
  gap: 0.15rem;
}

.star-button {
  width: 1.8rem;
  min-height: 1.8rem;
  padding: 0;
  background: transparent;
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

.star-button.filled {
  color: var(--yellow);
}

.star-button .material-symbols-rounded {
  font-size: 1.25rem;
  font-variation-settings: "FILL" 1;
}

.rating-score {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.download-button {
  min-height: 2.4rem;
  flex: 1 1 8rem;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.download-button.primary {
  border-color: transparent;
  background: var(--accent);
  color: #07100a;
}

.empty-state {
  min-height: 19rem;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.65rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  text-align: center;
  padding: 2rem;
}

.empty-state > .material-symbols-rounded {
  color: var(--accent);
  font-size: 3.6rem;
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  gap: 1rem;
}

.profile-panel,
.profile-project,
.security-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.profile-panel {
  align-self: start;
  padding: 1.2rem;
  text-align: center;
}

.profile-avatar-wrap {
  position: relative;
  width: 8rem;
  height: 8rem;
  margin: 0 auto 1rem;
  overflow: hidden;
  border-radius: 50%;
  background: var(--surface-3);
}

.avatar-upload-button {
  position: absolute;
  right: 0.3rem;
  bottom: 0.3rem;
  width: 2.4rem;
  min-height: 2.4rem;
  background: var(--accent);
  color: #07100a;
}

.avatar-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.profile-panel h2 {
  margin: 0 0 0.35rem;
}

.profile-panel p {
  margin: 0 0 1rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.profile-facts {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  text-align: left;
}

.profile-facts div {
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 0.75rem;
}

.profile-facts dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-facts dd {
  margin: 0.2rem 0 0;
  font-weight: 800;
}

.profile-project-list {
  display: grid;
  gap: 0.75rem;
}

.profile-project {
  display: grid;
  grid-template-columns: 3.3rem 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem;
}

.profile-project h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.profile-project p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.security-panel {
  display: flex;
  gap: 1rem;
  padding: 1.3rem;
}

.security-panel > .material-symbols-rounded {
  color: var(--accent);
  font-size: 2.6rem;
  font-variation-settings: "FILL" 1;
}

.security-panel p {
  max-width: 48rem;
  line-height: 1.6;
}

.app-dialog {
  width: min(42rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.app-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(4px);
}

.wide-dialog {
  width: min(58rem, calc(100vw - 2rem));
}

.dialog-header {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-grid,
.upload-grid {
  display: grid;
  gap: 1rem;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.upload-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.file-drop {
  min-height: 9.5rem;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.45rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease;
}

.file-drop:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.file-drop .material-symbols-rounded {
  color: var(--accent);
  font-size: 2rem;
}

.file-drop strong {
  color: var(--text);
}

.file-drop input {
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.progress-wrap {
  display: grid;
  gap: 0.45rem;
  margin: 0.5rem 0 1rem;
}

.progress-track {
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  transition: width 180ms ease;
}

#uploadStatus {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.dialog-actions {
  justify-content: flex-end;
}

.dialog-actions .primary-button {
  width: auto;
}

.project-details {
  display: grid;
  gap: 1rem;
}

.detail-hero {
  min-height: 18rem;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 70%, #fff 10%), color-mix(in srgb, var(--blue) 70%, #fff 10%)),
    var(--surface-3);
}

.detail-hero img {
  width: 100%;
  height: 100%;
  min-height: 18rem;
  object-fit: cover;
}

.detail-description {
  line-height: 1.65;
  margin: 0;
}

.detail-owner {
  gap: 0.6rem;
  color: var(--muted);
  font-weight: 800;
}

.detail-owner img,
.comment-author img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
}

.screenshot-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 0.6rem;
}

.screenshot-strip img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.comments-panel {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.comment-form {
  display: grid;
  gap: 0.6rem;
  margin: 0.75rem 0 1rem;
}

.comment-form textarea {
  width: 100%;
  min-height: 5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  resize: vertical;
  padding: 0.8rem;
}

.comment-list {
  display: grid;
  gap: 0.7rem;
}

.comment {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 0.75rem;
}

.comment-author {
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  font-weight: 800;
}

.comment-body {
  margin: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.toast-region {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  display: grid;
  gap: 0.6rem;
  width: min(22rem, calc(100vw - 2rem));
}

.toast {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem;
  color: var(--text);
  font-weight: 700;
  animation: toast-in 180ms ease both;
}

.toast.error {
  border-color: color-mix(in srgb, var(--red) 60%, var(--line));
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .auth-screen {
    grid-template-columns: 1fr;
  }

  .auth-art {
    display: none;
  }

  .topbar {
    grid-template-columns: 1fr auto;
  }

  .search-bar {
    grid-column: 1 / -1;
    order: 3;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .rail-item {
    flex: 0 0 auto;
  }

  .hero-band,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .stat-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0.75rem;
  }

  .brand-copy small,
  .primary-button.compact span:last-child,
  .rail-item span:last-child {
    display: none;
  }

  .workspace {
    padding: 0.75rem;
  }

  .hero-band h2 {
    font-size: 1.8rem;
  }

  .stat-strip,
  .form-grid,
  .upload-grid,
  .profile-project {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .dialog-actions {
    display: grid;
  }

  .dialog-actions .primary-button,
  .dialog-actions .outline-button {
    width: 100%;
  }
}
/* Выравниваем картинку внутри круглого контейнера на экране входа */
.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Чтобы углы картинки не вылезали за круг */
}

/* Делаем так, чтобы иконка внутри формы входа масштабировалась под размер круга */
.logo-mark .logo-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* Выравнивание иконки внутри шапки главного интерфейса */
.topbar .logo-mark {
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Обрезает углы картинки по форме круглого контейнера */
}

/* Стили для самого изображения логотипа */
.topbar .logo-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast; /* Увеличивает чёткость неона и мелких деталей */
}