@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg-primary: #07080d;
  --bg-secondary: #0d0f16;
  --bg-card: rgba(17, 19, 28, 0.9);
  --bg-card-hover: rgba(22, 25, 37, 0.96);
  --bg-soft: rgba(255, 255, 255, 0.04);
  --bg-input: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text-primary: #f7f8fb;
  --text-secondary: rgba(247, 248, 251, 0.72);
  --text-tertiary: rgba(247, 248, 251, 0.44);
  --accent: #7f7fff;
  --accent-hover: #9a9aff;
  --success: #6ce2a1;
  --warning: #ffd067;
  --danger: #ff817c;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --shadow-card: 0 24px 64px rgba(0, 0, 0, 0.26);
  --shadow-elevated: 0 36px 100px rgba(0, 0, 0, 0.36);
  --transition-fast: 160ms ease;
  --transition-normal: 260ms ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: linear-gradient(180deg, #090a10 0%, #06070b 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  background: rgba(7, 8, 13, 0.74);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: 1180px;
  height: 60px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-area {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logo-area haunted-eye {
  background: transparent;
}

.site-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.nav-link:hover,
.admin-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
}

.burger-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.burger-btn:hover,
.burger-btn[aria-expanded="true"] {
  background: rgba(127, 127, 255, 0.16);
  border-color: rgba(127, 127, 255, 0.32);
  transform: translateY(-1px);
}

.hero-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 24px 28px;
  text-align: center;
}

.hero-section-public {
  padding-top: 88px;
}

.hero-eye {
  width: min(410px, 74vw);
  margin: 0 auto 26px;
  display: block;
  filter: drop-shadow(0 0 26px rgba(127, 127, 255, 0.1));
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  margin-bottom: 16px;
  border-radius: 999px;
  border: 1px solid rgba(127, 127, 255, 0.24);
  background: rgba(127, 127, 255, 0.08);
  color: #c5c5ff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.small-eye {
  width: min(260px, 56vw);
}

.hero-title {
  max-width: 920px;
  margin: 0 auto;
  font-size: clamp(2.35rem, 5vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.hero-subtitle {
  max-width: 760px;
  margin: 16px auto 0;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.app-hero {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding-top: 28px;
  padding-bottom: 10px;
}

.app-hero .hero-badge {
  margin-bottom: 0;
}

.app-hero .hero-eye {
  margin: 0;
}

.app-hero .app-section-nav {
  width: min(100%, 860px);
  margin-bottom: 0;
  justify-content: center;
}

.app-hero-note {
  color: var(--text-secondary);
  font-size: 0.92rem;
  text-align: center;
}

.main-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 88px;
}

.main-content-profile {
  padding-top: 38px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-title {
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.section-desc {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.section-spaced {
  margin-top: 58px;
}

.section-spaced-sm {
  margin-top: 20px;
}

.section-spaced-xs {
  margin-top: 10px;
}

.cards-grid,
.split-grid,
.summary-grid,
.detail-grid,
.record-list,
.feed-list,
.profile-month-grid {
  display: grid;
  gap: 18px;
}

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

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

.updates-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

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

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.card,
.summary-tile,
.record-card,
.spotlight-card,
.search-surface,
.profile-hero-card,
.feed-card {
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.card {
  padding: 24px;
}

.info-strip {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.info-strip strong {
  color: var(--text-primary);
  font-size: 0.96rem;
}

.info-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 14px;
  font-size: 0.88rem;
}

.info-strip-grid span b {
  color: var(--text-primary);
}

.feature-card {
  min-height: 170px;
}

.card,
.record-card,
.summary-tile,
.feed-card {
  transition:
    transform var(--transition-normal),
    border-color var(--transition-normal),
    background var(--transition-normal);
}

.card:hover,
.record-card:hover,
.summary-tile:hover,
.feed-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.card-date {
  margin-bottom: 10px;
  color: var(--text-tertiary);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-title {
  margin-bottom: 12px;
  font-size: 1.16rem;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.card-body {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.search-surface {
  max-width: 920px;
  margin: 28px auto 0;
  padding: 22px;
}

.search-form {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-form-hero .search-input {
  flex: 1;
}

.search-button {
  min-width: 160px;
}

.search-status {
  margin-top: 14px;
}

.summary-tile {
  padding: 22px 18px;
  display: grid;
  gap: 8px;
}

.summary-label {
  color: var(--text-tertiary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-tile strong {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.summary-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.stat-box {
  min-width: 0;
  padding: 12px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
}

.stat-box span {
  display: block;
  color: var(--text-tertiary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-box strong {
  display: block;
  margin-top: 6px;
  font-size: 0.94rem;
  word-break: break-word;
}

.identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.identity-compact {
  gap: 12px;
}

.identity-avatar {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 18px;
  border: 1px solid var(--border-medium);
  background: linear-gradient(135deg, rgba(127, 127, 255, 0.18), rgba(255, 255, 255, 0.06));
  display: grid;
  place-items: center;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  overflow: hidden;
}

.identity-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.identity-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.identity-text strong {
  font-size: 1rem;
  line-height: 1.15;
}

.identity-text span {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.identity-text-large strong {
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

.identity-text-large span {
  font-size: 1rem;
}

.record-card,
.feed-card {
  padding: 18px;
}

.record-card-head,
.spotlight-header,
.feed-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.record-card-body,
.feed-content,
.feed-quote,
.feed-media-grid,
.feed-stats {
  margin-top: 14px;
}

.record-card-title {
  display: block;
  font-size: 1rem;
}

.feed-head-side,
.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.feed-content {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.7;
}

.feed-quote {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
}

.feed-quote strong {
  display: block;
  margin-bottom: 6px;
}

.feed-context-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  color: var(--text-tertiary);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feed-quote p {
  color: var(--text-secondary);
}

.feed-content-muted {
  color: var(--text-secondary);
}

.feed-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.feed-media-grid img {
  width: 100%;
  min-height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
}

.feed-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-tertiary);
  font-size: 0.86rem;
}

.profile-hero-card,
.spotlight-card {
  overflow: hidden;
}

.profile-cover,
.spotlight-cover {
  min-height: 170px;
  background:
    linear-gradient(135deg, rgba(127, 127, 255, 0.26), rgba(127, 127, 255, 0.06)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  background-size: cover;
  background-position: center;
}

.profile-hero-body,
.spotlight-body {
  padding: 24px;
}

.profile-hero-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.spotlight-meta {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.auth-hero {
  padding-bottom: 18px;
}

.auth-shell {
  max-width: 840px;
  margin: 0 auto;
}

.auth-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

.auth-tab {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.auth-tab.active {
  background: rgba(127, 127, 255, 0.16);
  color: var(--text-primary);
}

.auth-panels {
  display: grid;
}

.inline-code,
.mono-line,
.code-block code {
  font-family: "SFMono-Regular", "Consolas", monospace;
}

.inline-code {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 0.82rem;
}

.mono-line {
  margin-top: 6px;
  color: var(--text-tertiary);
  font-size: 0.79rem;
  word-break: break-all;
}

.subtle-line {
  color: var(--text-tertiary);
  font-size: 0.84rem;
}

.code-block {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(127, 127, 255, 0.24);
  border-radius: var(--radius-md);
  background: rgba(127, 127, 255, 0.08);
}

.code-block code {
  display: block;
  margin-top: 6px;
  color: var(--text-primary);
  font-size: 1.06rem;
  letter-spacing: 0.04em;
  word-break: break-all;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(127, 127, 255, 0.22);
}

.btn-secondary {
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
}

.form-group {
  display: grid;
  gap: 8px;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.form-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
}

.form-input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.form-input:focus {
  border-color: rgba(127, 127, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(127, 127, 255, 0.12);
}

.form-input::placeholder {
  color: rgba(247, 248, 251, 0.34);
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.choice-pill:hover {
  transform: translateY(-1px);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.choice-pill.active {
  border-color: rgba(127, 127, 255, 0.34);
  background: rgba(127, 127, 255, 0.14);
  color: var(--text-primary);
  box-shadow: 0 10px 28px rgba(127, 127, 255, 0.14);
}

.form-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.action-row-stacked {
  margin-bottom: 16px;
  flex-direction: column;
  align-items: stretch;
}

.btn-compact {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.88rem;
}

.admin-actions-card {
  padding: 18px;
}

.admin-actions-card .card-body {
  font-size: 0.88rem;
}

.status-line {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.status-good {
  color: var(--success);
}

.status-warn {
  color: var(--warning);
}

.status-bad {
  color: var(--danger);
}

.helper-list,
.feature-list {
  margin-top: 16px;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
}

.kv-list {
  display: grid;
  gap: 12px;
}

.kv-list > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.kv-list span {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kv-list strong {
  max-width: 58%;
  text-align: right;
  font-size: 0.94rem;
  word-break: break-word;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-medium);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.pill.risk-safe {
  color: var(--success);
  border-color: rgba(108, 226, 161, 0.28);
  background: rgba(108, 226, 161, 0.08);
}

.pill.risk-suspicious {
  color: var(--warning);
  border-color: rgba(255, 208, 103, 0.28);
  background: rgba(255, 208, 103, 0.08);
}

.pill.risk-dangerous {
  color: var(--danger);
  border-color: rgba(255, 129, 124, 0.28);
  background: rgba(255, 129, 124, 0.08);
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.empty-state {
  padding: 52px 24px;
  text-align: center;
  color: var(--text-tertiary);
}

.compact-empty {
  padding: 24px 12px;
}

.empty-state-text {
  font-size: 1rem;
}

.empty-state-hint {
  margin-top: 6px;
  font-size: 0.88rem;
}

.hidden {
  display: none !important;
}

.site-footer {
  padding: 34px 24px 48px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.84rem;
}

.glyph-hero {
  padding-top: 44px;
  padding-bottom: 20px;
}

.glyph-main {
  max-width: 1220px;
}

.glyph-workspace,
.glyph-output-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

.glyph-workspace {
  grid-template-columns: 360px minmax(0, 1fr);
}

.glyph-output-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
}

.glyph-control-panel {
  position: sticky;
  top: 82px;
}

.glyph-dropzone {
  display: grid;
  gap: 8px;
  min-height: 154px;
  padding: 20px;
  border: 1px dashed rgba(127, 127, 255, 0.36);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(127, 127, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

.glyph-dropzone:hover,
.glyph-dropzone.is-dragging {
  transform: translateY(-1px);
  border-color: rgba(154, 154, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(127, 127, 255, 0.18), rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.04);
}

.glyph-dropzone input {
  width: 1px;
  height: 1px;
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.glyph-dropzone-compact {
  min-height: 112px;
}

.glyph-drop-title {
  align-self: end;
  color: var(--text-primary);
  font-size: 1.04rem;
  font-weight: 700;
}

.glyph-drop-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.glyph-controls {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.glyph-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 8px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.glyph-range span {
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
}

.glyph-range input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--accent);
}

.glyph-range strong {
  justify-self: end;
  color: var(--text-primary);
  font-size: 0.86rem;
}

.glyph-actions {
  margin-top: 16px;
}

.glyph-preview-panel,
.glyph-target-shell,
.glyph-canvas-shell {
  border: 1px solid var(--border-subtle);
  background: rgba(17, 19, 28, 0.82);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.glyph-preview-panel {
  padding: 18px;
}

.glyph-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.glyph-canvas-shell,
.glyph-target-shell {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(127, 127, 255, 0.08), transparent),
    #10121a;
}

.glyph-canvas-shell canvas,
.glyph-target-shell canvas {
  display: block;
  width: 100%;
  height: auto;
}

.glyph-canvas-shell canvas {
  aspect-ratio: 720 / 920;
}

.glyph-target-shell {
  margin-top: 16px;
}

.glyph-target-shell canvas {
  aspect-ratio: 720 / 460;
}

.glyph-output {
  width: 100%;
  min-height: 320px;
  resize: vertical;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-primary);
  font: 0.82rem/1.55 "SFMono-Regular", "Consolas", monospace;
  outline: none;
}

.glyph-output-small {
  min-height: 220px;
}

.glyph-output:focus {
  border-color: rgba(127, 127, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(127, 127, 255, 0.12);
}

.glyph-decode-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
}

.glyph-decode-summary span,
.glyph-stat-grid span {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.glyph-decode-summary strong {
  color: var(--text-primary);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.glyph-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.glyph-stat-grid div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
}

.glyph-stat-grid strong {
  min-width: 0;
  color: var(--text-primary);
  font-size: 1.2rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.main-content-profile {
  max-width: 1120px;
  padding-top: 24px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

.profile-main-column,
.profile-side-column {
  min-width: 0;
}

.profile-side-column {
  position: sticky;
  top: 82px;
}

.profile-side-card,
.profile-feed-shell {
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.profile-feed-shell,
.profile-side-card {
  padding: 18px;
}

.profile-feed-shell-head,
.profile-side-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title-compact {
  font-size: 1.2rem;
  line-height: 1.1;
}

.profile-hero-card {
  border-radius: 26px;
}

.profile-cover {
  min-height: 124px;
}

.profile-hero-body {
  padding: 16px 18px 18px;
  align-items: flex-start;
}

.profile-hero-main {
  display: grid;
  gap: 10px;
}

.identity-profile .identity-avatar,
.profile-hero-card .identity-avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
}

.profile-hero-card .identity-text-large strong {
  font-size: 1.18rem;
}

.profile-hero-card .identity-text-large span {
  font-size: 0.92rem;
}

.profile-inline-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.profile-inline-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

.profile-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-summary-grid .summary-tile {
  padding: 14px 12px;
  border-radius: 18px;
  box-shadow: none;
}

.profile-summary-grid .summary-tile strong {
  font-size: 1.3rem;
  letter-spacing: -0.04em;
}

.profile-month-compact {
  margin-top: 10px;
}

.profile-detail-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

.profile-detail-grid .stat-box {
  padding: 10px 12px;
}

.profile-detail-grid .stat-box strong {
  font-size: 0.9rem;
}

.activity-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  margin-bottom: 14px;
  overflow-x: auto;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
}

.activity-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.activity-tab strong {
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.activity-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.activity-tab.active strong {
  color: var(--text-primary);
}

.feed-list {
  gap: 14px;
}

.feed-card {
  padding: 15px;
  border-radius: 22px;
  box-shadow: none;
}

.feed-head {
  gap: 10px;
}

.feed-head-side {
  gap: 6px;
}

.feed-content {
  font-size: 0.96rem;
  line-height: 1.62;
}

.feed-quote {
  padding: 12px 14px;
}

.feed-media-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.feed-media-grid img {
  min-height: 144px;
}

.feed-stats {
  gap: 10px 14px;
  font-size: 0.82rem;
}

.profile-feed-shell .status-line,
.profile-side-card .status-line {
  font-size: 0.84rem;
}

.app-section-nav {
  position: sticky;
  top: 72px;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  padding: 8px;
  border-radius: 22px;
  border: 1px solid var(--border-subtle);
  background: rgba(13, 15, 22, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.app-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.app-nav-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.app-nav-btn.active {
  background: rgba(127, 127, 255, 0.16);
  color: var(--text-primary);
}

.app-section-panel.hidden {
  display: none;
}

.fade-in-up {
  animation: fadeInUp 480ms ease forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 980px) {
  .glyph-workspace,
  .glyph-output-grid {
    grid-template-columns: 1fr;
  }

  .glyph-control-panel {
    position: static;
  }

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

  .profile-side-column {
    position: static;
  }

  .split-grid,
  .summary-grid,
  .profile-hero-body,
  .updates-layout {
    grid-template-columns: 1fr;
  }

  .profile-hero-body {
    display: grid;
    align-items: flex-start;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 780px) {
  body.menu-open {
    overflow: hidden;
  }

  .header-inner {
    height: 56px;
    padding: 0 16px;
  }

  .main-nav {
    display: none;
    position: fixed;
    top: 56px;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: max-content;
    max-height: calc(100vh - 72px);
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    overflow-y: auto;
    border: 1px solid rgba(127, 127, 255, 0.18);
    border-radius: 24px;
    background:
      radial-gradient(circle at 80% 0%, rgba(127, 127, 255, 0.18), transparent 38%),
      linear-gradient(180deg, rgba(17, 19, 28, 0.98), rgba(8, 9, 15, 0.98));
    box-shadow:
      0 28px 80px rgba(0, 0, 0, 0.56),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
    animation: mobileMenuIn 180ms ease-out;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav.open::before {
    content: "Навигация";
    display: block;
    padding: 4px 8px 6px;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .nav-link,
  .admin-btn {
    width: 100%;
    min-height: 52px;
    justify-content: flex-start;
    padding: 0 16px;
    border-color: var(--border-subtle);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-primary);
    font-weight: 700;
  }

  .nav-link:hover,
  .admin-btn:hover {
    background: rgba(127, 127, 255, 0.14);
    border-color: rgba(127, 127, 255, 0.28);
  }

  .burger-btn {
    display: inline-grid;
    place-items: center;
  }

  .hero-section {
    padding: 62px 16px 24px;
  }

  .app-hero {
    gap: 12px;
    padding-top: 18px;
    padding-bottom: 6px;
  }

  .main-content,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cards-grid,
  .detail-grid,
  .feed-media-grid,
  .glyph-workspace,
  .glyph-output-grid,
  .summary-grid,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .search-form,
  .form-actions,
  .action-row,
  .choice-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .search-button {
    width: 100%;
  }

  .record-card-head,
  .spotlight-header,
  .feed-head,
  .kv-list > div {
    flex-direction: column;
    align-items: flex-start;
  }

  .feed-head-side,
  .profile-badges {
    justify-content: flex-start;
  }

  .activity-tabs {
    padding: 4px;
  }

  .app-section-nav {
    top: 64px;
    padding: 6px;
  }

  .activity-tab {
    min-height: 38px;
    padding: 0 14px;
  }

  .app-nav-btn {
    width: 100%;
  }

  .kv-list strong {
    max-width: 100%;
    text-align: left;
  }
}

@keyframes mobileMenuIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
